Files
misode.github.io/assets/vendor.753ffb9a.js
2022-04-06 22:45:30 +00:00

39 lines
1.4 MiB
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var e=Object.defineProperty,t=Object.defineProperties,i=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,a=(t,i,n)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[i]=n,s=(e,t)=>{for(var i in t||(t={}))r.call(t,i)&&a(e,i,t[i]);if(n)for(var i of n(t))o.call(t,i)&&a(e,i,t[i]);return e},c=(e,n)=>t(e,i(n)),l=e=>"symbol"==typeof e?e:e+"";const u={};var d,h,p,m,f,g={},_=[],b=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function v(e,t){for(var i in t)e[i]=t[i];return e}function y(e){var t=e.parentNode;t&&t.removeChild(e)}function w(e,t,i){var n,r,o,a=arguments,s={};for(o in t)"key"==o?n=t[o]:"ref"==o?r=t[o]:s[o]=t[o];if(arguments.length>3)for(i=[i],o=3;o<arguments.length;o++)i.push(a[o]);if(null!=i&&(s.children=i),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return x(e,s,n,r,null)}function x(e,t,i,n,r){var o={type:e,props:t,key:i,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++d.__v:r};return null!=d.vnode&&d.vnode(o),o}function N(e){return e.children}function k(e,t){this.props=e,this.context=t}function A(e,t){if(null==t)return e.__?A(e.__,e.__.__k.indexOf(e)+1):null;for(var i;t<e.__k.length;t++)if(null!=(i=e.__k[t])&&null!=i.__e)return i.__e;return"function"==typeof e.type?A(e):null}function C(e){var t,i;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(i=e.__k[t])&&null!=i.__e){e.__e=e.__c.base=i.__e;break}return C(e)}}function O(e){(!e.__d&&(e.__d=!0)&&h.push(e)&&!S.__r++||m!==d.debounceRendering)&&((m=d.debounceRendering)||p)(S)}function S(){for(var e;S.__r=h.length;)e=h.sort((function(e,t){return e.__v.__b-t.__v.__b})),h=[],e.some((function(e){var t,i,n,r,o,a;e.__d&&(o=(r=(t=e).__v).__e,(a=t.__P)&&(i=[],(n=v({},r)).__v=r.__v+1,$(a,r,n,t.__n,void 0!==a.ownerSVGElement,null!=r.__h?[o]:null,i,null==o?A(r):o,r.__h),j(i,r),r.__e!=o&&C(r)))}))}function E(e,t,i,n,r,o,a,s,c,l){var u,d,h,p,m,f,b,v=n&&n.__k||_,y=v.length;for(i.__k=[],u=0;u<t.length;u++)if(null!=(p=i.__k[u]=null==(p=t[u])||"boolean"==typeof p?null:"string"==typeof p||"number"==typeof p||"bigint"==typeof p?x(null,p,null,null,p):Array.isArray(p)?x(N,{children:p},null,null,null):p.__b>0?x(p.type,p.props,p.key,null,p.__v):p)){if(p.__=i,p.__b=i.__b+1,null===(h=v[u])||h&&p.key==h.key&&p.type===h.type)v[u]=void 0;else for(d=0;d<y;d++){if((h=v[d])&&p.key==h.key&&p.type===h.type){v[d]=void 0;break}h=null}$(e,p,h=h||g,r,o,a,s,c,l),m=p.__e,(d=p.ref)&&h.ref!=d&&(b||(b=[]),h.ref&&b.push(h.ref,null,p),b.push(d,p.__c||m,p)),null!=m?(null==f&&(f=m),"function"==typeof p.type&&null!=p.__k&&p.__k===h.__k?p.__d=c=F(p,c,e):c=B(e,p,h,v,m,c),l||"option"!==i.type?"function"==typeof i.type&&(i.__d=c):e.value=""):c&&h.__e==c&&c.parentNode!=e&&(c=A(h))}for(i.__e=f,u=y;u--;)null!=v[u]&&("function"==typeof i.type&&null!=v[u].__e&&v[u].__e==i.__d&&(i.__d=A(n,u+1)),P(v[u],v[u]));if(b)for(u=0;u<b.length;u++)I(b[u],b[++u],b[++u])}function F(e,t,i){var n,r;for(n=0;n<e.__k.length;n++)(r=e.__k[n])&&(r.__=e,t="function"==typeof r.type?F(r,t,i):B(i,r,r,e.__k,r.__e,t));return t}function D(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){D(e,t)})):t.push(e)),t}function B(e,t,i,n,r,o){var a,s,c;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==i||r!=o||null==r.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(r),a=null;else{for(s=o,c=0;(s=s.nextSibling)&&c<n.length;c+=2)if(s==r)break e;e.insertBefore(r,o),a=o}return void 0!==a?a:r.nextSibling}function L(e,t,i){"-"===t[0]?e.setProperty(t,i):e[t]=null==i?"":"number"!=typeof i||b.test(t)?i:i+"px"}function M(e,t,i,n,r){var o;e:if("style"===t)if("string"==typeof i)e.style.cssText=i;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)i&&t in i||L(e.style,t,"");if(i)for(t in i)n&&i[t]===n[t]||L(e.style,t,i[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=i,i?n||e.addEventListener(t,o?R:T,o):e.removeEventListener(t,o?R:T,o);else if("dangerouslySetInnerHTML"!==t){if(r)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==i?"":i;break e}catch(a){}"function"==typeof i||(null!=i&&(!1!==i||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,i):e.removeAttribute(t))}}function T(e){this.l[e.type+!1](d.event?d.event(e):e)}function R(e){this.l[e.type+!0](d.event?d.event(e):e)}function $(e,t,i,n,r,o,a,s,c){var l,u,h,p,m,f,b,w,x,A,C,O=t.type;if(void 0!==t.constructor)return null;null!=i.__h&&(c=i.__h,s=t.__e=i.__e,t.__h=null,o=[s]),(l=d.__b)&&l(t);try{e:if("function"==typeof O){if(w=t.props,x=(l=O.contextType)&&n[l.__c],A=l?x?x.props.value:l.__:n,i.__c?b=(u=t.__c=i.__c).__=u.__E:("prototype"in O&&O.prototype.render?t.__c=u=new O(w,A):(t.__c=u=new k(w,A),u.constructor=O,u.render=z),x&&x.sub(u),u.props=w,u.state||(u.state={}),u.context=A,u.__n=n,h=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=O.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=v({},u.__s)),v(u.__s,O.getDerivedStateFromProps(w,u.__s))),p=u.props,m=u.state,h)null==O.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==O.getDerivedStateFromProps&&w!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(w,A),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(w,u.__s,A)||t.__v===i.__v){u.props=w,u.state=u.__s,t.__v!==i.__v&&(u.__d=!1),u.__v=t,t.__e=i.__e,t.__k=i.__k,t.__k.forEach((function(e){e&&(e.__=t)})),u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(w,u.__s,A),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,m,f)}))}u.context=A,u.props=w,u.state=u.__s,(l=d.__r)&&l(t),u.__d=!1,u.__v=t,u.__P=e,l=u.render(u.props,u.state,u.context),u.state=u.__s,null!=u.getChildContext&&(n=v(v({},n),u.getChildContext())),h||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(p,m)),C=null!=l&&l.type===N&&null==l.key?l.props.children:l,E(e,Array.isArray(C)?C:[C],t,i,n,r,o,a,s,c),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),b&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===i.__v?(t.__k=i.__k,t.__e=i.__e):t.__e=function(e,t,i,n,r,o,a,s){var c,l,u,d,h=i.props,p=t.props,m=t.type,f=0;if("svg"===m&&(r=!0),null!=o)for(;f<o.length;f++)if((c=o[f])&&(c===e||(m?c.localName==m:3==c.nodeType))){e=c,o[f]=null;break}if(null==e){if(null===m)return document.createTextNode(p);e=r?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,p.is&&p),o=null,s=!1}if(null===m)h===p||s&&e.data===p||(e.data=p);else{if(o=o&&_.slice.call(e.childNodes),l=(h=i.props||g).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!s){if(null!=o)for(h={},d=0;d<e.attributes.length;d++)h[e.attributes[d].name]=e.attributes[d].value;(u||l)&&(u&&(l&&u.__html==l.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,i,n,r){var o;for(o in i)"children"===o||"key"===o||o in t||M(e,o,null,i[o],n);for(o in t)r&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||i[o]===t[o]||M(e,o,t[o],i[o],n)}(e,p,h,r,s),u)t.__k=[];else if(f=t.props.children,E(e,Array.isArray(f)?f:[f],t,i,n,r&&"foreignObject"!==m,o,a,e.firstChild,s),null!=o)for(f=o.length;f--;)null!=o[f]&&y(o[f]);s||("value"in p&&void 0!==(f=p.value)&&(f!==e.value||"progress"===m&&!f)&&M(e,"value",f,h.value,!1),"checked"in p&&void 0!==(f=p.checked)&&f!==e.checked&&M(e,"checked",f,h.checked,!1))}return e}(i.__e,t,i,n,r,o,a,c);(l=d.diffed)&&l(t)}catch(S){t.__v=null,(c||null!=o)&&(t.__e=s,t.__h=!!c,o[o.indexOf(s)]=null),d.__e(S,t,i)}}function j(e,t){d.__c&&d.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(i){d.__e(i,t.__v)}}))}function I(e,t,i){try{"function"==typeof e?e(t):e.current=t}catch(n){d.__e(n,i)}}function P(e,t,i){var n,r,o;if(d.unmount&&d.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||I(n,null,t)),i||"function"==typeof e.type||(i=null!=(r=e.__e)),e.__e=e.__d=void 0,null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(a){d.__e(a,t)}n.base=n.__P=null}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&P(n[o],t,i);null!=r&&y(r)}function z(e,t,i){return this.constructor(e,i)}function U(e,t,i){var n,r,o;d.__&&d.__(e,t),r=(n="function"==typeof i)?null:i&&i.__k||t.__k,o=[],$(t,e=(!n&&i||t).__k=w(N,null,[e]),r||g,g,void 0!==t.ownerSVGElement,!n&&i?[i]:r?null:t.firstChild?_.slice.call(t.childNodes):null,o,!n&&i?i:r?r.__e:t.firstChild,n),j(o,e)}function W(e,t){U(e,t,W)}function H(e,t,i){var n,r,o,a=arguments,s=v({},e.props);for(o in t)"key"==o?n=t[o]:"ref"==o?r=t[o]:s[o]=t[o];if(arguments.length>3)for(i=[i],o=3;o<arguments.length;o++)i.push(a[o]);return null!=i&&(s.children=i),x(e.type,s,n||e.key,r||e.ref,null)}function q(e,t){var i={__c:t="__cC"+f++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var i,n;return this.getChildContext||(i=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&i.some(O)},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}),e.children}};return i.Provider.__=i.Consumer.contextType=i}d={__e:function(e,t){for(var i,n,r;t=t.__;)if((i=t.__c)&&!i.__)try{if((n=i.constructor)&&null!=n.getDerivedStateFromError&&(i.setState(n.getDerivedStateFromError(e)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e),r=i.__d),r)return i.__E=i}catch(o){e=o}throw e},__v:0},k.prototype.setState=function(e,t){var i;i=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(v({},i),this.props)),e&&v(i,e),null!=e&&this.__v&&(t&&this.__h.push(t),O(this))},k.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),O(this))},k.prototype.render=N,h=[],p="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,S.__r=0,f=0;var V={};function G(e,t){for(var i in t)e[i]=t[i];return e}function K(e,t,i){var n,r=/(?:\?([^#]*))?(#.*)?$/,o=e.match(r),a={};if(o&&o[1])for(var s=o[1].split("&"),c=0;c<s.length;c++){var l=s[c].split("=");a[decodeURIComponent(l[0])]=decodeURIComponent(l.slice(1).join("="))}e=Y(e.replace(r,"")),t=Y(t||"");for(var u=Math.max(e.length,t.length),d=0;d<u;d++)if(t[d]&&":"===t[d].charAt(0)){var h=t[d].replace(/(^:|[+*?]+$)/g,""),p=(t[d].match(/[+*?]+$/)||V)[0]||"",m=~p.indexOf("+"),f=~p.indexOf("*"),g=e[d]||"";if(!g&&!f&&(p.indexOf("?")<0||m)){n=!1;break}if(a[h]=decodeURIComponent(g),m||f){a[h]=e.slice(d).map(decodeURIComponent).join("/");break}}else if(t[d]!==e[d]){n=!1;break}return(!0===i.default||!1!==n)&&a}function X(e,t){return e.rank<t.rank?1:e.rank>t.rank?-1:e.index-t.index}function J(e,t){return e.index=t,e.rank=function(e){return e.props.default?0:(t=e.props.path,Y(t).map(Z).join(""));var t}(e),e.props}function Y(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function Z(e){return":"==e.charAt(0)?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}var Q=null,ee=[],te=[],ie={};function ne(){var e;return""+((e=Q&&Q.location?Q.location:Q&&Q.getCurrentLocation?Q.getCurrentLocation():"undefined"!=typeof location?location:ie).pathname||"")+(e.search||"")}function re(e,t){return void 0===t&&(t=!1),"string"!=typeof e&&e.url&&(t=e.replace,e=e.url),function(e){for(var t=ee.length;t--;)if(ee[t].canRoute(e))return!0;return!1}(e)&&function(e,t){void 0===t&&(t="push"),Q&&Q[t]?Q[t](e):"undefined"!=typeof history&&history[t+"State"]&&history[t+"State"](null,null,e)}(e,t?"replace":"push"),oe(e)}function oe(e){for(var t=!1,i=0;i<ee.length;i++)!0===ee[i].routeTo(e)&&(t=!0);for(var n=te.length;n--;)te[n](e);return t}function ae(e){if(e&&e.getAttribute){var t=e.getAttribute("href"),i=e.getAttribute("target");if(t&&t.match(/^\//g)&&(!i||i.match(/^_?self$/i)))return re(t)}}function se(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||0!==e.button))return ae(e.currentTarget||e.target||this),ce(e)}function ce(e){return e&&(e.stopImmediatePropagation&&e.stopImmediatePropagation(),e.stopPropagation&&e.stopPropagation(),e.preventDefault()),!1}function le(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||0!==e.button)){var t=e.target;do{if("A"===String(t.nodeName).toUpperCase()&&t.getAttribute("href")){if(t.hasAttribute("native"))return;if(ae(t))return ce(e)}}while(t=t.parentNode)}}var ue=!1;var de=function(e){function t(t){e.call(this,t),t.history&&(Q=t.history),this.state={url:t.url||ne()},ue||("function"==typeof addEventListener&&(Q||addEventListener("popstate",(function(){oe(ne())})),addEventListener("click",le)),ue=!0)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.shouldComponentUpdate=function(e){return!0!==e.static||(e.url!==this.props.url||e.onChange!==this.props.onChange)},t.prototype.canRoute=function(e){var t=D(this.props.children);return this.getMatchingChildren(t,e,!1).length>0},t.prototype.routeTo=function(e){this.setState({url:e});var t=this.canRoute(e);return this.updating||this.forceUpdate(),t},t.prototype.componentWillMount=function(){ee.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var e=this;Q&&(this.unlisten=Q.listen((function(t){e.routeTo(""+(t.pathname||"")+(t.search||""))}))),this.updating=!1},t.prototype.componentWillUnmount=function(){"function"==typeof this.unlisten&&this.unlisten(),ee.splice(ee.indexOf(this),1)},t.prototype.componentWillUpdate=function(){this.updating=!0},t.prototype.componentDidUpdate=function(){this.updating=!1},t.prototype.getMatchingChildren=function(e,t,i){return e.filter(J).sort(X).map((function(e){var n=K(t,e.props.path,e.props);if(n){if(!1!==i){var r={url:t,matches:n};return G(r,n),delete r.ref,delete r.key,H(e,r)}return e}})).filter(Boolean)},t.prototype.render=function(e,t){var i=e.children,n=e.onChange,r=t.url,o=this.getMatchingChildren(D(i),r,!0),a=o[0]||null,s=this.previousUrl;return r!==s&&(this.previousUrl=r,"function"==typeof n&&n({router:this,url:r,previous:s,active:o,current:a})),a},t}(k),he=function(e){return w("a",G({onClick:se},e))};de.subscribers=te,de.getCurrentUrl=ne,de.route=re,de.Router=de,de.Route=function(e){return w(e.component,e)},de.Link=he,de.exec=K;var pe,me,fe,ge=0,_e=[],be=d.__b,ve=d.__r,ye=d.diffed,we=d.__c,xe=d.unmount;function Ne(e,t){d.__h&&d.__h(me,e,ge||t),ge=0;var i=me.__H||(me.__H={__:[],__h:[]});return e>=i.__.length&&i.__.push({}),i.__[e]}function ke(e){return ge=1,Ae(je,e)}function Ae(e,t,i){var n=Ne(pe++,2);return n.t=e,n.__c||(n.__=[i?i(t):je(void 0,t),function(e){var t=n.t(n.__[0],e);n.__[0]!==t&&(n.__=[t,n.__[1]],n.__c.setState({}))}],n.__c=me),n.__}function Ce(e,t){var i=Ne(pe++,3);!d.__s&&$e(i.__H,t)&&(i.__=e,i.__H=t,me.__H.__h.push(i))}function Oe(e,t){var i=Ne(pe++,4);!d.__s&&$e(i.__H,t)&&(i.__=e,i.__H=t,me.__h.push(i))}function Se(e){return ge=5,Ee((function(){return{current:e}}),[])}function Ee(e,t){var i=Ne(pe++,7);return $e(i.__H,t)&&(i.__=e(),i.__H=t,i.__h=e),i.__}function Fe(e,t){return ge=8,Ee((function(){return e}),t)}function De(e){var t=me.context[e.__c],i=Ne(pe++,9);return i.__c=e,t?(null==i.__&&(i.__=!0,t.sub(me)),t.props.value):e.__}function Be(e){var t=Ne(pe++,10),i=ke();return t.__=e,me.componentDidCatch||(me.componentDidCatch=function(e){t.__&&t.__(e),i[1](e)}),[i[0],function(){i[1](void 0)}]}function Le(){_e.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(Te),e.__H.__h.forEach(Re),e.__H.__h=[]}catch(t){e.__H.__h=[],d.__e(t,e.__v)}})),_e=[]}d.__b=function(e){me=null,be&&be(e)},d.__r=function(e){ve&&ve(e),pe=0;var t=(me=e.__c).__H;t&&(t.__h.forEach(Te),t.__h.forEach(Re),t.__h=[])},d.diffed=function(e){ye&&ye(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==_e.push(t)&&fe===d.requestAnimationFrame||((fe=d.requestAnimationFrame)||function(e){var t,i=function(){clearTimeout(n),Me&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(i,100);Me&&(t=requestAnimationFrame(i))})(Le)),me=void 0},d.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Te),e.__h=e.__h.filter((function(e){return!e.__||Re(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],d.__e(i,e.__v)}})),we&&we(e,t)},d.unmount=function(e){xe&&xe(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Te)}catch(i){d.__e(i,t.__v)}};var Me="function"==typeof requestAnimationFrame;function Te(e){var t=me;"function"==typeof e.__c&&e.__c(),me=t}function Re(e){var t=me;e.__c=e.__(),me=t}function $e(e,t){return!e||e.length!==t.length||t.some((function(t,i){return t!==e[i]}))}function je(e,t){return"function"==typeof t?t(e):t}var Ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Pe={},ze={},Ue={};Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.ModelPath=Ue.Path=Ue.relativePath=void 0,Ue.relativePath=function(e,t){return t.reduce(((e,t)=>"pop"===t?e.pop():e.push(t.push)),e)};class We{constructor(e,t){this.modelArr=null!=e?e:[],this.contextArr=null!=t?t:[]}last(){return this.modelArr[this.modelArr.length-1]}slice(e,t){return new We(this.modelArr.slice(e,t),this.contextArr)}shift(){return new We(this.modelArr.slice(1),this.contextArr)}pop(){return new We(this.modelArr.slice(0,-1),this.contextArr)}push(e){return this.modelPush(e).contextPush(e)}modelPush(e){return new We([...this.modelArr,e],[...this.contextArr])}contextPush(e){if("number"==typeof e)return this.copy();const t=e.startsWith("minecraft:")?e.slice(10):e;return new We([...this.modelArr],[...this.contextArr,t])}copy(){return new We([...this.modelArr],[...this.contextArr])}getArray(){return this.modelArr}withModel(e){return new He(e,this)}getContext(){return this.contextArr}equals(e){return e.modelArr.length===this.modelArr.length&&e.modelArr.every(((e,t)=>e===this.modelArr[t]))}startsWith(e){return!(this.modelArr.length<e.modelArr.length)&&e.modelArr.every(((e,t)=>e===this.modelArr[t]))}endsWith(e){const t=this.modelArr.length-e.modelArr.length;return!(t<0)&&e.modelArr.every(((e,i)=>e===this.modelArr[t+i]))}toString(){return this.modelArr.map((e=>"string"==typeof e?`.${e}`:`[${e}]`)).join("").replace(/^\./,"")}forEach(e,t){return this.modelArr.forEach(e,t)}}Ue.Path=We;class He extends We{constructor(e,t){super(null==t?void 0:t.modelArr,null==t?void 0:t.contextArr),this.model=e}getModel(){return this.model}get(){var e;return null===(e=this.model)||void 0===e?void 0:e.get(this)}set(e){var t;null===(t=this.model)||void 0===t||t.set(this,e)}slice(e,t){return new He(this.model,super.slice(e,t))}shift(){return new He(this.model,super.shift())}pop(){return new He(this.model,super.pop())}push(e){return this.modelPush(e).contextPush(e)}modelPush(e){return new He(this.model,super.modelPush(e))}contextPush(e){return new He(this.model,super.contextPush(e))}copy(){return new He(this.model,super.copy())}}Ue.ModelPath=He;var qe={};Object.defineProperty(qe,"__esModule",{value:!0}),qe.Errors=void 0;class Ve{constructor(){this.errors=[]}add(e,t,...i){return this.errors.push({path:e,error:t,params:i}),!1}get(e,t=!1){return t?this.errors.filter((t=>t.path.equals(e))):this.errors.filter((t=>t.path.startsWith(e)))}getAll(){return this.errors}clear(){this.errors=[]}count(){return this.errors.length}*[Symbol.iterator](){for(const e of this.errors)yield e}}qe.Errors=Ve;var Ge={};function Ke(e){return e.replace(/(\\|")/g,"\\$1")}Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.hexId=Ge.quoteString=Ge.escapeString=void 0,Ge.escapeString=Ke,Ge.quoteString=function(e){return`"${Ke(e)}"`};const Xe=e=>("0"+e.toString(16)).substr(-2);Ge.hexId=function(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Xe).join("")},Object.defineProperty(ze,"__esModule",{value:!0}),ze.DataModel=void 0;const Je=Ue,Ye=qe,Ze=Ge;class Qe{constructor(e,t){var i,n,r,o;this.historyMax=null!==(i=null==t?void 0:t.historyMax)&&void 0!==i?i:50,this.verbose=null!==(n=null==t?void 0:t.verbose)&&void 0!==n&&n,this.wrapLists=null!==(r=null==t?void 0:t.wrapLists)&&void 0!==r&&r,this.schema=e;const a=null!==(o=null==t?void 0:t.initialData)&&void 0!==o?o:e.default();this.data=this.wrapLists?Qe.wrapLists(a):a,this.listeners=[],this.errors=new Ye.Errors,this.history=[JSON.stringify(this.data)],this.historyIndex=0}addListener(e){this.listeners.push(e)}removeListener(e){const t=this.listeners.indexOf(e);t>-1&&this.listeners.splice(t,1)}invalidate(){const e=JSON.stringify(this.data);this.history[this.historyIndex]!==e&&(this.historyIndex+=1,this.history.splice(this.historyIndex,this.historyMax,e),this.history.length>this.historyMax&&(this.history.splice(0,1),this.historyIndex-=1)),this.silentInvalidate()}silentInvalidate(){this.listeners.forEach((e=>{e.invalidated&&e.invalidated(this),e.errors&&e.errors(this.errors)}))}reset(e,t){this.data=e,this.validate(t),this.invalidate()}get(e){let t=this.data;return e.forEach((e=>{if(void 0===t)return t;t=this.wrapLists&&"number"==typeof e?t[e].node:t[e]})),t}set(e,t,i){if(0===e.getArray().length)return void this.reset(t,!0);let n=this.data;e.pop().forEach((e=>{void 0!==n[e]&&"string"!=typeof n[e]&&"number"!=typeof n[e]||(this.wrapLists&&"number"==typeof e?n[e]={node:{},id:(0,Ze.hexId)()}:n[e]={}),n=this.wrapLists&&"number"==typeof e?n[e].node:n[e]})),null!==n&&(void 0===t||"number"==typeof t&&isNaN(t)?"number"==typeof e.last()?n.splice(e.last(),1):delete n[e.last()]:this.wrapLists&&"number"==typeof e.last()?n[e.last()]={node:t,id:(0,Ze.hexId)()}:n[e.last()]=t,i||(this.verbose&&console.log("Set",e.toString(),JSON.stringify(t)),this.validate(!0),this.invalidate()))}undo(){this.historyIndex>0&&(this.historyIndex-=1,this.data=JSON.parse(this.history[this.historyIndex]),this.validate(!1),this.silentInvalidate())}redo(){this.historyIndex<this.history.length-1&&(this.historyIndex+=1,this.data=JSON.parse(this.history[this.historyIndex]),this.validate(!1),this.silentInvalidate())}validate(e){var t;const i=(new Je.Path).withModel(this);this.errors.clear(),this.data=null!==(t=this.schema.validate(i,this.data,this.errors,{loose:e,wrapLists:this.wrapLists}))&&void 0!==t?t:{}}error(e,t,...i){const n=new Ye.Errors;n.add(e,t,i),this.listeners.forEach((e=>{e.errors&&e.errors(n)}))}static wrapLists(e){if(Array.isArray(e)){const t=e.map((e=>({node:this.wrapLists(e),id:(0,Ze.hexId)()})));for(const i of Object.getOwnPropertySymbols(e))t[i]=e[i];return t}if("object"==typeof e&&null!==e){const t={};Object.entries(e).map((([e,i])=>{t[e]=this.wrapLists(i)}));for(const i of Object.getOwnPropertySymbols(e))t[i]=e[i];return t}return e}static unwrapLists(e){if(Array.isArray(e)){const t=e.map((e=>this.unwrapLists(e.node)));for(const i of Object.getOwnPropertySymbols(e))t[i]=e[i];return t}if("object"==typeof e&&null!==e){const t={};Object.entries(e).map((([e,i])=>{t[e]=this.unwrapLists(i)}));for(const i of Object.getOwnPropertySymbols(e))t[i]=e[i];return t}return e}}ze.DataModel=Qe;var et={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Keep=e.Opt=e.Has=e.Mod=e.Base=void 0,e.Base={type:()=>"base",category:()=>{},default:()=>{},enabled:()=>!0,keep:()=>!1,optional:()=>!1,navigate(){return this},pathPush:e=>e,suggest:()=>[],validate:(e,t)=>t,validationOption:()=>{},hook(e,t,...i){return e.base({node:this},t,...i)},canUpdate:()=>!1,update:()=>[]};e.Mod=(e,t)=>s(s({},e),"function"==typeof t?t(e):t);e.Has=(t,i)=>(0,e.Mod)(i,{enabled:e=>void 0!==e.push(t).get()}),e.Opt=function(e){return c(s({},e),{optional:()=>!0})},e.Keep=function(e){return c(s({},e),{keep:()=>!0})}}(et);var tt={};Object.defineProperty(tt,"__esModule",{value:!0}),tt.BooleanNode=void 0;const it=ze,nt=et;tt.BooleanNode=()=>c(s({},nt.Base),{type:()=>"boolean",default:()=>!1,suggest:()=>["false","true"],validate(e,t,i,n){return n.loose&&"boolean"!=typeof t&&(t=n.wrapLists?it.DataModel.wrapLists(this.default()):this.default()),"boolean"==typeof t&&void 0!==t||i.add(e,"error.expected_boolean"),t},hook(e,t,...i){var n;return(null!==(n=e.boolean)&&void 0!==n?n:e.base).call(e,{node:this},t,...i)}});var rt={},ot={};Object.defineProperty(ot,"__esModule",{value:!0}),ot.ListNode=void 0;const at=ze,st=et;ot.ListNode=(e,t)=>{var i,n;const r=null!==(i=null==t?void 0:t.minLength)&&void 0!==i?i:0,o=null!==(n=null==t?void 0:t.maxLength)&&void 0!==n?n:1/0,a=(null==t?void 0:t.minLength)&&(null==t?void 0:t.maxLength);return c(s({},st.Base),{type:()=>"list",default:()=>(null==t?void 0:t.minLength)?[...Array(r)].map((t=>e.default())):[],navigate(t,i){const n=i+1;return t.getArray().length<=n?this:e.navigate(t,n)},pathPush:(e,t)=>e.push(parseInt(t.toString())).contextPush("entry"),validate(t,i,n,s){if(s.loose&&!Array.isArray(i)&&(i=s.wrapLists?at.DataModel.wrapLists(this.default()):this.default()),!Array.isArray(i))return n.add(t,"error.expected_list"),i;a&&(i.length<r||i.length>o)?r===o?n.add(t,"error.invalid_list_range.exact",i.length,r):n.add(t,"error.invalid_list_range.between",i.length,r,o):i.length<r?n.add(t,"error.invalid_list_range.smaller",i.length,r):i.length>o&&n.add(t,"error.invalid_list_range.larger",i.length,o);const c=i.map(((i,r)=>{const o=e.validate(t.push(r),s.wrapLists?i.node:i,n,s);return s.wrapLists?{node:o,id:i.id}:o}));for(const e of Object.getOwnPropertySymbols(i))c[e]=i[e];return c},hook(i,n,...r){var o;return(null!==(o=i.list)&&void 0!==o?o:i.base).call(i,{node:this,children:e,config:null!=t?t:{}},n,...r)}})};var ct={};Object.defineProperty(ct,"__esModule",{value:!0}),ct.SwitchNode=void 0;const lt=et;ct.SwitchNode=e=>c(s({},lt.Base),{type(e){return this.activeCase(e,!0).node.type(e)},category(e){return this.activeCase(e,!0).node.category(e)},default:()=>e[0].node.default(),navigate(e,t){var i;const n=t+1;return null===(i=this.activeCase(e.slice(0,n)))||void 0===i?void 0:i.node.navigate(e,t)},pathPush(e,t){var i,n;return null!==(n=null===(i=this.activeCase(e))||void 0===i?void 0:i.node.pathPush(e,t))&&void 0!==n?n:e},suggest(t,i){var n,r;return null!==(r=null===(n=this.activeCase(t))||void 0===n?void 0:n.node.suggest(t,i))&&void 0!==r?r:e.filter((e=>e.match(t))).map((e=>e.node.suggest(t,i))).reduce(((e,t)=>e.concat(t)))},validate(e,t,i,n){let r=this.activeCase(e);return void 0===r?t:r.node.validate(e,t,i,n)},validationOption(e){var t;return null===(t=this.activeCase(e))||void 0===t?void 0:t.node.validationOption(e)},activeCase(t,i){const n=(e,t)=>{var i,n;return(null!==(i=t.priority)&&void 0!==i?i:0)-(null!==(n=e.priority)&&void 0!==n?n:0)},r=e.filter((e=>e.match(t))).sort(n);return i&&0===r.length?e.sort(n)[0]:r.length>0?r[0]:void 0},hook(e,t,...i){return this.activeCase(t,!0).node.hook(e,t,...i)}}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectOrPreset=e.StringOrList=e.ObjectOrList=e.ChoiceNode=void 0;const t=ot,i=ct;e.ChoiceNode=(e,t)=>{const n=(0,i.SwitchNode)(e.map((e=>({type:e.type,priority:e.priority,match:t=>((e,t)=>{if(e.match)return e.match(t);switch(e.type){case"list":return Array.isArray(t);case"object":return"object"==typeof t&&!Array.isArray(t);default:return typeof t===e.type}})(e,t.get()),node:e.node}))));return c(s({},n),{validate(e,t,i,r){let o=n.activeCase(e,!0);return o.node.optional()?t:o.node.validate(e,t,i,r)},hook(i,r,...o){var a;return(null!==(a=i.choice)&&void 0!==a?a:i.base).call(i,{node:this,choices:e,config:null!=t?t:{},switchNode:n},r,...o)}})};const n=i=>(n,r)=>(0,e.ChoiceNode)([{type:i,node:n,change:e=>{var t;return null!==(t=e[0])&&void 0!==t?t:n.default()}},{type:"list",node:(0,t.ListNode)(n),change:e=>e?[e]:[]}],r);e.ObjectOrList=n("object"),e.StringOrList=n("string");e.ObjectOrPreset=(t,i,n)=>(0,e.ChoiceNode)([{type:"string",priority:1,node:t,change:e=>Object.keys(n)[0]},{type:"object",node:i,change:e=>{var t;return null!==(t=n[e])&&void 0!==t?t:n[Object.keys(n)[0]]}}])}(rt);var ut={};Object.defineProperty(ut,"__esModule",{value:!0}),ut.MapNode=void 0;const dt=et,ht=ze;ut.MapNode=(e,t,i)=>c(s({},dt.Base),{type:()=>"map",default:()=>({}),navigate(e,i){const n=i+1;return e.getArray().length<=n?this:t.navigate(e,n)},pathPush:(e,t)=>e.modelPush(t),suggest:t=>e.suggest(t,""),validate(i,n,r,o){if(o.loose&&"object"!=typeof n&&(n=o.wrapLists?ht.DataModel.wrapLists(this.default()):this.default()),null===n||"object"!=typeof n)return r.add(i,"error.expected_object"),n;const a={};Object.keys(n).forEach((s=>{e.validate(i,s,r,o),a[s]=t.validate(i.push(s),n[s],r,o)}));for(const e of Object.getOwnPropertySymbols(n))a[e]=n[e];return a},validationOption(t){var n;return null!==(n=null==i?void 0:i.validation)&&void 0!==n?n:e.validationOption(t.push(""))},hook(n,r,...o){var a;return(null!==(a=n.map)&&void 0!==a?a:n.base).call(n,{node:this,keys:e,children:t,config:null!=i?i:{}},r,...o)}});var pt={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberEnum=e.NumberNode=void 0;const t=Pe,i=ze,n=et;e.NumberNode=e=>{var t,r,o;const a=!!(null==e?void 0:e.color)||null!==(t=null==e?void 0:e.integer)&&void 0!==t&&t,l=(null==e?void 0:e.color)?0:null!==(r=null==e?void 0:e.min)&&void 0!==r?r:-1/0,u=(null==e?void 0:e.color)?16777215:null!==(o=null==e?void 0:e.max)&&void 0!==o?o:1/0,d=void 0!==(null==e?void 0:e.min)&&void 0!==(null==e?void 0:e.max);return c(s({},n.Base),{type:()=>"number",default:()=>l>0?l:0,validate(e,t,n,r){return r.loose&&"number"!=typeof t&&(t=r.wrapLists?i.DataModel.wrapLists(this.default()):this.default()),"number"!=typeof t?n.add(e,"error.expected_number"):a&&!Number.isInteger(t)?n.add(e,"error.expected_integer"):d&&(t<l||t>u)?n.add(e,"error.invalid_number_range.between",t,l,u):t<l?n.add(e,"error.invalid_number_range.smaller",t,l):t>u&&n.add(e,"error.invalid_number_range.larger",t,u),t},hook(t,i,...n){var r;return(null!==(r=t.number)&&void 0!==r?r:t.base).call(t,{node:this,integer:a,min:l,max:u,between:d,config:null!=e?e:{}},i,...n)}})};e.NumberEnum=({integer:i,values:n})=>(0,t.Mod)((0,e.NumberNode)({integer:i}),(e=>({validate:(t,i,r,o)=>(i=e.validate(t,i,r,o),n.includes(i)||r.add(t,"error.invalid_number_enum",n.join(", ")),i)})))}(pt);var mt={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectNode=e.Case=e.Switch=void 0;const t=et,i=Ue,a=qe,u=Ge,d=ze;e.Switch=Symbol("switch"),e.Case=Symbol("case");e.ObjectNode=(h,p)=>{var m,f;const g=h,{[m=e.Switch]:_,[f=e.Case]:b}=g,v=((e,t)=>{var i={};for(var a in e)r.call(e,a)&&t.indexOf(a)<0&&(i[a]=e[a]);if(null!=e&&n)for(var a of n(e))t.indexOf(a)<0&&o.call(e,a)&&(i[a]=e[a]);return i})(g,[l(m),l(f)]),y=e=>{if(void 0===_)return v;const t=(0,i.relativePath)(e,_).get(),n=b[t];return s(s({},v),n)},w=(e,t)=>{var n;const r=_?(0,i.relativePath)(e,_).get():void 0,o=_&&null!==(n=b[r])&&void 0!==n?n:{},a=Object.keys(o),s=(null==p?void 0:p.context)?new i.ModelPath(e.getModel(),new i.Path(e.getArray(),[p.context])):e;return(!(null==p?void 0:p.disableSwitchContext)&&r&&a.includes(t)?s.contextPush(r):s).push(t)};return c(s({},t.Base),{type:()=>"object",category:()=>null==p?void 0:p.category,default:()=>({}),keep(){return this.optional()},navigate(e,t){const i=t+1,n=e.getArray();if(n.length<=i)return this;const r=y(e.slice(0,i))[n[i]];return null==r?void 0:r.navigate(e,i)},pathPush:(e,t)=>w(e,t.toString()),suggest(e,t){const i=y(e),n=Object.keys("object"==typeof t?t:{});return Object.keys(i).filter((t=>i[t].enabled(e))).filter((e=>!n.includes(e))).map(u.quoteString)},validate(e,t,n,r){if(r.loose&&"object"!=typeof t&&(t=r.wrapLists?d.DataModel.wrapLists(this.default()):this.default()),"object"!=typeof t||null===t)return n.add(e,"error.expected_object"),t;let o=v;if(_){const n=(0,i.relativePath)(e,_);let c=n.get();if(e.equals(n.pop())){const i=n.last();c=v[i].validate(e.push(i),t[i],new a.Errors,r)}o=s(s({},o),b[c])}const c=Object.keys(o),l=c.filter((e=>!o[e].optional())),u=new Set([...l,...Object.keys(t)]),h={};u.forEach((i=>{if(c.includes(i)){if(!o[i].enabled(e))return;const a=o[i].validate(e.push(i),t[i],n,r);!o[i].keep()&&o[i].optional()&&(void 0===a||Array.isArray(a)&&0===a.length||a.constructor===Object&&0===Object.keys(a).length)?delete h[i]:(h[i]=a,e.getModel().set(e.push(i),a,!0))}else h[i]=t[i]}));for(const i of Object.getOwnPropertySymbols(t))h[i]=t[i];return h},hook(e,t,...i){var n;return(null!==(n=e.object)&&void 0!==n?n:e.base).call(e,{node:this,fields:v,config:null!=p?p:{},filter:_,cases:b,getActiveFields:y,getChildModelPath:w},t,...i)}})}}(mt);var ft={};Object.defineProperty(ft,"__esModule",{value:!0}),ft.Reference=void 0;ft.Reference=(e,t)=>({type(i){return e.get(t).type.bind(this)(i)},category(i){return e.get(t).category.bind(this)(i)},default(){return e.get(t).default.bind(this)()},transform:(i,n)=>e.get(t).transform(i,n),enabled(i){return e.get(t).enabled.bind(this)(i)},keep(){return e.get(t).keep.bind(this)()},optional(){return e.get(t).optional.bind(this)()},navigate(i,n){return e.get(t).navigate.bind(this)(i,n)},pathPush(i,n){return e.get(t).pathPush.bind(this)(i,n)},suggest(i,n){return e.get(t).suggest.bind(this)(i,n)},validate(i,n,r,o){return e.get(t).validate.bind(this)(i,n,r,o)},validationOption(i){return e.get(t).validationOption.bind(this)(i)},hook(i,n,...r){return e.get(t).hook.bind(this)(i,n,...r)},activeCase(i,n){return e.get(t).activeCase.bind(this)(i,n)},canUpdate(i,n){return e.get(t).canUpdate.bind(this)(i,n)},update(i,n){return e.get(t).update.bind(this)(i,n)}});var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.StringNode=void 0;const _t=et,bt=Ge,vt=ze,yt=e=>!!(null==e?void 0:e.enum),wt=e=>!!(null==e?void 0:e.validator);gt.StringNode=(e,t)=>{const i=()=>{var i,n,r,o;if(yt(t))return"string"==typeof t.enum?null!==(i=null==e?void 0:e.get(t.enum))&&void 0!==i?i:[]:t.enum;if("resource"===(null==t?void 0:t.validator)){if("string"==typeof t.params.pool){if(t.params.requireTag)return null!==(n=null==e?void 0:e.get(`tag/${t.params.pool}`).map((e=>`#${e}`)))&&void 0!==n?n:[];const i=t.params.pool.replace(/^\$/,"");return[...t.params.allowTag&&null!==(r=null==e?void 0:e.get(`tag/${i}`).map((e=>`#${e}`)))&&void 0!==r?r:[],...null!==(o=null==e?void 0:e.get(i))&&void 0!==o?o:[]]}return t.params.pool}return[]};return c(s({},_t.Base),{type:()=>"string",default:()=>"",validate(e,n,r,o){if(o.loose&&"string"!=typeof n&&(n=(o.wrapLists?vt.DataModel.wrapLists(this.default()):this.default())||void 0),"string"!=typeof n)return r.add(e,"error.expected_string"),n;if(wt(t)){if("resource"===t.validator&&n.length>0&&!n.includes(":")&&(n=n.startsWith("#")?"#minecraft:"+n.slice(1):"minecraft:"+n),"resource"===t.validator&&"string"==typeof n){let i=n;if(n.startsWith("#")){if("string"==typeof t.params.pool&&t.params.pool.startsWith("$tag/"))return r.add(e,"error.disallowed_tag_prefix"),n;if(!t.params.allowTag&&!t.params.requireTag)return r.add(e,"error.disallowed_tag"),n;i=i.slice(1)}else if(t.params.requireTag)return r.add(e,"error.expected_tag"),n;if(!i.match(/^(?:[_\-a-z0-9.]*:)?[_\-a-z0-9/.]*$/g))return r.add(e,"error.invalid_resource_location"),n}if("resource"===t.validator&&("string"==typeof t.params.pool&&t.params.pool.startsWith("$")||(t.params.allowTag||t.params.requireTag)&&n.startsWith("#")||t.params.isDefinition||t.params.allowUnknown))return n}if(yt(t)&&t.additional)return n;const a=i();return a.length>0&&!a.includes(n)&&r.add(e,"error.invalid_enum_option",n),n},suggest:()=>i().map(bt.quoteString),validationOption:()=>wt(t)?t:void 0,hook(e,n,...r){var o;return(null!==(o=e.string)&&void 0!==o?o:e.base).call(e,{node:this,getValues:i,config:t},n,...r)}})};var xt={};Object.defineProperty(xt,"__esModule",{value:!0});var Nt={};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.CollectionRegistry=Nt.SchemaRegistry=void 0;Nt.SchemaRegistry=class{constructor(){this.registry={}}register(e,t){this.registry[e]=t}get(e){const t=this.registry[e];return void 0===t&&console.error(`Tried to access schema "${e}", but that doesn't exist.`),t}};Nt.CollectionRegistry=class{constructor(){this.registry={}}register(e,t){this.registry[e]=t}get(e){const t=this.registry[e];return void 0===t&&console.warn(`Tried to access collection "${e}", but that doesn't exist.`),null!=t?t:[]}};var kt,At,Ct,Ot={};Object.defineProperty(Ot,"__esModule",{value:!0}),kt=Pe,At=Ie&&Ie.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),Ct=Ie&&Ie.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||At(t,e,i)},Object.defineProperty(kt,"__esModule",{value:!0}),Ct(ze,kt),Ct(Ue,kt),Ct(qe,kt),Ct(et,kt),Ct(tt,kt),Ct(rt,kt),Ct(ot,kt),Ct(ut,kt),Ct(pt,kt),Ct(mt,kt),Ct(ft,kt),Ct(gt,kt),Ct(ct,kt),Ct(xt,kt),Ct(Nt,kt),Ct(Ot,kt);var St=function(e){return(e=e||{}).circles?function(e){var t=[],i=[];return e.proto?function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return n(r,e);if(r instanceof Map)return new Map(n(Array.from(r),e));if(r instanceof Set)return new Set(n(Array.from(r),e));var o={};for(var a in t.push(r),i.push(o),r){var s=r[a];if("object"!=typeof s||null===s)o[a]=s;else if(s instanceof Date)o[a]=new Date(s);else if(s instanceof Map)o[a]=new Map(n(Array.from(s),e));else if(s instanceof Set)o[a]=new Set(n(Array.from(s),e));else if(ArrayBuffer.isView(s))o[a]=Et(s);else{var c=t.indexOf(s);o[a]=-1!==c?i[c]:e(s)}}return t.pop(),i.pop(),o}:function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return n(r,e);if(r instanceof Map)return new Map(n(Array.from(r),e));if(r instanceof Set)return new Set(n(Array.from(r),e));var o={};for(var a in t.push(r),i.push(o),r)if(!1!==Object.hasOwnProperty.call(r,a)){var s=r[a];if("object"!=typeof s||null===s)o[a]=s;else if(s instanceof Date)o[a]=new Date(s);else if(s instanceof Map)o[a]=new Map(n(Array.from(s),e));else if(s instanceof Set)o[a]=new Set(n(Array.from(s),e));else if(ArrayBuffer.isView(s))o[a]=Et(s);else{var c=t.indexOf(s);o[a]=-1!==c?i[c]:e(s)}}return t.pop(),i.pop(),o};function n(e,n){for(var r=Object.keys(e),o=new Array(r.length),a=0;a<r.length;a++){var s=r[a],c=e[s];if("object"!=typeof c||null===c)o[s]=c;else if(c instanceof Date)o[s]=new Date(c);else if(ArrayBuffer.isView(c))o[s]=Et(c);else{var l=t.indexOf(c);o[s]=-1!==l?i[l]:n(c)}}return o}}(e):e.proto?function e(i){if("object"!=typeof i||null===i)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,e);if(i instanceof Map)return new Map(t(Array.from(i),e));if(i instanceof Set)return new Set(t(Array.from(i),e));var n={};for(var r in i){var o=i[r];"object"!=typeof o||null===o?n[r]=o:o instanceof Date?n[r]=new Date(o):o instanceof Map?n[r]=new Map(t(Array.from(o),e)):o instanceof Set?n[r]=new Set(t(Array.from(o),e)):ArrayBuffer.isView(o)?n[r]=Et(o):n[r]=e(o)}return n}:function e(i){if("object"!=typeof i||null===i)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,e);if(i instanceof Map)return new Map(t(Array.from(i),e));if(i instanceof Set)return new Set(t(Array.from(i),e));var n={};for(var r in i)if(!1!==Object.hasOwnProperty.call(i,r)){var o=i[r];"object"!=typeof o||null===o?n[r]=o:o instanceof Date?n[r]=new Date(o):o instanceof Map?n[r]=new Map(t(Array.from(o),e)):o instanceof Set?n[r]=new Set(t(Array.from(o),e)):ArrayBuffer.isView(o)?n[r]=Et(o):n[r]=e(o)}return n};function t(e,t){for(var i=Object.keys(e),n=new Array(i.length),r=0;r<i.length;r++){var o=i[r],a=e[o];"object"!=typeof a||null===a?n[o]=a:a instanceof Date?n[o]=new Date(a):ArrayBuffer.isView(a)?n[o]=Et(a):n[o]=t(a)}return n}};function Et(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}var Ft={exports:{}};Ft.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}return i.m=e,i.c=t,i.p="",i(0)}([function(e,t,i){var n,r;n=[i(1)],void 0===(r=function(e){var t={},i=function(){return navigator.userAgent.toLowerCase().indexOf("chrome")>-1},n=function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1},r=function(){return navigator.userAgent.toLowerCase().indexOf("safari")>-1},o=function(){return document.documentMode&&document.documentMode>=11},a=function(){this.count=0,this.pending=[]};a.prototype.incr=function(){this.count++},a.prototype.decr=function(){this.count--,this.flush()},a.prototype.whenReady=function(e){this.pending.push(e),this.flush()},a.prototype.flush=function(){0===this.count&&(this.pending.forEach((function(e){e()})),this.pending=[])};var s=function(e){this.sem=new a,this.sync=e&&e.sync,this.mapForUri=e&&e.cacheGlobally?t:{}};s.prototype.ajax=function(e,t){var i=function(){for(var e=!1,t=0;t<p.length;t++){try{e=p[t]()}catch(i){continue}break}return e}(),n=this;i.onreadystatechange=function(){4==i.readyState&&t.call(n,i,e)},i.open("GET",e,!this.sync),i.send()},s.prototype.fetchScript=function(e){e in this.mapForUri||(this.sem.incr(),this.mapForUri[e]=null,this.ajax(e,this.onScriptLoad))};var c=new RegExp("^(?:[a-z]+:)?//","i");s.prototype.onScriptLoad=function(t,i){if(200===t.status||"file://"===i.slice(0,7)&&0===t.status){var n=t.responseText.match("//# [s]ourceMappingURL=(.*)[\\s]*$","m");if(n&&2===n.length){var r=n[1],o=r.match("data:application/json;(charset=[^;]+;)?base64,(.*)");if(o&&o[2])this.mapForUri[i]=new e.SourceMapConsumer(atob(o[2])),this.sem.decr();else{if(!c.test(r)){var a,s=i.lastIndexOf("/");-1!==s&&(a=i.slice(0,s+1),r=a+r)}this.ajax(r,(function(t){(200===t.status||"file://"===r.slice(0,7)&&0===t.status)&&(this.mapForUri[i]=new e.SourceMapConsumer(t.responseText)),this.sem.decr()}))}}else this.sem.decr()}else this.sem.decr()};var l=function(e,t,i,n){for(var r,o=[],a="chrome"===n?u:d,s=0;s<e.length;s++){var c=t[s];if(c){var l=c[1],p=parseInt(c[2],10),m=parseInt(c[3],10);if(r=i[l]){var f=r.originalPositionFor({line:p,column:m});o.push(h(f.source,f.line,f.column,f.name||a(e[s])))}else o.push(h(l,p,m,a(e[s])))}else o.push(e[s])}return o};function u(e){var t=/ +at +([^ ]*).*/.exec(e);return t&&t[1]}function d(e){var t=/([^@]*)@.*/.exec(e);return t&&t[1]}var h=function(e,t,i,n){return" at "+(n||"(unknown)")+" ("+e+":"+t+":"+i+")"},p=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];return{mapStackTrace:function(e,t,a){var c,u,d,h,p,m,f,g={},_=new s(a),b=a&&a.traceFormat;if("chrome"!==b&&"firefox"!==b){if(b)throw new Error('unknown traceFormat "'+b+'" :(');if(i()||o())b="chrome";else{if(!n()&&!r())throw new Error("unknown browser :(");b="firefox"}}"chrome"===b?(m=/^ +at.+\((.*):([0-9]+):([0-9]+)/,p=4,f=1):(m=/@(.*):([0-9]+):([0-9]+)/,p=4,f=0),c=e.split("\n").slice(f);for(var v=0;v<c.length;v++)u=c[v],a&&a.filter&&!a.filter(u)||(d=u.match(m))&&d.length===p&&(g[v]=d,(h=d[1]).match(/<anonymous>/)||_.fetchScript(h));_.sem.whenReady((function(){var e=l(c,g,_.mapForUri,b);t(e)}))}}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n=i(2),r=i(3),o=i(4).ArraySet,a=i(5),s=i(7).quickSort;function c(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new d(t):new l(t)}function l(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var i=n.getArg(t,"version"),r=n.getArg(t,"sources"),a=n.getArg(t,"names",[]),s=n.getArg(t,"sourceRoot",null),c=n.getArg(t,"sourcesContent",null),l=n.getArg(t,"mappings"),u=n.getArg(t,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);r=r.map(String).map(n.normalize).map((function(e){return s&&n.isAbsolute(s)&&n.isAbsolute(e)?n.relative(s,e):e})),this._names=o.fromArray(a.map(String),!0),this._sources=o.fromArray(r,!0),this.sourceRoot=s,this.sourcesContent=c,this._mappings=l,this.file=u}function u(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function d(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var i=n.getArg(t,"version"),r=n.getArg(t,"sections");if(i!=this._version)throw new Error("Unsupported version: "+i);this._sources=new o,this._names=new o;var a={line:-1,column:0};this._sections=r.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=n.getArg(e,"offset"),i=n.getArg(t,"line"),r=n.getArg(t,"column");if(i<a.line||i===a.line&&r<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=t,{generatedOffset:{generatedLine:i+1,generatedColumn:r+1},consumer:new c(n.getArg(e,"map"))}}))}c.fromSourceMap=function(e){return l.fromSourceMap(e)},c.prototype._version=3,c.prototype.__generatedMappings=null,Object.defineProperty(c.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),c.prototype.__originalMappings=null,Object.defineProperty(c.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),c.prototype._charIsMappingSeparator=function(e,t){var i=e.charAt(t);return";"===i||","===i},c.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},c.GENERATED_ORDER=1,c.ORIGINAL_ORDER=2,c.GREATEST_LOWER_BOUND=1,c.LEAST_UPPER_BOUND=2,c.prototype.eachMapping=function(e,t,i){var r,o=t||null;switch(i||c.GENERATED_ORDER){case c.GENERATED_ORDER:r=this._generatedMappings;break;case c.ORIGINAL_ORDER:r=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;r.map((function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=a&&(t=n.join(a,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}}),this).forEach(e,o)},c.prototype.allGeneratedPositionsFor=function(e){var t=n.getArg(e,"line"),i={source:n.getArg(e,"source"),originalLine:t,originalColumn:n.getArg(e,"column",0)};if(null!=this.sourceRoot&&(i.source=n.relative(this.sourceRoot,i.source)),!this._sources.has(i.source))return[];i.source=this._sources.indexOf(i.source);var o=[],a=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,r.LEAST_UPPER_BOUND);if(a>=0){var s=this._originalMappings[a];if(void 0===e.column)for(var c=s.originalLine;s&&s.originalLine===c;)o.push({line:n.getArg(s,"generatedLine",null),column:n.getArg(s,"generatedColumn",null),lastColumn:n.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)o.push({line:n.getArg(s,"generatedLine",null),column:n.getArg(s,"generatedColumn",null),lastColumn:n.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a]}return o},t.SourceMapConsumer=c,l.prototype=Object.create(c.prototype),l.prototype.consumer=c,l.fromSourceMap=function(e){var t=Object.create(l.prototype),i=t._names=o.fromArray(e._names.toArray(),!0),r=t._sources=o.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),c=t.__generatedMappings=[],d=t.__originalMappings=[],h=0,p=a.length;h<p;h++){var m=a[h],f=new u;f.generatedLine=m.generatedLine,f.generatedColumn=m.generatedColumn,m.source&&(f.source=r.indexOf(m.source),f.originalLine=m.originalLine,f.originalColumn=m.originalColumn,m.name&&(f.name=i.indexOf(m.name)),d.push(f)),c.push(f)}return s(t.__originalMappings,n.compareByOriginalPositions),t},l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){return this._sources.toArray().map((function(e){return null!=this.sourceRoot?n.join(this.sourceRoot,e):e}),this)}}),l.prototype._parseMappings=function(e,t){for(var i,r,o,c,l,d=1,h=0,p=0,m=0,f=0,g=0,_=e.length,b=0,v={},y={},w=[],x=[];b<_;)if(";"===e.charAt(b))d++,b++,h=0;else if(","===e.charAt(b))b++;else{for((i=new u).generatedLine=d,c=b;c<_&&!this._charIsMappingSeparator(e,c);c++);if(o=v[r=e.slice(b,c)])b+=r.length;else{for(o=[];b<c;)a.decode(e,b,y),l=y.value,b=y.rest,o.push(l);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");v[r]=o}i.generatedColumn=h+o[0],h=i.generatedColumn,o.length>1&&(i.source=f+o[1],f+=o[1],i.originalLine=p+o[2],p=i.originalLine,i.originalLine+=1,i.originalColumn=m+o[3],m=i.originalColumn,o.length>4&&(i.name=g+o[4],g+=o[4])),x.push(i),"number"==typeof i.originalLine&&w.push(i)}s(x,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=x,s(w,n.compareByOriginalPositions),this.__originalMappings=w},l.prototype._findMapping=function(e,t,i,n,o,a){if(e[i]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[i]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return r.search(e,t,o,a)},l.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var i=this._generatedMappings[e+1];if(t.generatedLine===i.generatedLine){t.lastGeneratedColumn=i.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},l.prototype.originalPositionFor=function(e){var t={generatedLine:n.getArg(e,"line"),generatedColumn:n.getArg(e,"column")},i=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",n.compareByGeneratedPositionsDeflated,n.getArg(e,"bias",c.GREATEST_LOWER_BOUND));if(i>=0){var r=this._generatedMappings[i];if(r.generatedLine===t.generatedLine){var o=n.getArg(r,"source",null);null!==o&&(o=this._sources.at(o),null!=this.sourceRoot&&(o=n.join(this.sourceRoot,o)));var a=n.getArg(r,"name",null);return null!==a&&(a=this._names.at(a)),{source:o,line:n.getArg(r,"originalLine",null),column:n.getArg(r,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))},l.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=n.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var i;if(null!=this.sourceRoot&&(i=n.urlParse(this.sourceRoot))){var r=e.replace(/^file:\/\//,"");if("file"==i.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!i.path||"/"==i.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(e){var t=n.getArg(e,"source");if(null!=this.sourceRoot&&(t=n.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var i={source:t=this._sources.indexOf(t),originalLine:n.getArg(e,"line"),originalColumn:n.getArg(e,"column")},r=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,n.getArg(e,"bias",c.GREATEST_LOWER_BOUND));if(r>=0){var o=this._originalMappings[r];if(o.source===i.source)return{line:n.getArg(o,"generatedLine",null),column:n.getArg(o,"generatedColumn",null),lastColumn:n.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},t.BasicSourceMapConsumer=l,d.prototype=Object.create(c.prototype),d.prototype.constructor=c,d.prototype._version=3,Object.defineProperty(d.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var i=0;i<this._sections[t].consumer.sources.length;i++)e.push(this._sections[t].consumer.sources[i]);return e}}),d.prototype.originalPositionFor=function(e){var t={generatedLine:n.getArg(e,"line"),generatedColumn:n.getArg(e,"column")},i=r.search(t,this._sections,(function(e,t){var i=e.generatedLine-t.generatedOffset.generatedLine;return i||e.generatedColumn-t.generatedOffset.generatedColumn})),o=this._sections[i];return o?o.consumer.originalPositionFor({line:t.generatedLine-(o.generatedOffset.generatedLine-1),column:t.generatedColumn-(o.generatedOffset.generatedLine===t.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},d.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},d.prototype.sourceContentFor=function(e,t){for(var i=0;i<this._sections.length;i++){var n=this._sections[i].consumer.sourceContentFor(e,!0);if(n)return n}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},d.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var i=this._sections[t];if(-1!==i.consumer.sources.indexOf(n.getArg(e,"source"))){var r=i.consumer.generatedPositionFor(e);if(r)return{line:r.line+(i.generatedOffset.generatedLine-1),column:r.column+(i.generatedOffset.generatedLine===r.line?i.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},d.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var i=0;i<this._sections.length;i++)for(var r=this._sections[i],o=r.consumer._generatedMappings,a=0;a<o.length;a++){var c=o[a],l=r.consumer._sources.at(c.source);null!==r.consumer.sourceRoot&&(l=n.join(r.consumer.sourceRoot,l)),this._sources.add(l),l=this._sources.indexOf(l);var u=r.consumer._names.at(c.name);this._names.add(u),u=this._names.indexOf(u);var d={source:l,generatedLine:c.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:c.generatedColumn+(r.generatedOffset.generatedLine===c.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:c.originalLine,originalColumn:c.originalColumn,name:u};this.__generatedMappings.push(d),"number"==typeof d.originalLine&&this.__originalMappings.push(d)}s(this.__generatedMappings,n.compareByGeneratedPositionsDeflated),s(this.__originalMappings,n.compareByOriginalPositions)},t.IndexedSourceMapConsumer=d},function(e,t){t.getArg=function(e,t,i){if(t in e)return e[t];if(3===arguments.length)return i;throw new Error('"'+t+'" is a required argument.')};var i=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,n=/^data:.+\,.+$/;function r(e){var t=e.match(i);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function o(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function a(e){var i=e,n=r(e);if(n){if(!n.path)return e;i=n.path}for(var a,s=t.isAbsolute(i),c=i.split(/\/+/),l=0,u=c.length-1;u>=0;u--)"."===(a=c[u])?c.splice(u,1):".."===a?l++:l>0&&(""===a?(c.splice(u+1,l),l=0):(c.splice(u,2),l--));return""===(i=c.join("/"))&&(i=s?"/":"."),n?(n.path=i,o(n)):i}t.urlParse=r,t.urlGenerate=o,t.normalize=a,t.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var i=r(t),s=r(e);if(s&&(e=s.path||"/"),i&&!i.scheme)return s&&(i.scheme=s.scheme),o(i);if(i||t.match(n))return t;if(s&&!s.host&&!s.path)return s.host=t,o(s);var c="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=c,o(s)):c},t.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(i)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var i=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++i}return Array(i+1).join("../")+t.substr(e.length+1)};var s=!("__proto__"in Object.create(null));function c(e){return e}function l(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var i=t-10;i>=0;i--)if(36!==e.charCodeAt(i))return!1;return!0}function u(e,t){return e===t?0:e>t?1:-1}t.toSetString=s?c:function(e){return l(e)?"$"+e:e},t.fromSetString=s?c:function(e){return l(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,i){var n=e.source-t.source;return 0!==n||0!=(n=e.originalLine-t.originalLine)||0!=(n=e.originalColumn-t.originalColumn)||i||0!=(n=e.generatedColumn-t.generatedColumn)||0!=(n=e.generatedLine-t.generatedLine)?n:e.name-t.name},t.compareByGeneratedPositionsDeflated=function(e,t,i){var n=e.generatedLine-t.generatedLine;return 0!==n||0!=(n=e.generatedColumn-t.generatedColumn)||i||0!=(n=e.source-t.source)||0!=(n=e.originalLine-t.originalLine)||0!=(n=e.originalColumn-t.originalColumn)?n:e.name-t.name},t.compareByGeneratedPositionsInflated=function(e,t){var i=e.generatedLine-t.generatedLine;return 0!==i||0!=(i=e.generatedColumn-t.generatedColumn)||0!==(i=u(e.source,t.source))||0!=(i=e.originalLine-t.originalLine)||0!=(i=e.originalColumn-t.originalColumn)?i:u(e.name,t.name)}},function(e,t){function i(e,n,r,o,a,s){var c=Math.floor((n-e)/2)+e,l=a(r,o[c],!0);return 0===l?c:l>0?n-c>1?i(c,n,r,o,a,s):s==t.LEAST_UPPER_BOUND?n<o.length?n:-1:c:c-e>1?i(e,c,r,o,a,s):s==t.LEAST_UPPER_BOUND?c:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,n,r,o){if(0===n.length)return-1;var a=i(-1,n.length,e,n,r,o||t.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===r(n[a],n[a-1],!0);)--a;return a}},function(e,t,i){var n=i(2),r=Object.prototype.hasOwnProperty;function o(){this._array=[],this._set=Object.create(null)}o.fromArray=function(e,t){for(var i=new o,n=0,r=e.length;n<r;n++)i.add(e[n],t);return i},o.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(e,t){var i=n.toSetString(e),o=r.call(this._set,i),a=this._array.length;o&&!t||this._array.push(e),o||(this._set[i]=a)},o.prototype.has=function(e){var t=n.toSetString(e);return r.call(this._set,t)},o.prototype.indexOf=function(e){var t=n.toSetString(e);if(r.call(this._set,t))return this._set[t];throw new Error('"'+e+'" is not in the set.')},o.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},o.prototype.toArray=function(){return this._array.slice()},t.ArraySet=o},function(e,t,i){var n=i(6);t.encode=function(e){var t,i="",r=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&r,(r>>>=5)>0&&(t|=32),i+=n.encode(t)}while(r>0);return i},t.decode=function(e,t,i){var r,o,a,s,c=e.length,l=0,u=0;do{if(t>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=n.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));r=!!(32&o),l+=(o&=31)<<u,u+=5}while(r);i.value=(s=(a=l)>>1,1==(1&a)?-s:s),i.rest=t}},function(e,t){var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<i.length)return i[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},function(e,t){function i(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function n(e,t,r,o){if(r<o){var a=r-1;i(e,(u=r,d=o,Math.round(u+Math.random()*(d-u))),o);for(var s=e[o],c=r;c<o;c++)t(e[c],s)<=0&&i(e,a+=1,c);i(e,a+1,c);var l=a+1;n(e,t,r,l-1),n(e,t,l+1,o)}var u,d}t.quickSort=function(e,t){n(e,t,0,e.length-1)}}]);var Dt={},Bt={};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.initCollections=void 0,Bt.initCollections=function(e){e.register("advancement_trigger",["minecraft:bee_nest_destroyed","minecraft:bred_animals","minecraft:brewed_potion","minecraft:changed_dimension","minecraft:channeled_lightning","minecraft:construct_beacon","minecraft:consume_item","minecraft:cured_zombie_villager","minecraft:effects_changed","minecraft:enchanted_item","minecraft:enter_block","minecraft:entity_hurt_player","minecraft:entity_killed_player","minecraft:filled_bucket","minecraft:fishing_rod_hooked","minecraft:hero_of_the_village","minecraft:impossible","minecraft:inventory_changed","minecraft:item_durability_changed","minecraft:killed_by_crossbow","minecraft:levitation","minecraft:location","minecraft:nether_travel","minecraft:placed_block","minecraft:player_hurt_entity","minecraft:player_killed_entity","minecraft:recipe_unlocked","minecraft:shot_crossbow","minecraft:safely_harvest_honey","minecraft:slept_in_bed","minecraft:slide_down_block","minecraft:summoned_entity","minecraft:tame_animal","minecraft:tick","minecraft:used_ender_eye","minecraft:used_totem","minecraft:villager_trade","minecraft:voluntary_exile"]),e.register("loot_pool_entry_type",["minecraft:empty","minecraft:item","minecraft:tag","minecraft:loot_table","minecraft:alternatives","minecraft:sequence","minecraft:group","minecraft:dynamic"]),e.register("loot_condition_type",["minecraft:alternative","minecraft:inverted","minecraft:reference","minecraft:entity_properties","minecraft:block_state_property","minecraft:match_tool","minecraft:damage_source_properties","minecraft:location_check","minecraft:weather_check","minecraft:time_check","minecraft:entity_scores","minecraft:random_chance","minecraft:random_chance_with_looting","minecraft:table_bonus","minecraft:killed_by_player","minecraft:survives_explosion"]),e.register("loot_function_type",["minecraft:set_count","minecraft:set_damage","minecraft:set_name","minecraft:set_lore","minecraft:set_nbt","minecraft:set_attributes","minecraft:set_contents","minecraft:enchant_randomly","minecraft:enchant_with_levels","minecraft:looting_enchant","minecraft:limit_count","minecraft:furnace_smelt","minecraft:explosion_decay","minecraft:fill_player_head","minecraft:copy_name","minecraft:copy_nbt","minecraft:copy_state","minecraft:apply_bonus","minecraft:exploration_map","minecraft:set_stew_effect"]),e.register("attribute",["generic.maxHealth","generic.followRange","generic.knockbackResistance","generic.movementSpeed","generic.attackDamage","generic.armor","generic.armorToughness","generic.attackSpeed","generic.luck","horse.jumpStrength","generic.attackKnockback","generic.flyingSpeed","zombie.spawnReinforcements"]),e.register("structure_feature",["pillager_outpost","mineshaft","mansion","jungle_pyramid","desert_pyramid","igloo","shipwreck","swamp_hut","stronghold","monument","ocean_ruin","fortress","endcity","buried_treasure","village"]),e.register("dimension",["minecraft:overworld","minecraft:the_nether","minecraft:the_end"]),e.register("keybind",["key.advancements","key.attack","key.back","key.chat","key.command","key.drop","key.forward","key.fullscreen","key.hotbar.1","key.hotbar.2","key.hotbar.3","key.hotbar.4","key.hotbar.5","key.hotbar.6","key.hotbar.7","key.hotbar.8","key.hotbar.9","key.inventory","key.jump","key.left","key.loadToolbarActivator","key.pickItem","key.playerlist","key.right","key.saveToolbarActivator","key.screenshot","key.smoothCamera","key.sneak","key.spectatorOutlines","key.sprint","key.swapOffhand","key.togglePerspective","key.use"]),e.register("slot",["mainhand","offhand","head","chest","legs","feet"]),e.register("gamemode",["survival","creative","adventure","spectator"]),e.register("entity_source",["this","direct_killer","killer","killer_player"]),e.register("copy_source",["block_entity","this","killer","killer_player"]),e.register("loot_table_apply_bonus_formula",["minecraft:uniform_bonus_count","minecraft:binomial_with_bonus_count","minecraft:ore_drops"]),e.register("map_decoration",["mansion","monument","player","frame","red_marker","blue_marker","target_x","target_point","player_off_map","player_off_limits","red_x","banner_white","banner_orange","banner_magenta","banner_light_blue","banner_yellow","banner_lime","banner_pink","banner_gray","banner_light_gray","banner_cyan","banner_purple","banner_blue","banner_brown","banner_green","banner_red","banner_black"]),e.register("recipe_group",["bed","light_gray_dye","iron_ingot","wooden_stairs","black_dye","stained_terracotta","dyed_bed","magenta_dye","bark","rabbit_stew","light_blue_dye","wooden_fence_gate","planks","stained_glass","wooden_door","stained_glass_pane","wooden_fence","sticks","concrete_powder","wooden_pressure_plate","boat","brown_dye","yellow_dye","bonemeal","red_dye","wooden_trapdoor","wooden_button","gold_ingot","pink_dye","wooden_slab","orange_dye","carpet","sign","wool","sugar","blue_dye","white_dye","banner","netherite_ingot"]),e.register("loot_context_type",["minecraft:empty","minecraft:chest","minecraft:command","minecraft:selector","minecraft:fishing","minecraft:entity","minecraft:gift","minecraft:barter","minecraft:advancement_reward","minecraft:advancement_entity","minecraft:generic","minecraft:block"])};var Lt={},Mt={},Tt={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.initCommonSchemas=e.Range=e.ConditionCases=void 0;const t=Pe;e.initCommonSchemas=function(i,n){const r=t.StringNode.bind(void 0,n),o=t.Reference.bind(void 0,i);i.register("block_state",t.Mod(t.ObjectNode({Name:r({validator:"resource",params:{pool:"block"}}),Properties:t.Opt(t.MapNode(r(),r(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"Name"}]}}}))},{context:"block_state"}),{default:()=>({Name:"minecraft:stone"})})),i.register("fluid_state",t.Mod(t.ObjectNode({Name:r({validator:"resource",params:{pool:"fluid"}}),Properties:t.Opt(t.MapNode(r(),r()))},{context:"fluid_state"}),{default:()=>({Name:"minecraft:water",Properties:{level:"0"}})})),i.register("block_pos",t.Mod(t.ListNode(t.NumberNode({integer:!0})),{default:()=>[0,0,0]})),e.Range=e=>t.ChoiceNode([...(null==e?void 0:e.forceRange)?[]:[{type:"number",node:t.NumberNode(e),change:e=>{var t,i,n;return void 0===e?0:null!==(n=null!==(i=null!==(t=e.min)&&void 0!==t?t:e.max)&&void 0!==i?i:e.n)&&void 0!==n?n:0}}],{type:"object",priority:-1,node:t.ObjectNode({min:(null==e?void 0:e.bounds)?t.NumberNode(e):t.Opt(t.NumberNode(e)),max:(null==e?void 0:e.bounds)?t.NumberNode(e):t.Opt(t.NumberNode(e))},{context:"range"}),change:e=>({min:"number"==typeof e?e:void 0===e?1:e.n,max:"number"==typeof e?e:void 0===e?1:e.n})},...(null==e?void 0:e.allowBinomial)?[{type:"binomial",node:t.ObjectNode({type:r({enum:["minecraft:binomial"]}),n:t.NumberNode({integer:!0,min:0}),p:t.NumberNode({min:0,max:1})},{context:"range"}),match:e=>void 0!==e&&"minecraft:binomial"===e.type,change:e=>{var t,i;return{type:"minecraft:binomial",n:"number"==typeof e?e:void 0===e?1:null!==(i=null!==(t=e.min)&&void 0!==t?t:e.max)&&void 0!==i?i:1,p:.5}}}]:[]],{choiceContext:"range"}),e.ConditionCases={"minecraft:alternative":{terms:t.ListNode(o("condition"))},"minecraft:block_state_property":{block:r({validator:"resource",params:{pool:"block"}}),properties:t.MapNode(r(),r(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}})},"minecraft:damage_source_properties":{predicate:o("damage_source_predicate")},"minecraft:entity_properties":{entity:r({enum:"entity_source"}),predicate:o("entity_predicate")},"minecraft:entity_scores":{entity:r({enum:"entity_source"}),scores:t.MapNode(r({validator:"objective"}),e.Range({forceRange:!0,bounds:!0}))},"minecraft:inverted":{term:o("condition")},"minecraft:killed_by_player":{inverse:t.Opt(t.BooleanNode())},"minecraft:location_check":{offsetX:t.Opt(t.NumberNode({integer:!0})),offsetY:t.Opt(t.NumberNode({integer:!0})),offsetZ:t.Opt(t.NumberNode({integer:!0})),predicate:o("location_predicate")},"minecraft:match_tool":{predicate:o("item_predicate")},"minecraft:random_chance":{chance:t.NumberNode({min:0,max:1})},"minecraft:random_chance_with_looting":{chance:t.NumberNode({min:0,max:1}),looting_multiplier:t.NumberNode()},"minecraft:reference":{name:r({validator:"resource",params:{pool:"$predicate"}})},"minecraft:table_bonus":{enchantment:r({validator:"resource",params:{pool:"enchantment"}}),chances:t.ListNode(t.NumberNode({min:0,max:1}))},"minecraft:time_check":{value:e.Range(),period:t.Opt(t.NumberNode())},"minecraft:weather_check":{raining:t.Opt(t.BooleanNode()),thundering:t.Opt(t.BooleanNode())}}}}(Tt);var Rt={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.initPredicatesSchemas=e.LocationFields=void 0;const t=Pe,i=Tt;e.initPredicatesSchemas=function(n,r){const o=t.Reference.bind(void 0,n),a=t.StringNode.bind(void 0,r),s=t.ChoiceNode([{type:"string",node:a(),change:e=>"boolean"==typeof e||"number"==typeof e?e.toString():""},{type:"number",node:t.NumberNode(),change:e=>"string"==typeof e?parseInt(e):0},{type:"object",node:t.ObjectNode({min:t.Opt(t.NumberNode({integer:!0})),max:t.Opt(t.NumberNode({integer:!0}))}),change:e=>"number"==typeof e?{min:e,max:e}:{}},{type:"boolean",node:t.BooleanNode(),change:e=>"true"===e||1===e}]);n.register("item_predicate",t.ObjectNode({item:t.Opt(a({validator:"resource",params:{pool:"item"}})),tag:t.Opt(a({validator:"resource",params:{pool:"$tag/item"}})),count:t.Opt(i.Range()),durability:t.Opt(i.Range()),potion:t.Opt(a({validator:"resource",params:{pool:"potion"}})),nbt:t.Opt(a({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"item"}]}}})),enchantments:t.Opt(t.ListNode(o("enchantment_predicate")))},{context:"item"})),n.register("enchantment_predicate",t.ObjectNode({enchantment:t.Opt(a({validator:"resource",params:{pool:"enchantment"}})),levels:t.Opt(i.Range())},{context:"enchantment"})),n.register("block_predicate",t.ObjectNode({block:t.Opt(a({validator:"resource",params:{pool:"block"}})),tag:t.Opt(a({validator:"resource",params:{pool:"$tag/block"}})),nbt:t.Opt(a({validator:"nbt",params:{registry:{category:"minecraft:block",id:["pop",{push:"block"}]}}})),state:t.Opt(t.MapNode(a(),s,{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}}))},{context:"block"})),n.register("fluid_predicate",t.ObjectNode({fluid:t.Opt(a({validator:"resource",params:{pool:"fluid"}})),tag:t.Opt(a({validator:"resource",params:{pool:"$tag/fluid"}})),state:t.Opt(t.MapNode(a(),s))},{context:"fluid"})),e.LocationFields={position:t.Opt(t.ObjectNode({x:t.Opt(i.Range()),y:t.Opt(i.Range()),z:t.Opt(i.Range())})),biome:t.Opt(a({enum:"biome"})),feature:t.Opt(a({enum:"structure_feature"})),dimension:t.Opt(a({enum:"dimension"})),light:t.Opt(t.ObjectNode({light:t.Opt(i.Range({integer:!0,min:0,max:15}))})),block:t.Opt(o("block_predicate")),fluid:t.Opt(o("fluid_predicate"))},n.register("location_predicate",t.ObjectNode(e.LocationFields,{context:"location"})),n.register("statistic_predicate",t.ObjectNode({type:a({validator:"resource",params:{pool:"stat_type"}}),stat:a(),value:i.Range(),[t.Switch]:[{push:"type"}],[t.Case]:{"minecraft:mined":{stat:a({validator:"resource",params:{pool:"block"}})},"minecraft:crafted":{stat:a({validator:"resource",params:{pool:"item"}})},"minecraft:used":{stat:a({validator:"resource",params:{pool:"item"}})},"minecraft:broken":{stat:a({validator:"resource",params:{pool:"item"}})},"minecraft:picked_up":{stat:a({validator:"resource",params:{pool:"item"}})},"minecraft:dropped":{stat:a({validator:"resource",params:{pool:"item"}})},"minecraft:killed":{stat:a({validator:"resource",params:{pool:"entity_type"}})},"minecraft:killed_by":{stat:a({validator:"resource",params:{pool:"entity_type"}})},"minecraft:custom":{stat:a({validator:"resource",params:{pool:"custom_stat"}})}}})),n.register("player_predicate",t.ObjectNode({gamemode:t.Opt(a({enum:"gamemode"})),level:t.Opt(i.Range()),advancements:t.Opt(t.MapNode(a({validator:"resource",params:{pool:"$advancement"}}),t.ChoiceNode([{type:"boolean",node:t.BooleanNode(),change:e=>!0},{type:"object",node:t.MapNode(a(),t.BooleanNode())}]))),recipes:t.Opt(t.MapNode(a({validator:"resource",params:{pool:"$recipe"}}),t.BooleanNode())),stats:t.Opt(t.ListNode(o("statistic_predicate")))},{context:"player"})),n.register("status_effect_predicate",t.ObjectNode({amplifier:t.Opt(i.Range()),duration:t.Opt(i.Range()),ambient:t.Opt(t.BooleanNode()),visible:t.Opt(t.BooleanNode())},{context:"status_effect"})),n.register("distance_predicate",t.ObjectNode({x:t.Opt(i.Range()),y:t.Opt(i.Range()),z:t.Opt(i.Range()),absolute:t.Opt(i.Range()),horizontal:t.Opt(i.Range())},{context:"distance"})),n.register("entity_predicate",t.ObjectNode({type:t.Opt(a({validator:"resource",params:{pool:"entity_type",allowTag:!0}})),nbt:t.Opt(a({validator:"nbt",params:{registry:{category:"minecraft:entity",id:["pop",{push:"type"}]}}})),team:t.Opt(a({validator:"team"})),location:t.Opt(o("location_predicate")),distance:t.Opt(o("distance_predicate")),flags:t.Opt(t.ObjectNode({is_on_fire:t.Opt(t.BooleanNode()),is_sneaking:t.Opt(t.BooleanNode()),is_sprinting:t.Opt(t.BooleanNode()),is_swimming:t.Opt(t.BooleanNode()),is_baby:t.Opt(t.BooleanNode())})),equipment:t.Opt(t.MapNode(a({enum:"slot"}),o("item_predicate"))),player:t.Opt(o("player_predicate")),effects:t.Opt(t.MapNode(a({validator:"resource",params:{pool:"mob_effect"}}),o("status_effect_predicate")))},{context:"entity"})),n.register("damage_source_predicate",t.ObjectNode({is_explosion:t.Opt(t.BooleanNode()),is_fire:t.Opt(t.BooleanNode()),is_magic:t.Opt(t.BooleanNode()),is_projectile:t.Opt(t.BooleanNode()),is_lightning:t.Opt(t.BooleanNode()),bypasses_armor:t.Opt(t.BooleanNode()),bypasses_invulnerability:t.Opt(t.BooleanNode()),bypasses_magic:t.Opt(t.BooleanNode()),source_entity:t.Opt(o("entity_predicate")),direct_entity:t.Opt(o("entity_predicate"))},{context:"damage_source"})),n.register("damage_predicate",t.ObjectNode({dealt:t.Opt(i.Range()),taken:t.Opt(i.Range()),blocked:t.Opt(t.BooleanNode()),source_entity:t.Opt(o("entity_predicate")),type:t.Opt(o("damage_source_predicate"))},{context:"damage"}))}}(Rt),Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.initAdvancementSchemas=void 0;const $t=Pe,jt=Tt,It=Rt;Mt.initAdvancementSchemas=function(e,t){const i=$t.Reference.bind(void 0,e),n=$t.StringNode.bind(void 0,t);e.register("advancement",$t.Mod($t.ObjectNode({display:$t.Opt($t.Mod($t.ObjectNode({icon:$t.ObjectNode({item:n({validator:"resource",params:{pool:"item"}}),nbt:$t.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"item"}]}}}))}),title:i("text_component"),description:i("text_component"),background:$t.Opt(n()),frame:$t.Opt(n({enum:["task","challenge","goal"]})),show_toast:$t.Opt($t.BooleanNode()),announce_to_chat:$t.Opt($t.BooleanNode()),hidden:$t.Opt($t.BooleanNode())}),{default:()=>({icon:{item:"minecraft:stone"},title:"",description:""})})),parent:$t.Opt(n({validator:"resource",params:{pool:"$advancement"}})),criteria:$t.MapNode(n(),i("advancement_criteria")),requirements:$t.Opt($t.ListNode($t.ListNode(n()))),rewards:$t.Opt($t.ObjectNode({function:$t.Opt(n({validator:"resource",params:{pool:"$function"}})),loot:$t.Opt($t.ListNode(n({validator:"resource",params:{pool:"$loot_table"}}))),recipes:$t.Opt($t.ListNode(n({validator:"resource",params:{pool:"$recipe"}}))),experience:$t.Opt($t.NumberNode({integer:!0}))}))},{context:"advancement"}),{default:()=>({criteria:{requirement:{trigger:"minecraft:location"}}})})),e.register("advancement_criteria",$t.ObjectNode({trigger:n({validator:"resource",params:{pool:t.get("advancement_trigger")}}),conditions:$t.Opt($t.ObjectNode({[$t.Switch]:["pop",{push:"trigger"}],[$t.Case]:{"minecraft:bee_nest_destroyed":{block:$t.Opt(n({validator:"resource",params:{pool:"block"}})),num_bees_inside:$t.Opt($t.NumberNode({integer:!0})),item:$t.Opt(i("item_predicate"))},"minecraft:bred_animals":{parent:$t.Opt(i("entity_predicate")),partner:$t.Opt(i("entity_predicate")),child:$t.Opt(i("entity_predicate"))},"minecraft:brewed_potion":{potion:$t.Opt(n({validator:"resource",params:{pool:"potion"}}))},"minecraft:changed_dimension":{from:$t.Opt(n({enum:"dimension"})),to:$t.Opt(n({enum:"dimension"}))},"minecraft:channeled_lightning":{victims:$t.Opt($t.ListNode($t.Opt(i("entity_predicate"))))},"minecraft:construct_beacon":{level:$t.Opt(jt.Range())},"minecraft:consume_item":{item:$t.Opt(i("item_predicate"))},"minecraft:cured_zombie_villager":{villager:$t.Opt(i("entity_predicate")),zombie:$t.Opt(i("entity_predicate"))},"minecraft:effects_changed":{effects:$t.Opt($t.MapNode(n({validator:"resource",params:{pool:"mob_effect"}}),i("status_effect_predicate")))},"minecraft:enter_block":{block:$t.Opt(n({validator:"resource",params:{pool:"block"}})),state:$t.Opt($t.MapNode(n(),n(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}}))},"minecraft:enchanted_item":{levels:$t.Opt(jt.Range()),item:$t.Opt(i("item_predicate"))},"minecraft:entity_hurt_player":{damage:$t.Opt(i("damage_predicate"))},"minecraft:entity_killed_player":{entity:$t.Opt(i("entity_predicate")),killing_blow:$t.Opt(i("damage_source_predicate"))},"minecraft:filled_bucket":{item:$t.Opt(i("item_predicate"))},"minecraft:fishing_rod_hooked":{entity:$t.Opt(i("entity_predicate")),item:$t.Opt(i("item_predicate"))},"minecraft:hero_of_the_village":It.LocationFields,"minecraft:inventory_changed":{slots:$t.Opt($t.ObjectNode({empty:$t.Opt(jt.Range()),occupied:$t.Opt(jt.Range()),full:$t.Opt(jt.Range())})),items:$t.Opt($t.ListNode(i("item_predicate")))},"minecraft:item_durability_changed":{delta:$t.Opt(jt.Range()),durability:$t.Opt(jt.Range()),item:$t.Opt(i("item_predicate"))},"minecraft:killed_by_crossbow":{unique_entity_types:$t.Opt(jt.Range()),victims:$t.Opt($t.ListNode($t.Opt(i("entity_predicate"))))},"minecraft:levitation":{distance:$t.Opt(jt.Range()),duration:$t.Opt(jt.Range())},"minecraft:location":It.LocationFields,"minecraft:nether_travel":{distance:$t.Opt(jt.Range()),entered:$t.Opt(i("location_predicate")),exited:$t.Opt(i("location_predicate"))},"minecraft:placed_block":{block:$t.Opt(n({validator:"resource",params:{pool:"block"}})),state:$t.Opt($t.MapNode(n(),n(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}})),item:$t.Opt(i("item_predicate")),location:$t.Opt(i("location_predicate"))},"minecraft:player_hurt_entity":{damage:$t.Opt(i("damage_predicate")),entity:$t.Opt(i("entity_predicate"))},"minecraft:player_killed_entity":{entity:$t.Opt(i("entity_predicate")),killing_blow:$t.Opt(i("damage_source_predicate"))},"minecraft:recipe_unlocked":{recipe:n({validator:"resource",params:{pool:"$recipe"}})},"minecraft:safely_harvest_honey":{block:$t.Opt($t.ObjectNode({block:$t.Opt(n({validator:"resource",params:{pool:"block"}})),tag:$t.Opt(n({validator:"resource",params:{pool:"$tag/block"}}))})),item:$t.Opt(i("item_predicate"))},"minecraft:slept_in_bed":It.LocationFields,"minecraft:slide_down_block":{block:$t.Opt(n({validator:"resource",params:{pool:"block"}}))},"minecraft:shot_crossbow":{item:$t.Opt(i("item_predicate"))},"minecraft:summoned_entity":{entity:$t.Opt(i("entity_predicate"))},"minecraft:tame_animal":{entity:$t.Opt(i("entity_predicate"))},"minecraft:used_ender_eye":{distance:$t.Opt(jt.Range())},"minecraft:used_totem":{item:$t.Opt(i("item_predicate"))},"minecraft:villager_trade":{villager:$t.Opt(i("entity_predicate")),item:$t.Opt(i("item_predicate"))},"minecraft:voluntary_exile":It.LocationFields}},{context:"criterion"}))},{category:"predicate",context:"criterion"}))};var Pt={},zt={};Object.defineProperty(zt,"__esModule",{value:!0}),zt.initModelSchemas=void 0;const Ut=Pe;zt.initModelSchemas=function(e,t){Ut.Reference.bind(void 0,e);const i=Ut.StringNode.bind(void 0,t),n=(e,t,i)=>Ut.ListNode(Ut.NumberNode({min:t,max:i}),{minLength:e,maxLength:e}),r=Ut.ChoiceNode([{type:"alias",match:e=>"string"==typeof e&&e.startsWith("#"),node:i(),change:e=>"string"==typeof e?`#${e}`:"#0"},{type:"reference",match:e=>"string"==typeof e,node:i({validator:"resource",params:{pool:"$texture"}}),change:e=>"string"==typeof e?e.replace(/^#/,""):""}],{choiceContext:"texture"});e.register("model",Ut.Mod(Ut.ObjectNode({parent:Ut.Opt(i({validator:"resource",params:{pool:"$model"}})),ambientocclusion:Ut.Opt(Ut.BooleanNode()),gui_light:Ut.Opt(i({enum:"gui_light"})),textures:Ut.Opt(Ut.MapNode(i(),r)),elements:Ut.Opt(Ut.ListNode(Ut.ObjectNode({from:n(3,-16,32),to:n(3,-16,32),rotation:Ut.Opt(Ut.ObjectNode({origin:n(3),axis:i({enum:"axis"}),angle:Ut.NumberEnum({values:[-45,-22.5,0,22.5,45]}),rescale:Ut.Opt(Ut.BooleanNode())})),shade:Ut.Opt(Ut.BooleanNode()),faces:Ut.MapNode(i({enum:"direction"}),Ut.ObjectNode({texture:r,uv:Ut.Opt(n(4)),cullface:Ut.Opt(i({enum:"direction"})),rotation:Ut.Opt(Ut.NumberNode({integer:!0})),tintindex:Ut.Opt(Ut.NumberNode({integer:!0}))}))},{context:"model_element"}))),display:Ut.Opt(Ut.MapNode(i({enum:"display_position"}),Ut.ObjectNode({rotation:n(3),translation:n(3,-80,80),scale:n(3,-4,4)},{context:"item_transform"}))),overrides:Ut.Opt(Ut.ListNode(Ut.ObjectNode({predicate:Ut.MapNode(i({enum:"item_model_predicates"}),Ut.NumberNode()),model:i({validator:"resource",params:{pool:"$model"}})},{context:"model_override"})))},{context:"model"}),{default:()=>({parent:"minecraft:item/generated",textures:{layer0:"minecraft:item/diamond"}})}))};var Wt={};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.initBlockDefinitionSchemas=void 0;const Ht=Pe;Wt.initBlockDefinitionSchemas=function(e,t){const i=Ht.Reference.bind(void 0,e),n=Ht.StringNode.bind(void 0,t);e.register("block_definition",Ht.Mod(Ht.ChoiceNode([{type:"variants",match:e=>void 0!==e.variants,node:Ht.ObjectNode({variants:Ht.MapNode(n(),i("model_variant"))}),change:e=>({variants:{"":{}}})},{type:"multipart",match:e=>void 0!==e.multipart,node:Ht.ObjectNode({multipart:Ht.ListNode(Ht.ObjectNode({when:Ht.Opt(i("multipart_condition")),apply:i("model_variant")}))}),change:e=>({multipart:{when:{},apply:{}}})}],{context:"block_definition"}),{default:()=>({variants:{"":{model:"minecraft:block/stone"}}})}));const r={model:n({validator:"resource",params:{pool:"$model"}}),x:Ht.Opt(Ht.NumberEnum({integer:!0,values:[0,90,180,270]})),y:Ht.Opt(Ht.NumberEnum({integer:!0,values:[0,90,180,270]})),uvlock:Ht.Opt(Ht.BooleanNode())};e.register("model_variant",Ht.ChoiceNode([{type:"object",node:Ht.ObjectNode(r),change:e=>Array.isArray(e)&&e.length>0?e[0]:{}},{type:"list",node:Ht.ListNode(Ht.ObjectNode(c(s({},r),{weight:Ht.Opt(Ht.NumberNode({integer:!0,min:1}))}),{context:"model_variant"})),change:e=>[s({weight:1},e)]}],{context:"model_variant"})),e.register("multipart_condition",Ht.ChoiceNode([{type:"object",priority:-1,match:()=>!0,node:Ht.MapNode(n(),n()),change:e=>"object"==typeof e&&Array.isArray(null==e?void 0:e.OR)&&e.OR.length>0?e.OR[0]:{}},{type:"or",match:e=>"object"==typeof e&&void 0!==(null==e?void 0:e.OR),node:Ht.ObjectNode({OR:Ht.ListNode(i("multipart_condition"))}),change:e=>({OR:[null!=e?e:{}]})}],{context:"multipart_condition"}))},Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.initAssetsSchemas=void 0;const qt=zt,Vt=Wt;Pt.initAssetsSchemas=function(e,t){Vt.initBlockDefinitionSchemas(e,t),qt.initModelSchemas(e,t)};var Gt={};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.initConditionSchemas=void 0;const Kt=Pe,Xt=Tt;Gt.initConditionSchemas=function(e,t){const i=Kt.Reference.bind(void 0,e),n=Kt.StringNode.bind(void 0,t);e.register("predicate",Kt.ObjectOrList(i("condition"),{choiceContext:"condition"})),e.register("condition",Kt.Mod(Kt.ObjectNode({condition:n({validator:"resource",params:{pool:"loot_condition_type"}}),[Kt.Switch]:[{push:"condition"}],[Kt.Case]:Xt.ConditionCases},{category:"predicate",context:"condition"}),{default:()=>({condition:"minecraft:entity_properties",entity:"this"})}))};var Jt={},Yt={};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.LootFunctions=Yt.LootConditions=Yt.LootCopySources=Yt.LootEntitySources=Yt.LootTableTypes=void 0,Yt.LootTableTypes=new Map([["minecraft:advancement_entity",{requires:[7,8],allows:[]}],["minecraft:advancement_reward",{requires:[7,8],allows:[]}],["minecraft:barter",{requires:[8],allows:[]}],["minecraft:block",{requires:[1,7,9],allows:[0,4,8]}],["minecraft:chest",{requires:[7],allows:[8]}],["minecraft:command",{requires:[7],allows:[8]}],["minecraft:empty",{requires:[],allows:[]}],["minecraft:entity",{requires:[2,7,8],allows:[3,5,6]}],["minecraft:fishing",{requires:[7,9],allows:[8]}],["minecraft:generic",{requires:[2,0,1,3,4,5,6,7,8,9],allows:[]}],["minecraft:gift",{requires:[7,8],allows:[]}],["minecraft:selector",{requires:[7],allows:[8]}]]),Yt.LootEntitySources=new Map([["direct_killer",[3]],["killer",[5]],["killer_player",[5]],["this",[8]]]),Yt.LootCopySources=new Map([["block_entity",[0]],["killer",[5]],["killer_player",[5]],["this",[8]]]),Yt.LootConditions=new Map([["minecraft:alternative",[]],["minecraft:block_state_property",[1]],["minecraft:damage_source_properties",[2]],["minecraft:entity_properties",[7]],["minecraft:entity_scores",[]],["minecraft:inverted",[]],["minecraft:killed_by_player",[6]],["minecraft:location_check",[]],["minecraft:match_tool",[9]],["minecraft:random_chance",[]],["minecraft:random_chance_with_looting",[5]],["minecraft:reference",[]],["minecraft:survives_explosion",[4]],["minecraft:table_bonus",[9]],["minecraft:time_check",[]],["minecraft:weather_check",[]]]),Yt.LootFunctions=new Map([["minecraft:apply_bonus",[9]],["minecraft:copy_name",[]],["minecraft:copy_nbt",[]],["minecraft:copy_state",[1]],["minecraft:enchant_randomly",[]],["minecraft:enchant_with_levels",[]],["minecraft:exploration_map",[7]],["minecraft:explosion_decay",[]],["minecraft:fill_player_head",[]],["minecraft:furnace_smelt",[]],["minecraft:limit_count",[]],["minecraft:looting_enchant",[5]],["minecraft:set_attributes",[]],["minecraft:set_contents",[]],["minecraft:set_count",[]],["minecraft:set_damage",[]],["minecraft:set_loot_table",[]],["minecraft:set_lore",[]],["minecraft:set_name",[]],["minecraft:set_nbt",[]],["minecraft:set_stew_effect",[]]]),Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.initLootTableSchemas=void 0;const Zt=Pe,Qt=Yt,ei=Tt;Jt.initLootTableSchemas=function(e,t){const i=Zt.Reference.bind(void 0,e),n=Zt.StringNode.bind(void 0,t),r={conditions:Zt.Opt(Zt.ListNode(i("loot_condition")))},o=s({functions:Zt.Opt(Zt.ListNode(i("loot_function")))},r);function a(e,i,n){const r=[],o=n=>t.get(i).filter((t=>{var i;return(null!==(i=e.get(t))&&void 0!==i?i:[]).every((e=>n.includes(e)))}));for(const[t,{allows:a,requires:s}]of Qt.LootTableTypes){const e=[...a,...s];r.push({match:e=>e.getModel().get(new Zt.Path(["type"]))===t,node:n(o(e))})}return r.push({match:e=>!0,node:n(i)}),Zt.SwitchNode(r)}const l=a(Qt.LootConditions,"loot_condition_type",(e=>n({validator:"resource",params:{pool:e instanceof Array?e:"loot_condition_type"}}))),u=a(Qt.LootFunctions,"loot_function_type",(e=>n({validator:"resource",params:{pool:e instanceof Array?e:"loot_function_type"}}))),d=a(Qt.LootEntitySources,"entity_source",(e=>n({enum:e}))),h=a(Qt.LootCopySources,"copy_source",(e=>n({enum:e})));e.register("loot_table",Zt.Mod(Zt.ObjectNode({type:Zt.Opt(n({validator:"resource",params:{pool:t.get("loot_context_type")}})),pools:Zt.Opt(Zt.ListNode(Zt.Mod(Zt.ObjectNode(s({rolls:ei.Range({allowBinomial:!0,integer:!0}),bonus_rolls:Zt.Opt(ei.Range({integer:!0})),entries:Zt.ListNode(i("loot_entry"))},o),{category:"pool",context:"loot_pool"}),{default:()=>({rolls:1,entries:[{type:"minecraft:item",name:"minecraft:stone"}]})}))),functions:Zt.Opt(Zt.ListNode(i("loot_function")))},{context:"loot_table"}),{default:()=>({pools:[{rolls:1,entries:[{type:"minecraft:item",name:"minecraft:stone"}]}]})}));const p={enabled:e=>{var t;return(null===(t=e.pop().get())||void 0===t?void 0:t.length)>1&&!["minecraft:alternatives","minecraft:group","minecraft:sequence"].includes(e.push("type").get())}};e.register("loot_entry",Zt.Mod(Zt.ObjectNode({type:n({validator:"resource",params:{pool:"loot_pool_entry_type"}}),weight:Zt.Opt(Zt.Mod(Zt.NumberNode({integer:!0,min:1}),p)),quality:Zt.Opt(Zt.Mod(Zt.NumberNode({integer:!0}),p)),[Zt.Switch]:[{push:"type"}],[Zt.Case]:{"minecraft:alternatives":s({children:Zt.ListNode(i("loot_entry"))},o),"minecraft:dynamic":s({name:n()},o),"minecraft:group":s({children:Zt.ListNode(i("loot_entry"))},o),"minecraft:item":s({name:n({validator:"resource",params:{pool:"item"}})},o),"minecraft:loot_table":s({name:n({validator:"resource",params:{pool:"$loot_table"}})},o),"minecraft:sequence":s({children:Zt.ListNode(i("loot_entry"))},o),"minecraft:tag":s({name:n({validator:"resource",params:{pool:"$tag/item"}}),expand:Zt.Opt(Zt.BooleanNode())},o)}},{context:"loot_entry"}),{default:()=>({type:"minecraft:item",name:"minecraft:stone"})})),e.register("loot_function",Zt.Mod(Zt.ObjectNode({function:u,[Zt.Switch]:[{push:"function"}],[Zt.Case]:(()=>{const e={"minecraft:apply_bonus":{enchantment:n({validator:"resource",params:{pool:"enchantment"}}),formula:n({validator:"resource",params:{pool:t.get("loot_table_apply_bonus_formula")}}),parameters:Zt.Mod(Zt.ObjectNode({bonusMultiplier:Zt.Mod(Zt.NumberNode(),{enabled:e=>"minecraft:uniform_bonus_count"===e.pop().push("formula").get()}),extra:Zt.Mod(Zt.NumberNode(),{enabled:e=>"minecraft:binomial_with_bonus_count"===e.pop().push("formula").get()}),probability:Zt.Mod(Zt.NumberNode(),{enabled:e=>"minecraft:binomial_with_bonus_count"===e.pop().push("formula").get()})}),{enabled:e=>"minecraft:ore_drops"!==e.push("formula").get()})},"minecraft:copy_name":{source:h},"minecraft:copy_nbt":{source:h,ops:Zt.ListNode(Zt.ObjectNode({source:n({validator:"nbt_path",params:{category:{getter:"copy_source",path:["pop","pop","pop",{push:"source"}]}}}),target:n({validator:"nbt_path",params:{category:"minecraft:item"}}),op:n({enum:["replace","append","merge"]})},{context:"nbt_operation"}))},"minecraft:copy_state":{block:n({validator:"resource",params:{pool:"block"}}),properties:Zt.ListNode(n({validator:"block_state_key",params:{id:["pop","pop",{push:"block"}]}}))},"minecraft:enchant_randomly":{enchantments:Zt.Opt(Zt.ListNode(n({validator:"resource",params:{pool:"enchantment"}})))},"minecraft:enchant_with_levels":{levels:ei.Range({allowBinomial:!0}),treasure:Zt.Opt(Zt.BooleanNode())},"minecraft:exploration_map":{destination:Zt.Opt(n({enum:"structure_feature"})),decoration:Zt.Opt(n({enum:"map_decoration"})),zoom:Zt.Opt(Zt.NumberNode({integer:!0})),search_radius:Zt.Opt(Zt.NumberNode({integer:!0})),skip_existing_chunks:Zt.Opt(Zt.BooleanNode())},"minecraft:fill_player_head":{entity:d},"minecraft:limit_count":{limit:ei.Range({bounds:!0})},"minecraft:looting_enchant":{count:ei.Range({bounds:!0}),limit:Zt.Opt(Zt.NumberNode({integer:!0}))},"minecraft:set_attributes":{modifiers:Zt.ListNode(i("attribute_modifier"))},"minecraft:set_contents":{entries:Zt.ListNode(i("loot_entry"))},"minecraft:set_count":{count:ei.Range({allowBinomial:!0})},"minecraft:set_damage":{damage:ei.Range({forceRange:!0})},"minecraft:set_loot_table":{name:n({validator:"resource",params:{pool:"$loot_table"}}),seed:Zt.Opt(Zt.NumberNode({integer:!0}))},"minecraft:set_lore":{entity:Zt.Opt(d),lore:Zt.ListNode(i("text_component")),replace:Zt.Opt(Zt.BooleanNode())},"minecraft:set_name":{entity:Zt.Opt(d),name:Zt.Opt(i("text_component"))},"minecraft:set_nbt":{tag:n({validator:"nbt",params:{registry:{category:"minecraft:item"}}})},"minecraft:set_stew_effect":{effects:Zt.Opt(Zt.ListNode(Zt.ObjectNode({type:n({validator:"resource",params:{pool:"mob_effect"}}),duration:ei.Range()})))}},o={};return t.get("loot_function_type").forEach((t=>{o[t]=s(s({},e[t]),r)})),o})()},{category:"function",context:"function"}),{default:()=>({function:"minecraft:set_count",count:1})})),e.register("loot_condition",Zt.Mod(Zt.ObjectNode({condition:l,[Zt.Switch]:[{push:"condition"}],[Zt.Case]:c(s({},ei.ConditionCases),{"minecraft:entity_properties":{entity:d,predicate:i("entity_predicate")},"minecraft:entity_scores":{entity:d,scores:Zt.MapNode(n({validator:"objective"}),ei.Range({bounds:!0}))}})},{category:"predicate",context:"condition"}),{default:()=>({condition:"minecraft:random_chance",chance:.5})})),e.register("attribute_modifier",Zt.Mod(Zt.ObjectNode({attribute:n({validator:"resource",params:{pool:"attribute"}}),name:n(),amount:ei.Range({bounds:!0}),operation:n({enum:["addition","multiply_base","multiply_total"]}),slot:Zt.StringOrList(n({enum:"slot"}))},{context:"attribute_modifier"}),{default:()=>({attribute:"minecraft:generic.max_health",name:"",amount:1,operation:"addition",slot:"mainhand"})}))};var ti={};Object.defineProperty(ti,"__esModule",{value:!0}),ti.initPackMcmetaSchemas=void 0;const ii=Pe;ti.initPackMcmetaSchemas=function(e,t){e.register("pack_mcmeta",ii.Mod(ii.ObjectNode({pack:ii.Mod(ii.ObjectNode({pack_format:ii.Mod(ii.NumberNode({integer:!0,min:5,max:5}),{default:()=>5}),description:ii.Reference(e,"text_component")}),{default:()=>({pack_format:5,description:""})})}),{default:()=>({pack:{pack_format:5,description:""}})}))};var ni={};Object.defineProperty(ni,"__esModule",{value:!0}),ni.initRecipeSchemas=void 0;const ri=Pe;ni.initRecipeSchemas=function(e,t){const i=ri.Reference.bind(void 0,e),n=ri.StringNode.bind(void 0,t);e.register("recipe",ri.Mod(ri.ObjectNode({type:n({validator:"resource",params:{pool:"recipe_serializer"}}),[ri.Switch]:[{push:"type"}],[ri.Case]:{"minecraft:crafting_shaped":{group:ri.Opt(n({enum:"recipe_group",additional:!0})),pattern:ri.ListNode(n()),key:ri.MapNode(n(),i("recipe_ingredient")),result:i("recipe_result")},"minecraft:crafting_shapeless":{group:ri.Opt(n()),ingredients:ri.ListNode(i("recipe_ingredient")),result:i("recipe_result")},"minecraft:smelting":{group:ri.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:ri.Opt(ri.NumberNode()),cookingtime:ri.Opt(ri.Mod(ri.NumberNode({integer:!0}),{default:()=>200}))},"minecraft:blasting":{group:ri.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:ri.Opt(ri.NumberNode()),cookingtime:ri.Opt(ri.Mod(ri.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:smoking":{group:ri.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:ri.Opt(ri.NumberNode()),cookingtime:ri.Opt(ri.Mod(ri.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:campfire_cooking":{group:ri.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:ri.Opt(ri.NumberNode()),cookingtime:ri.Opt(ri.Mod(ri.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:stonecutting":{group:ri.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),count:ri.NumberNode({integer:!0})},"minecraft:smithing":{group:ri.Opt(n()),base:i("recipe_ingredient_object"),addition:i("recipe_ingredient_object"),result:i("recipe_result")}}},{context:"recipe",disableSwitchContext:!0}),{default:()=>({type:"minecraft:crafting_shaped"})})),e.register("recipe_ingredient",ri.Mod(ri.ChoiceNode([{type:"object",node:i("recipe_ingredient_object"),change:e=>e[0]},{type:"list",node:ri.ListNode(i("recipe_ingredient_object")),change:e=>[e]}]),{default:()=>({item:"minecraft:stone"})})),e.register("recipe_ingredient_object",ri.Mod(ri.ObjectNode({item:ri.Opt(n({validator:"resource",params:{pool:"item"}})),tag:ri.Opt(n({validator:"resource",params:{pool:"$tag/item"}}))}),{default:()=>({item:"minecraft:stone"})})),e.register("recipe_result",ri.Mod(ri.ObjectNode({item:n({validator:"resource",params:{pool:"item"}}),count:ri.Opt(ri.Mod(ri.NumberNode({integer:!0}),{default:()=>1}))}),{default:()=>({item:"minecraft:stone"})}))};var oi={};Object.defineProperty(oi,"__esModule",{value:!0}),oi.initTagsSchemas=void 0;const ai=Pe;oi.initTagsSchemas=function(e,t){const i=ai.StringNode.bind(void 0,t),n=e=>ai.Mod(ai.ObjectNode({replace:ai.Opt(ai.BooleanNode()),values:ai.ListNode(ai.ChoiceNode([{type:"string",node:i({validator:"resource",params:{pool:e,allowTag:!0}}),change:e=>e.id},{type:"object",node:ai.ObjectNode({id:i({validator:"resource",params:{pool:e,allowTag:!0,allowUnknown:!0}}),required:ai.BooleanNode()}),change:e=>({id:e})}]))},{context:"tag"}),{default:()=>({values:[]})});e.register("block_tag",n("block")),e.register("entity_type_tag",n("entity_type")),e.register("fluid_tag",n("fluid")),e.register("function_tag",n("$function")),e.register("item_tag",n("item"))};var si={};Object.defineProperty(si,"__esModule",{value:!0}),si.initTextComponentSchemas=void 0;const ci=Pe;si.initTextComponentSchemas=function(e,t){const i=ci.Reference.bind(void 0,e),n=ci.StringNode.bind(void 0,t),r=e=>{var t;return e instanceof Array?r(e[0]):null!==(t=null==e?void 0:e.text)&&void 0!==t?t:"object"==typeof e?"":null==e?void 0:e.toString()};e.register("text_component",ci.Mod(ci.ChoiceNode([{type:"object",node:i("text_component_object"),change:e=>e instanceof Array?"object"==typeof e[0]?e[0]:{text:r(e[0])}:"object"==typeof e?e:{text:r(e)}},{type:"list",node:i("text_component_list"),change:e=>[e]},{type:"string",priority:1,node:n(),change:r},{type:"number",node:ci.NumberNode(),change:e=>{const t=parseFloat(r(e));return isFinite(t)?t:e?1:0}},{type:"boolean",node:ci.BooleanNode(),change:e=>{const t=r(e);return"true"===t||"false"===t?"true"===t:!!t}}],{context:"text_component"}),{default:()=>({text:""})}));const o={bold:ci.Opt(ci.BooleanNode()),italic:ci.Opt(ci.BooleanNode()),underlined:ci.Opt(ci.BooleanNode()),strikethrough:ci.Opt(ci.BooleanNode()),obfuscated:ci.Opt(ci.BooleanNode()),insertion:ci.Opt(n()),clickEvent:ci.Opt(ci.ObjectNode({action:n({enum:["open_url","open_file","run_command","suggest_command","change_page","copy_to_clipboard"]}),[ci.Switch]:[{push:"action"}],[ci.Case]:{change_page:{value:n()},copy_to_clipboard:{value:n()},open_file:{value:n()},open_url:{value:n()},run_command:{value:n({validator:"command",params:{leadingSlash:!0,allowPartial:!0}})},suggest_command:{value:n({validator:"command",params:{leadingSlash:!0,allowPartial:!0}})}}})),hoverEvent:ci.Opt(ci.ObjectNode({action:n({enum:["show_text","show_item","show_entity"]}),[ci.Switch]:[{push:"action"}],[ci.Case]:{show_text:{value:ci.Opt(i("text_component"))},show_item:{value:ci.Opt(n({validator:"nbt",params:{module:"util::InventoryItem"}}))},show_entity:{value:ci.Opt(ci.ObjectNode({name:ci.Opt(n()),type:ci.Opt(n()),id:ci.Opt(n())}))}}})),extra:ci.Opt(i("text_component_list"))};e.register("text_component_object",ci.Mod(ci.ChoiceNode([{type:"text",match:e=>"object"==typeof e,change:e=>({text:""}),priority:-1,node:ci.ObjectNode(s({text:n()},o))},{type:"translation",match:e=>void 0!==(null==e?void 0:e.translate),change:e=>({translate:""}),node:ci.ObjectNode(s({translate:n(),with:ci.Opt(i("text_component_list"))},o))},{type:"score",match:e=>void 0!==(null==e?void 0:e.score),change:e=>({score:{}}),node:ci.ObjectNode(s({score:ci.ObjectNode({name:n({validator:"entity",params:{amount:"single",type:"entities",isScoreHolder:!0}}),objective:n({validator:"objective"}),value:ci.Opt(n())})},o))},{type:"selector",match:e=>void 0!==(null==e?void 0:e.selector),change:e=>({selector:""}),node:ci.ObjectNode(s({selector:n({validator:"entity",params:{amount:"multiple",type:"entities"}})},o))},{type:"keybind",match:e=>void 0!==(null==e?void 0:e.keybind),change:e=>({keybind:""}),node:ci.ObjectNode(s({keybind:n({enum:"keybind",additional:!0})},o))},{type:"nbt",match:e=>void 0!==(null==e?void 0:e.nbt),change:e=>({nbt:""}),node:ci.ObjectNode(s({nbt:n({validator:"nbt_path"}),block:ci.Opt(n({validator:"vector",params:{dimension:3,isInteger:!0}})),entity:ci.Opt(n({validator:"entity",params:{amount:"multiple",type:"entities"}})),storage:ci.Opt(n({validator:"resource",params:{pool:"$storage"}})),interpret:ci.Opt(ci.BooleanNode())},o))}],{context:"text_component_object",choiceContext:"text_component.object"}),{default:()=>({text:""})})),e.register("text_component_list",ci.Mod(ci.ListNode(i("text_component")),{default:()=>[{text:""}]}))},Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.initSchemas=void 0;const li=Mt,ui=Pt,di=Tt,hi=Gt,pi=Jt,mi=ti,fi=Rt,gi=ni,_i=oi,bi=si;Lt.initSchemas=function(e,t){di.initCommonSchemas(e,t),fi.initPredicatesSchemas(e,t),li.initAdvancementSchemas(e,t),ui.initAssetsSchemas(e,t),hi.initConditionSchemas(e,t),pi.initLootTableSchemas(e,t),mi.initPackMcmetaSchemas(e,t),gi.initRecipeSchemas(e,t),_i.initTagsSchemas(e,t),bi.initTextComponentSchemas(e,t)};var vi=Ie&&Ie.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),yi=Ie&&Ie.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),wi=Ie&&Ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.hasOwnProperty.call(e,i)&&vi(t,e,i);return yi(t,e),t};Object.defineProperty(Dt,"__esModule",{value:!0});var xi=Dt.getSchemas=Dt.getCollections=void 0;const Ni=Pe,ki=Bt,Ai=Lt;var Ci=Dt.lootContext=wi(Yt);var Oi=Dt.getCollections=function(){const e=new Ni.CollectionRegistry;return ki.initCollections(e),e};xi=Dt.getSchemas=function(e){const t=new Ni.SchemaRegistry;return Ai.initSchemas(t,e),t};var Si=Object.freeze(Object.assign(Object.create(null),Dt,{[Symbol.toStringTag]:"Module",get getSchemas(){return xi},get getCollections(){return Oi},lootContext:Ci,default:Dt})),Ei={},Fi={};Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.initCollections=void 0,Fi.initCollections=function(e){e.register("advancement_trigger",["minecraft:bee_nest_destroyed","minecraft:bred_animals","minecraft:brewed_potion","minecraft:changed_dimension","minecraft:channeled_lightning","minecraft:construct_beacon","minecraft:consume_item","minecraft:cured_zombie_villager","minecraft:effects_changed","minecraft:enchanted_item","minecraft:enter_block","minecraft:entity_hurt_player","minecraft:entity_killed_player","minecraft:filled_bucket","minecraft:fishing_rod_hooked","minecraft:hero_of_the_village","minecraft:impossible","minecraft:inventory_changed","minecraft:item_durability_changed","minecraft:item_used_on_block","minecraft:killed_by_crossbow","minecraft:levitation","minecraft:location","minecraft:nether_travel","minecraft:placed_block","minecraft:player_generates_container_loot","minecraft:player_hurt_entity","minecraft:player_interacted_with_entity","minecraft:player_killed_entity","minecraft:recipe_unlocked","minecraft:shot_crossbow","minecraft:slept_in_bed","minecraft:slide_down_block","minecraft:summoned_entity","minecraft:tame_animal","minecraft:target_hit","minecraft:tick","minecraft:thrown_item_picked_up_by_entity","minecraft:used_ender_eye","minecraft:used_totem","minecraft:villager_trade","minecraft:voluntary_exile"]),e.register("dimension",["minecraft:overworld","minecraft:the_nether","minecraft:the_end"]),e.register("dimension_type",["minecraft:overworld","minecraft:the_nether","minecraft:the_end"]),e.register("keybind",["key.advancements","key.attack","key.back","key.chat","key.command","key.drop","key.forward","key.fullscreen","key.hotbar.1","key.hotbar.2","key.hotbar.3","key.hotbar.4","key.hotbar.5","key.hotbar.6","key.hotbar.7","key.hotbar.8","key.hotbar.9","key.inventory","key.jump","key.left","key.loadToolbarActivator","key.pickItem","key.playerlist","key.right","key.saveToolbarActivator","key.screenshot","key.smoothCamera","key.sneak","key.spectatorOutlines","key.sprint","key.swapOffhand","key.togglePerspective","key.use"]),e.register("slot",["mainhand","offhand","head","chest","legs","feet"]),e.register("gamemode",["survival","creative","adventure","spectator"]),e.register("worldgen/noise_settings",["minecraft:overworld","minecraft:nether","minecraft:end","minecraft:amplified","minecraft:caves","minecraft:floating_islands"]),e.register("entity_source",["this","direct_killer","killer","killer_player"]),e.register("copy_source",["block_entity","this","killer","killer_player"]),e.register("loot_table_apply_bonus_formula",["minecraft:uniform_bonus_count","minecraft:binomial_with_bonus_count","minecraft:ore_drops"]),e.register("map_decoration",["mansion","monument","player","frame","red_marker","blue_marker","target_x","target_point","player_off_map","player_off_limits","red_x","banner_white","banner_orange","banner_magenta","banner_light_blue","banner_yellow","banner_lime","banner_pink","banner_gray","banner_light_gray","banner_cyan","banner_purple","banner_blue","banner_brown","banner_green","banner_red","banner_black"]),e.register("map_feature",["bastion_remnant","buried_treasure","desert_pyramid","endcity","fortress","igloo","jungle_pyramid","mansion","mineshaft","monument","nether_fossil","ocean_ruin","pillager_outpost","ruined_portal","shipwreck","stronghold","swamp_hut","village"]),e.register("recipe_group",["bed","light_gray_dye","iron_ingot","wooden_stairs","black_dye","stained_terracotta","dyed_bed","magenta_dye","bark","rabbit_stew","light_blue_dye","wooden_fence_gate","planks","stained_glass","wooden_door","stained_glass_pane","wooden_fence","sticks","concrete_powder","wooden_pressure_plate","boat","brown_dye","yellow_dye","bonemeal","red_dye","wooden_trapdoor","wooden_button","gold_ingot","pink_dye","wooden_slab","orange_dye","carpet","sign","wool","sugar","blue_dye","white_dye","banner","netherite_ingot"]),e.register("worldgen/configured_feature",["minecraft:acacia","minecraft:bamboo_light","minecraft:bamboo_vegetation","minecraft:bamboo","minecraft:basalt_blobs","minecraft:basalt_pillar","minecraft:birch_bees_0002","minecraft:birch_bees_002","minecraft:birch_bees_005","minecraft:birch_other","minecraft:birch_tall","minecraft:birch","minecraft:blackstone_blobs","minecraft:blue_ice","minecraft:bonus_chest","minecraft:brown_mushroom_giant","minecraft:brown_mushroom_nether","minecraft:brown_mushroom_normal","minecraft:brown_mushroom_swamp","minecraft:brown_mushroom_taiga","minecraft:chorus_plant","minecraft:crimson_forest_vegetation","minecraft:crimson_fungi_planted","minecraft:crimson_fungi","minecraft:dark_forest_vegetation_brown","minecraft:dark_forest_vegetation_red","minecraft:dark_oak","minecraft:delta","minecraft:desert_well","minecraft:disk_clay","minecraft:disk_gravel","minecraft:disk_sand","minecraft:end_gateway_delayed","minecraft:end_gateway","minecraft:end_island_decorated","minecraft:end_island","minecraft:end_spike","minecraft:fancy_oak_bees_0002","minecraft:fancy_oak_bees_002","minecraft:fancy_oak_bees_005","minecraft:fancy_oak","minecraft:flower_default","minecraft:flower_forest","minecraft:flower_plain_decorated","minecraft:flower_plain","minecraft:flower_swamp","minecraft:flower_warm","minecraft:forest_flower_trees","minecraft:forest_flower_vegetation_common","minecraft:forest_flower_vegetation","minecraft:forest_rock","minecraft:fossil","minecraft:freeze_top_layer","minecraft:glowstone_extra","minecraft:glowstone","minecraft:huge_brown_mushroom","minecraft:huge_red_mushroom","minecraft:ice_patch","minecraft:ice_spike","minecraft:iceberg_blue","minecraft:iceberg_packed","minecraft:jungle_bush","minecraft:jungle_tree_no_vine","minecraft:jungle_tree","minecraft:kelp_cold","minecraft:kelp_warm","minecraft:lake_lava","minecraft:lake_water","minecraft:large_basalt_columns","minecraft:mega_jungle_tree","minecraft:mega_pine","minecraft:mega_spruce","minecraft:monster_room","minecraft:mushroom_field_vegetation","minecraft:nether_sprouts","minecraft:oak_badlands","minecraft:oak_bees_0002","minecraft:oak_bees_002","minecraft:oak_bees_005","minecraft:oak","minecraft:ore_andesite","minecraft:ore_blackstone","minecraft:ore_coal","minecraft:ore_debris_large","minecraft:ore_debris_small","minecraft:ore_diamond","minecraft:ore_diorite","minecraft:ore_dirt","minecraft:ore_emerald","minecraft:ore_gold_deltas","minecraft:ore_gold_extra","minecraft:ore_gold_nether","minecraft:ore_gold","minecraft:ore_granite","minecraft:ore_gravel_nether","minecraft:ore_gravel","minecraft:ore_infested","minecraft:ore_iron","minecraft:ore_lapis","minecraft:ore_magma","minecraft:ore_quartz_deltas","minecraft:ore_quartz_nether","minecraft:ore_redstone","minecraft:ore_soul_sand","minecraft:patch_berry_bush","minecraft:patch_berry_decorated","minecraft:patch_berry_sparse","minecraft:patch_brown_mushroom","minecraft:patch_cactus_decorated","minecraft:patch_cactus_desert","minecraft:patch_cactus","minecraft:patch_crimson_roots","minecraft:patch_dead_bush_2","minecraft:patch_dead_bush_badlands","minecraft:patch_dead_bush","minecraft:patch_fire","minecraft:patch_grass_badlands","minecraft:patch_grass_forest","minecraft:patch_grass_jungle","minecraft:patch_grass_normal","minecraft:patch_grass_plain","minecraft:patch_grass_savanna","minecraft:patch_grass_taiga_2","minecraft:patch_grass_taiga","minecraft:patch_large_fern","minecraft:patch_melon","minecraft:patch_pumpkin","minecraft:patch_red_mushroom","minecraft:patch_soul_fire","minecraft:patch_sugar_cane_badlands","minecraft:patch_sugar_cane_desert","minecraft:patch_sugar_cane_swamp","minecraft:patch_sugar_cane","minecraft:patch_sunflower","minecraft:patch_taiga_grass","minecraft:patch_tall_grass_2","minecraft:patch_tall_grass","minecraft:patch_waterlilly","minecraft:pile_hay","minecraft:pile_ice","minecraft:pile_melon","minecraft:pile_pumpkin","minecraft:pile_snow","minecraft:pine","minecraft:plain_vegetation","minecraft:red_mushroom_giant","minecraft:red_mushroom_nether","minecraft:red_mushroom_normal","minecraft:red_mushroom_swamp","minecraft:red_mushroom_taiga","minecraft:sea_pickle","minecraft:seagrass_cold","minecraft:seagrass_deep_cold","minecraft:seagrass_deep_warm","minecraft:seagrass_deep","minecraft:seagrass_normal","minecraft:seagrass_river","minecraft:seagrass_simple","minecraft:seagrass_swamp","minecraft:seagrass_warm","minecraft:small_basalt_columns","minecraft:spring_closed_double","minecraft:spring_closed","minecraft:spring_delta","minecraft:spring_lava_double","minecraft:spring_lava","minecraft:spring_open","minecraft:spring_water","minecraft:spruce_snowy","minecraft:spruce","minecraft:super_birch_bees_0002","minecraft:swamp_tree","minecraft:taiga_vegetation","minecraft:trees_birch","minecraft:trees_giant_spruce","minecraft:trees_giant","minecraft:trees_jungle_edge","minecraft:trees_jungle","minecraft:trees_mountain_edge","minecraft:trees_mountain","minecraft:trees_savanna","minecraft:trees_shattered_savanna","minecraft:trees_water","minecraft:twisting_vines","minecraft:vines","minecraft:void_start_platform","minecraft:warm_ocean_vegetation","minecraft:warped_forest_vegetation","minecraft:warped_fungi_planted","minecraft:warped_fungi","minecraft:weeping_vines"]),e.register("worldgen/configured_structure_feature",["minecraft:bastion_remnant","minecraft:buried_treasure","minecraft:desert_pyramid","minecraft:end_city","minecraft:fortress","minecraft:igloo","minecraft:jungle_pyramid","minecraft:mansion","minecraft:mineshaft_mesa","minecraft:mineshaft","minecraft:monument","minecraft:nether_fossil","minecraft:ocean_ruin_cold","minecraft:ocean_ruin_warm","minecraft:pillager_outpost","minecraft:ruined_portal_desert","minecraft:ruined_portal_jungle","minecraft:ruined_portal_mountain","minecraft:ruined_portal_nether","minecraft:ruined_portal_ocean","minecraft:ruined_portal_swamp","minecraft:ruined_portal","minecraft:shipwreck_beached","minecraft:shipwreck","minecraft:stronghold","minecraft:swamp_hut","minecraft:village_desert","minecraft:village_plains","minecraft:village_savanna","minecraft:village_snowy","minecraft:village_taiga"]),e.register("worldgen/configured_surface_builder",["minecraft:badlands","minecraft:basalt_deltas","minecraft:crimson_forest","minecraft:desert","minecraft:end","minecraft:eroded_badlands","minecraft:frozen_ocean","minecraft:full_sand","minecraft:giant_tree_taiga","minecraft:grass","minecraft:gravelly_mountain","minecraft:ice_spikes","minecraft:mountain","minecraft:mycelium","minecraft:nether","minecraft:nope","minecraft:ocean_sand","minecraft:shattered_savanna","minecraft:soul_sand_valley","minecraft:stone","minecraft:swamp","minecraft:warped_forest","minecraft:wooded_badlands"]),e.register("biome_category",["beach","desert","extreme_hills","forest","icy","jungle","mesa","mushroom","nether","none","ocean","plains","river","savanna","swamp","taiga","the_end"]),e.register("heightmap_type",["MOTION_BLOCKING","MOTION_BLOCKING_NO_LEAVES","OCEAN_FLOOR","OCEAN_FLOOR_WG","WORLD_SURFACE","WORLD_SURFACE_WG"]),e.register("generation_step",["air","liquid"]),e.register("loot_context_type",["minecraft:empty","minecraft:chest","minecraft:command","minecraft:selector","minecraft:fishing","minecraft:entity","minecraft:gift","minecraft:barter","minecraft:advancement_reward","minecraft:advancement_entity","minecraft:generic","minecraft:block"])};var Di={},Bi={},Li={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.initCommonSchemas=e.UniformInt=e.Range=e.NoiseSettingsPresets=e.DefaultNoiseSettings=e.DimensionTypePresets=e.DefaultDimensionType=e.ConditionCases=void 0;const t=Pe;e.DefaultDimensionType={ultrawarm:!1,natural:!0,piglin_safe:!1,respawn_anchor_works:!1,bed_works:!0,has_raids:!0,has_skylight:!0,has_ceiling:!1,coordinate_scale:1,ambient_light:0,logical_height:256,infiniburn:"minecraft:infiniburn_overworld"},e.DefaultNoiseSettings={name:"minecraft:overworld",bedrock_roof_position:-10,bedrock_floor_position:0,sea_level:63,disable_mob_generation:!1,noise:{density_factor:1,density_offset:-.46875,simplex_surface_noise:!0,random_density_offset:!0,size_horizontal:1,size_vertical:2,height:256,sampling:{xz_scale:1,y_scale:1,xz_factor:80,y_factor:160},top_slide:{target:-10,size:3,offset:0},bottom_slide:{target:-30,size:0,offset:0}},default_block:{Name:"minecraft:stone"},default_fluid:{Name:"minecraft:water",Properties:{level:"0"}}},e.initCommonSchemas=function(i,n){const r=t.StringNode.bind(void 0,n),o=t.Reference.bind(void 0,i);i.register("block_state",t.Mod(t.ObjectNode({Name:r({validator:"resource",params:{pool:"block"}}),Properties:t.Opt(t.MapNode(r(),r(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"Name"}]}}}))},{context:"block_state"}),{default:()=>({Name:"minecraft:stone"})})),i.register("fluid_state",t.Mod(t.ObjectNode({Name:r({validator:"resource",params:{pool:"fluid"}}),Properties:t.Opt(t.MapNode(r(),r()))},{context:"fluid_state"}),{default:()=>({Name:"minecraft:water",Properties:{level:"0"}})})),i.register("block_pos",t.Mod(t.ListNode(t.NumberNode({integer:!0}),{minLength:3,maxLength:3}),{default:()=>[0,0,0]})),e.Range=e=>t.ChoiceNode([...(null==e?void 0:e.forceRange)?[]:[{type:"number",node:t.NumberNode(e),change:e=>{var t,i,n;return void 0===e?0:null!==(n=null!==(i=null!==(t=e.min)&&void 0!==t?t:e.max)&&void 0!==i?i:e.n)&&void 0!==n?n:0}}],{type:"object",priority:-1,node:t.ObjectNode({min:(null==e?void 0:e.bounds)?t.NumberNode(e):t.Opt(t.NumberNode(e)),max:(null==e?void 0:e.bounds)?t.NumberNode(e):t.Opt(t.NumberNode(e))},{context:"range"}),change:e=>({min:"number"==typeof e?e:void 0===e?1:e.n,max:"number"==typeof e?e:void 0===e?1:e.n})},...(null==e?void 0:e.allowBinomial)?[{type:"binomial",node:t.ObjectNode({type:r({enum:["minecraft:binomial"]}),n:t.NumberNode({integer:!0,min:0}),p:t.NumberNode({min:0,max:1})},{context:"range"}),match:e=>void 0!==e&&"minecraft:binomial"===e.type,change:e=>{var t,i;return{type:"minecraft:binomial",n:"number"==typeof e?e:void 0===e?1:null!==(i=null!==(t=e.min)&&void 0!==t?t:e.max)&&void 0!==i?i:1,p:.5}}}]:[]],{choiceContext:"range"}),e.UniformInt=e=>t.ChoiceNode([{type:"number",node:t.NumberNode({integer:!0,min:null==e?void 0:e.min,max:null==e?void 0:e.max}),change:e=>e.base},{type:"object",node:t.ObjectNode({base:t.NumberNode({integer:!0,min:null==e?void 0:e.min,max:null==e?void 0:e.max}),spread:t.NumberNode({integer:!0,min:0,max:null==e?void 0:e.maxSpread})}),change:e=>({base:e,spread:0})}],{context:"uniform_int"}),e.ConditionCases={"minecraft:alternative":{terms:t.ListNode(o("condition"))},"minecraft:block_state_property":{block:r({validator:"resource",params:{pool:"block"}}),properties:t.MapNode(r(),r(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}})},"minecraft:damage_source_properties":{predicate:o("damage_source_predicate")},"minecraft:entity_properties":{entity:r({enum:"entity_source"}),predicate:o("entity_predicate")},"minecraft:entity_scores":{entity:r({enum:"entity_source"}),scores:t.MapNode(r({validator:"objective"}),e.Range({forceRange:!0}))},"minecraft:inverted":{term:o("condition")},"minecraft:killed_by_player":{inverse:t.Opt(t.BooleanNode())},"minecraft:location_check":{offsetX:t.Opt(t.NumberNode({integer:!0})),offsetY:t.Opt(t.NumberNode({integer:!0})),offsetZ:t.Opt(t.NumberNode({integer:!0})),predicate:o("location_predicate")},"minecraft:match_tool":{predicate:o("item_predicate")},"minecraft:random_chance":{chance:t.NumberNode({min:0,max:1})},"minecraft:random_chance_with_looting":{chance:t.NumberNode({min:0,max:1}),looting_multiplier:t.NumberNode()},"minecraft:reference":{name:r({validator:"resource",params:{pool:"$predicate"}})},"minecraft:table_bonus":{enchantment:r({validator:"resource",params:{pool:"enchantment"}}),chances:t.ListNode(t.NumberNode({min:0,max:1}))},"minecraft:time_check":{value:e.Range(),period:t.Opt(t.NumberNode())},"minecraft:weather_check":{raining:t.Opt(t.BooleanNode()),thundering:t.Opt(t.BooleanNode())}},e.DimensionTypePresets=i=>t.ObjectOrPreset(r({validator:"resource",params:{pool:"$dimension_type"}}),i,{"minecraft:overworld":e.DefaultDimensionType,"minecraft:the_nether":{name:"minecraft:the_nether",ultrawarm:!0,natural:!1,shrunk:!0,piglin_safe:!0,respawn_anchor_works:!0,bed_works:!1,has_raids:!1,has_skylight:!1,has_ceiling:!0,ambient_light:.1,fixed_time:18e3,logical_height:128,effects:"minecraft:the_nether",infiniburn:"minecraft:infiniburn_nether"},"minecraft:the_end":{name:"minecraft:the_end",ultrawarm:!1,natural:!1,shrunk:!1,piglin_safe:!1,respawn_anchor_works:!1,bed_works:!1,has_raids:!0,has_skylight:!1,has_ceiling:!1,ambient_light:0,fixed_time:6e3,logical_height:256,effects:"minecraft:the_end",infiniburn:"minecraft:infiniburn_end"}}),e.NoiseSettingsPresets=i=>t.ObjectOrPreset(r({validator:"resource",params:{pool:"$worldgen/noise_settings"}}),i,{"minecraft:overworld":e.DefaultNoiseSettings,"minecraft:nether":{name:"minecraft:nether",bedrock_roof_position:0,bedrock_floor_position:0,sea_level:32,disable_mob_generation:!0,noise:{density_factor:0,density_offset:.019921875,simplex_surface_noise:!1,random_density_offset:!1,size_horizontal:1,size_vertical:2,height:128,sampling:{xz_scale:1,y_scale:3,xz_factor:80,y_factor:60},top_slide:{target:120,size:3,offset:0},bottom_slide:{target:320,size:4,offset:-1}},default_block:{Name:"minecraft:netherrack"},default_fluid:{Name:"minecraft:lava",Properties:{level:"0"}}},"minecraft:end":{name:"minecraft:end",bedrock_roof_position:-10,bedrock_floor_position:-10,sea_level:0,disable_mob_generation:!0,noise:{density_factor:0,density_offset:0,simplex_surface_noise:!0,random_density_offset:!1,island_noise_override:!0,size_horizontal:2,size_vertical:1,height:128,sampling:{xz_scale:2,y_scale:1,xz_factor:80,y_factor:160},top_slide:{target:-3e3,size:64,offset:-46},bottom_slide:{target:-30,size:7,offset:1}},default_block:{Name:"minecraft:end_stone"},default_fluid:{Name:"minecraft:air"}},"minecraft:amplified":{name:"minecraft:amplified",bedrock_roof_position:-10,bedrock_floor_position:0,sea_level:63,disable_mob_generation:!1,noise:{density_factor:1,density_offset:-.46875,simplex_surface_noise:!0,random_density_offset:!0,amplified:!0,size_horizontal:1,size_vertical:2,height:256,sampling:{xz_scale:1,y_scale:1,xz_factor:80,y_factor:160},top_slide:{target:-10,size:3,offset:0},bottom_slide:{target:-30,size:0,offset:0}},default_block:{Name:"minecraft:stone"},default_fluid:{Name:"minecraft:water",Properties:{level:"0"}}},"minecraft:caves":{name:"minecraft:caves",bedrock_roof_position:0,bedrock_floor_position:0,sea_level:32,disable_mob_generation:!0,noise:{density_factor:0,density_offset:.019921875,simplex_surface_noise:!1,random_density_offset:!1,size_horizontal:1,size_vertical:2,height:128,sampling:{xz_scale:1,y_scale:3,xz_factor:80,y_factor:60},top_slide:{target:120,size:3,offset:0},bottom_slide:{target:320,size:4,offset:-1}},default_block:{Name:"minecraft:stone"},default_fluid:{Name:"minecraft:water",Properties:{level:"0"}}},"minecraft:floating_islands":{name:"minecraft:floating_islands",bedrock_roof_position:-10,bedrock_floor_position:-10,sea_level:0,disable_mob_generation:!0,noise:{density_factor:0,density_offset:0,simplex_surface_noise:!0,random_density_offset:!1,island_noise_override:!0,size_horizontal:2,size_vertical:1,height:128,sampling:{xz_scale:2,y_scale:1,xz_factor:80,y_factor:160},top_slide:{target:-3e3,size:64,offset:-46},bottom_slide:{target:-30,size:7,offset:1}},default_block:{Name:"minecraft:stone"},default_fluid:{Name:"minecraft:water",Properties:{level:"0"}}}})}}(Li),Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.initAdvancementSchemas=void 0;const Mi=Pe,Ti=Li;Bi.initAdvancementSchemas=function(e,t){const i=Mi.Reference.bind(void 0,e),n=Mi.StringNode.bind(void 0,t),r=Mi.ChoiceNode([{type:"object",node:Mi.Opt(i("entity_predicate")),change:e=>{var t,i;return null!==(i=null===(t=e[0])||void 0===t?void 0:t.predicate)&&void 0!==i?i:{}}},{type:"list",node:Mi.ListNode(i("condition")),change:e=>[{condition:"minecraft:entity_properties",predicate:e}]}],{context:"conditions"});e.register("advancement",Mi.Mod(Mi.ObjectNode({display:Mi.Opt(Mi.Mod(Mi.ObjectNode({icon:Mi.ObjectNode({item:n({validator:"resource",params:{pool:"item"}}),nbt:Mi.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"item"}]}}}))}),title:i("text_component"),description:i("text_component"),background:Mi.Opt(n()),frame:Mi.Opt(n({enum:["task","challenge","goal"]})),show_toast:Mi.Opt(Mi.BooleanNode()),announce_to_chat:Mi.Opt(Mi.BooleanNode()),hidden:Mi.Opt(Mi.BooleanNode())}),{default:()=>({icon:{item:"minecraft:stone"},title:"",description:""})})),parent:Mi.Opt(n({validator:"resource",params:{pool:"$advancement"}})),criteria:Mi.MapNode(n(),i("advancement_criteria")),requirements:Mi.Opt(Mi.ListNode(Mi.ListNode(n()))),rewards:Mi.Opt(Mi.ObjectNode({function:Mi.Opt(n({validator:"resource",params:{pool:"$function"}})),loot:Mi.Opt(Mi.ListNode(n({validator:"resource",params:{pool:"$loot_table"}}))),recipes:Mi.Opt(Mi.ListNode(n({validator:"resource",params:{pool:"$recipe"}}))),experience:Mi.Opt(Mi.NumberNode({integer:!0}))}))},{context:"advancement"}),{default:()=>({criteria:{requirement:{trigger:"minecraft:location"}}})})),e.register("advancement_criteria",Mi.ObjectNode({trigger:n({validator:"resource",params:{pool:t.get("advancement_trigger")}}),conditions:Mi.Opt(Mi.ObjectNode({player:Mi.Mod(r,{enabled:e=>"minecraft:impossible"!==e.pop().push("trigger").get()}),[Mi.Switch]:["pop",{push:"trigger"}],[Mi.Case]:{"minecraft:bee_nest_destroyed":{block:Mi.Opt(n({validator:"resource",params:{pool:"block"}})),num_bees_inside:Mi.Opt(Mi.NumberNode({integer:!0})),item:Mi.Opt(i("item_predicate"))},"minecraft:bred_animals":{parent:r,partner:r,child:r},"minecraft:brewed_potion":{potion:Mi.Opt(n({validator:"resource",params:{pool:"potion"}}))},"minecraft:changed_dimension":{from:Mi.Opt(n({validator:"resource",params:{pool:"$dimension"}})),to:Mi.Opt(n({validator:"resource",params:{pool:"$dimension"}}))},"minecraft:channeled_lightning":{victims:Mi.Opt(Mi.ListNode(r))},"minecraft:construct_beacon":{level:Mi.Opt(Ti.Range())},"minecraft:consume_item":{item:Mi.Opt(i("item_predicate"))},"minecraft:cured_zombie_villager":{villager:r,zombie:r},"minecraft:effects_changed":{effects:Mi.Opt(Mi.MapNode(n({validator:"resource",params:{pool:"mob_effect"}}),i("status_effect_predicate")))},"minecraft:enter_block":{block:Mi.Opt(n({validator:"resource",params:{pool:"block"}})),state:Mi.Opt(Mi.MapNode(n(),n(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}}))},"minecraft:enchanted_item":{levels:Mi.Opt(Ti.Range()),item:Mi.Opt(i("item_predicate"))},"minecraft:entity_hurt_player":{damage:Mi.Opt(i("damage_predicate"))},"minecraft:entity_killed_player":{entity:r,killing_blow:Mi.Opt(i("damage_source_predicate"))},"minecraft:filled_bucket":{item:Mi.Opt(i("item_predicate"))},"minecraft:fishing_rod_hooked":{entity:r,item:Mi.Opt(i("item_predicate"))},"minecraft:hero_of_the_village":{location:Mi.Opt(i("location_predicate"))},"minecraft:inventory_changed":{slots:Mi.Opt(Mi.ObjectNode({empty:Mi.Opt(Ti.Range()),occupied:Mi.Opt(Ti.Range()),full:Mi.Opt(Ti.Range())})),items:Mi.Opt(Mi.ListNode(i("item_predicate")))},"minecraft:item_durability_changed":{delta:Mi.Opt(Ti.Range()),durability:Mi.Opt(Ti.Range()),item:Mi.Opt(i("item_predicate"))},"minecraft:item_used_on_block":{item:Mi.Opt(i("item_predicate")),location:Mi.Opt(i("location_predicate"))},"minecraft:killed_by_crossbow":{unique_entity_types:Mi.Opt(Ti.Range()),victims:Mi.Opt(Mi.ListNode(r))},"minecraft:levitation":{distance:Mi.Opt(Ti.Range()),duration:Mi.Opt(Ti.Range())},"minecraft:location":{location:Mi.Opt(i("location_predicate"))},"minecraft:nether_travel":{distance:Mi.Opt(Ti.Range()),entered:Mi.Opt(i("location_predicate")),exited:Mi.Opt(i("location_predicate"))},"minecraft:placed_block":{block:Mi.Opt(n({validator:"resource",params:{pool:"block"}})),state:Mi.Opt(Mi.MapNode(n(),n(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}})),item:Mi.Opt(i("item_predicate")),location:Mi.Opt(i("location_predicate"))},"minecraft:player_generates_container_loot":{loot_table:n({validator:"resource",params:{pool:"$loot_table"}})},"minecraft:player_hurt_entity":{damage:Mi.Opt(i("damage_predicate")),entity:r},"minecraft:player_interacted_with_entity":{item:Mi.Opt(i("item_predicate")),entity:r},"minecraft:player_killed_entity":{entity:r,killing_blow:Mi.Opt(i("damage_source_predicate"))},"minecraft:recipe_unlocked":{recipe:n({validator:"resource",params:{pool:"$recipe"}})},"minecraft:slept_in_bed":{location:Mi.Opt(i("location_predicate"))},"minecraft:slide_down_block":{block:Mi.Opt(n({validator:"resource",params:{pool:"block"}}))},"minecraft:shot_crossbow":{item:Mi.Opt(i("item_predicate"))},"minecraft:summoned_entity":{entity:r},"minecraft:tame_animal":{entity:r},"minecraft:target_hit":{projectile:r,shooter:r,signal_strength:Mi.Opt(Ti.Range({integer:!0}))},"minecraft:thrown_item_picked_up_by_entity":{entity:Mi.Opt(i("entity_predicate")),item:Mi.Opt(i("item_predicate"))},"minecraft:used_ender_eye":{distance:Mi.Opt(Ti.Range())},"minecraft:used_totem":{item:Mi.Opt(i("item_predicate"))},"minecraft:villager_trade":{villager:Mi.Opt(i("entity_predicate")),item:Mi.Opt(i("item_predicate"))},"minecraft:voluntary_exile":{location:i("location_predicate")}}},{context:"criterion"}))},{category:"predicate",context:"criterion"}))};var Ri={},$i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.initModelSchemas=void 0;const ji=Pe;$i.initModelSchemas=function(e,t){ji.Reference.bind(void 0,e);const i=ji.StringNode.bind(void 0,t),n=(e,t,i)=>ji.ListNode(ji.NumberNode({min:t,max:i}),{minLength:e,maxLength:e}),r=ji.ChoiceNode([{type:"alias",match:e=>"string"==typeof e&&e.startsWith("#"),node:i(),change:e=>"string"==typeof e?`#${e}`:"#0"},{type:"reference",match:e=>"string"==typeof e,node:i({validator:"resource",params:{pool:"$texture"}}),change:e=>"string"==typeof e?e.replace(/^#/,""):""}],{choiceContext:"texture"});e.register("model",ji.Mod(ji.ObjectNode({parent:ji.Opt(i({validator:"resource",params:{pool:"$model"}})),ambientocclusion:ji.Opt(ji.BooleanNode()),gui_light:ji.Opt(i({enum:"gui_light"})),textures:ji.Opt(ji.MapNode(i(),r)),elements:ji.Opt(ji.ListNode(ji.ObjectNode({from:n(3,-16,32),to:n(3,-16,32),rotation:ji.Opt(ji.ObjectNode({origin:n(3),axis:i({enum:"axis"}),angle:ji.NumberEnum({values:[-45,-22.5,0,22.5,45]}),rescale:ji.Opt(ji.BooleanNode())})),shade:ji.Opt(ji.BooleanNode()),faces:ji.MapNode(i({enum:"direction"}),ji.ObjectNode({texture:r,uv:ji.Opt(n(4)),cullface:ji.Opt(i({enum:"direction"})),rotation:ji.Opt(ji.NumberNode({integer:!0})),tintindex:ji.Opt(ji.NumberNode({integer:!0}))}))},{context:"model_element"}))),display:ji.Opt(ji.MapNode(i({enum:"display_position"}),ji.ObjectNode({rotation:n(3),translation:n(3,-80,80),scale:n(3,-4,4)},{context:"item_transform"}))),overrides:ji.Opt(ji.ListNode(ji.ObjectNode({predicate:ji.MapNode(i({enum:"item_model_predicates"}),ji.NumberNode()),model:i({validator:"resource",params:{pool:"$model"}})},{context:"model_override"})))},{context:"model"}),{default:()=>({parent:"minecraft:item/generated",textures:{layer0:"minecraft:item/diamond"}})}))};var Ii={};Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.initBlockDefinitionSchemas=void 0;const Pi=Pe;Ii.initBlockDefinitionSchemas=function(e,t){const i=Pi.Reference.bind(void 0,e),n=Pi.StringNode.bind(void 0,t);e.register("block_definition",Pi.Mod(Pi.ChoiceNode([{type:"variants",match:e=>void 0!==e.variants,node:Pi.ObjectNode({variants:Pi.MapNode(n(),i("model_variant"))}),change:e=>({variants:{"":{}}})},{type:"multipart",match:e=>void 0!==e.multipart,node:Pi.ObjectNode({multipart:Pi.ListNode(Pi.ObjectNode({when:Pi.Opt(i("multipart_condition")),apply:i("model_variant")}))}),change:e=>({multipart:{when:{},apply:{}}})}],{context:"block_definition"}),{default:()=>({variants:{"":{model:"minecraft:block/stone"}}})}));const r={model:n({validator:"resource",params:{pool:"$model"}}),x:Pi.Opt(Pi.NumberEnum({integer:!0,values:[0,90,180,270]})),y:Pi.Opt(Pi.NumberEnum({integer:!0,values:[0,90,180,270]})),uvlock:Pi.Opt(Pi.BooleanNode())};e.register("model_variant",Pi.ChoiceNode([{type:"object",node:Pi.ObjectNode(r),change:e=>Array.isArray(e)&&e.length>0?e[0]:{}},{type:"list",node:Pi.ListNode(Pi.ObjectNode(c(s({},r),{weight:Pi.Opt(Pi.NumberNode({integer:!0,min:1}))}),{context:"model_variant"})),change:e=>[s({weight:1},e)]}],{context:"model_variant"})),e.register("multipart_condition",Pi.ChoiceNode([{type:"object",priority:-1,match:()=>!0,node:Pi.MapNode(n(),n()),change:e=>"object"==typeof e&&Array.isArray(null==e?void 0:e.OR)&&e.OR.length>0?e.OR[0]:{}},{type:"or",match:e=>"object"==typeof e&&void 0!==(null==e?void 0:e.OR),node:Pi.ObjectNode({OR:Pi.ListNode(i("multipart_condition"))}),change:e=>({OR:[null!=e?e:{}]})}],{context:"multipart_condition"}))},Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.initAssetsSchemas=void 0;const zi=$i,Ui=Ii;Ri.initAssetsSchemas=function(e,t){Ui.initBlockDefinitionSchemas(e,t),zi.initModelSchemas(e,t)};var Wi={};Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.initConditionSchemas=void 0;const Hi=Pe,qi=Li;Wi.initConditionSchemas=function(e,t){const i=Hi.Reference.bind(void 0,e),n=Hi.StringNode.bind(void 0,t);e.register("predicate",Hi.ObjectOrList(i("condition"),{choiceContext:"condition"})),e.register("condition",Hi.Mod(Hi.ObjectNode({condition:n({validator:"resource",params:{pool:"loot_condition_type"}}),[Hi.Switch]:[{push:"condition"}],[Hi.Case]:qi.ConditionCases},{category:"predicate",context:"condition"}),{default:()=>({condition:"minecraft:entity_properties",entity:"this"})}))};var Vi={};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.initDimensionSchemas=void 0;const Gi=Pe,Ki=Li;Vi.initDimensionSchemas=function(e,t){const i=Gi.Reference.bind(void 0,e),n=Gi.StringNode.bind(void 0,t),r=e=>Gi.Mod(e,{enabled:e=>void 0===e.push("preset").get()});e.register("dimension",Gi.Mod(Gi.ObjectNode({type:Ki.DimensionTypePresets(i("dimension_type")),generator:Gi.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/chunk_generator"}}),[Gi.Switch]:[{push:"type"}],[Gi.Case]:{"minecraft:noise":{seed:Gi.NumberNode({integer:!0}),settings:Ki.NoiseSettingsPresets(i("noise_settings")),biome_source:Gi.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/biome_source"}}),[Gi.Switch]:[{push:"type"}],[Gi.Case]:{"minecraft:fixed":{biome:n({validator:"resource",params:{pool:"$worldgen/biome"}})},"minecraft:multi_noise":{seed:Gi.NumberNode({integer:!0}),preset:Gi.Opt(n({enum:["nether"]})),altitude_noise:r(i("generator_biome_noise")),temperature_noise:r(i("generator_biome_noise")),humidity_noise:r(i("generator_biome_noise")),weirdness_noise:r(i("generator_biome_noise")),biomes:r(Gi.Mod(Gi.ListNode(i("generator_biome")),{default:()=>[{biome:"minecraft:plains"}]}))},"minecraft:checkerboard":{scale:Gi.Opt(Gi.NumberNode({integer:!0,min:0,max:62})),biomes:Gi.ListNode(n({validator:"resource",params:{pool:"$worldgen/biome"}}))},"minecraft:the_end":{seed:Gi.NumberNode({integer:!0})},"minecraft:vanilla_layered":{seed:Gi.NumberNode({integer:!0}),large_biomes:Gi.Opt(Gi.BooleanNode()),legacy_biome_init_layer:Gi.Opt(Gi.BooleanNode())}}},{category:"predicate",disableSwitchContext:!0})},"minecraft:flat":{settings:Gi.ObjectNode({biome:Gi.Opt(n({validator:"resource",params:{pool:"$worldgen/biome"}})),lakes:Gi.Opt(Gi.BooleanNode()),features:Gi.Opt(Gi.BooleanNode()),layers:Gi.ListNode(i("generator_layer")),structures:i("generator_structures")})}}},{disableSwitchContext:!0})},{category:"pool",context:"dimension"}),{default:()=>{const e=Math.floor(4294967296*Math.random())-2147483648;return{type:"minecraft:overworld",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:fixed",seed:e,biome:"minecraft:plains"},settings:"minecraft:overworld"}}}})),e.register("generator_biome",Gi.Mod(Gi.ObjectNode({biome:n({validator:"resource",params:{pool:"$worldgen/biome"}}),parameters:Gi.ObjectNode({altitude:Gi.NumberNode(),temperature:Gi.NumberNode(),humidity:Gi.NumberNode(),weirdness:Gi.NumberNode(),offset:Gi.NumberNode()})},{context:"generator_biome"}),{default:()=>({biome:"minecraft:plains",parameters:{altitude:0,temperature:0,humidity:0,weirdness:0,offset:0}})})),e.register("generator_biome_noise",Gi.Mod(Gi.ObjectNode({firstOctave:Gi.NumberNode({integer:!0}),amplitudes:Gi.ListNode(Gi.NumberNode())},{context:"generator_biome_noise"}),{default:()=>({firstOctave:-7,amplitudes:[1,1]})}))};var Xi={};Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.initDimensionTypeSchemas=void 0;const Ji=Pe,Yi=Li;Xi.initDimensionTypeSchemas=function(e,t){const i=Ji.StringNode.bind(void 0,t);e.register("dimension_type",Ji.Mod(Ji.ObjectNode({name:Ji.Mod(i({validator:"resource",params:{pool:"$dimension_type",isDefinition:!0}}),{enabled:e=>e.getArray().length>0}),ultrawarm:Ji.BooleanNode(),natural:Ji.BooleanNode(),piglin_safe:Ji.BooleanNode(),respawn_anchor_works:Ji.BooleanNode(),bed_works:Ji.BooleanNode(),has_raids:Ji.BooleanNode(),has_skylight:Ji.BooleanNode(),has_ceiling:Ji.BooleanNode(),coordinate_scale:Ji.NumberNode({min:1e-5,max:3e7}),ambient_light:Ji.NumberNode(),fixed_time:Ji.Opt(Ji.NumberNode({integer:!0})),logical_height:Ji.NumberNode({integer:!0,min:0,max:256}),effects:Ji.Opt(i({enum:["minecraft:overworld","minecraft:the_nether","minecraft:the_end"]})),infiniburn:i({validator:"resource",params:{pool:"$tag/block"}})},{context:"dimension_type"}),{default:()=>Yi.DefaultDimensionType}))};var Zi={},Qi={};Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.LootFunctions=Qi.LootConditions=Qi.LootCopySources=Qi.LootEntitySources=Qi.LootTableTypes=void 0,Qi.LootTableTypes=new Map([["minecraft:advancement_entity",{requires:[7,8],allows:[]}],["minecraft:advancement_reward",{requires:[7,8],allows:[]}],["minecraft:barter",{requires:[8],allows:[]}],["minecraft:block",{requires:[1,7,9],allows:[0,4,8]}],["minecraft:chest",{requires:[7],allows:[8]}],["minecraft:command",{requires:[7],allows:[8]}],["minecraft:empty",{requires:[],allows:[]}],["minecraft:entity",{requires:[2,7,8],allows:[3,5,6]}],["minecraft:fishing",{requires:[7,9],allows:[8]}],["minecraft:generic",{requires:[2,0,1,3,4,5,6,7,8,9],allows:[]}],["minecraft:gift",{requires:[7,8],allows:[]}],["minecraft:selector",{requires:[7],allows:[8]}]]),Qi.LootEntitySources=new Map([["direct_killer",[3]],["killer",[5]],["killer_player",[5]],["this",[8]]]),Qi.LootCopySources=new Map([["block_entity",[0]],["killer",[5]],["killer_player",[5]],["this",[8]]]),Qi.LootConditions=new Map([["minecraft:alternative",[]],["minecraft:block_state_property",[1]],["minecraft:damage_source_properties",[2]],["minecraft:entity_properties",[7]],["minecraft:entity_scores",[]],["minecraft:inverted",[]],["minecraft:killed_by_player",[6]],["minecraft:location_check",[]],["minecraft:match_tool",[9]],["minecraft:random_chance",[]],["minecraft:random_chance_with_looting",[5]],["minecraft:reference",[]],["minecraft:survives_explosion",[4]],["minecraft:table_bonus",[9]],["minecraft:time_check",[]],["minecraft:weather_check",[]]]),Qi.LootFunctions=new Map([["minecraft:apply_bonus",[9]],["minecraft:copy_name",[]],["minecraft:copy_nbt",[]],["minecraft:copy_state",[1]],["minecraft:enchant_randomly",[]],["minecraft:enchant_with_levels",[]],["minecraft:exploration_map",[7]],["minecraft:explosion_decay",[]],["minecraft:fill_player_head",[]],["minecraft:furnace_smelt",[]],["minecraft:limit_count",[]],["minecraft:looting_enchant",[5]],["minecraft:set_attributes",[]],["minecraft:set_contents",[]],["minecraft:set_count",[]],["minecraft:set_damage",[]],["minecraft:set_loot_table",[]],["minecraft:set_lore",[]],["minecraft:set_name",[]],["minecraft:set_nbt",[]],["minecraft:set_stew_effect",[]]]),Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.initLootTableSchemas=void 0;const en=Pe,tn=Qi,nn=Li;Zi.initLootTableSchemas=function(e,t){const i=en.Reference.bind(void 0,e),n=en.StringNode.bind(void 0,t),r={conditions:en.Opt(en.ListNode(i("loot_condition")))},o=s({functions:en.Opt(en.ListNode(i("loot_function")))},r);function a(e,i,n){const r=[],o=n=>t.get(i).filter((t=>{var i;return(null!==(i=e.get(t))&&void 0!==i?i:[]).every((e=>n.includes(e)))}));for(const[t,{allows:a,requires:s}]of tn.LootTableTypes){const e=[...a,...s];r.push({match:e=>e.getModel().get(new en.Path(["type"]))===t,node:n(o(e))})}return r.push({match:e=>!0,node:n(i)}),en.SwitchNode(r)}const l=a(tn.LootConditions,"loot_condition_type",(e=>n({validator:"resource",params:{pool:e instanceof Array?e:"loot_condition_type"}}))),u=a(tn.LootFunctions,"loot_function_type",(e=>n({validator:"resource",params:{pool:e instanceof Array?e:"loot_function_type"}}))),d=a(tn.LootEntitySources,"entity_source",(e=>n({enum:e}))),h=a(tn.LootCopySources,"copy_source",(e=>n({enum:e})));e.register("loot_table",en.Mod(en.ObjectNode({type:en.Opt(n({validator:"resource",params:{pool:t.get("loot_context_type")}})),pools:en.Opt(en.ListNode(en.Mod(en.ObjectNode(s({rolls:nn.Range({allowBinomial:!0,integer:!0}),bonus_rolls:en.Opt(nn.Range({integer:!0})),entries:en.ListNode(i("loot_entry"))},o),{category:"pool",context:"loot_pool"}),{default:()=>({rolls:1,entries:[{type:"minecraft:item",name:"minecraft:stone"}]})}))),functions:en.Opt(en.ListNode(i("loot_function")))},{context:"loot_table"}),{default:()=>({pools:[{rolls:1,entries:[{type:"minecraft:item",name:"minecraft:stone"}]}]})}));const p={enabled:e=>{var t;return(null===(t=e.pop().get())||void 0===t?void 0:t.length)>1&&!["minecraft:alternatives","minecraft:group","minecraft:sequence"].includes(e.push("type").get())}};e.register("loot_entry",en.Mod(en.ObjectNode({type:n({validator:"resource",params:{pool:"loot_pool_entry_type"}}),weight:en.Opt(en.Mod(en.NumberNode({integer:!0,min:1}),p)),quality:en.Opt(en.Mod(en.NumberNode({integer:!0}),p)),[en.Switch]:[{push:"type"}],[en.Case]:{"minecraft:alternatives":s({children:en.ListNode(i("loot_entry"))},o),"minecraft:dynamic":s({name:n()},o),"minecraft:group":s({children:en.ListNode(i("loot_entry"))},o),"minecraft:item":s({name:n({validator:"resource",params:{pool:"item"}})},o),"minecraft:loot_table":s({name:n({validator:"resource",params:{pool:"$loot_table"}})},o),"minecraft:sequence":s({children:en.ListNode(i("loot_entry"))},o),"minecraft:tag":s({name:n({validator:"resource",params:{pool:"$tag/item"}}),expand:en.Opt(en.BooleanNode())},o)}},{context:"loot_entry"}),{default:()=>({type:"minecraft:item",name:"minecraft:stone"})})),e.register("loot_function",en.Mod(en.ObjectNode({function:u,[en.Switch]:[{push:"function"}],[en.Case]:(()=>{const e={"minecraft:apply_bonus":{enchantment:n({validator:"resource",params:{pool:"enchantment"}}),formula:n({validator:"resource",params:{pool:t.get("loot_table_apply_bonus_formula")}}),parameters:en.Mod(en.ObjectNode({bonusMultiplier:en.Mod(en.NumberNode(),{enabled:e=>"minecraft:uniform_bonus_count"===e.pop().push("formula").get()}),extra:en.Mod(en.NumberNode(),{enabled:e=>"minecraft:binomial_with_bonus_count"===e.pop().push("formula").get()}),probability:en.Mod(en.NumberNode(),{enabled:e=>"minecraft:binomial_with_bonus_count"===e.pop().push("formula").get()})}),{enabled:e=>"minecraft:ore_drops"!==e.push("formula").get()})},"minecraft:copy_name":{source:h},"minecraft:copy_nbt":{source:h,ops:en.ListNode(en.ObjectNode({source:n({validator:"nbt_path",params:{category:{getter:"copy_source",path:["pop","pop","pop",{push:"source"}]}}}),target:n({validator:"nbt_path",params:{category:"minecraft:item"}}),op:n({enum:["replace","append","merge"]})},{context:"nbt_operation"}))},"minecraft:copy_state":{block:n({validator:"resource",params:{pool:"block"}}),properties:en.ListNode(n({validator:"block_state_key",params:{id:["pop","pop",{push:"block"}]}}))},"minecraft:enchant_randomly":{enchantments:en.Opt(en.ListNode(n({validator:"resource",params:{pool:"enchantment"}})))},"minecraft:enchant_with_levels":{levels:nn.Range({allowBinomial:!0}),treasure:en.Opt(en.BooleanNode())},"minecraft:exploration_map":{destination:en.Opt(n({enum:"map_feature"})),decoration:en.Opt(n({enum:"map_decoration"})),zoom:en.Opt(en.NumberNode({integer:!0})),search_radius:en.Opt(en.NumberNode({integer:!0})),skip_existing_chunks:en.Opt(en.BooleanNode())},"minecraft:fill_player_head":{entity:d},"minecraft:limit_count":{limit:nn.Range({bounds:!0})},"minecraft:looting_enchant":{count:nn.Range({bounds:!0}),limit:en.Opt(en.NumberNode({integer:!0}))},"minecraft:set_attributes":{modifiers:en.ListNode(i("attribute_modifier"))},"minecraft:set_contents":{entries:en.ListNode(i("loot_entry"))},"minecraft:set_count":{count:nn.Range({allowBinomial:!0})},"minecraft:set_damage":{damage:nn.Range({forceRange:!0})},"minecraft:set_loot_table":{name:n({validator:"resource",params:{pool:"$loot_table"}}),seed:en.Opt(en.NumberNode({integer:!0}))},"minecraft:set_lore":{entity:en.Opt(d),lore:en.ListNode(i("text_component")),replace:en.Opt(en.BooleanNode())},"minecraft:set_name":{entity:en.Opt(d),name:en.Opt(i("text_component"))},"minecraft:set_nbt":{tag:n({validator:"nbt",params:{registry:{category:"minecraft:item"}}})},"minecraft:set_stew_effect":{effects:en.Opt(en.ListNode(en.ObjectNode({type:n({validator:"resource",params:{pool:"mob_effect"}}),duration:nn.Range()})))}},o={};return t.get("loot_function_type").forEach((t=>{o[t]=s(s({},e[t]),r)})),o})()},{category:"function",context:"function"}),{default:()=>({function:"minecraft:set_count",count:1})})),e.register("loot_condition",en.Mod(en.ObjectNode({condition:l,[en.Switch]:[{push:"condition"}],[en.Case]:c(s({},nn.ConditionCases),{"minecraft:entity_properties":{entity:d,predicate:i("entity_predicate")},"minecraft:entity_scores":{entity:d,scores:en.MapNode(n({validator:"objective"}),nn.Range({bounds:!0}))}})},{category:"predicate",context:"condition"}),{default:()=>({condition:"minecraft:random_chance",chance:.5})})),e.register("attribute_modifier",en.Mod(en.ObjectNode({attribute:n({validator:"resource",params:{pool:"attribute"}}),name:n(),amount:nn.Range({bounds:!0}),operation:n({enum:["addition","multiply_base","multiply_total"]}),slot:en.StringOrList(n({enum:"slot"}))},{context:"attribute_modifier"}),{default:()=>({attribute:"minecraft:generic.max_health",name:"",amount:1,operation:"addition",slot:"mainhand"})}))};var rn={};Object.defineProperty(rn,"__esModule",{value:!0}),rn.initPackMcmetaSchemas=void 0;const on=Pe;rn.initPackMcmetaSchemas=function(e,t){e.register("pack_mcmeta",on.Mod(on.ObjectNode({pack:on.Mod(on.ObjectNode({pack_format:on.Mod(on.NumberNode({integer:!0,min:6,max:6}),{default:()=>6}),description:on.Reference(e,"text_component")}),{default:()=>({pack_format:6,description:""})})}),{default:()=>({pack:{pack_format:6,description:""}})}))};var an={};Object.defineProperty(an,"__esModule",{value:!0}),an.initPredicatesSchemas=void 0;const sn=Pe,cn=Li;an.initPredicatesSchemas=function(e,t){const i=sn.Reference.bind(void 0,e),n=sn.StringNode.bind(void 0,t),r=sn.ChoiceNode([{type:"string",node:n(),change:e=>"boolean"==typeof e||"number"==typeof e?e.toString():""},{type:"number",node:sn.NumberNode(),change:e=>"string"==typeof e?parseInt(e):0},{type:"object",node:sn.ObjectNode({min:sn.Opt(sn.NumberNode({integer:!0})),max:sn.Opt(sn.NumberNode({integer:!0}))}),change:e=>"number"==typeof e?{min:e,max:e}:{}},{type:"boolean",node:sn.BooleanNode(),change:e=>"true"===e||1===e}]);e.register("item_predicate",sn.ObjectNode({item:sn.Opt(n({validator:"resource",params:{pool:"item"}})),tag:sn.Opt(n({validator:"resource",params:{pool:"$tag/item"}})),count:sn.Opt(cn.Range()),durability:sn.Opt(cn.Range()),potion:sn.Opt(n({validator:"resource",params:{pool:"potion"}})),nbt:sn.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"item"}]}}})),enchantments:sn.Opt(sn.ListNode(i("enchantment_predicate")))},{context:"item"})),e.register("enchantment_predicate",sn.ObjectNode({enchantment:sn.Opt(n({validator:"resource",params:{pool:"enchantment"}})),levels:sn.Opt(cn.Range())},{context:"enchantment"})),e.register("block_predicate",sn.ObjectNode({block:sn.Opt(n({validator:"resource",params:{pool:"block"}})),tag:sn.Opt(n({validator:"resource",params:{pool:"$tag/block"}})),nbt:sn.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:block",id:["pop",{push:"block"}]}}})),state:sn.Opt(sn.MapNode(n(),r,{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}}))},{context:"block"})),e.register("fluid_predicate",sn.ObjectNode({fluid:sn.Opt(n({validator:"resource",params:{pool:"fluid"}})),tag:sn.Opt(n({validator:"resource",params:{pool:"$tag/fluid"}})),state:sn.Opt(sn.MapNode(n(),r))},{context:"fluid"})),e.register("location_predicate",sn.ObjectNode({position:sn.Opt(sn.ObjectNode({x:sn.Opt(cn.Range()),y:sn.Opt(cn.Range()),z:sn.Opt(cn.Range())})),biome:sn.Opt(n({validator:"resource",params:{pool:"$worldgen/biome"}})),feature:sn.Opt(n({enum:t.get("worldgen/structure_feature").map((e=>e.slice(10)))})),dimension:sn.Opt(n({validator:"resource",params:{pool:"$dimension"}})),light:sn.Opt(sn.ObjectNode({light:sn.Opt(cn.Range({integer:!0,min:0,max:15}))})),smokey:sn.Opt(sn.BooleanNode()),block:sn.Opt(i("block_predicate")),fluid:sn.Opt(i("fluid_predicate"))},{context:"location"})),e.register("statistic_predicate",sn.ObjectNode({type:n({validator:"resource",params:{pool:"stat_type"}}),stat:n(),value:cn.Range(),[sn.Switch]:[{push:"type"}],[sn.Case]:{"minecraft:mined":{stat:n({validator:"resource",params:{pool:"block"}})},"minecraft:crafted":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:used":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:broken":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:picked_up":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:dropped":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:killed":{stat:n({validator:"resource",params:{pool:"entity_type"}})},"minecraft:killed_by":{stat:n({validator:"resource",params:{pool:"entity_type"}})},"minecraft:custom":{stat:n({validator:"resource",params:{pool:"custom_stat"}})}}})),e.register("player_predicate",sn.ObjectNode({gamemode:sn.Opt(n({enum:"gamemode"})),level:sn.Opt(cn.Range()),advancements:sn.Opt(sn.MapNode(n({validator:"resource",params:{pool:"$advancement"}}),sn.ChoiceNode([{type:"boolean",node:sn.BooleanNode(),change:e=>!0},{type:"object",node:sn.MapNode(n(),sn.BooleanNode())}]))),recipes:sn.Opt(sn.MapNode(n({validator:"resource",params:{pool:"$recipe"}}),sn.BooleanNode())),stats:sn.Opt(sn.ListNode(i("statistic_predicate")))},{context:"player"})),e.register("status_effect_predicate",sn.ObjectNode({amplifier:sn.Opt(cn.Range()),duration:sn.Opt(cn.Range()),ambient:sn.Opt(sn.BooleanNode()),visible:sn.Opt(sn.BooleanNode())},{context:"status_effect"})),e.register("distance_predicate",sn.ObjectNode({x:sn.Opt(cn.Range()),y:sn.Opt(cn.Range()),z:sn.Opt(cn.Range()),absolute:sn.Opt(cn.Range()),horizontal:sn.Opt(cn.Range())},{context:"distance"})),e.register("entity_predicate",sn.ObjectNode({type:sn.Opt(n({validator:"resource",params:{pool:"entity_type",allowTag:!0}})),nbt:sn.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:entity",id:["pop",{push:"type"}]}}})),team:sn.Opt(n({validator:"team"})),location:sn.Opt(i("location_predicate")),distance:sn.Opt(i("distance_predicate")),flags:sn.Opt(sn.ObjectNode({is_on_fire:sn.Opt(sn.BooleanNode()),is_sneaking:sn.Opt(sn.BooleanNode()),is_sprinting:sn.Opt(sn.BooleanNode()),is_swimming:sn.Opt(sn.BooleanNode()),is_baby:sn.Opt(sn.BooleanNode())})),equipment:sn.Opt(sn.MapNode(n({enum:"slot"}),i("item_predicate"))),vehicle:sn.Opt(i("entity_predicate")),targeted_entity:sn.Opt(i("entity_predicate")),player:sn.Opt(i("player_predicate")),fishing_hook:sn.Opt(sn.ObjectNode({in_open_water:sn.Opt(sn.BooleanNode())})),effects:sn.Opt(sn.MapNode(n({validator:"resource",params:{pool:"mob_effect"}}),i("status_effect_predicate")))},{context:"entity"})),e.register("damage_source_predicate",sn.ObjectNode({is_explosion:sn.Opt(sn.BooleanNode()),is_fire:sn.Opt(sn.BooleanNode()),is_magic:sn.Opt(sn.BooleanNode()),is_projectile:sn.Opt(sn.BooleanNode()),is_lightning:sn.Opt(sn.BooleanNode()),bypasses_armor:sn.Opt(sn.BooleanNode()),bypasses_invulnerability:sn.Opt(sn.BooleanNode()),bypasses_magic:sn.Opt(sn.BooleanNode()),source_entity:sn.Opt(i("entity_predicate")),direct_entity:sn.Opt(i("entity_predicate"))},{context:"damage_source"})),e.register("damage_predicate",sn.ObjectNode({dealt:sn.Opt(cn.Range()),taken:sn.Opt(cn.Range()),blocked:sn.Opt(sn.BooleanNode()),source_entity:sn.Opt(i("entity_predicate")),type:sn.Opt(i("damage_source_predicate"))},{context:"damage"}))};var ln={};Object.defineProperty(ln,"__esModule",{value:!0}),ln.initRecipeSchemas=void 0;const un=Pe;ln.initRecipeSchemas=function(e,t){const i=un.Reference.bind(void 0,e),n=un.StringNode.bind(void 0,t);e.register("recipe",un.Mod(un.ObjectNode({type:n({validator:"resource",params:{pool:"recipe_serializer"}}),[un.Switch]:[{push:"type"}],[un.Case]:{"minecraft:crafting_shaped":{group:un.Opt(n({enum:"recipe_group",additional:!0})),pattern:un.ListNode(n()),key:un.MapNode(n(),i("recipe_ingredient")),result:i("recipe_result")},"minecraft:crafting_shapeless":{group:un.Opt(n()),ingredients:un.ListNode(i("recipe_ingredient")),result:i("recipe_result")},"minecraft:smelting":{group:un.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:un.Opt(un.NumberNode()),cookingtime:un.Opt(un.Mod(un.NumberNode({integer:!0}),{default:()=>200}))},"minecraft:blasting":{group:un.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:un.Opt(un.NumberNode()),cookingtime:un.Opt(un.Mod(un.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:smoking":{group:un.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:un.Opt(un.NumberNode()),cookingtime:un.Opt(un.Mod(un.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:campfire_cooking":{group:un.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:un.Opt(un.NumberNode()),cookingtime:un.Opt(un.Mod(un.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:stonecutting":{group:un.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),count:un.NumberNode({integer:!0})},"minecraft:smithing":{group:un.Opt(n()),base:i("recipe_ingredient_object"),addition:i("recipe_ingredient_object"),result:i("recipe_result")}}},{context:"recipe",disableSwitchContext:!0}),{default:()=>({type:"minecraft:crafting_shaped"})})),e.register("recipe_ingredient",un.Mod(un.ChoiceNode([{type:"object",node:i("recipe_ingredient_object"),change:e=>e[0]},{type:"list",node:un.ListNode(i("recipe_ingredient_object")),change:e=>[e]}]),{default:()=>({item:"minecraft:stone"})})),e.register("recipe_ingredient_object",un.Mod(un.ObjectNode({item:un.Opt(n({validator:"resource",params:{pool:"item"}})),tag:un.Opt(n({validator:"resource",params:{pool:"$tag/item"}}))}),{default:()=>({item:"minecraft:stone"})})),e.register("recipe_result",un.Mod(un.ObjectNode({item:n({validator:"resource",params:{pool:"item"}}),count:un.Opt(un.Mod(un.NumberNode({integer:!0}),{default:()=>1}))}),{default:()=>({item:"minecraft:stone"})}))};var dn={};Object.defineProperty(dn,"__esModule",{value:!0}),dn.initTagsSchemas=void 0;const hn=Pe;dn.initTagsSchemas=function(e,t){const i=hn.StringNode.bind(void 0,t),n=e=>hn.Mod(hn.ObjectNode({replace:hn.Opt(hn.BooleanNode()),values:hn.ListNode(hn.ChoiceNode([{type:"string",node:i({validator:"resource",params:{pool:e,allowTag:!0}}),change:e=>e.id},{type:"object",node:hn.ObjectNode({id:i({validator:"resource",params:{pool:e,allowTag:!0,allowUnknown:!0}}),required:hn.BooleanNode()}),change:e=>({id:e})}]))},{context:"tag"}),{default:()=>({values:[]})});e.register("block_tag",n("block")),e.register("entity_type_tag",n("entity_type")),e.register("fluid_tag",n("fluid")),e.register("function_tag",n("$function")),e.register("item_tag",n("item"))};var pn={};Object.defineProperty(pn,"__esModule",{value:!0}),pn.initTextComponentSchemas=void 0;const mn=Pe;pn.initTextComponentSchemas=function(e,t){const i=mn.Reference.bind(void 0,e),n=mn.StringNode.bind(void 0,t),r=e=>{var t;return e instanceof Array?r(e[0]):null!==(t=null==e?void 0:e.text)&&void 0!==t?t:"object"==typeof e?"":null==e?void 0:e.toString()};e.register("text_component",mn.Mod(mn.ChoiceNode([{type:"object",node:i("text_component_object"),change:e=>e instanceof Array?"object"==typeof e[0]?e[0]:{text:r(e[0])}:"object"==typeof e?e:{text:r(e)}},{type:"list",node:i("text_component_list"),change:e=>[e]},{type:"string",priority:1,node:n(),change:r},{type:"number",node:mn.NumberNode(),change:e=>{const t=parseFloat(r(e));return isFinite(t)?t:e?1:0}},{type:"boolean",node:mn.BooleanNode(),change:e=>{const t=r(e);return"true"===t||"false"===t?"true"===t:!!t}}],{context:"text_component"}),{default:()=>({text:""})}));const o={color:mn.Opt(n()),font:mn.Opt(n()),bold:mn.Opt(mn.BooleanNode()),italic:mn.Opt(mn.BooleanNode()),underlined:mn.Opt(mn.BooleanNode()),strikethrough:mn.Opt(mn.BooleanNode()),obfuscated:mn.Opt(mn.BooleanNode()),insertion:mn.Opt(n()),clickEvent:mn.Opt(mn.ObjectNode({action:n({enum:["open_url","open_file","run_command","suggest_command","change_page","copy_to_clipboard"]}),[mn.Switch]:[{push:"action"}],[mn.Case]:{change_page:{value:n()},copy_to_clipboard:{value:n()},open_file:{value:n()},open_url:{value:n()},run_command:{value:n({validator:"command",params:{leadingSlash:!0,allowPartial:!0}})},suggest_command:{value:n({validator:"command",params:{leadingSlash:!0,allowPartial:!0}})}}})),hoverEvent:mn.Opt(mn.ObjectNode({action:n({enum:["show_text","show_item","show_entity"]}),[mn.Switch]:[{push:"action"}],[mn.Case]:{show_text:{value:mn.Opt(i("text_component")),contents:mn.Opt(i("text_component"))},show_item:{value:mn.Opt(n({validator:"nbt",params:{module:"util::InventoryItem"}})),contents:mn.Opt(mn.ObjectNode({id:n({validator:"resource",params:{pool:"item"}}),count:mn.Opt(mn.NumberNode({integer:!0})),tag:mn.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"id"}]}}}))}))},show_entity:{value:mn.Opt(mn.ObjectNode({name:mn.Opt(n()),type:mn.Opt(n()),id:mn.Opt(n())})),contents:mn.Opt(mn.Mod(mn.ObjectNode({name:mn.Opt(i("text_component")),type:n({validator:"resource",params:{pool:"entity_type"}}),id:n({validator:"uuid"})}),{default:()=>({type:"minecraft:pig",id:"00000001-0001-0001-0001-000000000001"})}))}}})),extra:mn.Opt(i("text_component_list"))};e.register("text_component_object",mn.Mod(mn.ChoiceNode([{type:"text",match:e=>"object"==typeof e,change:e=>({text:""}),priority:-1,node:mn.ObjectNode(s({text:n()},o))},{type:"translation",match:e=>void 0!==(null==e?void 0:e.translate),change:e=>({translate:""}),node:mn.ObjectNode(s({translate:n(),with:mn.Opt(i("text_component_list"))},o))},{type:"score",match:e=>void 0!==(null==e?void 0:e.score),change:e=>({score:{}}),node:mn.ObjectNode(s({score:mn.ObjectNode({name:n({validator:"entity",params:{amount:"single",type:"entities",isScoreHolder:!0}}),objective:n({validator:"objective"}),value:mn.Opt(n())})},o))},{type:"selector",match:e=>void 0!==(null==e?void 0:e.selector),change:e=>({selector:""}),node:mn.ObjectNode(s({selector:n({validator:"entity",params:{amount:"multiple",type:"entities"}})},o))},{type:"keybind",match:e=>void 0!==(null==e?void 0:e.keybind),change:e=>({keybind:""}),node:mn.ObjectNode(s({keybind:n({enum:"keybind",additional:!0})},o))},{type:"nbt",match:e=>void 0!==(null==e?void 0:e.nbt),change:e=>({nbt:""}),node:mn.ObjectNode(s({nbt:n({validator:"nbt_path"}),block:mn.Opt(n({validator:"vector",params:{dimension:3,isInteger:!0}})),entity:mn.Opt(n({validator:"entity",params:{amount:"multiple",type:"entities"}})),storage:mn.Opt(n({validator:"resource",params:{pool:"$storage"}})),interpret:mn.Opt(mn.BooleanNode())},o))}],{context:"text_component_object",choiceContext:"text_component.object"}),{default:()=>({text:""})})),e.register("text_component_list",mn.Mod(mn.ListNode(i("text_component")),{default:()=>[{text:""}]}))};var fn={},gn={};Object.defineProperty(gn,"__esModule",{value:!0}),gn.initBiomeSchemas=void 0;const _n=Pe;gn.initBiomeSchemas=function(e,t){const i=_n.StringNode.bind(void 0,t);e.register("biome",_n.Mod(_n.ObjectNode({surface_builder:i({validator:"resource",params:{pool:"$worldgen/configured_surface_builder"}}),depth:_n.NumberNode(),scale:_n.NumberNode(),temperature:_n.NumberNode(),downfall:_n.NumberNode(),precipitation:i({enum:["none","rain","snow"]}),temperature_modifier:_n.Opt(i({enum:["none","frozen"]})),category:i({enum:"biome_category"}),player_spawn_friendly:_n.Opt(_n.BooleanNode()),creature_spawn_probability:_n.Opt(_n.NumberNode({min:0,max:1})),effects:_n.ObjectNode({sky_color:_n.NumberNode({color:!0}),fog_color:_n.NumberNode({color:!0}),water_color:_n.NumberNode({color:!0}),water_fog_color:_n.NumberNode({color:!0}),grass_color:_n.Opt(_n.NumberNode({color:!0})),foliage_color:_n.Opt(_n.NumberNode({color:!0})),grass_color_modifier:_n.Opt(i({enum:["none","dark_forest","swamp"]})),ambient_sound:_n.Opt(i()),mood_sound:_n.Opt(_n.ObjectNode({sound:i(),tick_delay:_n.NumberNode({integer:!0}),block_search_extent:_n.NumberNode({integer:!0}),offset:_n.NumberNode()})),additions_sound:_n.Opt(_n.ObjectNode({sound:i(),tick_chance:_n.NumberNode({min:0,max:1})})),music:_n.Opt(_n.ObjectNode({sound:i(),min_delay:_n.NumberNode({integer:!0,min:0}),max_delay:_n.NumberNode({integer:!0,min:0}),replace_current_music:_n.BooleanNode()})),particle:_n.Opt(_n.ObjectNode({options:_n.ObjectNode({type:i()}),probability:_n.NumberNode({min:0,max:1})}))}),starts:_n.ListNode(i({validator:"resource",params:{pool:"$worldgen/configured_structure_feature"}})),spawners:_n.MapNode(i({enum:["water_ambient","ambient","misc","water_creature","creature","monster"]}),_n.Mod(_n.ListNode(_n.ObjectNode({type:i({validator:"resource",params:{pool:"entity_type"}}),weight:_n.NumberNode({integer:!0}),minCount:_n.NumberNode({integer:!0}),maxCount:_n.NumberNode({integer:!0})})),{category:()=>"pool",default:()=>[{type:"minecraft:bat",weight:1}]})),spawn_costs:_n.MapNode(i({validator:"resource",params:{pool:"entity_type"}}),_n.Mod(_n.ObjectNode({energy_budget:_n.NumberNode(),charge:_n.NumberNode()},{category:"function"}),{default:()=>({energy_budget:.12,charge:1})})),carvers:_n.MapNode(i({enum:["air","liquid"]}),_n.Mod(_n.ListNode(i({validator:"resource",params:{pool:"$worldgen/configured_carver"}})),{default:()=>["minecraft:cave"]})),features:_n.ListNode(_n.Mod(_n.ListNode(i({validator:"resource",params:{pool:"$worldgen/configured_feature"}})),{category:()=>"predicate"}),{maxLength:10})},{context:"biome"}),{default:()=>({surface_builder:"minecraft:grass",depth:.125,scale:.05,temperature:.8,downfall:.4,precipitation:"rain",category:"plains",effects:{sky_color:7907327,fog_color:12638463,water_color:4159204,water_fog_color:329011}})}))};var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.initCarverSchemas=void 0;const vn=Pe;bn.initCarverSchemas=function(e,t){const i=vn.StringNode.bind(void 0,t);e.register("configured_carver",vn.Mod(vn.ObjectNode({type:i({validator:"resource",params:{pool:"worldgen/carver"}}),config:vn.ObjectNode({probability:vn.NumberNode({min:0,max:1})})},{context:"carver"}),{default:()=>({type:"minecraft:cave",config:{probability:.1}})}))};var yn={};Object.defineProperty(yn,"__esModule",{value:!0}),yn.initDecoratorSchemas=void 0;const wn=Pe,xn=Li;yn.initDecoratorSchemas=function(e,t){const i=wn.Reference.bind(void 0,e),n=wn.StringNode.bind(void 0,t),r={maximum:wn.NumberNode({integer:!0}),bottom_offset:wn.NumberNode({integer:!0}),top_offset:wn.NumberNode({integer:!0})},o={chance:wn.NumberNode({integer:!0,min:0})},a={count:xn.UniformInt({min:-10,max:128,maxSpread:128})};e.register("configured_decorator",wn.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/decorator"}}),config:wn.ObjectNode({[wn.Switch]:["pop",{push:"type"}],[wn.Case]:{"minecraft:carving_mask":{step:n({enum:"generation_step"}),probability:wn.NumberNode({min:0,max:1})},"minecraft:chance":o,"minecraft:count":a,"minecraft:count_extra":{count:wn.NumberNode({integer:!0}),extra_count:wn.NumberNode({integer:!0}),extra_chance:wn.NumberNode({min:0,max:1})},"minecraft:count_multilayer":a,"minecraft:count_noise":{noise_level:wn.NumberNode(),below_noise:wn.NumberNode({integer:!0}),above_noise:wn.NumberNode({integer:!0})},"minecraft:count_noise_biased":{noise_to_count_ratio:wn.NumberNode({integer:!0}),noise_factor:wn.NumberNode(),noise_offset:wn.Opt(wn.NumberNode())},"minecraft:decorated":{outer:i("configured_decorator"),inner:i("configured_decorator")},"minecraft:depth_average":{baseline:wn.NumberNode({integer:!0}),spread:wn.NumberNode({integer:!0})},"minecraft:fire":a,"minecraft:glowstone":a,"minecraft:lava_lake":o,"minecraft:range":r,"minecraft:range_biased":r,"minecraft:range_very_biased":r,"minecraft:water_lake":o}},{context:"decorator",category:"predicate"})},{context:"decorator",category:"predicate"}))};var Nn={},kn={};Object.defineProperty(kn,"__esModule",{value:!0}),kn.initProcessorListSchemas=void 0;const An=Pe;kn.initProcessorListSchemas=function(e,t){const i=An.Reference.bind(void 0,e),n=An.StringNode.bind(void 0,t);e.register("processor_list",An.Mod(An.ObjectNode({processors:An.ListNode(i("processor"))},{context:"processor_list"}),{default:()=>({processors:[{processor_type:"minecraft:rule",rules:[{location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}}]}]})})),e.register("processor",An.Mod(An.ObjectNode({processor_type:n({validator:"resource",params:{pool:"worldgen/structure_processor"}}),[An.Switch]:[{push:"processor_type"}],[An.Case]:{"minecraft:block_age":{mossiness:An.NumberNode()},"minecraft:block_ignore":{blocks:An.ListNode(i("block_state"))},"minecraft:block_rot":{integrity:An.NumberNode({min:0,max:1})},"minecraft:gravity":{heightmap:n({enum:"heightmap_type"}),offset:An.NumberNode({integer:!0})},"minecraft:rule":{rules:An.ListNode(i("processor_rule"))}}},{category:"function",context:"processor"}),{default:()=>({processor_type:"minecraft:rule",rules:[{location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}}]})})),e.register("processor_rule",An.Mod(An.ObjectNode({position_predicate:An.Opt(i("pos_rule_test")),location_predicate:i("rule_test"),input_predicate:i("rule_test"),output_state:i("block_state"),output_nbt:An.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:block"}}}))},{category:"predicate",context:"processor_rule"}),{default:()=>({location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}})}));const r={min_dist:An.NumberNode({min:0,max:255,integer:!0}),max_dist:An.NumberNode({min:0,max:255,integer:!0}),min_chance:An.NumberNode({min:0,max:1}),max_chance:An.NumberNode({min:0,max:1})};e.register("pos_rule_test",An.ObjectNode({predicate_type:n({validator:"resource",params:{pool:"pos_rule_test"}}),[An.Switch]:[{push:"predicate_type"}],[An.Case]:{"minecraft:axis_aligned_linear_pos":s({axis:n({enum:["x","y","z"]})},r),"minecraft:linear_pos":r}},{context:"pos_rule_test",disableSwitchContext:!0})),e.register("rule_test",An.ObjectNode({predicate_type:n({validator:"resource",params:{pool:"rule_test"}}),[An.Switch]:[{push:"predicate_type"}],[An.Case]:{"minecraft:block_match":{block:n({validator:"resource",params:{pool:"block"}})},"minecraft:blockstate_match":{block_state:i("block_state")},"minecraft:random_block_match":{block:n({validator:"resource",params:{pool:"block"}}),probability:An.NumberNode({min:0,max:1})},"minecraft:random_blockstate_match":{block_state:i("block_state"),probability:An.NumberNode({min:0,max:1})},"minecraft:tag_match":{tag:n({validator:"resource",params:{pool:"$tag/block"}})}}},{context:"rule_test",disableSwitchContext:!0}))},Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.initFeatureSchemas=void 0;const Cn=Pe,On=Li;Nn.initFeatureSchemas=function(e,t){const i=Cn.Reference.bind(void 0,e),n=Cn.StringNode.bind(void 0,t),r={can_replace:Cn.BooleanNode(),project:Cn.BooleanNode(),need_water:Cn.BooleanNode(),xspread:Cn.NumberNode({integer:!0}),yspread:Cn.NumberNode({integer:!0}),zspread:Cn.NumberNode({integer:!0}),tries:Cn.NumberNode({integer:!0}),state_provider:i("block_state_provider"),block_placer:i("block_placer"),whitelist:Cn.ListNode(i("block_state")),blacklist:Cn.ListNode(i("block_state"))},o={state:i("block_state"),radius:On.UniformInt({min:0,max:4,maxSpread:4}),half_height:Cn.NumberNode({integer:!0,min:0,max:4}),targets:Cn.ListNode(i("block_state"))},a={cap_provider:i("block_state_provider"),stem_provider:i("block_state_provider"),foliage_radius:Cn.Opt(Cn.NumberNode({integer:!0}))},s={state:i("block_state"),size:Cn.NumberNode({integer:!0,min:0,max:64}),target:i("rule_test")},c={count:On.UniformInt({min:-10,max:128,maxSpread:128})},l=Cn.ChoiceNode([{type:"string",node:n({validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:i("configured_feature")}],{choiceContext:"feature"});e.register("configured_feature",Cn.Mod(Cn.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/feature"}}),config:Cn.ObjectNode({[Cn.Switch]:["pop",{push:"type"}],[Cn.Case]:{"minecraft:bamboo":{probability:Cn.NumberNode({min:0,max:1})},"minecraft:basalt_columns":{reach:On.UniformInt({min:0,max:2,maxSpread:1}),height:On.UniformInt({min:1,max:5,maxSpread:5})},"minecraft:block_pile":{state_provider:i("block_state_provider")},"minecraft:decorated":{decorator:i("configured_decorator"),feature:l},"minecraft:delta_feature":{contents:i("block_state"),rim:i("block_state"),size:On.UniformInt({min:0,max:8,maxSpread:8}),rim_size:On.UniformInt({min:0,max:8,maxSpread:8})},"minecraft:disk":o,"minecraft:emerald_ore":{state:i("block_state"),target:i("block_state")},"minecraft:end_gateway":{exact:Cn.BooleanNode(),exit:Cn.Opt(i("block_pos"))},"minecraft:end_spike":{crystal_invulnerable:Cn.Opt(Cn.BooleanNode()),crystal_beam_target:Cn.Opt(i("block_pos")),spikes:Cn.ListNode(Cn.ObjectNode({centerX:Cn.Opt(Cn.NumberNode({integer:!0})),centerZ:Cn.Opt(Cn.NumberNode({integer:!0})),radius:Cn.Opt(Cn.NumberNode({integer:!0})),height:Cn.Opt(Cn.NumberNode({integer:!0})),guarded:Cn.Opt(Cn.BooleanNode())}))},"minecraft:fill_layer":{state:i("block_state"),height:Cn.NumberNode({integer:!0,min:0,max:255})},"minecraft:flower":r,"minecraft:forest_rock":{state:i("block_state")},"minecraft:huge_brown_mushroom":a,"minecraft:huge_fungus":{hat_state:i("block_state"),decor_state:i("block_state"),stem_state:i("block_state"),valid_base_block:i("block_state"),planted:Cn.Opt(Cn.BooleanNode())},"minecraft:huge_red_mushroom":a,"minecraft:ice_patch":o,"minecraft:iceberg":{state:i("block_state")},"minecraft:lake":{state:i("block_state")},"minecraft:nether_forest_vegetation":{state_provider:i("block_state_provider")},"minecraft:netherrack_replace_blobs":{state:i("block_state"),target:i("block_state"),radius:On.UniformInt()},"minecraft:no_bonemeal_flower":r,"minecraft:no_surface_ore":s,"minecraft:ore":s,"minecraft:random_patch":r,"minecraft:random_boolean_selector":{feature_false:l,feature_true:l},"minecraft:random_selector":{features:Cn.ListNode(Cn.ObjectNode({chance:Cn.NumberNode({min:0,max:1}),feature:l})),default:l},"minecraft:sea_pickle":c,"minecraft:seagrass":{probability:Cn.NumberNode({min:0,max:1})},"minecraft:simple_block":{to_place:i("block_state"),place_on:Cn.ListNode(i("block_state")),place_in:Cn.ListNode(i("block_state")),place_under:Cn.ListNode(i("block_state"))},"minecraft:simple_random_selector":{features:Cn.ListNode(l)},"minecraft:spring_feature":{state:i("fluid_state"),rock_count:Cn.NumberNode({integer:!0}),hole_count:Cn.NumberNode({integer:!0}),requires_block_below:Cn.BooleanNode(),valid_blocks:Cn.ListNode(n({validator:"resource",params:{pool:"block"}}))},"minecraft:tree":{max_water_depth:Cn.NumberNode({integer:!0}),ignore_vines:Cn.BooleanNode(),heightmap:n({enum:"heightmap_type"}),minimum_size:i("feature_size"),trunk_provider:i("block_state_provider"),leaves_provider:i("block_state_provider"),trunk_placer:Cn.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/trunk_placer_type"}}),base_height:Cn.NumberNode({integer:!0,min:0,max:32}),height_rand_a:Cn.NumberNode({integer:!0,min:0,max:24}),height_rand_b:Cn.NumberNode({integer:!0,min:0,max:24})},{context:"trunk_placer"}),foliage_placer:Cn.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/foliage_placer_type"}}),radius:On.UniformInt({min:0,max:8,maxSpread:8}),offset:On.UniformInt({min:0,max:8,maxSpread:8}),[Cn.Switch]:[{push:"type"}],[Cn.Case]:{"minecraft:blob_foliage_placer":{height:Cn.NumberNode({integer:!0,min:0,max:16})},"minecraft:bush_foliage_placer":{height:Cn.NumberNode({integer:!0,min:0,max:16})},"minecraft:fancy_foliage_placer":{height:Cn.NumberNode({integer:!0,min:0,max:16})},"minecraft:jungle_foliage_placer":{height:Cn.NumberNode({integer:!0,min:0,max:16})},"minecraft:mega_pine_foliage_placer":{crown_height:On.UniformInt({min:0,max:16,maxSpread:8})},"minecraft:pine_foliage_placer":{height:On.UniformInt({min:0,max:16,maxSpread:8})},"minecraft:spruce_foliage_placer":{trunk_height:On.UniformInt({min:0,max:16,maxSpread:8})}}},{context:"foliage_placer",disableSwitchContext:!0}),decorators:Cn.ListNode(Cn.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/tree_decorator_type"}}),[Cn.Switch]:[{push:"type"}],[Cn.Case]:{"minecraft:alter_ground":{provider:i("block_state_provider")},"minecraft:beehive":{probability:Cn.NumberNode({min:0,max:1})},"minecraft:cocoa":{probability:Cn.NumberNode({min:0,max:1})}}},{context:"tree_decorator"}))}}},{context:"feature"})},{context:"feature"}),{default:()=>({type:"minecraft:decorated",config:{decorator:{type:"minecraft:count",config:{count:4}},feature:{type:"minecraft:tree",config:{max_water_depth:0,ignore_vines:!0,minimum_size:{},trunk_placer:{base_height:5,height_rand_a:2,height_rand_b:0},foliage_placer:{radius:2,offset:0,height:3}}}}})})),e.register("feature_size",Cn.Mod(Cn.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/feature_size_type"}}),min_clipped_height:Cn.Opt(Cn.NumberNode({min:0,max:80})),[Cn.Switch]:[{push:"type"}],[Cn.Case]:{"minecraft:two_layers_feature_size":{limit:Cn.Opt(Cn.NumberNode({integer:!0,min:0,max:81})),lower_size:Cn.Opt(Cn.NumberNode({integer:!0,min:0,max:16})),upper_size:Cn.Opt(Cn.NumberNode({integer:!0,min:0,max:16}))},"minecraft:three_layers_feature_size":{limit:Cn.Opt(Cn.NumberNode({integer:!0,min:0,max:80})),upper_limit:Cn.Opt(Cn.NumberNode({integer:!0,min:0,max:80})),lower_size:Cn.Opt(Cn.NumberNode({integer:!0,min:0,max:16})),middle_size:Cn.Opt(Cn.NumberNode({integer:!0,min:0,max:16})),upper_size:Cn.Opt(Cn.NumberNode({integer:!0,min:0,max:16}))}}},{disableSwitchContext:!0}),{default:()=>({type:"minecraft:two_layers_feature_size"})})),e.register("block_state_provider",Cn.Mod(Cn.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/block_state_provider_type"}}),[Cn.Switch]:[{push:"type"}],[Cn.Case]:{"minecraft:rotated_block_provider":{state:i("block_state")},"minecraft:simple_state_provider":{state:i("block_state")},"minecraft:weighted_state_provider":{entries:Cn.ListNode(Cn.Mod(Cn.ObjectNode({weight:Cn.NumberNode({integer:!0,min:1}),data:i("block_state")}),{default:()=>({data:{}})}))}}},{context:"block_state_provider"}),{default:()=>({type:"minecraft:simple_state_provider"})})),e.register("block_placer",Cn.Mod(Cn.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/block_placer_type"}}),[Cn.Switch]:[{push:"type"}],[Cn.Case]:{"minecraft:column_placer":{min_size:Cn.NumberNode({integer:!0}),extra_size:Cn.NumberNode({integer:!0})}}},{context:"block_placer"}),{default:()=>({type:"minecraft:simple_block_placer"})}))};var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.initNoiseSettingsSchemas=void 0;const En=Pe,Fn=Li;Sn.initNoiseSettingsSchemas=function(e,t){const i=En.Reference.bind(void 0,e),n=En.StringNode.bind(void 0,t);e.register("noise_settings",En.Mod(En.ObjectNode({name:En.Mod(n({validator:"resource",params:{pool:"$worldgen/noise_settings",isDefinition:!0}}),{enabled:e=>e.getArray().length>0}),bedrock_roof_position:En.NumberNode({integer:!0}),bedrock_floor_position:En.NumberNode({integer:!0}),sea_level:En.NumberNode({integer:!0}),disable_mob_generation:En.BooleanNode(),default_block:i("block_state"),default_fluid:i("block_state"),noise:En.ObjectNode({height:En.NumberNode({integer:!0}),density_factor:En.NumberNode(),density_offset:En.NumberNode(),size_horizontal:En.NumberNode({integer:!0}),size_vertical:En.NumberNode({integer:!0}),simplex_surface_noise:En.BooleanNode(),random_density_offset:En.Opt(En.BooleanNode()),island_noise_override:En.Opt(En.BooleanNode()),amplified:En.Opt(En.BooleanNode()),sampling:En.ObjectNode({xz_scale:En.NumberNode(),y_scale:En.NumberNode(),xz_factor:En.NumberNode(),y_factor:En.NumberNode()}),bottom_slide:En.ObjectNode({target:En.NumberNode({integer:!0}),size:En.NumberNode({integer:!0}),offset:En.NumberNode({integer:!0})}),top_slide:En.ObjectNode({target:En.NumberNode({integer:!0}),size:En.NumberNode({integer:!0}),offset:En.NumberNode({integer:!0})})}),structures:i("generator_structures")},{context:"noise_settings"}),{default:()=>Fn.DefaultNoiseSettings})),e.register("generator_structures",En.ObjectNode({stronghold:En.Opt(En.ObjectNode({distance:En.NumberNode({integer:!0,min:0,max:1023}),spread:En.NumberNode({integer:!0,min:0,max:1023}),count:En.NumberNode({integer:!0,min:1,max:4095})})),structures:En.MapNode(n({validator:"resource",params:{pool:"worldgen/structure_feature"}}),En.Mod(En.ObjectNode({spacing:En.NumberNode({integer:!0,min:0,max:4096}),separation:En.Mod(En.NumberNode({integer:!0,min:0,max:4096}),(e=>({validate:(t,i,n,r)=>(t.pop().push("spacing").get()<=i&&n.add(t,"error.separation_smaller_spacing"),e.validate(t,i,n,r))}))),salt:En.NumberNode({integer:!0,min:0})},{context:"generator_structure"}),{default:()=>({spacing:10,separation:5,salt:0})}))})),e.register("generator_layer",En.Mod(En.ObjectNode({block:n({validator:"resource",params:{pool:"block"}}),height:En.NumberNode({integer:!0,min:1})}),{default:()=>({block:"minecraft:stone",height:1})}))};var Dn={};Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.initStructureFeatureSchemas=void 0;const Bn=Pe;Dn.initStructureFeatureSchemas=function(e,t){const i=Bn.StringNode.bind(void 0,t),n={start_pool:i({validator:"resource",params:{pool:"$worldgen/template_pool"}}),size:Bn.NumberNode({integer:!0})};e.register("configured_structure_feature",Bn.Mod(Bn.ObjectNode({type:i({validator:"resource",params:{pool:"worldgen/structure_feature"}}),config:Bn.ObjectNode({[Bn.Switch]:["pop",{push:"type"}],[Bn.Case]:{"minecraft:bastion_remnant":n,"minecraft:buried_treasure":{probability:Bn.NumberNode({min:0,max:1})},"minecraft:mineshaft":{type:i({enum:["normal","mesa"]}),probability:Bn.NumberNode({min:0,max:1})},"minecraft:ocean_ruin":{biome_temp:i({enum:["cold","warm"]}),large_probability:Bn.NumberNode({min:0,max:1}),cluster_probability:Bn.NumberNode({min:0,max:1})},"minecraft:pillager_outpost":n,"minecraft:ruined_portal":{portal_type:i({enum:["standard","desert","jungle","mountain","nether","ocean","swamp"]})},"minecraft:shipwreck":{is_beached:Bn.Opt(Bn.BooleanNode())},"minecraft:village":n}},{context:"structure_feature",disableSwitchContext:!0})},{context:"structure_feature"}),{default:()=>({type:"minecraft:bastion_remnant",config:{start_pool:"minecraft:bastion/starts",size:6}})}))};var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.initSurfaceBuilderSchemas=void 0;const Mn=Pe;Ln.initSurfaceBuilderSchemas=function(e,t){const i=Mn.StringNode.bind(void 0,t),n=Mn.Reference.bind(void 0,e);e.register("configured_surface_builder",Mn.Mod(Mn.ObjectNode({type:i({validator:"resource",params:{pool:"worldgen/surface_builder"}}),config:Mn.ObjectNode({top_material:n("block_state"),under_material:n("block_state"),underwater_material:n("block_state")},{context:"surface_builder"})},{context:"surface_builder"}),{default:()=>({type:"minecraft:default",config:{top_material:{Name:"minecraft:grass_block",Properties:{snowy:"false"}},under_material:{Name:"minecraft:dirt"},underwater_material:{Name:"minecraft:gravel"}}})}))};var Tn={};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.initTemplatePoolSchemas=void 0;const Rn=Pe;Tn.initTemplatePoolSchemas=function(e,t){const i=Rn.Reference.bind(void 0,e),n=Rn.StringNode.bind(void 0,t),r=Rn.ChoiceNode([{type:"string",node:n({validator:"resource",params:{pool:"$worldgen/processor_list"}}),change:e=>{}},{type:"object",node:i("processor_list"),change:e=>({processors:[{processor_type:"minecraft:nop"}]})}]);e.register("template_pool",Rn.Mod(Rn.ObjectNode({name:n(),fallback:n(),elements:Rn.ListNode(i("template_weighted_element"))},{context:"template_pool"}),{default:()=>({fallback:"minecraft:empty",elements:[{weight:1,element:{element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"}}]})})),e.register("template_weighted_element",Rn.Mod(Rn.ObjectNode({weight:Rn.NumberNode({integer:!0,min:1}),element:i("template_element")},{category:"pool"}),{default:()=>({weight:1,element:{element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"}})})),e.register("template_element",Rn.Mod(Rn.ObjectNode({element_type:n({validator:"resource",params:{pool:"worldgen/structure_pool_element"}}),projection:n({enum:["rigid","terrain_matching"]}),[Rn.Switch]:[{push:"element_type"}],[Rn.Case]:{"minecraft:feature_pool_element":{feature:n({validator:"resource",params:{pool:"$worldgen/configured_feature"}})},"minecraft:legacy_single_pool_element":{location:n({validator:"resource",params:{pool:"$structure"}}),processors:r},"minecraft:list_pool_element":{elements:Rn.ListNode(i("template_element"))},"minecraft:single_pool_element":{location:n({validator:"resource",params:{pool:"$structure"}}),processors:r}}},{context:"template_element",disableSwitchContext:!0}),{default:()=>({element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"})}))},Object.defineProperty(fn,"__esModule",{value:!0}),fn.initWorldgenSchemas=void 0;const $n=gn,jn=bn,In=yn,Pn=Nn,zn=Sn,Un=kn,Wn=Dn,Hn=Ln,qn=Tn;fn.initWorldgenSchemas=function(e,t){$n.initBiomeSchemas(e,t),jn.initCarverSchemas(e,t),In.initDecoratorSchemas(e,t),Pn.initFeatureSchemas(e,t),zn.initNoiseSettingsSchemas(e,t),Un.initProcessorListSchemas(e,t),Wn.initStructureFeatureSchemas(e,t),Hn.initSurfaceBuilderSchemas(e,t),qn.initTemplatePoolSchemas(e,t)};var Vn={};Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.initWorldSettingsSchemas=void 0;const Gn=Pe;Vn.initWorldSettingsSchemas=function(e,t){const i=Gn.Reference.bind(void 0,e),n=Gn.StringNode.bind(void 0,t);e.register("world_settings",Gn.Mod(Gn.ObjectNode({generate_features:Gn.BooleanNode(),bonus_chest:Gn.BooleanNode(),seed:Gn.NumberNode({integer:!0}),dimensions:Gn.MapNode(n({validator:"resource",params:{pool:"$dimension"}}),i("dimension"))},{context:"world_settings"}),{default:()=>{const e=Math.floor(4294967296*Math.random())-2147483648;return{generate_features:!0,bonus_chest:!1,seed:e,dimensions:{"minecraft:overworld":{type:"minecraft:overworld",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:vanilla_layered",seed:e},settings:"minecraft:overworld"}},"minecraft:the_nether":{type:"minecraft:the_nether",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:multi_noise",seed:e,humidity_noise:{firstOctave:-7,amplitudes:[1,1]},altitude_noise:{firstOctave:-7,amplitudes:[1,1]},weirdness_noise:{firstOctave:-7,amplitudes:[1,1]},temperature_noise:{firstOctave:-7,amplitudes:[1,1]},biomes:[{parameters:{altitude:0,weirdness:0,offset:0,temperature:0,humidity:0},biome:"minecraft:nether_wastes"},{parameters:{altitude:0,weirdness:0,offset:0,temperature:0,humidity:-.5},biome:"minecraft:soul_sand_valley"},{parameters:{altitude:0,weirdness:0,offset:0,temperature:.4,humidity:0},biome:"minecraft:crimson_forest"},{parameters:{altitude:0,weirdness:0,offset:.375,temperature:0,humidity:.5},biome:"minecraft:warped_forest"},{parameters:{altitude:0,weirdness:0,offset:.175,temperature:-.5,humidity:0},biome:"minecraft:basalt_deltas"}]},settings:"minecraft:nether"}},"minecraft:the_end":{type:"minecraft:the_end",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:the_end",seed:e},settings:"minecraft:end"}}}}}}))},Object.defineProperty(Di,"__esModule",{value:!0}),Di.initSchemas=void 0;const Kn=Bi,Xn=Ri,Jn=Li,Yn=Wi,Zn=Vi,Qn=Xi,er=Zi,tr=rn,ir=an,nr=ln,rr=dn,or=pn,ar=fn,sr=Vn;Di.initSchemas=function(e,t){Jn.initCommonSchemas(e,t),Kn.initAdvancementSchemas(e,t),Xn.initAssetsSchemas(e,t),Yn.initConditionSchemas(e,t),Qn.initDimensionTypeSchemas(e,t),Zn.initDimensionSchemas(e,t),er.initLootTableSchemas(e,t),tr.initPackMcmetaSchemas(e,t),ir.initPredicatesSchemas(e,t),nr.initRecipeSchemas(e,t),rr.initTagsSchemas(e,t),or.initTextComponentSchemas(e,t),ar.initWorldgenSchemas(e,t),sr.initWorldSettingsSchemas(e,t)};var cr=Ie&&Ie.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),lr=Ie&&Ie.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ur=Ie&&Ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.hasOwnProperty.call(e,i)&&cr(t,e,i);return lr(t,e),t};Object.defineProperty(Ei,"__esModule",{value:!0});var dr=Ei.getSchemas=Ei.getCollections=void 0;const hr=Pe,pr=Fi,mr=Di;var fr=Ei.lootContext=ur(Qi);var gr=Ei.getCollections=function(){const e=new hr.CollectionRegistry;return pr.initCollections(e),e};dr=Ei.getSchemas=function(e){const t=new hr.SchemaRegistry;return mr.initSchemas(t,e),t};var _r=Object.freeze(Object.assign(Object.create(null),Ei,{[Symbol.toStringTag]:"Module",get getSchemas(){return dr},get getCollections(){return gr},lootContext:fr,default:Ei})),br={},vr={};Object.defineProperty(vr,"__esModule",{value:!0}),vr.initCollections=void 0,vr.initCollections=function(e){e.register("advancement_trigger",["minecraft:bee_nest_destroyed","minecraft:bred_animals","minecraft:brewed_potion","minecraft:changed_dimension","minecraft:channeled_lightning","minecraft:construct_beacon","minecraft:consume_item","minecraft:cured_zombie_villager","minecraft:effects_changed","minecraft:enchanted_item","minecraft:enter_block","minecraft:entity_hurt_player","minecraft:entity_killed_player","minecraft:filled_bucket","minecraft:fishing_rod_hooked","minecraft:hero_of_the_village","minecraft:impossible","minecraft:inventory_changed","minecraft:item_durability_changed","minecraft:item_used_on_block","minecraft:killed_by_crossbow","minecraft:levitation","minecraft:lightning_strike","minecraft:location","minecraft:nether_travel","minecraft:placed_block","minecraft:player_generates_container_loot","minecraft:player_hurt_entity","minecraft:player_interacted_with_entity","minecraft:player_killed_entity","minecraft:recipe_unlocked","minecraft:shot_crossbow","minecraft:slept_in_bed","minecraft:slide_down_block","minecraft:started_riding","minecraft:summoned_entity","minecraft:tame_animal","minecraft:target_hit","minecraft:tick","minecraft:thrown_item_picked_up_by_entity","minecraft:used_ender_eye","minecraft:used_totem","minecraft:using_item","minecraft:villager_trade","minecraft:voluntary_exile"]),e.register("dimension",["minecraft:overworld","minecraft:the_nether","minecraft:the_end"]),e.register("dimension_type",["minecraft:overworld","minecraft:the_nether","minecraft:the_end"]),e.register("keybind",["key.advancements","key.attack","key.back","key.chat","key.command","key.drop","key.forward","key.fullscreen","key.hotbar.1","key.hotbar.2","key.hotbar.3","key.hotbar.4","key.hotbar.5","key.hotbar.6","key.hotbar.7","key.hotbar.8","key.hotbar.9","key.inventory","key.jump","key.left","key.loadToolbarActivator","key.pickItem","key.playerlist","key.right","key.saveToolbarActivator","key.screenshot","key.smoothCamera","key.sneak","key.spectatorOutlines","key.sprint","key.swapOffhand","key.togglePerspective","key.use"]),e.register("slot",["mainhand","offhand","head","chest","legs","feet"]),e.register("gamemode",["survival","creative","adventure","spectator"]),e.register("worldgen/noise_settings",["minecraft:overworld","minecraft:nether","minecraft:end","minecraft:amplified","minecraft:caves","minecraft:floating_islands"]),e.register("entity_source",["this","killer","direct_killer","killer_player"]),e.register("copy_source",["block_entity","this","killer","killer_player"]),e.register("loot_table_apply_bonus_formula",["minecraft:uniform_bonus_count","minecraft:binomial_with_bonus_count","minecraft:ore_drops"]),e.register("map_decoration",["mansion","monument","player","frame","red_marker","blue_marker","target_x","target_point","player_off_map","player_off_limits","red_x","banner_white","banner_orange","banner_magenta","banner_light_blue","banner_yellow","banner_lime","banner_pink","banner_gray","banner_light_gray","banner_cyan","banner_purple","banner_blue","banner_brown","banner_green","banner_red","banner_black"]),e.register("map_feature",["bastion_remnant","buried_treasure","desert_pyramid","endcity","fortress","igloo","jungle_pyramid","mansion","mineshaft","monument","nether_fossil","ocean_ruin","pillager_outpost","ruined_portal","shipwreck","stronghold","swamp_hut","village"]),e.register("recipe_group",["bed","light_gray_dye","iron_ingot","wooden_stairs","black_dye","stained_terracotta","dyed_bed","magenta_dye","bark","rabbit_stew","light_blue_dye","wooden_fence_gate","planks","stained_glass","wooden_door","stained_glass_pane","wooden_fence","sticks","concrete_powder","wooden_pressure_plate","boat","brown_dye","yellow_dye","bonemeal","red_dye","wooden_trapdoor","wooden_button","gold_ingot","pink_dye","wooden_slab","orange_dye","carpet","sign","wool","sugar","blue_dye","white_dye","banner","netherite_ingot"]),e.register("worldgen/configured_feature",["minecraft:acacia","minecraft:bamboo_light","minecraft:bamboo_vegetation","minecraft:bamboo","minecraft:basalt_blobs","minecraft:basalt_pillar","minecraft:birch_bees_0002","minecraft:birch_bees_002","minecraft:birch_bees_005","minecraft:birch_other","minecraft:birch_tall","minecraft:birch","minecraft:blackstone_blobs","minecraft:blue_ice","minecraft:bonus_chest","minecraft:brown_mushroom_giant","minecraft:brown_mushroom_nether","minecraft:brown_mushroom_normal","minecraft:brown_mushroom_swamp","minecraft:brown_mushroom_taiga","minecraft:chorus_plant","minecraft:crimson_forest_vegetation","minecraft:crimson_fungi_planted","minecraft:crimson_fungi","minecraft:dark_forest_vegetation_brown","minecraft:dark_forest_vegetation_red","minecraft:dark_oak","minecraft:delta","minecraft:desert_well","minecraft:disk_clay","minecraft:disk_gravel","minecraft:disk_sand","minecraft:end_gateway_delayed","minecraft:end_gateway","minecraft:end_island_decorated","minecraft:end_island","minecraft:end_spike","minecraft:fancy_oak_bees_0002","minecraft:fancy_oak_bees_002","minecraft:fancy_oak_bees_005","minecraft:fancy_oak","minecraft:flower_default","minecraft:flower_forest","minecraft:flower_plain_decorated","minecraft:flower_plain","minecraft:flower_swamp","minecraft:flower_warm","minecraft:forest_flower_trees","minecraft:forest_flower_vegetation_common","minecraft:forest_flower_vegetation","minecraft:forest_rock","minecraft:fossil","minecraft:freeze_top_layer","minecraft:glowstone_extra","minecraft:glowstone","minecraft:huge_brown_mushroom","minecraft:huge_red_mushroom","minecraft:ice_patch","minecraft:ice_spike","minecraft:iceberg_blue","minecraft:iceberg_packed","minecraft:jungle_bush","minecraft:jungle_tree_no_vine","minecraft:jungle_tree","minecraft:kelp_cold","minecraft:kelp_warm","minecraft:lake_lava","minecraft:lake_water","minecraft:large_basalt_columns","minecraft:mega_jungle_tree","minecraft:mega_pine","minecraft:mega_spruce","minecraft:monster_room","minecraft:mushroom_field_vegetation","minecraft:nether_sprouts","minecraft:oak_badlands","minecraft:oak_bees_0002","minecraft:oak_bees_002","minecraft:oak_bees_005","minecraft:oak","minecraft:ore_andesite","minecraft:ore_blackstone","minecraft:ore_coal","minecraft:ore_debris_large","minecraft:ore_debris_small","minecraft:ore_diamond","minecraft:ore_diorite","minecraft:ore_dirt","minecraft:ore_emerald","minecraft:ore_gold_deltas","minecraft:ore_gold_extra","minecraft:ore_gold_nether","minecraft:ore_gold","minecraft:ore_granite","minecraft:ore_gravel_nether","minecraft:ore_gravel","minecraft:ore_infested","minecraft:ore_iron","minecraft:ore_lapis","minecraft:ore_magma","minecraft:ore_quartz_deltas","minecraft:ore_quartz_nether","minecraft:ore_redstone","minecraft:ore_soul_sand","minecraft:patch_berry_bush","minecraft:patch_berry_decorated","minecraft:patch_berry_sparse","minecraft:patch_brown_mushroom","minecraft:patch_cactus_decorated","minecraft:patch_cactus_desert","minecraft:patch_cactus","minecraft:patch_crimson_roots","minecraft:patch_dead_bush_2","minecraft:patch_dead_bush_badlands","minecraft:patch_dead_bush","minecraft:patch_fire","minecraft:patch_grass_badlands","minecraft:patch_grass_forest","minecraft:patch_grass_jungle","minecraft:patch_grass_normal","minecraft:patch_grass_plain","minecraft:patch_grass_savanna","minecraft:patch_grass_taiga_2","minecraft:patch_grass_taiga","minecraft:patch_large_fern","minecraft:patch_melon","minecraft:patch_pumpkin","minecraft:patch_red_mushroom","minecraft:patch_soul_fire","minecraft:patch_sugar_cane_badlands","minecraft:patch_sugar_cane_desert","minecraft:patch_sugar_cane_swamp","minecraft:patch_sugar_cane","minecraft:patch_sunflower","minecraft:patch_taiga_grass","minecraft:patch_tall_grass_2","minecraft:patch_tall_grass","minecraft:patch_waterlilly","minecraft:pile_hay","minecraft:pile_ice","minecraft:pile_melon","minecraft:pile_pumpkin","minecraft:pile_snow","minecraft:pine","minecraft:plain_vegetation","minecraft:red_mushroom_giant","minecraft:red_mushroom_nether","minecraft:red_mushroom_normal","minecraft:red_mushroom_swamp","minecraft:red_mushroom_taiga","minecraft:sea_pickle","minecraft:seagrass_cold","minecraft:seagrass_deep_cold","minecraft:seagrass_deep_warm","minecraft:seagrass_deep","minecraft:seagrass_normal","minecraft:seagrass_river","minecraft:seagrass_simple","minecraft:seagrass_swamp","minecraft:seagrass_warm","minecraft:small_basalt_columns","minecraft:spring_closed_double","minecraft:spring_closed","minecraft:spring_delta","minecraft:spring_lava_double","minecraft:spring_lava","minecraft:spring_open","minecraft:spring_water","minecraft:spruce_snowy","minecraft:spruce","minecraft:super_birch_bees_0002","minecraft:swamp_tree","minecraft:taiga_vegetation","minecraft:trees_birch","minecraft:trees_giant_spruce","minecraft:trees_giant","minecraft:trees_jungle_edge","minecraft:trees_jungle","minecraft:trees_mountain_edge","minecraft:trees_mountain","minecraft:trees_savanna","minecraft:trees_shattered_savanna","minecraft:trees_water","minecraft:twisting_vines","minecraft:vines","minecraft:void_start_platform","minecraft:warm_ocean_vegetation","minecraft:warped_forest_vegetation","minecraft:warped_fungi_planted","minecraft:warped_fungi","minecraft:weeping_vines"]),e.register("worldgen/configured_structure_feature",["minecraft:bastion_remnant","minecraft:buried_treasure","minecraft:desert_pyramid","minecraft:end_city","minecraft:fortress","minecraft:igloo","minecraft:jungle_pyramid","minecraft:mansion","minecraft:mineshaft_mesa","minecraft:mineshaft","minecraft:monument","minecraft:nether_fossil","minecraft:ocean_ruin_cold","minecraft:ocean_ruin_warm","minecraft:pillager_outpost","minecraft:ruined_portal_desert","minecraft:ruined_portal_jungle","minecraft:ruined_portal_mountain","minecraft:ruined_portal_nether","minecraft:ruined_portal_ocean","minecraft:ruined_portal_swamp","minecraft:ruined_portal","minecraft:shipwreck_beached","minecraft:shipwreck","minecraft:stronghold","minecraft:swamp_hut","minecraft:village_desert","minecraft:village_plains","minecraft:village_savanna","minecraft:village_snowy","minecraft:village_taiga"]),e.register("worldgen/configured_surface_builder",["minecraft:badlands","minecraft:basalt_deltas","minecraft:crimson_forest","minecraft:desert","minecraft:end","minecraft:eroded_badlands","minecraft:frozen_ocean","minecraft:full_sand","minecraft:giant_tree_taiga","minecraft:grass","minecraft:gravelly_mountain","minecraft:ice_spikes","minecraft:mountain","minecraft:mycelium","minecraft:nether","minecraft:nope","minecraft:ocean_sand","minecraft:shattered_savanna","minecraft:soul_sand_valley","minecraft:stone","minecraft:swamp","minecraft:warped_forest","minecraft:wooded_badlands"]),e.register("biome_category",["beach","desert","extreme_hills","forest","icy","jungle","mesa","mushroom","nether","none","ocean","plains","river","savanna","swamp","taiga","the_end","underground"]),e.register("heightmap_type",["MOTION_BLOCKING","MOTION_BLOCKING_NO_LEAVES","OCEAN_FLOOR","OCEAN_FLOOR_WG","WORLD_SURFACE","WORLD_SURFACE_WG"]),e.register("generation_step",["air","liquid"]),e.register("loot_context_type",["minecraft:empty","minecraft:chest","minecraft:command","minecraft:selector","minecraft:fishing","minecraft:entity","minecraft:gift","minecraft:barter","minecraft:advancement_reward","minecraft:advancement_entity","minecraft:generic","minecraft:block"]),e.register("banner_pattern",["base","square_bottom_left","square_bottom_right","square_top_left","square_top_right","stripe_bottom","stripe_top","stripe_left","stripe_right","stripe_center","stripe_middle","stripe_downright","stripe_downleft","small_stripes","cross","straight_cross","triangle_bottom","triangle_top","triangles_bottom","triangles_top","diagonal_left","diagonal_up_right","diagonal_up_left","diagonal_right","circle","rhombus","half_vertical","half_horizontal","half_vertical_right","half_horizontal_bottom","border","curly_border","gradient","gradient_up","bricks","globe","creeper","skull","flower","mojang","piglin"]),e.register("dye_color",["white","orange","magenta","light_blue","yellow","lime","pink","gray","light_gray","cyan","purple","blue","brown","green","red","black"])};var yr={},wr={};Object.defineProperty(wr,"__esModule",{value:!0}),wr.initAdvancementSchemas=void 0;const xr=Pe;wr.initAdvancementSchemas=function(e,t){const i=xr.Reference.bind(void 0,e),n=xr.StringNode.bind(void 0,t),r=xr.ChoiceNode([{type:"object",node:xr.Opt(i("entity_predicate")),change:e=>{var t,i;return null!==(i=null===(t=e[0])||void 0===t?void 0:t.predicate)&&void 0!==i?i:{}}},{type:"list",node:xr.ListNode(i("condition")),change:e=>[{condition:"minecraft:entity_properties",predicate:e}]}],{context:"conditions"});e.register("advancement",xr.Mod(xr.ObjectNode({display:xr.Opt(xr.Mod(xr.ObjectNode({icon:xr.ObjectNode({item:n({validator:"resource",params:{pool:"item"}}),nbt:xr.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"item"}]}}}))}),title:i("text_component"),description:i("text_component"),background:xr.Opt(n()),frame:xr.Opt(n({enum:["task","challenge","goal"]})),show_toast:xr.Opt(xr.BooleanNode()),announce_to_chat:xr.Opt(xr.BooleanNode()),hidden:xr.Opt(xr.BooleanNode())}),{default:()=>({icon:{item:"minecraft:stone"},title:"",description:""})})),parent:xr.Opt(n({validator:"resource",params:{pool:"$advancement"}})),criteria:xr.MapNode(n(),i("advancement_criteria")),requirements:xr.Opt(xr.ListNode(xr.ListNode(n()))),rewards:xr.Opt(xr.ObjectNode({function:xr.Opt(n({validator:"resource",params:{pool:"$function"}})),loot:xr.Opt(xr.ListNode(n({validator:"resource",params:{pool:"$loot_table"}}))),recipes:xr.Opt(xr.ListNode(n({validator:"resource",params:{pool:"$recipe"}}))),experience:xr.Opt(xr.NumberNode({integer:!0}))}))},{context:"advancement"}),{default:()=>({criteria:{requirement:{trigger:"minecraft:location"}}})})),e.register("advancement_criteria",xr.ObjectNode({trigger:n({validator:"resource",params:{pool:t.get("advancement_trigger")}}),conditions:xr.Opt(xr.ObjectNode({player:xr.Mod(r,{enabled:e=>"minecraft:impossible"!==e.pop().push("trigger").get()}),[xr.Switch]:["pop",{push:"trigger"}],[xr.Case]:{"minecraft:bee_nest_destroyed":{block:xr.Opt(n({validator:"resource",params:{pool:"block"}})),num_bees_inside:xr.Opt(xr.NumberNode({integer:!0})),item:xr.Opt(i("item_predicate"))},"minecraft:bred_animals":{parent:r,partner:r,child:r},"minecraft:brewed_potion":{potion:xr.Opt(n({validator:"resource",params:{pool:"potion"}}))},"minecraft:changed_dimension":{from:xr.Opt(n({validator:"resource",params:{pool:"$dimension"}})),to:xr.Opt(n({validator:"resource",params:{pool:"$dimension"}}))},"minecraft:channeled_lightning":{victims:xr.Opt(xr.ListNode(r))},"minecraft:construct_beacon":{level:i("int_bounds")},"minecraft:consume_item":{item:xr.Opt(i("item_predicate"))},"minecraft:cured_zombie_villager":{villager:r,zombie:r},"minecraft:effects_changed":{effects:xr.Opt(xr.MapNode(n({validator:"resource",params:{pool:"mob_effect"}}),xr.ObjectNode({amplifier:i("int_bounds"),duration:i("int_bounds")}))),source:xr.Opt(r)},"minecraft:enter_block":{block:xr.Opt(n({validator:"resource",params:{pool:"block"}})),state:xr.Opt(xr.MapNode(n(),n(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}}))},"minecraft:enchanted_item":{levels:i("int_bounds"),item:xr.Opt(i("item_predicate"))},"minecraft:entity_hurt_player":{damage:xr.Opt(i("damage_predicate"))},"minecraft:entity_killed_player":{entity:r,killing_blow:xr.Opt(i("damage_source_predicate"))},"minecraft:filled_bucket":{item:xr.Opt(i("item_predicate"))},"minecraft:fishing_rod_hooked":{entity:r,item:xr.Opt(i("item_predicate"))},"minecraft:hero_of_the_village":{location:xr.Opt(i("location_predicate"))},"minecraft:inventory_changed":{slots:xr.Opt(xr.ObjectNode({empty:i("int_bounds"),occupied:i("int_bounds"),full:i("int_bounds")})),items:xr.Opt(xr.ListNode(i("item_predicate")))},"minecraft:item_durability_changed":{delta:i("int_bounds"),durability:i("int_bounds"),item:xr.Opt(i("item_predicate"))},"minecraft:item_used_on_block":{item:xr.Opt(i("item_predicate")),location:xr.Opt(i("location_predicate"))},"minecraft:killed_by_crossbow":{unique_entity_types:i("int_bounds"),victims:xr.Opt(xr.ListNode(r))},"minecraft:levitation":{distance:i("distance_predicate"),duration:i("int_bounds")},"minecraft:lightning_strike":{lightning:r,bystander:r},"minecraft:location":{location:xr.Opt(i("location_predicate"))},"minecraft:nether_travel":{distance:i("distance_predicate"),entered:xr.Opt(i("location_predicate")),exited:xr.Opt(i("location_predicate"))},"minecraft:placed_block":{block:xr.Opt(n({validator:"resource",params:{pool:"block"}})),state:xr.Opt(xr.MapNode(n(),n(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}})),item:xr.Opt(i("item_predicate")),location:xr.Opt(i("location_predicate"))},"minecraft:player_generates_container_loot":{loot_table:n({validator:"resource",params:{pool:"$loot_table"}})},"minecraft:player_hurt_entity":{damage:xr.Opt(i("damage_predicate")),entity:r},"minecraft:player_interacted_with_entity":{item:xr.Opt(i("item_predicate")),entity:r},"minecraft:player_killed_entity":{entity:r,killing_blow:xr.Opt(i("damage_source_predicate"))},"minecraft:recipe_unlocked":{recipe:n({validator:"resource",params:{pool:"$recipe"}})},"minecraft:slept_in_bed":{location:xr.Opt(i("location_predicate"))},"minecraft:slide_down_block":{block:xr.Opt(n({validator:"resource",params:{pool:"block"}}))},"minecraft:shot_crossbow":{item:xr.Opt(i("item_predicate"))},"minecraft:summoned_entity":{entity:r},"minecraft:tame_animal":{entity:r},"minecraft:target_hit":{projectile:r,shooter:r,signal_strength:i("int_bounds")},"minecraft:thrown_item_picked_up_by_entity":{entity:xr.Opt(i("entity_predicate")),item:xr.Opt(i("item_predicate"))},"minecraft:used_ender_eye":{distance:i("float_bounds")},"minecraft:used_totem":{item:xr.Opt(i("item_predicate"))},"minecraft:using_item":{item:xr.Opt(i("item_predicate"))},"minecraft:villager_trade":{villager:xr.Opt(i("entity_predicate")),item:xr.Opt(i("item_predicate"))},"minecraft:voluntary_exile":{location:i("location_predicate")}}},{context:"criterion"}))},{category:"predicate",context:"criterion"}))};var Nr={},kr={};Object.defineProperty(kr,"__esModule",{value:!0}),kr.initModelSchemas=void 0;const Ar=Pe;kr.initModelSchemas=function(e,t){Ar.Reference.bind(void 0,e);const i=Ar.StringNode.bind(void 0,t),n=(e,t,i)=>Ar.ListNode(Ar.NumberNode({min:t,max:i}),{minLength:e,maxLength:e}),r=Ar.ChoiceNode([{type:"alias",match:e=>"string"==typeof e&&e.startsWith("#"),node:i(),change:e=>"string"==typeof e?`#${e}`:"#0"},{type:"reference",match:e=>"string"==typeof e,node:i({validator:"resource",params:{pool:"$texture"}}),change:e=>"string"==typeof e?e.replace(/^#/,""):""}],{choiceContext:"texture"});e.register("model",Ar.Mod(Ar.ObjectNode({parent:Ar.Opt(i({validator:"resource",params:{pool:"$model"}})),ambientocclusion:Ar.Opt(Ar.BooleanNode()),gui_light:Ar.Opt(i({enum:"gui_light"})),textures:Ar.Opt(Ar.MapNode(i(),r)),elements:Ar.Opt(Ar.ListNode(Ar.ObjectNode({from:n(3,-16,32),to:n(3,-16,32),rotation:Ar.Opt(Ar.ObjectNode({origin:n(3),axis:i({enum:"axis"}),angle:Ar.NumberEnum({values:[-45,-22.5,0,22.5,45]}),rescale:Ar.Opt(Ar.BooleanNode())})),shade:Ar.Opt(Ar.BooleanNode()),faces:Ar.MapNode(i({enum:"direction"}),Ar.ObjectNode({texture:r,uv:Ar.Opt(n(4)),cullface:Ar.Opt(i({enum:"direction"})),rotation:Ar.Opt(Ar.NumberNode({integer:!0})),tintindex:Ar.Opt(Ar.NumberNode({integer:!0}))}))},{context:"model_element"}))),display:Ar.Opt(Ar.MapNode(i({enum:"display_position"}),Ar.ObjectNode({rotation:n(3),translation:n(3,-80,80),scale:n(3,-4,4)},{context:"item_transform"}))),overrides:Ar.Opt(Ar.ListNode(Ar.ObjectNode({predicate:Ar.MapNode(i({enum:"item_model_predicates"}),Ar.NumberNode()),model:i({validator:"resource",params:{pool:"$model"}})},{context:"model_override"})))},{context:"model"}),{default:()=>({parent:"minecraft:item/generated",textures:{layer0:"minecraft:item/diamond"}})}))};var Cr={};Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.initBlockDefinitionSchemas=void 0;const Or=Pe;Cr.initBlockDefinitionSchemas=function(e,t){const i=Or.Reference.bind(void 0,e),n=Or.StringNode.bind(void 0,t);e.register("block_definition",Or.Mod(Or.ChoiceNode([{type:"variants",match:e=>void 0!==e.variants,node:Or.ObjectNode({variants:Or.MapNode(n(),i("model_variant"))}),change:e=>({variants:{"":{}}})},{type:"multipart",match:e=>void 0!==e.multipart,node:Or.ObjectNode({multipart:Or.ListNode(Or.ObjectNode({when:Or.Opt(i("multipart_condition")),apply:i("model_variant")}))}),change:e=>({multipart:{when:{},apply:{}}})}],{context:"block_definition"}),{default:()=>({variants:{"":{model:"minecraft:block/stone"}}})}));const r={model:n({validator:"resource",params:{pool:"$model"}}),x:Or.Opt(Or.NumberEnum({integer:!0,values:[0,90,180,270]})),y:Or.Opt(Or.NumberEnum({integer:!0,values:[0,90,180,270]})),uvlock:Or.Opt(Or.BooleanNode())};e.register("model_variant",Or.ChoiceNode([{type:"object",node:Or.ObjectNode(r),change:e=>Array.isArray(e)&&e.length>0?e[0]:{}},{type:"list",node:Or.ListNode(Or.ObjectNode(c(s({},r),{weight:Or.Opt(Or.NumberNode({integer:!0,min:1}))}),{context:"model_variant"})),change:e=>[s({weight:1},e)]}],{context:"model_variant"})),e.register("multipart_condition",Or.ChoiceNode([{type:"object",priority:-1,match:()=>!0,node:Or.MapNode(n(),n()),change:e=>"object"==typeof e&&Array.isArray(null==e?void 0:e.OR)&&e.OR.length>0?e.OR[0]:{}},{type:"or",match:e=>"object"==typeof e&&void 0!==(null==e?void 0:e.OR),node:Or.ObjectNode({OR:Or.ListNode(i("multipart_condition"))}),change:e=>({OR:[null!=e?e:{}]})}],{context:"multipart_condition"}))},Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.initAssetsSchemas=void 0;const Sr=kr,Er=Cr;Nr.initAssetsSchemas=function(e,t){Er.initBlockDefinitionSchemas(e,t),Sr.initModelSchemas(e,t)};var Fr={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.initCommonSchemas=e.IntProvider=e.FloatProvider=e.NoiseSettingsPresets=e.DefaultNoiseSettings=e.DimensionTypePresets=e.DefaultDimensionType=e.FunctionCases=e.ConditionCases=void 0;const t=Pe;e.DefaultDimensionType={ultrawarm:!1,natural:!0,piglin_safe:!1,respawn_anchor_works:!1,bed_works:!0,has_raids:!0,has_skylight:!0,has_ceiling:!1,coordinate_scale:1,ambient_light:0,logical_height:256,infiniburn:"minecraft:infiniburn_overworld",min_y:0,height:256},e.DefaultNoiseSettings={name:"minecraft:overworld",bedrock_roof_position:-10,bedrock_floor_position:0,sea_level:63,disable_mob_generation:!1,noise_caves_enabled:!0,aquifers_enabled:!0,deepslate_enabled:!0,noise:{min_y:0,height:256,density_factor:1,density_offset:-.46875,simplex_surface_noise:!0,random_density_offset:!0,size_horizontal:1,size_vertical:2,sampling:{xz_scale:1,y_scale:1,xz_factor:80,y_factor:160},top_slide:{target:-10,size:3,offset:0},bottom_slide:{target:-30,size:0,offset:0}},default_block:{Name:"minecraft:stone"},default_fluid:{Name:"minecraft:water",Properties:{level:"0"}}},e.initCommonSchemas=function(i,n){const r=t.StringNode.bind(void 0,n),o=t.Reference.bind(void 0,i);i.register("block_state",t.Mod(t.ObjectNode({Name:r({validator:"resource",params:{pool:"block"}}),Properties:t.Opt(t.MapNode(r(),r(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"Name"}]}}}))},{context:"block_state"}),{default:()=>({Name:"minecraft:stone"})})),i.register("fluid_state",t.Mod(t.ObjectNode({Name:r({validator:"resource",params:{pool:"fluid"}}),Properties:t.Opt(t.MapNode(r(),r()))},{context:"fluid_state"}),{default:()=>({Name:"minecraft:water",Properties:{level:"0"}})})),i.register("block_pos",t.Mod(t.ListNode(t.NumberNode({integer:!0}),{minLength:3,maxLength:3}),{default:()=>[0,0,0]}));const a=e=>t.Opt(t.ChoiceNode([{type:"number",node:t.NumberNode({integer:e}),change:e=>{var t,i;return void 0===e?0:null!==(i=null!==(t=e.min)&&void 0!==t?t:e.max)&&void 0!==i?i:0}},{type:"object",node:t.ObjectNode({min:t.Opt(t.NumberNode({integer:e})),max:t.Opt(t.NumberNode({integer:e}))},{context:"range"}),change:e=>({min:null!=e?e:0,max:null!=e?e:0})}]));i.register("int_bounds",a(!0)),i.register("float_bounds",a()),i.register("int_range",t.ChoiceNode([{type:"object",node:t.ObjectNode({min:t.Opt(o("number_provider")),max:t.Opt(o("number_provider"))})},{type:"number",node:t.NumberNode({integer:!0})}],{context:"range"}));const c=(e,i,n,o,a,c,l)=>{let u={};a&&Object.keys(l[a]).forEach((e=>{u[e]=t.Mod(l[a][e],{enabled:e=>void 0===e.push("type").get()})}));const d=t.ObjectNode(s({type:t.Mod(t.Opt(r({validator:"resource",params:{pool:e}})),{hidden:()=>!0}),[t.Switch]:[{push:"type"}],[t.Case]:l},u),{context:c,disableSwitchContext:!0}),h=[{type:i,node:l[o][n]}];return a&&h.push({type:"object",priority:-1,node:d}),Object.keys(l).forEach((e=>{h.push({type:e,match:t=>{var i;if("minecraft:"+(null===(i=null==t?void 0:t.type)||void 0===i?void 0:i.replace(/^minecraft:/,""))===e)return!0;const n=t?Object.keys(t):[];return"object"==typeof t&&(0===(null==n?void 0:n.length)||1===(null==n?void 0:n.length)&&"type"===(null==n?void 0:n[0]))},node:d,change:t=>({type:e})})})),t.ChoiceNode(h,{context:c,choiceContext:`${c}.type`})};i.register("number_provider",c("loot_number_provider_type","number","value","minecraft:constant","minecraft:uniform","number_provider",{"minecraft:constant":{value:t.NumberNode()},"minecraft:uniform":{min:o("number_provider"),max:o("number_provider")},"minecraft:binomial":{n:o("number_provider"),p:o("number_provider")},"minecraft:score":{target:o("scoreboard_name_provider"),score:r({validator:"objective"}),scale:t.Opt(t.NumberNode())}})),i.register("scoreboard_name_provider",c("loot_score_provider_type","string","target","minecraft:context",null,"score_provider",{"minecraft:fixed":{name:r({validator:"entity",params:{amount:"multiple",type:"entities",isScoreHolder:!0}})},"minecraft:context":{target:t.Mod(r({enum:"entity_source"}),{default:()=>"this"})}})),i.register("nbt_provider",c("loot_nbt_provider_type","string","target","minecraft:context",null,"nbt_provider",{"minecraft:storage":{source:r({validator:"resource",params:{pool:"$storage"}})},"minecraft:context":{target:t.Mod(r({enum:"copy_source"}),{default:()=>"this"})}})),e.FloatProvider=e=>c("float_provider_type","number","value","minecraft:constant",null,"float_provider",{"minecraft:constant":{value:t.NumberNode(e)},"minecraft:uniform":{value:t.ObjectNode({min_inclusive:t.NumberNode(e),max_exclusive:t.NumberNode(e)})},"minecraft:clamped_normal":{value:t.ObjectNode({min:t.NumberNode(),max:t.NumberNode(),mean:t.NumberNode(),deviation:t.NumberNode()})},"minecraft:trapezoid":{value:t.ObjectNode({min:t.NumberNode(),max:t.NumberNode(),plateau:t.NumberNode()})}}),i.register("float_provider",e.FloatProvider()),e.IntProvider=e=>c("int_provider_type","number","value","minecraft:constant",null,"int_provider",{"minecraft:constant":{value:t.NumberNode(s({integer:!0},e))},"minecraft:uniform":{value:t.ObjectNode({min_inclusive:t.NumberNode(s({integer:!0},e)),max_inclusive:t.NumberNode(s({integer:!0},e))})},"minecraft:biased_to_bottom":{value:t.ObjectNode({min_inclusive:t.NumberNode(s({integer:!0},e)),max_inclusive:t.NumberNode(s({integer:!0},e))})},"minecraft:clamped":{value:t.ObjectNode({min_inclusive:t.NumberNode(s({integer:!0},e)),max_inclusive:t.NumberNode(s({integer:!0},e)),source:o("int_provider")})}}),i.register("int_provider",e.IntProvider()),i.register("vertical_anchor",t.ChoiceNode(["absolute","above_bottom","below_top"].map((e=>({type:e,match:t=>void 0!==(null==t?void 0:t[e]),change:t=>{var i,n,r;return{[e]:null!==(r=null!==(n=null!==(i=t.absolute)&&void 0!==i?i:t.above_bottom)&&void 0!==n?n:t.below_top)&&void 0!==r?r:0}},node:t.ObjectNode({[e]:t.NumberNode({integer:!0,min:-2048,max:2047})})}))),{context:"vertical_anchor"})),i.register("height_provider",c("height_provider_type","number","value","minecraft:constant",null,"height_provider",{"minecraft:constant":{value:o("vertical_anchor")},"minecraft:uniform":{min_inclusive:o("vertical_anchor"),max_inclusive:o("vertical_anchor")},"minecraft:biased_to_bottom":{min_inclusive:o("vertical_anchor"),max_inclusive:o("vertical_anchor"),inner:t.Opt(t.NumberNode({integer:!0,min:1}))},"minecraft:very_biased_to_bottom":{min_inclusive:o("vertical_anchor"),max_inclusive:o("vertical_anchor"),inner:t.Opt(t.NumberNode({integer:!0,min:1}))},"minecraft:trapezoid":{min_inclusive:o("vertical_anchor"),max_inclusive:o("vertical_anchor"),plateau:t.Opt(t.NumberNode({integer:!0}))}})),e.ConditionCases=(e=r({enum:"entity_source"}))=>({"minecraft:alternative":{terms:t.ListNode(o("condition"))},"minecraft:block_state_property":{block:r({validator:"resource",params:{pool:"block"}}),properties:t.MapNode(r(),r(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}})},"minecraft:damage_source_properties":{predicate:o("damage_source_predicate")},"minecraft:entity_properties":{entity:e,predicate:o("entity_predicate")},"minecraft:entity_scores":{entity:e,scores:t.MapNode(r({validator:"objective"}),o("int_range"))},"minecraft:inverted":{term:o("condition")},"minecraft:killed_by_player":{inverse:t.Opt(t.BooleanNode())},"minecraft:location_check":{offsetX:t.Opt(t.NumberNode({integer:!0})),offsetY:t.Opt(t.NumberNode({integer:!0})),offsetZ:t.Opt(t.NumberNode({integer:!0})),predicate:o("location_predicate")},"minecraft:match_tool":{predicate:o("item_predicate")},"minecraft:random_chance":{chance:t.NumberNode({min:0,max:1})},"minecraft:random_chance_with_looting":{chance:t.NumberNode({min:0,max:1}),looting_multiplier:t.NumberNode()},"minecraft:reference":{name:r({validator:"resource",params:{pool:"$predicate"}})},"minecraft:table_bonus":{enchantment:r({validator:"resource",params:{pool:"enchantment"}}),chances:t.ListNode(t.NumberNode({min:0,max:1}))},"minecraft:time_check":{value:o("int_range"),period:t.Opt(t.NumberNode({integer:!0}))},"minecraft:value_check":{value:o("number_provider"),range:o("int_range")},"minecraft:weather_check":{raining:t.Opt(t.BooleanNode()),thundering:t.Opt(t.BooleanNode())}}),e.FunctionCases=(e,i=r({enum:"copy_source"}),a=r({enum:"entity_source"}))=>{const c={"minecraft:apply_bonus":{enchantment:r({validator:"resource",params:{pool:"enchantment"}}),formula:r({validator:"resource",params:{pool:n.get("loot_table_apply_bonus_formula")}}),parameters:t.Mod(t.ObjectNode({bonusMultiplier:t.Mod(t.NumberNode(),{enabled:e=>"minecraft:uniform_bonus_count"===e.pop().push("formula").get()}),extra:t.Mod(t.NumberNode(),{enabled:e=>"minecraft:binomial_with_bonus_count"===e.pop().push("formula").get()}),probability:t.Mod(t.NumberNode(),{enabled:e=>"minecraft:binomial_with_bonus_count"===e.pop().push("formula").get()})}),{enabled:e=>"minecraft:ore_drops"!==e.push("formula").get()})},"minecraft:copy_name":{source:i},"minecraft:copy_nbt":{source:o("nbt_provider"),ops:t.ListNode(t.ObjectNode({source:r({validator:"nbt_path",params:{category:{getter:"copy_source",path:["pop","pop","pop",{push:"source"}]}}}),target:r({validator:"nbt_path",params:{category:"minecraft:item"}}),op:r({enum:["replace","append","merge"]})},{context:"nbt_operation"}))},"minecraft:copy_state":{block:r({validator:"resource",params:{pool:"block"}}),properties:t.ListNode(r({validator:"block_state_key",params:{id:["pop","pop",{push:"block"}]}}))},"minecraft:enchant_randomly":{enchantments:t.Opt(t.ListNode(r({validator:"resource",params:{pool:"enchantment"}})))},"minecraft:enchant_with_levels":{levels:o("number_provider"),treasure:t.Opt(t.BooleanNode())},"minecraft:exploration_map":{destination:t.Opt(r({enum:"map_feature"})),decoration:t.Opt(r({enum:"map_decoration"})),zoom:t.Opt(t.NumberNode({integer:!0})),search_radius:t.Opt(t.NumberNode({integer:!0})),skip_existing_chunks:t.Opt(t.BooleanNode())},"minecraft:fill_player_head":{entity:a},"minecraft:limit_count":{limit:o("int_range")},"minecraft:looting_enchant":{count:o("number_provider"),limit:t.Opt(t.NumberNode({integer:!0}))},"minecraft:set_attributes":{modifiers:t.ListNode(o("attribute_modifier"))},"minecraft:set_banner_pattern":{patterns:t.ListNode(t.ObjectNode({pattern:r({enum:"banner_pattern"}),color:r({enum:"dye_color"})})),append:t.Opt(t.BooleanNode())},"minecraft:set_contents":{entries:t.ListNode(o("loot_entry"))},"minecraft:set_count":{count:o("number_provider"),add:t.Opt(t.BooleanNode())},"minecraft:set_damage":{damage:o("number_provider"),add:t.Opt(t.BooleanNode())},"minecraft:set_enchantments":{enchantments:t.MapNode(r({validator:"resource",params:{pool:"enchantment"}}),o("number_provider")),add:t.Opt(t.BooleanNode())},"minecraft:set_loot_table":{name:r({validator:"resource",params:{pool:"$loot_table"}}),seed:t.Opt(t.NumberNode({integer:!0}))},"minecraft:set_lore":{entity:t.Opt(a),lore:t.ListNode(o("text_component")),replace:t.Opt(t.BooleanNode())},"minecraft:set_name":{entity:t.Opt(a),name:t.Opt(o("text_component"))},"minecraft:set_nbt":{tag:r({validator:"nbt",params:{registry:{category:"minecraft:item"}}})},"minecraft:set_stew_effect":{effects:t.Opt(t.ListNode(t.ObjectNode({type:r({validator:"resource",params:{pool:"mob_effect"}}),duration:o("number_provider")})))}},l={};return n.get("loot_function_type").forEach((t=>{l[t]=s(s({},c[t]),e)})),l},e.DimensionTypePresets=i=>t.ObjectOrPreset(r({validator:"resource",params:{pool:"$dimension_type"}}),i,{"minecraft:overworld":e.DefaultDimensionType,"minecraft:the_nether":{name:"minecraft:the_nether",ultrawarm:!0,natural:!1,shrunk:!0,piglin_safe:!0,respawn_anchor_works:!0,bed_works:!1,has_raids:!1,has_skylight:!1,has_ceiling:!0,ambient_light:.1,fixed_time:18e3,logical_height:128,effects:"minecraft:the_nether",infiniburn:"minecraft:infiniburn_nether",min_y:0,height:256},"minecraft:the_end":{name:"minecraft:the_end",ultrawarm:!1,natural:!1,shrunk:!1,piglin_safe:!1,respawn_anchor_works:!1,bed_works:!1,has_raids:!0,has_skylight:!1,has_ceiling:!1,ambient_light:0,fixed_time:6e3,logical_height:256,effects:"minecraft:the_end",infiniburn:"minecraft:infiniburn_end",min_y:0,height:256}}),e.NoiseSettingsPresets=i=>t.ObjectOrPreset(r({validator:"resource",params:{pool:"$worldgen/noise_settings"}}),i,{"minecraft:overworld":e.DefaultNoiseSettings,"minecraft:nether":{name:"minecraft:nether",bedrock_roof_position:0,bedrock_floor_position:0,sea_level:32,disable_mob_generation:!0,noise_caves_enabled:!1,aquifers_enabled:!1,deepslate_enabled:!1,noise:{min_y:0,height:128,density_factor:0,density_offset:.019921875,simplex_surface_noise:!1,random_density_offset:!1,size_horizontal:1,size_vertical:2,sampling:{xz_scale:1,y_scale:3,xz_factor:80,y_factor:60},top_slide:{target:120,size:3,offset:0},bottom_slide:{target:320,size:4,offset:-1}},default_block:{Name:"minecraft:netherrack"},default_fluid:{Name:"minecraft:lava",Properties:{level:"0"}}},"minecraft:end":{name:"minecraft:end",bedrock_roof_position:-10,bedrock_floor_position:-10,sea_level:0,disable_mob_generation:!0,noise_caves_enabled:!1,aquifers_enabled:!1,deepslate_enabled:!1,noise:{min_y:0,height:128,density_factor:0,density_offset:0,simplex_surface_noise:!0,random_density_offset:!1,island_noise_override:!0,size_horizontal:2,size_vertical:1,sampling:{xz_scale:2,y_scale:1,xz_factor:80,y_factor:160},top_slide:{target:-3e3,size:64,offset:-46},bottom_slide:{target:-30,size:7,offset:1}},default_block:{Name:"minecraft:end_stone"},default_fluid:{Name:"minecraft:air"}},"minecraft:amplified":{name:"minecraft:amplified",bedrock_roof_position:-10,bedrock_floor_position:0,sea_level:63,disable_mob_generation:!1,noise_caves_enabled:!0,aquifers_enabled:!0,deepslate_enabled:!0,noise:{min_y:0,height:256,density_factor:1,density_offset:-.46875,simplex_surface_noise:!0,random_density_offset:!0,amplified:!0,size_horizontal:1,size_vertical:2,sampling:{xz_scale:1,y_scale:1,xz_factor:80,y_factor:160},top_slide:{target:-10,size:3,offset:0},bottom_slide:{target:-30,size:0,offset:0}},default_block:{Name:"minecraft:stone"},default_fluid:{Name:"minecraft:water",Properties:{level:"0"}}},"minecraft:caves":{name:"minecraft:caves",bedrock_roof_position:0,bedrock_floor_position:0,sea_level:32,disable_mob_generation:!0,noise_caves_enabled:!1,aquifers_enabled:!1,deepslate_enabled:!1,noise:{min_y:0,height:128,density_factor:0,density_offset:.019921875,simplex_surface_noise:!1,random_density_offset:!1,size_horizontal:1,size_vertical:2,sampling:{xz_scale:1,y_scale:3,xz_factor:80,y_factor:60},top_slide:{target:120,size:3,offset:0},bottom_slide:{target:320,size:4,offset:-1}},default_block:{Name:"minecraft:stone"},default_fluid:{Name:"minecraft:water",Properties:{level:"0"}}},"minecraft:floating_islands":{name:"minecraft:floating_islands",bedrock_roof_position:-10,bedrock_floor_position:-10,sea_level:0,disable_mob_generation:!0,noise_caves_enabled:!1,aquifers_enabled:!1,deepslate_enabled:!1,noise:{min_y:0,height:128,density_factor:0,density_offset:0,simplex_surface_noise:!0,random_density_offset:!1,island_noise_override:!0,size_horizontal:2,size_vertical:1,sampling:{xz_scale:2,y_scale:1,xz_factor:80,y_factor:160},top_slide:{target:-3e3,size:64,offset:-46},bottom_slide:{target:-30,size:7,offset:1}},default_block:{Name:"minecraft:stone"},default_fluid:{Name:"minecraft:water",Properties:{level:"0"}}}})}}(Fr);var Dr={};Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.initConditionSchemas=void 0;const Br=Pe,Lr=Fr;Dr.initConditionSchemas=function(e,t){const i=Br.Reference.bind(void 0,e),n=Br.StringNode.bind(void 0,t);e.register("predicate",Br.ObjectOrList(i("condition"),{choiceContext:"condition"})),e.register("condition",Br.Mod(Br.ObjectNode({condition:n({validator:"resource",params:{pool:"loot_condition_type"}}),[Br.Switch]:[{push:"condition"}],[Br.Case]:Lr.ConditionCases()},{category:"predicate",context:"condition"}),{default:()=>({condition:"minecraft:entity_properties",entity:"this"})}))};var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.initDimensionSchemas=void 0;const Tr=Pe,Rr=Fr;Mr.initDimensionSchemas=function(e,t){const i=Tr.Reference.bind(void 0,e),n=Tr.StringNode.bind(void 0,t),r=e=>Tr.Mod(e,{enabled:e=>void 0===e.push("preset").get()});e.register("dimension",Tr.Mod(Tr.ObjectNode({type:Rr.DimensionTypePresets(i("dimension_type")),generator:Tr.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/chunk_generator"}}),[Tr.Switch]:[{push:"type"}],[Tr.Case]:{"minecraft:noise":{seed:Tr.NumberNode({integer:!0}),settings:Rr.NoiseSettingsPresets(i("noise_settings")),biome_source:Tr.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/biome_source"}}),[Tr.Switch]:[{push:"type"}],[Tr.Case]:{"minecraft:fixed":{biome:n({validator:"resource",params:{pool:"$worldgen/biome"}})},"minecraft:multi_noise":{seed:Tr.NumberNode({integer:!0}),preset:Tr.Opt(n({enum:["nether"]})),altitude_noise:r(i("generator_biome_noise")),temperature_noise:r(i("generator_biome_noise")),humidity_noise:r(i("generator_biome_noise")),weirdness_noise:r(i("generator_biome_noise")),biomes:r(Tr.Mod(Tr.ListNode(i("generator_biome")),{default:()=>[{biome:"minecraft:plains"}]}))},"minecraft:checkerboard":{scale:Tr.Opt(Tr.NumberNode({integer:!0,min:0,max:62})),biomes:Tr.ListNode(n({validator:"resource",params:{pool:"$worldgen/biome"}}))},"minecraft:the_end":{seed:Tr.NumberNode({integer:!0})},"minecraft:vanilla_layered":{seed:Tr.NumberNode({integer:!0}),large_biomes:Tr.Opt(Tr.BooleanNode()),legacy_biome_init_layer:Tr.Opt(Tr.BooleanNode())}}},{category:"predicate",disableSwitchContext:!0})},"minecraft:flat":{settings:Tr.ObjectNode({biome:Tr.Opt(n({validator:"resource",params:{pool:"$worldgen/biome"}})),lakes:Tr.Opt(Tr.BooleanNode()),features:Tr.Opt(Tr.BooleanNode()),layers:Tr.ListNode(i("generator_layer")),structures:i("generator_structures")})}}},{disableSwitchContext:!0})},{category:"pool",context:"dimension"}),{default:()=>{const e=Math.floor(4294967296*Math.random())-2147483648;return{type:"minecraft:overworld",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:fixed",seed:e,biome:"minecraft:plains"},settings:"minecraft:overworld"}}}})),e.register("generator_biome",Tr.Mod(Tr.ObjectNode({biome:n({validator:"resource",params:{pool:"$worldgen/biome"}}),parameters:Tr.ObjectNode({altitude:Tr.NumberNode(),temperature:Tr.NumberNode(),humidity:Tr.NumberNode(),weirdness:Tr.NumberNode(),offset:Tr.NumberNode()})},{context:"generator_biome"}),{default:()=>({biome:"minecraft:plains",parameters:{altitude:0,temperature:0,humidity:0,weirdness:0,offset:0}})})),e.register("generator_biome_noise",Tr.Mod(Tr.ObjectNode({firstOctave:Tr.NumberNode({integer:!0}),amplitudes:Tr.ListNode(Tr.NumberNode())},{context:"generator_biome_noise"}),{default:()=>({firstOctave:-7,amplitudes:[1,1]})}))};var $r={};Object.defineProperty($r,"__esModule",{value:!0}),$r.initDimensionTypeSchemas=void 0;const jr=Pe,Ir=Fr;$r.initDimensionTypeSchemas=function(e,t){const i=jr.StringNode.bind(void 0,t);e.register("dimension_type",jr.Mod(jr.ObjectNode({name:jr.Mod(i({validator:"resource",params:{pool:"$dimension_type",isDefinition:!0}}),{enabled:e=>e.getArray().length>0}),ultrawarm:jr.BooleanNode(),natural:jr.BooleanNode(),piglin_safe:jr.BooleanNode(),respawn_anchor_works:jr.BooleanNode(),bed_works:jr.BooleanNode(),has_raids:jr.BooleanNode(),has_skylight:jr.BooleanNode(),has_ceiling:jr.BooleanNode(),coordinate_scale:jr.NumberNode({min:1e-5,max:3e7}),ambient_light:jr.NumberNode(),fixed_time:jr.Opt(jr.NumberNode({integer:!0})),logical_height:jr.NumberNode({integer:!0,min:0,max:4096}),effects:jr.Opt(i({enum:["minecraft:overworld","minecraft:the_nether","minecraft:the_end"]})),infiniburn:i({validator:"resource",params:{pool:"$tag/block"}}),min_y:jr.NumberNode({integer:!0,min:-2048,max:2047}),height:jr.NumberNode({integer:!0,min:0,max:4096})},{context:"dimension_type"}),(e=>({default:()=>Ir.DefaultDimensionType,validate:(t,i,n,r)=>((null==(i=e.validate(t,i,n,r))?void 0:i.min_y)+(null==i?void 0:i.height)>2047&&n.add(t.push("height"),"error.min_y_plus_height",2047),(null==i?void 0:i.logical_height)>(null==i?void 0:i.height)&&n.add(t.push("logical_height"),"error.logical_height"),(null==i?void 0:i.height)%16!=0&&n.add(t.push("height"),"error.height_multiple",16),(null==i?void 0:i.min_y)%16!=0&&n.add(t.push("min_y"),"error.min_y_multiple",16),i)}))))};var Pr={};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.initItemModifierSchemas=void 0;const zr=Pe,Ur=Fr;Pr.initItemModifierSchemas=function(e,t){const i=zr.Reference.bind(void 0,e),n=zr.StringNode.bind(void 0,t);e.register("item_modifier",zr.ObjectOrList(i("function"),{choiceContext:"function"}));const r={conditions:zr.Opt(zr.ListNode(i("condition")))};e.register("function",zr.Mod(zr.ObjectNode({function:n({validator:"resource",params:{pool:"loot_function_type"}}),[zr.Switch]:[{push:"function"}],[zr.Case]:Ur.FunctionCases(r)},{category:"function",context:"function"}),{default:()=>[{function:"minecraft:set_count",count:1}]}))};var Wr={},Hr={};Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.LootFunctions=Hr.LootConditions=Hr.LootCopySources=Hr.LootEntitySources=Hr.LootTableTypes=void 0,Hr.LootTableTypes=new Map([["minecraft:advancement_entity",{requires:[7,8],allows:[]}],["minecraft:advancement_reward",{requires:[7,8],allows:[]}],["minecraft:barter",{requires:[8],allows:[]}],["minecraft:block",{requires:[1,7,9],allows:[0,4,8]}],["minecraft:chest",{requires:[7],allows:[8]}],["minecraft:command",{requires:[7],allows:[8]}],["minecraft:empty",{requires:[],allows:[]}],["minecraft:entity",{requires:[2,7,8],allows:[3,5,6]}],["minecraft:fishing",{requires:[7,9],allows:[8]}],["minecraft:generic",{requires:[2,0,1,3,4,5,6,7,8,9],allows:[]}],["minecraft:gift",{requires:[7,8],allows:[]}],["minecraft:selector",{requires:[7],allows:[8]}]]),Hr.LootEntitySources=new Map([["direct_killer",[3]],["killer",[5]],["killer_player",[5]],["this",[8]]]),Hr.LootCopySources=new Map([["block_entity",[0]],["killer",[5]],["killer_player",[5]],["this",[8]]]),Hr.LootConditions=new Map([["minecraft:alternative",[]],["minecraft:block_state_property",[1]],["minecraft:damage_source_properties",[2]],["minecraft:entity_properties",[7]],["minecraft:entity_scores",[]],["minecraft:inverted",[]],["minecraft:killed_by_player",[6]],["minecraft:location_check",[]],["minecraft:match_tool",[9]],["minecraft:random_chance",[]],["minecraft:random_chance_with_looting",[5]],["minecraft:reference",[]],["minecraft:survives_explosion",[4]],["minecraft:table_bonus",[9]],["minecraft:time_check",[]],["minecraft:weather_check",[]]]),Hr.LootFunctions=new Map([["minecraft:apply_bonus",[9]],["minecraft:copy_name",[]],["minecraft:copy_nbt",[]],["minecraft:copy_state",[1]],["minecraft:enchant_randomly",[]],["minecraft:enchant_with_levels",[]],["minecraft:exploration_map",[7]],["minecraft:explosion_decay",[]],["minecraft:fill_player_head",[]],["minecraft:furnace_smelt",[]],["minecraft:limit_count",[]],["minecraft:looting_enchant",[5]],["minecraft:set_attributes",[]],["minecraft:set_banner_pattern",[]],["minecraft:set_contents",[]],["minecraft:set_count",[]],["minecraft:set_damage",[]],["minecraft:set_loot_table",[]],["minecraft:set_lore",[]],["minecraft:set_name",[]],["minecraft:set_nbt",[]],["minecraft:set_stew_effect",[]]]),Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.initLootTableSchemas=void 0;const qr=Pe,Vr=Hr,Gr=Fr;Wr.initLootTableSchemas=function(e,t){const i=qr.Reference.bind(void 0,e),n=qr.StringNode.bind(void 0,t),r={conditions:qr.Opt(qr.ListNode(i("loot_condition")))},o=s({functions:qr.Opt(qr.ListNode(i("loot_function")))},r);function a(e,i,n){const r=[],o=n=>t.get(i).filter((t=>{var i;return(null!==(i=e.get(t))&&void 0!==i?i:[]).every((e=>n.includes(e)))}));for(const[t,{allows:a,requires:s}]of Vr.LootTableTypes){const e=[...a,...s];r.push({match:e=>e.getModel().get(new qr.Path(["type"]))===t,node:n(o(e))})}return r.push({match:e=>!0,node:n(i)}),qr.SwitchNode(r)}const c=a(Vr.LootConditions,"loot_condition_type",(e=>n({validator:"resource",params:{pool:e instanceof Array?e:"loot_condition_type"}}))),l=a(Vr.LootFunctions,"loot_function_type",(e=>n({validator:"resource",params:{pool:e instanceof Array?e:"loot_function_type"}}))),u=a(Vr.LootEntitySources,"entity_source",(e=>n({enum:e}))),d=a(Vr.LootCopySources,"copy_source",(e=>n({enum:e})));e.register("loot_table",qr.Mod(qr.ObjectNode({type:qr.Opt(n({validator:"resource",params:{pool:t.get("loot_context_type")}})),pools:qr.Opt(qr.ListNode(qr.Mod(qr.ObjectNode(s({rolls:i("number_provider"),bonus_rolls:qr.Opt(i("number_provider")),entries:qr.ListNode(i("loot_entry"))},o),{category:"pool",context:"loot_pool"}),{default:()=>({rolls:1,entries:[{type:"minecraft:item",name:"minecraft:stone"}]})}))),functions:qr.Opt(qr.ListNode(i("loot_function")))},{context:"loot_table"}),{default:()=>({pools:[{rolls:1,entries:[{type:"minecraft:item",name:"minecraft:stone"}]}]})}));const h={enabled:e=>{var t;return(null===(t=e.pop().get())||void 0===t?void 0:t.length)>1&&!["minecraft:alternatives","minecraft:group","minecraft:sequence"].includes(e.push("type").get())}};e.register("loot_entry",qr.Mod(qr.ObjectNode({type:n({validator:"resource",params:{pool:"loot_pool_entry_type"}}),weight:qr.Opt(qr.Mod(qr.NumberNode({integer:!0,min:1}),h)),quality:qr.Opt(qr.Mod(qr.NumberNode({integer:!0}),h)),[qr.Switch]:[{push:"type"}],[qr.Case]:{"minecraft:alternatives":s({children:qr.ListNode(i("loot_entry"))},o),"minecraft:dynamic":s({name:n()},o),"minecraft:group":s({children:qr.ListNode(i("loot_entry"))},o),"minecraft:item":s({name:n({validator:"resource",params:{pool:"item"}})},o),"minecraft:loot_table":s({name:n({validator:"resource",params:{pool:"$loot_table"}})},o),"minecraft:sequence":s({children:qr.ListNode(i("loot_entry"))},o),"minecraft:tag":s({name:n({validator:"resource",params:{pool:"$tag/item"}}),expand:qr.Opt(qr.BooleanNode())},o)}},{context:"loot_entry"}),{default:()=>({type:"minecraft:item",name:"minecraft:stone"})})),e.register("loot_function",qr.Mod(qr.ObjectNode({function:l,[qr.Switch]:[{push:"function"}],[qr.Case]:Gr.FunctionCases(r,d,u)},{category:"function",context:"function"}),{default:()=>({function:"minecraft:set_count",count:1})})),e.register("loot_condition",qr.Mod(qr.ObjectNode({condition:c,[qr.Switch]:[{push:"condition"}],[qr.Case]:Gr.ConditionCases(u)},{category:"predicate",context:"condition"}),{default:()=>({condition:"minecraft:random_chance",chance:.5})})),e.register("attribute_modifier",qr.Mod(qr.ObjectNode({attribute:n({validator:"resource",params:{pool:"attribute"}}),name:n(),amount:i("number_provider"),operation:n({enum:["addition","multiply_base","multiply_total"]}),slot:qr.StringOrList(n({enum:"slot"}))},{context:"attribute_modifier"}),{default:()=>({attribute:"minecraft:generic.max_health",name:"",amount:1,operation:"addition",slot:"mainhand"})}))};var Kr={};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.initPackMcmetaSchemas=void 0;const Xr=Pe;Kr.initPackMcmetaSchemas=function(e,t){e.register("pack_mcmeta",Xr.Mod(Xr.ObjectNode({pack:Xr.Mod(Xr.ObjectNode({pack_format:Xr.Mod(Xr.NumberNode({integer:!0,min:7,max:7}),{default:()=>7,canUpdate:(e,t)=>7!==t,update:()=>[{name:"pack_format",params:[7],newValue:7}]}),description:Xr.Reference(e,"text_component")}),{default:()=>({pack_format:7,description:""})})}),{default:()=>({pack:{pack_format:7,description:""}})}))};var Jr={};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.initPredicatesSchemas=void 0;const Yr=Pe;Jr.initPredicatesSchemas=function(e,t){const i=Yr.Reference.bind(void 0,e),n=Yr.StringNode.bind(void 0,t),r=Yr.ChoiceNode([{type:"string",node:n(),change:e=>"boolean"==typeof e||"number"==typeof e?e.toString():""},{type:"number",node:Yr.NumberNode(),change:e=>"string"==typeof e?parseInt(e):0},{type:"object",node:Yr.ObjectNode({min:Yr.Opt(Yr.NumberNode({integer:!0})),max:Yr.Opt(Yr.NumberNode({integer:!0}))}),change:e=>"number"==typeof e?{min:e,max:e}:{}},{type:"boolean",node:Yr.BooleanNode(),change:e=>"true"===e||1===e}]);e.register("item_predicate",Yr.ObjectNode({items:Yr.Opt(Yr.ListNode(n({validator:"resource",params:{pool:"item"}}))),tag:Yr.Opt(n({validator:"resource",params:{pool:"$tag/item"}})),count:i("int_bounds"),durability:i("int_bounds"),potion:Yr.Opt(n({validator:"resource",params:{pool:"potion"}})),nbt:Yr.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"item"}]}}})),enchantments:Yr.Opt(Yr.ListNode(i("enchantment_predicate")))},{context:"item"})),e.register("enchantment_predicate",Yr.ObjectNode({enchantment:Yr.Opt(n({validator:"resource",params:{pool:"enchantment"}})),levels:i("int_bounds")},{context:"enchantment"})),e.register("block_predicate",Yr.ObjectNode({blocks:Yr.Opt(Yr.ListNode(n({validator:"resource",params:{pool:"block"}}))),tag:Yr.Opt(n({validator:"resource",params:{pool:"$tag/block"}})),nbt:Yr.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:block",id:["pop",{push:"block"}]}}})),state:Yr.Opt(Yr.MapNode(n(),r,{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}}))},{context:"block"})),e.register("fluid_predicate",Yr.ObjectNode({fluid:Yr.Opt(n({validator:"resource",params:{pool:"fluid"}})),tag:Yr.Opt(n({validator:"resource",params:{pool:"$tag/fluid"}})),state:Yr.Opt(Yr.MapNode(n(),r))},{context:"fluid"})),e.register("location_predicate",Yr.ObjectNode({position:Yr.Opt(Yr.ObjectNode({x:i("float_bounds"),y:i("float_bounds"),z:i("float_bounds")})),biome:Yr.Opt(n({validator:"resource",params:{pool:"$worldgen/biome"}})),feature:Yr.Opt(n({enum:t.get("worldgen/structure_feature").map((e=>e.slice(10)))})),dimension:Yr.Opt(n({validator:"resource",params:{pool:"$dimension"}})),light:Yr.Opt(Yr.ObjectNode({light:i("int_bounds")})),smokey:Yr.Opt(Yr.BooleanNode()),block:Yr.Opt(i("block_predicate")),fluid:Yr.Opt(i("fluid_predicate"))},{context:"location"})),e.register("statistic_predicate",Yr.ObjectNode({type:n({validator:"resource",params:{pool:"stat_type"}}),stat:n(),value:i("int_bounds"),[Yr.Switch]:[{push:"type"}],[Yr.Case]:{"minecraft:mined":{stat:n({validator:"resource",params:{pool:"block"}})},"minecraft:crafted":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:used":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:broken":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:picked_up":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:dropped":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:killed":{stat:n({validator:"resource",params:{pool:"entity_type"}})},"minecraft:killed_by":{stat:n({validator:"resource",params:{pool:"entity_type"}})},"minecraft:custom":{stat:n({validator:"resource",params:{pool:"custom_stat"}})}}})),e.register("player_predicate",Yr.ObjectNode({gamemode:Yr.Opt(n({enum:"gamemode"})),level:i("int_bounds"),advancements:Yr.Opt(Yr.MapNode(n({validator:"resource",params:{pool:"$advancement"}}),Yr.ChoiceNode([{type:"boolean",node:Yr.BooleanNode(),change:e=>!0},{type:"object",node:Yr.MapNode(n(),Yr.BooleanNode())}]))),recipes:Yr.Opt(Yr.MapNode(n({validator:"resource",params:{pool:"$recipe"}}),Yr.BooleanNode())),stats:Yr.Opt(Yr.ListNode(i("statistic_predicate"))),looking_at:Yr.Opt(i("entity_predicate"))},{context:"player"})),e.register("status_effect_predicate",Yr.ObjectNode({amplifier:i("int_bounds"),duration:i("int_bounds"),ambient:Yr.Opt(Yr.BooleanNode()),visible:Yr.Opt(Yr.BooleanNode())},{context:"status_effect"})),e.register("distance_predicate",Yr.ObjectNode({x:i("float_bounds"),y:i("float_bounds"),z:i("float_bounds"),absolute:i("float_bounds"),horizontal:i("float_bounds")},{context:"distance"})),e.register("entity_predicate",Yr.ObjectNode({type:Yr.Opt(n({validator:"resource",params:{pool:"entity_type",allowTag:!0}})),nbt:Yr.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:entity",id:["pop",{push:"type"}]}}})),team:Yr.Opt(n({validator:"team"})),location:Yr.Opt(i("location_predicate")),stepping_on:Yr.Opt(i("location_predicate")),distance:Yr.Opt(i("distance_predicate")),flags:Yr.Opt(Yr.ObjectNode({is_on_fire:Yr.Opt(Yr.BooleanNode()),is_sneaking:Yr.Opt(Yr.BooleanNode()),is_sprinting:Yr.Opt(Yr.BooleanNode()),is_swimming:Yr.Opt(Yr.BooleanNode()),is_baby:Yr.Opt(Yr.BooleanNode())})),equipment:Yr.Opt(Yr.MapNode(n({enum:"slot"}),i("item_predicate"))),player:Yr.Opt(i("player_predicate")),vehicle:Yr.Opt(i("entity_predicate")),passenger:Yr.Opt(i("entity_predicate")),targeted_entity:Yr.Opt(i("entity_predicate")),lightning_bolt:Yr.Opt(Yr.ObjectNode({blocks_set_on_fire:Yr.Opt(i("int_bounds")),entity_struck:Yr.Opt(i("entity_predicate"))})),fishing_hook:Yr.Opt(Yr.ObjectNode({in_open_water:Yr.Opt(Yr.BooleanNode())})),effects:Yr.Opt(Yr.MapNode(n({validator:"resource",params:{pool:"mob_effect"}}),i("status_effect_predicate")))},{context:"entity"})),e.register("damage_source_predicate",Yr.ObjectNode({is_explosion:Yr.Opt(Yr.BooleanNode()),is_fire:Yr.Opt(Yr.BooleanNode()),is_magic:Yr.Opt(Yr.BooleanNode()),is_projectile:Yr.Opt(Yr.BooleanNode()),is_lightning:Yr.Opt(Yr.BooleanNode()),bypasses_armor:Yr.Opt(Yr.BooleanNode()),bypasses_invulnerability:Yr.Opt(Yr.BooleanNode()),bypasses_magic:Yr.Opt(Yr.BooleanNode()),source_entity:Yr.Opt(i("entity_predicate")),direct_entity:Yr.Opt(i("entity_predicate"))},{context:"damage_source"})),e.register("damage_predicate",Yr.ObjectNode({dealt:i("float_bounds"),taken:i("float_bounds"),blocked:Yr.Opt(Yr.BooleanNode()),source_entity:Yr.Opt(i("entity_predicate")),type:Yr.Opt(i("damage_source_predicate"))},{context:"damage"}))};var Zr={};Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.initRecipeSchemas=void 0;const Qr=Pe;Zr.initRecipeSchemas=function(e,t){const i=Qr.Reference.bind(void 0,e),n=Qr.StringNode.bind(void 0,t);e.register("recipe",Qr.Mod(Qr.ObjectNode({type:n({validator:"resource",params:{pool:"recipe_serializer"}}),[Qr.Switch]:[{push:"type"}],[Qr.Case]:{"minecraft:crafting_shaped":{group:Qr.Opt(n({enum:"recipe_group",additional:!0})),pattern:Qr.ListNode(n()),key:Qr.MapNode(n(),i("recipe_ingredient")),result:i("recipe_result")},"minecraft:crafting_shapeless":{group:Qr.Opt(n()),ingredients:Qr.ListNode(i("recipe_ingredient")),result:i("recipe_result")},"minecraft:smelting":{group:Qr.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:Qr.Opt(Qr.NumberNode()),cookingtime:Qr.Opt(Qr.Mod(Qr.NumberNode({integer:!0}),{default:()=>200}))},"minecraft:blasting":{group:Qr.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:Qr.Opt(Qr.NumberNode()),cookingtime:Qr.Opt(Qr.Mod(Qr.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:smoking":{group:Qr.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:Qr.Opt(Qr.NumberNode()),cookingtime:Qr.Opt(Qr.Mod(Qr.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:campfire_cooking":{group:Qr.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:Qr.Opt(Qr.NumberNode()),cookingtime:Qr.Opt(Qr.Mod(Qr.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:stonecutting":{group:Qr.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),count:Qr.NumberNode({integer:!0})},"minecraft:smithing":{group:Qr.Opt(n()),base:i("recipe_ingredient_object"),addition:i("recipe_ingredient_object"),result:i("recipe_result")}}},{context:"recipe",disableSwitchContext:!0}),{default:()=>({type:"minecraft:crafting_shaped"})})),e.register("recipe_ingredient",Qr.Mod(Qr.ChoiceNode([{type:"object",node:i("recipe_ingredient_object"),change:e=>e[0]},{type:"list",node:Qr.ListNode(i("recipe_ingredient_object")),change:e=>[e]}]),{default:()=>({item:"minecraft:stone"})})),e.register("recipe_ingredient_object",Qr.Mod(Qr.ObjectNode({item:Qr.Opt(n({validator:"resource",params:{pool:"item"}})),tag:Qr.Opt(n({validator:"resource",params:{pool:"$tag/item"}}))}),{default:()=>({item:"minecraft:stone"})})),e.register("recipe_result",Qr.Mod(Qr.ObjectNode({item:n({validator:"resource",params:{pool:"item"}}),count:Qr.Opt(Qr.Mod(Qr.NumberNode({integer:!0}),{default:()=>1}))}),{default:()=>({item:"minecraft:stone"})}))};var eo={};Object.defineProperty(eo,"__esModule",{value:!0}),eo.initTagsSchemas=void 0;const to=Pe;eo.initTagsSchemas=function(e,t){const i=to.StringNode.bind(void 0,t),n=e=>to.Mod(to.ObjectNode({replace:to.Opt(to.BooleanNode()),values:to.ListNode(to.ChoiceNode([{type:"string",node:i({validator:"resource",params:{pool:e,allowTag:!0}}),change:e=>e.id},{type:"object",node:to.ObjectNode({id:i({validator:"resource",params:{pool:e,allowTag:!0,allowUnknown:!0}}),required:to.BooleanNode()}),change:e=>({id:e})}]))},{context:"tag"}),{default:()=>({values:[]})});e.register("block_tag",n("block")),e.register("entity_type_tag",n("entity_type")),e.register("fluid_tag",n("fluid")),e.register("function_tag",n("$function")),e.register("game_event_tag",n("game_event")),e.register("item_tag",n("item"))};var io={};Object.defineProperty(io,"__esModule",{value:!0}),io.initTextComponentSchemas=void 0;const no=Pe;io.initTextComponentSchemas=function(e,t){const i=no.Reference.bind(void 0,e),n=no.StringNode.bind(void 0,t),r=e=>{var t;return e instanceof Array?r(e[0]):null!==(t=null==e?void 0:e.text)&&void 0!==t?t:"object"==typeof e?"":null==e?void 0:e.toString()};e.register("text_component",no.Mod(no.ChoiceNode([{type:"object",node:i("text_component_object"),change:e=>e instanceof Array?"object"==typeof e[0]?e[0]:{text:r(e[0])}:"object"==typeof e?e:{text:r(e)}},{type:"list",node:i("text_component_list"),change:e=>[e]},{type:"string",priority:1,node:n(),change:r},{type:"number",node:no.NumberNode(),change:e=>{const t=parseFloat(r(e));return isFinite(t)?t:e?1:0}},{type:"boolean",node:no.BooleanNode(),change:e=>{const t=r(e);return"true"===t||"false"===t?"true"===t:!!t}}],{context:"text_component"}),{default:()=>({text:""})}));const o={color:no.Opt(n()),font:no.Opt(n()),bold:no.Opt(no.BooleanNode()),italic:no.Opt(no.BooleanNode()),underlined:no.Opt(no.BooleanNode()),strikethrough:no.Opt(no.BooleanNode()),obfuscated:no.Opt(no.BooleanNode()),insertion:no.Opt(n()),clickEvent:no.Opt(no.ObjectNode({action:n({enum:["open_url","open_file","run_command","suggest_command","change_page","copy_to_clipboard"]}),[no.Switch]:[{push:"action"}],[no.Case]:{change_page:{value:n()},copy_to_clipboard:{value:n()},open_file:{value:n()},open_url:{value:n()},run_command:{value:n({validator:"command",params:{leadingSlash:!0,allowPartial:!0}})},suggest_command:{value:n({validator:"command",params:{leadingSlash:!0,allowPartial:!0}})}}})),hoverEvent:no.Opt(no.ObjectNode({action:n({enum:["show_text","show_item","show_entity"]}),[no.Switch]:[{push:"action"}],[no.Case]:{show_text:{value:no.Opt(i("text_component")),contents:no.Opt(i("text_component"))},show_item:{value:no.Opt(n({validator:"nbt",params:{module:"util::InventoryItem"}})),contents:no.Opt(no.ObjectNode({id:n({validator:"resource",params:{pool:"item"}}),count:no.Opt(no.NumberNode({integer:!0})),tag:no.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"id"}]}}}))}))},show_entity:{value:no.Opt(no.ObjectNode({name:no.Opt(n()),type:no.Opt(n()),id:no.Opt(n())})),contents:no.Opt(no.Mod(no.ObjectNode({name:no.Opt(i("text_component")),type:n({validator:"resource",params:{pool:"entity_type"}}),id:n({validator:"uuid"})}),{default:()=>({type:"minecraft:pig",id:"00000001-0001-0001-0001-000000000001"})}))}}})),extra:no.Opt(i("text_component_list"))};e.register("text_component_object",no.Mod(no.ChoiceNode([{type:"text",match:e=>"object"==typeof e,change:e=>({text:""}),priority:-1,node:no.ObjectNode(s({text:n()},o))},{type:"translation",match:e=>void 0!==(null==e?void 0:e.translate),change:e=>({translate:""}),node:no.ObjectNode(s({translate:n(),with:no.Opt(i("text_component_list"))},o))},{type:"score",match:e=>void 0!==(null==e?void 0:e.score),change:e=>({score:{}}),node:no.ObjectNode(s({score:no.ObjectNode({name:n({validator:"entity",params:{amount:"single",type:"entities",isScoreHolder:!0}}),objective:n({validator:"objective"}),value:no.Opt(n())})},o))},{type:"selector",match:e=>void 0!==(null==e?void 0:e.selector),change:e=>({selector:""}),node:no.ObjectNode(s({selector:n({validator:"entity",params:{amount:"multiple",type:"entities"}}),separator:no.Opt(i("text_component"))},o))},{type:"keybind",match:e=>void 0!==(null==e?void 0:e.keybind),change:e=>({keybind:""}),node:no.ObjectNode(s({keybind:n({enum:"keybind",additional:!0})},o))},{type:"nbt",match:e=>void 0!==(null==e?void 0:e.nbt),change:e=>({nbt:""}),node:no.ObjectNode(s({nbt:n({validator:"nbt_path"}),block:no.Opt(n({validator:"vector",params:{dimension:3,isInteger:!0}})),entity:no.Opt(n({validator:"entity",params:{amount:"multiple",type:"entities"}})),storage:no.Opt(n({validator:"resource",params:{pool:"$storage"}})),interpret:no.Opt(no.BooleanNode()),separator:no.Opt(i("text_component"))},o))}],{context:"text_component_object",choiceContext:"text_component.object"}),{default:()=>({text:""})})),e.register("text_component_list",no.Mod(no.ListNode(i("text_component")),{default:()=>[{text:""}]}))};var ro={},oo={};Object.defineProperty(oo,"__esModule",{value:!0}),oo.initBiomeSchemas=void 0;const ao=Pe;oo.initBiomeSchemas=function(e,t){const i=ao.StringNode.bind(void 0,t);e.register("biome",ao.Mod(ao.ObjectNode({surface_builder:i({validator:"resource",params:{pool:"$worldgen/configured_surface_builder"}}),depth:ao.NumberNode(),scale:ao.NumberNode(),temperature:ao.NumberNode(),downfall:ao.NumberNode(),precipitation:i({enum:["none","rain","snow"]}),temperature_modifier:ao.Opt(i({enum:["none","frozen"]})),category:i({enum:"biome_category"}),player_spawn_friendly:ao.Opt(ao.BooleanNode()),creature_spawn_probability:ao.Opt(ao.NumberNode({min:0,max:1})),effects:ao.ObjectNode({sky_color:ao.NumberNode({color:!0}),fog_color:ao.NumberNode({color:!0}),water_color:ao.NumberNode({color:!0}),water_fog_color:ao.NumberNode({color:!0}),grass_color:ao.Opt(ao.NumberNode({color:!0})),foliage_color:ao.Opt(ao.NumberNode({color:!0})),grass_color_modifier:ao.Opt(i({enum:["none","dark_forest","swamp"]})),ambient_sound:ao.Opt(i()),mood_sound:ao.Opt(ao.ObjectNode({sound:i(),tick_delay:ao.NumberNode({integer:!0}),block_search_extent:ao.NumberNode({integer:!0}),offset:ao.NumberNode()})),additions_sound:ao.Opt(ao.ObjectNode({sound:i(),tick_chance:ao.NumberNode({min:0,max:1})})),music:ao.Opt(ao.ObjectNode({sound:i(),min_delay:ao.NumberNode({integer:!0,min:0}),max_delay:ao.NumberNode({integer:!0,min:0}),replace_current_music:ao.BooleanNode()})),particle:ao.Opt(ao.ObjectNode({options:ao.ObjectNode({type:i()}),probability:ao.NumberNode({min:0,max:1})}))}),starts:ao.ListNode(i({validator:"resource",params:{pool:"$worldgen/configured_structure_feature"}})),spawners:ao.MapNode(i({enum:["monster","creature","ambient","underground_water_creature","water_creature","water_ambient","misc"]}),ao.Mod(ao.ListNode(ao.ObjectNode({type:i({validator:"resource",params:{pool:"entity_type"}}),weight:ao.NumberNode({integer:!0}),minCount:ao.NumberNode({integer:!0}),maxCount:ao.NumberNode({integer:!0})})),{category:()=>"pool",default:()=>[{type:"minecraft:bat",weight:1}]})),spawn_costs:ao.MapNode(i({validator:"resource",params:{pool:"entity_type"}}),ao.Mod(ao.ObjectNode({energy_budget:ao.NumberNode(),charge:ao.NumberNode()},{category:"function"}),{default:()=>({energy_budget:.12,charge:1})})),carvers:ao.MapNode(i({enum:["air","liquid"]}),ao.Mod(ao.ListNode(i({validator:"resource",params:{pool:"$worldgen/configured_carver"}})),{default:()=>["minecraft:cave"]})),features:ao.ListNode(ao.Mod(ao.ListNode(i({validator:"resource",params:{pool:"$worldgen/configured_feature"}})),{category:()=>"predicate"}),{maxLength:10})},{context:"biome"}),{default:()=>({surface_builder:"minecraft:grass",depth:.125,scale:.05,temperature:.8,downfall:.4,precipitation:"rain",category:"plains",effects:{sky_color:7907327,fog_color:12638463,water_color:4159204,water_fog_color:329011}})}))};var so={};Object.defineProperty(so,"__esModule",{value:!0}),so.initCarverSchemas=void 0;const co=Pe,lo=Fr;so.initCarverSchemas=function(e,t){const i=co.Reference.bind(void 0,e),n=co.StringNode.bind(void 0,t),r={vertical_rotation:lo.FloatProvider(),shape:co.ObjectNode({distance_factor:lo.FloatProvider(),thickness:lo.FloatProvider(),width_smoothness:co.NumberNode({integer:!0,min:0}),horizontal_radius_factor:lo.FloatProvider(),vertical_radius_default_factor:co.NumberNode(),vertical_radius_center_factor:co.NumberNode()})},o={horizontal_radius_multiplier:lo.FloatProvider(),vertical_radius_multiplier:lo.FloatProvider(),floor_level:lo.FloatProvider({min:-1,max:1})};e.register("configured_carver",co.Mod(co.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/carver"}}),config:co.ObjectNode({probability:co.NumberNode({min:0,max:1}),y:i("height_provider"),yScale:lo.FloatProvider(),lava_level:i("vertical_anchor"),aquifers_enabled:co.BooleanNode(),debug_settings:co.Opt(co.ObjectNode({debug_mode:co.Opt(co.BooleanNode()),air_state:co.Opt(i("block_state")),water_state:co.Opt(i("block_state")),lava_state:co.Opt(i("block_state")),barrier_state:co.Opt(i("block_state"))})),[co.Switch]:["pop",{push:"type"}],[co.Case]:{"minecraft:canyon":r,"minecraft:cave":o,"minecraft:nether_cave":o}})},{context:"carver"}),{default:()=>({type:"minecraft:cave",config:{probability:.1}})}))};var uo={};Object.defineProperty(uo,"__esModule",{value:!0}),uo.initDecoratorSchemas=void 0;const ho=Pe,po=Fr;uo.initDecoratorSchemas=function(e,t){const i=ho.Reference.bind(void 0,e),n=ho.StringNode.bind(void 0,t),r={count:po.IntProvider({min:0,max:256})};e.register("configured_decorator",ho.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/decorator"}}),config:ho.ObjectNode({[ho.Switch]:["pop",{push:"type"}],[ho.Case]:{"minecraft:carving_mask":{step:n({enum:"generation_step"})},"minecraft:cave_surface":{surface:n({enum:["floor","ceiling"]}),floor_to_ceiling_search_range:ho.NumberNode({integer:!0})},"minecraft:chance":{chance:ho.NumberNode({integer:!0,min:0})},"minecraft:count":r,"minecraft:count_extra":{count:ho.NumberNode({integer:!0,min:0}),extra_count:ho.NumberNode({integer:!0,min:0}),extra_chance:ho.NumberNode({min:0,max:1})},"minecraft:count_multilayer":r,"minecraft:count_noise":{noise_level:ho.NumberNode(),below_noise:ho.NumberNode({integer:!0}),above_noise:ho.NumberNode({integer:!0})},"minecraft:count_noise_biased":{noise_to_count_ratio:ho.NumberNode({integer:!0}),noise_factor:ho.NumberNode(),noise_offset:ho.Opt(ho.NumberNode())},"minecraft:decorated":{outer:i("configured_decorator"),inner:i("configured_decorator")},"minecraft:heightmap":{heightmap:n({enum:"heightmap_type"})},"minecraft:heightmap_spread_double":{heightmap:n({enum:"heightmap_type"})},"minecraft:lava_lake":{chance:ho.NumberNode({integer:!0,min:0})},"minecraft:range":{height:i("height_provider")},"minecraft:water_depth_threshold":{max_water_depth:ho.NumberNode({integer:!0})}}},{context:"decorator",category:"predicate"})},{context:"decorator",category:"predicate"}))};var mo={},fo={};Object.defineProperty(fo,"__esModule",{value:!0}),fo.initProcessorListSchemas=fo.Processors=void 0;const go=Pe;fo.initProcessorListSchemas=function(e,t){const i=go.Reference.bind(void 0,e),n=go.StringNode.bind(void 0,t);fo.Processors=go.ChoiceNode([{type:"string",node:n({validator:"resource",params:{pool:"$worldgen/processor_list"}}),change:e=>{}},{type:"object",node:i("processor_list"),change:e=>({processors:[{processor_type:"minecraft:nop"}]})}]),e.register("processor_list",go.Mod(go.ObjectNode({processors:go.ListNode(i("processor"))},{context:"processor_list"}),{default:()=>({processors:[{processor_type:"minecraft:rule",rules:[{location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}}]}]})})),e.register("processor",go.Mod(go.ObjectNode({processor_type:n({validator:"resource",params:{pool:"worldgen/structure_processor"}}),[go.Switch]:[{push:"processor_type"}],[go.Case]:{"minecraft:block_age":{mossiness:go.NumberNode()},"minecraft:block_ignore":{blocks:go.ListNode(i("block_state"))},"minecraft:block_rot":{integrity:go.NumberNode({min:0,max:1})},"minecraft:gravity":{heightmap:n({enum:"heightmap_type"}),offset:go.NumberNode({integer:!0})},"minecraft:protected_blocks":{value:n({validator:"resource",params:{pool:"$tag/block"}})},"minecraft:rule":{rules:go.ListNode(i("processor_rule"))}}},{category:"function",context:"processor"}),{default:()=>({processor_type:"minecraft:rule",rules:[{location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}}]})})),e.register("processor_rule",go.Mod(go.ObjectNode({position_predicate:go.Opt(i("pos_rule_test")),location_predicate:i("rule_test"),input_predicate:i("rule_test"),output_state:i("block_state"),output_nbt:go.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:block"}}}))},{category:"predicate",context:"processor_rule"}),{default:()=>({location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}})}));const r={min_dist:go.Opt(go.NumberNode({min:0,max:255,integer:!0})),max_dist:go.Opt(go.NumberNode({min:0,max:255,integer:!0})),min_chance:go.Opt(go.NumberNode({min:0,max:1})),max_chance:go.Opt(go.NumberNode({min:0,max:1}))};e.register("pos_rule_test",go.ObjectNode({predicate_type:n({validator:"resource",params:{pool:"pos_rule_test"}}),[go.Switch]:[{push:"predicate_type"}],[go.Case]:{"minecraft:axis_aligned_linear_pos":s({axis:n({enum:["x","y","z"]})},r),"minecraft:linear_pos":r}},{context:"pos_rule_test",disableSwitchContext:!0})),e.register("rule_test",go.ObjectNode({predicate_type:n({validator:"resource",params:{pool:"rule_test"}}),[go.Switch]:[{push:"predicate_type"}],[go.Case]:{"minecraft:block_match":{block:n({validator:"resource",params:{pool:"block"}})},"minecraft:blockstate_match":{block_state:i("block_state")},"minecraft:random_block_match":{block:n({validator:"resource",params:{pool:"block"}}),probability:go.NumberNode({min:0,max:1})},"minecraft:random_blockstate_match":{block_state:i("block_state"),probability:go.NumberNode({min:0,max:1})},"minecraft:tag_match":{tag:n({validator:"resource",params:{pool:"$tag/block"}})}}},{context:"rule_test",disableSwitchContext:!0}))},Object.defineProperty(mo,"__esModule",{value:!0}),mo.initFeatureSchemas=void 0;const _o=Pe,bo=Fr,vo=fo;mo.initFeatureSchemas=function(e,t){const i=_o.Reference.bind(void 0,e),n=_o.StringNode.bind(void 0,t),r={can_replace:_o.Opt(_o.BooleanNode()),project:_o.Opt(_o.BooleanNode()),need_water:_o.Opt(_o.BooleanNode()),xspread:_o.Opt(_o.NumberNode({integer:!0,min:0})),yspread:_o.Opt(_o.NumberNode({integer:!0,min:0})),zspread:_o.Opt(_o.NumberNode({integer:!0,min:0})),tries:_o.Opt(_o.NumberNode({integer:!0,min:1})),state_provider:i("block_state_provider"),block_placer:i("block_placer"),whitelist:_o.ListNode(i("block_state")),blacklist:_o.ListNode(i("block_state"))},o={state:i("block_state"),radius:bo.IntProvider({min:0,max:8}),half_height:_o.NumberNode({integer:!0,min:0,max:4}),targets:_o.ListNode(i("block_state"))},a={cap_provider:i("block_state_provider"),stem_provider:i("block_state_provider"),foliage_radius:_o.Opt(_o.NumberNode({integer:!0}))},s=_o.ObjectNode({target:i("rule_test"),state:i("block_state")}),c={size:_o.NumberNode({integer:!0,min:0,max:64}),discard_chance_on_air_exposure:_o.NumberNode({min:0,max:1}),targets:_o.ListNode(s)},l=_o.ChoiceNode([{type:"string",node:n({validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:i("configured_feature")}],{choiceContext:"feature"}),u={surface:n({enum:["floor","ceiling"]}),depth:bo.IntProvider({min:1,max:128}),vertical_range:_o.NumberNode({integer:!0,min:1,max:256}),extra_bottom_block_chance:_o.NumberNode({min:0,max:1}),extra_edge_column_chance:_o.NumberNode({min:0,max:1}),vegetation_chance:_o.NumberNode({min:0,max:1}),xz_radius:bo.IntProvider(),replaceable:n({validator:"resource",params:{pool:"$tag/block"}}),ground_state:i("block_state_provider"),vegetation_feature:l};e.register("configured_feature",_o.Mod(_o.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/feature"}}),config:_o.ObjectNode({[_o.Switch]:["pop",{push:"type"}],[_o.Case]:{"minecraft:bamboo":{probability:_o.NumberNode({min:0,max:1})},"minecraft:basalt_columns":{reach:bo.IntProvider({min:0,max:3}),height:bo.IntProvider({min:1,max:10})},"minecraft:block_pile":{state_provider:i("block_state_provider")},"minecraft:decorated":{decorator:i("configured_decorator"),feature:l},"minecraft:decorated_flower":{decorator:i("configured_decorator"),feature:l},"minecraft:delta_feature":{contents:i("block_state"),rim:i("block_state"),size:bo.IntProvider({min:0,max:16}),rim_size:bo.IntProvider({min:0,max:16})},"minecraft:disk":o,"minecraft:dripstone_cluster":{floor_to_ceiling_search_range:_o.NumberNode({integer:!0,min:1,max:512}),height:bo.IntProvider({min:0,max:128}),radius:bo.IntProvider({min:0,max:128}),max_stalagmite_stalactite_height_diff:_o.NumberNode({integer:!0,min:0,max:64}),height_deviation:_o.NumberNode({integer:!0,min:1,max:64}),dripstone_block_layer_thickness:bo.IntProvider({min:0,max:128}),density:bo.FloatProvider({min:0,max:2}),wetness:bo.FloatProvider({min:0,max:2}),chance_of_dripstone_column_at_max_distance_from_center:_o.NumberNode({min:0,max:1}),max_distance_from_edge_affecting_chance_of_dripstone_column:_o.NumberNode({integer:!0,min:1,max:64}),max_distance_from_center_affecting_height_bias:_o.NumberNode({integer:!0,min:1,max:64})},"minecraft:end_gateway":{exact:_o.BooleanNode(),exit:_o.Opt(i("block_pos"))},"minecraft:end_spike":{crystal_invulnerable:_o.Opt(_o.BooleanNode()),crystal_beam_target:_o.Opt(i("block_pos")),spikes:_o.ListNode(_o.ObjectNode({centerX:_o.Opt(_o.NumberNode({integer:!0})),centerZ:_o.Opt(_o.NumberNode({integer:!0})),radius:_o.Opt(_o.NumberNode({integer:!0})),height:_o.Opt(_o.NumberNode({integer:!0})),guarded:_o.Opt(_o.BooleanNode())}))},"minecraft:fill_layer":{state:i("block_state"),height:_o.NumberNode({integer:!0,min:0,max:255})},"minecraft:flower":r,"minecraft:forest_rock":{state:i("block_state")},"minecraft:fossil":{max_empty_corners_allowed:_o.NumberNode({integer:!0,min:0,max:7}),fossil_structures:_o.ListNode(n({validator:"resource",params:{pool:"$structure"}})),overlay_structures:_o.ListNode(n({validator:"resource",params:{pool:"$structure"}})),fossil_processors:vo.Processors,overlay_processors:vo.Processors},"minecraft:geode":{blocks:_o.ObjectNode({filling_provider:i("block_state_provider"),inner_layer_provider:i("block_state_provider"),alternate_inner_layer_provider:i("block_state_provider"),middle_layer_provider:i("block_state_provider"),outer_layer_provider:i("block_state_provider"),inner_placements:_o.ListNode(i("block_state")),cannot_replace:n({validator:"resource",params:{pool:"$tag/block"}}),invalid_blocks:n({validator:"resource",params:{pool:"$tag/block"}})}),layers:_o.ObjectNode({filling:_o.Opt(_o.NumberNode({min:.01,max:50})),inner_layer:_o.Opt(_o.NumberNode({min:.01,max:50})),middle_layer:_o.Opt(_o.NumberNode({min:.01,max:50})),outer_layer:_o.Opt(_o.NumberNode({min:.01,max:50}))}),crack:_o.ObjectNode({generate_crack_chance:_o.Opt(_o.NumberNode({min:0,max:1})),base_crack_size:_o.Opt(_o.NumberNode({min:0,max:5})),crack_point_offset:_o.Opt(_o.NumberNode({min:0,max:10,integer:!0}))}),noise_multiplier:_o.Opt(_o.NumberNode({min:0,max:1})),use_potential_placements_chance:_o.Opt(_o.NumberNode({min:0,max:1})),use_alternate_layer0_chance:_o.Opt(_o.NumberNode({min:0,max:1})),placements_require_layer0_alternate:_o.Opt(_o.BooleanNode()),outer_wall_distance:_o.Opt(bo.IntProvider({min:1,max:20})),distribution_points:_o.Opt(bo.IntProvider({min:1,max:20})),point_offset:_o.Opt(bo.IntProvider({min:0,max:10})),min_gen_offset:_o.Opt(_o.NumberNode({integer:!0})),max_gen_offset:_o.Opt(_o.NumberNode({integer:!0})),invalid_blocks_threshold:_o.NumberNode({integer:!0})},"minecraft:glow_lichen":{search_range:_o.Opt(_o.NumberNode({min:1,max:64,integer:!0})),chance_of_spreading:_o.Opt(_o.NumberNode({min:0,max:1})),can_place_on_floor:_o.Opt(_o.BooleanNode()),can_place_on_ceiling:_o.Opt(_o.BooleanNode()),can_place_on_wall:_o.Opt(_o.BooleanNode()),can_be_placed_on:_o.ListNode(i("block_state"))},"minecraft:growing_plant":{direction:n({enum:["up","down","north","east","south","west"]}),allow_water:_o.BooleanNode(),height_distribution:_o.ListNode(_o.ObjectNode({weight:_o.NumberNode({integer:!0}),data:bo.IntProvider()})),body_provider:i("block_state_provider"),head_provider:i("block_state_provider")},"minecraft:huge_brown_mushroom":a,"minecraft:huge_fungus":{hat_state:i("block_state"),decor_state:i("block_state"),stem_state:i("block_state"),valid_base_block:i("block_state"),planted:_o.Opt(_o.BooleanNode())},"minecraft:huge_red_mushroom":a,"minecraft:ice_patch":o,"minecraft:iceberg":{state:i("block_state")},"minecraft:lake":{state:i("block_state")},"minecraft:large_dripstone":{floor_to_ceiling_search_range:_o.Opt(_o.NumberNode({integer:!0,min:1,max:512})),column_radius:bo.IntProvider({min:0,max:60}),height_scale:bo.FloatProvider({min:0,max:20}),max_column_radius_to_cave_height_ratio:_o.NumberNode({min:0,max:1}),stalactite_bluntness:bo.FloatProvider({min:.1,max:10}),stalagmite_bluntness:bo.FloatProvider({min:.1,max:10}),wind_speed:bo.FloatProvider({min:0,max:2}),min_radius_for_wind:_o.NumberNode({integer:!0,min:0,max:100}),min_bluntness_for_wind:_o.NumberNode({min:0,max:5})},"minecraft:nether_forest_vegetation":{state_provider:i("block_state_provider")},"minecraft:netherrack_replace_blobs":{state:i("block_state"),target:i("block_state"),radius:bo.IntProvider({min:0,max:12})},"minecraft:no_bonemeal_flower":r,"minecraft:ore":c,"minecraft:random_patch":r,"minecraft:random_boolean_selector":{feature_false:l,feature_true:l},"minecraft:random_selector":{features:_o.ListNode(_o.ObjectNode({chance:_o.NumberNode({min:0,max:1}),feature:l})),default:l},"minecraft:replace_single_block":{targets:_o.ListNode(s)},"minecraft:root_system":{required_vertical_space_for_tree:_o.NumberNode({integer:!0,min:1,max:64}),root_radius:_o.NumberNode({integer:!0,min:1,max:64}),root_placement_attempts:_o.NumberNode({integer:!0,min:1,max:256}),root_column_max_height:_o.NumberNode({integer:!0,min:1,max:4096}),hanging_root_radius:_o.NumberNode({integer:!0,min:1,max:64}),hanging_roots_vertical_span:_o.NumberNode({integer:!0,min:0,max:16}),hanging_root_placement_attempts:_o.NumberNode({integer:!0,min:0,max:256}),allowed_vertical_water_for_tree:_o.NumberNode({integer:!0,min:1,max:64}),root_replaceable:n({validator:"resource",params:{pool:"$tag/block"}}),root_state_provider:i("block_state_provider"),hanging_root_state_provider:i("block_state_provider"),feature:l},"minecraft:scattered_ore":c,"minecraft:sea_pickle":{count:bo.IntProvider({min:0,max:256})},"minecraft:seagrass":{probability:_o.NumberNode({min:0,max:1})},"minecraft:simple_block":{to_place:i("block_state_provider"),place_on:_o.Opt(_o.ListNode(i("block_state"))),place_in:_o.Opt(_o.ListNode(i("block_state"))),place_under:_o.Opt(_o.ListNode(i("block_state")))},"minecraft:simple_random_selector":{features:_o.ListNode(l)},"minecraft:small_dripstone":{max_placements:_o.Opt(_o.NumberNode({integer:!0,min:0,max:100})),empty_space_search_radius:_o.Opt(_o.NumberNode({integer:!0,min:0,max:20})),max_offset_from_origin:_o.Opt(_o.NumberNode({integer:!0,min:0,max:20})),chance_of_taller_dripstone:_o.Opt(_o.NumberNode({min:0,max:1}))},"minecraft:spring_feature":{state:i("fluid_state"),rock_count:_o.NumberNode({integer:!0}),hole_count:_o.NumberNode({integer:!0}),requires_block_below:_o.BooleanNode(),valid_blocks:_o.ListNode(n({validator:"resource",params:{pool:"block"}}))},"minecraft:tree":{ignore_vines:_o.Opt(_o.BooleanNode()),force_dirt:_o.Opt(_o.BooleanNode()),minimum_size:i("feature_size"),dirt_provider:i("block_state_provider"),sapling_provider:i("block_state_provider"),trunk_provider:i("block_state_provider"),foliage_provider:i("block_state_provider"),trunk_placer:_o.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/trunk_placer_type"}}),base_height:_o.NumberNode({integer:!0,min:0,max:32}),height_rand_a:_o.NumberNode({integer:!0,min:0,max:24}),height_rand_b:_o.NumberNode({integer:!0,min:0,max:24}),[_o.Switch]:[{push:"type"}],[_o.Case]:{"minecraft:bending_trunk_placer":{bend_length:bo.IntProvider({min:1,max:64}),min_height_for_leaves:_o.Opt(_o.NumberNode({integer:!0,min:1}))}}},{context:"trunk_placer"}),foliage_placer:_o.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/foliage_placer_type"}}),radius:bo.IntProvider({min:0,max:16}),offset:bo.IntProvider({min:0,max:16}),[_o.Switch]:[{push:"type"}],[_o.Case]:{"minecraft:blob_foliage_placer":{height:_o.NumberNode({integer:!0,min:0,max:16})},"minecraft:bush_foliage_placer":{height:_o.NumberNode({integer:!0,min:0,max:16})},"minecraft:fancy_foliage_placer":{height:_o.NumberNode({integer:!0,min:0,max:16})},"minecraft:jungle_foliage_placer":{height:_o.NumberNode({integer:!0,min:0,max:16})},"minecraft:mega_pine_foliage_placer":{crown_height:bo.IntProvider({min:0,max:24})},"minecraft:pine_foliage_placer":{height:bo.IntProvider({min:0,max:24})},"minecraft:random_spread_foliage_placer":{foliage_height:bo.IntProvider({min:1,max:512}),leaf_placement_attempts:_o.NumberNode({integer:!0,min:0,max:256})},"minecraft:spruce_foliage_placer":{trunk_height:bo.IntProvider({min:0,max:24})}}},{context:"foliage_placer",disableSwitchContext:!0}),decorators:_o.ListNode(_o.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/tree_decorator_type"}}),[_o.Switch]:[{push:"type"}],[_o.Case]:{"minecraft:alter_ground":{provider:i("block_state_provider")},"minecraft:beehive":{probability:_o.NumberNode({min:0,max:1})},"minecraft:cocoa":{probability:_o.NumberNode({min:0,max:1})}}},{context:"tree_decorator"}))},"minecraft:underwater_magma":{floor_search_range:_o.NumberNode({integer:!0,min:0,max:512}),placement_radius_around_floor:_o.NumberNode({integer:!0,min:0,max:64}),placement_probability_per_valid_position:_o.NumberNode({min:0,max:1})},"minecraft:vegetation_patch":u,"minecraft:waterlogged_vegetation_patch":u}},{context:"feature"})},{context:"feature"}),{default:()=>({type:"minecraft:decorated",config:{decorator:{type:"minecraft:count",config:{count:4}},feature:{type:"minecraft:tree",config:{max_water_depth:0,ignore_vines:!0,minimum_size:{},trunk_placer:{base_height:5,height_rand_a:2,height_rand_b:0},foliage_placer:{radius:2,offset:0,height:3}}}}})})),e.register("feature_size",_o.Mod(_o.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/feature_size_type"}}),min_clipped_height:_o.Opt(_o.NumberNode({min:0,max:80})),[_o.Switch]:[{push:"type"}],[_o.Case]:{"minecraft:two_layers_feature_size":{limit:_o.Opt(_o.NumberNode({integer:!0,min:0,max:81})),lower_size:_o.Opt(_o.NumberNode({integer:!0,min:0,max:16})),upper_size:_o.Opt(_o.NumberNode({integer:!0,min:0,max:16}))},"minecraft:three_layers_feature_size":{limit:_o.Opt(_o.NumberNode({integer:!0,min:0,max:80})),upper_limit:_o.Opt(_o.NumberNode({integer:!0,min:0,max:80})),lower_size:_o.Opt(_o.NumberNode({integer:!0,min:0,max:16})),middle_size:_o.Opt(_o.NumberNode({integer:!0,min:0,max:16})),upper_size:_o.Opt(_o.NumberNode({integer:!0,min:0,max:16}))}}},{disableSwitchContext:!0}),{default:()=>({type:"minecraft:two_layers_feature_size"})})),e.register("block_state_provider",_o.Mod(_o.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/block_state_provider_type"}}),[_o.Switch]:[{push:"type"}],[_o.Case]:{"minecraft:randomized_int_state_provider":{property:n(),values:bo.IntProvider(),source:i("block_state_provider")},"minecraft:rotated_block_provider":{state:i("block_state")},"minecraft:simple_state_provider":{state:i("block_state")},"minecraft:weighted_state_provider":{entries:_o.ListNode(_o.Mod(_o.ObjectNode({weight:_o.NumberNode({integer:!0,min:1}),data:i("block_state")}),{default:()=>({data:{}})}))}}},{context:"block_state_provider"}),{default:()=>({type:"minecraft:simple_state_provider"})})),e.register("block_placer",_o.Mod(_o.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/block_placer_type"}}),[_o.Switch]:[{push:"type"}],[_o.Case]:{"minecraft:column_placer":{size:bo.IntProvider({min:0})}}},{context:"block_placer"}),{default:()=>({type:"minecraft:simple_block_placer"})}))};var yo={};Object.defineProperty(yo,"__esModule",{value:!0}),yo.initNoiseSettingsSchemas=void 0;const wo=Pe,xo=Fr;yo.initNoiseSettingsSchemas=function(e,t){const i=wo.Reference.bind(void 0,e),n=wo.StringNode.bind(void 0,t);e.register("noise_settings",wo.Mod(wo.ObjectNode({name:wo.Mod(n({validator:"resource",params:{pool:"$worldgen/noise_settings",isDefinition:!0}}),{enabled:e=>e.getArray().length>0}),bedrock_roof_position:wo.NumberNode({integer:!0}),bedrock_floor_position:wo.NumberNode({integer:!0}),sea_level:wo.NumberNode({integer:!0}),min_surface_level:wo.NumberNode({integer:!0}),disable_mob_generation:wo.BooleanNode(),noise_caves_enabled:wo.BooleanNode(),noodle_caves_enabled:wo.BooleanNode(),aquifers_enabled:wo.BooleanNode(),deepslate_enabled:wo.BooleanNode(),ore_veins_enabled:wo.BooleanNode(),default_block:i("block_state"),default_fluid:i("block_state"),noise:wo.ObjectNode({min_y:wo.NumberNode({integer:!0,min:-2048,max:2047}),height:wo.NumberNode({integer:!0,min:0,max:4096}),density_factor:wo.NumberNode(),density_offset:wo.NumberNode(),size_horizontal:wo.NumberNode({integer:!0}),size_vertical:wo.NumberNode({integer:!0}),simplex_surface_noise:wo.BooleanNode(),random_density_offset:wo.Opt(wo.BooleanNode()),island_noise_override:wo.Opt(wo.BooleanNode()),amplified:wo.Opt(wo.BooleanNode()),sampling:wo.ObjectNode({xz_scale:wo.NumberNode(),y_scale:wo.NumberNode(),xz_factor:wo.NumberNode(),y_factor:wo.NumberNode()}),bottom_slide:wo.ObjectNode({target:wo.NumberNode({integer:!0}),size:wo.NumberNode({integer:!0,min:0}),offset:wo.NumberNode({integer:!0})}),top_slide:wo.ObjectNode({target:wo.NumberNode({integer:!0}),size:wo.NumberNode({integer:!0,min:0}),offset:wo.NumberNode({integer:!0})})}),structures:i("generator_structures")},{context:"noise_settings"}),(e=>({default:()=>xo.DefaultNoiseSettings,validate:(t,i,n,r)=>{var o,a,s,c;return(null===(o=null==(i=e.validate(t,i,n,r))?void 0:i.noise)||void 0===o?void 0:o.min_y)+(null===(a=null==i?void 0:i.noise)||void 0===a?void 0:a.height)>2047&&n.add(t.push("noise").push("height"),"error.min_y_plus_height",2047),(null===(s=null==i?void 0:i.noise)||void 0===s?void 0:s.height)%16!=0&&n.add(t.push("noise").push("height"),"error.height_multiple",16),(null===(c=null==i?void 0:i.noise)||void 0===c?void 0:c.min_y)%16!=0&&n.add(t.push("noise").push("min_y"),"error.min_y_multiple",16),i}})))),e.register("generator_structures",wo.ObjectNode({stronghold:wo.Opt(wo.ObjectNode({distance:wo.NumberNode({integer:!0,min:0,max:1023}),spread:wo.NumberNode({integer:!0,min:0,max:1023}),count:wo.NumberNode({integer:!0,min:1,max:4095})})),structures:wo.MapNode(n({validator:"resource",params:{pool:"worldgen/structure_feature"}}),wo.Mod(wo.ObjectNode({spacing:wo.NumberNode({integer:!0,min:0,max:4096}),separation:wo.Mod(wo.NumberNode({integer:!0,min:0,max:4096}),(e=>({validate:(t,i,n,r)=>(t.pop().push("spacing").get()<=i&&n.add(t,"error.separation_smaller_spacing"),e.validate(t,i,n,r))}))),salt:wo.NumberNode({integer:!0,min:0})},{context:"generator_structure"}),{default:()=>({spacing:10,separation:5,salt:0})}))})),e.register("generator_layer",wo.Mod(wo.ObjectNode({block:n({validator:"resource",params:{pool:"block"}}),height:wo.NumberNode({integer:!0,min:1})}),{default:()=>({block:"minecraft:stone",height:1})}))};var No={};Object.defineProperty(No,"__esModule",{value:!0}),No.initStructureFeatureSchemas=void 0;const ko=Pe;No.initStructureFeatureSchemas=function(e,t){const i=ko.StringNode.bind(void 0,t),n=ko.Reference.bind(void 0,e),r={start_pool:i({validator:"resource",params:{pool:"$worldgen/template_pool"}}),size:ko.NumberNode({integer:!0})};e.register("configured_structure_feature",ko.Mod(ko.ObjectNode({type:i({validator:"resource",params:{pool:"worldgen/structure_feature"}}),config:ko.ObjectNode({[ko.Switch]:["pop",{push:"type"}],[ko.Case]:{"minecraft:bastion_remnant":r,"minecraft:buried_treasure":{probability:ko.NumberNode({min:0,max:1})},"minecraft:mineshaft":{type:i({enum:["normal","mesa"]}),probability:ko.NumberNode({min:0,max:1})},"minecraft:nether_fossil":{height:n("height_provider")},"minecraft:ocean_ruin":{biome_temp:i({enum:["cold","warm"]}),large_probability:ko.NumberNode({min:0,max:1}),cluster_probability:ko.NumberNode({min:0,max:1})},"minecraft:pillager_outpost":r,"minecraft:ruined_portal":{portal_type:i({enum:["standard","desert","jungle","mountain","nether","ocean","swamp"]})},"minecraft:shipwreck":{is_beached:ko.Opt(ko.BooleanNode())},"minecraft:village":r}},{context:"structure_feature",disableSwitchContext:!0})},{context:"structure_feature"}),{default:()=>({type:"minecraft:bastion_remnant",config:{start_pool:"minecraft:bastion/starts",size:6}})}))};var Ao={};Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.initSurfaceBuilderSchemas=void 0;const Co=Pe;Ao.initSurfaceBuilderSchemas=function(e,t){const i=Co.StringNode.bind(void 0,t),n=Co.Reference.bind(void 0,e);e.register("configured_surface_builder",Co.Mod(Co.ObjectNode({type:i({validator:"resource",params:{pool:"worldgen/surface_builder"}}),config:Co.ObjectNode({top_material:n("block_state"),under_material:n("block_state"),underwater_material:n("block_state")},{context:"surface_builder"})},{context:"surface_builder"}),{default:()=>({type:"minecraft:default",config:{top_material:{Name:"minecraft:grass_block",Properties:{snowy:"false"}},under_material:{Name:"minecraft:dirt"},underwater_material:{Name:"minecraft:gravel"}}})}))};var Oo={};Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.initTemplatePoolSchemas=void 0;const So=Pe,Eo=fo;Oo.initTemplatePoolSchemas=function(e,t){const i=So.Reference.bind(void 0,e),n=So.StringNode.bind(void 0,t);e.register("template_pool",So.Mod(So.ObjectNode({name:n(),fallback:n(),elements:So.ListNode(i("template_weighted_element"))},{context:"template_pool"}),{default:()=>({fallback:"minecraft:empty",elements:[{weight:1,element:{element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"}}]})})),e.register("template_weighted_element",So.Mod(So.ObjectNode({weight:So.NumberNode({integer:!0,min:1}),element:i("template_element")},{category:"pool"}),{default:()=>({weight:1,element:{element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"}})})),e.register("template_element",So.Mod(So.ObjectNode({element_type:n({validator:"resource",params:{pool:"worldgen/structure_pool_element"}}),projection:n({enum:["rigid","terrain_matching"]}),[So.Switch]:[{push:"element_type"}],[So.Case]:{"minecraft:feature_pool_element":{feature:n({validator:"resource",params:{pool:"$worldgen/configured_feature"}})},"minecraft:legacy_single_pool_element":{location:n({validator:"resource",params:{pool:"$structure"}}),processors:Eo.Processors},"minecraft:list_pool_element":{elements:So.ListNode(i("template_element"))},"minecraft:single_pool_element":{location:n({validator:"resource",params:{pool:"$structure"}}),processors:Eo.Processors}}},{context:"template_element",disableSwitchContext:!0}),{default:()=>({element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"})}))},Object.defineProperty(ro,"__esModule",{value:!0}),ro.initWorldgenSchemas=void 0;const Fo=oo,Do=so,Bo=uo,Lo=mo,Mo=yo,To=fo,Ro=No,$o=Ao,jo=Oo;ro.initWorldgenSchemas=function(e,t){To.initProcessorListSchemas(e,t),Fo.initBiomeSchemas(e,t),Do.initCarverSchemas(e,t),Bo.initDecoratorSchemas(e,t),Lo.initFeatureSchemas(e,t),Mo.initNoiseSettingsSchemas(e,t),Ro.initStructureFeatureSchemas(e,t),$o.initSurfaceBuilderSchemas(e,t),jo.initTemplatePoolSchemas(e,t)};var Io={};Object.defineProperty(Io,"__esModule",{value:!0}),Io.initWorldSettingsSchemas=void 0;const Po=Pe;Io.initWorldSettingsSchemas=function(e,t){const i=Po.Reference.bind(void 0,e),n=Po.StringNode.bind(void 0,t);e.register("world_settings",Po.Mod(Po.ObjectNode({generate_features:Po.BooleanNode(),bonus_chest:Po.BooleanNode(),seed:Po.NumberNode({integer:!0}),dimensions:Po.MapNode(n({validator:"resource",params:{pool:"$dimension"}}),i("dimension"))},{context:"world_settings"}),{default:()=>{const e=Math.floor(4294967296*Math.random())-2147483648;return{generate_features:!0,bonus_chest:!1,seed:e,dimensions:{"minecraft:overworld":{type:"minecraft:overworld",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:vanilla_layered",seed:e},settings:"minecraft:overworld"}},"minecraft:the_nether":{type:"minecraft:the_nether",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:multi_noise",seed:e,humidity_noise:{firstOctave:-7,amplitudes:[1,1]},altitude_noise:{firstOctave:-7,amplitudes:[1,1]},weirdness_noise:{firstOctave:-7,amplitudes:[1,1]},temperature_noise:{firstOctave:-7,amplitudes:[1,1]},biomes:[{parameters:{altitude:0,weirdness:0,offset:0,temperature:0,humidity:0},biome:"minecraft:nether_wastes"},{parameters:{altitude:0,weirdness:0,offset:0,temperature:0,humidity:-.5},biome:"minecraft:soul_sand_valley"},{parameters:{altitude:0,weirdness:0,offset:0,temperature:.4,humidity:0},biome:"minecraft:crimson_forest"},{parameters:{altitude:0,weirdness:0,offset:.375,temperature:0,humidity:.5},biome:"minecraft:warped_forest"},{parameters:{altitude:0,weirdness:0,offset:.175,temperature:-.5,humidity:0},biome:"minecraft:basalt_deltas"}]},settings:"minecraft:nether"}},"minecraft:the_end":{type:"minecraft:the_end",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:the_end",seed:e},settings:"minecraft:end"}}}}}}))},Object.defineProperty(yr,"__esModule",{value:!0}),yr.initSchemas=void 0;const zo=wr,Uo=Nr,Wo=Fr,Ho=Dr,qo=Mr,Vo=$r,Go=Pr,Ko=Wr,Xo=Kr,Jo=Jr,Yo=Zr,Zo=eo,Qo=io,ea=ro,ta=Io;yr.initSchemas=function(e,t){Wo.initCommonSchemas(e,t),zo.initAdvancementSchemas(e,t),Uo.initAssetsSchemas(e,t),Ho.initConditionSchemas(e,t),Vo.initDimensionTypeSchemas(e,t),qo.initDimensionSchemas(e,t),Go.initItemModifierSchemas(e,t),Ko.initLootTableSchemas(e,t),Xo.initPackMcmetaSchemas(e,t),Jo.initPredicatesSchemas(e,t),Yo.initRecipeSchemas(e,t),Zo.initTagsSchemas(e,t),Qo.initTextComponentSchemas(e,t),ea.initWorldgenSchemas(e,t),ta.initWorldSettingsSchemas(e,t)};var ia=Ie&&Ie.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),na=Ie&&Ie.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ra=Ie&&Ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.hasOwnProperty.call(e,i)&&ia(t,e,i);return na(t,e),t};Object.defineProperty(br,"__esModule",{value:!0});var oa=br.getSchemas=br.getCollections=void 0;const aa=Pe,sa=vr,ca=yr;var la=br.lootContext=ra(Hr);var ua=br.getCollections=function(){const e=new aa.CollectionRegistry;return sa.initCollections(e),e};oa=br.getSchemas=function(e){const t=new aa.SchemaRegistry;return ca.initSchemas(t,e),t};var da=Object.freeze(Object.assign(Object.create(null),br,{[Symbol.toStringTag]:"Module",get getSchemas(){return oa},get getCollections(){return ua},lootContext:la,default:br})),ha={},pa={};Object.defineProperty(pa,"__esModule",{value:!0}),pa.initCollections=void 0,pa.initCollections=function(e){e.register("advancement_trigger",["minecraft:bee_nest_destroyed","minecraft:bred_animals","minecraft:brewed_potion","minecraft:changed_dimension","minecraft:channeled_lightning","minecraft:construct_beacon","minecraft:consume_item","minecraft:cured_zombie_villager","minecraft:effects_changed","minecraft:enchanted_item","minecraft:enter_block","minecraft:entity_hurt_player","minecraft:entity_killed_player","minecraft:fall_from_height","minecraft:filled_bucket","minecraft:fishing_rod_hooked","minecraft:hero_of_the_village","minecraft:impossible","minecraft:inventory_changed","minecraft:item_durability_changed","minecraft:item_used_on_block","minecraft:killed_by_crossbow","minecraft:levitation","minecraft:lightning_strike","minecraft:location","minecraft:nether_travel","minecraft:placed_block","minecraft:player_generates_container_loot","minecraft:player_hurt_entity","minecraft:player_interacted_with_entity","minecraft:player_killed_entity","minecraft:recipe_unlocked","minecraft:ride_entity_in_lava","minecraft:shot_crossbow","minecraft:slept_in_bed","minecraft:slide_down_block","minecraft:started_riding","minecraft:summoned_entity","minecraft:tame_animal","minecraft:target_hit","minecraft:tick","minecraft:thrown_item_picked_up_by_entity","minecraft:used_ender_eye","minecraft:used_totem","minecraft:using_item","minecraft:villager_trade","minecraft:voluntary_exile"]),e.register("keybind",["key.advancements","key.attack","key.back","key.chat","key.command","key.drop","key.forward","key.fullscreen","key.hotbar.1","key.hotbar.2","key.hotbar.3","key.hotbar.4","key.hotbar.5","key.hotbar.6","key.hotbar.7","key.hotbar.8","key.hotbar.9","key.inventory","key.jump","key.left","key.loadToolbarActivator","key.pickItem","key.playerlist","key.right","key.saveToolbarActivator","key.screenshot","key.smoothCamera","key.sneak","key.spectatorOutlines","key.sprint","key.swapOffhand","key.togglePerspective","key.use"]),e.register("slot",["mainhand","offhand","head","chest","legs","feet"]),e.register("gamemode",["survival","creative","adventure","spectator"]),e.register("entity_source",["this","killer","direct_killer","killer_player"]),e.register("copy_source",["block_entity","this","killer","killer_player"]),e.register("loot_table_apply_bonus_formula",["minecraft:uniform_bonus_count","minecraft:binomial_with_bonus_count","minecraft:ore_drops"]),e.register("map_decoration",["mansion","monument","player","frame","red_marker","blue_marker","target_x","target_point","player_off_map","player_off_limits","red_x","banner_white","banner_orange","banner_magenta","banner_light_blue","banner_yellow","banner_lime","banner_pink","banner_gray","banner_light_gray","banner_cyan","banner_purple","banner_blue","banner_brown","banner_green","banner_red","banner_black"]),e.register("map_feature",["bastion_remnant","buried_treasure","desert_pyramid","endcity","fortress","igloo","jungle_pyramid","mansion","mineshaft","monument","nether_fossil","ocean_ruin","pillager_outpost","ruined_portal","shipwreck","stronghold","swamp_hut","village"]),e.register("recipe_group",["bed","light_gray_dye","iron_ingot","wooden_stairs","black_dye","stained_terracotta","dyed_bed","magenta_dye","bark","rabbit_stew","light_blue_dye","wooden_fence_gate","planks","stained_glass","wooden_door","stained_glass_pane","wooden_fence","sticks","concrete_powder","wooden_pressure_plate","boat","brown_dye","yellow_dye","bonemeal","red_dye","wooden_trapdoor","wooden_button","gold_ingot","pink_dye","wooden_slab","orange_dye","carpet","sign","wool","sugar","blue_dye","white_dye","banner","netherite_ingot"]),e.register("biome_category",["beach","desert","extreme_hills","forest","icy","jungle","mesa","mountain","mushroom","nether","none","ocean","plains","river","savanna","swamp","taiga","the_end","underground"]),e.register("heightmap_type",["MOTION_BLOCKING","MOTION_BLOCKING_NO_LEAVES","OCEAN_FLOOR","OCEAN_FLOOR_WG","WORLD_SURFACE","WORLD_SURFACE_WG"]),e.register("generation_step",["air","liquid"]),e.register("loot_context_type",["minecraft:empty","minecraft:chest","minecraft:command","minecraft:selector","minecraft:fishing","minecraft:entity","minecraft:gift","minecraft:barter","minecraft:advancement_reward","minecraft:advancement_entity","minecraft:generic","minecraft:block"]),e.register("banner_pattern",["base","square_bottom_left","square_bottom_right","square_top_left","square_top_right","stripe_bottom","stripe_top","stripe_left","stripe_right","stripe_center","stripe_middle","stripe_downright","stripe_downleft","small_stripes","cross","straight_cross","triangle_bottom","triangle_top","triangles_bottom","triangles_top","diagonal_left","diagonal_up_right","diagonal_up_left","diagonal_right","circle","rhombus","half_vertical","half_horizontal","half_vertical_right","half_horizontal_bottom","border","curly_border","gradient","gradient_up","bricks","globe","creeper","skull","flower","mojang","piglin"]),e.register("dye_color",["white","orange","magenta","light_blue","yellow","lime","pink","gray","light_gray","cyan","purple","blue","brown","green","red","black"]),e.register("cave_surface",["floor","ceiling"]),e.register("direction",["down","up","north","east","south","west"]),e.register("axis",["x","y","z"]),e.register("display_position",["firstperson_righthand","firstperson_lefthand","thirdperson_righthand","thirdperson_lefthand","gui","head","ground","fixed"]),e.register("gui_light",["front","side"]),e.register("item_model_predicates",["angle","blocking","broken","cast","charged","cooldown","custom_model_data","damage","damaged","firework","lefthanded","pull","pulling","throwing","time"])};var ma={},fa={};Object.defineProperty(fa,"__esModule",{value:!0}),fa.initAdvancementSchemas=void 0;const ga=Pe;fa.initAdvancementSchemas=function(e,t){const i=ga.Reference.bind(void 0,e),n=ga.StringNode.bind(void 0,t),r=ga.ChoiceNode([{type:"object",node:ga.Opt(i("entity_predicate")),change:e=>{var t,i;return null!==(i=null===(t=e[0])||void 0===t?void 0:t.predicate)&&void 0!==i?i:{}}},{type:"list",node:ga.ListNode(i("condition")),change:e=>[{condition:"minecraft:entity_properties",predicate:e}]}],{context:"conditions"});e.register("advancement",ga.Mod(ga.ObjectNode({display:ga.Opt(ga.Mod(ga.ObjectNode({icon:ga.ObjectNode({item:n({validator:"resource",params:{pool:"item"}}),nbt:ga.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"item"}]}}}))}),title:i("text_component"),description:i("text_component"),background:ga.Opt(n()),frame:ga.Opt(n({enum:["task","challenge","goal"]})),show_toast:ga.Opt(ga.BooleanNode()),announce_to_chat:ga.Opt(ga.BooleanNode()),hidden:ga.Opt(ga.BooleanNode())}),{default:()=>({icon:{item:"minecraft:stone"},title:"",description:""})})),parent:ga.Opt(n({validator:"resource",params:{pool:"$advancement"}})),criteria:ga.MapNode(n(),i("advancement_criteria")),requirements:ga.Opt(ga.ListNode(ga.ListNode(n()))),rewards:ga.Opt(ga.ObjectNode({function:ga.Opt(n({validator:"resource",params:{pool:"$function"}})),loot:ga.Opt(ga.ListNode(n({validator:"resource",params:{pool:"$loot_table"}}))),recipes:ga.Opt(ga.ListNode(n({validator:"resource",params:{pool:"$recipe"}}))),experience:ga.Opt(ga.NumberNode({integer:!0}))}))},{context:"advancement"}),{default:()=>({criteria:{requirement:{trigger:"minecraft:location"}}})})),e.register("advancement_criteria",ga.ObjectNode({trigger:n({validator:"resource",params:{pool:t.get("advancement_trigger")}}),conditions:ga.Opt(ga.ObjectNode({player:ga.Mod(r,{enabled:e=>"minecraft:impossible"!==e.pop().push("trigger").get()}),[ga.Switch]:["pop",{push:"trigger"}],[ga.Case]:{"minecraft:bee_nest_destroyed":{block:ga.Opt(n({validator:"resource",params:{pool:"block"}})),num_bees_inside:ga.Opt(ga.NumberNode({integer:!0})),item:ga.Opt(i("item_predicate"))},"minecraft:bred_animals":{parent:r,partner:r,child:r},"minecraft:brewed_potion":{potion:ga.Opt(n({validator:"resource",params:{pool:"potion"}}))},"minecraft:changed_dimension":{from:ga.Opt(n({validator:"resource",params:{pool:"$dimension"}})),to:ga.Opt(n({validator:"resource",params:{pool:"$dimension"}}))},"minecraft:channeled_lightning":{victims:ga.Opt(ga.ListNode(r))},"minecraft:construct_beacon":{level:i("int_bounds")},"minecraft:consume_item":{item:ga.Opt(i("item_predicate"))},"minecraft:cured_zombie_villager":{villager:r,zombie:r},"minecraft:effects_changed":{effects:ga.Opt(ga.MapNode(n({validator:"resource",params:{pool:"mob_effect"}}),ga.ObjectNode({amplifier:i("int_bounds"),duration:i("int_bounds")}))),source:ga.Opt(r)},"minecraft:enter_block":{block:ga.Opt(n({validator:"resource",params:{pool:"block"}})),state:ga.Opt(ga.MapNode(n(),n(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}}))},"minecraft:enchanted_item":{levels:i("int_bounds"),item:ga.Opt(i("item_predicate"))},"minecraft:entity_hurt_player":{damage:ga.Opt(i("damage_predicate"))},"minecraft:entity_killed_player":{entity:r,killing_blow:ga.Opt(i("damage_source_predicate"))},"minecraft:fall_from_height":{start_position:ga.Opt(i("location_predicate")),distance:ga.Opt(i("distance_predicate"))},"minecraft:filled_bucket":{item:ga.Opt(i("item_predicate"))},"minecraft:fishing_rod_hooked":{entity:r,item:ga.Opt(i("item_predicate"))},"minecraft:hero_of_the_village":{location:ga.Opt(i("location_predicate"))},"minecraft:inventory_changed":{slots:ga.Opt(ga.ObjectNode({empty:i("int_bounds"),occupied:i("int_bounds"),full:i("int_bounds")})),items:ga.Opt(ga.ListNode(i("item_predicate")))},"minecraft:item_durability_changed":{delta:i("int_bounds"),durability:i("int_bounds"),item:ga.Opt(i("item_predicate"))},"minecraft:item_used_on_block":{item:ga.Opt(i("item_predicate")),location:ga.Opt(i("location_predicate"))},"minecraft:killed_by_crossbow":{unique_entity_types:i("int_bounds"),victims:ga.Opt(ga.ListNode(r))},"minecraft:levitation":{distance:ga.Opt(i("distance_predicate")),duration:i("int_bounds")},"minecraft:lightning_strike":{lightning:r,bystander:r},"minecraft:location":{location:ga.Opt(i("location_predicate"))},"minecraft:nether_travel":{start_position:ga.Opt(i("location_predicate")),distance:ga.Opt(i("distance_predicate"))},"minecraft:placed_block":{block:ga.Opt(n({validator:"resource",params:{pool:"block"}})),state:ga.Opt(ga.MapNode(n(),n(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}})),item:ga.Opt(i("item_predicate")),location:ga.Opt(i("location_predicate"))},"minecraft:player_generates_container_loot":{loot_table:n({validator:"resource",params:{pool:"$loot_table"}})},"minecraft:player_hurt_entity":{damage:ga.Opt(i("damage_predicate")),entity:r},"minecraft:player_interacted_with_entity":{item:ga.Opt(i("item_predicate")),entity:r},"minecraft:player_killed_entity":{entity:r,killing_blow:ga.Opt(i("damage_source_predicate"))},"minecraft:recipe_unlocked":{recipe:n({validator:"resource",params:{pool:"$recipe"}})},"minecraft:ride_entity_in_lava":{start_position:ga.Opt(i("location_predicate")),distance:ga.Opt(i("distance_predicate"))},"minecraft:slept_in_bed":{location:ga.Opt(i("location_predicate"))},"minecraft:slide_down_block":{block:ga.Opt(n({validator:"resource",params:{pool:"block"}}))},"minecraft:shot_crossbow":{item:ga.Opt(i("item_predicate"))},"minecraft:summoned_entity":{entity:r},"minecraft:tame_animal":{entity:r},"minecraft:target_hit":{projectile:r,shooter:r,signal_strength:i("int_bounds")},"minecraft:thrown_item_picked_up_by_entity":{entity:ga.Opt(i("entity_predicate")),item:ga.Opt(i("item_predicate"))},"minecraft:used_ender_eye":{distance:ga.Opt(i("float_bounds"))},"minecraft:used_totem":{item:ga.Opt(i("item_predicate"))},"minecraft:using_item":{item:ga.Opt(i("item_predicate"))},"minecraft:villager_trade":{villager:ga.Opt(i("entity_predicate")),item:ga.Opt(i("item_predicate"))},"minecraft:voluntary_exile":{location:ga.Opt(i("location_predicate"))}}},{context:"criterion"}))},{category:"predicate",context:"criterion"}))};var _a={},ba={};Object.defineProperty(ba,"__esModule",{value:!0}),ba.initModelSchemas=void 0;const va=Pe;ba.initModelSchemas=function(e,t){va.Reference.bind(void 0,e);const i=va.StringNode.bind(void 0,t),n=(e,t,i)=>va.ListNode(va.NumberNode({min:t,max:i}),{minLength:e,maxLength:e}),r=va.ChoiceNode([{type:"alias",match:e=>"string"==typeof e&&e.startsWith("#"),node:i(),change:e=>"string"==typeof e?`#${e}`:"#0"},{type:"reference",match:e=>"string"==typeof e,node:i({validator:"resource",params:{pool:"$texture"}}),change:e=>"string"==typeof e?e.replace(/^#/,""):""}],{choiceContext:"texture"});e.register("model",va.Mod(va.ObjectNode({parent:va.Opt(i({validator:"resource",params:{pool:"$model"}})),ambientocclusion:va.Opt(va.BooleanNode()),gui_light:va.Opt(i({enum:"gui_light"})),textures:va.Opt(va.MapNode(i(),r)),elements:va.Opt(va.ListNode(va.ObjectNode({from:n(3,-16,32),to:n(3,-16,32),rotation:va.Opt(va.ObjectNode({origin:n(3),axis:i({enum:"axis"}),angle:va.NumberEnum({values:[-45,-22.5,0,22.5,45]}),rescale:va.Opt(va.BooleanNode())})),shade:va.Opt(va.BooleanNode()),faces:va.MapNode(i({enum:"direction"}),va.ObjectNode({texture:r,uv:va.Opt(n(4)),cullface:va.Opt(i({enum:"direction"})),rotation:va.Opt(va.NumberNode({integer:!0})),tintindex:va.Opt(va.NumberNode({integer:!0}))}))},{context:"model_element"}))),display:va.Opt(va.MapNode(i({enum:"display_position"}),va.ObjectNode({rotation:n(3),translation:n(3,-80,80),scale:n(3,-4,4)},{context:"item_transform"}))),overrides:va.Opt(va.ListNode(va.ObjectNode({predicate:va.MapNode(i({enum:"item_model_predicates"}),va.NumberNode()),model:i({validator:"resource",params:{pool:"$model"}})},{context:"model_override"})))},{context:"model"}),{default:()=>({parent:"minecraft:item/generated",textures:{layer0:"minecraft:item/diamond"}})}))};var ya={};Object.defineProperty(ya,"__esModule",{value:!0}),ya.initBlockDefinitionSchemas=void 0;const wa=Pe;ya.initBlockDefinitionSchemas=function(e,t){const i=wa.Reference.bind(void 0,e),n=wa.StringNode.bind(void 0,t);e.register("block_definition",wa.Mod(wa.ChoiceNode([{type:"variants",match:e=>void 0!==e.variants,node:wa.ObjectNode({variants:wa.MapNode(n(),i("model_variant"))}),change:e=>({variants:{"":{}}})},{type:"multipart",match:e=>void 0!==e.multipart,node:wa.ObjectNode({multipart:wa.ListNode(wa.ObjectNode({when:wa.Opt(i("multipart_condition")),apply:i("model_variant")}))}),change:e=>({multipart:{when:{},apply:{}}})}],{context:"block_definition"}),{default:()=>({variants:{"":{model:"minecraft:block/stone"}}})}));const r={model:n({validator:"resource",params:{pool:"$model"}}),x:wa.Opt(wa.NumberEnum({integer:!0,values:[0,90,180,270]})),y:wa.Opt(wa.NumberEnum({integer:!0,values:[0,90,180,270]})),uvlock:wa.Opt(wa.BooleanNode())};e.register("model_variant",wa.ChoiceNode([{type:"object",node:wa.ObjectNode(r),change:e=>Array.isArray(e)&&e.length>0?e[0]:{}},{type:"list",node:wa.ListNode(wa.ObjectNode(c(s({},r),{weight:wa.Opt(wa.NumberNode({integer:!0,min:1}))}),{context:"model_variant"})),change:e=>[s({weight:1},e)]}],{context:"model_variant"})),e.register("multipart_condition",wa.ChoiceNode([{type:"object",priority:-1,match:()=>!0,node:wa.MapNode(n(),n()),change:e=>"object"==typeof e&&Array.isArray(null==e?void 0:e.OR)&&e.OR.length>0?e.OR[0]:{}},{type:"or",match:e=>"object"==typeof e&&void 0!==(null==e?void 0:e.OR),node:wa.ObjectNode({OR:wa.ListNode(i("multipart_condition"))}),change:e=>({OR:[null!=e?e:{}]})}],{context:"multipart_condition"}))},Object.defineProperty(_a,"__esModule",{value:!0}),_a.initAssetsSchemas=void 0;const xa=ba,Na=ya;_a.initAssetsSchemas=function(e,t){Na.initBlockDefinitionSchemas(e,t),xa.initModelSchemas(e,t)};var ka={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.initCommonSchemas=e.InclusiveRange=e.IntProvider=e.FloatProvider=e.NoiseSettingsPresets=e.DefaultNoiseSettings=e.DimensionTypePresets=e.DefaultDimensionType=e.FunctionCases=e.ConditionCases=void 0;const t=Pe;e.DefaultDimensionType={ultrawarm:!1,natural:!0,piglin_safe:!1,respawn_anchor_works:!1,bed_works:!0,has_raids:!0,has_skylight:!0,has_ceiling:!1,coordinate_scale:1,ambient_light:0,logical_height:256,infiniburn:"minecraft:infiniburn_overworld",min_y:0,height:256};const i={"minecraft:igloo":{spacing:32,separation:8,salt:14357618},"minecraft:mansion":{spacing:80,separation:20,salt:10387319},"minecraft:jungle_pyramid":{spacing:32,separation:8,salt:14357619},"minecraft:nether_fossil":{spacing:2,separation:1,salt:14357921},"minecraft:stronghold":{spacing:1,separation:0,salt:0},"minecraft:shipwreck":{spacing:24,separation:4,salt:165745295},"minecraft:mineshaft":{spacing:1,separation:0,salt:0},"minecraft:desert_pyramid":{spacing:32,separation:8,salt:14357617},"minecraft:ruined_portal":{spacing:40,separation:15,salt:34222645},"minecraft:fortress":{spacing:27,separation:4,salt:30084232},"minecraft:pillager_outpost":{spacing:32,separation:8,salt:165745296},"minecraft:village":{spacing:32,separation:8,salt:10387312},"minecraft:endcity":{spacing:20,separation:11,salt:10387313},"minecraft:buried_treasure":{spacing:1,separation:0,salt:0},"minecraft:ocean_ruin":{spacing:20,separation:8,salt:14357621},"minecraft:bastion_remnant":{spacing:27,separation:4,salt:30084232},"minecraft:swamp_hut":{spacing:32,separation:8,salt:14357620},"minecraft:monument":{spacing:32,separation:5,salt:10387313}};e.DefaultNoiseSettings={bedrock_roof_position:-2147483648,bedrock_floor_position:0,sea_level:63,noise_caves_enabled:!0,deepslate_enabled:!0,ore_veins_enabled:!0,noodle_caves_enabled:!0,disable_mob_generation:!1,aquifers_enabled:!0,default_block:{Name:"minecraft:stone"},default_fluid:{Properties:{level:"0"},Name:"minecraft:water"},noise:{min_y:-64,height:384,size_horizontal:1,size_vertical:2,density_factor:1,density_offset:-.51875,top_slide:{target:-.078125,size:2,offset:8},bottom_slide:{target:.1171875,size:3,offset:0},sampling:{xz_scale:.9999999814507745,y_scale:.9999999814507745,xz_factor:80,y_factor:160},terrain_shaper:{offset:0,factor:0,jaggedness:0}},surface_rule:{type:"minecraft:sequence",sequence:[]},structures:{stronghold:{distance:32,spread:3,count:128},structures:i}},e.initCommonSchemas=function(n,r){const o=t.StringNode.bind(void 0,r),a=t.Reference.bind(void 0,n);n.register("block_state",t.Mod(t.ObjectNode({Name:o({validator:"resource",params:{pool:"block"}}),Properties:t.Opt(t.MapNode(o(),o(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"Name"}]}}}))},{context:"block_state"}),{default:()=>({Name:"minecraft:stone"})})),n.register("fluid_state",t.Mod(t.ObjectNode({Name:o({validator:"resource",params:{pool:"fluid"}}),Properties:t.Opt(t.MapNode(o(),o()))},{context:"fluid_state"}),{default:()=>({Name:"minecraft:water",Properties:{level:"0"}})})),n.register("block_pos",t.Mod(t.ListNode(t.NumberNode({integer:!0}),{minLength:3,maxLength:3}),{default:()=>[0,0,0]}));const c=e=>t.Opt(t.ChoiceNode([{type:"number",node:t.NumberNode({integer:e}),change:e=>{var t,i;return void 0===e?0:null!==(i=null!==(t=e.min)&&void 0!==t?t:e.max)&&void 0!==i?i:0}},{type:"object",node:t.ObjectNode({min:t.Opt(t.NumberNode({integer:e})),max:t.Opt(t.NumberNode({integer:e}))},{context:"range"}),change:e=>({min:null!=e?e:0,max:null!=e?e:0})}]));n.register("int_bounds",c(!0)),n.register("float_bounds",c()),n.register("int_range",t.ChoiceNode([{type:"object",node:t.ObjectNode({min:t.Opt(a("number_provider")),max:t.Opt(a("number_provider"))})},{type:"number",node:t.NumberNode({integer:!0})}],{context:"range"}));const l=(e,i,n,r,a,c,l)=>{let u={};a&&Object.keys(l[a]).forEach((e=>{u[e]=t.Mod(l[a][e],{enabled:e=>void 0===e.push("type").get()})}));const d=t.ObjectNode(s({type:t.Mod(t.Opt(o({validator:"resource",params:{pool:e}})),{hidden:()=>!0}),[t.Switch]:[{push:"type"}],[t.Case]:l},u),{context:c,disableSwitchContext:!0}),h=[{type:i,node:l[r][n]}];return a&&h.push({type:"object",priority:-1,node:d}),Object.keys(l).forEach((e=>{h.push({type:e,match:t=>{var i;if("minecraft:"+(null===(i=null==t?void 0:t.type)||void 0===i?void 0:i.replace(/^minecraft:/,""))===e)return!0;const n=t?Object.keys(t):[];return"object"==typeof t&&(0===(null==n?void 0:n.length)||1===(null==n?void 0:n.length)&&"type"===(null==n?void 0:n[0]))},node:d,change:t=>({type:e})})})),t.ChoiceNode(h,{context:c,choiceContext:`${c}.type`})};n.register("number_provider",l("loot_number_provider_type","number","value","minecraft:constant","minecraft:uniform","number_provider",{"minecraft:constant":{value:t.NumberNode()},"minecraft:uniform":{min:a("number_provider"),max:a("number_provider")},"minecraft:binomial":{n:a("number_provider"),p:a("number_provider")},"minecraft:score":{target:a("scoreboard_name_provider"),score:o({validator:"objective"}),scale:t.Opt(t.NumberNode())}})),n.register("scoreboard_name_provider",l("loot_score_provider_type","string","target","minecraft:context",null,"score_provider",{"minecraft:fixed":{name:o({validator:"entity",params:{amount:"multiple",type:"entities",isScoreHolder:!0}})},"minecraft:context":{target:t.Mod(o({enum:"entity_source"}),{default:()=>"this"})}})),n.register("nbt_provider",l("loot_nbt_provider_type","string","target","minecraft:context",null,"nbt_provider",{"minecraft:storage":{source:o({validator:"resource",params:{pool:"$storage"}})},"minecraft:context":{target:t.Mod(o({enum:"copy_source"}),{default:()=>"this"})}})),e.FloatProvider=e=>l("float_provider_type","number","value","minecraft:constant",null,"float_provider",{"minecraft:constant":{value:t.NumberNode(e)},"minecraft:uniform":{value:t.ObjectNode({min_inclusive:t.NumberNode(e),max_exclusive:t.NumberNode(e)})},"minecraft:clamped_normal":{value:t.ObjectNode({min:t.NumberNode(),max:t.NumberNode(),mean:t.NumberNode(),deviation:t.NumberNode()})},"minecraft:trapezoid":{value:t.ObjectNode({min:t.NumberNode(),max:t.NumberNode(),plateau:t.NumberNode()})}}),n.register("float_provider",e.FloatProvider()),e.IntProvider=e=>l("int_provider_type","number","value","minecraft:constant",null,"int_provider",{"minecraft:constant":{value:t.NumberNode(s({integer:!0},e))},"minecraft:uniform":{value:t.ObjectNode({min_inclusive:t.NumberNode(s({integer:!0},e)),max_inclusive:t.NumberNode(s({integer:!0},e))})},"minecraft:biased_to_bottom":{value:t.ObjectNode({min_inclusive:t.NumberNode(s({integer:!0},e)),max_inclusive:t.NumberNode(s({integer:!0},e))})},"minecraft:clamped":{value:t.ObjectNode({min_inclusive:t.NumberNode(s({integer:!0},e)),max_inclusive:t.NumberNode(s({integer:!0},e)),source:a("int_provider")})},"minecraft:clamped_normal":{value:t.ObjectNode({min_inclusive:t.NumberNode(s({integer:!0},e)),max_inclusive:t.NumberNode(s({integer:!0},e)),mean:t.NumberNode(),deviation:t.NumberNode()})},"minecraft:weighted_list":{distribution:t.ListNode(t.ObjectNode({weight:t.NumberNode({integer:!0}),data:a("int_provider")}))}}),n.register("int_provider",e.IntProvider()),n.register("vertical_anchor",t.ChoiceNode(["absolute","above_bottom","below_top"].map((e=>({type:e,match:t=>void 0!==(null==t?void 0:t[e]),change:t=>{var i,n,r;return{[e]:null!==(r=null!==(n=null!==(i=t.absolute)&&void 0!==i?i:t.above_bottom)&&void 0!==n?n:t.below_top)&&void 0!==r?r:0}},node:t.ObjectNode({[e]:t.NumberNode({integer:!0,min:-2048,max:2047})})}))),{context:"vertical_anchor"})),n.register("height_provider",l("height_provider_type","number","value","minecraft:constant",null,"height_provider",{"minecraft:constant":{value:a("vertical_anchor")},"minecraft:uniform":{min_inclusive:a("vertical_anchor"),max_inclusive:a("vertical_anchor")},"minecraft:biased_to_bottom":{min_inclusive:a("vertical_anchor"),max_inclusive:a("vertical_anchor"),inner:t.Opt(t.NumberNode({integer:!0,min:1}))},"minecraft:very_biased_to_bottom":{min_inclusive:a("vertical_anchor"),max_inclusive:a("vertical_anchor"),inner:t.Opt(t.NumberNode({integer:!0,min:1}))},"minecraft:trapezoid":{min_inclusive:a("vertical_anchor"),max_inclusive:a("vertical_anchor"),plateau:t.Opt(t.NumberNode({integer:!0}))}})),e.InclusiveRange=e=>t.ObjectNode({min_inclusive:t.NumberNode(e),max_inclusive:t.NumberNode(e)},{context:"range"}),n.register("noise_parameters",t.Mod(t.ObjectNode({firstOctave:t.NumberNode({integer:!0}),amplitudes:t.ListNode(t.NumberNode())},{context:"noise_parameters"}),{default:()=>({firstOctave:-7,amplitudes:[1,1]})})),e.ConditionCases=(e=o({enum:"entity_source"}))=>({"minecraft:alternative":{terms:t.ListNode(a("condition"))},"minecraft:block_state_property":{block:o({validator:"resource",params:{pool:"block"}}),properties:t.MapNode(o(),o(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}})},"minecraft:damage_source_properties":{predicate:a("damage_source_predicate")},"minecraft:entity_properties":{entity:e,predicate:a("entity_predicate")},"minecraft:entity_scores":{entity:e,scores:t.MapNode(o({validator:"objective"}),a("int_range"))},"minecraft:inverted":{term:a("condition")},"minecraft:killed_by_player":{inverse:t.Opt(t.BooleanNode())},"minecraft:location_check":{offsetX:t.Opt(t.NumberNode({integer:!0})),offsetY:t.Opt(t.NumberNode({integer:!0})),offsetZ:t.Opt(t.NumberNode({integer:!0})),predicate:a("location_predicate")},"minecraft:match_tool":{predicate:a("item_predicate")},"minecraft:random_chance":{chance:t.NumberNode({min:0,max:1})},"minecraft:random_chance_with_looting":{chance:t.NumberNode({min:0,max:1}),looting_multiplier:t.NumberNode()},"minecraft:reference":{name:o({validator:"resource",params:{pool:"$predicate"}})},"minecraft:table_bonus":{enchantment:o({validator:"resource",params:{pool:"enchantment"}}),chances:t.ListNode(t.NumberNode({min:0,max:1}))},"minecraft:time_check":{value:a("int_range"),period:t.Opt(t.NumberNode({integer:!0}))},"minecraft:value_check":{value:a("number_provider"),range:a("int_range")},"minecraft:weather_check":{raining:t.Opt(t.BooleanNode()),thundering:t.Opt(t.BooleanNode())}}),e.FunctionCases=(e,i=o({enum:"copy_source"}),n=o({enum:"entity_source"}))=>{const c={"minecraft:apply_bonus":{enchantment:o({validator:"resource",params:{pool:"enchantment"}}),formula:o({validator:"resource",params:{pool:r.get("loot_table_apply_bonus_formula")}}),parameters:t.Mod(t.ObjectNode({bonusMultiplier:t.Mod(t.NumberNode(),{enabled:e=>"minecraft:uniform_bonus_count"===e.pop().push("formula").get()}),extra:t.Mod(t.NumberNode(),{enabled:e=>"minecraft:binomial_with_bonus_count"===e.pop().push("formula").get()}),probability:t.Mod(t.NumberNode(),{enabled:e=>"minecraft:binomial_with_bonus_count"===e.pop().push("formula").get()})}),{enabled:e=>"minecraft:ore_drops"!==e.push("formula").get()})},"minecraft:copy_name":{source:i},"minecraft:copy_nbt":{source:a("nbt_provider"),ops:t.ListNode(t.ObjectNode({source:o({validator:"nbt_path",params:{category:{getter:"copy_source",path:["pop","pop","pop",{push:"source"}]}}}),target:o({validator:"nbt_path",params:{category:"minecraft:item"}}),op:o({enum:["replace","append","merge"]})},{context:"nbt_operation"}))},"minecraft:copy_state":{block:o({validator:"resource",params:{pool:"block"}}),properties:t.ListNode(o({validator:"block_state_key",params:{id:["pop","pop",{push:"block"}]}}))},"minecraft:enchant_randomly":{enchantments:t.Opt(t.ListNode(o({validator:"resource",params:{pool:"enchantment"}})))},"minecraft:enchant_with_levels":{levels:a("number_provider"),treasure:t.Opt(t.BooleanNode())},"minecraft:exploration_map":{destination:t.Opt(o({enum:"map_feature"})),decoration:t.Opt(o({enum:"map_decoration"})),zoom:t.Opt(t.NumberNode({integer:!0})),search_radius:t.Opt(t.NumberNode({integer:!0})),skip_existing_chunks:t.Opt(t.BooleanNode())},"minecraft:fill_player_head":{entity:n},"minecraft:limit_count":{limit:a("int_range")},"minecraft:looting_enchant":{count:a("number_provider"),limit:t.Opt(t.NumberNode({integer:!0}))},"minecraft:set_attributes":{modifiers:t.ListNode(a("attribute_modifier"))},"minecraft:set_banner_pattern":{patterns:t.ListNode(t.ObjectNode({pattern:o({enum:"banner_pattern"}),color:o({enum:"dye_color"})})),append:t.Opt(t.BooleanNode())},"minecraft:set_contents":{type:o({validator:"resource",params:{pool:"block_entity_type"}}),entries:t.ListNode(a("loot_entry"))},"minecraft:set_count":{count:a("number_provider"),add:t.Opt(t.BooleanNode())},"minecraft:set_damage":{damage:a("number_provider"),add:t.Opt(t.BooleanNode())},"minecraft:set_enchantments":{enchantments:t.MapNode(o({validator:"resource",params:{pool:"enchantment"}}),a("number_provider")),add:t.Opt(t.BooleanNode())},"minecraft:set_loot_table":{type:o({validator:"resource",params:{pool:"block_entity_type"}}),name:o({validator:"resource",params:{pool:"$loot_table"}}),seed:t.Opt(t.NumberNode({integer:!0}))},"minecraft:set_lore":{entity:t.Opt(n),lore:t.ListNode(a("text_component")),replace:t.Opt(t.BooleanNode())},"minecraft:set_name":{entity:t.Opt(n),name:t.Opt(a("text_component"))},"minecraft:set_nbt":{tag:o({validator:"nbt",params:{registry:{category:"minecraft:item"}}})},"minecraft:set_potion":{id:o({validator:"resource",params:{pool:"potion"}})},"minecraft:set_stew_effect":{effects:t.Opt(t.ListNode(t.ObjectNode({type:o({validator:"resource",params:{pool:"mob_effect"}}),duration:a("number_provider")})))}},l={};return r.get("loot_function_type").forEach((t=>{l[t]=s(s({},c[t]),e)})),l},e.DimensionTypePresets=i=>t.ObjectOrPreset(o({validator:"resource",params:{pool:"$dimension_type"}}),i,{"minecraft:overworld":e.DefaultDimensionType,"minecraft:the_nether":{name:"minecraft:the_nether",ultrawarm:!0,natural:!1,shrunk:!0,piglin_safe:!0,respawn_anchor_works:!0,bed_works:!1,has_raids:!1,has_skylight:!1,has_ceiling:!0,ambient_light:.1,fixed_time:18e3,logical_height:128,effects:"minecraft:the_nether",infiniburn:"minecraft:infiniburn_nether",min_y:0,height:256},"minecraft:the_end":{name:"minecraft:the_end",ultrawarm:!1,natural:!1,shrunk:!1,piglin_safe:!1,respawn_anchor_works:!1,bed_works:!1,has_raids:!0,has_skylight:!1,has_ceiling:!1,ambient_light:0,fixed_time:6e3,logical_height:256,effects:"minecraft:the_end",infiniburn:"minecraft:infiniburn_end",min_y:0,height:256}}),e.NoiseSettingsPresets=n=>t.ObjectOrPreset(o({validator:"resource",params:{pool:"$worldgen/noise_settings"}}),n,{"minecraft:overworld":e.DefaultNoiseSettings,"minecraft:nether":{bedrock_roof_position:0,bedrock_floor_position:0,sea_level:32,noise_caves_enabled:!1,deepslate_enabled:!1,ore_veins_enabled:!1,noodle_caves_enabled:!1,disable_mob_generation:!1,aquifers_enabled:!1,default_block:{Name:"minecraft:netherrack"},default_fluid:{Properties:{level:"0"},Name:"minecraft:lava"},noise:{min_y:0,height:128,size_horizontal:1,size_vertical:2,density_factor:0,density_offset:-.030078125,top_slide:{target:.9375,size:3,offset:0},bottom_slide:{target:2.5,size:4,offset:-1},sampling:{xz_scale:1,y_scale:3,xz_factor:80,y_factor:60},terrain_shaper:{offset:0,factor:0,jaggedness:0}},surface_rule:{type:"minecraft:sequence",sequence:[]},structures:{structures:i}},"minecraft:end":{bedrock_roof_position:-2147483648,bedrock_floor_position:-2147483648,sea_level:0,noise_caves_enabled:!1,deepslate_enabled:!1,ore_veins_enabled:!1,noodle_caves_enabled:!1,disable_mob_generation:!1,aquifers_enabled:!1,default_block:{Name:"minecraft:end_stone"},default_fluid:{Name:"minecraft:air"},noise:{min_y:0,height:128,size_horizontal:2,size_vertical:1,density_factor:0,density_offset:0,island_noise_override:!0,top_slide:{target:-23.4375,size:64,offset:-46},bottom_slide:{target:-.234375,size:7,offset:1},sampling:{xz_scale:2,y_scale:1,xz_factor:80,y_factor:160},terrain_shaper:{offset:0,factor:1,jaggedness:0}},surface_rule:{type:"minecraft:sequence",sequence:[]},structures:{structures:i}},"minecraft:amplified":{bedrock_roof_position:-2147483648,bedrock_floor_position:0,sea_level:63,noise_caves_enabled:!0,deepslate_enabled:!0,ore_veins_enabled:!0,noodle_caves_enabled:!0,disable_mob_generation:!1,aquifers_enabled:!0,default_block:{Name:"minecraft:stone"},default_fluid:{Properties:{level:"0"},Name:"minecraft:water"},noise:{min_y:-64,height:384,size_horizontal:1,size_vertical:2,density_factor:1,density_offset:-.51875,amplified:!0,top_slide:{target:-.078125,size:2,offset:8},bottom_slide:{target:.1171875,size:3,offset:0},sampling:{xz_scale:.9999999814507745,y_scale:.9999999814507745,xz_factor:80,y_factor:160},terrain_shaper:{offset:0,factor:0,jaggedness:0}},surface_rule:{type:"minecraft:sequence",sequence:[]},structures:{stronghold:{distance:32,spread:3,count:128},structures:i}},"minecraft:caves":{bedrock_roof_position:0,bedrock_floor_position:0,sea_level:32,noise_caves_enabled:!1,deepslate_enabled:!1,ore_veins_enabled:!1,noodle_caves_enabled:!1,disable_mob_generation:!1,aquifers_enabled:!1,default_block:{Name:"minecraft:stone"},default_fluid:{Properties:{level:"0"},Name:"minecraft:water"},noise:{min_y:0,height:128,size_horizontal:1,size_vertical:2,density_factor:0,density_offset:-.030078125,top_slide:{target:.9375,size:3,offset:0},bottom_slide:{target:2.5,size:4,offset:-1},sampling:{xz_scale:1,y_scale:3,xz_factor:80,y_factor:60},terrain_shaper:{offset:0,factor:0,jaggedness:0}},surface_rule:{type:"minecraft:sequence",sequence:[]},structures:{stronghold:{distance:32,spread:3,count:128},structures:i}},"minecraft:floating_islands":{bedrock_roof_position:-2147483648,bedrock_floor_position:-2147483648,sea_level:0,noise_caves_enabled:!1,deepslate_enabled:!1,ore_veins_enabled:!1,noodle_caves_enabled:!1,disable_mob_generation:!1,aquifers_enabled:!1,default_block:{Name:"minecraft:stone"},default_fluid:{Properties:{level:"0"},Name:"minecraft:water"},noise:{min_y:0,height:128,size_horizontal:2,size_vertical:1,density_factor:0,density_offset:0,island_noise_override:!0,top_slide:{target:-23.4375,size:64,offset:-46},bottom_slide:{target:-.234375,size:7,offset:1},sampling:{xz_scale:2,y_scale:1,xz_factor:80,y_factor:160},terrain_shaper:{offset:0,factor:1,jaggedness:0}},surface_rule:{type:"minecraft:sequence",sequence:[]},structures:{stronghold:{distance:32,spread:3,count:128},structures:i}}})}}(ka);var Aa={};Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.initConditionSchemas=void 0;const Ca=Pe,Oa=ka;Aa.initConditionSchemas=function(e,t){const i=Ca.Reference.bind(void 0,e),n=Ca.StringNode.bind(void 0,t);e.register("predicate",Ca.ObjectOrList(i("condition"),{choiceContext:"condition"})),e.register("condition",Ca.Mod(Ca.ObjectNode({condition:n({validator:"resource",params:{pool:"loot_condition_type"}}),[Ca.Switch]:[{push:"condition"}],[Ca.Case]:Oa.ConditionCases()},{category:"predicate",context:"condition"}),{default:()=>({condition:"minecraft:entity_properties",entity:"this"})}))};var Sa={};Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.initDimensionSchemas=void 0;const Ea=Pe,Fa=ka;Sa.initDimensionSchemas=function(e,t){const i=Ea.Reference.bind(void 0,e),n=Ea.StringNode.bind(void 0,t);e.register("dimension",Ea.Mod(Ea.ObjectNode({type:Fa.DimensionTypePresets(i("dimension_type")),generator:Ea.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/chunk_generator"}}),[Ea.Switch]:[{push:"type"}],[Ea.Case]:{"minecraft:noise":{seed:Ea.NumberNode({integer:!0}),settings:Fa.NoiseSettingsPresets(i("noise_settings")),biome_source:Ea.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/biome_source"}}),[Ea.Switch]:[{push:"type"}],[Ea.Case]:{"minecraft:fixed":{biome:n({validator:"resource",params:{pool:"$worldgen/biome"}})},"minecraft:multi_noise":{preset:Ea.Opt(n({validator:"resource",params:{pool:["minecraft:overworld","minecraft:nether"]}})),biomes:Ea.Mod(Ea.ListNode(i("generator_biome")),{enabled:e=>void 0===e.push("preset").get(),default:()=>[{biome:"minecraft:plains"}]})},"minecraft:checkerboard":{scale:Ea.Opt(Ea.NumberNode({integer:!0,min:0,max:62})),biomes:Ea.ListNode(n({validator:"resource",params:{pool:"$worldgen/biome"}}))},"minecraft:the_end":{seed:Ea.NumberNode({integer:!0})}}},{category:"predicate",disableSwitchContext:!0})},"minecraft:flat":{settings:Ea.ObjectNode({biome:Ea.Opt(n({validator:"resource",params:{pool:"$worldgen/biome"}})),lakes:Ea.Opt(Ea.BooleanNode()),features:Ea.Opt(Ea.BooleanNode()),layers:Ea.ListNode(i("generator_layer")),structures:i("generator_structures")})}}},{disableSwitchContext:!0})},{category:"pool",context:"dimension"}),{default:()=>{const e=Math.floor(4294967296*Math.random())-2147483648;return{type:"minecraft:overworld",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:fixed",seed:e,biome:"minecraft:plains"},settings:"minecraft:overworld"}}}}));const r=Ea.ChoiceNode([{type:"number",node:Ea.NumberNode({min:-2,max:2}),change:e=>{var t;return null!==(t=e[0])&&void 0!==t?t:0}},{type:"list",node:Ea.ListNode(Ea.NumberNode({min:-2,max:2}),{minLength:2,maxLength:2}),change:e=>[null!=e?e:0,null!=e?e:0]}]);e.register("generator_biome",Ea.Mod(Ea.ObjectNode({biome:n({validator:"resource",params:{pool:"$worldgen/biome"}}),parameters:Ea.ObjectNode({temperature:r,humidity:r,continentalness:r,erosion:r,weirdness:r,depth:r,offset:Ea.NumberNode({min:0,max:1})})},{context:"generator_biome"}),{default:()=>({biome:"minecraft:plains",parameters:{altitude:0,temperature:0,humidity:0,weirdness:0,offset:0}})}))};var Da={};Object.defineProperty(Da,"__esModule",{value:!0}),Da.initDimensionTypeSchemas=void 0;const Ba=Pe,La=ka;Da.initDimensionTypeSchemas=function(e,t){const i=Ba.StringNode.bind(void 0,t);e.register("dimension_type",Ba.Mod(Ba.ObjectNode({ultrawarm:Ba.BooleanNode(),natural:Ba.BooleanNode(),piglin_safe:Ba.BooleanNode(),respawn_anchor_works:Ba.BooleanNode(),bed_works:Ba.BooleanNode(),has_raids:Ba.BooleanNode(),has_skylight:Ba.BooleanNode(),has_ceiling:Ba.BooleanNode(),coordinate_scale:Ba.NumberNode({min:1e-5,max:3e7}),ambient_light:Ba.NumberNode(),fixed_time:Ba.Opt(Ba.NumberNode({integer:!0})),logical_height:Ba.NumberNode({integer:!0,min:0,max:4096}),effects:Ba.Opt(i({enum:["minecraft:overworld","minecraft:the_nether","minecraft:the_end"]})),infiniburn:i({validator:"resource",params:{pool:"$tag/block"}}),min_y:Ba.NumberNode({integer:!0,min:-2048,max:2047}),height:Ba.NumberNode({integer:!0,min:0,max:4096})},{context:"dimension_type"}),(e=>({default:()=>La.DefaultDimensionType,validate:(t,i,n,r)=>((null==(i=e.validate(t,i,n,r))?void 0:i.min_y)+(null==i?void 0:i.height)>2047&&n.add(t.push("height"),"error.min_y_plus_height",2047),(null==i?void 0:i.logical_height)>(null==i?void 0:i.height)&&n.add(t.push("logical_height"),"error.logical_height"),(null==i?void 0:i.height)%16!=0&&n.add(t.push("height"),"error.height_multiple",16),(null==i?void 0:i.min_y)%16!=0&&n.add(t.push("min_y"),"error.min_y_multiple",16),i)}))))};var Ma={};Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.initItemModifierSchemas=void 0;const Ta=Pe,Ra=ka;Ma.initItemModifierSchemas=function(e,t){const i=Ta.Reference.bind(void 0,e),n=Ta.StringNode.bind(void 0,t);e.register("item_modifier",Ta.ObjectOrList(i("function"),{choiceContext:"function"}));const r={conditions:Ta.Opt(Ta.ListNode(i("condition")))};e.register("function",Ta.Mod(Ta.ObjectNode({function:n({validator:"resource",params:{pool:"loot_function_type"}}),[Ta.Switch]:[{push:"function"}],[Ta.Case]:Ra.FunctionCases(r)},{category:"function",context:"function"}),{default:()=>[{function:"minecraft:set_count",count:1}]}))};var $a={},ja={};Object.defineProperty(ja,"__esModule",{value:!0}),ja.LootFunctions=ja.LootConditions=ja.LootCopySources=ja.LootEntitySources=ja.LootTableTypes=void 0,ja.LootTableTypes=new Map([["minecraft:advancement_entity",{requires:[7,8],allows:[]}],["minecraft:advancement_reward",{requires:[7,8],allows:[]}],["minecraft:barter",{requires:[8],allows:[]}],["minecraft:block",{requires:[1,7,9],allows:[0,4,8]}],["minecraft:chest",{requires:[7],allows:[8]}],["minecraft:command",{requires:[7],allows:[8]}],["minecraft:empty",{requires:[],allows:[]}],["minecraft:entity",{requires:[2,7,8],allows:[3,5,6]}],["minecraft:fishing",{requires:[7,9],allows:[8]}],["minecraft:generic",{requires:[2,0,1,3,4,5,6,7,8,9],allows:[]}],["minecraft:gift",{requires:[7,8],allows:[]}],["minecraft:selector",{requires:[7],allows:[8]}]]),ja.LootEntitySources=new Map([["direct_killer",[3]],["killer",[5]],["killer_player",[5]],["this",[8]]]),ja.LootCopySources=new Map([["block_entity",[0]],["killer",[5]],["killer_player",[5]],["this",[8]]]),ja.LootConditions=new Map([["minecraft:alternative",[]],["minecraft:block_state_property",[1]],["minecraft:damage_source_properties",[2]],["minecraft:entity_properties",[7]],["minecraft:entity_scores",[]],["minecraft:inverted",[]],["minecraft:killed_by_player",[6]],["minecraft:location_check",[]],["minecraft:match_tool",[9]],["minecraft:random_chance",[]],["minecraft:random_chance_with_looting",[5]],["minecraft:reference",[]],["minecraft:survives_explosion",[4]],["minecraft:table_bonus",[9]],["minecraft:time_check",[]],["minecraft:weather_check",[]]]),ja.LootFunctions=new Map([["minecraft:apply_bonus",[9]],["minecraft:copy_name",[]],["minecraft:copy_nbt",[]],["minecraft:copy_state",[1]],["minecraft:enchant_randomly",[]],["minecraft:enchant_with_levels",[]],["minecraft:exploration_map",[7]],["minecraft:explosion_decay",[]],["minecraft:fill_player_head",[]],["minecraft:furnace_smelt",[]],["minecraft:limit_count",[]],["minecraft:looting_enchant",[5]],["minecraft:set_attributes",[]],["minecraft:set_banner_pattern",[]],["minecraft:set_contents",[]],["minecraft:set_count",[]],["minecraft:set_damage",[]],["minecraft:set_loot_table",[]],["minecraft:set_lore",[]],["minecraft:set_name",[]],["minecraft:set_nbt",[]],["minecraft:set_stew_effect",[]]]),Object.defineProperty($a,"__esModule",{value:!0}),$a.initLootTableSchemas=void 0;const Ia=Pe,Pa=ja,za=ka;$a.initLootTableSchemas=function(e,t){const i=Ia.Reference.bind(void 0,e),n=Ia.StringNode.bind(void 0,t),r={conditions:Ia.Opt(Ia.ListNode(i("loot_condition")))},o=s({functions:Ia.Opt(Ia.ListNode(i("loot_function")))},r);function a(e,i,n){const r=[],o=n=>t.get(i).filter((t=>{var i;return(null!==(i=e.get(t))&&void 0!==i?i:[]).every((e=>n.includes(e)))}));for(const[t,{allows:a,requires:s}]of Pa.LootTableTypes){const e=[...a,...s];r.push({match:e=>e.getModel().get(new Ia.Path(["type"]))===t,node:n(o(e))})}return r.push({match:e=>!0,node:n(i)}),Ia.SwitchNode(r)}const c=a(Pa.LootConditions,"loot_condition_type",(e=>n({validator:"resource",params:{pool:e instanceof Array?e:"loot_condition_type"}}))),l=a(Pa.LootFunctions,"loot_function_type",(e=>n({validator:"resource",params:{pool:e instanceof Array?e:"loot_function_type"}}))),u=a(Pa.LootEntitySources,"entity_source",(e=>n({enum:e}))),d=a(Pa.LootCopySources,"copy_source",(e=>n({enum:e})));e.register("loot_table",Ia.Mod(Ia.ObjectNode({type:Ia.Opt(n({validator:"resource",params:{pool:t.get("loot_context_type")}})),pools:Ia.Opt(Ia.ListNode(Ia.Mod(Ia.ObjectNode(s({rolls:i("number_provider"),bonus_rolls:Ia.Opt(i("number_provider")),entries:Ia.ListNode(i("loot_entry"))},o),{category:"pool",context:"loot_pool"}),{default:()=>({rolls:1,entries:[{type:"minecraft:item",name:"minecraft:stone"}]})}))),functions:Ia.Opt(Ia.ListNode(i("loot_function")))},{context:"loot_table"}),{default:()=>({pools:[{rolls:1,entries:[{type:"minecraft:item",name:"minecraft:stone"}]}]})}));const h={enabled:e=>{var t;return(null===(t=e.pop().get())||void 0===t?void 0:t.length)>1&&!["minecraft:alternatives","minecraft:group","minecraft:sequence"].includes(e.push("type").get())}};e.register("loot_entry",Ia.Mod(Ia.ObjectNode({type:n({validator:"resource",params:{pool:"loot_pool_entry_type"}}),weight:Ia.Opt(Ia.Mod(Ia.NumberNode({integer:!0,min:1}),h)),quality:Ia.Opt(Ia.Mod(Ia.NumberNode({integer:!0}),h)),[Ia.Switch]:[{push:"type"}],[Ia.Case]:{"minecraft:alternatives":s({children:Ia.ListNode(i("loot_entry"))},o),"minecraft:dynamic":s({name:n()},o),"minecraft:group":s({children:Ia.ListNode(i("loot_entry"))},o),"minecraft:item":s({name:n({validator:"resource",params:{pool:"item"}})},o),"minecraft:loot_table":s({name:n({validator:"resource",params:{pool:"$loot_table"}})},o),"minecraft:sequence":s({children:Ia.ListNode(i("loot_entry"))},o),"minecraft:tag":s({name:n({validator:"resource",params:{pool:"$tag/item"}}),expand:Ia.Opt(Ia.BooleanNode())},o)}},{context:"loot_entry"}),{default:()=>({type:"minecraft:item",name:"minecraft:stone"})})),e.register("loot_function",Ia.Mod(Ia.ObjectNode({function:l,[Ia.Switch]:[{push:"function"}],[Ia.Case]:za.FunctionCases(r,d,u)},{category:"function",context:"function"}),{default:()=>({function:"minecraft:set_count",count:1})})),e.register("loot_condition",Ia.Mod(Ia.ObjectNode({condition:c,[Ia.Switch]:[{push:"condition"}],[Ia.Case]:za.ConditionCases(u)},{category:"predicate",context:"condition"}),{default:()=>({condition:"minecraft:random_chance",chance:.5})})),e.register("attribute_modifier",Ia.Mod(Ia.ObjectNode({attribute:n({validator:"resource",params:{pool:"attribute"}}),name:n(),amount:i("number_provider"),operation:n({enum:["addition","multiply_base","multiply_total"]}),slot:Ia.StringOrList(n({enum:"slot"}))},{context:"attribute_modifier"}),{default:()=>({attribute:"minecraft:generic.max_health",name:"",amount:1,operation:"addition",slot:"mainhand"})}))};var Ua={};Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.initPackMcmetaSchemas=void 0;const Wa=Pe;Ua.initPackMcmetaSchemas=function(e,t){e.register("pack_mcmeta",Wa.Mod(Wa.ObjectNode({pack:Wa.Mod(Wa.ObjectNode({pack_format:Wa.Mod(Wa.NumberNode({integer:!0,min:8,max:8}),{default:()=>8,canUpdate:(e,t)=>8!==t,update:()=>[{name:"pack_format",params:[8],newValue:8}]}),description:Wa.Reference(e,"text_component")}),{default:()=>({pack_format:8,description:""})})}),{default:()=>({pack:{pack_format:8,description:""}})}))};var Ha={};Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.initPredicatesSchemas=void 0;const qa=Pe;Ha.initPredicatesSchemas=function(e,t){const i=qa.Reference.bind(void 0,e),n=qa.StringNode.bind(void 0,t),r=qa.ChoiceNode([{type:"string",node:n(),change:e=>"boolean"==typeof e||"number"==typeof e?e.toString():""},{type:"number",node:qa.NumberNode(),change:e=>"string"==typeof e?parseInt(e):0},{type:"object",node:qa.ObjectNode({min:qa.Opt(qa.NumberNode({integer:!0})),max:qa.Opt(qa.NumberNode({integer:!0}))}),change:e=>"number"==typeof e?{min:e,max:e}:{}},{type:"boolean",node:qa.BooleanNode(),change:e=>"true"===e||1===e}]);e.register("item_predicate",qa.ObjectNode({items:qa.Opt(qa.ListNode(n({validator:"resource",params:{pool:"item"}}))),tag:qa.Opt(n({validator:"resource",params:{pool:"$tag/item"}})),count:i("int_bounds"),durability:i("int_bounds"),potion:qa.Opt(n({validator:"resource",params:{pool:"potion"}})),nbt:qa.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"item"}]}}})),enchantments:qa.Opt(qa.ListNode(i("enchantment_predicate")))},{context:"item"})),e.register("enchantment_predicate",qa.ObjectNode({enchantment:qa.Opt(n({validator:"resource",params:{pool:"enchantment"}})),levels:i("int_bounds")},{context:"enchantment"})),e.register("block_predicate",qa.ObjectNode({blocks:qa.Opt(qa.ListNode(n({validator:"resource",params:{pool:"block"}}))),tag:qa.Opt(n({validator:"resource",params:{pool:"$tag/block"}})),nbt:qa.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:block",id:["pop",{push:"block"}]}}})),state:qa.Opt(qa.MapNode(n(),r,{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}}))},{context:"block"})),e.register("fluid_predicate",qa.ObjectNode({fluid:qa.Opt(n({validator:"resource",params:{pool:"fluid"}})),tag:qa.Opt(n({validator:"resource",params:{pool:"$tag/fluid"}})),state:qa.Opt(qa.MapNode(n(),r))},{context:"fluid"})),e.register("location_predicate",qa.ObjectNode({position:qa.Opt(qa.ObjectNode({x:i("float_bounds"),y:i("float_bounds"),z:i("float_bounds")})),biome:qa.Opt(n({validator:"resource",params:{pool:"$worldgen/biome"}})),feature:qa.Opt(n({enum:t.get("worldgen/structure_feature").map((e=>e.slice(10)))})),dimension:qa.Opt(n({validator:"resource",params:{pool:"$dimension"}})),light:qa.Opt(qa.ObjectNode({light:i("int_bounds")})),smokey:qa.Opt(qa.BooleanNode()),block:qa.Opt(i("block_predicate")),fluid:qa.Opt(i("fluid_predicate"))},{context:"location"})),e.register("statistic_predicate",qa.ObjectNode({type:n({validator:"resource",params:{pool:"stat_type"}}),stat:n(),value:i("int_bounds"),[qa.Switch]:[{push:"type"}],[qa.Case]:{"minecraft:mined":{stat:n({validator:"resource",params:{pool:"block"}})},"minecraft:crafted":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:used":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:broken":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:picked_up":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:dropped":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:killed":{stat:n({validator:"resource",params:{pool:"entity_type"}})},"minecraft:killed_by":{stat:n({validator:"resource",params:{pool:"entity_type"}})},"minecraft:custom":{stat:n({validator:"resource",params:{pool:"custom_stat"}})}}})),e.register("player_predicate",qa.ObjectNode({gamemode:qa.Opt(n({enum:"gamemode"})),level:i("int_bounds"),advancements:qa.Opt(qa.MapNode(n({validator:"resource",params:{pool:"$advancement"}}),qa.ChoiceNode([{type:"boolean",node:qa.BooleanNode(),change:e=>!0},{type:"object",node:qa.MapNode(n(),qa.BooleanNode())}]))),recipes:qa.Opt(qa.MapNode(n({validator:"resource",params:{pool:"$recipe"}}),qa.BooleanNode())),stats:qa.Opt(qa.ListNode(i("statistic_predicate"))),looking_at:qa.Opt(i("entity_predicate"))},{context:"player"})),e.register("status_effect_predicate",qa.ObjectNode({amplifier:i("int_bounds"),duration:i("int_bounds"),ambient:qa.Opt(qa.BooleanNode()),visible:qa.Opt(qa.BooleanNode())},{context:"status_effect"})),e.register("distance_predicate",qa.ObjectNode({x:i("float_bounds"),y:i("float_bounds"),z:i("float_bounds"),absolute:i("float_bounds"),horizontal:i("float_bounds")},{context:"distance"})),e.register("entity_predicate",qa.ObjectNode({type:qa.Opt(n({validator:"resource",params:{pool:"entity_type",allowTag:!0}})),nbt:qa.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:entity",id:["pop",{push:"type"}]}}})),team:qa.Opt(n({validator:"team"})),location:qa.Opt(i("location_predicate")),stepping_on:qa.Opt(i("location_predicate")),distance:qa.Opt(i("distance_predicate")),flags:qa.Opt(qa.ObjectNode({is_on_fire:qa.Opt(qa.BooleanNode()),is_sneaking:qa.Opt(qa.BooleanNode()),is_sprinting:qa.Opt(qa.BooleanNode()),is_swimming:qa.Opt(qa.BooleanNode()),is_baby:qa.Opt(qa.BooleanNode())})),equipment:qa.Opt(qa.MapNode(n({enum:"slot"}),i("item_predicate"))),player:qa.Opt(i("player_predicate")),vehicle:qa.Opt(i("entity_predicate")),passenger:qa.Opt(i("entity_predicate")),targeted_entity:qa.Opt(i("entity_predicate")),lightning_bolt:qa.Opt(qa.ObjectNode({blocks_set_on_fire:qa.Opt(i("int_bounds")),entity_struck:qa.Opt(i("entity_predicate"))})),fishing_hook:qa.Opt(qa.ObjectNode({in_open_water:qa.Opt(qa.BooleanNode())})),effects:qa.Opt(qa.MapNode(n({validator:"resource",params:{pool:"mob_effect"}}),i("status_effect_predicate")))},{context:"entity"})),e.register("damage_source_predicate",qa.ObjectNode({is_explosion:qa.Opt(qa.BooleanNode()),is_fire:qa.Opt(qa.BooleanNode()),is_magic:qa.Opt(qa.BooleanNode()),is_projectile:qa.Opt(qa.BooleanNode()),is_lightning:qa.Opt(qa.BooleanNode()),bypasses_armor:qa.Opt(qa.BooleanNode()),bypasses_invulnerability:qa.Opt(qa.BooleanNode()),bypasses_magic:qa.Opt(qa.BooleanNode()),source_entity:qa.Opt(i("entity_predicate")),direct_entity:qa.Opt(i("entity_predicate"))},{context:"damage_source"})),e.register("damage_predicate",qa.ObjectNode({dealt:i("float_bounds"),taken:i("float_bounds"),blocked:qa.Opt(qa.BooleanNode()),source_entity:qa.Opt(i("entity_predicate")),type:qa.Opt(i("damage_source_predicate"))},{context:"damage"}))};var Va={};Object.defineProperty(Va,"__esModule",{value:!0}),Va.initRecipeSchemas=void 0;const Ga=Pe;Va.initRecipeSchemas=function(e,t){const i=Ga.Reference.bind(void 0,e),n=Ga.StringNode.bind(void 0,t);e.register("recipe",Ga.Mod(Ga.ObjectNode({type:n({validator:"resource",params:{pool:"recipe_serializer"}}),[Ga.Switch]:[{push:"type"}],[Ga.Case]:{"minecraft:crafting_shaped":{group:Ga.Opt(n({enum:"recipe_group",additional:!0})),pattern:Ga.ListNode(n()),key:Ga.MapNode(n(),i("recipe_ingredient")),result:i("recipe_result")},"minecraft:crafting_shapeless":{group:Ga.Opt(n()),ingredients:Ga.ListNode(i("recipe_ingredient")),result:i("recipe_result")},"minecraft:smelting":{group:Ga.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:Ga.Opt(Ga.NumberNode()),cookingtime:Ga.Opt(Ga.Mod(Ga.NumberNode({integer:!0}),{default:()=>200}))},"minecraft:blasting":{group:Ga.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:Ga.Opt(Ga.NumberNode()),cookingtime:Ga.Opt(Ga.Mod(Ga.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:smoking":{group:Ga.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:Ga.Opt(Ga.NumberNode()),cookingtime:Ga.Opt(Ga.Mod(Ga.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:campfire_cooking":{group:Ga.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:Ga.Opt(Ga.NumberNode()),cookingtime:Ga.Opt(Ga.Mod(Ga.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:stonecutting":{group:Ga.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),count:Ga.NumberNode({integer:!0})},"minecraft:smithing":{group:Ga.Opt(n()),base:i("recipe_ingredient_object"),addition:i("recipe_ingredient_object"),result:i("recipe_result")}}},{context:"recipe",disableSwitchContext:!0}),{default:()=>({type:"minecraft:crafting_shaped"})})),e.register("recipe_ingredient",Ga.Mod(Ga.ChoiceNode([{type:"object",node:i("recipe_ingredient_object"),change:e=>e[0]},{type:"list",node:Ga.ListNode(i("recipe_ingredient_object")),change:e=>[e]}]),{default:()=>({item:"minecraft:stone"})})),e.register("recipe_ingredient_object",Ga.Mod(Ga.ObjectNode({item:Ga.Opt(n({validator:"resource",params:{pool:"item"}})),tag:Ga.Opt(n({validator:"resource",params:{pool:"$tag/item"}}))}),{default:()=>({item:"minecraft:stone"})})),e.register("recipe_result",Ga.Mod(Ga.ObjectNode({item:n({validator:"resource",params:{pool:"item"}}),count:Ga.Opt(Ga.Mod(Ga.NumberNode({integer:!0}),{default:()=>1}))}),{default:()=>({item:"minecraft:stone"})}))};var Ka={};Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.initTagsSchemas=void 0;const Xa=Pe;Ka.initTagsSchemas=function(e,t){const i=Xa.StringNode.bind(void 0,t),n=e=>Xa.Mod(Xa.ObjectNode({replace:Xa.Opt(Xa.BooleanNode()),values:Xa.ListNode(Xa.ChoiceNode([{type:"string",node:i({validator:"resource",params:{pool:e,allowTag:!0}}),change:e=>e.id},{type:"object",node:Xa.ObjectNode({id:i({validator:"resource",params:{pool:e,allowTag:!0,allowUnknown:!0}}),required:Xa.BooleanNode()}),change:e=>({id:e})}]))},{context:"tag"}),{default:()=>({values:[]})});e.register("block_tag",n("block")),e.register("entity_type_tag",n("entity_type")),e.register("fluid_tag",n("fluid")),e.register("function_tag",n("$function")),e.register("game_event_tag",n("game_event")),e.register("item_tag",n("item"))};var Ja={};Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.initTextComponentSchemas=void 0;const Ya=Pe;Ja.initTextComponentSchemas=function(e,t){const i=Ya.Reference.bind(void 0,e),n=Ya.StringNode.bind(void 0,t),r=e=>{var t;return e instanceof Array?r(e[0]):null!==(t=null==e?void 0:e.text)&&void 0!==t?t:"object"==typeof e?"":null==e?void 0:e.toString()};e.register("text_component",Ya.Mod(Ya.ChoiceNode([{type:"object",node:i("text_component_object"),change:e=>e instanceof Array?"object"==typeof e[0]?e[0]:{text:r(e[0])}:"object"==typeof e?e:{text:r(e)}},{type:"list",node:i("text_component_list"),change:e=>[e]},{type:"string",priority:1,node:n(),change:r},{type:"number",node:Ya.NumberNode(),change:e=>{const t=parseFloat(r(e));return isFinite(t)?t:e?1:0}},{type:"boolean",node:Ya.BooleanNode(),change:e=>{const t=r(e);return"true"===t||"false"===t?"true"===t:!!t}}],{context:"text_component"}),{default:()=>({text:""})}));const o={color:Ya.Opt(n()),font:Ya.Opt(n()),bold:Ya.Opt(Ya.BooleanNode()),italic:Ya.Opt(Ya.BooleanNode()),underlined:Ya.Opt(Ya.BooleanNode()),strikethrough:Ya.Opt(Ya.BooleanNode()),obfuscated:Ya.Opt(Ya.BooleanNode()),insertion:Ya.Opt(n()),clickEvent:Ya.Opt(Ya.ObjectNode({action:n({enum:["open_url","open_file","run_command","suggest_command","change_page","copy_to_clipboard"]}),[Ya.Switch]:[{push:"action"}],[Ya.Case]:{change_page:{value:n()},copy_to_clipboard:{value:n()},open_file:{value:n()},open_url:{value:n()},run_command:{value:n({validator:"command",params:{leadingSlash:!0,allowPartial:!0}})},suggest_command:{value:n({validator:"command",params:{leadingSlash:!0,allowPartial:!0}})}}})),hoverEvent:Ya.Opt(Ya.ObjectNode({action:n({enum:["show_text","show_item","show_entity"]}),[Ya.Switch]:[{push:"action"}],[Ya.Case]:{show_text:{value:Ya.Opt(i("text_component")),contents:Ya.Opt(i("text_component"))},show_item:{value:Ya.Opt(n({validator:"nbt",params:{module:"util::InventoryItem"}})),contents:Ya.Opt(Ya.ObjectNode({id:n({validator:"resource",params:{pool:"item"}}),count:Ya.Opt(Ya.NumberNode({integer:!0})),tag:Ya.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"id"}]}}}))}))},show_entity:{value:Ya.Opt(Ya.ObjectNode({name:Ya.Opt(n()),type:Ya.Opt(n()),id:Ya.Opt(n())})),contents:Ya.Opt(Ya.Mod(Ya.ObjectNode({name:Ya.Opt(i("text_component")),type:n({validator:"resource",params:{pool:"entity_type"}}),id:n({validator:"uuid"})}),{default:()=>({type:"minecraft:pig",id:"00000001-0001-0001-0001-000000000001"})}))}}})),extra:Ya.Opt(i("text_component_list"))};e.register("text_component_object",Ya.Mod(Ya.ChoiceNode([{type:"text",match:e=>"object"==typeof e,change:e=>({text:""}),priority:-1,node:Ya.ObjectNode(s({text:n()},o))},{type:"translation",match:e=>void 0!==(null==e?void 0:e.translate),change:e=>({translate:""}),node:Ya.ObjectNode(s({translate:n(),with:Ya.Opt(i("text_component_list"))},o))},{type:"score",match:e=>void 0!==(null==e?void 0:e.score),change:e=>({score:{}}),node:Ya.ObjectNode(s({score:Ya.ObjectNode({name:n({validator:"entity",params:{amount:"single",type:"entities",isScoreHolder:!0}}),objective:n({validator:"objective"}),value:Ya.Opt(n())})},o))},{type:"selector",match:e=>void 0!==(null==e?void 0:e.selector),change:e=>({selector:""}),node:Ya.ObjectNode(s({selector:n({validator:"entity",params:{amount:"multiple",type:"entities"}}),separator:Ya.Opt(i("text_component"))},o))},{type:"keybind",match:e=>void 0!==(null==e?void 0:e.keybind),change:e=>({keybind:""}),node:Ya.ObjectNode(s({keybind:n({enum:"keybind",additional:!0})},o))},{type:"nbt",match:e=>void 0!==(null==e?void 0:e.nbt),change:e=>({nbt:""}),node:Ya.ObjectNode(s({nbt:n({validator:"nbt_path"}),block:Ya.Opt(n({validator:"vector",params:{dimension:3,isInteger:!0}})),entity:Ya.Opt(n({validator:"entity",params:{amount:"multiple",type:"entities"}})),storage:Ya.Opt(n({validator:"resource",params:{pool:"$storage"}})),interpret:Ya.Opt(Ya.BooleanNode()),separator:Ya.Opt(i("text_component"))},o))}],{context:"text_component_object",choiceContext:"text_component.object"}),{default:()=>({text:""})})),e.register("text_component_list",Ya.Mod(Ya.ListNode(i("text_component")),{default:()=>[{text:""}]}))};var Za={},Qa={};Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.initBiomeSchemas=void 0;const es=Pe;Qa.initBiomeSchemas=function(e,t){const i=es.StringNode.bind(void 0,t);e.register("biome",es.Mod(es.ObjectNode({temperature:es.NumberNode(),downfall:es.NumberNode(),precipitation:i({enum:["none","rain","snow"]}),temperature_modifier:es.Opt(i({enum:["none","frozen"]})),category:i({enum:"biome_category"}),creature_spawn_probability:es.Opt(es.NumberNode({min:0,max:1})),effects:es.ObjectNode({sky_color:es.NumberNode({color:!0}),fog_color:es.NumberNode({color:!0}),water_color:es.NumberNode({color:!0}),water_fog_color:es.NumberNode({color:!0}),grass_color:es.Opt(es.NumberNode({color:!0})),foliage_color:es.Opt(es.NumberNode({color:!0})),grass_color_modifier:es.Opt(i({enum:["none","dark_forest","swamp"]})),ambient_sound:es.Opt(i()),mood_sound:es.Opt(es.ObjectNode({sound:i(),tick_delay:es.NumberNode({integer:!0}),block_search_extent:es.NumberNode({integer:!0}),offset:es.NumberNode()})),additions_sound:es.Opt(es.ObjectNode({sound:i(),tick_chance:es.NumberNode({min:0,max:1})})),music:es.Opt(es.ObjectNode({sound:i(),min_delay:es.NumberNode({integer:!0,min:0}),max_delay:es.NumberNode({integer:!0,min:0}),replace_current_music:es.BooleanNode()})),particle:es.Opt(es.ObjectNode({options:es.ObjectNode({type:i()}),probability:es.NumberNode({min:0,max:1})}))}),spawners:es.MapNode(i({enum:["monster","creature","ambient","axolotls","underground_water_creature","water_creature","water_ambient","misc"]}),es.Mod(es.ListNode(es.ObjectNode({type:i({validator:"resource",params:{pool:"entity_type"}}),weight:es.NumberNode({integer:!0}),minCount:es.NumberNode({integer:!0}),maxCount:es.NumberNode({integer:!0})})),{category:()=>"pool",default:()=>[{type:"minecraft:bat",weight:1}]})),spawn_costs:es.MapNode(i({validator:"resource",params:{pool:"entity_type"}}),es.Mod(es.ObjectNode({energy_budget:es.NumberNode(),charge:es.NumberNode()},{category:"function"}),{default:()=>({energy_budget:.12,charge:1})})),carvers:es.MapNode(i({enum:["air","liquid"]}),es.Mod(es.ListNode(i({validator:"resource",params:{pool:"$worldgen/configured_carver"}})),{default:()=>["minecraft:cave"]})),features:es.ListNode(es.Mod(es.ListNode(i({validator:"resource",params:{pool:"$worldgen/placed_feature"}})),{category:()=>"predicate"}),{maxLength:11})},{context:"biome"}),{default:()=>({temperature:.8,downfall:.4,precipitation:"rain",category:"plains",effects:{sky_color:7907327,fog_color:12638463,water_color:4159204,water_fog_color:329011}})}))};var ts={};Object.defineProperty(ts,"__esModule",{value:!0}),ts.initCarverSchemas=void 0;const is=Pe,ns=ka;ts.initCarverSchemas=function(e,t){const i=is.Reference.bind(void 0,e),n=is.StringNode.bind(void 0,t),r={vertical_rotation:ns.FloatProvider(),shape:is.ObjectNode({distance_factor:ns.FloatProvider(),thickness:ns.FloatProvider(),width_smoothness:is.NumberNode({integer:!0,min:0}),horizontal_radius_factor:ns.FloatProvider(),vertical_radius_default_factor:is.NumberNode(),vertical_radius_center_factor:is.NumberNode()})},o={horizontal_radius_multiplier:ns.FloatProvider(),vertical_radius_multiplier:ns.FloatProvider(),floor_level:ns.FloatProvider({min:-1,max:1})};e.register("configured_carver",is.Mod(is.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/carver"}}),config:is.ObjectNode({probability:is.NumberNode({min:0,max:1}),y:i("height_provider"),yScale:ns.FloatProvider(),lava_level:i("vertical_anchor"),debug_settings:is.Opt(is.ObjectNode({debug_mode:is.Opt(is.BooleanNode()),air_state:is.Opt(i("block_state")),water_state:is.Opt(i("block_state")),lava_state:is.Opt(i("block_state")),barrier_state:is.Opt(i("block_state"))})),[is.Switch]:["pop",{push:"type"}],[is.Case]:{"minecraft:canyon":r,"minecraft:cave":o,"minecraft:nether_cave":o}})},{context:"carver"}),{default:()=>({type:"minecraft:cave",config:{probability:.1}})}))};var rs={};Object.defineProperty(rs,"__esModule",{value:!0}),rs.initDecoratorSchemas=void 0;const os=Pe,as=ka;rs.initDecoratorSchemas=function(e,t){const i=os.Reference.bind(void 0,e),n=os.StringNode.bind(void 0,t);e.register("decorator",os.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/placement_modifier_type"}}),[os.Switch]:[{push:"type"}],[os.Case]:{"minecraft:block_predicate_filter":{predicate:i("block_predicate_worldgen")},"minecraft:carving_mask":{step:n({enum:"generation_step"})},"minecraft:rarity_filter":{chance:os.NumberNode({integer:!0,min:0})},"minecraft:count":{count:as.IntProvider({min:0,max:256})},"minecraft:count_on_every_layer":{count:as.IntProvider({min:0,max:256})},"minecraft:noise_threshold_count":{noise_level:os.NumberNode(),below_noise:os.NumberNode({integer:!0}),above_noise:os.NumberNode({integer:!0})},"minecraft:noise_based_count":{noise_to_count_ratio:os.NumberNode({integer:!0}),noise_factor:os.NumberNode(),noise_offset:os.Opt(os.NumberNode())},"minecraft:environment_scan":{direction_of_search:n({enum:["up","down"]}),max_steps:os.NumberNode({integer:!0,min:1,max:32}),target_condition:i("block_predicate_worldgen"),allowed_search_condition:os.Opt(i("block_predicate_worldgen"))},"minecraft:heightmap":{heightmap:n({enum:"heightmap_type"})},"minecraft:height_range":{height:i("height_provider")},"minecraft:random_offset":{xz_spread:as.IntProvider({min:-16,max:16}),y_spread:as.IntProvider({min:-16,max:16})},"minecraft:surface_relative_threshold_filter":{heightmap:n({enum:"heightmap_type"}),min_inclusive:os.Opt(os.NumberNode({integer:!0})),max_inclusive:os.Opt(os.NumberNode({integer:!0}))},"minecraft:surface_water_depth_filter":{max_water_depth:os.NumberNode({integer:!0})}}},{context:"decorator",category:"predicate"}))};var ss={},cs={};Object.defineProperty(cs,"__esModule",{value:!0}),cs.initProcessorListSchemas=cs.Processors=void 0;const ls=Pe;cs.initProcessorListSchemas=function(e,t){const i=ls.Reference.bind(void 0,e),n=ls.StringNode.bind(void 0,t);cs.Processors=ls.ChoiceNode([{type:"string",node:n({validator:"resource",params:{pool:"$worldgen/processor_list"}}),change:e=>{}},{type:"object",node:i("processor_list"),change:e=>({processors:[{processor_type:"minecraft:nop"}]})}]),e.register("processor_list",ls.Mod(ls.ObjectNode({processors:ls.ListNode(i("processor"))},{context:"processor_list"}),{default:()=>({processors:[{processor_type:"minecraft:rule",rules:[{location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}}]}]})})),e.register("processor",ls.Mod(ls.ObjectNode({processor_type:n({validator:"resource",params:{pool:"worldgen/structure_processor"}}),[ls.Switch]:[{push:"processor_type"}],[ls.Case]:{"minecraft:block_age":{mossiness:ls.NumberNode()},"minecraft:block_ignore":{blocks:ls.ListNode(i("block_state"))},"minecraft:block_rot":{integrity:ls.NumberNode({min:0,max:1})},"minecraft:gravity":{heightmap:n({enum:"heightmap_type"}),offset:ls.NumberNode({integer:!0})},"minecraft:protected_blocks":{value:n({validator:"resource",params:{pool:"$tag/block"}})},"minecraft:rule":{rules:ls.ListNode(i("processor_rule"))}}},{category:"function",context:"processor"}),{default:()=>({processor_type:"minecraft:rule",rules:[{location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}}]})})),e.register("processor_rule",ls.Mod(ls.ObjectNode({position_predicate:ls.Opt(i("pos_rule_test")),location_predicate:i("rule_test"),input_predicate:i("rule_test"),output_state:i("block_state"),output_nbt:ls.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:block"}}}))},{category:"predicate",context:"processor_rule"}),{default:()=>({location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}})}));const r={min_dist:ls.Opt(ls.NumberNode({min:0,max:255,integer:!0})),max_dist:ls.Opt(ls.NumberNode({min:0,max:255,integer:!0})),min_chance:ls.Opt(ls.NumberNode({min:0,max:1})),max_chance:ls.Opt(ls.NumberNode({min:0,max:1}))};e.register("pos_rule_test",ls.ObjectNode({predicate_type:n({validator:"resource",params:{pool:"pos_rule_test"}}),[ls.Switch]:[{push:"predicate_type"}],[ls.Case]:{"minecraft:axis_aligned_linear_pos":s({axis:n({enum:["x","y","z"]})},r),"minecraft:linear_pos":r}},{context:"pos_rule_test",disableSwitchContext:!0})),e.register("rule_test",ls.ObjectNode({predicate_type:n({validator:"resource",params:{pool:"rule_test"}}),[ls.Switch]:[{push:"predicate_type"}],[ls.Case]:{"minecraft:block_match":{block:n({validator:"resource",params:{pool:"block"}})},"minecraft:blockstate_match":{block_state:i("block_state")},"minecraft:random_block_match":{block:n({validator:"resource",params:{pool:"block"}}),probability:ls.NumberNode({min:0,max:1})},"minecraft:random_blockstate_match":{block_state:i("block_state"),probability:ls.NumberNode({min:0,max:1})},"minecraft:tag_match":{tag:n({validator:"resource",params:{pool:"$tag/block"}})}}},{context:"rule_test",disableSwitchContext:!0}))},Object.defineProperty(ss,"__esModule",{value:!0}),ss.initFeatureSchemas=void 0;const us=Pe,ds=ka,hs=cs;ss.initFeatureSchemas=function(e,t){const i=us.Reference.bind(void 0,e),n=us.StringNode.bind(void 0,t),r=us.ChoiceNode([{type:"string",node:n({validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:i("configured_feature")}],{choiceContext:"feature"}),o=us.ChoiceNode([{type:"string",node:n({validator:"resource",params:{pool:"$worldgen/placed_feature"}})},{type:"object",node:i("placed_feature")}],{choiceContext:"placed_feature"}),a={tries:us.Opt(us.NumberNode({integer:!0,min:1})),xz_spread:us.Opt(us.NumberNode({integer:!0,min:0})),y_spread:us.Opt(us.NumberNode({integer:!0,min:0})),feature:o},l={state:i("block_state"),radius:ds.IntProvider({min:0,max:8}),half_height:us.NumberNode({integer:!0,min:0,max:4}),targets:us.ListNode(i("block_state"))},u={cap_provider:i("block_state_provider"),stem_provider:i("block_state_provider"),foliage_radius:us.Opt(us.NumberNode({integer:!0}))},d=us.ObjectNode({target:i("rule_test"),state:i("block_state")}),h={size:us.NumberNode({integer:!0,min:0,max:64}),discard_chance_on_air_exposure:us.NumberNode({min:0,max:1}),targets:us.ListNode(d)},p={surface:n({enum:"cave_surface"}),depth:ds.IntProvider({min:1,max:128}),vertical_range:us.NumberNode({integer:!0,min:1,max:256}),extra_bottom_block_chance:us.NumberNode({min:0,max:1}),extra_edge_column_chance:us.NumberNode({min:0,max:1}),vegetation_chance:us.NumberNode({min:0,max:1}),xz_radius:ds.IntProvider(),replaceable:n({validator:"resource",params:{pool:"$tag/block"}}),ground_state:i("block_state_provider"),vegetation_feature:o};e.register("configured_feature",us.Mod(us.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/feature"}}),config:us.ObjectNode({[us.Switch]:["pop",{push:"type"}],[us.Case]:{"minecraft:bamboo":{probability:us.NumberNode({min:0,max:1})},"minecraft:basalt_columns":{reach:ds.IntProvider({min:0,max:3}),height:ds.IntProvider({min:1,max:10})},"minecraft:block_column":{direction:n({enum:["up","down","north","east","south","west"]}),allowed_placement:i("block_predicate_worldgen"),prioritize_tip:us.BooleanNode(),layers:us.ListNode(us.ObjectNode({height:ds.IntProvider({min:0}),provider:i("block_state_provider")}))},"minecraft:block_pile":{state_provider:i("block_state_provider")},"minecraft:delta_feature":{contents:i("block_state"),rim:i("block_state"),size:ds.IntProvider({min:0,max:16}),rim_size:ds.IntProvider({min:0,max:16})},"minecraft:disk":l,"minecraft:dripstone_cluster":{floor_to_ceiling_search_range:us.NumberNode({integer:!0,min:1,max:512}),height:ds.IntProvider({min:0,max:128}),radius:ds.IntProvider({min:0,max:128}),max_stalagmite_stalactite_height_diff:us.NumberNode({integer:!0,min:0,max:64}),height_deviation:us.NumberNode({integer:!0,min:1,max:64}),dripstone_block_layer_thickness:ds.IntProvider({min:0,max:128}),density:ds.FloatProvider({min:0,max:2}),wetness:ds.FloatProvider({min:0,max:2}),chance_of_dripstone_column_at_max_distance_from_center:us.NumberNode({min:0,max:1}),max_distance_from_edge_affecting_chance_of_dripstone_column:us.NumberNode({integer:!0,min:1,max:64}),max_distance_from_center_affecting_height_bias:us.NumberNode({integer:!0,min:1,max:64})},"minecraft:end_gateway":{exact:us.BooleanNode(),exit:us.Opt(i("block_pos"))},"minecraft:end_spike":{crystal_invulnerable:us.Opt(us.BooleanNode()),crystal_beam_target:us.Opt(i("block_pos")),spikes:us.ListNode(us.ObjectNode({centerX:us.Opt(us.NumberNode({integer:!0})),centerZ:us.Opt(us.NumberNode({integer:!0})),radius:us.Opt(us.NumberNode({integer:!0})),height:us.Opt(us.NumberNode({integer:!0})),guarded:us.Opt(us.BooleanNode())}))},"minecraft:fill_layer":{state:i("block_state"),height:us.NumberNode({integer:!0,min:0,max:255})},"minecraft:flower":a,"minecraft:forest_rock":{state:i("block_state")},"minecraft:fossil":{max_empty_corners_allowed:us.NumberNode({integer:!0,min:0,max:7}),fossil_structures:us.ListNode(n({validator:"resource",params:{pool:"$structure"}})),overlay_structures:us.ListNode(n({validator:"resource",params:{pool:"$structure"}})),fossil_processors:hs.Processors,overlay_processors:hs.Processors},"minecraft:geode":{blocks:us.ObjectNode({filling_provider:i("block_state_provider"),inner_layer_provider:i("block_state_provider"),alternate_inner_layer_provider:i("block_state_provider"),middle_layer_provider:i("block_state_provider"),outer_layer_provider:i("block_state_provider"),inner_placements:us.ListNode(i("block_state")),cannot_replace:n({validator:"resource",params:{pool:"$tag/block"}}),invalid_blocks:n({validator:"resource",params:{pool:"$tag/block"}})}),layers:us.ObjectNode({filling:us.Opt(us.NumberNode({min:.01,max:50})),inner_layer:us.Opt(us.NumberNode({min:.01,max:50})),middle_layer:us.Opt(us.NumberNode({min:.01,max:50})),outer_layer:us.Opt(us.NumberNode({min:.01,max:50}))}),crack:us.ObjectNode({generate_crack_chance:us.Opt(us.NumberNode({min:0,max:1})),base_crack_size:us.Opt(us.NumberNode({min:0,max:5})),crack_point_offset:us.Opt(us.NumberNode({min:0,max:10,integer:!0}))}),noise_multiplier:us.Opt(us.NumberNode({min:0,max:1})),use_potential_placements_chance:us.Opt(us.NumberNode({min:0,max:1})),use_alternate_layer0_chance:us.Opt(us.NumberNode({min:0,max:1})),placements_require_layer0_alternate:us.Opt(us.BooleanNode()),outer_wall_distance:us.Opt(ds.IntProvider({min:1,max:20})),distribution_points:us.Opt(ds.IntProvider({min:1,max:20})),point_offset:us.Opt(ds.IntProvider({min:0,max:10})),min_gen_offset:us.Opt(us.NumberNode({integer:!0})),max_gen_offset:us.Opt(us.NumberNode({integer:!0})),invalid_blocks_threshold:us.NumberNode({integer:!0})},"minecraft:glow_lichen":{search_range:us.Opt(us.NumberNode({min:1,max:64,integer:!0})),chance_of_spreading:us.Opt(us.NumberNode({min:0,max:1})),can_place_on_floor:us.Opt(us.BooleanNode()),can_place_on_ceiling:us.Opt(us.BooleanNode()),can_place_on_wall:us.Opt(us.BooleanNode()),can_be_placed_on:us.ListNode(n({validator:"resource",params:{pool:"block"}}))},"minecraft:huge_brown_mushroom":u,"minecraft:huge_fungus":{hat_state:i("block_state"),decor_state:i("block_state"),stem_state:i("block_state"),valid_base_block:i("block_state"),planted:us.Opt(us.BooleanNode())},"minecraft:huge_red_mushroom":u,"minecraft:ice_patch":l,"minecraft:iceberg":{state:i("block_state")},"minecraft:lake":{fluid:i("block_state_provider"),barrier:i("block_state_provider")},"minecraft:large_dripstone":{floor_to_ceiling_search_range:us.Opt(us.NumberNode({integer:!0,min:1,max:512})),column_radius:ds.IntProvider({min:0,max:60}),height_scale:ds.FloatProvider({min:0,max:20}),max_column_radius_to_cave_height_ratio:us.NumberNode({min:0,max:1}),stalactite_bluntness:ds.FloatProvider({min:.1,max:10}),stalagmite_bluntness:ds.FloatProvider({min:.1,max:10}),wind_speed:ds.FloatProvider({min:0,max:2}),min_radius_for_wind:us.NumberNode({integer:!0,min:0,max:100}),min_bluntness_for_wind:us.NumberNode({min:0,max:5})},"minecraft:nether_forest_vegetation":{state_provider:i("block_state_provider"),spread_width:us.NumberNode({integer:!0,min:1}),spread_height:us.NumberNode({integer:!0,min:1})},"minecraft:netherrack_replace_blobs":{state:i("block_state"),target:i("block_state"),radius:ds.IntProvider({min:0,max:12})},"minecraft:no_bonemeal_flower":a,"minecraft:ore":h,"minecraft:pointed_dripstone":{chance_of_taller_dripstone:us.Opt(us.NumberNode({min:0,max:1})),chance_of_directional_spread:us.Opt(us.NumberNode({min:0,max:1})),chance_of_spread_radius2:us.Opt(us.NumberNode({min:0,max:1})),chance_of_spread_radius3:us.Opt(us.NumberNode({min:0,max:1}))},"minecraft:random_patch":a,"minecraft:random_boolean_selector":{feature_false:o,feature_true:o},"minecraft:random_selector":{features:us.ListNode(us.ObjectNode({chance:us.NumberNode({min:0,max:1}),feature:o})),default:o},"minecraft:replace_single_block":{targets:us.ListNode(d)},"minecraft:root_system":{required_vertical_space_for_tree:us.NumberNode({integer:!0,min:1,max:64}),root_radius:us.NumberNode({integer:!0,min:1,max:64}),root_placement_attempts:us.NumberNode({integer:!0,min:1,max:256}),root_column_max_height:us.NumberNode({integer:!0,min:1,max:4096}),hanging_root_radius:us.NumberNode({integer:!0,min:1,max:64}),hanging_roots_vertical_span:us.NumberNode({integer:!0,min:0,max:16}),hanging_root_placement_attempts:us.NumberNode({integer:!0,min:0,max:256}),allowed_vertical_water_for_tree:us.NumberNode({integer:!0,min:1,max:64}),root_replaceable:n({validator:"resource",params:{pool:"$tag/block"}}),root_state_provider:i("block_state_provider"),hanging_root_state_provider:i("block_state_provider"),allowed_tree_position:i("block_predicate_worldgen"),feature:o},"minecraft:scattered_ore":h,"minecraft:sea_pickle":{count:ds.IntProvider({min:0,max:256})},"minecraft:seagrass":{probability:us.NumberNode({min:0,max:1})},"minecraft:simple_block":{to_place:i("block_state_provider")},"minecraft:simple_random_selector":{features:us.ListNode(o)},"minecraft:spring_feature":{state:i("fluid_state"),rock_count:us.NumberNode({integer:!0}),hole_count:us.NumberNode({integer:!0}),requires_block_below:us.BooleanNode(),valid_blocks:us.ListNode(n({validator:"resource",params:{pool:"block"}}))},"minecraft:tree":{ignore_vines:us.Opt(us.BooleanNode()),force_dirt:us.Opt(us.BooleanNode()),minimum_size:i("feature_size"),dirt_provider:i("block_state_provider"),trunk_provider:i("block_state_provider"),foliage_provider:i("block_state_provider"),trunk_placer:us.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/trunk_placer_type"}}),base_height:us.NumberNode({integer:!0,min:0,max:32}),height_rand_a:us.NumberNode({integer:!0,min:0,max:24}),height_rand_b:us.NumberNode({integer:!0,min:0,max:24}),[us.Switch]:[{push:"type"}],[us.Case]:{"minecraft:bending_trunk_placer":{bend_length:ds.IntProvider({min:1,max:64}),min_height_for_leaves:us.Opt(us.NumberNode({integer:!0,min:1}))}}},{context:"trunk_placer"}),foliage_placer:us.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/foliage_placer_type"}}),radius:ds.IntProvider({min:0,max:16}),offset:ds.IntProvider({min:0,max:16}),[us.Switch]:[{push:"type"}],[us.Case]:{"minecraft:blob_foliage_placer":{height:us.NumberNode({integer:!0,min:0,max:16})},"minecraft:bush_foliage_placer":{height:us.NumberNode({integer:!0,min:0,max:16})},"minecraft:fancy_foliage_placer":{height:us.NumberNode({integer:!0,min:0,max:16})},"minecraft:jungle_foliage_placer":{height:us.NumberNode({integer:!0,min:0,max:16})},"minecraft:mega_pine_foliage_placer":{crown_height:ds.IntProvider({min:0,max:24})},"minecraft:pine_foliage_placer":{height:ds.IntProvider({min:0,max:24})},"minecraft:random_spread_foliage_placer":{foliage_height:ds.IntProvider({min:1,max:512}),leaf_placement_attempts:us.NumberNode({integer:!0,min:0,max:256})},"minecraft:spruce_foliage_placer":{trunk_height:ds.IntProvider({min:0,max:24})}}},{context:"foliage_placer",disableSwitchContext:!0}),decorators:us.ListNode(us.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/tree_decorator_type"}}),[us.Switch]:[{push:"type"}],[us.Case]:{"minecraft:alter_ground":{provider:i("block_state_provider")},"minecraft:beehive":{probability:us.NumberNode({min:0,max:1})},"minecraft:cocoa":{probability:us.NumberNode({min:0,max:1})}}},{context:"tree_decorator"}))},"minecraft:twisting_vines":{spread_width:us.NumberNode({integer:!0,min:1}),spread_height:us.NumberNode({integer:!0,min:1}),max_height:us.NumberNode({integer:!0,min:1})},"minecraft:underwater_magma":{floor_search_range:us.NumberNode({integer:!0,min:0,max:512}),placement_radius_around_floor:us.NumberNode({integer:!0,min:0,max:64}),placement_probability_per_valid_position:us.NumberNode({min:0,max:1})},"minecraft:vegetation_patch":p,"minecraft:waterlogged_vegetation_patch":p}},{context:"feature"})},{context:"feature"}),{default:()=>({type:"minecraft:tree",config:{minimum_size:{type:"minecraft:two_layers_feature_size"},trunk_placer:{type:"minecraft:straight_trunk_placer",base_height:5,height_rand_a:2,height_rand_b:0},foliage_placer:{type:"minecraft:blob_foliage_placer",radius:2,offset:0,height:3}}})})),e.register("placed_feature",us.Mod(us.ObjectNode({feature:r,placement:us.ListNode(i("decorator"))},{context:"placed_feature"}),{default:()=>({feature:"minecraft:oak",placement:[{type:"minecraft:count",count:4},{type:"minecraft:in_square"},{type:"minecraft:heightmap",heightmap:"OCEAN_FLOOR"}]})})),e.register("feature_size",us.Mod(us.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/feature_size_type"}}),min_clipped_height:us.Opt(us.NumberNode({min:0,max:80})),[us.Switch]:[{push:"type"}],[us.Case]:{"minecraft:two_layers_feature_size":{limit:us.Opt(us.NumberNode({integer:!0,min:0,max:81})),lower_size:us.Opt(us.NumberNode({integer:!0,min:0,max:16})),upper_size:us.Opt(us.NumberNode({integer:!0,min:0,max:16}))},"minecraft:three_layers_feature_size":{limit:us.Opt(us.NumberNode({integer:!0,min:0,max:80})),upper_limit:us.Opt(us.NumberNode({integer:!0,min:0,max:80})),lower_size:us.Opt(us.NumberNode({integer:!0,min:0,max:16})),middle_size:us.Opt(us.NumberNode({integer:!0,min:0,max:16})),upper_size:us.Opt(us.NumberNode({integer:!0,min:0,max:16}))}}},{disableSwitchContext:!0}),{default:()=>({type:"minecraft:two_layers_feature_size"})}));const m={seed:us.NumberNode({integer:!0}),noise:i("noise_parameters"),scale:us.Mod(us.NumberNode({min:Number.MIN_VALUE}),{default:()=>1})};e.register("block_state_provider",us.Mod(us.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/block_state_provider_type"}}),[us.Switch]:[{push:"type"}],[us.Case]:{"minecraft:dual_noise_provider":c(s({},m),{variety:ds.InclusiveRange({integer:!0,min:1,max:64}),slow_noise:i("noise_parameters"),slow_scale:us.Mod(us.NumberNode({min:Number.MIN_VALUE}),{default:()=>1}),states:us.ListNode(i("block_state"))}),"minecraft:noise_threshold_provider":c(s({},m),{threshold:us.NumberNode({min:-1,max:1}),high_chance:us.NumberNode({min:0,max:1}),default_state:i("block_state"),low_states:us.ListNode(i("block_state")),high_states:us.ListNode(i("block_state"))}),"minecraft:noise_provider":c(s({},m),{states:us.ListNode(i("block_state"))}),"minecraft:randomized_int_state_provider":{property:n(),values:ds.IntProvider(),source:i("block_state_provider")},"minecraft:rotated_block_provider":{state:i("block_state")},"minecraft:simple_state_provider":{state:i("block_state")},"minecraft:weighted_state_provider":{entries:us.ListNode(us.Mod(us.ObjectNode({weight:us.NumberNode({integer:!0,min:1}),data:i("block_state")}),{default:()=>({data:{}})}))}}},{context:"block_state_provider"}),{default:()=>({type:"minecraft:simple_state_provider"})}));const f={offset:us.Opt(us.ListNode(us.NumberNode({integer:!0,min:-16,max:16}),{minLength:3,maxLength:3}))};e.register("block_predicate_worldgen",us.Mod(us.ObjectNode({type:n({validator:"resource",params:{pool:"block_predicate_type"}}),[us.Switch]:[{push:"type"}],[us.Case]:{"minecraft:all_of":{predicates:us.ListNode(i("block_predicate_worldgen"))},"minecraft:any_of":{predicates:us.ListNode(i("block_predicate_worldgen"))},"minecraft:has_sturdy_face":c(s({},f),{direction:n({enum:"direction"})}),"minecraft:inside_world_bounds":s({},f),"minecraft:matching_block_tag":c(s({},f),{tag:n({validator:"resource",params:{pool:"$tag/block"}})}),"minecraft:matching_blocks":c(s({},f),{blocks:us.ListNode(n({validator:"resource",params:{pool:"block"}}))}),"minecraft:matching_fluids":c(s({},f),{fluids:us.ListNode(n({validator:"resource",params:{pool:"fluid"}}))}),"minecraft:not":{predicate:i("block_predicate_worldgen")},"minecraft:would_survive":c(s({},f),{state:i("block_state")})}},{context:"block_predicate"}),{default:()=>({type:"minecraft:true"})}))};var ps={};Object.defineProperty(ps,"__esModule",{value:!0}),ps.initNoiseSettingsSchemas=void 0;const ms=Pe,fs=ka;ps.initNoiseSettingsSchemas=function(e,t){const i=ms.Reference.bind(void 0,e),n=ms.StringNode.bind(void 0,t);e.register("noise_settings",ms.Mod(ms.ObjectNode({sea_level:ms.NumberNode({integer:!0}),disable_mob_generation:ms.BooleanNode(),noise_caves_enabled:ms.BooleanNode(),noodle_caves_enabled:ms.BooleanNode(),aquifers_enabled:ms.BooleanNode(),ore_veins_enabled:ms.BooleanNode(),legacy_random_source:ms.BooleanNode(),default_block:i("block_state"),default_fluid:i("block_state"),noise:ms.ObjectNode({min_y:ms.NumberNode({integer:!0,min:-2048,max:2047}),height:ms.NumberNode({integer:!0,min:0,max:4096}),size_horizontal:ms.NumberNode({integer:!0}),size_vertical:ms.NumberNode({integer:!0}),island_noise_override:ms.Opt(ms.BooleanNode()),amplified:ms.Opt(ms.BooleanNode()),large_biomes:ms.Opt(ms.BooleanNode()),sampling:ms.ObjectNode({xz_scale:ms.NumberNode(),y_scale:ms.NumberNode(),xz_factor:ms.NumberNode(),y_factor:ms.NumberNode()}),bottom_slide:i("noise_slider"),top_slide:i("noise_slider"),terrain_shaper:i("terrain_shaper")}),surface_rule:i("material_rule"),structures:i("generator_structures")},{context:"noise_settings"}),(e=>({default:()=>fs.DefaultNoiseSettings,validate:(t,i,n,r)=>{var o,a,s,c;return(null===(o=null==(i=e.validate(t,i,n,r))?void 0:i.noise)||void 0===o?void 0:o.min_y)+(null===(a=null==i?void 0:i.noise)||void 0===a?void 0:a.height)>2047&&n.add(t.push("noise").push("height"),"error.min_y_plus_height",2047),(null===(s=null==i?void 0:i.noise)||void 0===s?void 0:s.height)%16!=0&&n.add(t.push("noise").push("height"),"error.height_multiple",16),(null===(c=null==i?void 0:i.noise)||void 0===c?void 0:c.min_y)%16!=0&&n.add(t.push("noise").push("min_y"),"error.min_y_multiple",16),i}})))),e.register("noise_slider",ms.ObjectNode({target:ms.NumberNode(),size:ms.NumberNode({integer:!0,min:0}),offset:ms.NumberNode({integer:!0})})),e.register("generator_structures",ms.ObjectNode({stronghold:ms.Opt(ms.ObjectNode({distance:ms.NumberNode({integer:!0,min:0,max:1023}),spread:ms.NumberNode({integer:!0,min:0,max:1023}),count:ms.NumberNode({integer:!0,min:1,max:4095})})),structures:ms.MapNode(n({validator:"resource",params:{pool:"worldgen/structure_feature"}}),ms.Mod(ms.ObjectNode({spacing:ms.NumberNode({integer:!0,min:0,max:4096}),separation:ms.Mod(ms.NumberNode({integer:!0,min:0,max:4096}),(e=>({validate:(t,i,n,r)=>(t.pop().push("spacing").get()<=i&&n.add(t,"error.separation_smaller_spacing"),e.validate(t,i,n,r))}))),salt:ms.NumberNode({integer:!0,min:0})},{context:"generator_structure"}),{default:()=>({spacing:10,separation:5,salt:0})}))})),e.register("generator_layer",ms.Mod(ms.ObjectNode({block:n({validator:"resource",params:{pool:"block"}}),height:ms.NumberNode({integer:!0,min:1})}),{default:()=>({block:"minecraft:stone",height:1})})),e.register("terrain_shaper",ms.Mod(ms.ObjectNode({offset:i("terrain_spline"),factor:i("terrain_spline"),jaggedness:i("terrain_spline")},{context:"terrain_shaper"}),{default:()=>({offset:0,factor:0,jaggedness:0})})),e.register("terrain_spline",ms.Mod(ms.ChoiceNode([{type:"number",node:ms.NumberNode()},{type:"object",node:ms.ObjectNode({coordinate:ms.Mod(n({enum:["continents","erosion","weirdness","ridges"]}),{default:()=>"continents"}),points:ms.ListNode(ms.ObjectNode({location:ms.NumberNode(),derivative:ms.NumberNode(),value:i("terrain_spline")}))},{category:"function"})}],{context:"terrain_spline",choiceContext:"terrain_spline"}),{default:()=>0}))};var gs={};Object.defineProperty(gs,"__esModule",{value:!0}),gs.initStructureFeatureSchemas=void 0;const _s=Pe;gs.initStructureFeatureSchemas=function(e,t){const i=_s.StringNode.bind(void 0,t),n=_s.Reference.bind(void 0,e),r={start_pool:i({validator:"resource",params:{pool:"$worldgen/template_pool"}}),size:_s.NumberNode({integer:!0})};e.register("configured_structure_feature",_s.Mod(_s.ObjectNode({type:i({validator:"resource",params:{pool:"worldgen/structure_feature"}}),config:_s.ObjectNode({[_s.Switch]:["pop",{push:"type"}],[_s.Case]:{"minecraft:bastion_remnant":r,"minecraft:buried_treasure":{probability:_s.NumberNode({min:0,max:1})},"minecraft:mineshaft":{type:i({enum:["normal","mesa"]}),probability:_s.NumberNode({min:0,max:1})},"minecraft:nether_fossil":{height:n("height_provider")},"minecraft:ocean_ruin":{biome_temp:i({enum:["cold","warm"]}),large_probability:_s.NumberNode({min:0,max:1}),cluster_probability:_s.NumberNode({min:0,max:1})},"minecraft:pillager_outpost":r,"minecraft:ruined_portal":{portal_type:i({enum:["standard","desert","jungle","mountain","nether","ocean","swamp"]})},"minecraft:shipwreck":{is_beached:_s.Opt(_s.BooleanNode())},"minecraft:village":r}},{context:"structure_feature",disableSwitchContext:!0})},{context:"structure_feature"}),{default:()=>({type:"minecraft:bastion_remnant",config:{start_pool:"minecraft:bastion/starts",size:6}})}))};var bs={};Object.defineProperty(bs,"__esModule",{value:!0}),bs.initSurfaceRuleSchemas=void 0;const vs=Pe;bs.initSurfaceRuleSchemas=function(e,t){const i=vs.StringNode.bind(void 0,t),n=vs.Reference.bind(void 0,e);e.register("material_rule",vs.Mod(vs.ObjectNode({type:i({validator:"resource",params:{pool:"worldgen/material_rule"}}),[vs.Switch]:[{push:"type"}],[vs.Case]:{"minecraft:block":{result_state:n("block_state")},"minecraft:condition":{if_true:n("material_condition"),then_run:n("material_rule")},"minecraft:sequence":{sequence:vs.ListNode(n("material_rule"))}}},{context:"material_rule",category:"pool"}),{default:()=>({type:"minecraft:block",result_state:{Name:"minecraft:stone"}})})),e.register("material_condition",vs.Mod(vs.ObjectNode({type:i({validator:"resource",params:{pool:"worldgen/material_condition"}}),[vs.Switch]:[{push:"type"}],[vs.Case]:{"minecraft:biome":{biome_is:vs.ListNode(i({validator:"resource",params:{pool:"$worldgen/biome"}}))},"minecraft:noise_threshold":{noise:i({validator:"resource",params:{pool:"$worldgen/noise"}}),min_threshold:vs.NumberNode(),max_threshold:vs.NumberNode()},"minecraft:not":{invert:n("material_condition")},"minecraft:stone_depth":{offset:vs.NumberNode({integer:!0}),surface_type:i({enum:"cave_surface"}),add_surface_depth:vs.BooleanNode(),add_surface_secondary_depth:vs.BooleanNode()},"minecraft:vertical_gradient":{random_name:i(),true_at_and_below:n("vertical_anchor"),false_at_and_above:n("vertical_anchor")},"minecraft:water":{offset:vs.NumberNode({integer:!0}),surface_depth_multiplier:vs.NumberNode({integer:!0,min:-20,max:20}),add_stone_depth:vs.BooleanNode()},"minecraft:y_above":{anchor:n("vertical_anchor"),surface_depth_multiplier:vs.NumberNode({integer:!0,min:-20,max:20}),add_stone_depth:vs.BooleanNode()}}},{context:"material_condition"}),{default:()=>({type:"minecraft:biome",is_biome:"minecraft:plains"})}))};var ys={};Object.defineProperty(ys,"__esModule",{value:!0}),ys.initTemplatePoolSchemas=void 0;const ws=Pe,xs=cs;ys.initTemplatePoolSchemas=function(e,t){const i=ws.Reference.bind(void 0,e),n=ws.StringNode.bind(void 0,t);e.register("template_pool",ws.Mod(ws.ObjectNode({name:n(),fallback:n(),elements:ws.ListNode(i("template_weighted_element"))},{context:"template_pool"}),{default:()=>({fallback:"minecraft:empty",elements:[{weight:1,element:{element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"}}]})})),e.register("template_weighted_element",ws.Mod(ws.ObjectNode({weight:ws.NumberNode({integer:!0,min:1}),element:i("template_element")},{category:"pool"}),{default:()=>({weight:1,element:{element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"}})})),e.register("template_element",ws.Mod(ws.ObjectNode({element_type:n({validator:"resource",params:{pool:"worldgen/structure_pool_element"}}),projection:n({enum:["rigid","terrain_matching"]}),[ws.Switch]:[{push:"element_type"}],[ws.Case]:{"minecraft:feature_pool_element":{feature:n({validator:"resource",params:{pool:"$worldgen/placed_feature"}})},"minecraft:legacy_single_pool_element":{location:n({validator:"resource",params:{pool:"$structure"}}),processors:xs.Processors},"minecraft:list_pool_element":{elements:ws.ListNode(i("template_element"))},"minecraft:single_pool_element":{location:n({validator:"resource",params:{pool:"$structure"}}),processors:xs.Processors}}},{context:"template_element",disableSwitchContext:!0}),{default:()=>({element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"})}))},Object.defineProperty(Za,"__esModule",{value:!0}),Za.initWorldgenSchemas=void 0;const Ns=Qa,ks=ts,As=rs,Cs=ss,Os=ps,Ss=cs,Es=gs,Fs=bs,Ds=ys;Za.initWorldgenSchemas=function(e,t){Ss.initProcessorListSchemas(e,t),Ns.initBiomeSchemas(e,t),ks.initCarverSchemas(e,t),As.initDecoratorSchemas(e,t),Cs.initFeatureSchemas(e,t),Os.initNoiseSettingsSchemas(e,t),Es.initStructureFeatureSchemas(e,t),Fs.initSurfaceRuleSchemas(e,t),Ds.initTemplatePoolSchemas(e,t)};var Bs={};Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.initWorldSettingsSchemas=void 0;const Ls=Pe;Bs.initWorldSettingsSchemas=function(e,t){const i=Ls.Reference.bind(void 0,e),n=Ls.StringNode.bind(void 0,t);e.register("world_settings",Ls.Mod(Ls.ObjectNode({generate_features:Ls.BooleanNode(),bonus_chest:Ls.BooleanNode(),seed:Ls.NumberNode({integer:!0}),dimensions:Ls.MapNode(n({validator:"resource",params:{pool:"$dimension"}}),i("dimension"))},{context:"world_settings"}),{default:()=>{const e=Math.floor(4294967296*Math.random())-2147483648;return{generate_features:!0,bonus_chest:!1,seed:e,dimensions:{"minecraft:overworld":{type:"minecraft:overworld",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:multi_noise",preset:"minecraft:overworld"},settings:"minecraft:overworld"}},"minecraft:the_nether":{type:"minecraft:the_nether",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:multi_noise",preset:"minecraft:nether"},settings:"minecraft:nether"}},"minecraft:the_end":{type:"minecraft:the_end",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:the_end",seed:e},settings:"minecraft:end"}}}}}}))},Object.defineProperty(ma,"__esModule",{value:!0}),ma.initSchemas=void 0;const Ms=fa,Ts=_a,Rs=ka,$s=Aa,js=Sa,Is=Da,Ps=Ma,zs=$a,Us=Ua,Ws=Ha,Hs=Va,qs=Ka,Vs=Ja,Gs=Za,Ks=Bs;ma.initSchemas=function(e,t){Rs.initCommonSchemas(e,t),Ms.initAdvancementSchemas(e,t),Ts.initAssetsSchemas(e,t),$s.initConditionSchemas(e,t),Is.initDimensionTypeSchemas(e,t),js.initDimensionSchemas(e,t),Ps.initItemModifierSchemas(e,t),zs.initLootTableSchemas(e,t),Us.initPackMcmetaSchemas(e,t),Ws.initPredicatesSchemas(e,t),Hs.initRecipeSchemas(e,t),qs.initTagsSchemas(e,t),Vs.initTextComponentSchemas(e,t),Gs.initWorldgenSchemas(e,t),Ks.initWorldSettingsSchemas(e,t)};var Xs=Ie&&Ie.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),Js=Ie&&Ie.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ys=Ie&&Ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.hasOwnProperty.call(e,i)&&Xs(t,e,i);return Js(t,e),t};Object.defineProperty(ha,"__esModule",{value:!0});var Zs=ha.getSchemas=ha.getCollections=void 0;const Qs=Pe,ec=pa,tc=ma;var ic=ha.lootContext=Ys(ja);var nc=ha.getCollections=function(){const e=new Qs.CollectionRegistry;return ec.initCollections(e),e};Zs=ha.getSchemas=function(e){const t=new Qs.SchemaRegistry;return tc.initSchemas(t,e),t};var rc=Object.freeze(Object.assign(Object.create(null),ha,{[Symbol.toStringTag]:"Module",get getSchemas(){return Zs},get getCollections(){return nc},lootContext:ic,default:ha})),oc={},ac={};Object.defineProperty(ac,"__esModule",{value:!0}),ac.initCollections=void 0,ac.initCollections=function(e){e.register("advancement_trigger",["minecraft:bee_nest_destroyed","minecraft:bred_animals","minecraft:brewed_potion","minecraft:changed_dimension","minecraft:channeled_lightning","minecraft:construct_beacon","minecraft:consume_item","minecraft:cured_zombie_villager","minecraft:effects_changed","minecraft:enchanted_item","minecraft:enter_block","minecraft:entity_hurt_player","minecraft:entity_killed_player","minecraft:fall_from_height","minecraft:filled_bucket","minecraft:fishing_rod_hooked","minecraft:hero_of_the_village","minecraft:impossible","minecraft:inventory_changed","minecraft:item_durability_changed","minecraft:item_used_on_block","minecraft:killed_by_crossbow","minecraft:levitation","minecraft:lightning_strike","minecraft:location","minecraft:nether_travel","minecraft:placed_block","minecraft:player_generates_container_loot","minecraft:player_hurt_entity","minecraft:player_interacted_with_entity","minecraft:player_killed_entity","minecraft:recipe_unlocked","minecraft:ride_entity_in_lava","minecraft:shot_crossbow","minecraft:slept_in_bed","minecraft:slide_down_block","minecraft:started_riding","minecraft:summoned_entity","minecraft:tame_animal","minecraft:target_hit","minecraft:tick","minecraft:thrown_item_picked_up_by_entity","minecraft:used_ender_eye","minecraft:used_totem","minecraft:using_item","minecraft:villager_trade","minecraft:voluntary_exile"]),e.register("keybind",["key.advancements","key.attack","key.back","key.chat","key.command","key.drop","key.forward","key.fullscreen","key.hotbar.1","key.hotbar.2","key.hotbar.3","key.hotbar.4","key.hotbar.5","key.hotbar.6","key.hotbar.7","key.hotbar.8","key.hotbar.9","key.inventory","key.jump","key.left","key.loadToolbarActivator","key.pickItem","key.playerlist","key.right","key.saveToolbarActivator","key.screenshot","key.smoothCamera","key.sneak","key.spectatorOutlines","key.sprint","key.swapOffhand","key.togglePerspective","key.use"]),e.register("slot",["mainhand","offhand","head","chest","legs","feet"]),e.register("gamemode",["survival","creative","adventure","spectator"]),e.register("entity_source",["this","killer","direct_killer","killer_player"]),e.register("copy_source",["block_entity","this","killer","killer_player"]),e.register("loot_table_apply_bonus_formula",["minecraft:uniform_bonus_count","minecraft:binomial_with_bonus_count","minecraft:ore_drops"]),e.register("map_decoration",["mansion","monument","player","frame","red_marker","blue_marker","target_x","target_point","player_off_map","player_off_limits","red_x","banner_white","banner_orange","banner_magenta","banner_light_blue","banner_yellow","banner_lime","banner_pink","banner_gray","banner_light_gray","banner_cyan","banner_purple","banner_blue","banner_brown","banner_green","banner_red","banner_black"]),e.register("map_feature",["bastion_remnant","buried_treasure","desert_pyramid","endcity","fortress","igloo","jungle_pyramid","mansion","mineshaft","monument","nether_fossil","ocean_ruin","pillager_outpost","ruined_portal","shipwreck","stronghold","swamp_hut","village"]),e.register("recipe_group",["bed","light_gray_dye","iron_ingot","wooden_stairs","black_dye","stained_terracotta","dyed_bed","magenta_dye","bark","rabbit_stew","light_blue_dye","wooden_fence_gate","planks","stained_glass","wooden_door","stained_glass_pane","wooden_fence","sticks","concrete_powder","wooden_pressure_plate","boat","brown_dye","yellow_dye","bonemeal","red_dye","wooden_trapdoor","wooden_button","gold_ingot","pink_dye","wooden_slab","orange_dye","carpet","sign","wool","sugar","blue_dye","white_dye","banner","netherite_ingot"]),e.register("biome_category",["beach","desert","extreme_hills","forest","icy","jungle","mesa","mountain","mushroom","nether","none","ocean","plains","river","savanna","swamp","taiga","the_end","underground"]),e.register("heightmap_type",["MOTION_BLOCKING","MOTION_BLOCKING_NO_LEAVES","OCEAN_FLOOR","OCEAN_FLOOR_WG","WORLD_SURFACE","WORLD_SURFACE_WG"]),e.register("generation_step",["air","liquid"]),e.register("loot_context_type",["minecraft:empty","minecraft:chest","minecraft:command","minecraft:selector","minecraft:fishing","minecraft:entity","minecraft:gift","minecraft:barter","minecraft:advancement_reward","minecraft:advancement_entity","minecraft:generic","minecraft:block"]),e.register("banner_pattern",["base","square_bottom_left","square_bottom_right","square_top_left","square_top_right","stripe_bottom","stripe_top","stripe_left","stripe_right","stripe_center","stripe_middle","stripe_downright","stripe_downleft","small_stripes","cross","straight_cross","triangle_bottom","triangle_top","triangles_bottom","triangles_top","diagonal_left","diagonal_up_right","diagonal_up_left","diagonal_right","circle","rhombus","half_vertical","half_horizontal","half_vertical_right","half_horizontal_bottom","border","curly_border","gradient","gradient_up","bricks","globe","creeper","skull","flower","mojang","piglin"]),e.register("dye_color",["white","orange","magenta","light_blue","yellow","lime","pink","gray","light_gray","cyan","purple","blue","brown","green","red","black"]),e.register("cave_surface",["floor","ceiling"]),e.register("direction",["down","up","north","east","south","west"]),e.register("axis",["x","y","z"]),e.register("display_position",["firstperson_righthand","firstperson_lefthand","thirdperson_righthand","thirdperson_lefthand","gui","head","ground","fixed"]),e.register("gui_light",["front","side"]),e.register("item_model_predicates",["angle","blocking","broken","cast","charged","cooldown","custom_model_data","damage","damaged","firework","lefthanded","pull","pulling","throwing","time"]),e.register("mob_category",["monster","creature","ambient","axolotls","underground_water_creature","water_creature","water_ambient","misc"])};var sc={},cc={};Object.defineProperty(cc,"__esModule",{value:!0}),cc.initAdvancementSchemas=void 0;const lc=Pe;cc.initAdvancementSchemas=function(e,t){const i=lc.Reference.bind(void 0,e),n=lc.StringNode.bind(void 0,t),r=lc.ChoiceNode([{type:"object",node:lc.Opt(i("entity_predicate")),change:e=>{var t,i;return null!==(i=null===(t=e[0])||void 0===t?void 0:t.predicate)&&void 0!==i?i:{}}},{type:"list",node:lc.ListNode(i("condition")),change:e=>[{condition:"minecraft:entity_properties",predicate:e}]}],{context:"conditions"});e.register("advancement",lc.Mod(lc.ObjectNode({display:lc.Opt(lc.Mod(lc.ObjectNode({icon:lc.ObjectNode({item:n({validator:"resource",params:{pool:"item"}}),nbt:lc.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"item"}]}}}))}),title:i("text_component"),description:i("text_component"),background:lc.Opt(n()),frame:lc.Opt(n({enum:["task","challenge","goal"]})),show_toast:lc.Opt(lc.BooleanNode()),announce_to_chat:lc.Opt(lc.BooleanNode()),hidden:lc.Opt(lc.BooleanNode())}),{default:()=>({icon:{item:"minecraft:stone"},title:"",description:""})})),parent:lc.Opt(n({validator:"resource",params:{pool:"$advancement"}})),criteria:lc.MapNode(n(),i("advancement_criteria")),requirements:lc.Opt(lc.ListNode(lc.ListNode(n()))),rewards:lc.Opt(lc.ObjectNode({function:lc.Opt(n({validator:"resource",params:{pool:"$function"}})),loot:lc.Opt(lc.ListNode(n({validator:"resource",params:{pool:"$loot_table"}}))),recipes:lc.Opt(lc.ListNode(n({validator:"resource",params:{pool:"$recipe"}}))),experience:lc.Opt(lc.NumberNode({integer:!0}))}))},{context:"advancement"}),{default:()=>({criteria:{requirement:{trigger:"minecraft:location"}}})})),e.register("advancement_criteria",lc.ObjectNode({trigger:n({validator:"resource",params:{pool:t.get("advancement_trigger")}}),conditions:lc.Opt(lc.ObjectNode({player:lc.Mod(r,{enabled:e=>"minecraft:impossible"!==e.pop().push("trigger").get()}),[lc.Switch]:["pop",{push:"trigger"}],[lc.Case]:{"minecraft:bee_nest_destroyed":{block:lc.Opt(n({validator:"resource",params:{pool:"block"}})),num_bees_inside:lc.Opt(lc.NumberNode({integer:!0})),item:lc.Opt(i("item_predicate"))},"minecraft:bred_animals":{parent:r,partner:r,child:r},"minecraft:brewed_potion":{potion:lc.Opt(n({validator:"resource",params:{pool:"potion"}}))},"minecraft:changed_dimension":{from:lc.Opt(n({validator:"resource",params:{pool:"$dimension"}})),to:lc.Opt(n({validator:"resource",params:{pool:"$dimension"}}))},"minecraft:channeled_lightning":{victims:lc.Opt(lc.ListNode(r))},"minecraft:construct_beacon":{level:i("int_bounds")},"minecraft:consume_item":{item:lc.Opt(i("item_predicate"))},"minecraft:cured_zombie_villager":{villager:r,zombie:r},"minecraft:effects_changed":{effects:lc.Opt(lc.MapNode(n({validator:"resource",params:{pool:"mob_effect"}}),lc.ObjectNode({amplifier:i("int_bounds"),duration:i("int_bounds")}))),source:lc.Opt(r)},"minecraft:enter_block":{block:lc.Opt(n({validator:"resource",params:{pool:"block"}})),state:lc.Opt(lc.MapNode(n(),n(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}}))},"minecraft:enchanted_item":{levels:i("int_bounds"),item:lc.Opt(i("item_predicate"))},"minecraft:entity_hurt_player":{damage:lc.Opt(i("damage_predicate"))},"minecraft:entity_killed_player":{entity:r,killing_blow:lc.Opt(i("damage_source_predicate"))},"minecraft:fall_from_height":{start_position:lc.Opt(i("location_predicate")),distance:lc.Opt(i("distance_predicate"))},"minecraft:filled_bucket":{item:lc.Opt(i("item_predicate"))},"minecraft:fishing_rod_hooked":{entity:r,item:lc.Opt(i("item_predicate"))},"minecraft:hero_of_the_village":{location:lc.Opt(i("location_predicate"))},"minecraft:inventory_changed":{slots:lc.Opt(lc.ObjectNode({empty:i("int_bounds"),occupied:i("int_bounds"),full:i("int_bounds")})),items:lc.Opt(lc.ListNode(i("item_predicate")))},"minecraft:item_durability_changed":{delta:i("int_bounds"),durability:i("int_bounds"),item:lc.Opt(i("item_predicate"))},"minecraft:item_used_on_block":{item:lc.Opt(i("item_predicate")),location:lc.Opt(i("location_predicate"))},"minecraft:killed_by_crossbow":{unique_entity_types:i("int_bounds"),victims:lc.Opt(lc.ListNode(r))},"minecraft:levitation":{distance:lc.Opt(i("distance_predicate")),duration:i("int_bounds")},"minecraft:lightning_strike":{lightning:r,bystander:r},"minecraft:location":{location:lc.Opt(i("location_predicate"))},"minecraft:nether_travel":{start_position:lc.Opt(i("location_predicate")),distance:lc.Opt(i("distance_predicate"))},"minecraft:placed_block":{block:lc.Opt(n({validator:"resource",params:{pool:"block"}})),state:lc.Opt(lc.MapNode(n(),n(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}})),item:lc.Opt(i("item_predicate")),location:lc.Opt(i("location_predicate"))},"minecraft:player_generates_container_loot":{loot_table:n({validator:"resource",params:{pool:"$loot_table"}})},"minecraft:player_hurt_entity":{damage:lc.Opt(i("damage_predicate")),entity:r},"minecraft:player_interacted_with_entity":{item:lc.Opt(i("item_predicate")),entity:r},"minecraft:player_killed_entity":{entity:r,killing_blow:lc.Opt(i("damage_source_predicate"))},"minecraft:recipe_unlocked":{recipe:n({validator:"resource",params:{pool:"$recipe"}})},"minecraft:ride_entity_in_lava":{start_position:lc.Opt(i("location_predicate")),distance:lc.Opt(i("distance_predicate"))},"minecraft:slept_in_bed":{location:lc.Opt(i("location_predicate"))},"minecraft:slide_down_block":{block:lc.Opt(n({validator:"resource",params:{pool:"block"}}))},"minecraft:shot_crossbow":{item:lc.Opt(i("item_predicate"))},"minecraft:summoned_entity":{entity:r},"minecraft:tame_animal":{entity:r},"minecraft:target_hit":{projectile:r,shooter:r,signal_strength:i("int_bounds")},"minecraft:thrown_item_picked_up_by_entity":{entity:lc.Opt(i("entity_predicate")),item:lc.Opt(i("item_predicate"))},"minecraft:used_ender_eye":{distance:lc.Opt(i("float_bounds"))},"minecraft:used_totem":{item:lc.Opt(i("item_predicate"))},"minecraft:using_item":{item:lc.Opt(i("item_predicate"))},"minecraft:villager_trade":{villager:lc.Opt(i("entity_predicate")),item:lc.Opt(i("item_predicate"))},"minecraft:voluntary_exile":{location:lc.Opt(i("location_predicate"))}}},{context:"criterion"}))},{category:"predicate",context:"criterion"}))};var uc={},dc={};Object.defineProperty(dc,"__esModule",{value:!0}),dc.initModelSchemas=void 0;const hc=Pe;dc.initModelSchemas=function(e,t){hc.Reference.bind(void 0,e);const i=hc.StringNode.bind(void 0,t),n=(e,t,i)=>hc.ListNode(hc.NumberNode({min:t,max:i}),{minLength:e,maxLength:e}),r=hc.ChoiceNode([{type:"alias",match:e=>"string"==typeof e&&e.startsWith("#"),node:i(),change:e=>"string"==typeof e?`#${e}`:"#0"},{type:"reference",match:e=>"string"==typeof e,node:i({validator:"resource",params:{pool:"$texture"}}),change:e=>"string"==typeof e?e.replace(/^#/,""):""}],{choiceContext:"texture"});e.register("model",hc.Mod(hc.ObjectNode({parent:hc.Opt(i({validator:"resource",params:{pool:"$model"}})),ambientocclusion:hc.Opt(hc.BooleanNode()),gui_light:hc.Opt(i({enum:"gui_light"})),textures:hc.Opt(hc.MapNode(i(),r)),elements:hc.Opt(hc.ListNode(hc.ObjectNode({from:n(3,-16,32),to:n(3,-16,32),rotation:hc.Opt(hc.ObjectNode({origin:n(3),axis:i({enum:"axis"}),angle:hc.NumberEnum({values:[-45,-22.5,0,22.5,45]}),rescale:hc.Opt(hc.BooleanNode())})),shade:hc.Opt(hc.BooleanNode()),faces:hc.MapNode(i({enum:"direction"}),hc.ObjectNode({texture:r,uv:hc.Opt(n(4)),cullface:hc.Opt(i({enum:"direction"})),rotation:hc.Opt(hc.NumberNode({integer:!0})),tintindex:hc.Opt(hc.NumberNode({integer:!0}))}))},{context:"model_element"}))),display:hc.Opt(hc.MapNode(i({enum:"display_position"}),hc.ObjectNode({rotation:n(3),translation:n(3,-80,80),scale:n(3,-4,4)},{context:"item_transform"}))),overrides:hc.Opt(hc.ListNode(hc.ObjectNode({predicate:hc.MapNode(i({enum:"item_model_predicates"}),hc.NumberNode()),model:i({validator:"resource",params:{pool:"$model"}})},{context:"model_override"})))},{context:"model"}),{default:()=>({parent:"minecraft:item/generated",textures:{layer0:"minecraft:item/diamond"}})}))};var pc={};Object.defineProperty(pc,"__esModule",{value:!0}),pc.initBlockDefinitionSchemas=void 0;const mc=Pe;pc.initBlockDefinitionSchemas=function(e,t){const i=mc.Reference.bind(void 0,e),n=mc.StringNode.bind(void 0,t);e.register("block_definition",mc.Mod(mc.ChoiceNode([{type:"variants",match:e=>void 0!==e.variants,node:mc.ObjectNode({variants:mc.MapNode(n(),i("model_variant"))}),change:e=>({variants:{"":{}}})},{type:"multipart",match:e=>void 0!==e.multipart,node:mc.ObjectNode({multipart:mc.ListNode(mc.ObjectNode({when:mc.Opt(i("multipart_condition")),apply:i("model_variant")}))}),change:e=>({multipart:{when:{},apply:{}}})}],{context:"block_definition"}),{default:()=>({variants:{"":{model:"minecraft:block/stone"}}})}));const r={model:n({validator:"resource",params:{pool:"$model"}}),x:mc.Opt(mc.NumberEnum({integer:!0,values:[0,90,180,270]})),y:mc.Opt(mc.NumberEnum({integer:!0,values:[0,90,180,270]})),uvlock:mc.Opt(mc.BooleanNode())};e.register("model_variant",mc.ChoiceNode([{type:"object",node:mc.ObjectNode(r),change:e=>Array.isArray(e)&&e.length>0?e[0]:{}},{type:"list",node:mc.ListNode(mc.ObjectNode(c(s({},r),{weight:mc.Opt(mc.NumberNode({integer:!0,min:1}))}),{context:"model_variant"})),change:e=>[s({weight:1},e)]}],{context:"model_variant"})),e.register("multipart_condition",mc.ChoiceNode([{type:"object",priority:-1,match:()=>!0,node:mc.MapNode(n(),n()),change:e=>"object"==typeof e&&Array.isArray(null==e?void 0:e.OR)&&e.OR.length>0?e.OR[0]:{}},{type:"or",match:e=>"object"==typeof e&&void 0!==(null==e?void 0:e.OR),node:mc.ObjectNode({OR:mc.ListNode(i("multipart_condition"))}),change:e=>({OR:[null!=e?e:{}]})}],{context:"multipart_condition"}))},Object.defineProperty(uc,"__esModule",{value:!0}),uc.initAssetsSchemas=void 0;const fc=dc,gc=pc;uc.initAssetsSchemas=function(e,t){gc.initBlockDefinitionSchemas(e,t),fc.initModelSchemas(e,t)};var _c={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.initCommonSchemas=e.Tag=e.InclusiveRange=e.IntProvider=e.FloatProvider=e.NoiseSettingsPresets=e.DefaultNoiseSettings=e.DimensionTypePresets=e.DefaultDimensionType=e.FunctionCases=e.ConditionCases=void 0;const t=Pe;e.DefaultDimensionType={ultrawarm:!1,natural:!0,piglin_safe:!1,respawn_anchor_works:!1,bed_works:!0,has_raids:!0,has_skylight:!0,has_ceiling:!1,coordinate_scale:1,ambient_light:0,logical_height:256,infiniburn:"#minecraft:infiniburn_overworld",min_y:0,height:256},e.DefaultNoiseSettings={sea_level:63,ore_veins_enabled:!0,disable_mob_generation:!1,aquifers_enabled:!0,legacy_random_source:!1,default_block:{Name:"minecraft:stone"},default_fluid:{Properties:{level:"0"},Name:"minecraft:water"},noise:{min_y:-64,height:384,size_horizontal:1,size_vertical:2,top_slide:{target:-.078125,size:2,offset:8},bottom_slide:{target:.1171875,size:3,offset:0},sampling:{xz_scale:.9999999814507745,y_scale:.9999999814507745,xz_factor:80,y_factor:160},terrain_shaper:{offset:0,factor:0,jaggedness:0}},noise_router:{barrier:0,fluid_level_floodedness:0,fluid_level_spread:0,lava:0,temperature:0,vegetation:0,continents:0,erosion:0,depth:0,ridges:0,initial_density_without_jaggedness:0,final_density:{type:"minecraft:interpolated",argument:"minecraft:overworld/base_3d_noise"},vein_toggle:0,vein_ridged:0,vein_gap:0},surface_rule:{type:"minecraft:sequence",sequence:[]}},e.initCommonSchemas=function(i,n){const r=t.StringNode.bind(void 0,n),o=t.Reference.bind(void 0,i);i.register("block_state",t.Mod(t.ObjectNode({Name:r({validator:"resource",params:{pool:"block"}}),Properties:t.Opt(t.MapNode(r(),r(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"Name"}]}}}))},{context:"block_state"}),{default:()=>({Name:"minecraft:stone"})})),i.register("fluid_state",t.Mod(t.ObjectNode({Name:r({validator:"resource",params:{pool:"fluid"}}),Properties:t.Opt(t.MapNode(r(),r()))},{context:"fluid_state"}),{default:()=>({Name:"minecraft:water",Properties:{level:"0"}})})),i.register("block_pos",t.Mod(t.ListNode(t.NumberNode({integer:!0}),{minLength:3,maxLength:3}),{default:()=>[0,0,0]}));const a=e=>t.Opt(t.ChoiceNode([{type:"number",node:t.NumberNode({integer:e}),change:e=>{var t,i;return void 0===e?0:null!==(i=null!==(t=e.min)&&void 0!==t?t:e.max)&&void 0!==i?i:0}},{type:"object",node:t.ObjectNode({min:t.Opt(t.NumberNode({integer:e})),max:t.Opt(t.NumberNode({integer:e}))},{context:"range"}),change:e=>({min:null!=e?e:0,max:null!=e?e:0})}]));i.register("int_bounds",a(!0)),i.register("float_bounds",a()),i.register("int_range",t.ChoiceNode([{type:"object",node:t.ObjectNode({min:t.Opt(o("number_provider")),max:t.Opt(o("number_provider"))})},{type:"number",node:t.NumberNode({integer:!0})}],{context:"range"}));const c=(e,i,n,o,a,c,l)=>{let u={};a&&Object.keys(l[a]).forEach((e=>{u[e]=t.Mod(l[a][e],{enabled:e=>void 0===e.push("type").get()})}));const d=t.ObjectNode(s({type:t.Mod(t.Opt(r({validator:"resource",params:{pool:e}})),{hidden:()=>!0}),[t.Switch]:[{push:"type"}],[t.Case]:l},u),{context:c,disableSwitchContext:!0}),h=[{type:i,node:l[o][n]}];return a&&h.push({type:"object",priority:-1,node:d}),Object.keys(l).forEach((e=>{h.push({type:e,match:t=>{var i;if("minecraft:"+(null===(i=null==t?void 0:t.type)||void 0===i?void 0:i.replace(/^minecraft:/,""))===e)return!0;const n=t?Object.keys(t):[];return"object"==typeof t&&(0===(null==n?void 0:n.length)||1===(null==n?void 0:n.length)&&"type"===(null==n?void 0:n[0]))},node:d,change:t=>({type:e})})})),t.ChoiceNode(h,{context:c,choiceContext:`${c}.type`})};i.register("number_provider",c("loot_number_provider_type","number","value","minecraft:constant","minecraft:uniform","number_provider",{"minecraft:constant":{value:t.NumberNode()},"minecraft:uniform":{min:o("number_provider"),max:o("number_provider")},"minecraft:binomial":{n:o("number_provider"),p:o("number_provider")},"minecraft:score":{target:o("scoreboard_name_provider"),score:r({validator:"objective"}),scale:t.Opt(t.NumberNode())}})),i.register("scoreboard_name_provider",c("loot_score_provider_type","string","target","minecraft:context",null,"score_provider",{"minecraft:fixed":{name:r({validator:"entity",params:{amount:"multiple",type:"entities",isScoreHolder:!0}})},"minecraft:context":{target:t.Mod(r({enum:"entity_source"}),{default:()=>"this"})}})),i.register("nbt_provider",c("loot_nbt_provider_type","string","target","minecraft:context",null,"nbt_provider",{"minecraft:storage":{source:r({validator:"resource",params:{pool:"$storage"}})},"minecraft:context":{target:t.Mod(r({enum:"copy_source"}),{default:()=>"this"})}})),e.FloatProvider=e=>c("float_provider_type","number","value","minecraft:constant",null,"float_provider",{"minecraft:constant":{value:t.NumberNode(e)},"minecraft:uniform":{value:t.ObjectNode({min_inclusive:t.NumberNode(e),max_exclusive:t.NumberNode(e)})},"minecraft:clamped_normal":{value:t.ObjectNode({min:t.NumberNode(),max:t.NumberNode(),mean:t.NumberNode(),deviation:t.NumberNode()})},"minecraft:trapezoid":{value:t.ObjectNode({min:t.NumberNode(),max:t.NumberNode(),plateau:t.NumberNode()})}}),i.register("float_provider",e.FloatProvider()),e.IntProvider=e=>c("int_provider_type","number","value","minecraft:constant",null,"int_provider",{"minecraft:constant":{value:t.NumberNode(s({integer:!0},e))},"minecraft:uniform":{value:t.ObjectNode({min_inclusive:t.NumberNode(s({integer:!0},e)),max_inclusive:t.NumberNode(s({integer:!0},e))})},"minecraft:biased_to_bottom":{value:t.ObjectNode({min_inclusive:t.NumberNode(s({integer:!0},e)),max_inclusive:t.NumberNode(s({integer:!0},e))})},"minecraft:clamped":{value:t.ObjectNode({min_inclusive:t.NumberNode(s({integer:!0},e)),max_inclusive:t.NumberNode(s({integer:!0},e)),source:o("int_provider")})},"minecraft:clamped_normal":{value:t.ObjectNode({min_inclusive:t.NumberNode(s({integer:!0},e)),max_inclusive:t.NumberNode(s({integer:!0},e)),mean:t.NumberNode(),deviation:t.NumberNode()})},"minecraft:weighted_list":{distribution:t.ListNode(t.ObjectNode({weight:t.NumberNode({integer:!0}),data:o("int_provider")}))}}),i.register("int_provider",e.IntProvider()),i.register("vertical_anchor",t.ChoiceNode(["absolute","above_bottom","below_top"].map((e=>({type:e,match:t=>void 0!==(null==t?void 0:t[e]),change:t=>{var i,n,r;return{[e]:null!==(r=null!==(n=null!==(i=t.absolute)&&void 0!==i?i:t.above_bottom)&&void 0!==n?n:t.below_top)&&void 0!==r?r:0}},node:t.ObjectNode({[e]:t.NumberNode({integer:!0,min:-2048,max:2047})})}))),{context:"vertical_anchor"})),i.register("height_provider",c("height_provider_type","number","value","minecraft:constant",null,"height_provider",{"minecraft:constant":{value:o("vertical_anchor")},"minecraft:uniform":{min_inclusive:o("vertical_anchor"),max_inclusive:o("vertical_anchor")},"minecraft:biased_to_bottom":{min_inclusive:o("vertical_anchor"),max_inclusive:o("vertical_anchor"),inner:t.Opt(t.NumberNode({integer:!0,min:1}))},"minecraft:very_biased_to_bottom":{min_inclusive:o("vertical_anchor"),max_inclusive:o("vertical_anchor"),inner:t.Opt(t.NumberNode({integer:!0,min:1}))},"minecraft:trapezoid":{min_inclusive:o("vertical_anchor"),max_inclusive:o("vertical_anchor"),plateau:t.Opt(t.NumberNode({integer:!0}))},"minecraft:weighted_list":{distribution:t.ListNode(t.ObjectNode({weight:t.NumberNode({integer:!0}),data:o("int_provider")}))}})),e.InclusiveRange=e=>t.ObjectNode({min_inclusive:t.NumberNode(e),max_inclusive:t.NumberNode(e)},{context:"range"}),i.register("noise_parameters",t.Mod(t.ObjectNode({firstOctave:t.NumberNode({integer:!0}),amplitudes:t.ListNode(t.NumberNode())},{context:"noise_parameters"}),{default:()=>({firstOctave:-7,amplitudes:[1,1]})})),e.Tag=e=>t.ChoiceNode([{type:"string",node:r({validator:"resource",params:{pool:e.resource,allowTag:!0}}),change:e=>{if(Array.isArray(e)&&"string"==typeof e[0]&&!e[0].startsWith("#"))return e[0]}},{type:"list",node:t.ListNode(e.inlineSchema?t.ChoiceNode([{type:"string",node:r({validator:"resource",params:{pool:e.resource}})},{type:"object",node:o(e.inlineSchema)}],{choiceContext:"tag.list"}):r({validator:"resource",params:{pool:e.resource}})),change:e=>"string"!=typeof e||e.startsWith("#")?[]:[e]}],{choiceContext:"tag"}),e.ConditionCases=(e=r({enum:"entity_source"}))=>({"minecraft:alternative":{terms:t.ListNode(o("condition"))},"minecraft:block_state_property":{block:r({validator:"resource",params:{pool:"block"}}),properties:t.MapNode(r(),r(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}})},"minecraft:damage_source_properties":{predicate:o("damage_source_predicate")},"minecraft:entity_properties":{entity:e,predicate:o("entity_predicate")},"minecraft:entity_scores":{entity:e,scores:t.MapNode(r({validator:"objective"}),o("int_range"))},"minecraft:inverted":{term:o("condition")},"minecraft:killed_by_player":{inverse:t.Opt(t.BooleanNode())},"minecraft:location_check":{offsetX:t.Opt(t.NumberNode({integer:!0})),offsetY:t.Opt(t.NumberNode({integer:!0})),offsetZ:t.Opt(t.NumberNode({integer:!0})),predicate:o("location_predicate")},"minecraft:match_tool":{predicate:o("item_predicate")},"minecraft:random_chance":{chance:t.NumberNode({min:0,max:1})},"minecraft:random_chance_with_looting":{chance:t.NumberNode({min:0,max:1}),looting_multiplier:t.NumberNode()},"minecraft:reference":{name:r({validator:"resource",params:{pool:"$predicate"}})},"minecraft:table_bonus":{enchantment:r({validator:"resource",params:{pool:"enchantment"}}),chances:t.ListNode(t.NumberNode({min:0,max:1}))},"minecraft:time_check":{value:o("int_range"),period:t.Opt(t.NumberNode({integer:!0}))},"minecraft:value_check":{value:o("number_provider"),range:o("int_range")},"minecraft:weather_check":{raining:t.Opt(t.BooleanNode()),thundering:t.Opt(t.BooleanNode())}}),e.FunctionCases=(i,a=r({enum:"copy_source"}),c=r({enum:"entity_source"}))=>{const l={"minecraft:apply_bonus":{enchantment:r({validator:"resource",params:{pool:"enchantment"}}),formula:r({validator:"resource",params:{pool:n.get("loot_table_apply_bonus_formula")}}),parameters:t.Mod(t.ObjectNode({bonusMultiplier:t.Mod(t.NumberNode(),{enabled:e=>"minecraft:uniform_bonus_count"===e.pop().push("formula").get()}),extra:t.Mod(t.NumberNode(),{enabled:e=>"minecraft:binomial_with_bonus_count"===e.pop().push("formula").get()}),probability:t.Mod(t.NumberNode(),{enabled:e=>"minecraft:binomial_with_bonus_count"===e.pop().push("formula").get()})}),{enabled:e=>"minecraft:ore_drops"!==e.push("formula").get()})},"minecraft:copy_name":{source:a},"minecraft:copy_nbt":{source:o("nbt_provider"),ops:t.ListNode(t.ObjectNode({source:r({validator:"nbt_path",params:{category:{getter:"copy_source",path:["pop","pop","pop",{push:"source"}]}}}),target:r({validator:"nbt_path",params:{category:"minecraft:item"}}),op:r({enum:["replace","append","merge"]})},{context:"nbt_operation"}))},"minecraft:copy_state":{block:r({validator:"resource",params:{pool:"block"}}),properties:t.ListNode(r({validator:"block_state_key",params:{id:["pop","pop",{push:"block"}]}}))},"minecraft:enchant_randomly":{enchantments:t.Opt(t.ListNode(r({validator:"resource",params:{pool:"enchantment"}})))},"minecraft:enchant_with_levels":{levels:o("number_provider"),treasure:t.Opt(t.BooleanNode())},"minecraft:exploration_map":{destination:t.Opt(e.Tag({resource:"$worldgen/configured_structure_feature"})),decoration:t.Opt(r({enum:"map_decoration"})),zoom:t.Opt(t.NumberNode({integer:!0})),search_radius:t.Opt(t.NumberNode({integer:!0})),skip_existing_chunks:t.Opt(t.BooleanNode())},"minecraft:fill_player_head":{entity:c},"minecraft:limit_count":{limit:o("int_range")},"minecraft:looting_enchant":{count:o("number_provider"),limit:t.Opt(t.NumberNode({integer:!0}))},"minecraft:set_attributes":{modifiers:t.ListNode(o("attribute_modifier"))},"minecraft:set_banner_pattern":{patterns:t.ListNode(t.ObjectNode({pattern:r({enum:"banner_pattern"}),color:r({enum:"dye_color"})})),append:t.Opt(t.BooleanNode())},"minecraft:set_contents":{type:r({validator:"resource",params:{pool:"block_entity_type"}}),entries:t.ListNode(o("loot_entry"))},"minecraft:set_count":{count:o("number_provider"),add:t.Opt(t.BooleanNode())},"minecraft:set_damage":{damage:o("number_provider"),add:t.Opt(t.BooleanNode())},"minecraft:set_enchantments":{enchantments:t.MapNode(r({validator:"resource",params:{pool:"enchantment"}}),o("number_provider")),add:t.Opt(t.BooleanNode())},"minecraft:set_loot_table":{type:r({validator:"resource",params:{pool:"block_entity_type"}}),name:r({validator:"resource",params:{pool:"$loot_table"}}),seed:t.Opt(t.NumberNode({integer:!0}))},"minecraft:set_lore":{entity:t.Opt(c),lore:t.ListNode(o("text_component")),replace:t.Opt(t.BooleanNode())},"minecraft:set_name":{entity:t.Opt(c),name:t.Opt(o("text_component"))},"minecraft:set_nbt":{tag:r({validator:"nbt",params:{registry:{category:"minecraft:item"}}})},"minecraft:set_potion":{id:r({validator:"resource",params:{pool:"potion"}})},"minecraft:set_stew_effect":{effects:t.Opt(t.ListNode(t.ObjectNode({type:r({validator:"resource",params:{pool:"mob_effect"}}),duration:o("number_provider")})))}},u={};return n.get("loot_function_type").forEach((e=>{u[e]=s(s({},l[e]),i)})),u},e.DimensionTypePresets=i=>t.ObjectOrPreset(r({validator:"resource",params:{pool:"$dimension_type"}}),i,{"minecraft:overworld":e.DefaultDimensionType,"minecraft:the_nether":{name:"minecraft:the_nether",ultrawarm:!0,natural:!1,shrunk:!0,piglin_safe:!0,respawn_anchor_works:!0,bed_works:!1,has_raids:!1,has_skylight:!1,has_ceiling:!0,ambient_light:.1,fixed_time:18e3,logical_height:128,effects:"minecraft:the_nether",infiniburn:"#minecraft:infiniburn_nether",min_y:0,height:256},"minecraft:the_end":{name:"minecraft:the_end",ultrawarm:!1,natural:!1,shrunk:!1,piglin_safe:!1,respawn_anchor_works:!1,bed_works:!1,has_raids:!0,has_skylight:!1,has_ceiling:!1,ambient_light:0,fixed_time:6e3,logical_height:256,effects:"minecraft:the_end",infiniburn:"#minecraft:infiniburn_end",min_y:0,height:256}}),e.NoiseSettingsPresets=i=>t.ObjectOrPreset(r({validator:"resource",params:{pool:"$worldgen/noise_settings"}}),i,{"minecraft:overworld":e.DefaultNoiseSettings,"minecraft:nether":{sea_level:32,ore_veins_enabled:!1,disable_mob_generation:!1,aquifers_enabled:!1,legacy_random_source:!0,default_block:{Name:"minecraft:netherrack"},default_fluid:{Properties:{level:"0"},Name:"minecraft:lava"},noise:{min_y:0,height:128,size_horizontal:1,size_vertical:2,top_slide:{target:.9375,size:3,offset:0},bottom_slide:{target:2.5,size:4,offset:-1},sampling:{xz_scale:1,y_scale:3,xz_factor:80,y_factor:60},terrain_shaper:{offset:0,factor:0,jaggedness:0}},noise_router:{barrier:0,fluid_level_floodedness:0,fluid_level_spread:0,lava:0,temperature:0,vegetation:0,continents:0,erosion:0,depth:0,ridges:0,initial_density_without_jaggedness:0,final_density:{type:"minecraft:interpolated",argument:"minecraft:overworld/base_3d_noise"},vein_toggle:0,vein_ridged:0,vein_gap:0},surface_rule:{type:"minecraft:sequence",sequence:[]}},"minecraft:end":{sea_level:0,ore_veins_enabled:!1,disable_mob_generation:!1,aquifers_enabled:!1,legacy_random_source:!0,default_block:{Name:"minecraft:end_stone"},default_fluid:{Name:"minecraft:air"},noise:{min_y:0,height:128,size_horizontal:2,size_vertical:1,top_slide:{target:-23.4375,size:64,offset:-46},bottom_slide:{target:-.234375,size:7,offset:1},sampling:{xz_scale:2,y_scale:1,xz_factor:80,y_factor:160},terrain_shaper:{offset:0,factor:1,jaggedness:0}},noise_router:{barrier:0,fluid_level_floodedness:0,fluid_level_spread:0,lava:0,temperature:0,vegetation:0,continents:0,erosion:0,depth:0,ridges:0,initial_density_without_jaggedness:0,final_density:{type:"minecraft:interpolated",argument:"minecraft:overworld/base_3d_noise"},vein_toggle:0,vein_ridged:0,vein_gap:0},surface_rule:{type:"minecraft:sequence",sequence:[]}},"minecraft:amplified":{sea_level:63,ore_veins_enabled:!0,disable_mob_generation:!1,aquifers_enabled:!0,legacy_random_source:!1,default_block:{Name:"minecraft:stone"},default_fluid:{Properties:{level:"0"},Name:"minecraft:water"},noise:{min_y:-64,height:384,size_horizontal:1,size_vertical:2,top_slide:{target:-.078125,size:2,offset:8},bottom_slide:{target:.1171875,size:3,offset:0},sampling:{xz_scale:.9999999814507745,y_scale:.9999999814507745,xz_factor:80,y_factor:160},terrain_shaper:{offset:0,factor:0,jaggedness:0}},noise_router:{barrier:0,fluid_level_floodedness:0,fluid_level_spread:0,lava:0,temperature:0,vegetation:0,continents:0,erosion:0,depth:0,ridges:0,initial_density_without_jaggedness:0,final_density:{type:"minecraft:interpolated",argument:"minecraft:overworld/base_3d_noise"},vein_toggle:0,vein_ridged:0,vein_gap:0},surface_rule:{type:"minecraft:sequence",sequence:[]}},"minecraft:caves":{sea_level:32,ore_veins_enabled:!1,disable_mob_generation:!1,aquifers_enabled:!1,legacy_random_source:!0,default_block:{Name:"minecraft:stone"},default_fluid:{Properties:{level:"0"},Name:"minecraft:water"},noise:{min_y:0,height:128,size_horizontal:1,size_vertical:2,top_slide:{target:.9375,size:3,offset:0},bottom_slide:{target:2.5,size:4,offset:-1},sampling:{xz_scale:1,y_scale:3,xz_factor:80,y_factor:60},terrain_shaper:{offset:0,factor:0,jaggedness:0}},noise_router:{barrier:0,fluid_level_floodedness:0,fluid_level_spread:0,lava:0,temperature:0,vegetation:0,continents:0,erosion:0,depth:0,ridges:0,initial_density_without_jaggedness:0,final_density:{type:"minecraft:interpolated",argument:"minecraft:overworld/base_3d_noise"},vein_toggle:0,vein_ridged:0,vein_gap:0},surface_rule:{type:"minecraft:sequence",sequence:[]}},"minecraft:floating_islands":{sea_level:0,ore_veins_enabled:!1,disable_mob_generation:!1,aquifers_enabled:!1,legacy_random_source:!0,default_block:{Name:"minecraft:stone"},default_fluid:{Properties:{level:"0"},Name:"minecraft:water"},noise:{min_y:0,height:128,size_horizontal:2,size_vertical:1,top_slide:{target:-23.4375,size:64,offset:-46},bottom_slide:{target:-.234375,size:7,offset:1},sampling:{xz_scale:2,y_scale:1,xz_factor:80,y_factor:160},terrain_shaper:{offset:0,factor:1,jaggedness:0}},noise_router:{barrier:0,fluid_level_floodedness:0,fluid_level_spread:0,lava:0,temperature:0,vegetation:0,continents:0,erosion:0,depth:0,ridges:0,initial_density_without_jaggedness:0,final_density:{type:"minecraft:interpolated",argument:"minecraft:overworld/base_3d_noise"},vein_toggle:0,vein_ridged:0,vein_gap:0},surface_rule:{type:"minecraft:sequence",sequence:[]}}})}}(_c);var bc={};Object.defineProperty(bc,"__esModule",{value:!0}),bc.initConditionSchemas=void 0;const vc=Pe,yc=_c;bc.initConditionSchemas=function(e,t){const i=vc.Reference.bind(void 0,e),n=vc.StringNode.bind(void 0,t);e.register("predicate",vc.ObjectOrList(i("condition"),{choiceContext:"condition"})),e.register("condition",vc.Mod(vc.ObjectNode({condition:n({validator:"resource",params:{pool:"loot_condition_type"}}),[vc.Switch]:[{push:"condition"}],[vc.Case]:yc.ConditionCases()},{category:"predicate",context:"condition"}),{default:()=>({condition:"minecraft:entity_properties",entity:"this"})}))};var wc={};Object.defineProperty(wc,"__esModule",{value:!0}),wc.initDimensionSchemas=void 0;const xc=Pe,Nc=_c;wc.initDimensionSchemas=function(e,t){const i=xc.Reference.bind(void 0,e),n=xc.StringNode.bind(void 0,t),r=xc.ChoiceNode([{type:"string",priority:1,node:n({validator:"resource",params:{pool:"$worldgen/structure_set"}}),change:()=>{}},{type:"object",node:i("structure_set"),change:()=>({})}],{choiceContext:"structure_set"});e.register("dimension",xc.Mod(xc.ObjectNode({type:Nc.DimensionTypePresets(i("dimension_type")),generator:xc.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/chunk_generator"}}),[xc.Switch]:[{push:"type"}],[xc.Case]:{"minecraft:noise":{seed:xc.NumberNode({integer:!0}),settings:Nc.NoiseSettingsPresets(i("noise_settings")),biome_source:xc.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/biome_source"}}),[xc.Switch]:[{push:"type"}],[xc.Case]:{"minecraft:fixed":{biome:n({validator:"resource",params:{pool:"$worldgen/biome"}})},"minecraft:multi_noise":{preset:xc.Opt(n({validator:"resource",params:{pool:["minecraft:overworld","minecraft:nether"]}})),biomes:xc.Mod(xc.ListNode(i("generator_biome")),{enabled:e=>void 0===e.push("preset").get(),default:()=>[{biome:"minecraft:plains"}]})},"minecraft:checkerboard":{scale:xc.Opt(xc.NumberNode({integer:!0,min:0,max:62})),biomes:Nc.Tag({resource:"$worldgen/biome"})},"minecraft:the_end":{seed:xc.NumberNode({integer:!0})}}},{category:"predicate",disableSwitchContext:!0})},"minecraft:flat":{settings:xc.ObjectNode({biome:xc.Opt(n({validator:"resource",params:{pool:"$worldgen/biome"}})),lakes:xc.Opt(xc.BooleanNode()),features:xc.Opt(xc.BooleanNode()),layers:xc.ListNode(i("generator_layer")),structure_overrides:xc.ListNode(r)})}}},{disableSwitchContext:!0})},{category:"pool",context:"dimension"}),{default:()=>{const e=Math.floor(4294967296*Math.random())-2147483648;return{type:"minecraft:overworld",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:fixed",seed:e,biome:"minecraft:plains"},settings:"minecraft:overworld"}}}}));const o=xc.ChoiceNode([{type:"number",node:xc.NumberNode({min:-2,max:2}),change:e=>{var t;return null!==(t=e[0])&&void 0!==t?t:0}},{type:"list",node:xc.ListNode(xc.NumberNode({min:-2,max:2}),{minLength:2,maxLength:2}),change:e=>[null!=e?e:0,null!=e?e:0]}]);e.register("generator_biome",xc.Mod(xc.ObjectNode({biome:n({validator:"resource",params:{pool:"$worldgen/biome"}}),parameters:xc.ObjectNode({temperature:o,humidity:o,continentalness:o,erosion:o,weirdness:o,depth:o,offset:xc.NumberNode({min:0,max:1})})},{context:"generator_biome"}),{default:()=>({biome:"minecraft:plains",parameters:{altitude:0,temperature:0,humidity:0,weirdness:0,offset:0}})}))};var kc={};Object.defineProperty(kc,"__esModule",{value:!0}),kc.initDimensionTypeSchemas=void 0;const Ac=Pe,Cc=_c;kc.initDimensionTypeSchemas=function(e,t){const i=Ac.StringNode.bind(void 0,t);e.register("dimension_type",Ac.Mod(Ac.ObjectNode({ultrawarm:Ac.BooleanNode(),natural:Ac.BooleanNode(),piglin_safe:Ac.BooleanNode(),respawn_anchor_works:Ac.BooleanNode(),bed_works:Ac.BooleanNode(),has_raids:Ac.BooleanNode(),has_skylight:Ac.BooleanNode(),has_ceiling:Ac.BooleanNode(),coordinate_scale:Ac.NumberNode({min:1e-5,max:3e7}),ambient_light:Ac.NumberNode(),fixed_time:Ac.Opt(Ac.NumberNode({integer:!0})),logical_height:Ac.NumberNode({integer:!0,min:0,max:4064}),effects:Ac.Opt(i({enum:["minecraft:overworld","minecraft:the_nether","minecraft:the_end"]})),infiniburn:i({validator:"resource",params:{pool:"block",requireTag:!0}}),min_y:Ac.NumberNode({integer:!0,min:-2032,max:2031}),height:Ac.NumberNode({integer:!0,min:16,max:4064})},{context:"dimension_type"}),(e=>({default:()=>Cc.DefaultDimensionType,validate:(t,i,n,r)=>((null==(i=e.validate(t,i,n,r))?void 0:i.min_y)+(null==i?void 0:i.height)>2032&&n.add(t.push("height"),"error.min_y_plus_height",2032),(null==i?void 0:i.logical_height)>(null==i?void 0:i.height)&&n.add(t.push("logical_height"),"error.logical_height"),(null==i?void 0:i.height)%16!=0&&n.add(t.push("height"),"error.height_multiple",16),(null==i?void 0:i.min_y)%16!=0&&n.add(t.push("min_y"),"error.min_y_multiple",16),i)}))))};var Oc={};Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.initItemModifierSchemas=void 0;const Sc=Pe,Ec=_c;Oc.initItemModifierSchemas=function(e,t){const i=Sc.Reference.bind(void 0,e),n=Sc.StringNode.bind(void 0,t);e.register("item_modifier",Sc.ObjectOrList(i("function"),{choiceContext:"function"}));const r={conditions:Sc.Opt(Sc.ListNode(i("condition")))};e.register("function",Sc.Mod(Sc.ObjectNode({function:n({validator:"resource",params:{pool:"loot_function_type"}}),[Sc.Switch]:[{push:"function"}],[Sc.Case]:Ec.FunctionCases(r)},{category:"function",context:"function"}),{default:()=>[{function:"minecraft:set_count",count:1}]}))};var Fc={},Dc={};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.LootFunctions=Dc.LootConditions=Dc.LootCopySources=Dc.LootEntitySources=Dc.LootTableTypes=void 0,Dc.LootTableTypes=new Map([["minecraft:advancement_entity",{requires:[7,8],allows:[]}],["minecraft:advancement_reward",{requires:[7,8],allows:[]}],["minecraft:barter",{requires:[8],allows:[]}],["minecraft:block",{requires:[1,7,9],allows:[0,4,8]}],["minecraft:chest",{requires:[7],allows:[8]}],["minecraft:command",{requires:[7],allows:[8]}],["minecraft:empty",{requires:[],allows:[]}],["minecraft:entity",{requires:[2,7,8],allows:[3,5,6]}],["minecraft:fishing",{requires:[7,9],allows:[8]}],["minecraft:generic",{requires:[2,0,1,3,4,5,6,7,8,9],allows:[]}],["minecraft:gift",{requires:[7,8],allows:[]}],["minecraft:selector",{requires:[7],allows:[8]}]]),Dc.LootEntitySources=new Map([["direct_killer",[3]],["killer",[5]],["killer_player",[5]],["this",[8]]]),Dc.LootCopySources=new Map([["block_entity",[0]],["killer",[5]],["killer_player",[5]],["this",[8]]]),Dc.LootConditions=new Map([["minecraft:alternative",[]],["minecraft:block_state_property",[1]],["minecraft:damage_source_properties",[2]],["minecraft:entity_properties",[7]],["minecraft:entity_scores",[]],["minecraft:inverted",[]],["minecraft:killed_by_player",[6]],["minecraft:location_check",[]],["minecraft:match_tool",[9]],["minecraft:random_chance",[]],["minecraft:random_chance_with_looting",[5]],["minecraft:reference",[]],["minecraft:survives_explosion",[4]],["minecraft:table_bonus",[9]],["minecraft:time_check",[]],["minecraft:weather_check",[]]]),Dc.LootFunctions=new Map([["minecraft:apply_bonus",[9]],["minecraft:copy_name",[]],["minecraft:copy_nbt",[]],["minecraft:copy_state",[1]],["minecraft:enchant_randomly",[]],["minecraft:enchant_with_levels",[]],["minecraft:exploration_map",[7]],["minecraft:explosion_decay",[]],["minecraft:fill_player_head",[]],["minecraft:furnace_smelt",[]],["minecraft:limit_count",[]],["minecraft:looting_enchant",[5]],["minecraft:set_attributes",[]],["minecraft:set_banner_pattern",[]],["minecraft:set_contents",[]],["minecraft:set_count",[]],["minecraft:set_damage",[]],["minecraft:set_loot_table",[]],["minecraft:set_lore",[]],["minecraft:set_name",[]],["minecraft:set_nbt",[]],["minecraft:set_stew_effect",[]]]),Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.initLootTableSchemas=void 0;const Bc=Pe,Lc=Dc,Mc=_c;Fc.initLootTableSchemas=function(e,t){const i=Bc.Reference.bind(void 0,e),n=Bc.StringNode.bind(void 0,t),r={conditions:Bc.Opt(Bc.ListNode(i("loot_condition")))},o=s({functions:Bc.Opt(Bc.ListNode(i("loot_function")))},r);function a(e,i,n){const r=[],o=n=>t.get(i).filter((t=>{var i;return(null!==(i=e.get(t))&&void 0!==i?i:[]).every((e=>n.includes(e)))}));for(const[t,{allows:a,requires:s}]of Lc.LootTableTypes){const e=[...a,...s];r.push({match:e=>e.getModel().get(new Bc.Path(["type"]))===t,node:n(o(e))})}return r.push({match:e=>!0,node:n(i)}),Bc.SwitchNode(r)}const c=a(Lc.LootConditions,"loot_condition_type",(e=>n({validator:"resource",params:{pool:e instanceof Array?e:"loot_condition_type"}}))),l=a(Lc.LootFunctions,"loot_function_type",(e=>n({validator:"resource",params:{pool:e instanceof Array?e:"loot_function_type"}}))),u=a(Lc.LootEntitySources,"entity_source",(e=>n({enum:e}))),d=a(Lc.LootCopySources,"copy_source",(e=>n({enum:e})));e.register("loot_table",Bc.Mod(Bc.ObjectNode({type:Bc.Opt(n({validator:"resource",params:{pool:t.get("loot_context_type")}})),pools:Bc.Opt(Bc.ListNode(Bc.Mod(Bc.ObjectNode(s({rolls:i("number_provider"),bonus_rolls:Bc.Opt(i("number_provider")),entries:Bc.ListNode(i("loot_entry"))},o),{category:"pool",context:"loot_pool"}),{default:()=>({rolls:1,entries:[{type:"minecraft:item",name:"minecraft:stone"}]})}))),functions:Bc.Opt(Bc.ListNode(i("loot_function")))},{context:"loot_table"}),{default:()=>({pools:[{rolls:1,entries:[{type:"minecraft:item",name:"minecraft:stone"}]}]})}));const h={enabled:e=>{var t;return(null===(t=e.pop().get())||void 0===t?void 0:t.length)>1&&!["minecraft:alternatives","minecraft:group","minecraft:sequence"].includes(e.push("type").get())}};e.register("loot_entry",Bc.Mod(Bc.ObjectNode({type:n({validator:"resource",params:{pool:"loot_pool_entry_type"}}),weight:Bc.Opt(Bc.Mod(Bc.NumberNode({integer:!0,min:1}),h)),quality:Bc.Opt(Bc.Mod(Bc.NumberNode({integer:!0}),h)),[Bc.Switch]:[{push:"type"}],[Bc.Case]:{"minecraft:alternatives":s({children:Bc.ListNode(i("loot_entry"))},o),"minecraft:dynamic":s({name:n()},o),"minecraft:group":s({children:Bc.ListNode(i("loot_entry"))},o),"minecraft:item":s({name:n({validator:"resource",params:{pool:"item"}})},o),"minecraft:loot_table":s({name:n({validator:"resource",params:{pool:"$loot_table"}})},o),"minecraft:sequence":s({children:Bc.ListNode(i("loot_entry"))},o),"minecraft:tag":s({name:n({validator:"resource",params:{pool:"$tag/item"}}),expand:Bc.Opt(Bc.BooleanNode())},o)}},{context:"loot_entry"}),{default:()=>({type:"minecraft:item",name:"minecraft:stone"})})),e.register("loot_function",Bc.Mod(Bc.ObjectNode({function:l,[Bc.Switch]:[{push:"function"}],[Bc.Case]:Mc.FunctionCases(r,d,u)},{category:"function",context:"function"}),{default:()=>({function:"minecraft:set_count",count:1})})),e.register("loot_condition",Bc.Mod(Bc.ObjectNode({condition:c,[Bc.Switch]:[{push:"condition"}],[Bc.Case]:Mc.ConditionCases(u)},{category:"predicate",context:"condition"}),{default:()=>({condition:"minecraft:random_chance",chance:.5})})),e.register("attribute_modifier",Bc.Mod(Bc.ObjectNode({attribute:n({validator:"resource",params:{pool:"attribute"}}),name:n(),amount:i("number_provider"),operation:n({enum:["addition","multiply_base","multiply_total"]}),slot:Bc.StringOrList(n({enum:"slot"}))},{context:"attribute_modifier"}),{default:()=>({attribute:"minecraft:generic.max_health",name:"",amount:1,operation:"addition",slot:"mainhand"})}))};var Tc={};Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.initPackMcmetaSchemas=void 0;const Rc=Pe;Tc.initPackMcmetaSchemas=function(e,t){e.register("pack_mcmeta",Rc.Mod(Rc.ObjectNode({pack:Rc.Mod(Rc.ObjectNode({pack_format:Rc.Mod(Rc.NumberNode({integer:!0,min:9,max:9}),{default:()=>9,canUpdate:(e,t)=>9!==t,update:()=>[{name:"pack_format",params:[9],newValue:9}]}),description:Rc.Reference(e,"text_component")}),{default:()=>({pack_format:9,description:""})})}),{default:()=>({pack:{pack_format:9,description:""}})}))};var $c={};Object.defineProperty($c,"__esModule",{value:!0}),$c.initPredicatesSchemas=void 0;const jc=Pe;$c.initPredicatesSchemas=function(e,t){const i=jc.Reference.bind(void 0,e),n=jc.StringNode.bind(void 0,t),r=jc.ChoiceNode([{type:"string",node:n(),change:e=>"boolean"==typeof e||"number"==typeof e?e.toString():""},{type:"number",node:jc.NumberNode(),change:e=>"string"==typeof e?parseInt(e):0},{type:"object",node:jc.ObjectNode({min:jc.Opt(jc.NumberNode({integer:!0})),max:jc.Opt(jc.NumberNode({integer:!0}))}),change:e=>"number"==typeof e?{min:e,max:e}:{}},{type:"boolean",node:jc.BooleanNode(),change:e=>"true"===e||1===e}]);e.register("item_predicate",jc.ObjectNode({items:jc.Opt(jc.ListNode(n({validator:"resource",params:{pool:"item"}}))),tag:jc.Opt(n({validator:"resource",params:{pool:"$tag/item"}})),count:i("int_bounds"),durability:i("int_bounds"),potion:jc.Opt(n({validator:"resource",params:{pool:"potion"}})),nbt:jc.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"item"}]}}})),enchantments:jc.Opt(jc.ListNode(i("enchantment_predicate")))},{context:"item"})),e.register("enchantment_predicate",jc.ObjectNode({enchantment:jc.Opt(n({validator:"resource",params:{pool:"enchantment"}})),levels:i("int_bounds")},{context:"enchantment"})),e.register("block_predicate",jc.ObjectNode({blocks:jc.Opt(jc.ListNode(n({validator:"resource",params:{pool:"block"}}))),tag:jc.Opt(n({validator:"resource",params:{pool:"$tag/block"}})),nbt:jc.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:block",id:["pop",{push:"block"}]}}})),state:jc.Opt(jc.MapNode(n(),r,{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}}))},{context:"block"})),e.register("fluid_predicate",jc.ObjectNode({fluid:jc.Opt(n({validator:"resource",params:{pool:"fluid"}})),tag:jc.Opt(n({validator:"resource",params:{pool:"$tag/fluid"}})),state:jc.Opt(jc.MapNode(n(),r))},{context:"fluid"})),e.register("location_predicate",jc.ObjectNode({position:jc.Opt(jc.ObjectNode({x:i("float_bounds"),y:i("float_bounds"),z:i("float_bounds")})),biome:jc.Opt(n({validator:"resource",params:{pool:"$worldgen/biome"}})),feature:jc.Opt(n({validator:"resource",params:{pool:"$worldgen/configured_structure_feature"}})),dimension:jc.Opt(n({validator:"resource",params:{pool:"$dimension"}})),light:jc.Opt(jc.ObjectNode({light:i("int_bounds")})),smokey:jc.Opt(jc.BooleanNode()),block:jc.Opt(i("block_predicate")),fluid:jc.Opt(i("fluid_predicate"))},{context:"location"})),e.register("statistic_predicate",jc.ObjectNode({type:n({validator:"resource",params:{pool:"stat_type"}}),stat:n(),value:i("int_bounds"),[jc.Switch]:[{push:"type"}],[jc.Case]:{"minecraft:mined":{stat:n({validator:"resource",params:{pool:"block"}})},"minecraft:crafted":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:used":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:broken":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:picked_up":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:dropped":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:killed":{stat:n({validator:"resource",params:{pool:"entity_type"}})},"minecraft:killed_by":{stat:n({validator:"resource",params:{pool:"entity_type"}})},"minecraft:custom":{stat:n({validator:"resource",params:{pool:"custom_stat"}})}}})),e.register("player_predicate",jc.ObjectNode({gamemode:jc.Opt(n({enum:"gamemode"})),level:i("int_bounds"),advancements:jc.Opt(jc.MapNode(n({validator:"resource",params:{pool:"$advancement"}}),jc.ChoiceNode([{type:"boolean",node:jc.BooleanNode(),change:e=>!0},{type:"object",node:jc.MapNode(n(),jc.BooleanNode())}]))),recipes:jc.Opt(jc.MapNode(n({validator:"resource",params:{pool:"$recipe"}}),jc.BooleanNode())),stats:jc.Opt(jc.ListNode(i("statistic_predicate"))),looking_at:jc.Opt(i("entity_predicate"))},{context:"player"})),e.register("status_effect_predicate",jc.ObjectNode({amplifier:i("int_bounds"),duration:i("int_bounds"),ambient:jc.Opt(jc.BooleanNode()),visible:jc.Opt(jc.BooleanNode())},{context:"status_effect"})),e.register("distance_predicate",jc.ObjectNode({x:i("float_bounds"),y:i("float_bounds"),z:i("float_bounds"),absolute:i("float_bounds"),horizontal:i("float_bounds")},{context:"distance"})),e.register("entity_predicate",jc.ObjectNode({type:jc.Opt(n({validator:"resource",params:{pool:"entity_type",allowTag:!0}})),nbt:jc.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:entity",id:["pop",{push:"type"}]}}})),team:jc.Opt(n({validator:"team"})),location:jc.Opt(i("location_predicate")),stepping_on:jc.Opt(i("location_predicate")),distance:jc.Opt(i("distance_predicate")),flags:jc.Opt(jc.ObjectNode({is_on_fire:jc.Opt(jc.BooleanNode()),is_sneaking:jc.Opt(jc.BooleanNode()),is_sprinting:jc.Opt(jc.BooleanNode()),is_swimming:jc.Opt(jc.BooleanNode()),is_baby:jc.Opt(jc.BooleanNode())})),equipment:jc.Opt(jc.MapNode(n({enum:"slot"}),i("item_predicate"))),player:jc.Opt(i("player_predicate")),vehicle:jc.Opt(i("entity_predicate")),passenger:jc.Opt(i("entity_predicate")),targeted_entity:jc.Opt(i("entity_predicate")),lightning_bolt:jc.Opt(jc.ObjectNode({blocks_set_on_fire:jc.Opt(i("int_bounds")),entity_struck:jc.Opt(i("entity_predicate"))})),fishing_hook:jc.Opt(jc.ObjectNode({in_open_water:jc.Opt(jc.BooleanNode())})),effects:jc.Opt(jc.MapNode(n({validator:"resource",params:{pool:"mob_effect"}}),i("status_effect_predicate")))},{context:"entity"})),e.register("damage_source_predicate",jc.ObjectNode({is_explosion:jc.Opt(jc.BooleanNode()),is_fire:jc.Opt(jc.BooleanNode()),is_magic:jc.Opt(jc.BooleanNode()),is_projectile:jc.Opt(jc.BooleanNode()),is_lightning:jc.Opt(jc.BooleanNode()),bypasses_armor:jc.Opt(jc.BooleanNode()),bypasses_invulnerability:jc.Opt(jc.BooleanNode()),bypasses_magic:jc.Opt(jc.BooleanNode()),source_entity:jc.Opt(i("entity_predicate")),direct_entity:jc.Opt(i("entity_predicate"))},{context:"damage_source"})),e.register("damage_predicate",jc.ObjectNode({dealt:i("float_bounds"),taken:i("float_bounds"),blocked:jc.Opt(jc.BooleanNode()),source_entity:jc.Opt(i("entity_predicate")),type:jc.Opt(i("damage_source_predicate"))},{context:"damage"}))};var Ic={};Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.initRecipeSchemas=void 0;const Pc=Pe;Ic.initRecipeSchemas=function(e,t){const i=Pc.Reference.bind(void 0,e),n=Pc.StringNode.bind(void 0,t);e.register("recipe",Pc.Mod(Pc.ObjectNode({type:n({validator:"resource",params:{pool:"recipe_serializer"}}),[Pc.Switch]:[{push:"type"}],[Pc.Case]:{"minecraft:crafting_shaped":{group:Pc.Opt(n({enum:"recipe_group",additional:!0})),pattern:Pc.ListNode(n()),key:Pc.MapNode(n(),i("recipe_ingredient")),result:i("recipe_result")},"minecraft:crafting_shapeless":{group:Pc.Opt(n()),ingredients:Pc.ListNode(i("recipe_ingredient")),result:i("recipe_result")},"minecraft:smelting":{group:Pc.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:Pc.Opt(Pc.NumberNode()),cookingtime:Pc.Opt(Pc.Mod(Pc.NumberNode({integer:!0}),{default:()=>200}))},"minecraft:blasting":{group:Pc.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:Pc.Opt(Pc.NumberNode()),cookingtime:Pc.Opt(Pc.Mod(Pc.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:smoking":{group:Pc.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:Pc.Opt(Pc.NumberNode()),cookingtime:Pc.Opt(Pc.Mod(Pc.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:campfire_cooking":{group:Pc.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:Pc.Opt(Pc.NumberNode()),cookingtime:Pc.Opt(Pc.Mod(Pc.NumberNode({integer:!0}),{default:()=>100}))},"minecraft:stonecutting":{group:Pc.Opt(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),count:Pc.NumberNode({integer:!0})},"minecraft:smithing":{group:Pc.Opt(n()),base:i("recipe_ingredient_object"),addition:i("recipe_ingredient_object"),result:i("recipe_result")}}},{context:"recipe",disableSwitchContext:!0}),{default:()=>({type:"minecraft:crafting_shaped"})})),e.register("recipe_ingredient",Pc.Mod(Pc.ChoiceNode([{type:"object",node:i("recipe_ingredient_object"),change:e=>e[0]},{type:"list",node:Pc.ListNode(i("recipe_ingredient_object")),change:e=>[e]}]),{default:()=>({item:"minecraft:stone"})})),e.register("recipe_ingredient_object",Pc.Mod(Pc.ObjectNode({item:Pc.Opt(n({validator:"resource",params:{pool:"item"}})),tag:Pc.Opt(n({validator:"resource",params:{pool:"$tag/item"}}))}),{default:()=>({item:"minecraft:stone"})})),e.register("recipe_result",Pc.Mod(Pc.ObjectNode({item:n({validator:"resource",params:{pool:"item"}}),count:Pc.Opt(Pc.Mod(Pc.NumberNode({integer:!0}),{default:()=>1}))}),{default:()=>({item:"minecraft:stone"})}))};var zc={};Object.defineProperty(zc,"__esModule",{value:!0}),zc.initTagsSchemas=void 0;const Uc=Pe;zc.initTagsSchemas=function(e,t){const i=Uc.StringNode.bind(void 0,t),n=e=>Uc.Mod(Uc.ObjectNode({replace:Uc.Opt(Uc.BooleanNode()),values:Uc.ListNode(Uc.ChoiceNode([{type:"string",node:i({validator:"resource",params:{pool:e,allowTag:!0}}),change:e=>e.id},{type:"object",node:Uc.ObjectNode({id:i({validator:"resource",params:{pool:e,allowTag:!0,allowUnknown:!0}}),required:Uc.BooleanNode()}),change:e=>({id:e})}]))},{context:"tag"}),{default:()=>({values:[]})});e.register("block_tag",n("block")),e.register("entity_type_tag",n("entity_type")),e.register("fluid_tag",n("fluid")),e.register("function_tag",n("$function")),e.register("game_event_tag",n("game_event")),e.register("item_tag",n("item")),e.register("advancement_tag",n("$advancement")),e.register("dimension_tag",n("$dimension")),e.register("dimension_type_tag",n("$dimension_type")),e.register("function_tag",n("$function")),e.register("item_modifier_tag",n("$item_modifier")),e.register("loot_table_tag",n("$loot_table")),e.register("predicate_tag",n("$predicate")),e.register("recipe_tag",n("$recipe")),e.register("structure_tag",n("$structure")),e.register("biome_tag",n("$worldgen/biome")),e.register("configured_carver_tag",n("$worldgen/configured_carver")),e.register("configured_decorator_tag",n("$worldgen/configured_decorator")),e.register("configured_feature_tag",n("$worldgen/configured_feature")),e.register("configured_structure_feature_tag",n("$worldgen/configured_structure_feature")),e.register("configured_surface_builder_tag",n("$worldgen/configured_surface_builder")),e.register("density_function_tag",n("$worldgen/density_function")),e.register("noise_tag",n("$worldgen/noise")),e.register("noise_settings_tag",n("$worldgen/noise_settings")),e.register("placed_feature_tag",n("$worldgen/placed_feature")),e.register("processor_list_tag",n("$worldgen/processor_list")),e.register("structure_set_tag",n("$worldgen/structure_set")),e.register("template_pool_tag",n("$worldgen/template_pool"))};var Wc={};Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.initTextComponentSchemas=void 0;const Hc=Pe;Wc.initTextComponentSchemas=function(e,t){const i=Hc.Reference.bind(void 0,e),n=Hc.StringNode.bind(void 0,t),r=e=>{var t;return e instanceof Array?r(e[0]):null!==(t=null==e?void 0:e.text)&&void 0!==t?t:"object"==typeof e?"":null==e?void 0:e.toString()};e.register("text_component",Hc.Mod(Hc.ChoiceNode([{type:"object",node:i("text_component_object"),change:e=>e instanceof Array?"object"==typeof e[0]?e[0]:{text:r(e[0])}:"object"==typeof e?e:{text:r(e)}},{type:"list",node:i("text_component_list"),change:e=>[e]},{type:"string",priority:1,node:n(),change:r},{type:"number",node:Hc.NumberNode(),change:e=>{const t=parseFloat(r(e));return isFinite(t)?t:e?1:0}},{type:"boolean",node:Hc.BooleanNode(),change:e=>{const t=r(e);return"true"===t||"false"===t?"true"===t:!!t}}],{context:"text_component"}),{default:()=>({text:""})}));const o={color:Hc.Opt(n()),font:Hc.Opt(n()),bold:Hc.Opt(Hc.BooleanNode()),italic:Hc.Opt(Hc.BooleanNode()),underlined:Hc.Opt(Hc.BooleanNode()),strikethrough:Hc.Opt(Hc.BooleanNode()),obfuscated:Hc.Opt(Hc.BooleanNode()),insertion:Hc.Opt(n()),clickEvent:Hc.Opt(Hc.ObjectNode({action:n({enum:["open_url","open_file","run_command","suggest_command","change_page","copy_to_clipboard"]}),[Hc.Switch]:[{push:"action"}],[Hc.Case]:{change_page:{value:n()},copy_to_clipboard:{value:n()},open_file:{value:n()},open_url:{value:n()},run_command:{value:n({validator:"command",params:{leadingSlash:!0,allowPartial:!0}})},suggest_command:{value:n({validator:"command",params:{leadingSlash:!0,allowPartial:!0}})}}})),hoverEvent:Hc.Opt(Hc.ObjectNode({action:n({enum:["show_text","show_item","show_entity"]}),[Hc.Switch]:[{push:"action"}],[Hc.Case]:{show_text:{value:Hc.Opt(i("text_component")),contents:Hc.Opt(i("text_component"))},show_item:{value:Hc.Opt(n({validator:"nbt",params:{module:"util::InventoryItem"}})),contents:Hc.Opt(Hc.ObjectNode({id:n({validator:"resource",params:{pool:"item"}}),count:Hc.Opt(Hc.NumberNode({integer:!0})),tag:Hc.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"id"}]}}}))}))},show_entity:{value:Hc.Opt(Hc.ObjectNode({name:Hc.Opt(n()),type:Hc.Opt(n()),id:Hc.Opt(n())})),contents:Hc.Opt(Hc.Mod(Hc.ObjectNode({name:Hc.Opt(i("text_component")),type:n({validator:"resource",params:{pool:"entity_type"}}),id:n({validator:"uuid"})}),{default:()=>({type:"minecraft:pig",id:"00000001-0001-0001-0001-000000000001"})}))}}})),extra:Hc.Opt(i("text_component_list"))};e.register("text_component_object",Hc.Mod(Hc.ChoiceNode([{type:"text",match:e=>"object"==typeof e,change:e=>({text:""}),priority:-1,node:Hc.ObjectNode(s({text:n()},o))},{type:"translation",match:e=>void 0!==(null==e?void 0:e.translate),change:e=>({translate:""}),node:Hc.ObjectNode(s({translate:n(),with:Hc.Opt(i("text_component_list"))},o))},{type:"score",match:e=>void 0!==(null==e?void 0:e.score),change:e=>({score:{}}),node:Hc.ObjectNode(s({score:Hc.ObjectNode({name:n({validator:"entity",params:{amount:"single",type:"entities",isScoreHolder:!0}}),objective:n({validator:"objective"}),value:Hc.Opt(n())})},o))},{type:"selector",match:e=>void 0!==(null==e?void 0:e.selector),change:e=>({selector:""}),node:Hc.ObjectNode(s({selector:n({validator:"entity",params:{amount:"multiple",type:"entities"}}),separator:Hc.Opt(i("text_component"))},o))},{type:"keybind",match:e=>void 0!==(null==e?void 0:e.keybind),change:e=>({keybind:""}),node:Hc.ObjectNode(s({keybind:n({enum:"keybind",additional:!0})},o))},{type:"nbt",match:e=>void 0!==(null==e?void 0:e.nbt),change:e=>({nbt:""}),node:Hc.ObjectNode(s({nbt:n({validator:"nbt_path"}),block:Hc.Opt(n({validator:"vector",params:{dimension:3,isInteger:!0}})),entity:Hc.Opt(n({validator:"entity",params:{amount:"multiple",type:"entities"}})),storage:Hc.Opt(n({validator:"resource",params:{pool:"$storage"}})),interpret:Hc.Opt(Hc.BooleanNode()),separator:Hc.Opt(i("text_component"))},o))}],{context:"text_component_object",choiceContext:"text_component.object"}),{default:()=>({text:""})})),e.register("text_component_list",Hc.Mod(Hc.ListNode(i("text_component")),{default:()=>[{text:""}]}))};var qc={},Vc={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.initBiomeSchemas=e.MobCategorySpawnSettings=void 0;const t=Pe,i=_c;e.initBiomeSchemas=function(n,r){const o=t.StringNode.bind(void 0,r);e.MobCategorySpawnSettings=t.Mod(t.ListNode(t.ObjectNode({type:o({validator:"resource",params:{pool:"entity_type"}}),weight:t.NumberNode({integer:!0}),minCount:t.NumberNode({integer:!0}),maxCount:t.NumberNode({integer:!0})})),{category:()=>"pool",default:()=>[{type:"minecraft:bat",weight:1}]}),n.register("biome",t.Mod(t.ObjectNode({temperature:t.NumberNode(),downfall:t.NumberNode(),precipitation:o({enum:["none","rain","snow"]}),temperature_modifier:t.Opt(o({enum:["none","frozen"]})),category:o({enum:"biome_category"}),creature_spawn_probability:t.Opt(t.NumberNode({min:0,max:1})),effects:t.ObjectNode({sky_color:t.NumberNode({color:!0}),fog_color:t.NumberNode({color:!0}),water_color:t.NumberNode({color:!0}),water_fog_color:t.NumberNode({color:!0}),grass_color:t.Opt(t.NumberNode({color:!0})),foliage_color:t.Opt(t.NumberNode({color:!0})),grass_color_modifier:t.Opt(o({enum:["none","dark_forest","swamp"]})),ambient_sound:t.Opt(o()),mood_sound:t.Opt(t.ObjectNode({sound:o(),tick_delay:t.NumberNode({integer:!0}),block_search_extent:t.NumberNode({integer:!0}),offset:t.NumberNode()})),additions_sound:t.Opt(t.ObjectNode({sound:o(),tick_chance:t.NumberNode({min:0,max:1})})),music:t.Opt(t.ObjectNode({sound:o(),min_delay:t.NumberNode({integer:!0,min:0}),max_delay:t.NumberNode({integer:!0,min:0}),replace_current_music:t.BooleanNode()})),particle:t.Opt(t.ObjectNode({options:t.ObjectNode({type:o()}),probability:t.NumberNode({min:0,max:1})}))}),spawners:t.MapNode(o({enum:"mob_category"}),e.MobCategorySpawnSettings),spawn_costs:t.MapNode(o({validator:"resource",params:{pool:"entity_type"}}),t.Mod(t.ObjectNode({energy_budget:t.NumberNode(),charge:t.NumberNode()},{category:"function"}),{default:()=>({energy_budget:.12,charge:1})})),carvers:t.MapNode(o({enum:["air","liquid"]}),t.Mod(i.Tag({resource:"$worldgen/configured_carver",inlineSchema:"configured_carver"}),{default:()=>["minecraft:cave"]})),features:t.ListNode(t.Mod(i.Tag({resource:"$worldgen/placed_feature",inlineSchema:"placed_feature"}),{category:()=>"predicate"}),{maxLength:11})},{context:"biome"}),{default:()=>({temperature:.8,downfall:.4,precipitation:"rain",category:"plains",effects:{sky_color:7907327,fog_color:12638463,water_color:4159204,water_fog_color:329011}})}))}}(Vc);var Gc={};Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.initCarverSchemas=void 0;const Kc=Pe,Xc=_c;Gc.initCarverSchemas=function(e,t){const i=Kc.Reference.bind(void 0,e),n=Kc.StringNode.bind(void 0,t),r={vertical_rotation:Xc.FloatProvider(),shape:Kc.ObjectNode({distance_factor:Xc.FloatProvider(),thickness:Xc.FloatProvider(),width_smoothness:Kc.NumberNode({integer:!0,min:0}),horizontal_radius_factor:Xc.FloatProvider(),vertical_radius_default_factor:Kc.NumberNode(),vertical_radius_center_factor:Kc.NumberNode()})},o={horizontal_radius_multiplier:Xc.FloatProvider(),vertical_radius_multiplier:Xc.FloatProvider(),floor_level:Xc.FloatProvider({min:-1,max:1})};e.register("configured_carver",Kc.Mod(Kc.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/carver"}}),config:Kc.ObjectNode({probability:Kc.NumberNode({min:0,max:1}),y:i("height_provider"),yScale:Xc.FloatProvider(),lava_level:i("vertical_anchor"),debug_settings:Kc.Opt(Kc.ObjectNode({debug_mode:Kc.Opt(Kc.BooleanNode()),air_state:Kc.Opt(i("block_state")),water_state:Kc.Opt(i("block_state")),lava_state:Kc.Opt(i("block_state")),barrier_state:Kc.Opt(i("block_state"))})),[Kc.Switch]:["pop",{push:"type"}],[Kc.Case]:{"minecraft:canyon":r,"minecraft:cave":o,"minecraft:nether_cave":o}})},{context:"carver"}),{default:()=>({type:"minecraft:cave",config:{probability:.1}})}))};var Jc={};Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.initDecoratorSchemas=void 0;const Yc=Pe,Zc=_c;Jc.initDecoratorSchemas=function(e,t){const i=Yc.Reference.bind(void 0,e),n=Yc.StringNode.bind(void 0,t);e.register("decorator",Yc.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/placement_modifier_type"}}),[Yc.Switch]:[{push:"type"}],[Yc.Case]:{"minecraft:block_predicate_filter":{predicate:i("block_predicate_worldgen")},"minecraft:carving_mask":{step:n({enum:"generation_step"})},"minecraft:rarity_filter":{chance:Yc.NumberNode({integer:!0,min:0})},"minecraft:count":{count:Zc.IntProvider({min:0,max:256})},"minecraft:count_on_every_layer":{count:Zc.IntProvider({min:0,max:256})},"minecraft:noise_threshold_count":{noise_level:Yc.NumberNode(),below_noise:Yc.NumberNode({integer:!0}),above_noise:Yc.NumberNode({integer:!0})},"minecraft:noise_based_count":{noise_to_count_ratio:Yc.NumberNode({integer:!0}),noise_factor:Yc.NumberNode(),noise_offset:Yc.Opt(Yc.NumberNode())},"minecraft:environment_scan":{direction_of_search:n({enum:["up","down"]}),max_steps:Yc.NumberNode({integer:!0,min:1,max:32}),target_condition:i("block_predicate_worldgen"),allowed_search_condition:Yc.Opt(i("block_predicate_worldgen"))},"minecraft:heightmap":{heightmap:n({enum:"heightmap_type"})},"minecraft:height_range":{height:i("height_provider")},"minecraft:random_offset":{xz_spread:Zc.IntProvider({min:-16,max:16}),y_spread:Zc.IntProvider({min:-16,max:16})},"minecraft:surface_relative_threshold_filter":{heightmap:n({enum:"heightmap_type"}),min_inclusive:Yc.Opt(Yc.NumberNode({integer:!0})),max_inclusive:Yc.Opt(Yc.NumberNode({integer:!0}))},"minecraft:surface_water_depth_filter":{max_water_depth:Yc.NumberNode({integer:!0})}}},{context:"decorator",category:"predicate"}))};var Qc={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.initDensityFunctionSchemas=e.DensityFunction=void 0;const t=Pe;e.initDensityFunctionSchemas=function(i,n){const r=t.StringNode.bind(void 0,n),o=t.Reference.bind(void 0,i);e.DensityFunction=t.Mod(t.ChoiceNode([{type:"number",node:t.NumberNode(),change:()=>0},{type:"string",priority:1,node:r({validator:"resource",params:{pool:"$worldgen/density_function"}}),change:()=>{}},{type:"object",node:o("density_function"),change:()=>({})}],{choiceContext:"density_function"}),{default:()=>0});const a=t.ChoiceNode([{type:"string",node:r({validator:"resource",params:{pool:"$worldgen/noise"}}),change:()=>{}},{type:"object",node:o("noise_parameters")}],{choiceContext:"noise_parameters"}),s=t.NumberNode({min:-1e6,max:1e6}),c=t.NumberNode({integer:!0,min:-4064,max:4062});i.register("density_function",t.Mod(t.ObjectNode({type:r({validator:"resource",params:{pool:"worldgen/density_function_type"}}),[t.Switch]:[{push:"type"}],[t.Case]:{"minecraft:abs":{argument:e.DensityFunction},"minecraft:add":{argument1:e.DensityFunction,argument2:e.DensityFunction},"minecraft:blend_density":{argument:e.DensityFunction},"minecraft:cache_2d":{argument:e.DensityFunction},"minecraft:cache_all_in_cell":{argument:e.DensityFunction},"minecraft:cache_once":{argument:e.DensityFunction},"minecraft:clamp":{input:e.DensityFunction,min:s,max:s},"minecraft:constant":{argument:t.NumberNode()},"minecraft:cube":{argument:e.DensityFunction},"minecraft:flat_cache":{argument:e.DensityFunction},"minecraft:half_negative":{argument:e.DensityFunction},"minecraft:interpolated":{argument:e.DensityFunction},"minecraft:max":{argument1:e.DensityFunction,argument2:e.DensityFunction},"minecraft:min":{argument1:e.DensityFunction,argument2:e.DensityFunction},"minecraft:mul":{argument1:e.DensityFunction,argument2:e.DensityFunction},"minecraft:noise":{noise:a,xz_scale:t.NumberNode(),y_scale:t.NumberNode()},"minecraft:quarter_negative":{argument:e.DensityFunction},"minecraft:range_choice":{input:e.DensityFunction,min_inclusive:s,max_exclusive:s,when_in_range:e.DensityFunction,when_out_of_range:e.DensityFunction},"minecraft:shift":{argument:e.DensityFunction},"minecraft:shift_a":{argument:e.DensityFunction},"minecraft:shift_b":{argument:e.DensityFunction},"minecraft:shifted_noise":{noise:a,xz_scale:t.NumberNode(),y_scale:t.NumberNode(),shift_x:e.DensityFunction,shift_y:e.DensityFunction,shift_z:e.DensityFunction},"minecraft:slide":{argument:e.DensityFunction},"minecraft:spline":{spline:o("cubic_spline"),min_value:s,max_value:s},"minecraft:square":{argument:e.DensityFunction},"minecraft:squeeze":{argument:e.DensityFunction},"minecraft:terrain_shaper_spline":{spline:r({enum:["offset","factor","jaggedness"]}),min_value:s,max_value:s,continentalness:e.DensityFunction,erosion:e.DensityFunction,weirdness:e.DensityFunction},"minecraft:weird_scaled_sampler":{rarity_value_mapper:r({enum:["type_1","type_2"]}),noise:a,input:e.DensityFunction},"minecraft:y_clamped_gradient":{from_y:c,to_y:c,from_value:s,to_value:s}}},{context:"density_function",disableSwitchContext:!0}),{default:()=>({type:"minecraft:noise",noise:"minecraft:cave_entrance",xz_scale:.75,y_scale:.5})})),i.register("cubic_spline",t.Mod(t.ChoiceNode([{type:"number",node:t.NumberNode()},{type:"object",node:t.ObjectNode({coordinate:e.DensityFunction,points:t.ListNode(t.ObjectNode({location:t.NumberNode(),derivative:t.NumberNode(),value:o("cubic_spline")}))},{category:"function"})}],{context:"terrain_spline",choiceContext:"terrain_spline"}),{default:()=>0}))}}(Qc);var el={},tl={};Object.defineProperty(tl,"__esModule",{value:!0}),tl.initProcessorListSchemas=tl.Processors=void 0;const il=Pe;tl.initProcessorListSchemas=function(e,t){const i=il.Reference.bind(void 0,e),n=il.StringNode.bind(void 0,t);tl.Processors=il.ChoiceNode([{type:"string",node:n({validator:"resource",params:{pool:"$worldgen/processor_list"}}),change:e=>{}},{type:"object",node:i("processor_list"),change:e=>({processors:[{processor_type:"minecraft:nop"}]})}]),e.register("processor_list",il.Mod(il.ObjectNode({processors:il.ListNode(i("processor"))},{context:"processor_list"}),{default:()=>({processors:[{processor_type:"minecraft:rule",rules:[{location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}}]}]})})),e.register("processor",il.Mod(il.ObjectNode({processor_type:n({validator:"resource",params:{pool:"worldgen/structure_processor"}}),[il.Switch]:[{push:"processor_type"}],[il.Case]:{"minecraft:block_age":{mossiness:il.NumberNode()},"minecraft:block_ignore":{blocks:il.ListNode(i("block_state"))},"minecraft:block_rot":{integrity:il.NumberNode({min:0,max:1})},"minecraft:gravity":{heightmap:n({enum:"heightmap_type"}),offset:il.NumberNode({integer:!0})},"minecraft:protected_blocks":{value:n({validator:"resource",params:{pool:"block",requireTag:!0}})},"minecraft:rule":{rules:il.ListNode(i("processor_rule"))}}},{category:"function",context:"processor"}),{default:()=>({processor_type:"minecraft:rule",rules:[{location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}}]})})),e.register("processor_rule",il.Mod(il.ObjectNode({position_predicate:il.Opt(i("pos_rule_test")),location_predicate:i("rule_test"),input_predicate:i("rule_test"),output_state:i("block_state"),output_nbt:il.Opt(n({validator:"nbt",params:{registry:{category:"minecraft:block"}}}))},{category:"predicate",context:"processor_rule"}),{default:()=>({location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}})}));const r={min_dist:il.Opt(il.NumberNode({min:0,max:255,integer:!0})),max_dist:il.Opt(il.NumberNode({min:0,max:255,integer:!0})),min_chance:il.Opt(il.NumberNode({min:0,max:1})),max_chance:il.Opt(il.NumberNode({min:0,max:1}))};e.register("pos_rule_test",il.ObjectNode({predicate_type:n({validator:"resource",params:{pool:"pos_rule_test"}}),[il.Switch]:[{push:"predicate_type"}],[il.Case]:{"minecraft:axis_aligned_linear_pos":s({axis:n({enum:["x","y","z"]})},r),"minecraft:linear_pos":r}},{context:"pos_rule_test",disableSwitchContext:!0})),e.register("rule_test",il.ObjectNode({predicate_type:n({validator:"resource",params:{pool:"rule_test"}}),[il.Switch]:[{push:"predicate_type"}],[il.Case]:{"minecraft:block_match":{block:n({validator:"resource",params:{pool:"block"}})},"minecraft:blockstate_match":{block_state:i("block_state")},"minecraft:random_block_match":{block:n({validator:"resource",params:{pool:"block"}}),probability:il.NumberNode({min:0,max:1})},"minecraft:random_blockstate_match":{block_state:i("block_state"),probability:il.NumberNode({min:0,max:1})},"minecraft:tag_match":{tag:n({validator:"resource",params:{pool:"$tag/block"}})}}},{context:"rule_test",disableSwitchContext:!0}))},Object.defineProperty(el,"__esModule",{value:!0}),el.initFeatureSchemas=void 0;const nl=Pe,rl=_c,ol=tl;el.initFeatureSchemas=function(e,t){const i=nl.Reference.bind(void 0,e),n=nl.StringNode.bind(void 0,t),r=nl.ChoiceNode([{type:"string",node:n({validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:i("configured_feature")}],{choiceContext:"feature"}),o=nl.ChoiceNode([{type:"string",node:n({validator:"resource",params:{pool:"$worldgen/placed_feature"}})},{type:"object",node:i("placed_feature")}],{choiceContext:"placed_feature"}),a={tries:nl.Opt(nl.NumberNode({integer:!0,min:1})),xz_spread:nl.Opt(nl.NumberNode({integer:!0,min:0})),y_spread:nl.Opt(nl.NumberNode({integer:!0,min:0})),feature:o},l={state:i("block_state"),radius:rl.IntProvider({min:0,max:8}),half_height:nl.NumberNode({integer:!0,min:0,max:4}),targets:nl.ListNode(i("block_state"))},u={cap_provider:i("block_state_provider"),stem_provider:i("block_state_provider"),foliage_radius:nl.Opt(nl.NumberNode({integer:!0}))},d=nl.ObjectNode({target:i("rule_test"),state:i("block_state")}),h={size:nl.NumberNode({integer:!0,min:0,max:64}),discard_chance_on_air_exposure:nl.NumberNode({min:0,max:1}),targets:nl.ListNode(d)},p={surface:n({enum:"cave_surface"}),depth:rl.IntProvider({min:1,max:128}),vertical_range:nl.NumberNode({integer:!0,min:1,max:256}),extra_bottom_block_chance:nl.NumberNode({min:0,max:1}),extra_edge_column_chance:nl.NumberNode({min:0,max:1}),vegetation_chance:nl.NumberNode({min:0,max:1}),xz_radius:rl.IntProvider(),replaceable:n({validator:"resource",params:{pool:"block",requireTag:!0}}),ground_state:i("block_state_provider"),vegetation_feature:o};e.register("configured_feature",nl.Mod(nl.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/feature"}}),config:nl.ObjectNode({[nl.Switch]:["pop",{push:"type"}],[nl.Case]:{"minecraft:bamboo":{probability:nl.NumberNode({min:0,max:1})},"minecraft:basalt_columns":{reach:rl.IntProvider({min:0,max:3}),height:rl.IntProvider({min:1,max:10})},"minecraft:block_column":{direction:n({enum:["up","down","north","east","south","west"]}),allowed_placement:i("block_predicate_worldgen"),prioritize_tip:nl.BooleanNode(),layers:nl.ListNode(nl.ObjectNode({height:rl.IntProvider({min:0}),provider:i("block_state_provider")}))},"minecraft:block_pile":{state_provider:i("block_state_provider")},"minecraft:delta_feature":{contents:i("block_state"),rim:i("block_state"),size:rl.IntProvider({min:0,max:16}),rim_size:rl.IntProvider({min:0,max:16})},"minecraft:disk":l,"minecraft:dripstone_cluster":{floor_to_ceiling_search_range:nl.NumberNode({integer:!0,min:1,max:512}),height:rl.IntProvider({min:0,max:128}),radius:rl.IntProvider({min:0,max:128}),max_stalagmite_stalactite_height_diff:nl.NumberNode({integer:!0,min:0,max:64}),height_deviation:nl.NumberNode({integer:!0,min:1,max:64}),dripstone_block_layer_thickness:rl.IntProvider({min:0,max:128}),density:rl.FloatProvider({min:0,max:2}),wetness:rl.FloatProvider({min:0,max:2}),chance_of_dripstone_column_at_max_distance_from_center:nl.NumberNode({min:0,max:1}),max_distance_from_edge_affecting_chance_of_dripstone_column:nl.NumberNode({integer:!0,min:1,max:64}),max_distance_from_center_affecting_height_bias:nl.NumberNode({integer:!0,min:1,max:64})},"minecraft:end_gateway":{exact:nl.BooleanNode(),exit:nl.Opt(i("block_pos"))},"minecraft:end_spike":{crystal_invulnerable:nl.Opt(nl.BooleanNode()),crystal_beam_target:nl.Opt(i("block_pos")),spikes:nl.ListNode(nl.ObjectNode({centerX:nl.Opt(nl.NumberNode({integer:!0})),centerZ:nl.Opt(nl.NumberNode({integer:!0})),radius:nl.Opt(nl.NumberNode({integer:!0})),height:nl.Opt(nl.NumberNode({integer:!0})),guarded:nl.Opt(nl.BooleanNode())}))},"minecraft:fill_layer":{state:i("block_state"),height:nl.NumberNode({integer:!0,min:0,max:255})},"minecraft:flower":a,"minecraft:forest_rock":{state:i("block_state")},"minecraft:fossil":{max_empty_corners_allowed:nl.NumberNode({integer:!0,min:0,max:7}),fossil_structures:nl.ListNode(n({validator:"resource",params:{pool:"$structure"}})),overlay_structures:nl.ListNode(n({validator:"resource",params:{pool:"$structure"}})),fossil_processors:ol.Processors,overlay_processors:ol.Processors},"minecraft:geode":{blocks:nl.ObjectNode({filling_provider:i("block_state_provider"),inner_layer_provider:i("block_state_provider"),alternate_inner_layer_provider:i("block_state_provider"),middle_layer_provider:i("block_state_provider"),outer_layer_provider:i("block_state_provider"),inner_placements:nl.ListNode(i("block_state")),cannot_replace:n({validator:"resource",params:{pool:"block",requireTag:!0}}),invalid_blocks:n({validator:"resource",params:{pool:"block",requireTag:!0}})}),layers:nl.ObjectNode({filling:nl.Opt(nl.NumberNode({min:.01,max:50})),inner_layer:nl.Opt(nl.NumberNode({min:.01,max:50})),middle_layer:nl.Opt(nl.NumberNode({min:.01,max:50})),outer_layer:nl.Opt(nl.NumberNode({min:.01,max:50}))}),crack:nl.ObjectNode({generate_crack_chance:nl.Opt(nl.NumberNode({min:0,max:1})),base_crack_size:nl.Opt(nl.NumberNode({min:0,max:5})),crack_point_offset:nl.Opt(nl.NumberNode({min:0,max:10}))}),noise_multiplier:nl.Opt(nl.NumberNode({min:0,max:1})),use_potential_placements_chance:nl.Opt(nl.NumberNode({min:0,max:1})),use_alternate_layer0_chance:nl.Opt(nl.NumberNode({min:0,max:1})),placements_require_layer0_alternate:nl.Opt(nl.BooleanNode()),outer_wall_distance:nl.Opt(rl.IntProvider({min:1,max:20})),distribution_points:nl.Opt(rl.IntProvider({min:1,max:20})),point_offset:nl.Opt(rl.IntProvider({min:0,max:10})),min_gen_offset:nl.Opt(nl.NumberNode({integer:!0})),max_gen_offset:nl.Opt(nl.NumberNode({integer:!0})),invalid_blocks_threshold:nl.NumberNode({integer:!0})},"minecraft:glow_lichen":{search_range:nl.Opt(nl.NumberNode({min:1,max:64,integer:!0})),chance_of_spreading:nl.Opt(nl.NumberNode({min:0,max:1})),can_place_on_floor:nl.Opt(nl.BooleanNode()),can_place_on_ceiling:nl.Opt(nl.BooleanNode()),can_place_on_wall:nl.Opt(nl.BooleanNode()),can_be_placed_on:rl.Tag({resource:"block"})},"minecraft:huge_brown_mushroom":u,"minecraft:huge_fungus":{hat_state:i("block_state"),decor_state:i("block_state"),stem_state:i("block_state"),valid_base_block:i("block_state"),planted:nl.Opt(nl.BooleanNode())},"minecraft:huge_red_mushroom":u,"minecraft:ice_patch":l,"minecraft:iceberg":{state:i("block_state")},"minecraft:lake":{fluid:i("block_state_provider"),barrier:i("block_state_provider")},"minecraft:large_dripstone":{floor_to_ceiling_search_range:nl.Opt(nl.NumberNode({integer:!0,min:1,max:512})),column_radius:rl.IntProvider({min:0,max:60}),height_scale:rl.FloatProvider({min:0,max:20}),max_column_radius_to_cave_height_ratio:nl.NumberNode({min:0,max:1}),stalactite_bluntness:rl.FloatProvider({min:.1,max:10}),stalagmite_bluntness:rl.FloatProvider({min:.1,max:10}),wind_speed:rl.FloatProvider({min:0,max:2}),min_radius_for_wind:nl.NumberNode({integer:!0,min:0,max:100}),min_bluntness_for_wind:nl.NumberNode({min:0,max:5})},"minecraft:nether_forest_vegetation":{state_provider:i("block_state_provider"),spread_width:nl.NumberNode({integer:!0,min:1}),spread_height:nl.NumberNode({integer:!0,min:1})},"minecraft:netherrack_replace_blobs":{state:i("block_state"),target:i("block_state"),radius:rl.IntProvider({min:0,max:12})},"minecraft:no_bonemeal_flower":a,"minecraft:ore":h,"minecraft:pointed_dripstone":{chance_of_taller_dripstone:nl.Opt(nl.NumberNode({min:0,max:1})),chance_of_directional_spread:nl.Opt(nl.NumberNode({min:0,max:1})),chance_of_spread_radius2:nl.Opt(nl.NumberNode({min:0,max:1})),chance_of_spread_radius3:nl.Opt(nl.NumberNode({min:0,max:1}))},"minecraft:random_patch":a,"minecraft:random_boolean_selector":{feature_false:o,feature_true:o},"minecraft:random_selector":{features:nl.ListNode(nl.ObjectNode({chance:nl.NumberNode({min:0,max:1}),feature:o})),default:o},"minecraft:replace_single_block":{targets:nl.ListNode(d)},"minecraft:root_system":{required_vertical_space_for_tree:nl.NumberNode({integer:!0,min:1,max:64}),root_radius:nl.NumberNode({integer:!0,min:1,max:64}),root_placement_attempts:nl.NumberNode({integer:!0,min:1,max:256}),root_column_max_height:nl.NumberNode({integer:!0,min:1,max:4096}),hanging_root_radius:nl.NumberNode({integer:!0,min:1,max:64}),hanging_roots_vertical_span:nl.NumberNode({integer:!0,min:0,max:16}),hanging_root_placement_attempts:nl.NumberNode({integer:!0,min:0,max:256}),allowed_vertical_water_for_tree:nl.NumberNode({integer:!0,min:1,max:64}),root_replaceable:n({validator:"resource",params:{pool:"block",requireTag:!0}}),root_state_provider:i("block_state_provider"),hanging_root_state_provider:i("block_state_provider"),allowed_tree_position:i("block_predicate_worldgen"),feature:o},"minecraft:scattered_ore":h,"minecraft:sea_pickle":{count:rl.IntProvider({min:0,max:256})},"minecraft:seagrass":{probability:nl.NumberNode({min:0,max:1})},"minecraft:simple_block":{to_place:i("block_state_provider")},"minecraft:simple_random_selector":{features:rl.Tag({resource:"$worldgen/placed_feature",inlineSchema:"placed_feature"})},"minecraft:spring_feature":{state:i("fluid_state"),rock_count:nl.NumberNode({integer:!0}),hole_count:nl.NumberNode({integer:!0}),requires_block_below:nl.BooleanNode(),valid_blocks:rl.Tag({resource:"block"})},"minecraft:tree":{ignore_vines:nl.Opt(nl.BooleanNode()),force_dirt:nl.Opt(nl.BooleanNode()),minimum_size:i("feature_size"),dirt_provider:i("block_state_provider"),trunk_provider:i("block_state_provider"),foliage_provider:i("block_state_provider"),trunk_placer:nl.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/trunk_placer_type"}}),base_height:nl.NumberNode({integer:!0,min:0,max:32}),height_rand_a:nl.NumberNode({integer:!0,min:0,max:24}),height_rand_b:nl.NumberNode({integer:!0,min:0,max:24}),[nl.Switch]:[{push:"type"}],[nl.Case]:{"minecraft:bending_trunk_placer":{bend_length:rl.IntProvider({min:1,max:64}),min_height_for_leaves:nl.Opt(nl.NumberNode({integer:!0,min:1}))}}},{context:"trunk_placer"}),foliage_placer:nl.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/foliage_placer_type"}}),radius:rl.IntProvider({min:0,max:16}),offset:rl.IntProvider({min:0,max:16}),[nl.Switch]:[{push:"type"}],[nl.Case]:{"minecraft:blob_foliage_placer":{height:nl.NumberNode({integer:!0,min:0,max:16})},"minecraft:bush_foliage_placer":{height:nl.NumberNode({integer:!0,min:0,max:16})},"minecraft:fancy_foliage_placer":{height:nl.NumberNode({integer:!0,min:0,max:16})},"minecraft:jungle_foliage_placer":{height:nl.NumberNode({integer:!0,min:0,max:16})},"minecraft:mega_pine_foliage_placer":{crown_height:rl.IntProvider({min:0,max:24})},"minecraft:pine_foliage_placer":{height:rl.IntProvider({min:0,max:24})},"minecraft:random_spread_foliage_placer":{foliage_height:rl.IntProvider({min:1,max:512}),leaf_placement_attempts:nl.NumberNode({integer:!0,min:0,max:256})},"minecraft:spruce_foliage_placer":{trunk_height:rl.IntProvider({min:0,max:24})}}},{context:"foliage_placer",disableSwitchContext:!0}),decorators:nl.ListNode(nl.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/tree_decorator_type"}}),[nl.Switch]:[{push:"type"}],[nl.Case]:{"minecraft:alter_ground":{provider:i("block_state_provider")},"minecraft:beehive":{probability:nl.NumberNode({min:0,max:1})},"minecraft:cocoa":{probability:nl.NumberNode({min:0,max:1})}}},{context:"tree_decorator"}))},"minecraft:twisting_vines":{spread_width:nl.NumberNode({integer:!0,min:1}),spread_height:nl.NumberNode({integer:!0,min:1}),max_height:nl.NumberNode({integer:!0,min:1})},"minecraft:underwater_magma":{floor_search_range:nl.NumberNode({integer:!0,min:0,max:512}),placement_radius_around_floor:nl.NumberNode({integer:!0,min:0,max:64}),placement_probability_per_valid_position:nl.NumberNode({min:0,max:1})},"minecraft:vegetation_patch":p,"minecraft:waterlogged_vegetation_patch":p}},{context:"feature"})},{context:"feature"}),{default:()=>({type:"minecraft:tree",config:{minimum_size:{type:"minecraft:two_layers_feature_size"},trunk_placer:{type:"minecraft:straight_trunk_placer",base_height:5,height_rand_a:2,height_rand_b:0},foliage_placer:{type:"minecraft:blob_foliage_placer",radius:2,offset:0,height:3}}})})),e.register("placed_feature",nl.Mod(nl.ObjectNode({feature:r,placement:nl.ListNode(i("decorator"))},{context:"placed_feature"}),{default:()=>({feature:"minecraft:oak",placement:[{type:"minecraft:count",count:4},{type:"minecraft:in_square"},{type:"minecraft:heightmap",heightmap:"OCEAN_FLOOR"}]})})),e.register("feature_size",nl.Mod(nl.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/feature_size_type"}}),min_clipped_height:nl.Opt(nl.NumberNode({min:0,max:80})),[nl.Switch]:[{push:"type"}],[nl.Case]:{"minecraft:two_layers_feature_size":{limit:nl.Opt(nl.NumberNode({integer:!0,min:0,max:81})),lower_size:nl.Opt(nl.NumberNode({integer:!0,min:0,max:16})),upper_size:nl.Opt(nl.NumberNode({integer:!0,min:0,max:16}))},"minecraft:three_layers_feature_size":{limit:nl.Opt(nl.NumberNode({integer:!0,min:0,max:80})),upper_limit:nl.Opt(nl.NumberNode({integer:!0,min:0,max:80})),lower_size:nl.Opt(nl.NumberNode({integer:!0,min:0,max:16})),middle_size:nl.Opt(nl.NumberNode({integer:!0,min:0,max:16})),upper_size:nl.Opt(nl.NumberNode({integer:!0,min:0,max:16}))}}},{disableSwitchContext:!0}),{default:()=>({type:"minecraft:two_layers_feature_size"})}));const m={seed:nl.NumberNode({integer:!0}),noise:i("noise_parameters"),scale:nl.Mod(nl.NumberNode({min:Number.MIN_VALUE}),{default:()=>1})};e.register("block_state_provider",nl.Mod(nl.ObjectNode({type:n({validator:"resource",params:{pool:"worldgen/block_state_provider_type"}}),[nl.Switch]:[{push:"type"}],[nl.Case]:{"minecraft:dual_noise_provider":c(s({},m),{variety:rl.InclusiveRange({integer:!0,min:1,max:64}),slow_noise:i("noise_parameters"),slow_scale:nl.Mod(nl.NumberNode({min:Number.MIN_VALUE}),{default:()=>1}),states:nl.ListNode(i("block_state"))}),"minecraft:noise_threshold_provider":c(s({},m),{threshold:nl.NumberNode({min:-1,max:1}),high_chance:nl.NumberNode({min:0,max:1}),default_state:i("block_state"),low_states:nl.ListNode(i("block_state")),high_states:nl.ListNode(i("block_state"))}),"minecraft:noise_provider":c(s({},m),{states:nl.ListNode(i("block_state"))}),"minecraft:randomized_int_state_provider":{property:n(),values:rl.IntProvider(),source:i("block_state_provider")},"minecraft:rotated_block_provider":{state:i("block_state")},"minecraft:simple_state_provider":{state:i("block_state")},"minecraft:weighted_state_provider":{entries:nl.ListNode(nl.Mod(nl.ObjectNode({weight:nl.NumberNode({integer:!0,min:1}),data:i("block_state")}),{default:()=>({data:{}})}))}}},{context:"block_state_provider"}),{default:()=>({type:"minecraft:simple_state_provider"})}));const f={offset:nl.Opt(nl.ListNode(nl.NumberNode({integer:!0,min:-16,max:16}),{minLength:3,maxLength:3}))};e.register("block_predicate_worldgen",nl.Mod(nl.ObjectNode({type:n({validator:"resource",params:{pool:"block_predicate_type"}}),[nl.Switch]:[{push:"type"}],[nl.Case]:{"minecraft:all_of":{predicates:nl.ListNode(i("block_predicate_worldgen"))},"minecraft:any_of":{predicates:nl.ListNode(i("block_predicate_worldgen"))},"minecraft:has_sturdy_face":c(s({},f),{direction:n({enum:"direction"})}),"minecraft:inside_world_bounds":s({},f),"minecraft:matching_block_tag":c(s({},f),{tag:n({validator:"resource",params:{pool:"$tag/block"}})}),"minecraft:matching_blocks":c(s({},f),{blocks:rl.Tag({resource:"block"})}),"minecraft:matching_fluids":c(s({},f),{fluids:rl.Tag({resource:"fluid"})}),"minecraft:not":{predicate:i("block_predicate_worldgen")},"minecraft:would_survive":c(s({},f),{state:i("block_state")})}},{context:"block_predicate"}),{default:()=>({type:"minecraft:true"})}))};var al={};Object.defineProperty(al,"__esModule",{value:!0}),al.initNoiseSettingsSchemas=void 0;const sl=Pe,cl=_c,ll=Qc;al.initNoiseSettingsSchemas=function(e,t){const i=sl.Reference.bind(void 0,e),n=sl.StringNode.bind(void 0,t);e.register("noise_settings",sl.Mod(sl.ObjectNode({sea_level:sl.NumberNode({integer:!0}),disable_mob_generation:sl.BooleanNode(),aquifers_enabled:sl.BooleanNode(),ore_veins_enabled:sl.BooleanNode(),legacy_random_source:sl.BooleanNode(),default_block:i("block_state"),default_fluid:i("block_state"),noise:sl.ObjectNode({min_y:sl.NumberNode({integer:!0,min:-2048,max:2047}),height:sl.NumberNode({integer:!0,min:0,max:4096}),size_horizontal:sl.NumberNode({integer:!0}),size_vertical:sl.NumberNode({integer:!0}),sampling:sl.ObjectNode({xz_scale:sl.NumberNode(),y_scale:sl.NumberNode(),xz_factor:sl.NumberNode(),y_factor:sl.NumberNode()}),bottom_slide:i("noise_slider"),top_slide:i("noise_slider"),terrain_shaper:i("terrain_shaper")}),noise_router:sl.ObjectNode({barrier:ll.DensityFunction,fluid_level_floodedness:ll.DensityFunction,fluid_level_spread:ll.DensityFunction,lava:ll.DensityFunction,temperature:ll.DensityFunction,vegetation:ll.DensityFunction,continents:ll.DensityFunction,erosion:ll.DensityFunction,depth:ll.DensityFunction,ridges:ll.DensityFunction,initial_density_without_jaggedness:ll.DensityFunction,final_density:ll.DensityFunction,vein_toggle:ll.DensityFunction,vein_ridged:ll.DensityFunction,vein_gap:ll.DensityFunction}),surface_rule:i("material_rule")},{context:"noise_settings"}),(e=>({default:()=>cl.DefaultNoiseSettings,validate:(t,i,n,r)=>{var o,a,s,c;return(null===(o=null==(i=e.validate(t,i,n,r))?void 0:i.noise)||void 0===o?void 0:o.min_y)+(null===(a=null==i?void 0:i.noise)||void 0===a?void 0:a.height)>2047&&n.add(t.push("noise").push("height"),"error.min_y_plus_height",2047),(null===(s=null==i?void 0:i.noise)||void 0===s?void 0:s.height)%16!=0&&n.add(t.push("noise").push("height"),"error.height_multiple",16),(null===(c=null==i?void 0:i.noise)||void 0===c?void 0:c.min_y)%16!=0&&n.add(t.push("noise").push("min_y"),"error.min_y_multiple",16),i}})))),e.register("noise_slider",sl.ObjectNode({target:sl.NumberNode(),size:sl.NumberNode({integer:!0,min:0}),offset:sl.NumberNode({integer:!0})})),e.register("generator_layer",sl.Mod(sl.ObjectNode({block:n({validator:"resource",params:{pool:"block"}}),height:sl.NumberNode({integer:!0,min:1})}),{default:()=>({block:"minecraft:stone",height:1})})),e.register("terrain_shaper",sl.Mod(sl.ObjectNode({offset:i("terrain_spline"),factor:i("terrain_spline"),jaggedness:i("terrain_spline")},{context:"terrain_shaper"}),{default:()=>({offset:0,factor:0,jaggedness:0})})),e.register("terrain_spline",sl.Mod(sl.ChoiceNode([{type:"number",node:sl.NumberNode()},{type:"object",node:sl.ObjectNode({coordinate:sl.Mod(n({enum:["continents","erosion","weirdness","ridges"]}),{default:()=>"continents"}),points:sl.ListNode(sl.ObjectNode({location:sl.NumberNode(),derivative:sl.NumberNode(),value:i("terrain_spline")}))},{category:"function"})}],{context:"terrain_spline",choiceContext:"terrain_spline"}),{default:()=>0}))};var ul={};Object.defineProperty(ul,"__esModule",{value:!0}),ul.initStructureFeatureSchemas=void 0;const dl=Pe,hl=_c,pl=Vc;ul.initStructureFeatureSchemas=function(e,t){const i=dl.StringNode.bind(void 0,t),n=dl.Reference.bind(void 0,e),r={start_pool:i({validator:"resource",params:{pool:"$worldgen/template_pool"}}),size:dl.NumberNode({integer:!0})};e.register("configured_structure_feature",dl.Mod(dl.ObjectNode({type:i({validator:"resource",params:{pool:"worldgen/structure_feature"}}),biomes:hl.Tag({resource:"$worldgen/biome"}),adapt_noise:dl.Opt(dl.BooleanNode()),spawn_overrides:dl.MapNode(i({enum:"mob_category"}),dl.ObjectNode({bounding_box:i({enum:["piece","full"]}),spawns:pl.MobCategorySpawnSettings})),config:dl.ObjectNode({[dl.Switch]:["pop",{push:"type"}],[dl.Case]:{"minecraft:bastion_remnant":r,"minecraft:buried_treasure":{probability:dl.NumberNode({min:0,max:1})},"minecraft:mineshaft":{type:i({enum:["normal","mesa"]}),probability:dl.NumberNode({min:0,max:1})},"minecraft:nether_fossil":{height:n("height_provider")},"minecraft:ocean_ruin":{biome_temp:i({enum:["cold","warm"]}),large_probability:dl.NumberNode({min:0,max:1}),cluster_probability:dl.NumberNode({min:0,max:1})},"minecraft:pillager_outpost":r,"minecraft:ruined_portal":{portal_type:i({enum:["standard","desert","jungle","mountain","nether","ocean","swamp"]})},"minecraft:shipwreck":{is_beached:dl.Opt(dl.BooleanNode())},"minecraft:village":r}},{context:"structure_feature",disableSwitchContext:!0})},{context:"structure_feature"}),{default:()=>({type:"minecraft:bastion_remnant",config:{start_pool:"minecraft:bastion/starts",size:6}})}))};var ml={};Object.defineProperty(ml,"__esModule",{value:!0}),ml.initStructureSetSchemas=void 0;const fl=Pe,gl=_c;ml.initStructureSetSchemas=function(e,t){const i=fl.StringNode.bind(void 0,t),n=fl.Reference.bind(void 0,e);e.register("structure_set",fl.ObjectNode({structures:fl.ListNode(fl.ObjectNode({structure:gl.Tag({resource:"$worldgen/configured_structure_feature"}),weight:fl.NumberNode({integer:!0,min:1})})),placement:n("structure_placement")},{context:"structure_set"})),e.register("structure_placement",fl.Mod(fl.ObjectNode({type:i({validator:"resource",params:{pool:"worldgen/structure_placement"}}),[fl.Switch]:[{push:"type"}],[fl.Case]:{"minecraft:concentric_rings":{distance:fl.NumberNode({integer:!0,min:0,max:1023}),spread:fl.NumberNode({integer:!0,min:0,max:1023}),count:fl.NumberNode({integer:!0,min:1,max:4095})},"minecraft:random_spread":{spread_type:fl.Opt(i({enum:["linear","triangular"]})),spacing:fl.NumberNode({integer:!0,min:0,max:4096}),separation:fl.Mod(fl.NumberNode({integer:!0,min:0,max:4096}),(e=>({validate:(t,i,n,r)=>(t.pop().push("spacing").get()<=i&&n.add(t,"error.separation_smaller_spacing"),e.validate(t,i,n,r))}))),salt:fl.NumberNode({integer:!0,min:0}),locate_offset:fl.Opt(fl.ListNode(fl.NumberNode({integer:!0,min:-16,max:16}),{minLength:3,maxLength:3}))}}},{context:"structure_placement"}),{default:()=>({type:"minecraft:random_spread",spacing:10,separation:5,salt:Math.floor(2147483647*Math.random())})}))};var _l={};Object.defineProperty(_l,"__esModule",{value:!0}),_l.initSurfaceRuleSchemas=void 0;const bl=Pe;_l.initSurfaceRuleSchemas=function(e,t){const i=bl.StringNode.bind(void 0,t),n=bl.Reference.bind(void 0,e);e.register("material_rule",bl.Mod(bl.ObjectNode({type:i({validator:"resource",params:{pool:"worldgen/material_rule"}}),[bl.Switch]:[{push:"type"}],[bl.Case]:{"minecraft:block":{result_state:n("block_state")},"minecraft:condition":{if_true:n("material_condition"),then_run:n("material_rule")},"minecraft:sequence":{sequence:bl.ListNode(n("material_rule"))}}},{context:"material_rule",category:"pool"}),{default:()=>({type:"minecraft:block",result_state:{Name:"minecraft:stone"}})})),e.register("material_condition",bl.Mod(bl.ObjectNode({type:i({validator:"resource",params:{pool:"worldgen/material_condition"}}),[bl.Switch]:[{push:"type"}],[bl.Case]:{"minecraft:biome":{biome_is:bl.ListNode(i({validator:"resource",params:{pool:"$worldgen/biome"}}))},"minecraft:noise_threshold":{noise:i({validator:"resource",params:{pool:"$worldgen/noise"}}),min_threshold:bl.NumberNode(),max_threshold:bl.NumberNode()},"minecraft:not":{invert:n("material_condition")},"minecraft:stone_depth":{offset:bl.NumberNode({integer:!0}),surface_type:i({enum:"cave_surface"}),add_surface_depth:bl.BooleanNode(),secondary_depth_range:bl.NumberNode({integer:!0})},"minecraft:vertical_gradient":{random_name:i(),true_at_and_below:n("vertical_anchor"),false_at_and_above:n("vertical_anchor")},"minecraft:water":{offset:bl.NumberNode({integer:!0}),surface_depth_multiplier:bl.NumberNode({integer:!0,min:-20,max:20}),add_stone_depth:bl.BooleanNode()},"minecraft:y_above":{anchor:n("vertical_anchor"),surface_depth_multiplier:bl.NumberNode({integer:!0,min:-20,max:20}),add_stone_depth:bl.BooleanNode()}}},{context:"material_condition"}),{default:()=>({type:"minecraft:biome",is_biome:"minecraft:plains"})}))};var vl={};Object.defineProperty(vl,"__esModule",{value:!0}),vl.initTemplatePoolSchemas=void 0;const yl=Pe,wl=tl;vl.initTemplatePoolSchemas=function(e,t){const i=yl.Reference.bind(void 0,e),n=yl.StringNode.bind(void 0,t);e.register("template_pool",yl.Mod(yl.ObjectNode({name:n(),fallback:n(),elements:yl.ListNode(i("template_weighted_element"))},{context:"template_pool"}),{default:()=>({fallback:"minecraft:empty",elements:[{weight:1,element:{element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"}}]})})),e.register("template_weighted_element",yl.Mod(yl.ObjectNode({weight:yl.NumberNode({integer:!0,min:1}),element:i("template_element")},{category:"pool"}),{default:()=>({weight:1,element:{element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"}})})),e.register("template_element",yl.Mod(yl.ObjectNode({element_type:n({validator:"resource",params:{pool:"worldgen/structure_pool_element"}}),projection:n({enum:["rigid","terrain_matching"]}),[yl.Switch]:[{push:"element_type"}],[yl.Case]:{"minecraft:feature_pool_element":{feature:n({validator:"resource",params:{pool:"$worldgen/placed_feature"}})},"minecraft:legacy_single_pool_element":{location:n({validator:"resource",params:{pool:"$structure"}}),processors:wl.Processors},"minecraft:list_pool_element":{elements:yl.ListNode(i("template_element"))},"minecraft:single_pool_element":{location:n({validator:"resource",params:{pool:"$structure"}}),processors:wl.Processors}}},{context:"template_element",disableSwitchContext:!0}),{default:()=>({element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"})}))},Object.defineProperty(qc,"__esModule",{value:!0}),qc.initWorldgenSchemas=void 0;const xl=Vc,Nl=Gc,kl=Jc,Al=Qc,Cl=el,Ol=al,Sl=tl,El=ul,Fl=ml,Dl=_l,Bl=vl;qc.initWorldgenSchemas=function(e,t){Sl.initProcessorListSchemas(e,t),Al.initDensityFunctionSchemas(e,t),xl.initBiomeSchemas(e,t),Nl.initCarverSchemas(e,t),kl.initDecoratorSchemas(e,t),Cl.initFeatureSchemas(e,t),Ol.initNoiseSettingsSchemas(e,t),El.initStructureFeatureSchemas(e,t),Fl.initStructureSetSchemas(e,t),Dl.initSurfaceRuleSchemas(e,t),Bl.initTemplatePoolSchemas(e,t)};var Ll={};Object.defineProperty(Ll,"__esModule",{value:!0}),Ll.initWorldSettingsSchemas=void 0;const Ml=Pe;Ll.initWorldSettingsSchemas=function(e,t){const i=Ml.Reference.bind(void 0,e),n=Ml.StringNode.bind(void 0,t);e.register("world_settings",Ml.Mod(Ml.ObjectNode({generate_features:Ml.BooleanNode(),bonus_chest:Ml.BooleanNode(),seed:Ml.NumberNode({integer:!0}),dimensions:Ml.MapNode(n({validator:"resource",params:{pool:"$dimension"}}),i("dimension"))},{context:"world_settings"}),{default:()=>{const e=Math.floor(4294967296*Math.random())-2147483648;return{generate_features:!0,bonus_chest:!1,seed:e,dimensions:{"minecraft:overworld":{type:"minecraft:overworld",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:multi_noise",preset:"minecraft:overworld"},settings:"minecraft:overworld"}},"minecraft:the_nether":{type:"minecraft:the_nether",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:multi_noise",preset:"minecraft:nether"},settings:"minecraft:nether"}},"minecraft:the_end":{type:"minecraft:the_end",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:the_end",seed:e},settings:"minecraft:end"}}}}}}))},Object.defineProperty(sc,"__esModule",{value:!0}),sc.initSchemas=void 0;const Tl=cc,Rl=uc,$l=_c,jl=bc,Il=wc,Pl=kc,zl=Oc,Ul=Fc,Wl=Tc,Hl=$c,ql=Ic,Vl=zc,Gl=Wc,Kl=qc,Xl=Ll;sc.initSchemas=function(e,t){$l.initCommonSchemas(e,t),Tl.initAdvancementSchemas(e,t),Rl.initAssetsSchemas(e,t),jl.initConditionSchemas(e,t),Pl.initDimensionTypeSchemas(e,t),Il.initDimensionSchemas(e,t),zl.initItemModifierSchemas(e,t),Ul.initLootTableSchemas(e,t),Wl.initPackMcmetaSchemas(e,t),Hl.initPredicatesSchemas(e,t),ql.initRecipeSchemas(e,t),Vl.initTagsSchemas(e,t),Gl.initTextComponentSchemas(e,t),Kl.initWorldgenSchemas(e,t),Xl.initWorldSettingsSchemas(e,t)};var Jl=Ie&&Ie.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),Yl=Ie&&Ie.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Zl=Ie&&Ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.hasOwnProperty.call(e,i)&&Jl(t,e,i);return Yl(t,e),t};Object.defineProperty(oc,"__esModule",{value:!0});var Ql=oc.getSchemas=oc.getCollections=void 0;const eu=Pe,tu=ac,iu=sc;var nu=oc.lootContext=Zl(Dc);var ru=oc.getCollections=function(){const e=new eu.CollectionRegistry;return tu.initCollections(e),e};Ql=oc.getSchemas=function(e){const t=new eu.SchemaRegistry;return iu.initSchemas(t,e),t};var ou=Object.freeze(Object.assign(Object.create(null),oc,{[Symbol.toStringTag]:"Module",get getSchemas(){return Ql},get getCollections(){return ru},lootContext:nu,default:oc})),au={},su={};Object.defineProperty(su,"__esModule",{value:!0}),su.initCollections=void 0,su.initCollections=function(e){e.register("advancement_trigger",["minecraft:allay_drop_item_on_block","minecraft:bee_nest_destroyed","minecraft:bred_animals","minecraft:brewed_potion","minecraft:changed_dimension","minecraft:channeled_lightning","minecraft:construct_beacon","minecraft:consume_item","minecraft:cured_zombie_villager","minecraft:effects_changed","minecraft:enchanted_item","minecraft:enter_block","minecraft:entity_hurt_player","minecraft:entity_killed_player","minecraft:fall_from_height","minecraft:filled_bucket","minecraft:fishing_rod_hooked","minecraft:hero_of_the_village","minecraft:impossible","minecraft:inventory_changed","minecraft:item_delivered_to_player","minecraft:item_durability_changed","minecraft:item_used_on_block","minecraft:kill_mob_near_sculk_catalyst","minecraft:killed_by_crossbow","minecraft:levitation","minecraft:lightning_strike","minecraft:location","minecraft:nether_travel","minecraft:placed_block","minecraft:player_generates_container_loot","minecraft:player_hurt_entity","minecraft:player_interacted_with_entity","minecraft:player_killed_entity","minecraft:recipe_unlocked","minecraft:ride_entity_in_lava","minecraft:shot_crossbow","minecraft:slept_in_bed","minecraft:slide_down_block","minecraft:started_riding","minecraft:summoned_entity","minecraft:tame_animal","minecraft:target_hit","minecraft:tick","minecraft:thrown_item_picked_up_by_entity","minecraft:used_ender_eye","minecraft:used_totem","minecraft:using_item","minecraft:villager_trade","minecraft:voluntary_exile"]),e.register("keybind",["key.advancements","key.attack","key.back","key.chat","key.command","key.drop","key.forward","key.fullscreen","key.hotbar.1","key.hotbar.2","key.hotbar.3","key.hotbar.4","key.hotbar.5","key.hotbar.6","key.hotbar.7","key.hotbar.8","key.hotbar.9","key.inventory","key.jump","key.left","key.loadToolbarActivator","key.pickItem","key.playerlist","key.right","key.saveToolbarActivator","key.screenshot","key.smoothCamera","key.sneak","key.spectatorOutlines","key.sprint","key.swapOffhand","key.togglePerspective","key.use"]),e.register("slot",["mainhand","offhand","head","chest","legs","feet"]),e.register("gamemode",["survival","creative","adventure","spectator"]),e.register("entity_source",["this","killer","direct_killer","killer_player"]),e.register("copy_source",["block_entity","this","killer","killer_player"]),e.register("loot_table_apply_bonus_formula",["minecraft:uniform_bonus_count","minecraft:binomial_with_bonus_count","minecraft:ore_drops"]),e.register("map_decoration",["mansion","monument","player","frame","red_marker","blue_marker","target_x","target_point","player_off_map","player_off_limits","red_x","banner_white","banner_orange","banner_magenta","banner_light_blue","banner_yellow","banner_lime","banner_pink","banner_gray","banner_light_gray","banner_cyan","banner_purple","banner_blue","banner_brown","banner_green","banner_red","banner_black"]),e.register("map_feature",["bastion_remnant","buried_treasure","desert_pyramid","endcity","fortress","igloo","jungle_pyramid","mansion","mineshaft","monument","nether_fossil","ocean_ruin","pillager_outpost","ruined_portal","shipwreck","stronghold","swamp_hut","village"]),e.register("recipe_group",["bed","light_gray_dye","iron_ingot","wooden_stairs","black_dye","stained_terracotta","dyed_bed","magenta_dye","bark","rabbit_stew","light_blue_dye","wooden_fence_gate","planks","stained_glass","wooden_door","stained_glass_pane","wooden_fence","sticks","concrete_powder","wooden_pressure_plate","boat","brown_dye","yellow_dye","bonemeal","red_dye","wooden_trapdoor","wooden_button","gold_ingot","pink_dye","wooden_slab","orange_dye","carpet","sign","wool","sugar","blue_dye","white_dye","banner","netherite_ingot"]),e.register("biome_category",["beach","desert","extreme_hills","forest","icy","jungle","mesa","mountain","mushroom","nether","none","ocean","plains","river","savanna","swamp","taiga","the_end","underground"]),e.register("heightmap_type",["MOTION_BLOCKING","MOTION_BLOCKING_NO_LEAVES","OCEAN_FLOOR","OCEAN_FLOOR_WG","WORLD_SURFACE","WORLD_SURFACE_WG"]),e.register("generation_step",["air","liquid"]),e.register("decoration_step",["raw_generation","lakes","local_modifications","underground_structures","surface_structures","strongholds","underground_ores","underground_decoration","fluid_springs","vegetal_decoration","top_layer_modification"]),e.register("loot_context_type",["minecraft:empty","minecraft:chest","minecraft:command","minecraft:selector","minecraft:fishing","minecraft:entity","minecraft:gift","minecraft:barter","minecraft:advancement_reward","minecraft:advancement_entity","minecraft:generic","minecraft:block"]),e.register("banner_pattern",["base","square_bottom_left","square_bottom_right","square_top_left","square_top_right","stripe_bottom","stripe_top","stripe_left","stripe_right","stripe_center","stripe_middle","stripe_downright","stripe_downleft","small_stripes","cross","straight_cross","triangle_bottom","triangle_top","triangles_bottom","triangles_top","diagonal_left","diagonal_up_right","diagonal_up_left","diagonal_right","circle","rhombus","half_vertical","half_horizontal","half_vertical_right","half_horizontal_bottom","border","curly_border","gradient","gradient_up","bricks","globe","creeper","skull","flower","mojang","piglin"]),e.register("dye_color",["white","orange","magenta","light_blue","yellow","lime","pink","gray","light_gray","cyan","purple","blue","brown","green","red","black"]),e.register("cave_surface",["floor","ceiling"]),e.register("direction",["down","up","north","east","south","west"]),e.register("axis",["x","y","z"]),e.register("display_position",["firstperson_righthand","firstperson_lefthand","thirdperson_righthand","thirdperson_lefthand","gui","head","ground","fixed"]),e.register("gui_light",["front","side"]),e.register("item_model_predicates",["angle","blocking","broken","cast","charged","cooldown","custom_model_data","damage","damaged","firework","lefthanded","pull","pulling","throwing","time"]),e.register("mob_category",["monster","creature","ambient","axolotls","underground_water_creature","water_creature","water_ambient","misc"])};var cu={},lu={};Object.defineProperty(lu,"__esModule",{value:!0}),lu.initAdvancementSchemas=void 0;const uu=Pe;lu.initAdvancementSchemas=function(e,t){const i=uu.Reference.bind(void 0,e),n=uu.StringNode.bind(void 0,t),r=(0,uu.ChoiceNode)([{type:"object",node:(0,uu.Opt)(i("entity_predicate")),change:e=>{var t,i;return null!==(i=null===(t=e[0])||void 0===t?void 0:t.predicate)&&void 0!==i?i:{}}},{type:"list",node:(0,uu.ListNode)(i("condition")),change:e=>[{condition:"minecraft:entity_properties",predicate:e}]}],{context:"conditions"});e.register("advancement",(0,uu.Mod)((0,uu.ObjectNode)({display:(0,uu.Opt)((0,uu.Mod)((0,uu.ObjectNode)({icon:(0,uu.ObjectNode)({item:n({validator:"resource",params:{pool:"item"}}),nbt:(0,uu.Opt)(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"item"}]}}}))}),title:i("text_component"),description:i("text_component"),background:(0,uu.Opt)(n()),frame:(0,uu.Opt)(n({enum:["task","challenge","goal"]})),show_toast:(0,uu.Opt)((0,uu.BooleanNode)()),announce_to_chat:(0,uu.Opt)((0,uu.BooleanNode)()),hidden:(0,uu.Opt)((0,uu.BooleanNode)())}),{default:()=>({icon:{item:"minecraft:stone"},title:"",description:""})})),parent:(0,uu.Opt)(n({validator:"resource",params:{pool:"$advancement"}})),criteria:(0,uu.MapNode)(n(),i("advancement_criteria")),requirements:(0,uu.Opt)((0,uu.ListNode)((0,uu.ListNode)(n()))),rewards:(0,uu.Opt)((0,uu.ObjectNode)({function:(0,uu.Opt)(n({validator:"resource",params:{pool:"$function"}})),loot:(0,uu.Opt)((0,uu.ListNode)(n({validator:"resource",params:{pool:"$loot_table"}}))),recipes:(0,uu.Opt)((0,uu.ListNode)(n({validator:"resource",params:{pool:"$recipe"}}))),experience:(0,uu.Opt)((0,uu.NumberNode)({integer:!0}))}))},{context:"advancement"}),{default:()=>({criteria:{requirement:{trigger:"minecraft:location"}}})})),e.register("advancement_criteria",(0,uu.ObjectNode)({trigger:n({validator:"resource",params:{pool:t.get("advancement_trigger")}}),conditions:(0,uu.Opt)((0,uu.ObjectNode)({player:(0,uu.Mod)(r,{enabled:e=>"minecraft:impossible"!==e.pop().push("trigger").get()}),[uu.Switch]:["pop",{push:"trigger"}],[uu.Case]:{"minecraft:allay_drop_item_on_block":{item:(0,uu.Opt)(i("item_predicate")),location:(0,uu.Opt)(i("location_predicate"))},"minecraft:bee_nest_destroyed":{block:(0,uu.Opt)(n({validator:"resource",params:{pool:"block"}})),num_bees_inside:(0,uu.Opt)((0,uu.NumberNode)({integer:!0})),item:(0,uu.Opt)(i("item_predicate"))},"minecraft:bred_animals":{parent:r,partner:r,child:r},"minecraft:brewed_potion":{potion:(0,uu.Opt)(n({validator:"resource",params:{pool:"potion"}}))},"minecraft:changed_dimension":{from:(0,uu.Opt)(n({validator:"resource",params:{pool:"$dimension"}})),to:(0,uu.Opt)(n({validator:"resource",params:{pool:"$dimension"}}))},"minecraft:channeled_lightning":{victims:(0,uu.Opt)((0,uu.ListNode)(r))},"minecraft:construct_beacon":{level:i("int_bounds")},"minecraft:consume_item":{item:(0,uu.Opt)(i("item_predicate"))},"minecraft:cured_zombie_villager":{villager:r,zombie:r},"minecraft:effects_changed":{effects:(0,uu.Opt)((0,uu.MapNode)(n({validator:"resource",params:{pool:"mob_effect"}}),(0,uu.ObjectNode)({amplifier:i("int_bounds"),duration:i("int_bounds")}))),source:(0,uu.Opt)(r)},"minecraft:enter_block":{block:(0,uu.Opt)(n({validator:"resource",params:{pool:"block"}})),state:(0,uu.Opt)((0,uu.MapNode)(n(),n(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}}))},"minecraft:enchanted_item":{levels:i("int_bounds"),item:(0,uu.Opt)(i("item_predicate"))},"minecraft:entity_hurt_player":{damage:(0,uu.Opt)(i("damage_predicate"))},"minecraft:entity_killed_player":{entity:r,killing_blow:(0,uu.Opt)(i("damage_source_predicate"))},"minecraft:fall_from_height":{start_position:(0,uu.Opt)(i("location_predicate")),distance:(0,uu.Opt)(i("distance_predicate"))},"minecraft:filled_bucket":{item:(0,uu.Opt)(i("item_predicate"))},"minecraft:fishing_rod_hooked":{entity:r,item:(0,uu.Opt)(i("item_predicate"))},"minecraft:inventory_changed":{slots:(0,uu.Opt)((0,uu.ObjectNode)({empty:i("int_bounds"),occupied:i("int_bounds"),full:i("int_bounds")})),items:(0,uu.Opt)((0,uu.ListNode)(i("item_predicate")))},"minecraft:item_durability_changed":{delta:i("int_bounds"),durability:i("int_bounds"),item:(0,uu.Opt)(i("item_predicate"))},"minecraft:item_used_on_block":{item:(0,uu.Opt)(i("item_predicate")),location:(0,uu.Opt)(i("location_predicate"))},"minecraft:kill_mob_near_sculk_catalyst":{entity:r,killing_blow:(0,uu.Opt)(i("damage_source_predicate"))},"minecraft:killed_by_crossbow":{unique_entity_types:i("int_bounds"),victims:(0,uu.Opt)((0,uu.ListNode)(r))},"minecraft:levitation":{distance:(0,uu.Opt)(i("distance_predicate")),duration:i("int_bounds")},"minecraft:lightning_strike":{lightning:r,bystander:r},"minecraft:nether_travel":{start_position:(0,uu.Opt)(i("location_predicate")),distance:(0,uu.Opt)(i("distance_predicate"))},"minecraft:placed_block":{block:(0,uu.Opt)(n({validator:"resource",params:{pool:"block"}})),state:(0,uu.Opt)((0,uu.MapNode)(n(),n(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}})),item:(0,uu.Opt)(i("item_predicate")),location:(0,uu.Opt)(i("location_predicate"))},"minecraft:player_generates_container_loot":{loot_table:n({validator:"resource",params:{pool:"$loot_table"}})},"minecraft:player_hurt_entity":{damage:(0,uu.Opt)(i("damage_predicate")),entity:r},"minecraft:player_interacted_with_entity":{item:(0,uu.Opt)(i("item_predicate")),entity:r},"minecraft:player_killed_entity":{entity:r,killing_blow:(0,uu.Opt)(i("damage_source_predicate"))},"minecraft:recipe_unlocked":{recipe:n({validator:"resource",params:{pool:"$recipe"}})},"minecraft:ride_entity_in_lava":{start_position:(0,uu.Opt)(i("location_predicate")),distance:(0,uu.Opt)(i("distance_predicate"))},"minecraft:slide_down_block":{block:(0,uu.Opt)(n({validator:"resource",params:{pool:"block"}}))},"minecraft:shot_crossbow":{item:(0,uu.Opt)(i("item_predicate"))},"minecraft:summoned_entity":{entity:r},"minecraft:tame_animal":{entity:r},"minecraft:target_hit":{projectile:r,shooter:r,signal_strength:i("int_bounds")},"minecraft:thrown_item_picked_up_by_entity":{entity:(0,uu.Opt)(i("entity_predicate")),item:(0,uu.Opt)(i("item_predicate"))},"minecraft:used_ender_eye":{distance:(0,uu.Opt)(i("float_bounds"))},"minecraft:used_totem":{item:(0,uu.Opt)(i("item_predicate"))},"minecraft:using_item":{item:(0,uu.Opt)(i("item_predicate"))},"minecraft:villager_trade":{villager:(0,uu.Opt)(i("entity_predicate")),item:(0,uu.Opt)(i("item_predicate"))}}},{context:"criterion"}))},{category:"predicate",context:"criterion"}))};var du={},hu={};Object.defineProperty(hu,"__esModule",{value:!0}),hu.initModelSchemas=void 0;const pu=Pe;hu.initModelSchemas=function(e,t){pu.Reference.bind(void 0,e);const i=pu.StringNode.bind(void 0,t),n=(e,t,i)=>(0,pu.ListNode)((0,pu.NumberNode)({min:t,max:i}),{minLength:e,maxLength:e}),r=(0,pu.ChoiceNode)([{type:"alias",match:e=>"string"==typeof e&&e.startsWith("#"),node:i(),change:e=>"string"==typeof e?`#${e}`:"#0"},{type:"reference",match:e=>"string"==typeof e,node:i({validator:"resource",params:{pool:"$texture"}}),change:e=>"string"==typeof e?e.replace(/^#/,""):""}],{choiceContext:"texture"});e.register("model",(0,pu.Mod)((0,pu.ObjectNode)({parent:(0,pu.Opt)(i({validator:"resource",params:{pool:"$model"}})),ambientocclusion:(0,pu.Opt)((0,pu.BooleanNode)()),gui_light:(0,pu.Opt)(i({enum:"gui_light"})),textures:(0,pu.Opt)((0,pu.MapNode)(i(),r)),elements:(0,pu.Opt)((0,pu.ListNode)((0,pu.ObjectNode)({from:n(3,-16,32),to:n(3,-16,32),rotation:(0,pu.Opt)((0,pu.ObjectNode)({origin:n(3),axis:i({enum:"axis"}),angle:(0,pu.NumberEnum)({values:[-45,-22.5,0,22.5,45]}),rescale:(0,pu.Opt)((0,pu.BooleanNode)())})),shade:(0,pu.Opt)((0,pu.BooleanNode)()),faces:(0,pu.MapNode)(i({enum:"direction"}),(0,pu.ObjectNode)({texture:r,uv:(0,pu.Opt)(n(4)),cullface:(0,pu.Opt)(i({enum:"direction"})),rotation:(0,pu.Opt)((0,pu.NumberNode)({integer:!0})),tintindex:(0,pu.Opt)((0,pu.NumberNode)({integer:!0}))}))},{context:"model_element"}))),display:(0,pu.Opt)((0,pu.MapNode)(i({enum:"display_position"}),(0,pu.ObjectNode)({rotation:n(3),translation:n(3,-80,80),scale:n(3,-4,4)},{context:"item_transform"}))),overrides:(0,pu.Opt)((0,pu.ListNode)((0,pu.ObjectNode)({predicate:(0,pu.MapNode)(i({enum:"item_model_predicates"}),(0,pu.NumberNode)()),model:i({validator:"resource",params:{pool:"$model"}})},{context:"model_override"})))},{context:"model"}),{default:()=>({parent:"minecraft:item/generated",textures:{layer0:"minecraft:item/diamond"}})}))};var mu={};Object.defineProperty(mu,"__esModule",{value:!0}),mu.initBlockDefinitionSchemas=void 0;const fu=Pe;mu.initBlockDefinitionSchemas=function(e,t){const i=fu.Reference.bind(void 0,e),n=fu.StringNode.bind(void 0,t);e.register("block_definition",(0,fu.Mod)((0,fu.ChoiceNode)([{type:"variants",match:e=>void 0!==e.variants,node:(0,fu.ObjectNode)({variants:(0,fu.MapNode)(n(),i("model_variant"))}),change:e=>({variants:{"":{}}})},{type:"multipart",match:e=>void 0!==e.multipart,node:(0,fu.ObjectNode)({multipart:(0,fu.ListNode)((0,fu.ObjectNode)({when:(0,fu.Opt)(i("multipart_condition")),apply:i("model_variant")}))}),change:e=>({multipart:{when:{},apply:{}}})}],{context:"block_definition"}),{default:()=>({variants:{"":{model:"minecraft:block/stone"}}})}));const r={model:n({validator:"resource",params:{pool:"$model"}}),x:(0,fu.Opt)((0,fu.NumberEnum)({integer:!0,values:[0,90,180,270]})),y:(0,fu.Opt)((0,fu.NumberEnum)({integer:!0,values:[0,90,180,270]})),uvlock:(0,fu.Opt)((0,fu.BooleanNode)())};e.register("model_variant",(0,fu.ChoiceNode)([{type:"object",node:(0,fu.ObjectNode)(r),change:e=>Array.isArray(e)&&e.length>0?e[0]:{}},{type:"list",node:(0,fu.ListNode)((0,fu.ObjectNode)(c(s({},r),{weight:(0,fu.Opt)((0,fu.NumberNode)({integer:!0,min:1}))}),{context:"model_variant"})),change:e=>[s({weight:1},e)]}],{context:"model_variant"})),e.register("multipart_condition",(0,fu.ChoiceNode)([{type:"object",priority:-1,match:()=>!0,node:(0,fu.MapNode)(n(),n()),change:e=>"object"==typeof e&&Array.isArray(null==e?void 0:e.OR)&&e.OR.length>0?e.OR[0]:{}},{type:"or",match:e=>"object"==typeof e&&void 0!==(null==e?void 0:e.OR),node:(0,fu.ObjectNode)({OR:(0,fu.ListNode)(i("multipart_condition"))}),change:e=>({OR:[null!=e?e:{}]})}],{context:"multipart_condition"}))},Object.defineProperty(du,"__esModule",{value:!0}),du.initAssetsSchemas=void 0;const gu=hu,_u=mu;du.initAssetsSchemas=function(e,t){(0,_u.initBlockDefinitionSchemas)(e,t),(0,gu.initModelSchemas)(e,t)};var bu={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.initCommonSchemas=e.Tag=e.InclusiveRange=e.IntProvider=e.FloatProvider=e.NoiseSettingsPresets=e.DefaultNoiseSettings=e.DimensionTypePresets=e.DefaultDimensionType=e.FunctionCases=e.ConditionCases=void 0;const t=Pe;e.DefaultDimensionType={ultrawarm:!1,natural:!0,piglin_safe:!1,respawn_anchor_works:!1,bed_works:!0,has_raids:!0,has_skylight:!0,has_ceiling:!1,coordinate_scale:1,ambient_light:0,logical_height:256,infiniburn:"#minecraft:infiniburn_overworld",min_y:0,height:256},e.DefaultNoiseSettings={sea_level:63,ore_veins_enabled:!0,disable_mob_generation:!1,aquifers_enabled:!0,legacy_random_source:!1,default_block:{Name:"minecraft:stone"},default_fluid:{Properties:{level:"0"},Name:"minecraft:water"},noise:{min_y:-64,height:384,size_horizontal:1,size_vertical:2,top_slide:{target:-.078125,size:2,offset:8},bottom_slide:{target:.1171875,size:3,offset:0},sampling:{xz_scale:.9999999814507745,y_scale:.9999999814507745,xz_factor:80,y_factor:160},terrain_shaper:{offset:0,factor:0,jaggedness:0}},noise_router:{barrier:0,fluid_level_floodedness:0,fluid_level_spread:0,lava:0,temperature:0,vegetation:0,continents:0,erosion:0,depth:0,ridges:0,initial_density_without_jaggedness:0,final_density:{type:"minecraft:interpolated",argument:"minecraft:overworld/base_3d_noise"},vein_toggle:0,vein_ridged:0,vein_gap:0},surface_rule:{type:"minecraft:sequence",sequence:[]}},e.initCommonSchemas=function(i,n){const r=t.StringNode.bind(void 0,n),o=t.Reference.bind(void 0,i);i.register("block_state",(0,t.Mod)((0,t.ObjectNode)({Name:r({validator:"resource",params:{pool:"block"}}),Properties:(0,t.Opt)((0,t.MapNode)(r(),r(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"Name"}]}}}))},{context:"block_state"}),{default:()=>({Name:"minecraft:stone"})})),i.register("fluid_state",(0,t.Mod)((0,t.ObjectNode)({Name:r({validator:"resource",params:{pool:"fluid"}}),Properties:(0,t.Opt)((0,t.MapNode)(r(),r()))},{context:"fluid_state"}),{default:()=>({Name:"minecraft:water",Properties:{level:"0"}})})),i.register("block_pos",(0,t.Mod)((0,t.ListNode)((0,t.NumberNode)({integer:!0}),{minLength:3,maxLength:3}),{default:()=>[0,0,0]}));const a=e=>(0,t.Opt)((0,t.ChoiceNode)([{type:"number",node:(0,t.NumberNode)({integer:e}),change:e=>{var t,i;return void 0===e?0:null!==(i=null!==(t=e.min)&&void 0!==t?t:e.max)&&void 0!==i?i:0}},{type:"object",node:(0,t.ObjectNode)({min:(0,t.Opt)((0,t.NumberNode)({integer:e})),max:(0,t.Opt)((0,t.NumberNode)({integer:e}))},{context:"range"}),change:e=>({min:null!=e?e:0,max:null!=e?e:0})}]));i.register("int_bounds",a(!0)),i.register("float_bounds",a()),i.register("int_range",(0,t.ChoiceNode)([{type:"object",node:(0,t.ObjectNode)({min:(0,t.Opt)(o("number_provider")),max:(0,t.Opt)(o("number_provider"))})},{type:"number",node:(0,t.NumberNode)({integer:!0})}],{context:"range"}));const c=(e,i,n,o,a,c,l)=>{let u={};a&&Object.keys(l[a]).forEach((e=>{u[e]=(0,t.Mod)(l[a][e],{enabled:e=>void 0===e.push("type").get()})}));const d=(0,t.ObjectNode)(s({type:(0,t.Mod)((0,t.Opt)(r({validator:"resource",params:{pool:e}})),{hidden:()=>!0}),[t.Switch]:[{push:"type"}],[t.Case]:l},u),{context:c,disableSwitchContext:!0}),h=[{type:i,node:l[o][n]}];return a&&h.push({type:"object",priority:-1,node:d}),Object.keys(l).forEach((e=>{h.push({type:e,match:t=>{var i;if("minecraft:"+(null===(i=null==t?void 0:t.type)||void 0===i?void 0:i.replace(/^minecraft:/,""))===e)return!0;const n=t?Object.keys(t):[];return"object"==typeof t&&(0===(null==n?void 0:n.length)||1===(null==n?void 0:n.length)&&"type"===(null==n?void 0:n[0]))},node:d,change:t=>({type:e})})})),(0,t.ChoiceNode)(h,{context:c,choiceContext:`${c}.type`})};i.register("number_provider",c("loot_number_provider_type","number","value","minecraft:constant","minecraft:uniform","number_provider",{"minecraft:constant":{value:(0,t.NumberNode)()},"minecraft:uniform":{min:o("number_provider"),max:o("number_provider")},"minecraft:binomial":{n:o("number_provider"),p:o("number_provider")},"minecraft:score":{target:o("scoreboard_name_provider"),score:r({validator:"objective"}),scale:(0,t.Opt)((0,t.NumberNode)())}})),i.register("scoreboard_name_provider",c("loot_score_provider_type","string","target","minecraft:context",null,"score_provider",{"minecraft:fixed":{name:r({validator:"entity",params:{amount:"multiple",type:"entities",isScoreHolder:!0}})},"minecraft:context":{target:(0,t.Mod)(r({enum:"entity_source"}),{default:()=>"this"})}})),i.register("nbt_provider",c("loot_nbt_provider_type","string","target","minecraft:context",null,"nbt_provider",{"minecraft:storage":{source:r({validator:"resource",params:{pool:"$storage"}})},"minecraft:context":{target:(0,t.Mod)(r({enum:"copy_source"}),{default:()=>"this"})}})),e.FloatProvider=e=>c("float_provider_type","number","value","minecraft:constant",null,"float_provider",{"minecraft:constant":{value:(0,t.NumberNode)(e)},"minecraft:uniform":{value:(0,t.ObjectNode)({min_inclusive:(0,t.NumberNode)(e),max_exclusive:(0,t.NumberNode)(e)})},"minecraft:clamped_normal":{value:(0,t.ObjectNode)({min:(0,t.NumberNode)(),max:(0,t.NumberNode)(),mean:(0,t.NumberNode)(),deviation:(0,t.NumberNode)()})},"minecraft:trapezoid":{value:(0,t.ObjectNode)({min:(0,t.NumberNode)(),max:(0,t.NumberNode)(),plateau:(0,t.NumberNode)()})}}),i.register("float_provider",(0,e.FloatProvider)()),e.IntProvider=e=>c("int_provider_type","number","value","minecraft:constant",null,"int_provider",{"minecraft:constant":{value:(0,t.NumberNode)(s({integer:!0},e))},"minecraft:uniform":{value:(0,t.ObjectNode)({min_inclusive:(0,t.NumberNode)(s({integer:!0},e)),max_inclusive:(0,t.NumberNode)(s({integer:!0},e))})},"minecraft:biased_to_bottom":{value:(0,t.ObjectNode)({min_inclusive:(0,t.NumberNode)(s({integer:!0},e)),max_inclusive:(0,t.NumberNode)(s({integer:!0},e))})},"minecraft:clamped":{value:(0,t.ObjectNode)({min_inclusive:(0,t.NumberNode)(s({integer:!0},e)),max_inclusive:(0,t.NumberNode)(s({integer:!0},e)),source:o("int_provider")})},"minecraft:clamped_normal":{value:(0,t.ObjectNode)({min_inclusive:(0,t.NumberNode)(s({integer:!0},e)),max_inclusive:(0,t.NumberNode)(s({integer:!0},e)),mean:(0,t.NumberNode)(),deviation:(0,t.NumberNode)()})},"minecraft:weighted_list":{distribution:(0,t.ListNode)((0,t.ObjectNode)({weight:(0,t.NumberNode)({integer:!0}),data:o("int_provider")}))}}),i.register("int_provider",(0,e.IntProvider)()),i.register("vertical_anchor",(0,t.ChoiceNode)(["absolute","above_bottom","below_top"].map((e=>({type:e,match:t=>void 0!==(null==t?void 0:t[e]),change:t=>{var i,n,r;return{[e]:null!==(r=null!==(n=null!==(i=t.absolute)&&void 0!==i?i:t.above_bottom)&&void 0!==n?n:t.below_top)&&void 0!==r?r:0}},node:(0,t.ObjectNode)({[e]:(0,t.NumberNode)({integer:!0,min:-2048,max:2047})})}))),{context:"vertical_anchor"})),i.register("height_provider",c("height_provider_type","number","value","minecraft:constant",null,"height_provider",{"minecraft:constant":{value:o("vertical_anchor")},"minecraft:uniform":{min_inclusive:o("vertical_anchor"),max_inclusive:o("vertical_anchor")},"minecraft:biased_to_bottom":{min_inclusive:o("vertical_anchor"),max_inclusive:o("vertical_anchor"),inner:(0,t.Opt)((0,t.NumberNode)({integer:!0,min:1}))},"minecraft:very_biased_to_bottom":{min_inclusive:o("vertical_anchor"),max_inclusive:o("vertical_anchor"),inner:(0,t.Opt)((0,t.NumberNode)({integer:!0,min:1}))},"minecraft:trapezoid":{min_inclusive:o("vertical_anchor"),max_inclusive:o("vertical_anchor"),plateau:(0,t.Opt)((0,t.NumberNode)({integer:!0}))},"minecraft:weighted_list":{distribution:(0,t.ListNode)((0,t.ObjectNode)({weight:(0,t.NumberNode)({integer:!0}),data:o("int_provider")}))}})),e.InclusiveRange=e=>(0,t.ObjectNode)({min_inclusive:(0,t.NumberNode)(e),max_inclusive:(0,t.NumberNode)(e)},{context:"range"}),i.register("noise_parameters",(0,t.Mod)((0,t.ObjectNode)({firstOctave:(0,t.NumberNode)({integer:!0}),amplitudes:(0,t.ListNode)((0,t.NumberNode)())},{context:"noise_parameters"}),{default:()=>({firstOctave:-7,amplitudes:[1,1]})})),e.Tag=e=>(0,t.ChoiceNode)([{type:"string",node:r({validator:"resource",params:{pool:e.resource,allowTag:!0}}),change:e=>{if(Array.isArray(e)&&"string"==typeof e[0]&&!e[0].startsWith("#"))return e[0]}},{type:"list",node:(0,t.ListNode)(e.inlineSchema?(0,t.ChoiceNode)([{type:"string",node:r({validator:"resource",params:{pool:e.resource}})},{type:"object",node:o(e.inlineSchema)}],{choiceContext:"tag.list"}):r({validator:"resource",params:{pool:e.resource}})),change:e=>"string"!=typeof e||e.startsWith("#")?[]:[e]}],{choiceContext:"tag"}),e.ConditionCases=(e=r({enum:"entity_source"}))=>({"minecraft:alternative":{terms:(0,t.ListNode)(o("condition"))},"minecraft:block_state_property":{block:r({validator:"resource",params:{pool:"block"}}),properties:(0,t.MapNode)(r(),r(),{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}})},"minecraft:damage_source_properties":{predicate:o("damage_source_predicate")},"minecraft:entity_properties":{entity:e,predicate:o("entity_predicate")},"minecraft:entity_scores":{entity:e,scores:(0,t.MapNode)(r({validator:"objective"}),o("int_range"))},"minecraft:inverted":{term:o("condition")},"minecraft:killed_by_player":{inverse:(0,t.Opt)((0,t.BooleanNode)())},"minecraft:location_check":{offsetX:(0,t.Opt)((0,t.NumberNode)({integer:!0})),offsetY:(0,t.Opt)((0,t.NumberNode)({integer:!0})),offsetZ:(0,t.Opt)((0,t.NumberNode)({integer:!0})),predicate:o("location_predicate")},"minecraft:match_tool":{predicate:o("item_predicate")},"minecraft:random_chance":{chance:(0,t.NumberNode)({min:0,max:1})},"minecraft:random_chance_with_looting":{chance:(0,t.NumberNode)({min:0,max:1}),looting_multiplier:(0,t.NumberNode)()},"minecraft:reference":{name:r({validator:"resource",params:{pool:"$predicate"}})},"minecraft:table_bonus":{enchantment:r({validator:"resource",params:{pool:"enchantment"}}),chances:(0,t.ListNode)((0,t.NumberNode)({min:0,max:1}))},"minecraft:time_check":{value:o("int_range"),period:(0,t.Opt)((0,t.NumberNode)({integer:!0}))},"minecraft:value_check":{value:o("number_provider"),range:o("int_range")},"minecraft:weather_check":{raining:(0,t.Opt)((0,t.BooleanNode)()),thundering:(0,t.Opt)((0,t.BooleanNode)())}}),e.FunctionCases=(i,a=r({enum:"copy_source"}),c=r({enum:"entity_source"}))=>{const l={"minecraft:apply_bonus":{enchantment:r({validator:"resource",params:{pool:"enchantment"}}),formula:r({validator:"resource",params:{pool:n.get("loot_table_apply_bonus_formula")}}),parameters:(0,t.Mod)((0,t.ObjectNode)({bonusMultiplier:(0,t.Mod)((0,t.NumberNode)(),{enabled:e=>"minecraft:uniform_bonus_count"===e.pop().push("formula").get()}),extra:(0,t.Mod)((0,t.NumberNode)(),{enabled:e=>"minecraft:binomial_with_bonus_count"===e.pop().push("formula").get()}),probability:(0,t.Mod)((0,t.NumberNode)(),{enabled:e=>"minecraft:binomial_with_bonus_count"===e.pop().push("formula").get()})}),{enabled:e=>"minecraft:ore_drops"!==e.push("formula").get()})},"minecraft:copy_name":{source:a},"minecraft:copy_nbt":{source:o("nbt_provider"),ops:(0,t.ListNode)((0,t.ObjectNode)({source:r({validator:"nbt_path",params:{category:{getter:"copy_source",path:["pop","pop","pop",{push:"source"}]}}}),target:r({validator:"nbt_path",params:{category:"minecraft:item"}}),op:r({enum:["replace","append","merge"]})},{context:"nbt_operation"}))},"minecraft:copy_state":{block:r({validator:"resource",params:{pool:"block"}}),properties:(0,t.ListNode)(r({validator:"block_state_key",params:{id:["pop","pop",{push:"block"}]}}))},"minecraft:enchant_randomly":{enchantments:(0,t.Opt)((0,t.ListNode)(r({validator:"resource",params:{pool:"enchantment"}})))},"minecraft:enchant_with_levels":{levels:o("number_provider"),treasure:(0,t.Opt)((0,t.BooleanNode)())},"minecraft:exploration_map":{destination:(0,t.Opt)((0,e.Tag)({resource:"$worldgen/structure"})),decoration:(0,t.Opt)(r({enum:"map_decoration"})),zoom:(0,t.Opt)((0,t.NumberNode)({integer:!0})),search_radius:(0,t.Opt)((0,t.NumberNode)({integer:!0})),skip_existing_chunks:(0,t.Opt)((0,t.BooleanNode)())},"minecraft:fill_player_head":{entity:c},"minecraft:limit_count":{limit:o("int_range")},"minecraft:looting_enchant":{count:o("number_provider"),limit:(0,t.Opt)((0,t.NumberNode)({integer:!0}))},"minecraft:set_attributes":{modifiers:(0,t.ListNode)(o("attribute_modifier"))},"minecraft:set_banner_pattern":{patterns:(0,t.ListNode)((0,t.ObjectNode)({pattern:r({enum:"banner_pattern"}),color:r({enum:"dye_color"})})),append:(0,t.Opt)((0,t.BooleanNode)())},"minecraft:set_contents":{type:r({validator:"resource",params:{pool:"block_entity_type"}}),entries:(0,t.ListNode)(o("loot_entry"))},"minecraft:set_count":{count:o("number_provider"),add:(0,t.Opt)((0,t.BooleanNode)())},"minecraft:set_damage":{damage:o("number_provider"),add:(0,t.Opt)((0,t.BooleanNode)())},"minecraft:set_enchantments":{enchantments:(0,t.MapNode)(r({validator:"resource",params:{pool:"enchantment"}}),o("number_provider")),add:(0,t.Opt)((0,t.BooleanNode)())},"minecraft:set_loot_table":{type:r({validator:"resource",params:{pool:"block_entity_type"}}),name:r({validator:"resource",params:{pool:"$loot_table"}}),seed:(0,t.Opt)((0,t.NumberNode)({integer:!0}))},"minecraft:set_lore":{entity:(0,t.Opt)(c),lore:(0,t.ListNode)(o("text_component")),replace:(0,t.Opt)((0,t.BooleanNode)())},"minecraft:set_name":{entity:(0,t.Opt)(c),name:(0,t.Opt)(o("text_component"))},"minecraft:set_nbt":{tag:r({validator:"nbt",params:{registry:{category:"minecraft:item"}}})},"minecraft:set_potion":{id:r({validator:"resource",params:{pool:"potion"}})},"minecraft:set_stew_effect":{effects:(0,t.Opt)((0,t.ListNode)((0,t.ObjectNode)({type:r({validator:"resource",params:{pool:"mob_effect"}}),duration:o("number_provider")})))}},u={};return n.get("loot_function_type").forEach((e=>{u[e]=s(s({},l[e]),i)})),u},e.DimensionTypePresets=i=>(0,t.ObjectOrPreset)(r({validator:"resource",params:{pool:"$dimension_type"}}),i,{"minecraft:overworld":e.DefaultDimensionType,"minecraft:the_nether":{name:"minecraft:the_nether",ultrawarm:!0,natural:!1,shrunk:!0,piglin_safe:!0,respawn_anchor_works:!0,bed_works:!1,has_raids:!1,has_skylight:!1,has_ceiling:!0,ambient_light:.1,fixed_time:18e3,logical_height:128,effects:"minecraft:the_nether",infiniburn:"#minecraft:infiniburn_nether",min_y:0,height:256},"minecraft:the_end":{name:"minecraft:the_end",ultrawarm:!1,natural:!1,shrunk:!1,piglin_safe:!1,respawn_anchor_works:!1,bed_works:!1,has_raids:!0,has_skylight:!1,has_ceiling:!1,ambient_light:0,fixed_time:6e3,logical_height:256,effects:"minecraft:the_end",infiniburn:"#minecraft:infiniburn_end",min_y:0,height:256}}),e.NoiseSettingsPresets=i=>(0,t.ObjectOrPreset)(r({validator:"resource",params:{pool:"$worldgen/noise_settings"}}),i,{"minecraft:overworld":e.DefaultNoiseSettings,"minecraft:nether":{sea_level:32,ore_veins_enabled:!1,disable_mob_generation:!1,aquifers_enabled:!1,legacy_random_source:!0,default_block:{Name:"minecraft:netherrack"},default_fluid:{Properties:{level:"0"},Name:"minecraft:lava"},noise:{min_y:0,height:128,size_horizontal:1,size_vertical:2,top_slide:{target:.9375,size:3,offset:0},bottom_slide:{target:2.5,size:4,offset:-1},sampling:{xz_scale:1,y_scale:3,xz_factor:80,y_factor:60},terrain_shaper:{offset:0,factor:0,jaggedness:0}},noise_router:{barrier:0,fluid_level_floodedness:0,fluid_level_spread:0,lava:0,temperature:0,vegetation:0,continents:0,erosion:0,depth:0,ridges:0,initial_density_without_jaggedness:0,final_density:{type:"minecraft:interpolated",argument:"minecraft:overworld/base_3d_noise"},vein_toggle:0,vein_ridged:0,vein_gap:0},surface_rule:{type:"minecraft:sequence",sequence:[]}},"minecraft:end":{sea_level:0,ore_veins_enabled:!1,disable_mob_generation:!1,aquifers_enabled:!1,legacy_random_source:!0,default_block:{Name:"minecraft:end_stone"},default_fluid:{Name:"minecraft:air"},noise:{min_y:0,height:128,size_horizontal:2,size_vertical:1,top_slide:{target:-23.4375,size:64,offset:-46},bottom_slide:{target:-.234375,size:7,offset:1},sampling:{xz_scale:2,y_scale:1,xz_factor:80,y_factor:160},terrain_shaper:{offset:0,factor:1,jaggedness:0}},noise_router:{barrier:0,fluid_level_floodedness:0,fluid_level_spread:0,lava:0,temperature:0,vegetation:0,continents:0,erosion:0,depth:0,ridges:0,initial_density_without_jaggedness:0,final_density:{type:"minecraft:interpolated",argument:"minecraft:overworld/base_3d_noise"},vein_toggle:0,vein_ridged:0,vein_gap:0},surface_rule:{type:"minecraft:sequence",sequence:[]}},"minecraft:amplified":{sea_level:63,ore_veins_enabled:!0,disable_mob_generation:!1,aquifers_enabled:!0,legacy_random_source:!1,default_block:{Name:"minecraft:stone"},default_fluid:{Properties:{level:"0"},Name:"minecraft:water"},noise:{min_y:-64,height:384,size_horizontal:1,size_vertical:2,top_slide:{target:-.078125,size:2,offset:8},bottom_slide:{target:.1171875,size:3,offset:0},sampling:{xz_scale:.9999999814507745,y_scale:.9999999814507745,xz_factor:80,y_factor:160},terrain_shaper:{offset:0,factor:0,jaggedness:0}},noise_router:{barrier:0,fluid_level_floodedness:0,fluid_level_spread:0,lava:0,temperature:0,vegetation:0,continents:0,erosion:0,depth:0,ridges:0,initial_density_without_jaggedness:0,final_density:{type:"minecraft:interpolated",argument:"minecraft:overworld/base_3d_noise"},vein_toggle:0,vein_ridged:0,vein_gap:0},surface_rule:{type:"minecraft:sequence",sequence:[]}},"minecraft:caves":{sea_level:32,ore_veins_enabled:!1,disable_mob_generation:!1,aquifers_enabled:!1,legacy_random_source:!0,default_block:{Name:"minecraft:stone"},default_fluid:{Properties:{level:"0"},Name:"minecraft:water"},noise:{min_y:0,height:128,size_horizontal:1,size_vertical:2,top_slide:{target:.9375,size:3,offset:0},bottom_slide:{target:2.5,size:4,offset:-1},sampling:{xz_scale:1,y_scale:3,xz_factor:80,y_factor:60},terrain_shaper:{offset:0,factor:0,jaggedness:0}},noise_router:{barrier:0,fluid_level_floodedness:0,fluid_level_spread:0,lava:0,temperature:0,vegetation:0,continents:0,erosion:0,depth:0,ridges:0,initial_density_without_jaggedness:0,final_density:{type:"minecraft:interpolated",argument:"minecraft:overworld/base_3d_noise"},vein_toggle:0,vein_ridged:0,vein_gap:0},surface_rule:{type:"minecraft:sequence",sequence:[]}},"minecraft:floating_islands":{sea_level:0,ore_veins_enabled:!1,disable_mob_generation:!1,aquifers_enabled:!1,legacy_random_source:!0,default_block:{Name:"minecraft:stone"},default_fluid:{Properties:{level:"0"},Name:"minecraft:water"},noise:{min_y:0,height:128,size_horizontal:2,size_vertical:1,top_slide:{target:-23.4375,size:64,offset:-46},bottom_slide:{target:-.234375,size:7,offset:1},sampling:{xz_scale:2,y_scale:1,xz_factor:80,y_factor:160},terrain_shaper:{offset:0,factor:1,jaggedness:0}},noise_router:{barrier:0,fluid_level_floodedness:0,fluid_level_spread:0,lava:0,temperature:0,vegetation:0,continents:0,erosion:0,depth:0,ridges:0,initial_density_without_jaggedness:0,final_density:{type:"minecraft:interpolated",argument:"minecraft:overworld/base_3d_noise"},vein_toggle:0,vein_ridged:0,vein_gap:0},surface_rule:{type:"minecraft:sequence",sequence:[]}}})}}(bu);var vu={};Object.defineProperty(vu,"__esModule",{value:!0}),vu.initConditionSchemas=void 0;const yu=Pe,wu=bu;vu.initConditionSchemas=function(e,t){const i=yu.Reference.bind(void 0,e),n=yu.StringNode.bind(void 0,t);e.register("predicate",(0,yu.ObjectOrList)(i("condition"),{choiceContext:"condition"})),e.register("condition",(0,yu.Mod)((0,yu.ObjectNode)({condition:n({validator:"resource",params:{pool:"loot_condition_type"}}),[yu.Switch]:[{push:"condition"}],[yu.Case]:(0,wu.ConditionCases)()},{category:"predicate",context:"condition"}),{default:()=>({condition:"minecraft:entity_properties",entity:"this"})}))};var xu={};Object.defineProperty(xu,"__esModule",{value:!0}),xu.initDimensionSchemas=void 0;const Nu=Pe,ku=bu;xu.initDimensionSchemas=function(e,t){const i=Nu.Reference.bind(void 0,e),n=Nu.StringNode.bind(void 0,t);e.register("dimension",(0,Nu.Mod)((0,Nu.ObjectNode)({type:(0,ku.DimensionTypePresets)(i("dimension_type")),generator:(0,Nu.ObjectNode)({type:n({validator:"resource",params:{pool:"worldgen/chunk_generator"}}),[Nu.Switch]:[{push:"type"}],[Nu.Case]:{"minecraft:noise":{settings:(0,ku.NoiseSettingsPresets)(i("noise_settings")),biome_source:(0,Nu.ObjectNode)({type:n({validator:"resource",params:{pool:"worldgen/biome_source"}}),[Nu.Switch]:[{push:"type"}],[Nu.Case]:{"minecraft:fixed":{biome:n({validator:"resource",params:{pool:"$worldgen/biome"}})},"minecraft:multi_noise":{preset:(0,Nu.Opt)(n({validator:"resource",params:{pool:["minecraft:overworld","minecraft:nether"]}})),biomes:(0,Nu.Mod)((0,Nu.ListNode)(i("generator_biome")),{enabled:e=>void 0===e.push("preset").get(),default:()=>[{biome:"minecraft:plains"}]})},"minecraft:checkerboard":{scale:(0,Nu.Opt)((0,Nu.NumberNode)({integer:!0,min:0,max:62})),biomes:(0,ku.Tag)({resource:"$worldgen/biome"})}}},{category:"predicate",disableSwitchContext:!0})},"minecraft:flat":{settings:i("flat_generator_settings")}}},{disableSwitchContext:!0})},{category:"pool",context:"dimension"}),{default:()=>({type:"minecraft:overworld",generator:{type:"minecraft:noise",biome_source:{type:"minecraft:fixed",biome:"minecraft:plains"},settings:"minecraft:overworld"}})})),e.register("flat_generator_settings",(0,Nu.ObjectNode)({biome:(0,Nu.Opt)(n({validator:"resource",params:{pool:"$worldgen/biome"}})),lakes:(0,Nu.Opt)((0,Nu.BooleanNode)()),features:(0,Nu.Opt)((0,Nu.BooleanNode)()),layers:(0,Nu.ListNode)(i("generator_layer")),structure_overrides:(0,ku.Tag)({resource:"$worldgen/structure_set",inlineSchema:"structure_set"})}));const r=(0,Nu.ChoiceNode)([{type:"number",node:(0,Nu.NumberNode)({min:-2,max:2}),change:e=>{var t;return null!==(t=e[0])&&void 0!==t?t:0}},{type:"list",node:(0,Nu.ListNode)((0,Nu.NumberNode)({min:-2,max:2}),{minLength:2,maxLength:2}),change:e=>[null!=e?e:0,null!=e?e:0]}]);e.register("parameter_point",(0,Nu.ObjectNode)({temperature:r,humidity:r,continentalness:r,erosion:r,weirdness:r,depth:r,offset:(0,Nu.NumberNode)({min:0,max:1})})),e.register("generator_biome",(0,Nu.Mod)((0,Nu.ObjectNode)({biome:n({validator:"resource",params:{pool:"$worldgen/biome"}}),parameters:i("parameter_point")},{context:"generator_biome"}),{default:()=>({biome:"minecraft:plains",parameters:{temperature:0,humidity:0,continentalness:0,erosion:0,weirdness:0,depth:0,offset:0}})}))};var Au={};Object.defineProperty(Au,"__esModule",{value:!0}),Au.initDimensionTypeSchemas=void 0;const Cu=Pe,Ou=bu;Au.initDimensionTypeSchemas=function(e,t){const i=Cu.StringNode.bind(void 0,t);e.register("dimension_type",(0,Cu.Mod)((0,Cu.ObjectNode)({ultrawarm:(0,Cu.BooleanNode)(),natural:(0,Cu.BooleanNode)(),piglin_safe:(0,Cu.BooleanNode)(),respawn_anchor_works:(0,Cu.BooleanNode)(),bed_works:(0,Cu.BooleanNode)(),has_raids:(0,Cu.BooleanNode)(),has_skylight:(0,Cu.BooleanNode)(),has_ceiling:(0,Cu.BooleanNode)(),coordinate_scale:(0,Cu.NumberNode)({min:1e-5,max:3e7}),ambient_light:(0,Cu.NumberNode)(),fixed_time:(0,Cu.Opt)((0,Cu.NumberNode)({integer:!0})),logical_height:(0,Cu.NumberNode)({integer:!0,min:0,max:4064}),effects:(0,Cu.Opt)(i({enum:["minecraft:overworld","minecraft:the_nether","minecraft:the_end"]})),infiniburn:i({validator:"resource",params:{pool:"block",requireTag:!0}}),min_y:(0,Cu.NumberNode)({integer:!0,min:-2032,max:2031}),height:(0,Cu.NumberNode)({integer:!0,min:16,max:4064})},{context:"dimension_type"}),(e=>({default:()=>Ou.DefaultDimensionType,validate:(t,i,n,r)=>((null==(i=e.validate(t,i,n,r))?void 0:i.min_y)+(null==i?void 0:i.height)>2032&&n.add(t.push("height"),"error.min_y_plus_height",2032),(null==i?void 0:i.logical_height)>(null==i?void 0:i.height)&&n.add(t.push("logical_height"),"error.logical_height"),(null==i?void 0:i.height)%16!=0&&n.add(t.push("height"),"error.height_multiple",16),(null==i?void 0:i.min_y)%16!=0&&n.add(t.push("min_y"),"error.min_y_multiple",16),i)}))))};var Su={};Object.defineProperty(Su,"__esModule",{value:!0}),Su.initItemModifierSchemas=void 0;const Eu=Pe,Fu=bu;Su.initItemModifierSchemas=function(e,t){const i=Eu.Reference.bind(void 0,e),n=Eu.StringNode.bind(void 0,t);e.register("item_modifier",(0,Eu.ObjectOrList)(i("function"),{choiceContext:"function"}));const r={conditions:(0,Eu.Opt)((0,Eu.ListNode)(i("condition")))};e.register("function",(0,Eu.Mod)((0,Eu.ObjectNode)({function:n({validator:"resource",params:{pool:"loot_function_type"}}),[Eu.Switch]:[{push:"function"}],[Eu.Case]:(0,Fu.FunctionCases)(r)},{category:"function",context:"function"}),{default:()=>[{function:"minecraft:set_count",count:1}]}))};var Du={},Bu={};Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.LootFunctions=Bu.LootConditions=Bu.LootCopySources=Bu.LootEntitySources=Bu.LootTableTypes=void 0,Bu.LootTableTypes=new Map([["minecraft:advancement_entity",{requires:[7,8],allows:[]}],["minecraft:advancement_reward",{requires:[7,8],allows:[]}],["minecraft:barter",{requires:[8],allows:[]}],["minecraft:block",{requires:[1,7,9],allows:[0,4,8]}],["minecraft:chest",{requires:[7],allows:[8]}],["minecraft:command",{requires:[7],allows:[8]}],["minecraft:empty",{requires:[],allows:[]}],["minecraft:entity",{requires:[2,7,8],allows:[3,5,6]}],["minecraft:fishing",{requires:[7,9],allows:[8]}],["minecraft:generic",{requires:[2,0,1,3,4,5,6,7,8,9],allows:[]}],["minecraft:gift",{requires:[7,8],allows:[]}],["minecraft:selector",{requires:[7],allows:[8]}]]),Bu.LootEntitySources=new Map([["direct_killer",[3]],["killer",[5]],["killer_player",[5]],["this",[8]]]),Bu.LootCopySources=new Map([["block_entity",[0]],["killer",[5]],["killer_player",[5]],["this",[8]]]),Bu.LootConditions=new Map([["minecraft:alternative",[]],["minecraft:block_state_property",[1]],["minecraft:damage_source_properties",[2]],["minecraft:entity_properties",[7]],["minecraft:entity_scores",[]],["minecraft:inverted",[]],["minecraft:killed_by_player",[6]],["minecraft:location_check",[]],["minecraft:match_tool",[9]],["minecraft:random_chance",[]],["minecraft:random_chance_with_looting",[5]],["minecraft:reference",[]],["minecraft:survives_explosion",[4]],["minecraft:table_bonus",[9]],["minecraft:time_check",[]],["minecraft:weather_check",[]]]),Bu.LootFunctions=new Map([["minecraft:apply_bonus",[9]],["minecraft:copy_name",[]],["minecraft:copy_nbt",[]],["minecraft:copy_state",[1]],["minecraft:enchant_randomly",[]],["minecraft:enchant_with_levels",[]],["minecraft:exploration_map",[7]],["minecraft:explosion_decay",[]],["minecraft:fill_player_head",[]],["minecraft:furnace_smelt",[]],["minecraft:limit_count",[]],["minecraft:looting_enchant",[5]],["minecraft:set_attributes",[]],["minecraft:set_banner_pattern",[]],["minecraft:set_contents",[]],["minecraft:set_count",[]],["minecraft:set_damage",[]],["minecraft:set_loot_table",[]],["minecraft:set_lore",[]],["minecraft:set_name",[]],["minecraft:set_nbt",[]],["minecraft:set_stew_effect",[]]]),Object.defineProperty(Du,"__esModule",{value:!0}),Du.initLootTableSchemas=void 0;const Lu=Pe,Mu=Bu,Tu=bu;Du.initLootTableSchemas=function(e,t){const i=Lu.Reference.bind(void 0,e),n=Lu.StringNode.bind(void 0,t),r={conditions:(0,Lu.Opt)((0,Lu.ListNode)(i("loot_condition")))},o=s({functions:(0,Lu.Opt)((0,Lu.ListNode)(i("loot_function")))},r);function a(e,i,n){const r=[],o=n=>t.get(i).filter((t=>{var i;return(null!==(i=e.get(t))&&void 0!==i?i:[]).every((e=>n.includes(e)))}));for(const[t,{allows:a,requires:s}]of Mu.LootTableTypes){const e=[...a,...s];r.push({match:e=>e.getModel().get(new Lu.Path(["type"]))===t,node:n(o(e))})}return r.push({match:e=>!0,node:n(i)}),(0,Lu.SwitchNode)(r)}const c=a(Mu.LootConditions,"loot_condition_type",(e=>n({validator:"resource",params:{pool:e instanceof Array?e:"loot_condition_type"}}))),l=a(Mu.LootFunctions,"loot_function_type",(e=>n({validator:"resource",params:{pool:e instanceof Array?e:"loot_function_type"}}))),u=a(Mu.LootEntitySources,"entity_source",(e=>n({enum:e}))),d=a(Mu.LootCopySources,"copy_source",(e=>n({enum:e})));e.register("loot_table",(0,Lu.Mod)((0,Lu.ObjectNode)({type:(0,Lu.Opt)(n({validator:"resource",params:{pool:t.get("loot_context_type")}})),pools:(0,Lu.Opt)((0,Lu.ListNode)((0,Lu.Mod)((0,Lu.ObjectNode)(s({rolls:i("number_provider"),bonus_rolls:(0,Lu.Opt)(i("number_provider")),entries:(0,Lu.ListNode)(i("loot_entry"))},o),{category:"pool",context:"loot_pool"}),{default:()=>({rolls:1,entries:[{type:"minecraft:item",name:"minecraft:stone"}]})}))),functions:(0,Lu.Opt)((0,Lu.ListNode)(i("loot_function")))},{context:"loot_table"}),{default:()=>({pools:[{rolls:1,entries:[{type:"minecraft:item",name:"minecraft:stone"}]}]})}));const h={enabled:e=>{var t;return(null===(t=e.pop().get())||void 0===t?void 0:t.length)>1&&!["minecraft:alternatives","minecraft:group","minecraft:sequence"].includes(e.push("type").get())}};e.register("loot_entry",(0,Lu.Mod)((0,Lu.ObjectNode)({type:n({validator:"resource",params:{pool:"loot_pool_entry_type"}}),weight:(0,Lu.Opt)((0,Lu.Mod)((0,Lu.NumberNode)({integer:!0,min:1}),h)),quality:(0,Lu.Opt)((0,Lu.Mod)((0,Lu.NumberNode)({integer:!0}),h)),[Lu.Switch]:[{push:"type"}],[Lu.Case]:{"minecraft:alternatives":s({children:(0,Lu.ListNode)(i("loot_entry"))},o),"minecraft:dynamic":s({name:n()},o),"minecraft:group":s({children:(0,Lu.ListNode)(i("loot_entry"))},o),"minecraft:item":s({name:n({validator:"resource",params:{pool:"item"}})},o),"minecraft:loot_table":s({name:n({validator:"resource",params:{pool:"$loot_table"}})},o),"minecraft:sequence":s({children:(0,Lu.ListNode)(i("loot_entry"))},o),"minecraft:tag":s({name:n({validator:"resource",params:{pool:"$tag/item"}}),expand:(0,Lu.Opt)((0,Lu.BooleanNode)())},o)}},{context:"loot_entry"}),{default:()=>({type:"minecraft:item",name:"minecraft:stone"})})),e.register("loot_function",(0,Lu.Mod)((0,Lu.ObjectNode)({function:l,[Lu.Switch]:[{push:"function"}],[Lu.Case]:(0,Tu.FunctionCases)(r,d,u)},{category:"function",context:"function"}),{default:()=>({function:"minecraft:set_count",count:1})})),e.register("loot_condition",(0,Lu.Mod)((0,Lu.ObjectNode)({condition:c,[Lu.Switch]:[{push:"condition"}],[Lu.Case]:(0,Tu.ConditionCases)(u)},{category:"predicate",context:"condition"}),{default:()=>({condition:"minecraft:random_chance",chance:.5})})),e.register("attribute_modifier",(0,Lu.Mod)((0,Lu.ObjectNode)({attribute:n({validator:"resource",params:{pool:"attribute"}}),name:n(),amount:i("number_provider"),operation:n({enum:["addition","multiply_base","multiply_total"]}),slot:(0,Lu.StringOrList)(n({enum:"slot"}))},{context:"attribute_modifier"}),{default:()=>({attribute:"minecraft:generic.max_health",name:"",amount:1,operation:"addition",slot:"mainhand"})}))};var Ru={};Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.initPackMcmetaSchemas=void 0;const $u=Pe;Ru.initPackMcmetaSchemas=function(e,t){const i=$u.Reference.bind(void 0,e),n=$u.StringNode.bind(void 0,t);e.register("pack_mcmeta",(0,$u.Mod)((0,$u.ObjectNode)({pack:(0,$u.Mod)((0,$u.ObjectNode)({pack_format:(0,$u.Mod)((0,$u.NumberNode)({integer:!0,min:10,max:10}),{default:()=>10,canUpdate:(e,t)=>10!==t,update:()=>[{name:"pack_format",params:[10],newValue:10}]}),description:i("text_component")}),{default:()=>({pack_format:10,description:""})}),filter:(0,$u.ObjectNode)({block:(0,$u.ListNode)((0,$u.ObjectNode)({namespace:n({validator:"regex_pattern"}),path:n({validator:"regex_pattern"})}))})}),{default:()=>({pack:{pack_format:10,description:""}})}))};var ju={};Object.defineProperty(ju,"__esModule",{value:!0}),ju.initPredicatesSchemas=void 0;const Iu=Pe;ju.initPredicatesSchemas=function(e,t){const i=Iu.Reference.bind(void 0,e),n=Iu.StringNode.bind(void 0,t),r=(0,Iu.ChoiceNode)([{type:"string",node:n(),change:e=>"boolean"==typeof e||"number"==typeof e?e.toString():""},{type:"number",node:(0,Iu.NumberNode)(),change:e=>"string"==typeof e?parseInt(e):0},{type:"object",node:(0,Iu.ObjectNode)({min:(0,Iu.Opt)((0,Iu.NumberNode)({integer:!0})),max:(0,Iu.Opt)((0,Iu.NumberNode)({integer:!0}))}),change:e=>"number"==typeof e?{min:e,max:e}:{}},{type:"boolean",node:(0,Iu.BooleanNode)(),change:e=>"true"===e||1===e}]);e.register("item_predicate",(0,Iu.ObjectNode)({items:(0,Iu.Opt)((0,Iu.ListNode)(n({validator:"resource",params:{pool:"item"}}))),tag:(0,Iu.Opt)(n({validator:"resource",params:{pool:"$tag/item"}})),count:i("int_bounds"),durability:i("int_bounds"),potion:(0,Iu.Opt)(n({validator:"resource",params:{pool:"potion"}})),nbt:(0,Iu.Opt)(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"item"}]}}})),enchantments:(0,Iu.Opt)((0,Iu.ListNode)(i("enchantment_predicate")))},{context:"item"})),e.register("enchantment_predicate",(0,Iu.ObjectNode)({enchantment:(0,Iu.Opt)(n({validator:"resource",params:{pool:"enchantment"}})),levels:i("int_bounds")},{context:"enchantment"})),e.register("block_predicate",(0,Iu.ObjectNode)({blocks:(0,Iu.Opt)((0,Iu.ListNode)(n({validator:"resource",params:{pool:"block"}}))),tag:(0,Iu.Opt)(n({validator:"resource",params:{pool:"$tag/block"}})),nbt:(0,Iu.Opt)(n({validator:"nbt",params:{registry:{category:"minecraft:block",id:["pop",{push:"block"}]}}})),state:(0,Iu.Opt)((0,Iu.MapNode)(n(),r,{validation:{validator:"block_state_map",params:{id:["pop",{push:"block"}]}}}))},{context:"block"})),e.register("fluid_predicate",(0,Iu.ObjectNode)({fluid:(0,Iu.Opt)(n({validator:"resource",params:{pool:"fluid"}})),tag:(0,Iu.Opt)(n({validator:"resource",params:{pool:"$tag/fluid"}})),state:(0,Iu.Opt)((0,Iu.MapNode)(n(),r))},{context:"fluid"})),e.register("location_predicate",(0,Iu.ObjectNode)({position:(0,Iu.Opt)((0,Iu.ObjectNode)({x:i("float_bounds"),y:i("float_bounds"),z:i("float_bounds")})),biome:(0,Iu.Opt)(n({validator:"resource",params:{pool:"$worldgen/biome"}})),structure:(0,Iu.Opt)(n({validator:"resource",params:{pool:"$worldgen/structure"}})),dimension:(0,Iu.Opt)(n({validator:"resource",params:{pool:"$dimension"}})),light:(0,Iu.Opt)((0,Iu.ObjectNode)({light:i("int_bounds")})),smokey:(0,Iu.Opt)((0,Iu.BooleanNode)()),block:(0,Iu.Opt)(i("block_predicate")),fluid:(0,Iu.Opt)(i("fluid_predicate"))},{context:"location"})),e.register("statistic_predicate",(0,Iu.ObjectNode)({type:n({validator:"resource",params:{pool:"stat_type"}}),stat:n(),value:i("int_bounds"),[Iu.Switch]:[{push:"type"}],[Iu.Case]:{"minecraft:mined":{stat:n({validator:"resource",params:{pool:"block"}})},"minecraft:crafted":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:used":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:broken":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:picked_up":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:dropped":{stat:n({validator:"resource",params:{pool:"item"}})},"minecraft:killed":{stat:n({validator:"resource",params:{pool:"entity_type"}})},"minecraft:killed_by":{stat:n({validator:"resource",params:{pool:"entity_type"}})},"minecraft:custom":{stat:n({validator:"resource",params:{pool:"custom_stat"}})}}})),e.register("status_effect_predicate",(0,Iu.ObjectNode)({amplifier:i("int_bounds"),duration:i("int_bounds"),ambient:(0,Iu.Opt)((0,Iu.BooleanNode)()),visible:(0,Iu.Opt)((0,Iu.BooleanNode)())},{context:"status_effect"})),e.register("distance_predicate",(0,Iu.ObjectNode)({x:i("float_bounds"),y:i("float_bounds"),z:i("float_bounds"),absolute:i("float_bounds"),horizontal:i("float_bounds")},{context:"distance"})),e.register("entity_predicate",(0,Iu.ObjectNode)({type:(0,Iu.Opt)(n({validator:"resource",params:{pool:"entity_type",allowTag:!0}})),type_specific:(0,Iu.Opt)((0,Iu.ObjectNode)({type:n({enum:["any","cat","fishing_hook","frog","lightning","player","slime"]}),[Iu.Switch]:[{push:"type"}],[Iu.Case]:{cat:{variant:(0,Iu.Opt)(n({validator:"resource",params:{pool:"cat_variant"}}))},fishing_hook:{in_open_water:(0,Iu.Opt)((0,Iu.BooleanNode)())},frog:{variant:(0,Iu.Opt)(n({validator:"resource",params:{pool:"frog_variant"}}))},lightning:{blocks_set_on_fire:(0,Iu.Opt)(i("int_bounds")),entity_struck:(0,Iu.Opt)(i("entity_predicate"))},player:{gamemode:(0,Iu.Opt)(n({enum:"gamemode"})),level:i("int_bounds"),advancements:(0,Iu.Opt)((0,Iu.MapNode)(n({validator:"resource",params:{pool:"$advancement"}}),(0,Iu.ChoiceNode)([{type:"boolean",node:(0,Iu.BooleanNode)(),change:()=>!0},{type:"object",node:(0,Iu.MapNode)(n(),(0,Iu.BooleanNode)())}]))),recipes:(0,Iu.Opt)((0,Iu.MapNode)(n({validator:"resource",params:{pool:"$recipe"}}),(0,Iu.BooleanNode)())),stats:(0,Iu.Opt)((0,Iu.ListNode)(i("statistic_predicate"))),looking_at:(0,Iu.Opt)(i("entity_predicate"))},slime:{size:i("int_bounds")}}})),nbt:(0,Iu.Opt)(n({validator:"nbt",params:{registry:{category:"minecraft:entity",id:["pop",{push:"type"}]}}})),team:(0,Iu.Opt)(n({validator:"team"})),location:(0,Iu.Opt)(i("location_predicate")),stepping_on:(0,Iu.Opt)(i("location_predicate")),distance:(0,Iu.Opt)(i("distance_predicate")),flags:(0,Iu.Opt)((0,Iu.ObjectNode)({is_on_fire:(0,Iu.Opt)((0,Iu.BooleanNode)()),is_sneaking:(0,Iu.Opt)((0,Iu.BooleanNode)()),is_sprinting:(0,Iu.Opt)((0,Iu.BooleanNode)()),is_swimming:(0,Iu.Opt)((0,Iu.BooleanNode)()),is_baby:(0,Iu.Opt)((0,Iu.BooleanNode)())})),equipment:(0,Iu.Opt)((0,Iu.MapNode)(n({enum:"slot"}),i("item_predicate"))),vehicle:(0,Iu.Opt)(i("entity_predicate")),passenger:(0,Iu.Opt)(i("entity_predicate")),targeted_entity:(0,Iu.Opt)(i("entity_predicate")),effects:(0,Iu.Opt)((0,Iu.MapNode)(n({validator:"resource",params:{pool:"mob_effect"}}),i("status_effect_predicate")))},{context:"entity"})),e.register("damage_source_predicate",(0,Iu.ObjectNode)({is_explosion:(0,Iu.Opt)((0,Iu.BooleanNode)()),is_fire:(0,Iu.Opt)((0,Iu.BooleanNode)()),is_magic:(0,Iu.Opt)((0,Iu.BooleanNode)()),is_projectile:(0,Iu.Opt)((0,Iu.BooleanNode)()),is_lightning:(0,Iu.Opt)((0,Iu.BooleanNode)()),bypasses_armor:(0,Iu.Opt)((0,Iu.BooleanNode)()),bypasses_invulnerability:(0,Iu.Opt)((0,Iu.BooleanNode)()),bypasses_magic:(0,Iu.Opt)((0,Iu.BooleanNode)()),source_entity:(0,Iu.Opt)(i("entity_predicate")),direct_entity:(0,Iu.Opt)(i("entity_predicate"))},{context:"damage_source"})),e.register("damage_predicate",(0,Iu.ObjectNode)({dealt:i("float_bounds"),taken:i("float_bounds"),blocked:(0,Iu.Opt)((0,Iu.BooleanNode)()),source_entity:(0,Iu.Opt)(i("entity_predicate")),type:(0,Iu.Opt)(i("damage_source_predicate"))},{context:"damage"}))};var Pu={};Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.initRecipeSchemas=void 0;const zu=Pe;Pu.initRecipeSchemas=function(e,t){const i=zu.Reference.bind(void 0,e),n=zu.StringNode.bind(void 0,t);e.register("recipe",(0,zu.Mod)((0,zu.ObjectNode)({type:n({validator:"resource",params:{pool:"recipe_serializer"}}),[zu.Switch]:[{push:"type"}],[zu.Case]:{"minecraft:crafting_shaped":{group:(0,zu.Opt)(n({enum:"recipe_group",additional:!0})),pattern:(0,zu.ListNode)(n()),key:(0,zu.MapNode)(n(),i("recipe_ingredient")),result:i("recipe_result")},"minecraft:crafting_shapeless":{group:(0,zu.Opt)(n()),ingredients:(0,zu.ListNode)(i("recipe_ingredient")),result:i("recipe_result")},"minecraft:smelting":{group:(0,zu.Opt)(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:(0,zu.Opt)((0,zu.NumberNode)()),cookingtime:(0,zu.Opt)((0,zu.Mod)((0,zu.NumberNode)({integer:!0}),{default:()=>200}))},"minecraft:blasting":{group:(0,zu.Opt)(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:(0,zu.Opt)((0,zu.NumberNode)()),cookingtime:(0,zu.Opt)((0,zu.Mod)((0,zu.NumberNode)({integer:!0}),{default:()=>100}))},"minecraft:smoking":{group:(0,zu.Opt)(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:(0,zu.Opt)((0,zu.NumberNode)()),cookingtime:(0,zu.Opt)((0,zu.Mod)((0,zu.NumberNode)({integer:!0}),{default:()=>100}))},"minecraft:campfire_cooking":{group:(0,zu.Opt)(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),experience:(0,zu.Opt)((0,zu.NumberNode)()),cookingtime:(0,zu.Opt)((0,zu.Mod)((0,zu.NumberNode)({integer:!0}),{default:()=>100}))},"minecraft:stonecutting":{group:(0,zu.Opt)(n()),ingredient:i("recipe_ingredient"),result:n({validator:"resource",params:{pool:"item"}}),count:(0,zu.NumberNode)({integer:!0})},"minecraft:smithing":{group:(0,zu.Opt)(n()),base:i("recipe_ingredient_object"),addition:i("recipe_ingredient_object"),result:i("recipe_result")}}},{context:"recipe",disableSwitchContext:!0}),{default:()=>({type:"minecraft:crafting_shaped"})})),e.register("recipe_ingredient",(0,zu.Mod)((0,zu.ChoiceNode)([{type:"object",node:i("recipe_ingredient_object"),change:e=>e[0]},{type:"list",node:(0,zu.ListNode)(i("recipe_ingredient_object")),change:e=>[e]}]),{default:()=>({item:"minecraft:stone"})})),e.register("recipe_ingredient_object",(0,zu.Mod)((0,zu.ObjectNode)({item:(0,zu.Opt)(n({validator:"resource",params:{pool:"item"}})),tag:(0,zu.Opt)(n({validator:"resource",params:{pool:"$tag/item"}}))}),{default:()=>({item:"minecraft:stone"})})),e.register("recipe_result",(0,zu.Mod)((0,zu.ObjectNode)({item:n({validator:"resource",params:{pool:"item"}}),count:(0,zu.Opt)((0,zu.Mod)((0,zu.NumberNode)({integer:!0}),{default:()=>1}))}),{default:()=>({item:"minecraft:stone"})}))};var Uu={};Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.initTagsSchemas=void 0;const Wu=Pe;Uu.initTagsSchemas=function(e,t){const i=Wu.StringNode.bind(void 0,t),n=e=>(0,Wu.Mod)((0,Wu.ObjectNode)({replace:(0,Wu.Opt)((0,Wu.BooleanNode)()),values:(0,Wu.ListNode)((0,Wu.ChoiceNode)([{type:"string",node:i({validator:"resource",params:{pool:e,allowTag:!0}}),change:e=>e.id},{type:"object",node:(0,Wu.ObjectNode)({id:i({validator:"resource",params:{pool:e,allowTag:!0,allowUnknown:!0}}),required:(0,Wu.BooleanNode)()}),change:e=>({id:e})}]))},{context:"tag"}),{default:()=>({values:[]})});e.register("block_tag",n("block")),e.register("entity_type_tag",n("entity_type")),e.register("fluid_tag",n("fluid")),e.register("function_tag",n("$function")),e.register("game_event_tag",n("game_event")),e.register("item_tag",n("item")),e.register("advancement_tag",n("$advancement")),e.register("dimension_tag",n("$dimension")),e.register("dimension_type_tag",n("$dimension_type")),e.register("function_tag",n("$function")),e.register("item_modifier_tag",n("$item_modifier")),e.register("loot_table_tag",n("$loot_table")),e.register("predicate_tag",n("$predicate")),e.register("recipe_tag",n("$recipe")),e.register("structure_tag",n("$structure")),e.register("biome_tag",n("$worldgen/biome")),e.register("configured_carver_tag",n("$worldgen/configured_carver")),e.register("configured_feature_tag",n("$worldgen/configured_feature")),e.register("structure_tag",n("$worldgen/structure")),e.register("configured_surface_builder_tag",n("$worldgen/configured_surface_builder")),e.register("density_function_tag",n("$worldgen/density_function")),e.register("flat_level_generator_preset_tag",n("$worldgen/flat_level_generator_preset")),e.register("noise_tag",n("$worldgen/noise")),e.register("noise_settings_tag",n("$worldgen/noise_settings")),e.register("placed_feature_tag",n("$worldgen/placed_feature")),e.register("processor_list_tag",n("$worldgen/processor_list")),e.register("structure_set_tag",n("$worldgen/structure_set")),e.register("template_pool_tag",n("$worldgen/template_pool")),e.register("world_preset_tag",n("$worldgen/world_preset"))};var Hu={};Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.initTextComponentSchemas=void 0;const qu=Pe;Hu.initTextComponentSchemas=function(e,t){const i=qu.Reference.bind(void 0,e),n=qu.StringNode.bind(void 0,t),r=e=>{var t;return e instanceof Array?r(e[0]):null!==(t=null==e?void 0:e.text)&&void 0!==t?t:"object"==typeof e?"":null==e?void 0:e.toString()};e.register("text_component",(0,qu.Mod)((0,qu.ChoiceNode)([{type:"object",node:i("text_component_object"),change:e=>e instanceof Array?"object"==typeof e[0]?e[0]:{text:r(e[0])}:"object"==typeof e?e:{text:r(e)}},{type:"list",node:i("text_component_list"),change:e=>[e]},{type:"string",priority:1,node:n(),change:r},{type:"number",node:(0,qu.NumberNode)(),change:e=>{const t=parseFloat(r(e));return isFinite(t)?t:e?1:0}},{type:"boolean",node:(0,qu.BooleanNode)(),change:e=>{const t=r(e);return"true"===t||"false"===t?"true"===t:!!t}}],{context:"text_component"}),{default:()=>({text:""})}));const o={color:(0,qu.Opt)(n()),font:(0,qu.Opt)(n()),bold:(0,qu.Opt)((0,qu.BooleanNode)()),italic:(0,qu.Opt)((0,qu.BooleanNode)()),underlined:(0,qu.Opt)((0,qu.BooleanNode)()),strikethrough:(0,qu.Opt)((0,qu.BooleanNode)()),obfuscated:(0,qu.Opt)((0,qu.BooleanNode)()),insertion:(0,qu.Opt)(n()),clickEvent:(0,qu.Opt)((0,qu.ObjectNode)({action:n({enum:["open_url","open_file","run_command","suggest_command","change_page","copy_to_clipboard"]}),[qu.Switch]:[{push:"action"}],[qu.Case]:{change_page:{value:n()},copy_to_clipboard:{value:n()},open_file:{value:n()},open_url:{value:n()},run_command:{value:n({validator:"command",params:{leadingSlash:!0,allowPartial:!0}})},suggest_command:{value:n({validator:"command",params:{leadingSlash:!0,allowPartial:!0}})}}})),hoverEvent:(0,qu.Opt)((0,qu.ObjectNode)({action:n({enum:["show_text","show_item","show_entity"]}),[qu.Switch]:[{push:"action"}],[qu.Case]:{show_text:{value:(0,qu.Opt)(i("text_component")),contents:(0,qu.Opt)(i("text_component"))},show_item:{value:(0,qu.Opt)(n({validator:"nbt",params:{module:"util::InventoryItem"}})),contents:(0,qu.Opt)((0,qu.ObjectNode)({id:n({validator:"resource",params:{pool:"item"}}),count:(0,qu.Opt)((0,qu.NumberNode)({integer:!0})),tag:(0,qu.Opt)(n({validator:"nbt",params:{registry:{category:"minecraft:item",id:["pop",{push:"id"}]}}}))}))},show_entity:{value:(0,qu.Opt)((0,qu.ObjectNode)({name:(0,qu.Opt)(n()),type:(0,qu.Opt)(n()),id:(0,qu.Opt)(n())})),contents:(0,qu.Opt)((0,qu.Mod)((0,qu.ObjectNode)({name:(0,qu.Opt)(i("text_component")),type:n({validator:"resource",params:{pool:"entity_type"}}),id:n({validator:"uuid"})}),{default:()=>({type:"minecraft:pig",id:"00000001-0001-0001-0001-000000000001"})}))}}})),extra:(0,qu.Opt)(i("text_component_list"))};e.register("text_component_object",(0,qu.Mod)((0,qu.ChoiceNode)([{type:"text",match:e=>"object"==typeof e,change:e=>({text:""}),priority:-1,node:(0,qu.ObjectNode)(s({text:n()},o))},{type:"translation",match:e=>void 0!==(null==e?void 0:e.translate),change:e=>({translate:""}),node:(0,qu.ObjectNode)(s({translate:n(),with:(0,qu.Opt)(i("text_component_list"))},o))},{type:"score",match:e=>void 0!==(null==e?void 0:e.score),change:e=>({score:{}}),node:(0,qu.ObjectNode)(s({score:(0,qu.ObjectNode)({name:n({validator:"entity",params:{amount:"single",type:"entities",isScoreHolder:!0}}),objective:n({validator:"objective"}),value:(0,qu.Opt)(n())})},o))},{type:"selector",match:e=>void 0!==(null==e?void 0:e.selector),change:e=>({selector:""}),node:(0,qu.ObjectNode)(s({selector:n({validator:"entity",params:{amount:"multiple",type:"entities"}}),separator:(0,qu.Opt)(i("text_component"))},o))},{type:"keybind",match:e=>void 0!==(null==e?void 0:e.keybind),change:e=>({keybind:""}),node:(0,qu.ObjectNode)(s({keybind:n({enum:"keybind",additional:!0})},o))},{type:"nbt",match:e=>void 0!==(null==e?void 0:e.nbt),change:e=>({nbt:""}),node:(0,qu.ObjectNode)(s({nbt:n({validator:"nbt_path"}),block:(0,qu.Opt)(n({validator:"vector",params:{dimension:3,isInteger:!0}})),entity:(0,qu.Opt)(n({validator:"entity",params:{amount:"multiple",type:"entities"}})),storage:(0,qu.Opt)(n({validator:"resource",params:{pool:"$storage"}})),interpret:(0,qu.Opt)((0,qu.BooleanNode)()),separator:(0,qu.Opt)(i("text_component"))},o))}],{context:"text_component_object",choiceContext:"text_component.object"}),{default:()=>({text:""})})),e.register("text_component_list",(0,qu.Mod)((0,qu.ListNode)(i("text_component")),{default:()=>[{text:""}]}))};var Vu={},Gu={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.initBiomeSchemas=e.MobCategorySpawnSettings=void 0;const t=Pe,i=bu;e.initBiomeSchemas=function(n,r){const o=t.StringNode.bind(void 0,r);e.MobCategorySpawnSettings=(0,t.Mod)((0,t.ListNode)((0,t.ObjectNode)({type:o({validator:"resource",params:{pool:"entity_type"}}),weight:(0,t.NumberNode)({integer:!0}),minCount:(0,t.NumberNode)({integer:!0}),maxCount:(0,t.NumberNode)({integer:!0})})),{category:()=>"pool",default:()=>[{type:"minecraft:bat",weight:1}]}),n.register("biome",(0,t.Mod)((0,t.ObjectNode)({temperature:(0,t.NumberNode)(),downfall:(0,t.NumberNode)(),precipitation:o({enum:["none","rain","snow"]}),temperature_modifier:(0,t.Opt)(o({enum:["none","frozen"]})),creature_spawn_probability:(0,t.Opt)((0,t.NumberNode)({min:0,max:1})),effects:(0,t.ObjectNode)({sky_color:(0,t.NumberNode)({color:!0}),fog_color:(0,t.NumberNode)({color:!0}),water_color:(0,t.NumberNode)({color:!0}),water_fog_color:(0,t.NumberNode)({color:!0}),grass_color:(0,t.Opt)((0,t.NumberNode)({color:!0})),foliage_color:(0,t.Opt)((0,t.NumberNode)({color:!0})),grass_color_modifier:(0,t.Opt)(o({enum:["none","dark_forest","swamp"]})),ambient_sound:(0,t.Opt)(o()),mood_sound:(0,t.Opt)((0,t.ObjectNode)({sound:o(),tick_delay:(0,t.NumberNode)({integer:!0}),block_search_extent:(0,t.NumberNode)({integer:!0}),offset:(0,t.NumberNode)()})),additions_sound:(0,t.Opt)((0,t.ObjectNode)({sound:o(),tick_chance:(0,t.NumberNode)({min:0,max:1})})),music:(0,t.Opt)((0,t.ObjectNode)({sound:o(),min_delay:(0,t.NumberNode)({integer:!0,min:0}),max_delay:(0,t.NumberNode)({integer:!0,min:0}),replace_current_music:(0,t.BooleanNode)()})),particle:(0,t.Opt)((0,t.ObjectNode)({options:(0,t.ObjectNode)({type:o()}),probability:(0,t.NumberNode)({min:0,max:1})}))}),spawners:(0,t.MapNode)(o({enum:"mob_category"}),e.MobCategorySpawnSettings),spawn_costs:(0,t.MapNode)(o({validator:"resource",params:{pool:"entity_type"}}),(0,t.Mod)((0,t.ObjectNode)({energy_budget:(0,t.NumberNode)(),charge:(0,t.NumberNode)()},{category:"function"}),{default:()=>({energy_budget:.12,charge:1})})),carvers:(0,t.MapNode)(o({enum:["air","liquid"]}),(0,t.Mod)((0,i.Tag)({resource:"$worldgen/configured_carver",inlineSchema:"configured_carver"}),{default:()=>["minecraft:cave"]})),features:(0,t.ListNode)((0,t.Mod)((0,i.Tag)({resource:"$worldgen/placed_feature",inlineSchema:"placed_feature"}),{category:()=>"predicate"}),{maxLength:11})},{context:"biome"}),{default:()=>({temperature:.8,downfall:.4,precipitation:"rain",category:"plains",effects:{sky_color:7907327,fog_color:12638463,water_color:4159204,water_fog_color:329011}})}))}}(Gu);var Ku={};Object.defineProperty(Ku,"__esModule",{value:!0}),Ku.initCarverSchemas=void 0;const Xu=Pe,Ju=bu;Ku.initCarverSchemas=function(e,t){const i=Xu.Reference.bind(void 0,e),n=Xu.StringNode.bind(void 0,t),r={vertical_rotation:(0,Ju.FloatProvider)(),shape:(0,Xu.ObjectNode)({distance_factor:(0,Ju.FloatProvider)(),thickness:(0,Ju.FloatProvider)(),width_smoothness:(0,Xu.NumberNode)({integer:!0,min:0}),horizontal_radius_factor:(0,Ju.FloatProvider)(),vertical_radius_default_factor:(0,Xu.NumberNode)(),vertical_radius_center_factor:(0,Xu.NumberNode)()})},o={horizontal_radius_multiplier:(0,Ju.FloatProvider)(),vertical_radius_multiplier:(0,Ju.FloatProvider)(),floor_level:(0,Ju.FloatProvider)({min:-1,max:1})};e.register("configured_carver",(0,Xu.Mod)((0,Xu.ObjectNode)({type:n({validator:"resource",params:{pool:"worldgen/carver"}}),config:(0,Xu.ObjectNode)({probability:(0,Xu.NumberNode)({min:0,max:1}),y:i("height_provider"),yScale:(0,Ju.FloatProvider)(),lava_level:i("vertical_anchor"),debug_settings:(0,Xu.Opt)((0,Xu.ObjectNode)({debug_mode:(0,Xu.Opt)((0,Xu.BooleanNode)()),air_state:(0,Xu.Opt)(i("block_state")),water_state:(0,Xu.Opt)(i("block_state")),lava_state:(0,Xu.Opt)(i("block_state")),barrier_state:(0,Xu.Opt)(i("block_state"))})),[Xu.Switch]:["pop",{push:"type"}],[Xu.Case]:{"minecraft:canyon":r,"minecraft:cave":o,"minecraft:nether_cave":o}})},{context:"carver"}),{default:()=>({type:"minecraft:cave",config:{probability:.1}})}))};var Yu={};Object.defineProperty(Yu,"__esModule",{value:!0}),Yu.initDecoratorSchemas=void 0;const Zu=Pe,Qu=bu;Yu.initDecoratorSchemas=function(e,t){const i=Zu.Reference.bind(void 0,e),n=Zu.StringNode.bind(void 0,t);e.register("decorator",(0,Zu.ObjectNode)({type:n({validator:"resource",params:{pool:"worldgen/placement_modifier_type"}}),[Zu.Switch]:[{push:"type"}],[Zu.Case]:{"minecraft:block_predicate_filter":{predicate:i("block_predicate_worldgen")},"minecraft:carving_mask":{step:n({enum:"generation_step"})},"minecraft:rarity_filter":{chance:(0,Zu.NumberNode)({integer:!0,min:0})},"minecraft:count":{count:(0,Qu.IntProvider)({min:0,max:256})},"minecraft:count_on_every_layer":{count:(0,Qu.IntProvider)({min:0,max:256})},"minecraft:noise_threshold_count":{noise_level:(0,Zu.NumberNode)(),below_noise:(0,Zu.NumberNode)({integer:!0}),above_noise:(0,Zu.NumberNode)({integer:!0})},"minecraft:noise_based_count":{noise_to_count_ratio:(0,Zu.NumberNode)({integer:!0}),noise_factor:(0,Zu.NumberNode)(),noise_offset:(0,Zu.Opt)((0,Zu.NumberNode)())},"minecraft:environment_scan":{direction_of_search:n({enum:["up","down"]}),max_steps:(0,Zu.NumberNode)({integer:!0,min:1,max:32}),target_condition:i("block_predicate_worldgen"),allowed_search_condition:(0,Zu.Opt)(i("block_predicate_worldgen"))},"minecraft:heightmap":{heightmap:n({enum:"heightmap_type"})},"minecraft:height_range":{height:i("height_provider")},"minecraft:random_offset":{xz_spread:(0,Qu.IntProvider)({min:-16,max:16}),y_spread:(0,Qu.IntProvider)({min:-16,max:16})},"minecraft:surface_relative_threshold_filter":{heightmap:n({enum:"heightmap_type"}),min_inclusive:(0,Zu.Opt)((0,Zu.NumberNode)({integer:!0})),max_inclusive:(0,Zu.Opt)((0,Zu.NumberNode)({integer:!0}))},"minecraft:surface_water_depth_filter":{max_water_depth:(0,Zu.NumberNode)({integer:!0})}}},{context:"decorator",category:"predicate"}))};var ed={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.initDensityFunctionSchemas=e.DensityFunction=void 0;const t=Pe;e.initDensityFunctionSchemas=function(i,n){const r=t.StringNode.bind(void 0,n),o=t.Reference.bind(void 0,i);e.DensityFunction=(0,t.Mod)((0,t.ChoiceNode)([{type:"number",node:(0,t.NumberNode)(),change:()=>0},{type:"string",priority:1,node:r({validator:"resource",params:{pool:"$worldgen/density_function"}}),change:()=>{}},{type:"object",node:o("density_function"),change:()=>({})}],{choiceContext:"density_function"}),{default:()=>0});const a=(0,t.ChoiceNode)([{type:"string",node:r({validator:"resource",params:{pool:"$worldgen/noise"}}),change:()=>{}},{type:"object",node:o("noise_parameters")}],{choiceContext:"noise_parameters"}),s=(0,t.NumberNode)({min:-1e6,max:1e6}),c=(0,t.NumberNode)({integer:!0,min:-4064,max:4062});i.register("density_function",(0,t.Mod)((0,t.ObjectNode)({type:r({validator:"resource",params:{pool:"worldgen/density_function_type"}}),[t.Switch]:[{push:"type"}],[t.Case]:{"minecraft:abs":{argument:e.DensityFunction},"minecraft:add":{argument1:e.DensityFunction,argument2:e.DensityFunction},"minecraft:blend_density":{argument:e.DensityFunction},"minecraft:cache_2d":{argument:e.DensityFunction},"minecraft:cache_all_in_cell":{argument:e.DensityFunction},"minecraft:cache_once":{argument:e.DensityFunction},"minecraft:clamp":{input:e.DensityFunction,min:s,max:s},"minecraft:constant":{argument:(0,t.NumberNode)()},"minecraft:cube":{argument:e.DensityFunction},"minecraft:flat_cache":{argument:e.DensityFunction},"minecraft:half_negative":{argument:e.DensityFunction},"minecraft:interpolated":{argument:e.DensityFunction},"minecraft:max":{argument1:e.DensityFunction,argument2:e.DensityFunction},"minecraft:min":{argument1:e.DensityFunction,argument2:e.DensityFunction},"minecraft:mul":{argument1:e.DensityFunction,argument2:e.DensityFunction},"minecraft:noise":{noise:a,xz_scale:(0,t.NumberNode)(),y_scale:(0,t.NumberNode)()},"minecraft:old_blended_noise":{xz_scale:(0,t.NumberNode)(),y_scale:(0,t.NumberNode)(),xz_factor:(0,t.NumberNode)(),y_factor:(0,t.NumberNode)(),smear_scale_multiplier:(0,t.NumberNode)({min:1,max:8})},"minecraft:quarter_negative":{argument:e.DensityFunction},"minecraft:range_choice":{input:e.DensityFunction,min_inclusive:s,max_exclusive:s,when_in_range:e.DensityFunction,when_out_of_range:e.DensityFunction},"minecraft:shift":{argument:e.DensityFunction},"minecraft:shift_a":{argument:e.DensityFunction},"minecraft:shift_b":{argument:e.DensityFunction},"minecraft:shifted_noise":{noise:a,xz_scale:(0,t.NumberNode)(),y_scale:(0,t.NumberNode)(),shift_x:e.DensityFunction,shift_y:e.DensityFunction,shift_z:e.DensityFunction},"minecraft:slide":{argument:e.DensityFunction},"minecraft:spline":{spline:o("cubic_spline")},"minecraft:square":{argument:e.DensityFunction},"minecraft:squeeze":{argument:e.DensityFunction},"minecraft:weird_scaled_sampler":{rarity_value_mapper:r({enum:["type_1","type_2"]}),noise:a,input:e.DensityFunction},"minecraft:y_clamped_gradient":{from_y:c,to_y:c,from_value:s,to_value:s}}},{context:"density_function",disableSwitchContext:!0}),{default:()=>({type:"minecraft:noise",noise:"minecraft:cave_entrance",xz_scale:.75,y_scale:.5})})),i.register("cubic_spline",(0,t.Mod)((0,t.ChoiceNode)([{type:"number",node:(0,t.NumberNode)()},{type:"object",node:(0,t.ObjectNode)({coordinate:e.DensityFunction,points:(0,t.ListNode)((0,t.ObjectNode)({location:(0,t.NumberNode)(),derivative:(0,t.NumberNode)(),value:o("cubic_spline")}))},{category:"function"})}],{context:"terrain_spline",choiceContext:"terrain_spline"}),{default:()=>0}))}}(ed);var td={},id={};Object.defineProperty(id,"__esModule",{value:!0}),id.initProcessorListSchemas=id.Processors=void 0;const nd=Pe,rd=bu;id.initProcessorListSchemas=function(e,t){const i=nd.Reference.bind(void 0,e),n=nd.StringNode.bind(void 0,t);id.Processors=(0,nd.ChoiceNode)([{type:"string",node:n({validator:"resource",params:{pool:"$worldgen/processor_list"}}),change:e=>{}},{type:"object",node:i("processor_list"),change:e=>({processors:[{processor_type:"minecraft:nop"}]})}]),e.register("processor_list",(0,nd.Mod)((0,nd.ObjectNode)({processors:(0,nd.ListNode)(i("processor"))},{context:"processor_list"}),{default:()=>({processors:[{processor_type:"minecraft:rule",rules:[{location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}}]}]})})),e.register("processor",(0,nd.Mod)((0,nd.ObjectNode)({processor_type:n({validator:"resource",params:{pool:"worldgen/structure_processor"}}),[nd.Switch]:[{push:"processor_type"}],[nd.Case]:{"minecraft:block_age":{mossiness:(0,nd.NumberNode)()},"minecraft:block_ignore":{blocks:(0,nd.ListNode)(i("block_state"))},"minecraft:block_rot":{integrity:(0,nd.NumberNode)({min:0,max:1}),rottable_blocks:(0,rd.Tag)({resource:"block"})},"minecraft:gravity":{heightmap:n({enum:"heightmap_type"}),offset:(0,nd.NumberNode)({integer:!0})},"minecraft:protected_blocks":{value:n({validator:"resource",params:{pool:"block",requireTag:!0}})},"minecraft:rule":{rules:(0,nd.ListNode)(i("processor_rule"))}}},{category:"function",context:"processor"}),{default:()=>({processor_type:"minecraft:rule",rules:[{location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}}]})})),e.register("processor_rule",(0,nd.Mod)((0,nd.ObjectNode)({position_predicate:(0,nd.Opt)(i("pos_rule_test")),location_predicate:i("rule_test"),input_predicate:i("rule_test"),output_state:i("block_state"),output_nbt:(0,nd.Opt)(n({validator:"nbt",params:{registry:{category:"minecraft:block"}}}))},{category:"predicate",context:"processor_rule"}),{default:()=>({location_predicate:{predicate_type:"minecraft:always_true"},input_predicate:{predicate_type:"minecraft:always_true"}})}));const r={min_dist:(0,nd.Opt)((0,nd.NumberNode)({min:0,max:255,integer:!0})),max_dist:(0,nd.Opt)((0,nd.NumberNode)({min:0,max:255,integer:!0})),min_chance:(0,nd.Opt)((0,nd.NumberNode)({min:0,max:1})),max_chance:(0,nd.Opt)((0,nd.NumberNode)({min:0,max:1}))};e.register("pos_rule_test",(0,nd.ObjectNode)({predicate_type:n({validator:"resource",params:{pool:"pos_rule_test"}}),[nd.Switch]:[{push:"predicate_type"}],[nd.Case]:{"minecraft:axis_aligned_linear_pos":s({axis:n({enum:["x","y","z"]})},r),"minecraft:linear_pos":r}},{context:"pos_rule_test",disableSwitchContext:!0})),e.register("rule_test",(0,nd.ObjectNode)({predicate_type:n({validator:"resource",params:{pool:"rule_test"}}),[nd.Switch]:[{push:"predicate_type"}],[nd.Case]:{"minecraft:block_match":{block:n({validator:"resource",params:{pool:"block"}})},"minecraft:blockstate_match":{block_state:i("block_state")},"minecraft:random_block_match":{block:n({validator:"resource",params:{pool:"block"}}),probability:(0,nd.NumberNode)({min:0,max:1})},"minecraft:random_blockstate_match":{block_state:i("block_state"),probability:(0,nd.NumberNode)({min:0,max:1})},"minecraft:tag_match":{tag:n({validator:"resource",params:{pool:"$tag/block"}})}}},{context:"rule_test",disableSwitchContext:!0}))},Object.defineProperty(td,"__esModule",{value:!0}),td.initFeatureSchemas=void 0;const od=Pe,ad=bu,sd=id;td.initFeatureSchemas=function(e,t){const i=od.Reference.bind(void 0,e),n=od.StringNode.bind(void 0,t),r=(0,od.ChoiceNode)([{type:"string",node:n({validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:i("configured_feature")}],{choiceContext:"feature"}),o=(0,od.ChoiceNode)([{type:"string",node:n({validator:"resource",params:{pool:"$worldgen/placed_feature"}})},{type:"object",node:i("placed_feature")}],{choiceContext:"placed_feature"}),a={tries:(0,od.Opt)((0,od.NumberNode)({integer:!0,min:1})),xz_spread:(0,od.Opt)((0,od.NumberNode)({integer:!0,min:0})),y_spread:(0,od.Opt)((0,od.NumberNode)({integer:!0,min:0})),feature:o},l={state:i("block_state"),radius:(0,ad.IntProvider)({min:0,max:8}),half_height:(0,od.NumberNode)({integer:!0,min:0,max:4}),can_origin_replace:(0,ad.Tag)({resource:"block"}),targets:(0,od.ListNode)(i("block_state"))},u={cap_provider:i("block_state_provider"),stem_provider:i("block_state_provider"),foliage_radius:(0,od.Opt)((0,od.NumberNode)({integer:!0}))},d=(0,od.ObjectNode)({target:i("rule_test"),state:i("block_state")}),h={size:(0,od.NumberNode)({integer:!0,min:0,max:64}),discard_chance_on_air_exposure:(0,od.NumberNode)({min:0,max:1}),targets:(0,od.ListNode)(d)},p={surface:n({enum:"cave_surface"}),depth:(0,ad.IntProvider)({min:1,max:128}),vertical_range:(0,od.NumberNode)({integer:!0,min:1,max:256}),extra_bottom_block_chance:(0,od.NumberNode)({min:0,max:1}),extra_edge_column_chance:(0,od.NumberNode)({min:0,max:1}),vegetation_chance:(0,od.NumberNode)({min:0,max:1}),xz_radius:(0,ad.IntProvider)(),replaceable:n({validator:"resource",params:{pool:"block",requireTag:!0}}),ground_state:i("block_state_provider"),vegetation_feature:o};e.register("configured_feature",(0,od.Mod)((0,od.ObjectNode)({type:n({validator:"resource",params:{pool:"worldgen/feature"}}),config:(0,od.ObjectNode)({[od.Switch]:["pop",{push:"type"}],[od.Case]:{"minecraft:bamboo":{probability:(0,od.NumberNode)({min:0,max:1})},"minecraft:basalt_columns":{reach:(0,ad.IntProvider)({min:0,max:3}),height:(0,ad.IntProvider)({min:1,max:10})},"minecraft:block_column":{direction:n({enum:["up","down","north","east","south","west"]}),allowed_placement:i("block_predicate_worldgen"),prioritize_tip:(0,od.BooleanNode)(),layers:(0,od.ListNode)((0,od.ObjectNode)({height:(0,ad.IntProvider)({min:0}),provider:i("block_state_provider")}))},"minecraft:block_pile":{state_provider:i("block_state_provider")},"minecraft:delta_feature":{contents:i("block_state"),rim:i("block_state"),size:(0,ad.IntProvider)({min:0,max:16}),rim_size:(0,ad.IntProvider)({min:0,max:16})},"minecraft:disk":l,"minecraft:dripstone_cluster":{floor_to_ceiling_search_range:(0,od.NumberNode)({integer:!0,min:1,max:512}),height:(0,ad.IntProvider)({min:0,max:128}),radius:(0,ad.IntProvider)({min:0,max:128}),max_stalagmite_stalactite_height_diff:(0,od.NumberNode)({integer:!0,min:0,max:64}),height_deviation:(0,od.NumberNode)({integer:!0,min:1,max:64}),dripstone_block_layer_thickness:(0,ad.IntProvider)({min:0,max:128}),density:(0,ad.FloatProvider)({min:0,max:2}),wetness:(0,ad.FloatProvider)({min:0,max:2}),chance_of_dripstone_column_at_max_distance_from_center:(0,od.NumberNode)({min:0,max:1}),max_distance_from_edge_affecting_chance_of_dripstone_column:(0,od.NumberNode)({integer:!0,min:1,max:64}),max_distance_from_center_affecting_height_bias:(0,od.NumberNode)({integer:!0,min:1,max:64})},"minecraft:end_gateway":{exact:(0,od.BooleanNode)(),exit:(0,od.Opt)(i("block_pos"))},"minecraft:end_spike":{crystal_invulnerable:(0,od.Opt)((0,od.BooleanNode)()),crystal_beam_target:(0,od.Opt)(i("block_pos")),spikes:(0,od.ListNode)((0,od.ObjectNode)({centerX:(0,od.Opt)((0,od.NumberNode)({integer:!0})),centerZ:(0,od.Opt)((0,od.NumberNode)({integer:!0})),radius:(0,od.Opt)((0,od.NumberNode)({integer:!0})),height:(0,od.Opt)((0,od.NumberNode)({integer:!0})),guarded:(0,od.Opt)((0,od.BooleanNode)())}))},"minecraft:fill_layer":{state:i("block_state"),height:(0,od.NumberNode)({integer:!0,min:0,max:255})},"minecraft:flower":a,"minecraft:forest_rock":{state:i("block_state")},"minecraft:fossil":{max_empty_corners_allowed:(0,od.NumberNode)({integer:!0,min:0,max:7}),fossil_structures:(0,od.ListNode)(n({validator:"resource",params:{pool:"$structure"}})),overlay_structures:(0,od.ListNode)(n({validator:"resource",params:{pool:"$structure"}})),fossil_processors:sd.Processors,overlay_processors:sd.Processors},"minecraft:geode":{blocks:(0,od.ObjectNode)({filling_provider:i("block_state_provider"),inner_layer_provider:i("block_state_provider"),alternate_inner_layer_provider:i("block_state_provider"),middle_layer_provider:i("block_state_provider"),outer_layer_provider:i("block_state_provider"),inner_placements:(0,od.ListNode)(i("block_state")),cannot_replace:n({validator:"resource",params:{pool:"block",requireTag:!0}}),invalid_blocks:n({validator:"resource",params:{pool:"block",requireTag:!0}})}),layers:(0,od.ObjectNode)({filling:(0,od.Opt)((0,od.NumberNode)({min:.01,max:50})),inner_layer:(0,od.Opt)((0,od.NumberNode)({min:.01,max:50})),middle_layer:(0,od.Opt)((0,od.NumberNode)({min:.01,max:50})),outer_layer:(0,od.Opt)((0,od.NumberNode)({min:.01,max:50}))}),crack:(0,od.ObjectNode)({generate_crack_chance:(0,od.Opt)((0,od.NumberNode)({min:0,max:1})),base_crack_size:(0,od.Opt)((0,od.NumberNode)({min:0,max:5})),crack_point_offset:(0,od.Opt)((0,od.NumberNode)({min:0,max:10}))}),noise_multiplier:(0,od.Opt)((0,od.NumberNode)({min:0,max:1})),use_potential_placements_chance:(0,od.Opt)((0,od.NumberNode)({min:0,max:1})),use_alternate_layer0_chance:(0,od.Opt)((0,od.NumberNode)({min:0,max:1})),placements_require_layer0_alternate:(0,od.Opt)((0,od.BooleanNode)()),outer_wall_distance:(0,od.Opt)((0,ad.IntProvider)({min:1,max:20})),distribution_points:(0,od.Opt)((0,ad.IntProvider)({min:1,max:20})),point_offset:(0,od.Opt)((0,ad.IntProvider)({min:0,max:10})),min_gen_offset:(0,od.Opt)((0,od.NumberNode)({integer:!0})),max_gen_offset:(0,od.Opt)((0,od.NumberNode)({integer:!0})),invalid_blocks_threshold:(0,od.NumberNode)({integer:!0})},"minecraft:multiface_growth":{search_range:(0,od.Opt)((0,od.NumberNode)({min:1,max:64,integer:!0})),chance_of_spreading:(0,od.Opt)((0,od.NumberNode)({min:0,max:1})),can_place_on_floor:(0,od.Opt)((0,od.BooleanNode)()),can_place_on_ceiling:(0,od.Opt)((0,od.BooleanNode)()),can_place_on_wall:(0,od.Opt)((0,od.BooleanNode)()),can_be_placed_on:(0,ad.Tag)({resource:"block"})},"minecraft:huge_brown_mushroom":u,"minecraft:huge_fungus":{hat_state:i("block_state"),decor_state:i("block_state"),stem_state:i("block_state"),valid_base_block:i("block_state"),planted:(0,od.Opt)((0,od.BooleanNode)())},"minecraft:huge_red_mushroom":u,"minecraft:ice_patch":l,"minecraft:iceberg":{state:i("block_state")},"minecraft:lake":{fluid:i("block_state_provider"),barrier:i("block_state_provider")},"minecraft:large_dripstone":{floor_to_ceiling_search_range:(0,od.Opt)((0,od.NumberNode)({integer:!0,min:1,max:512})),column_radius:(0,ad.IntProvider)({min:0,max:60}),height_scale:(0,ad.FloatProvider)({min:0,max:20}),max_column_radius_to_cave_height_ratio:(0,od.NumberNode)({min:0,max:1}),stalactite_bluntness:(0,ad.FloatProvider)({min:.1,max:10}),stalagmite_bluntness:(0,ad.FloatProvider)({min:.1,max:10}),wind_speed:(0,ad.FloatProvider)({min:0,max:2}),min_radius_for_wind:(0,od.NumberNode)({integer:!0,min:0,max:100}),min_bluntness_for_wind:(0,od.NumberNode)({min:0,max:5})},"minecraft:nether_forest_vegetation":{state_provider:i("block_state_provider"),spread_width:(0,od.NumberNode)({integer:!0,min:1}),spread_height:(0,od.NumberNode)({integer:!0,min:1})},"minecraft:netherrack_replace_blobs":{state:i("block_state"),target:i("block_state"),radius:(0,ad.IntProvider)({min:0,max:12})},"minecraft:no_bonemeal_flower":a,"minecraft:ore":h,"minecraft:pointed_dripstone":{chance_of_taller_dripstone:(0,od.Opt)((0,od.NumberNode)({min:0,max:1})),chance_of_directional_spread:(0,od.Opt)((0,od.NumberNode)({min:0,max:1})),chance_of_spread_radius2:(0,od.Opt)((0,od.NumberNode)({min:0,max:1})),chance_of_spread_radius3:(0,od.Opt)((0,od.NumberNode)({min:0,max:1}))},"minecraft:random_patch":a,"minecraft:random_boolean_selector":{feature_false:o,feature_true:o},"minecraft:random_selector":{features:(0,od.ListNode)((0,od.ObjectNode)({chance:(0,od.NumberNode)({min:0,max:1}),feature:o})),default:o},"minecraft:replace_single_block":{targets:(0,od.ListNode)(d)},"minecraft:root_system":{required_vertical_space_for_tree:(0,od.NumberNode)({integer:!0,min:1,max:64}),root_radius:(0,od.NumberNode)({integer:!0,min:1,max:64}),root_placement_attempts:(0,od.NumberNode)({integer:!0,min:1,max:256}),root_column_max_height:(0,od.NumberNode)({integer:!0,min:1,max:4096}),hanging_root_radius:(0,od.NumberNode)({integer:!0,min:1,max:64}),hanging_roots_vertical_span:(0,od.NumberNode)({integer:!0,min:0,max:16}),hanging_root_placement_attempts:(0,od.NumberNode)({integer:!0,min:0,max:256}),allowed_vertical_water_for_tree:(0,od.NumberNode)({integer:!0,min:1,max:64}),root_replaceable:n({validator:"resource",params:{pool:"block",requireTag:!0}}),root_state_provider:i("block_state_provider"),hanging_root_state_provider:i("block_state_provider"),allowed_tree_position:i("block_predicate_worldgen"),feature:o},"minecraft:scattered_ore":h,"minecraft:sculk_patch":{charge_count:(0,od.NumberNode)({integer:!0,min:1,max:32}),amount_per_charge:(0,od.NumberNode)({integer:!0,min:1,max:500}),spread_attempts:(0,od.NumberNode)({integer:!0,min:1,max:64}),growth_rounds:(0,od.NumberNode)({integer:!0,min:0,max:8}),spread_rounds:(0,od.NumberNode)({integer:!0,min:0,max:8}),extra_rare_growths:(0,ad.IntProvider)(),catalyst_chance:(0,od.NumberNode)({min:0,max:1})},"minecraft:sea_pickle":{count:(0,ad.IntProvider)({min:0,max:256})},"minecraft:seagrass":{probability:(0,od.NumberNode)({min:0,max:1})},"minecraft:simple_block":{to_place:i("block_state_provider")},"minecraft:simple_random_selector":{features:(0,ad.Tag)({resource:"$worldgen/placed_feature",inlineSchema:"placed_feature"})},"minecraft:spring_feature":{state:i("fluid_state"),rock_count:(0,od.NumberNode)({integer:!0}),hole_count:(0,od.NumberNode)({integer:!0}),requires_block_below:(0,od.BooleanNode)(),valid_blocks:(0,ad.Tag)({resource:"block"})},"minecraft:surface_disk":l,"minecraft:tree":{ignore_vines:(0,od.Opt)((0,od.BooleanNode)()),force_dirt:(0,od.Opt)((0,od.BooleanNode)()),minimum_size:i("feature_size"),dirt_provider:i("block_state_provider"),trunk_provider:i("block_state_provider"),foliage_provider:i("block_state_provider"),root_placer:(0,od.Opt)((0,od.ObjectNode)({type:n({validator:"resource",params:{pool:"worldgen/root_placer_type"}}),[od.Switch]:[{push:"type"}],[od.Case]:{"minecraft:mangrove_root_placer":{can_grow_through:(0,ad.Tag)({resource:"block"}),muddy_roots_in:(0,ad.Tag)({resource:"block"}),muddy_roots_provider:i("block_state_provider"),max_root_width:(0,od.NumberNode)({integer:!0,min:1,max:12}),max_root_length:(0,od.NumberNode)({integer:!0,min:1,max:64}),y_offset:(0,ad.IntProvider)(),random_skew_chance:(0,od.NumberNode)({min:0,max:1})}}},{context:"root_placer"})),trunk_placer:(0,od.ObjectNode)({type:n({validator:"resource",params:{pool:"worldgen/trunk_placer_type"}}),base_height:(0,od.NumberNode)({integer:!0,min:0,max:32}),height_rand_a:(0,od.NumberNode)({integer:!0,min:0,max:24}),height_rand_b:(0,od.NumberNode)({integer:!0,min:0,max:24}),[od.Switch]:[{push:"type"}],[od.Case]:{"minecraft:bending_trunk_placer":{bend_length:(0,ad.IntProvider)({min:1,max:64}),min_height_for_leaves:(0,od.Opt)((0,od.NumberNode)({integer:!0,min:1}))},"minecraft:upwards_branching_trunk_placer":{extra_branch_steps:(0,ad.IntProvider)({min:1}),extra_branch_length:(0,ad.IntProvider)({min:0}),place_branch_per_log_probability:(0,od.NumberNode)({min:0,max:1}),can_grow_through:(0,ad.Tag)({resource:"block"})}}},{context:"trunk_placer"}),foliage_placer:(0,od.ObjectNode)({type:n({validator:"resource",params:{pool:"worldgen/foliage_placer_type"}}),radius:(0,ad.IntProvider)({min:0,max:16}),offset:(0,ad.IntProvider)({min:0,max:16}),[od.Switch]:[{push:"type"}],[od.Case]:{"minecraft:blob_foliage_placer":{height:(0,od.NumberNode)({integer:!0,min:0,max:16})},"minecraft:bush_foliage_placer":{height:(0,od.NumberNode)({integer:!0,min:0,max:16})},"minecraft:fancy_foliage_placer":{height:(0,od.NumberNode)({integer:!0,min:0,max:16})},"minecraft:jungle_foliage_placer":{height:(0,od.NumberNode)({integer:!0,min:0,max:16})},"minecraft:mega_pine_foliage_placer":{crown_height:(0,ad.IntProvider)({min:0,max:24})},"minecraft:pine_foliage_placer":{height:(0,ad.IntProvider)({min:0,max:24})},"minecraft:random_spread_foliage_placer":{foliage_height:(0,ad.IntProvider)({min:1,max:512}),leaf_placement_attempts:(0,od.NumberNode)({integer:!0,min:0,max:256})},"minecraft:spruce_foliage_placer":{trunk_height:(0,ad.IntProvider)({min:0,max:24})}}},{context:"foliage_placer",disableSwitchContext:!0}),decorators:(0,od.ListNode)((0,od.ObjectNode)({type:n({validator:"resource",params:{pool:"worldgen/tree_decorator_type"}}),[od.Switch]:[{push:"type"}],[od.Case]:{"minecraft:alter_ground":{provider:i("block_state_provider")},"minecraft:attached_to_leaves":{probability:(0,od.NumberNode)({min:0,max:1}),exclusion_radius_xz:(0,od.NumberNode)({integer:!0,min:0,max:16}),exclusion_radius_y:(0,od.NumberNode)({integer:!0,min:0,max:16}),required_empty_blocks:(0,od.NumberNode)({integer:!0,min:1,max:16}),block_provider:i("block_state_provider"),directions:(0,od.ListNode)(n({enum:"direction"}))},"minecraft:beehive":{probability:(0,od.NumberNode)({min:0,max:1})},"minecraft:cocoa":{probability:(0,od.NumberNode)({min:0,max:1})},"minecraft:leave_vine":{probability:(0,od.NumberNode)({min:0,max:1})}}},{context:"tree_decorator"}))},"minecraft:twisting_vines":{spread_width:(0,od.NumberNode)({integer:!0,min:1}),spread_height:(0,od.NumberNode)({integer:!0,min:1}),max_height:(0,od.NumberNode)({integer:!0,min:1})},"minecraft:underwater_magma":{floor_search_range:(0,od.NumberNode)({integer:!0,min:0,max:512}),placement_radius_around_floor:(0,od.NumberNode)({integer:!0,min:0,max:64}),placement_probability_per_valid_position:(0,od.NumberNode)({min:0,max:1})},"minecraft:vegetation_patch":p,"minecraft:waterlogged_vegetation_patch":p}},{context:"feature"})},{context:"feature"}),{default:()=>({type:"minecraft:tree",config:{minimum_size:{type:"minecraft:two_layers_feature_size"},trunk_placer:{type:"minecraft:straight_trunk_placer",base_height:5,height_rand_a:2,height_rand_b:0},foliage_placer:{type:"minecraft:blob_foliage_placer",radius:2,offset:0,height:3}}})})),e.register("placed_feature",(0,od.Mod)((0,od.ObjectNode)({feature:r,placement:(0,od.ListNode)(i("decorator"))},{context:"placed_feature"}),{default:()=>({feature:"minecraft:oak",placement:[{type:"minecraft:count",count:4},{type:"minecraft:in_square"},{type:"minecraft:heightmap",heightmap:"OCEAN_FLOOR"}]})})),e.register("feature_size",(0,od.Mod)((0,od.ObjectNode)({type:n({validator:"resource",params:{pool:"worldgen/feature_size_type"}}),min_clipped_height:(0,od.Opt)((0,od.NumberNode)({min:0,max:80})),[od.Switch]:[{push:"type"}],[od.Case]:{"minecraft:two_layers_feature_size":{limit:(0,od.Opt)((0,od.NumberNode)({integer:!0,min:0,max:81})),lower_size:(0,od.Opt)((0,od.NumberNode)({integer:!0,min:0,max:16})),upper_size:(0,od.Opt)((0,od.NumberNode)({integer:!0,min:0,max:16}))},"minecraft:three_layers_feature_size":{limit:(0,od.Opt)((0,od.NumberNode)({integer:!0,min:0,max:80})),upper_limit:(0,od.Opt)((0,od.NumberNode)({integer:!0,min:0,max:80})),lower_size:(0,od.Opt)((0,od.NumberNode)({integer:!0,min:0,max:16})),middle_size:(0,od.Opt)((0,od.NumberNode)({integer:!0,min:0,max:16})),upper_size:(0,od.Opt)((0,od.NumberNode)({integer:!0,min:0,max:16}))}}},{disableSwitchContext:!0}),{default:()=>({type:"minecraft:two_layers_feature_size"})}));const m={seed:(0,od.NumberNode)({integer:!0}),noise:i("noise_parameters"),scale:(0,od.Mod)((0,od.NumberNode)({min:Number.MIN_VALUE}),{default:()=>1})};e.register("block_state_provider",(0,od.Mod)((0,od.ObjectNode)({type:n({validator:"resource",params:{pool:"worldgen/block_state_provider_type"}}),[od.Switch]:[{push:"type"}],[od.Case]:{"minecraft:dual_noise_provider":c(s({},m),{variety:(0,ad.InclusiveRange)({integer:!0,min:1,max:64}),slow_noise:i("noise_parameters"),slow_scale:(0,od.Mod)((0,od.NumberNode)({min:Number.MIN_VALUE}),{default:()=>1}),states:(0,od.ListNode)(i("block_state"))}),"minecraft:noise_threshold_provider":c(s({},m),{threshold:(0,od.NumberNode)({min:-1,max:1}),high_chance:(0,od.NumberNode)({min:0,max:1}),default_state:i("block_state"),low_states:(0,od.ListNode)(i("block_state")),high_states:(0,od.ListNode)(i("block_state"))}),"minecraft:noise_provider":c(s({},m),{states:(0,od.ListNode)(i("block_state"))}),"minecraft:randomized_int_state_provider":{property:n(),values:(0,ad.IntProvider)(),source:i("block_state_provider")},"minecraft:rotated_block_provider":{state:i("block_state")},"minecraft:simple_state_provider":{state:i("block_state")},"minecraft:weighted_state_provider":{entries:(0,od.ListNode)((0,od.Mod)((0,od.ObjectNode)({weight:(0,od.NumberNode)({integer:!0,min:1}),data:i("block_state")}),{default:()=>({data:{}})}))}}},{context:"block_state_provider"}),{default:()=>({type:"minecraft:simple_state_provider"})}));const f={offset:(0,od.Opt)((0,od.ListNode)((0,od.NumberNode)({integer:!0,min:-16,max:16}),{minLength:3,maxLength:3}))};e.register("block_predicate_worldgen",(0,od.Mod)((0,od.ObjectNode)({type:n({validator:"resource",params:{pool:"block_predicate_type"}}),[od.Switch]:[{push:"type"}],[od.Case]:{"minecraft:all_of":{predicates:(0,od.ListNode)(i("block_predicate_worldgen"))},"minecraft:any_of":{predicates:(0,od.ListNode)(i("block_predicate_worldgen"))},"minecraft:has_sturdy_face":c(s({},f),{direction:n({enum:"direction"})}),"minecraft:inside_world_bounds":s({},f),"minecraft:matching_block_tag":c(s({},f),{tag:n({validator:"resource",params:{pool:"$tag/block"}})}),"minecraft:matching_blocks":c(s({},f),{blocks:(0,ad.Tag)({resource:"block"})}),"minecraft:matching_fluids":c(s({},f),{fluids:(0,ad.Tag)({resource:"fluid"})}),"minecraft:not":{predicate:i("block_predicate_worldgen")},"minecraft:would_survive":c(s({},f),{state:i("block_state")})}},{context:"block_predicate"}),{default:()=>({type:"minecraft:true"})}))};var cd={};Object.defineProperty(cd,"__esModule",{value:!0}),cd.initNoiseSettingsSchemas=void 0;const ld=Pe,ud=bu,dd=ed;cd.initNoiseSettingsSchemas=function(e,t){const i=ld.Reference.bind(void 0,e),n=ld.StringNode.bind(void 0,t);e.register("noise_settings",(0,ld.Mod)((0,ld.ObjectNode)({sea_level:(0,ld.NumberNode)({integer:!0}),disable_mob_generation:(0,ld.BooleanNode)(),aquifers_enabled:(0,ld.BooleanNode)(),ore_veins_enabled:(0,ld.BooleanNode)(),legacy_random_source:(0,ld.BooleanNode)(),default_block:i("block_state"),default_fluid:i("block_state"),noise:(0,ld.ObjectNode)({min_y:(0,ld.NumberNode)({integer:!0,min:-2048,max:2047}),height:(0,ld.NumberNode)({integer:!0,min:0,max:4096}),size_horizontal:(0,ld.NumberNode)({integer:!0}),size_vertical:(0,ld.NumberNode)({integer:!0})}),noise_router:(0,ld.ObjectNode)({barrier:dd.DensityFunction,fluid_level_floodedness:dd.DensityFunction,fluid_level_spread:dd.DensityFunction,lava:dd.DensityFunction,temperature:dd.DensityFunction,vegetation:dd.DensityFunction,continents:dd.DensityFunction,erosion:dd.DensityFunction,depth:dd.DensityFunction,ridges:dd.DensityFunction,initial_density_without_jaggedness:dd.DensityFunction,final_density:dd.DensityFunction,vein_toggle:dd.DensityFunction,vein_ridged:dd.DensityFunction,vein_gap:dd.DensityFunction}),spawn_target:(0,ld.ListNode)(i("parameter_point")),surface_rule:i("material_rule")},{context:"noise_settings"}),(e=>({default:()=>ud.DefaultNoiseSettings,validate:(t,i,n,r)=>{var o,a,s,c;return(null===(o=null==(i=e.validate(t,i,n,r))?void 0:i.noise)||void 0===o?void 0:o.min_y)+(null===(a=null==i?void 0:i.noise)||void 0===a?void 0:a.height)>2047&&n.add(t.push("noise").push("height"),"error.min_y_plus_height",2047),(null===(s=null==i?void 0:i.noise)||void 0===s?void 0:s.height)%16!=0&&n.add(t.push("noise").push("height"),"error.height_multiple",16),(null===(c=null==i?void 0:i.noise)||void 0===c?void 0:c.min_y)%16!=0&&n.add(t.push("noise").push("min_y"),"error.min_y_multiple",16),i}})))),e.register("noise_slider",(0,ld.ObjectNode)({target:(0,ld.NumberNode)(),size:(0,ld.NumberNode)({integer:!0,min:0}),offset:(0,ld.NumberNode)({integer:!0})})),e.register("generator_layer",(0,ld.Mod)((0,ld.ObjectNode)({block:n({validator:"resource",params:{pool:"block"}}),height:(0,ld.NumberNode)({integer:!0,min:1})}),{default:()=>({block:"minecraft:stone",height:1})}))};var hd={};Object.defineProperty(hd,"__esModule",{value:!0}),hd.initStructureSchemas=void 0;const pd=Pe,md=bu,fd=Gu;hd.initStructureSchemas=function(e,t){const i=pd.StringNode.bind(void 0,t),n=pd.Reference.bind(void 0,e);e.register("structure",(0,pd.Mod)((0,pd.ObjectNode)({type:i({validator:"resource",params:{pool:"worldgen/structure_type"}}),biomes:(0,md.Tag)({resource:"$worldgen/biome"}),step:i({enum:"decoration_step"}),spawn_overrides:(0,pd.MapNode)(i({enum:"mob_category"}),(0,pd.ObjectNode)({bounding_box:i({enum:["piece","full"]}),spawns:fd.MobCategorySpawnSettings})),terrain_adaptation:(0,pd.Opt)(i({enum:["none","beard_thin","beard_box","bury"]})),[pd.Switch]:[{push:"type"}],[pd.Case]:{"minecraft:jigsaw":{start_pool:i({validator:"resource",params:{pool:"$worldgen/template_pool"}}),size:(0,pd.NumberNode)({integer:!0}),start_height:n("height_provider"),project_start_to_heightmap:(0,pd.Opt)(i({enum:"heightmap_type"})),max_distance_from_center:(0,pd.NumberNode)({integer:!0,min:1,max:128}),use_expansion_hack:(0,pd.BooleanNode)()},"minecraft:mineshaft":{mineshaft_type:i({enum:["normal","mesa"]})},"minecraft:nether_fossil":{height:n("height_provider")},"minecraft:ocean_ruin":{biome_temp:i({enum:["cold","warm"]}),large_probability:(0,pd.NumberNode)({min:0,max:1}),cluster_probability:(0,pd.NumberNode)({min:0,max:1})},"minecraft:ruined_portal":{setups:(0,pd.ListNode)((0,pd.ObjectNode)({placement:i({enum:["on_land_surface","partly_buried","on_ocean_floor","in_mountain","underground","in_nether"]}),air_pocket_probability:(0,pd.NumberNode)({min:0,max:1}),mossiness:(0,pd.NumberNode)({min:0,max:1}),overgrown:(0,pd.BooleanNode)(),vines:(0,pd.BooleanNode)(),can_be_cold:(0,pd.BooleanNode)(),replace_with_blackstone:(0,pd.BooleanNode)(),weight:(0,pd.NumberNode)({min:0})}))},"minecraft:shipwreck":{is_beached:(0,pd.Opt)((0,pd.BooleanNode)())}}},{context:"structure_feature"}),{default:()=>({type:"minecraft:jigsaw",step:"surface_structures",size:6})}))};var gd={};Object.defineProperty(gd,"__esModule",{value:!0}),gd.initStructureSetSchemas=void 0;const _d=Pe,bd=bu;gd.initStructureSetSchemas=function(e,t){const i=_d.StringNode.bind(void 0,t),n=_d.Reference.bind(void 0,e),r=(0,_d.ChoiceNode)([{type:"string",node:i({validator:"resource",params:{pool:"$worldgen/structure_set"}})},{type:"object",node:n("structure_set")}],{choiceContext:"structure_set"});e.register("structure_set",(0,_d.ObjectNode)({structures:(0,_d.ListNode)((0,_d.ObjectNode)({structure:(0,bd.Tag)({resource:"$worldgen/structure"}),weight:(0,_d.NumberNode)({integer:!0,min:1})})),placement:n("structure_placement")},{context:"structure_set"})),e.register("structure_placement",(0,_d.Mod)((0,_d.ObjectNode)({type:i({validator:"resource",params:{pool:"worldgen/structure_placement"}}),salt:(0,_d.NumberNode)({integer:!0,min:0}),frequency_reduction_method:(0,_d.Opt)(i({enum:["default","legacy_type_1","legacy_type_2","legacy_type_3"]})),frequency:(0,_d.Opt)((0,_d.NumberNode)({min:0,max:1})),exclusion_zone:(0,_d.Opt)((0,_d.ObjectNode)({other_set:r,chunk_count:(0,_d.NumberNode)({integer:!0,min:1,max:16})})),locate_offset:(0,_d.Opt)((0,_d.ListNode)((0,_d.NumberNode)({integer:!0,min:-16,max:16}),{minLength:3,maxLength:3})),[_d.Switch]:[{push:"type"}],[_d.Case]:{"minecraft:concentric_rings":{distance:(0,_d.NumberNode)({integer:!0,min:0,max:1023}),spread:(0,_d.NumberNode)({integer:!0,min:0,max:1023}),count:(0,_d.NumberNode)({integer:!0,min:1,max:4095}),preferred_biomes:(0,bd.Tag)({resource:"$worldgen/biome"})},"minecraft:random_spread":{spread_type:(0,_d.Opt)(i({enum:["linear","triangular"]})),spacing:(0,_d.NumberNode)({integer:!0,min:0,max:4096}),separation:(0,_d.Mod)((0,_d.NumberNode)({integer:!0,min:0,max:4096}),(e=>({validate:(t,i,n,r)=>(t.pop().push("spacing").get()<=i&&n.add(t,"error.separation_smaller_spacing"),e.validate(t,i,n,r))})))}}},{context:"structure_placement"}),{default:()=>({type:"minecraft:random_spread",spacing:10,separation:5,salt:Math.floor(2147483647*Math.random())})}))};var vd={};Object.defineProperty(vd,"__esModule",{value:!0}),vd.initSurfaceRuleSchemas=void 0;const yd=Pe;vd.initSurfaceRuleSchemas=function(e,t){const i=yd.StringNode.bind(void 0,t),n=yd.Reference.bind(void 0,e);e.register("material_rule",(0,yd.Mod)((0,yd.ObjectNode)({type:i({validator:"resource",params:{pool:"worldgen/material_rule"}}),[yd.Switch]:[{push:"type"}],[yd.Case]:{"minecraft:block":{result_state:n("block_state")},"minecraft:condition":{if_true:n("material_condition"),then_run:n("material_rule")},"minecraft:sequence":{sequence:(0,yd.ListNode)(n("material_rule"))}}},{context:"material_rule",category:"pool"}),{default:()=>({type:"minecraft:block",result_state:{Name:"minecraft:stone"}})})),e.register("material_condition",(0,yd.Mod)((0,yd.ObjectNode)({type:i({validator:"resource",params:{pool:"worldgen/material_condition"}}),[yd.Switch]:[{push:"type"}],[yd.Case]:{"minecraft:biome":{biome_is:(0,yd.ListNode)(i({validator:"resource",params:{pool:"$worldgen/biome"}}))},"minecraft:noise_threshold":{noise:i({validator:"resource",params:{pool:"$worldgen/noise"}}),min_threshold:(0,yd.NumberNode)(),max_threshold:(0,yd.NumberNode)()},"minecraft:not":{invert:n("material_condition")},"minecraft:stone_depth":{offset:(0,yd.NumberNode)({integer:!0}),surface_type:i({enum:"cave_surface"}),add_surface_depth:(0,yd.BooleanNode)(),secondary_depth_range:(0,yd.NumberNode)({integer:!0})},"minecraft:vertical_gradient":{random_name:i(),true_at_and_below:n("vertical_anchor"),false_at_and_above:n("vertical_anchor")},"minecraft:water":{offset:(0,yd.NumberNode)({integer:!0}),surface_depth_multiplier:(0,yd.NumberNode)({integer:!0,min:-20,max:20}),add_stone_depth:(0,yd.BooleanNode)()},"minecraft:y_above":{anchor:n("vertical_anchor"),surface_depth_multiplier:(0,yd.NumberNode)({integer:!0,min:-20,max:20}),add_stone_depth:(0,yd.BooleanNode)()}}},{context:"material_condition"}),{default:()=>({type:"minecraft:biome",is_biome:"minecraft:plains"})}))};var wd={};Object.defineProperty(wd,"__esModule",{value:!0}),wd.initTemplatePoolSchemas=void 0;const xd=Pe,Nd=id;wd.initTemplatePoolSchemas=function(e,t){const i=xd.Reference.bind(void 0,e),n=xd.StringNode.bind(void 0,t);e.register("template_pool",(0,xd.Mod)((0,xd.ObjectNode)({name:n(),fallback:n(),elements:(0,xd.ListNode)(i("template_weighted_element"))},{context:"template_pool"}),{default:()=>({fallback:"minecraft:empty",elements:[{weight:1,element:{element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"}}]})})),e.register("template_weighted_element",(0,xd.Mod)((0,xd.ObjectNode)({weight:(0,xd.NumberNode)({integer:!0,min:1}),element:i("template_element")},{category:"pool"}),{default:()=>({weight:1,element:{element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"}})})),e.register("template_element",(0,xd.Mod)((0,xd.ObjectNode)({element_type:n({validator:"resource",params:{pool:"worldgen/structure_pool_element"}}),projection:n({enum:["rigid","terrain_matching"]}),[xd.Switch]:[{push:"element_type"}],[xd.Case]:{"minecraft:feature_pool_element":{feature:n({validator:"resource",params:{pool:"$worldgen/placed_feature"}})},"minecraft:legacy_single_pool_element":{location:n({validator:"resource",params:{pool:"$structure"}}),processors:Nd.Processors},"minecraft:list_pool_element":{elements:(0,xd.ListNode)(i("template_element"))},"minecraft:single_pool_element":{location:n({validator:"resource",params:{pool:"$structure"}}),processors:Nd.Processors}}},{context:"template_element",disableSwitchContext:!0}),{default:()=>({element_type:"minecraft:single_pool_element",projection:"rigid",processors:"minecraft:empty"})}))};var kd={};Object.defineProperty(kd,"__esModule",{value:!0}),kd.initWorldPresetSchemas=void 0;const Ad=Pe;kd.initWorldPresetSchemas=function(e,t){const i=Ad.StringNode.bind(void 0,t),n=Ad.Reference.bind(void 0,e);e.register("world_preset",(0,Ad.Mod)((0,Ad.ObjectNode)({dimensions:(0,Ad.MapNode)(i({validator:"resource",params:{pool:"$dimension",isDefinition:!0}}),n("dimension"))},{context:"world_preset"}),{default:()=>({dimensions:{"minecraft:overworld":{type:"minecraft:overworld",generator:{type:"minecraft:noise",biome_source:{type:"minecraft:multi_noise",preset:"minecraft:overworld"},settings:"minecraft:overworld"}},"minecraft:the_nether":{type:"minecraft:the_nether",generator:{type:"minecraft:noise",biome_source:{type:"minecraft:multi_noise",preset:"minecraft:nether"},settings:"minecraft:nether"}},"minecraft:the_end":{type:"minecraft:the_end",generator:{type:"minecraft:noise",biome_source:{type:"minecraft:the_end"},settings:"minecraft:end"}}}})})),e.register("flat_level_generator_preset",(0,Ad.Mod)((0,Ad.ObjectNode)({display:i({validator:"resource",params:{pool:"item"}}),settings:n("flat_generator_settings")}),{default:()=>({display:"minecraft:grass_block",settings:{lakes:!1,features:!1,biome:"minecraft:plains",structure_overrides:[],layers:[{height:3,block:"minecraft:dirt"},{height:1,block:"minecraft:grass_block"}]}})}))},Object.defineProperty(Vu,"__esModule",{value:!0}),Vu.initWorldgenSchemas=void 0;const Cd=Gu,Od=Ku,Sd=Yu,Ed=ed,Fd=td,Dd=cd,Bd=id,Ld=hd,Md=gd,Td=vd,Rd=wd,$d=kd;Vu.initWorldgenSchemas=function(e,t){(0,Bd.initProcessorListSchemas)(e,t),(0,Ed.initDensityFunctionSchemas)(e,t),(0,Cd.initBiomeSchemas)(e,t),(0,Od.initCarverSchemas)(e,t),(0,Sd.initDecoratorSchemas)(e,t),(0,Fd.initFeatureSchemas)(e,t),(0,Dd.initNoiseSettingsSchemas)(e,t),(0,Ld.initStructureSchemas)(e,t),(0,Md.initStructureSetSchemas)(e,t),(0,Td.initSurfaceRuleSchemas)(e,t),(0,Rd.initTemplatePoolSchemas)(e,t),(0,$d.initWorldPresetSchemas)(e,t)};var jd={};Object.defineProperty(jd,"__esModule",{value:!0}),jd.initWorldSettingsSchemas=void 0;const Id=Pe;jd.initWorldSettingsSchemas=function(e,t){const i=Id.Reference.bind(void 0,e),n=Id.StringNode.bind(void 0,t);e.register("world_settings",(0,Id.Mod)((0,Id.ObjectNode)({generate_features:(0,Id.BooleanNode)(),bonus_chest:(0,Id.BooleanNode)(),seed:(0,Id.NumberNode)({integer:!0}),dimensions:(0,Id.MapNode)(n({validator:"resource",params:{pool:"$dimension"}}),i("dimension"))},{context:"world_settings"}),{default:()=>{const e=Math.floor(4294967296*Math.random())-2147483648;return{generate_features:!0,bonus_chest:!1,seed:e,dimensions:{"minecraft:overworld":{type:"minecraft:overworld",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:multi_noise",preset:"minecraft:overworld"},settings:"minecraft:overworld"}},"minecraft:the_nether":{type:"minecraft:the_nether",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:multi_noise",preset:"minecraft:nether"},settings:"minecraft:nether"}},"minecraft:the_end":{type:"minecraft:the_end",generator:{type:"minecraft:noise",seed:e,biome_source:{type:"minecraft:the_end",seed:e},settings:"minecraft:end"}}}}}}))},Object.defineProperty(cu,"__esModule",{value:!0}),cu.initSchemas=void 0;const Pd=lu,zd=du,Ud=bu,Wd=vu,Hd=xu,qd=Au,Vd=Su,Gd=Du,Kd=Ru,Xd=ju,Jd=Pu,Yd=Uu,Zd=Hu,Qd=Vu,eh=jd;cu.initSchemas=function(e,t){(0,Ud.initCommonSchemas)(e,t),(0,Pd.initAdvancementSchemas)(e,t),(0,zd.initAssetsSchemas)(e,t),(0,Wd.initConditionSchemas)(e,t),(0,qd.initDimensionTypeSchemas)(e,t),(0,Hd.initDimensionSchemas)(e,t),(0,Vd.initItemModifierSchemas)(e,t),(0,Gd.initLootTableSchemas)(e,t),(0,Kd.initPackMcmetaSchemas)(e,t),(0,Xd.initPredicatesSchemas)(e,t),(0,Jd.initRecipeSchemas)(e,t),(0,Yd.initTagsSchemas)(e,t),(0,Zd.initTextComponentSchemas)(e,t),(0,Qd.initWorldgenSchemas)(e,t),(0,eh.initWorldSettingsSchemas)(e,t)};var th=Ie&&Ie.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,r)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),ih=Ie&&Ie.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),nh=Ie&&Ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&th(t,e,i);return ih(t,e),t};Object.defineProperty(au,"__esModule",{value:!0});var rh=au.getSchemas=au.getCollections=au.lootContext=void 0;const oh=Pe,ah=su,sh=cu;var ch=au.lootContext=nh(Bu);var lh=au.getCollections=function(){const e=new oh.CollectionRegistry;return(0,ah.initCollections)(e),e};rh=au.getSchemas=function(e){const t=new oh.SchemaRegistry;return(0,sh.initSchemas)(t,e),t};var uh,dh,hh=Object.freeze(Object.assign(Object.create(null),au,{[Symbol.toStringTag]:"Module",get getSchemas(){return rh},get getCollections(){return lh},get lootContext(){return ch},default:au})),ph={exports:{}};uh=ph,dh=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",n={};function r(e,t){if(!n[e]){n[e]={};for(var i=0;i<e.length;i++)n[e][e.charAt(i)]=i}return n[e][t]}var o={compressToBase64:function(e){if(null==e)return"";var i=o._compress(e,6,(function(e){return t.charAt(e)}));switch(i.length%4){default:case 0:return i;case 1:return i+"===";case 2:return i+"==";case 3:return i+"="}},decompressFromBase64:function(e){return null==e?"":""==e?null:o._decompress(e.length,32,(function(i){return r(t,e.charAt(i))}))},compressToUTF16:function(t){return null==t?"":o._compress(t,15,(function(t){return e(t+32)}))+" "},decompressFromUTF16:function(e){return null==e?"":""==e?null:o._decompress(e.length,16384,(function(t){return e.charCodeAt(t)-32}))},compressToUint8Array:function(e){for(var t=o.compress(e),i=new Uint8Array(2*t.length),n=0,r=t.length;n<r;n++){var a=t.charCodeAt(n);i[2*n]=a>>>8,i[2*n+1]=a%256}return i},decompressFromUint8Array:function(t){if(null==t)return o.decompress(t);for(var i=new Array(t.length/2),n=0,r=i.length;n<r;n++)i[n]=256*t[2*n]+t[2*n+1];var a=[];return i.forEach((function(t){a.push(e(t))})),o.decompress(a.join(""))},compressToEncodedURIComponent:function(e){return null==e?"":o._compress(e,6,(function(e){return i.charAt(e)}))},decompressFromEncodedURIComponent:function(e){return null==e?"":""==e?null:(e=e.replace(/ /g,"+"),o._decompress(e.length,32,(function(t){return r(i,e.charAt(t))})))},compress:function(t){return o._compress(t,16,(function(t){return e(t)}))},_compress:function(e,t,i){if(null==e)return"";var n,r,o,a={},s={},c="",l="",u="",d=2,h=3,p=2,m=[],f=0,g=0;for(o=0;o<e.length;o+=1)if(c=e.charAt(o),Object.prototype.hasOwnProperty.call(a,c)||(a[c]=h++,s[c]=!0),l=u+c,Object.prototype.hasOwnProperty.call(a,l))u=l;else{if(Object.prototype.hasOwnProperty.call(s,u)){if(u.charCodeAt(0)<256){for(n=0;n<p;n++)f<<=1,g==t-1?(g=0,m.push(i(f)),f=0):g++;for(r=u.charCodeAt(0),n=0;n<8;n++)f=f<<1|1&r,g==t-1?(g=0,m.push(i(f)),f=0):g++,r>>=1}else{for(r=1,n=0;n<p;n++)f=f<<1|r,g==t-1?(g=0,m.push(i(f)),f=0):g++,r=0;for(r=u.charCodeAt(0),n=0;n<16;n++)f=f<<1|1&r,g==t-1?(g=0,m.push(i(f)),f=0):g++,r>>=1}0==--d&&(d=Math.pow(2,p),p++),delete s[u]}else for(r=a[u],n=0;n<p;n++)f=f<<1|1&r,g==t-1?(g=0,m.push(i(f)),f=0):g++,r>>=1;0==--d&&(d=Math.pow(2,p),p++),a[l]=h++,u=String(c)}if(""!==u){if(Object.prototype.hasOwnProperty.call(s,u)){if(u.charCodeAt(0)<256){for(n=0;n<p;n++)f<<=1,g==t-1?(g=0,m.push(i(f)),f=0):g++;for(r=u.charCodeAt(0),n=0;n<8;n++)f=f<<1|1&r,g==t-1?(g=0,m.push(i(f)),f=0):g++,r>>=1}else{for(r=1,n=0;n<p;n++)f=f<<1|r,g==t-1?(g=0,m.push(i(f)),f=0):g++,r=0;for(r=u.charCodeAt(0),n=0;n<16;n++)f=f<<1|1&r,g==t-1?(g=0,m.push(i(f)),f=0):g++,r>>=1}0==--d&&(d=Math.pow(2,p),p++),delete s[u]}else for(r=a[u],n=0;n<p;n++)f=f<<1|1&r,g==t-1?(g=0,m.push(i(f)),f=0):g++,r>>=1;0==--d&&(d=Math.pow(2,p),p++)}for(r=2,n=0;n<p;n++)f=f<<1|1&r,g==t-1?(g=0,m.push(i(f)),f=0):g++,r>>=1;for(;;){if(f<<=1,g==t-1){m.push(i(f));break}g++}return m.join("")},decompress:function(e){return null==e?"":""==e?null:o._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(t,i,n){var r,o,a,s,c,l,u,d=[],h=4,p=4,m=3,f="",g=[],_={val:n(0),position:i,index:1};for(r=0;r<3;r+=1)d[r]=r;for(a=0,c=Math.pow(2,2),l=1;l!=c;)s=_.val&_.position,_.position>>=1,0==_.position&&(_.position=i,_.val=n(_.index++)),a|=(s>0?1:0)*l,l<<=1;switch(a){case 0:for(a=0,c=Math.pow(2,8),l=1;l!=c;)s=_.val&_.position,_.position>>=1,0==_.position&&(_.position=i,_.val=n(_.index++)),a|=(s>0?1:0)*l,l<<=1;u=e(a);break;case 1:for(a=0,c=Math.pow(2,16),l=1;l!=c;)s=_.val&_.position,_.position>>=1,0==_.position&&(_.position=i,_.val=n(_.index++)),a|=(s>0?1:0)*l,l<<=1;u=e(a);break;case 2:return""}for(d[3]=u,o=u,g.push(u);;){if(_.index>t)return"";for(a=0,c=Math.pow(2,m),l=1;l!=c;)s=_.val&_.position,_.position>>=1,0==_.position&&(_.position=i,_.val=n(_.index++)),a|=(s>0?1:0)*l,l<<=1;switch(u=a){case 0:for(a=0,c=Math.pow(2,8),l=1;l!=c;)s=_.val&_.position,_.position>>=1,0==_.position&&(_.position=i,_.val=n(_.index++)),a|=(s>0?1:0)*l,l<<=1;d[p++]=e(a),u=p-1,h--;break;case 1:for(a=0,c=Math.pow(2,16),l=1;l!=c;)s=_.val&_.position,_.position>>=1,0==_.position&&(_.position=i,_.val=n(_.index++)),a|=(s>0?1:0)*l,l<<=1;d[p++]=e(a),u=p-1,h--;break;case 2:return g.join("")}if(0==h&&(h=Math.pow(2,m),m++),d[u])f=d[u];else{if(u!==p)return null;f=o+o.charAt(0)}g.push(f),d[p++]=o+f.charAt(0),o=f,0==--h&&(h=Math.pow(2,m),m++)}}};return o}(),null!=uh&&(uh.exports=dh);var mh=ph.exports;
/*! pako 2.0.4 https://github.com/nodeca/pako @license (MIT AND Zlib) */function fh(e){let t=e.length;for(;--t>=0;)e[t]=0}const gh=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),_h=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),bh=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),vh=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yh=new Array(576);fh(yh);const wh=new Array(60);fh(wh);const xh=new Array(512);fh(xh);const Nh=new Array(256);fh(Nh);const kh=new Array(29);fh(kh);const Ah=new Array(30);function Ch(e,t,i,n,r){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=n,this.max_length=r,this.has_stree=e&&e.length}let Oh,Sh,Eh;function Fh(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}fh(Ah);const Dh=e=>e<256?xh[e]:xh[256+(e>>>7)],Bh=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Lh=(e,t,i)=>{e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,Bh(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)},Mh=(e,t,i)=>{Lh(e,i[2*t],i[2*t+1])},Th=(e,t)=>{let i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1},Rh=(e,t,i)=>{const n=new Array(16);let r,o,a=0;for(r=1;r<=15;r++)n[r]=a=a+i[r-1]<<1;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=Th(n[t]++,t))}},$h=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},jh=e=>{e.bi_valid>8?Bh(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Ih=(e,t,i,n)=>{const r=2*t,o=2*i;return e[r]<e[o]||e[r]===e[o]&&n[t]<=n[i]},Ph=(e,t,i)=>{const n=e.heap[i];let r=i<<1;for(;r<=e.heap_len&&(r<e.heap_len&&Ih(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!Ih(t,n,e.heap[r],e.depth));)e.heap[i]=e.heap[r],i=r,r<<=1;e.heap[i]=n},zh=(e,t,i)=>{let n,r,o,a,s=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],r=e.pending_buf[e.l_buf+s],s++,0===n?Mh(e,r,t):(o=Nh[r],Mh(e,o+256+1,t),a=gh[o],0!==a&&(r-=kh[o],Lh(e,r,a)),n--,o=Dh(n),Mh(e,o,i),a=_h[o],0!==a&&(n-=Ah[o],Lh(e,n,a)))}while(s<e.last_lit);Mh(e,256,t)},Uh=(e,t)=>{const i=t.dyn_tree,n=t.stat_desc.static_tree,r=t.stat_desc.has_stree,o=t.stat_desc.elems;let a,s,c,l=-1;for(e.heap_len=0,e.heap_max=573,a=0;a<o;a++)0!==i[2*a]?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):i[2*a+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=l<2?++l:0,i[2*c]=1,e.depth[c]=0,e.opt_len--,r&&(e.static_len-=n[2*c+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)Ph(e,i,a);c=o;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ph(e,i,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,i[2*c]=i[2*a]+i[2*s],e.depth[c]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,i[2*a+1]=i[2*s+1]=c,e.heap[1]=c++,Ph(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const i=t.dyn_tree,n=t.max_code,r=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let l,u,d,h,p,m,f=0;for(h=0;h<=15;h++)e.bl_count[h]=0;for(i[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)u=e.heap[l],h=i[2*i[2*u+1]+1]+1,h>c&&(h=c,f++),i[2*u+1]=h,u>n||(e.bl_count[h]++,p=0,u>=s&&(p=a[u-s]),m=i[2*u],e.opt_len+=m*(h+p),o&&(e.static_len+=m*(r[2*u+1]+p)));if(0!==f){do{for(h=c-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,f-=2}while(f>0);for(h=c;0!==h;h--)for(u=e.bl_count[h];0!==u;)d=e.heap[--l],d>n||(i[2*d+1]!==h&&(e.opt_len+=(h-i[2*d+1])*i[2*d],i[2*d+1]=h),u--)}})(e,t),Rh(i,l,e.bl_count)},Wh=(e,t,i)=>{let n,r,o=-1,a=t[1],s=0,c=7,l=4;for(0===a&&(c=138,l=3),t[2*(i+1)+1]=65535,n=0;n<=i;n++)r=a,a=t[2*(n+1)+1],++s<c&&r===a||(s<l?e.bl_tree[2*r]+=s:0!==r?(r!==o&&e.bl_tree[2*r]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=r,0===a?(c=138,l=3):r===a?(c=6,l=3):(c=7,l=4))},Hh=(e,t,i)=>{let n,r,o=-1,a=t[1],s=0,c=7,l=4;for(0===a&&(c=138,l=3),n=0;n<=i;n++)if(r=a,a=t[2*(n+1)+1],!(++s<c&&r===a)){if(s<l)do{Mh(e,r,e.bl_tree)}while(0!=--s);else 0!==r?(r!==o&&(Mh(e,r,e.bl_tree),s--),Mh(e,16,e.bl_tree),Lh(e,s-3,2)):s<=10?(Mh(e,17,e.bl_tree),Lh(e,s-3,3)):(Mh(e,18,e.bl_tree),Lh(e,s-11,7));s=0,o=r,0===a?(c=138,l=3):r===a?(c=6,l=3):(c=7,l=4)}};let qh=!1;const Vh=(e,t,i,n)=>{Lh(e,0+(n?1:0),3),((e,t,i,n)=>{jh(e),n&&(Bh(e,i),Bh(e,~i)),e.pending_buf.set(e.window.subarray(t,t+i),e.pending),e.pending+=i})(e,t,i,!0)};var Gh={_tr_init:e=>{qh||((()=>{let e,t,i,n,r;const o=new Array(16);for(i=0,n=0;n<28;n++)for(kh[n]=i,e=0;e<1<<gh[n];e++)Nh[i++]=n;for(Nh[i-1]=n,r=0,n=0;n<16;n++)for(Ah[n]=r,e=0;e<1<<_h[n];e++)xh[r++]=n;for(r>>=7;n<30;n++)for(Ah[n]=r<<7,e=0;e<1<<_h[n]-7;e++)xh[256+r++]=n;for(t=0;t<=15;t++)o[t]=0;for(e=0;e<=143;)yh[2*e+1]=8,e++,o[8]++;for(;e<=255;)yh[2*e+1]=9,e++,o[9]++;for(;e<=279;)yh[2*e+1]=7,e++,o[7]++;for(;e<=287;)yh[2*e+1]=8,e++,o[8]++;for(Rh(yh,287,o),e=0;e<30;e++)wh[2*e+1]=5,wh[2*e]=Th(e,5);Oh=new Ch(yh,gh,257,286,15),Sh=new Ch(wh,_h,0,30,15),Eh=new Ch(new Array(0),bh,0,19,7)})(),qh=!0),e.l_desc=new Fh(e.dyn_ltree,Oh),e.d_desc=new Fh(e.dyn_dtree,Sh),e.bl_desc=new Fh(e.bl_tree,Eh),e.bi_buf=0,e.bi_valid=0,$h(e)},_tr_stored_block:Vh,_tr_flush_block:(e,t,i,n)=>{let r,o,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),Uh(e,e.l_desc),Uh(e,e.d_desc),a=(e=>{let t;for(Wh(e,e.dyn_ltree,e.l_desc.max_code),Wh(e,e.dyn_dtree,e.d_desc.max_code),Uh(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*vh[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),r=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=r&&(r=o)):r=o=i+5,i+4<=r&&-1!==t?Vh(e,t,i,n):4===e.strategy||o===r?(Lh(e,2+(n?1:0),3),zh(e,yh,wh)):(Lh(e,4+(n?1:0),3),((e,t,i,n)=>{let r;for(Lh(e,t-257,5),Lh(e,i-1,5),Lh(e,n-4,4),r=0;r<n;r++)Lh(e,e.bl_tree[2*vh[r]+1],3);Hh(e,e.dyn_ltree,t-1),Hh(e,e.dyn_dtree,i-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),zh(e,e.dyn_ltree,e.dyn_dtree)),$h(e),n&&jh(e)},_tr_tally:(e,t,i)=>(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&i,e.last_lit++,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(Nh[i]+256+1)]++,e.dyn_dtree[2*Dh(t)]++),e.last_lit===e.lit_bufsize-1),_tr_align:e=>{Lh(e,2,3),Mh(e,256,yh),(e=>{16===e.bi_valid?(Bh(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}};var Kh=(e,t,i,n)=>{let r=65535&e|0,o=e>>>16&65535|0,a=0;for(;0!==i;){a=i>2e3?2e3:i,i-=a;do{r=r+t[n++]|0,o=o+r|0}while(--a);r%=65521,o%=65521}return r|o<<16|0};const Xh=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());var Jh=(e,t,i,n)=>{const r=Xh,o=n+i;e^=-1;for(let a=n;a<o;a++)e=e>>>8^r[255&(e^t[a])];return-1^e},Yh={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Zh={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:Qh,_tr_stored_block:ep,_tr_flush_block:tp,_tr_tally:ip,_tr_align:np}=Gh,{Z_NO_FLUSH:rp,Z_PARTIAL_FLUSH:op,Z_FULL_FLUSH:ap,Z_FINISH:sp,Z_BLOCK:cp,Z_OK:lp,Z_STREAM_END:up,Z_STREAM_ERROR:dp,Z_DATA_ERROR:hp,Z_BUF_ERROR:pp,Z_DEFAULT_COMPRESSION:mp,Z_FILTERED:fp,Z_HUFFMAN_ONLY:gp,Z_RLE:_p,Z_FIXED:bp,Z_DEFAULT_STRATEGY:vp,Z_UNKNOWN:yp,Z_DEFLATED:wp}=Zh,xp=(e,t)=>(e.msg=Yh[t],t),Np=e=>(e<<1)-(e>4?9:0),kp=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let Ap=(e,t,i)=>(t<<e.hash_shift^i)&e.hash_mask;const Cp=e=>{const t=e.state;let i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+i),e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))},Op=(e,t)=>{tp(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Cp(e.strm)},Sp=(e,t)=>{e.pending_buf[e.pending++]=t},Ep=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Fp=(e,t,i,n)=>{let r=e.avail_in;return r>n&&(r=n),0===r?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),i),1===e.state.wrap?e.adler=Kh(e.adler,t,r,i):2===e.state.wrap&&(e.adler=Jh(e.adler,t,r,i)),e.next_in+=r,e.total_in+=r,r)},Dp=(e,t)=>{let i,n,r=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,l=e.window,u=e.w_mask,d=e.prev,h=e.strstart+258;let p=l[o+a-1],m=l[o+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,l[i+a]===m&&l[i+a-1]===p&&l[i]===l[o]&&l[++i]===l[o+1]){o+=2,i++;do{}while(l[++o]===l[++i]&&l[++o]===l[++i]&&l[++o]===l[++i]&&l[++o]===l[++i]&&l[++o]===l[++i]&&l[++o]===l[++i]&&l[++o]===l[++i]&&l[++o]===l[++i]&&o<h);if(n=258-(h-o),o=h-258,n>a){if(e.match_start=t,a=n,n>=s)break;p=l[o+a-1],m=l[o+a]}}}while((t=d[t&u])>c&&0!=--r);return a<=e.lookahead?a:e.lookahead},Bp=e=>{const t=e.w_size;let i,n,r,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,i=n;do{r=e.head[--i],e.head[i]=r>=t?r-t:0}while(--n);n=t,i=n;do{r=e.prev[--i],e.prev[i]=r>=t?r-t:0}while(--n);o+=t}if(0===e.strm.avail_in)break;if(n=Fp(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=Ap(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=Ap(e,e.ins_h,e.window[a+3-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},Lp=(e,t)=>{let i,n;for(;;){if(e.lookahead<262){if(Bp(e),e.lookahead<262&&t===rp)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=Ap(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-262&&(e.match_length=Dp(e,i)),e.match_length>=3)if(n=ip(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=Ap(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Ap(e,e.ins_h,e.window[e.strstart+1]);else n=ip(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Op(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===sp?(Op(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Op(e,!1),0===e.strm.avail_out)?1:2},Mp=(e,t)=>{let i,n,r;for(;;){if(e.lookahead<262){if(Bp(e),e.lookahead<262&&t===rp)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=Ap(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-262&&(e.match_length=Dp(e,i),e.match_length<=5&&(e.strategy===fp||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-3,n=ip(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=Ap(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(Op(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=ip(e,0,e.window[e.strstart-1]),n&&Op(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=ip(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===sp?(Op(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Op(e,!1),0===e.strm.avail_out)?1:2};function Tp(e,t,i,n,r){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=n,this.func=r}const Rp=[new Tp(0,0,0,0,((e,t)=>{let i=65535;for(i>e.pending_buf_size-5&&(i=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Bp(e),0===e.lookahead&&t===rp)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const n=e.block_start+i;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Op(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(Op(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===sp?(Op(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(Op(e,!1),e.strm.avail_out),1)})),new Tp(4,4,8,4,Lp),new Tp(4,5,16,8,Lp),new Tp(4,6,32,32,Lp),new Tp(4,4,16,16,Mp),new Tp(8,16,32,32,Mp),new Tp(8,16,128,128,Mp),new Tp(8,32,128,256,Mp),new Tp(32,128,258,1024,Mp),new Tp(32,258,258,4096,Mp)];function $p(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=wp,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),kp(this.dyn_ltree),kp(this.dyn_dtree),kp(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),kp(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),kp(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const jp=e=>{if(!e||!e.state)return xp(e,dp);e.total_in=e.total_out=0,e.data_type=yp;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=rp,Qh(t),lp},Ip=e=>{const t=jp(e);var i;return t===lp&&((i=e.state).window_size=2*i.w_size,kp(i.head),i.max_lazy_match=Rp[i.level].max_lazy,i.good_match=Rp[i.level].good_length,i.nice_match=Rp[i.level].nice_length,i.max_chain_length=Rp[i.level].max_chain,i.strstart=0,i.block_start=0,i.lookahead=0,i.insert=0,i.match_length=i.prev_length=2,i.match_available=0,i.ins_h=0),t},Pp=(e,t,i,n,r,o)=>{if(!e)return dp;let a=1;if(t===mp&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),r<1||r>9||i!==wp||n<8||n>15||t<0||t>9||o<0||o>bp)return xp(e,dp);8===n&&(n=9);const s=new $p;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=r+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<r+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=o,s.method=i,Ip(e)};var zp={deflateInit:(e,t)=>Pp(e,t,wp,15,8,vp),deflateInit2:Pp,deflateReset:Ip,deflateResetKeep:jp,deflateSetHeader:(e,t)=>e&&e.state?2!==e.state.wrap?dp:(e.state.gzhead=t,lp):dp,deflate:(e,t)=>{let i,n;if(!e||!e.state||t>cp||t<0)return e?xp(e,dp):dp;const r=e.state;if(!e.output||!e.input&&0!==e.avail_in||666===r.status&&t!==sp)return xp(e,0===e.avail_out?pp:dp);r.strm=e;const o=r.last_flush;if(r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,Sp(r,31),Sp(r,139),Sp(r,8),r.gzhead?(Sp(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Sp(r,255&r.gzhead.time),Sp(r,r.gzhead.time>>8&255),Sp(r,r.gzhead.time>>16&255),Sp(r,r.gzhead.time>>24&255),Sp(r,9===r.level?2:r.strategy>=gp||r.level<2?4:0),Sp(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Sp(r,255&r.gzhead.extra.length),Sp(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Jh(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Sp(r,0),Sp(r,0),Sp(r,0),Sp(r,0),Sp(r,0),Sp(r,9===r.level?2:r.strategy>=gp||r.level<2?4:0),Sp(r,3),r.status=113);else{let t=wp+(r.w_bits-8<<4)<<8,i=-1;i=r.strategy>=gp||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=i<<6,0!==r.strstart&&(t|=32),t+=31-t%31,r.status=113,Ep(r,t),0!==r.strstart&&(Ep(r,e.adler>>>16),Ep(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=Jh(e.adler,r.pending_buf,r.pending-i,i)),Cp(e),i=r.pending,r.pending!==r.pending_buf_size));)Sp(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=Jh(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Jh(e.adler,r.pending_buf,r.pending-i,i)),Cp(e),i=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Sp(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>i&&(e.adler=Jh(e.adler,r.pending_buf,r.pending-i,i)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Jh(e.adler,r.pending_buf,r.pending-i,i)),Cp(e),i=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Sp(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>i&&(e.adler=Jh(e.adler,r.pending_buf,r.pending-i,i)),0===n&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Cp(e),r.pending+2<=r.pending_buf_size&&(Sp(r,255&e.adler),Sp(r,e.adler>>8&255),e.adler=0,r.status=113)):r.status=113),0!==r.pending){if(Cp(e),0===e.avail_out)return r.last_flush=-1,lp}else if(0===e.avail_in&&Np(t)<=Np(o)&&t!==sp)return xp(e,pp);if(666===r.status&&0!==e.avail_in)return xp(e,pp);if(0!==e.avail_in||0!==r.lookahead||t!==rp&&666!==r.status){let i=r.strategy===gp?((e,t)=>{let i;for(;;){if(0===e.lookahead&&(Bp(e),0===e.lookahead)){if(t===rp)return 1;break}if(e.match_length=0,i=ip(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(Op(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===sp?(Op(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Op(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===_p?((e,t)=>{let i,n,r,o;const a=e.window;for(;;){if(e.lookahead<=258){if(Bp(e),e.lookahead<=258&&t===rp)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=e.strstart-1,n=a[r],n===a[++r]&&n===a[++r]&&n===a[++r])){o=e.strstart+258;do{}while(n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&r<o);e.match_length=258-(o-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=ip(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=ip(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(Op(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===sp?(Op(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Op(e,!1),0===e.strm.avail_out)?1:2})(r,t):Rp[r.level].func(r,t);if(3!==i&&4!==i||(r.status=666),1===i||3===i)return 0===e.avail_out&&(r.last_flush=-1),lp;if(2===i&&(t===op?np(r):t!==cp&&(ep(r,0,0,!1),t===ap&&(kp(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Cp(e),0===e.avail_out))return r.last_flush=-1,lp}return t!==sp?lp:r.wrap<=0?up:(2===r.wrap?(Sp(r,255&e.adler),Sp(r,e.adler>>8&255),Sp(r,e.adler>>16&255),Sp(r,e.adler>>24&255),Sp(r,255&e.total_in),Sp(r,e.total_in>>8&255),Sp(r,e.total_in>>16&255),Sp(r,e.total_in>>24&255)):(Ep(r,e.adler>>>16),Ep(r,65535&e.adler)),Cp(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?lp:up)},deflateEnd:e=>{if(!e||!e.state)return dp;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?xp(e,dp):(e.state=null,113===t?xp(e,hp):lp)},deflateSetDictionary:(e,t)=>{let i=t.length;if(!e||!e.state)return dp;const n=e.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return dp;if(1===r&&(e.adler=Kh(e.adler,t,i,0)),n.wrap=0,i>=n.w_size){0===r&&(kp(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(i-n.w_size,i),0),t=e,i=n.w_size}const o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=i,e.next_in=0,e.input=t,Bp(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=Ap(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,Bp(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,n.wrap=r,lp},deflateInfo:"pako deflate (from Nodeca project)"};const Up=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Wp=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const t in i)Up(i,t)&&(e[t]=i[t])}}return e},Hp=e=>{let t=0;for(let n=0,r=e.length;n<r;n++)t+=e[n].length;const i=new Uint8Array(t);for(let n=0,r=0,o=e.length;n<o;n++){let t=e[n];i.set(t,r),r+=t.length}return i};let qp=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(Jk){qp=!1}const Vp=new Uint8Array(256);for(let Zk=0;Zk<256;Zk++)Vp[Zk]=Zk>=252?6:Zk>=248?5:Zk>=240?4:Zk>=224?3:Zk>=192?2:1;Vp[254]=Vp[254]=1;var Gp=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,n,r,o,a=e.length,s=0;for(r=0;r<a;r++)i=e.charCodeAt(r),55296==(64512&i)&&r+1<a&&(n=e.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),s+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(s),o=0,r=0;o<s;r++)i=e.charCodeAt(r),55296==(64512&i)&&r+1<a&&(n=e.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),i<128?t[o++]=i:i<2048?(t[o++]=192|i>>>6,t[o++]=128|63&i):i<65536?(t[o++]=224|i>>>12,t[o++]=128|i>>>6&63,t[o++]=128|63&i):(t[o++]=240|i>>>18,t[o++]=128|i>>>12&63,t[o++]=128|i>>>6&63,t[o++]=128|63&i);return t},Kp=(e,t)=>{const i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let n,r;const o=new Array(2*i);for(r=0,n=0;n<i;){let t=e[n++];if(t<128){o[r++]=t;continue}let a=Vp[t];if(a>4)o[r++]=65533,n+=a-1;else{for(t&=2===a?31:3===a?15:7;a>1&&n<i;)t=t<<6|63&e[n++],a--;a>1?o[r++]=65533:t<65536?o[r++]=t:(t-=65536,o[r++]=55296|t>>10&1023,o[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&qp)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let i="";for(let n=0;n<t;n++)i+=String.fromCharCode(e[n]);return i})(o,r)},Xp=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let i=t-1;for(;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+Vp[e[i]]>t?i:t};var Jp=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Yp=Object.prototype.toString,{Z_NO_FLUSH:Zp,Z_SYNC_FLUSH:Qp,Z_FULL_FLUSH:em,Z_FINISH:tm,Z_OK:im,Z_STREAM_END:nm,Z_DEFAULT_COMPRESSION:rm,Z_DEFAULT_STRATEGY:om,Z_DEFLATED:am}=Zh;function sm(e){this.options=Wp({level:rm,method:am,chunkSize:16384,windowBits:15,memLevel:8,strategy:om},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Jp,this.strm.avail_out=0;let i=zp.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==im)throw new Error(Yh[i]);if(t.header&&zp.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?Gp(t.dictionary):"[object ArrayBuffer]"===Yp.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,i=zp.deflateSetDictionary(this.strm,e),i!==im)throw new Error(Yh[i]);this._dict_set=!0}}sm.prototype.push=function(e,t){const i=this.strm,n=this.options.chunkSize;let r,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?tm:Zp,"string"==typeof e?i.input=Gp(e):"[object ArrayBuffer]"===Yp.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(n),i.next_out=0,i.avail_out=n),(o===Qp||o===em)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(r=zp.deflate(i,o),r===nm)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),r=zp.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===im;if(0!==i.avail_out){if(o>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},sm.prototype.onData=function(e){this.chunks.push(e)},sm.prototype.onEnd=function(e){e===im&&(this.result=Hp(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var cm=function(e,t){let i,n,r,o,a,s,c,l,u,d,h,p,m,f,g,_,b,v,y,w,x,N,k,A;const C=e.state;i=e.next_in,k=e.input,n=i+(e.avail_in-5),r=e.next_out,A=e.output,o=r-(t-e.avail_out),a=r+(e.avail_out-257),s=C.dmax,c=C.wsize,l=C.whave,u=C.wnext,d=C.window,h=C.hold,p=C.bits,m=C.lencode,f=C.distcode,g=(1<<C.lenbits)-1,_=(1<<C.distbits)-1;e:do{p<15&&(h+=k[i++]<<p,p+=8,h+=k[i++]<<p,p+=8),b=m[h&g];t:for(;;){if(v=b>>>24,h>>>=v,p-=v,v=b>>>16&255,0===v)A[r++]=65535&b;else{if(!(16&v)){if(0==(64&v)){b=m[(65535&b)+(h&(1<<v)-1)];continue t}if(32&v){C.mode=12;break e}e.msg="invalid literal/length code",C.mode=30;break e}y=65535&b,v&=15,v&&(p<v&&(h+=k[i++]<<p,p+=8),y+=h&(1<<v)-1,h>>>=v,p-=v),p<15&&(h+=k[i++]<<p,p+=8,h+=k[i++]<<p,p+=8),b=f[h&_];i:for(;;){if(v=b>>>24,h>>>=v,p-=v,v=b>>>16&255,!(16&v)){if(0==(64&v)){b=f[(65535&b)+(h&(1<<v)-1)];continue i}e.msg="invalid distance code",C.mode=30;break e}if(w=65535&b,v&=15,p<v&&(h+=k[i++]<<p,p+=8,p<v&&(h+=k[i++]<<p,p+=8)),w+=h&(1<<v)-1,w>s){e.msg="invalid distance too far back",C.mode=30;break e}if(h>>>=v,p-=v,v=r-o,w>v){if(v=w-v,v>l&&C.sane){e.msg="invalid distance too far back",C.mode=30;break e}if(x=0,N=d,0===u){if(x+=c-v,v<y){y-=v;do{A[r++]=d[x++]}while(--v);x=r-w,N=A}}else if(u<v){if(x+=c+u-v,v-=u,v<y){y-=v;do{A[r++]=d[x++]}while(--v);if(x=0,u<y){v=u,y-=v;do{A[r++]=d[x++]}while(--v);x=r-w,N=A}}}else if(x+=u-v,v<y){y-=v;do{A[r++]=d[x++]}while(--v);x=r-w,N=A}for(;y>2;)A[r++]=N[x++],A[r++]=N[x++],A[r++]=N[x++],y-=3;y&&(A[r++]=N[x++],y>1&&(A[r++]=N[x++]))}else{x=r-w;do{A[r++]=A[x++],A[r++]=A[x++],A[r++]=A[x++],y-=3}while(y>2);y&&(A[r++]=A[x++],y>1&&(A[r++]=A[x++]))}break}}break}}while(i<n&&r<a);y=p>>3,i-=y,p-=y<<3,h&=(1<<p)-1,e.next_in=i,e.next_out=r,e.avail_in=i<n?n-i+5:5-(i-n),e.avail_out=r<a?a-r+257:257-(r-a),C.hold=h,C.bits=p};const lm=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),um=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),dm=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),hm=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var pm=(e,t,i,n,r,o,a,s)=>{const c=s.bits;let l,u,d,h,p,m,f=0,g=0,_=0,b=0,v=0,y=0,w=0,x=0,N=0,k=0,A=null,C=0;const O=new Uint16Array(16),S=new Uint16Array(16);let E,F,D,B=null,L=0;for(f=0;f<=15;f++)O[f]=0;for(g=0;g<n;g++)O[t[i+g]]++;for(v=c,b=15;b>=1&&0===O[b];b--);if(v>b&&(v=b),0===b)return r[o++]=20971520,r[o++]=20971520,s.bits=1,0;for(_=1;_<b&&0===O[_];_++);for(v<_&&(v=_),x=1,f=1;f<=15;f++)if(x<<=1,x-=O[f],x<0)return-1;if(x>0&&(0===e||1!==b))return-1;for(S[1]=0,f=1;f<15;f++)S[f+1]=S[f]+O[f];for(g=0;g<n;g++)0!==t[i+g]&&(a[S[t[i+g]]++]=g);if(0===e?(A=B=a,m=19):1===e?(A=lm,C-=257,B=um,L-=257,m=256):(A=dm,B=hm,m=-1),k=0,g=0,f=_,p=o,y=v,w=0,d=-1,N=1<<v,h=N-1,1===e&&N>852||2===e&&N>592)return 1;for(;;){E=f-w,a[g]<m?(F=0,D=a[g]):a[g]>m?(F=B[L+a[g]],D=A[C+a[g]]):(F=96,D=0),l=1<<f-w,u=1<<y,_=u;do{u-=l,r[p+(k>>w)+u]=E<<24|F<<16|D|0}while(0!==u);for(l=1<<f-1;k&l;)l>>=1;if(0!==l?(k&=l-1,k+=l):k=0,g++,0==--O[f]){if(f===b)break;f=t[i+a[g]]}if(f>v&&(k&h)!==d){for(0===w&&(w=v),p+=_,y=f-w,x=1<<y;y+w<b&&(x-=O[y+w],!(x<=0));)y++,x<<=1;if(N+=1<<y,1===e&&N>852||2===e&&N>592)return 1;d=k&h,r[d]=v<<24|y<<16|p-o|0}}return 0!==k&&(r[p+k]=f-w<<24|64<<16|0),s.bits=v,0};const{Z_FINISH:mm,Z_BLOCK:fm,Z_TREES:gm,Z_OK:_m,Z_STREAM_END:bm,Z_NEED_DICT:vm,Z_STREAM_ERROR:ym,Z_DATA_ERROR:wm,Z_MEM_ERROR:xm,Z_BUF_ERROR:Nm,Z_DEFLATED:km}=Zh,Am=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Cm(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Om=e=>{if(!e||!e.state)return ym;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,_m},Sm=e=>{if(!e||!e.state)return ym;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Om(e)},Em=(e,t)=>{let i;if(!e||!e.state)return ym;const n=e.state;return t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?ym:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,Sm(e))},Fm=(e,t)=>{if(!e)return ym;const i=new Cm;e.state=i,i.window=null;const n=Em(e,t);return n!==_m&&(e.state=null),n};let Dm,Bm,Lm=!0;const Mm=e=>{if(Lm){Dm=new Int32Array(512),Bm=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(pm(1,e.lens,0,288,Dm,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;pm(2,e.lens,0,32,Bm,0,e.work,{bits:5}),Lm=!1}e.lencode=Dm,e.lenbits=9,e.distcode=Bm,e.distbits=5},Tm=(e,t,i,n)=>{let r;const o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),n>=o.wsize?(o.window.set(t.subarray(i-o.wsize,i),0),o.wnext=0,o.whave=o.wsize):(r=o.wsize-o.wnext,r>n&&(r=n),o.window.set(t.subarray(i-n,i-n+r),o.wnext),(n-=r)?(o.window.set(t.subarray(i-n,i),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=r))),0};var Rm={inflateReset:Sm,inflateReset2:Em,inflateResetKeep:Om,inflateInit:e=>Fm(e,15),inflateInit2:Fm,inflate:(e,t)=>{let i,n,r,o,a,s,c,l,u,d,h,p,m,f,g,_,b,v,y,w,x,N,k=0;const A=new Uint8Array(4);let C,O;const S=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return ym;i=e.state,12===i.mode&&(i.mode=13),a=e.next_out,r=e.output,c=e.avail_out,o=e.next_in,n=e.input,s=e.avail_in,l=i.hold,u=i.bits,d=s,h=c,N=_m;e:for(;;)switch(i.mode){case 1:if(0===i.wrap){i.mode=13;break}for(;u<16;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}if(2&i.wrap&&35615===l){i.check=0,A[0]=255&l,A[1]=l>>>8&255,i.check=Jh(i.check,A,2,0),l=0,u=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=30;break}if((15&l)!==km){e.msg="unknown compression method",i.mode=30;break}if(l>>>=4,u-=4,x=8+(15&l),0===i.wbits)i.wbits=x;else if(x>i.wbits){e.msg="invalid window size",i.mode=30;break}i.dmax=1<<i.wbits,e.adler=i.check=1,i.mode=512&l?10:12,l=0,u=0;break;case 2:for(;u<16;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}if(i.flags=l,(255&i.flags)!==km){e.msg="unknown compression method",i.mode=30;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=30;break}i.head&&(i.head.text=l>>8&1),512&i.flags&&(A[0]=255&l,A[1]=l>>>8&255,i.check=Jh(i.check,A,2,0)),l=0,u=0,i.mode=3;case 3:for(;u<32;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}i.head&&(i.head.time=l),512&i.flags&&(A[0]=255&l,A[1]=l>>>8&255,A[2]=l>>>16&255,A[3]=l>>>24&255,i.check=Jh(i.check,A,4,0)),l=0,u=0,i.mode=4;case 4:for(;u<16;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}i.head&&(i.head.xflags=255&l,i.head.os=l>>8),512&i.flags&&(A[0]=255&l,A[1]=l>>>8&255,i.check=Jh(i.check,A,2,0)),l=0,u=0,i.mode=5;case 5:if(1024&i.flags){for(;u<16;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}i.length=l,i.head&&(i.head.extra_len=l),512&i.flags&&(A[0]=255&l,A[1]=l>>>8&255,i.check=Jh(i.check,A,2,0)),l=0,u=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(p=i.length,p>s&&(p=s),p&&(i.head&&(x=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Uint8Array(i.head.extra_len)),i.head.extra.set(n.subarray(o,o+p),x)),512&i.flags&&(i.check=Jh(i.check,n,p,o)),s-=p,o+=p,i.length-=p),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===s)break e;p=0;do{x=n[o+p++],i.head&&x&&i.length<65536&&(i.head.name+=String.fromCharCode(x))}while(x&&p<s);if(512&i.flags&&(i.check=Jh(i.check,n,p,o)),s-=p,o+=p,x)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===s)break e;p=0;do{x=n[o+p++],i.head&&x&&i.length<65536&&(i.head.comment+=String.fromCharCode(x))}while(x&&p<s);if(512&i.flags&&(i.check=Jh(i.check,n,p,o)),s-=p,o+=p,x)break e}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;u<16;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}if(l!==(65535&i.check)){e.msg="header crc mismatch",i.mode=30;break}l=0,u=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=12;break;case 10:for(;u<32;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}e.adler=i.check=Am(l),l=0,u=0,i.mode=11;case 11:if(0===i.havedict)return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,i.hold=l,i.bits=u,vm;e.adler=i.check=1,i.mode=12;case 12:if(t===fm||t===gm)break e;case 13:if(i.last){l>>>=7&u,u-=7&u,i.mode=27;break}for(;u<3;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}switch(i.last=1&l,l>>>=1,u-=1,3&l){case 0:i.mode=14;break;case 1:if(Mm(i),i.mode=20,t===gm){l>>>=2,u-=2;break e}break;case 2:i.mode=17;break;case 3:e.msg="invalid block type",i.mode=30}l>>>=2,u-=2;break;case 14:for(l>>>=7&u,u-=7&u;u<32;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&l,l=0,u=0,i.mode=15,t===gm)break e;case 15:i.mode=16;case 16:if(p=i.length,p){if(p>s&&(p=s),p>c&&(p=c),0===p)break e;r.set(n.subarray(o,o+p),a),s-=p,o+=p,c-=p,a+=p,i.length-=p;break}i.mode=12;break;case 17:for(;u<14;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}if(i.nlen=257+(31&l),l>>>=5,u-=5,i.ndist=1+(31&l),l>>>=5,u-=5,i.ncode=4+(15&l),l>>>=4,u-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;u<3;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}i.lens[S[i.have++]]=7&l,l>>>=3,u-=3}for(;i.have<19;)i.lens[S[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,C={bits:i.lenbits},N=pm(0,i.lens,0,19,i.lencode,0,i.work,C),i.lenbits=C.bits,N){e.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;k=i.lencode[l&(1<<i.lenbits)-1],g=k>>>24,_=k>>>16&255,b=65535&k,!(g<=u);){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}if(b<16)l>>>=g,u-=g,i.lens[i.have++]=b;else{if(16===b){for(O=g+2;u<O;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}if(l>>>=g,u-=g,0===i.have){e.msg="invalid bit length repeat",i.mode=30;break}x=i.lens[i.have-1],p=3+(3&l),l>>>=2,u-=2}else if(17===b){for(O=g+3;u<O;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}l>>>=g,u-=g,x=0,p=3+(7&l),l>>>=3,u-=3}else{for(O=g+7;u<O;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}l>>>=g,u-=g,x=0,p=11+(127&l),l>>>=7,u-=7}if(i.have+p>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=30;break}for(;p--;)i.lens[i.have++]=x}}if(30===i.mode)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,C={bits:i.lenbits},N=pm(1,i.lens,0,i.nlen,i.lencode,0,i.work,C),i.lenbits=C.bits,N){e.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,C={bits:i.distbits},N=pm(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,C),i.distbits=C.bits,N){e.msg="invalid distances set",i.mode=30;break}if(i.mode=20,t===gm)break e;case 20:i.mode=21;case 21:if(s>=6&&c>=258){e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,i.hold=l,i.bits=u,cm(e,h),a=e.next_out,r=e.output,c=e.avail_out,o=e.next_in,n=e.input,s=e.avail_in,l=i.hold,u=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;k=i.lencode[l&(1<<i.lenbits)-1],g=k>>>24,_=k>>>16&255,b=65535&k,!(g<=u);){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}if(_&&0==(240&_)){for(v=g,y=_,w=b;k=i.lencode[w+((l&(1<<v+y)-1)>>v)],g=k>>>24,_=k>>>16&255,b=65535&k,!(v+g<=u);){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}l>>>=v,u-=v,i.back+=v}if(l>>>=g,u-=g,i.back+=g,i.length=b,0===_){i.mode=26;break}if(32&_){i.back=-1,i.mode=12;break}if(64&_){e.msg="invalid literal/length code",i.mode=30;break}i.extra=15&_,i.mode=22;case 22:if(i.extra){for(O=i.extra;u<O;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}i.length+=l&(1<<i.extra)-1,l>>>=i.extra,u-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;k=i.distcode[l&(1<<i.distbits)-1],g=k>>>24,_=k>>>16&255,b=65535&k,!(g<=u);){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}if(0==(240&_)){for(v=g,y=_,w=b;k=i.distcode[w+((l&(1<<v+y)-1)>>v)],g=k>>>24,_=k>>>16&255,b=65535&k,!(v+g<=u);){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}l>>>=v,u-=v,i.back+=v}if(l>>>=g,u-=g,i.back+=g,64&_){e.msg="invalid distance code",i.mode=30;break}i.offset=b,i.extra=15&_,i.mode=24;case 24:if(i.extra){for(O=i.extra;u<O;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}i.offset+=l&(1<<i.extra)-1,l>>>=i.extra,u-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===c)break e;if(p=h-c,i.offset>p){if(p=i.offset-p,p>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=30;break}p>i.wnext?(p-=i.wnext,m=i.wsize-p):m=i.wnext-p,p>i.length&&(p=i.length),f=i.window}else f=r,m=a-i.offset,p=i.length;p>c&&(p=c),c-=p,i.length-=p;do{r[a++]=f[m++]}while(--p);0===i.length&&(i.mode=21);break;case 26:if(0===c)break e;r[a++]=i.length,c--,i.mode=21;break;case 27:if(i.wrap){for(;u<32;){if(0===s)break e;s--,l|=n[o++]<<u,u+=8}if(h-=c,e.total_out+=h,i.total+=h,h&&(e.adler=i.check=i.flags?Jh(i.check,r,h,a-h):Kh(i.check,r,h,a-h)),h=c,(i.flags?l:Am(l))!==i.check){e.msg="incorrect data check",i.mode=30;break}l=0,u=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;u<32;){if(0===s)break e;s--,l+=n[o++]<<u,u+=8}if(l!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=30;break}l=0,u=0}i.mode=29;case 29:N=bm;break e;case 30:N=wm;break e;case 31:return xm;case 32:default:return ym}return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,i.hold=l,i.bits=u,(i.wsize||h!==e.avail_out&&i.mode<30&&(i.mode<27||t!==mm))&&Tm(e,e.output,e.next_out,h-e.avail_out),d-=e.avail_in,h-=e.avail_out,e.total_in+=d,e.total_out+=h,i.total+=h,i.wrap&&h&&(e.adler=i.check=i.flags?Jh(i.check,r,h,e.next_out-h):Kh(i.check,r,h,e.next_out-h)),e.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),(0===d&&0===h||t===mm)&&N===_m&&(N=Nm),N},inflateEnd:e=>{if(!e||!e.state)return ym;let t=e.state;return t.window&&(t.window=null),e.state=null,_m},inflateGetHeader:(e,t)=>{if(!e||!e.state)return ym;const i=e.state;return 0==(2&i.wrap)?ym:(i.head=t,t.done=!1,_m)},inflateSetDictionary:(e,t)=>{const i=t.length;let n,r,o;return e&&e.state?(n=e.state,0!==n.wrap&&11!==n.mode?ym:11===n.mode&&(r=1,r=Kh(r,t,i,0),r!==n.check)?wm:(o=Tm(e,t,i,i),o?(n.mode=31,xm):(n.havedict=1,_m))):ym},inflateInfo:"pako inflate (from Nodeca project)"};var $m=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const jm=Object.prototype.toString,{Z_NO_FLUSH:Im,Z_FINISH:Pm,Z_OK:zm,Z_STREAM_END:Um,Z_NEED_DICT:Wm,Z_STREAM_ERROR:Hm,Z_DATA_ERROR:qm,Z_MEM_ERROR:Vm}=Zh;function Gm(e){this.options=Wp({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Jp,this.strm.avail_out=0;let i=Rm.inflateInit2(this.strm,t.windowBits);if(i!==zm)throw new Error(Yh[i]);if(this.header=new $m,Rm.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Gp(t.dictionary):"[object ArrayBuffer]"===jm.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=Rm.inflateSetDictionary(this.strm,t.dictionary),i!==zm)))throw new Error(Yh[i])}Gm.prototype.push=function(e,t){const i=this.strm,n=this.options.chunkSize,r=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(a=t===~~t?t:!0===t?Pm:Im,"[object ArrayBuffer]"===jm.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(n),i.next_out=0,i.avail_out=n),o=Rm.inflate(i,a),o===Wm&&r&&(o=Rm.inflateSetDictionary(i,r),o===zm?o=Rm.inflate(i,a):o===qm&&(o=Wm));i.avail_in>0&&o===Um&&i.state.wrap>0&&0!==e[i.next_in];)Rm.inflateReset(i),o=Rm.inflate(i,a);switch(o){case Hm:case qm:case Wm:case Vm:return this.onEnd(o),this.ended=!0,!1}if(s=i.avail_out,i.next_out&&(0===i.avail_out||o===Um))if("string"===this.options.to){let e=Xp(i.output,i.next_out),t=i.next_out-e,r=Kp(i.output,e);i.next_out=t,i.avail_out=n-t,t&&i.output.set(i.output.subarray(e,e+t),0),this.onData(r)}else this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out));if(o!==zm||0!==s){if(o===Um)return o=Rm.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===i.avail_in)break}}return!0},Gm.prototype.onData=function(e){this.chunks.push(e)},Gm.prototype.onEnd=function(e){e===zm&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Hp(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Km,Xm,Jm={exports:{}},Ym={exports:{}};Km="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xm={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&Xm.rotl(e,8)|4278255360&Xm.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=Xm.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],i=0,n=0;i<e.length;i++,n+=8)t[n>>>5]|=e[i]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],i=0;i<32*e.length;i+=8)t.push(e[i>>>5]>>>24-i%32&255);return t},bytesToHex:function(e){for(var t=[],i=0;i<e.length;i++)t.push((e[i]>>>4).toString(16)),t.push((15&e[i]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],i=0;i<e.length;i+=2)t.push(parseInt(e.substr(i,2),16));return t},bytesToBase64:function(e){for(var t=[],i=0;i<e.length;i+=3)for(var n=e[i]<<16|e[i+1]<<8|e[i+2],r=0;r<4;r++)8*i+6*r<=8*e.length?t.push(Km.charAt(n>>>6*(3-r)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],i=0,n=0;i<e.length;n=++i%4)0!=n&&t.push((Km.indexOf(e.charAt(i-1))&Math.pow(2,-2*n+8)-1)<<2*n|Km.indexOf(e.charAt(i))>>>6-2*n);return t}},Ym.exports=Xm;var Zm={utf8:{stringToBytes:function(e){return Zm.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(Zm.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],i=0;i<e.length;i++)t.push(255&e.charCodeAt(i));return t},bytesToString:function(e){for(var t=[],i=0;i<e.length;i++)t.push(String.fromCharCode(e[i]));return t.join("")}}},Qm=Zm,ef=function(e){return null!=e&&(tf(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&tf(e.slice(0,0))}(e)||!!e._isBuffer)};function tf(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}!function(){var e=Ym.exports,t=Qm.utf8,i=ef,n=Qm.bin,r=function(o,a){o.constructor==String?o=a&&"binary"===a.encoding?n.stringToBytes(o):t.stringToBytes(o):i(o)?o=Array.prototype.slice.call(o,0):Array.isArray(o)||o.constructor===Uint8Array||(o=o.toString());for(var s=e.bytesToWords(o),c=8*o.length,l=1732584193,u=-271733879,d=-1732584194,h=271733878,p=0;p<s.length;p++)s[p]=16711935&(s[p]<<8|s[p]>>>24)|4278255360&(s[p]<<24|s[p]>>>8);s[c>>>5]|=128<<c%32,s[14+(c+64>>>9<<4)]=c;var m=r._ff,f=r._gg,g=r._hh,_=r._ii;for(p=0;p<s.length;p+=16){var b=l,v=u,y=d,w=h;l=m(l,u,d,h,s[p+0],7,-680876936),h=m(h,l,u,d,s[p+1],12,-389564586),d=m(d,h,l,u,s[p+2],17,606105819),u=m(u,d,h,l,s[p+3],22,-1044525330),l=m(l,u,d,h,s[p+4],7,-176418897),h=m(h,l,u,d,s[p+5],12,1200080426),d=m(d,h,l,u,s[p+6],17,-1473231341),u=m(u,d,h,l,s[p+7],22,-45705983),l=m(l,u,d,h,s[p+8],7,1770035416),h=m(h,l,u,d,s[p+9],12,-1958414417),d=m(d,h,l,u,s[p+10],17,-42063),u=m(u,d,h,l,s[p+11],22,-1990404162),l=m(l,u,d,h,s[p+12],7,1804603682),h=m(h,l,u,d,s[p+13],12,-40341101),d=m(d,h,l,u,s[p+14],17,-1502002290),l=f(l,u=m(u,d,h,l,s[p+15],22,1236535329),d,h,s[p+1],5,-165796510),h=f(h,l,u,d,s[p+6],9,-1069501632),d=f(d,h,l,u,s[p+11],14,643717713),u=f(u,d,h,l,s[p+0],20,-373897302),l=f(l,u,d,h,s[p+5],5,-701558691),h=f(h,l,u,d,s[p+10],9,38016083),d=f(d,h,l,u,s[p+15],14,-660478335),u=f(u,d,h,l,s[p+4],20,-405537848),l=f(l,u,d,h,s[p+9],5,568446438),h=f(h,l,u,d,s[p+14],9,-1019803690),d=f(d,h,l,u,s[p+3],14,-187363961),u=f(u,d,h,l,s[p+8],20,1163531501),l=f(l,u,d,h,s[p+13],5,-1444681467),h=f(h,l,u,d,s[p+2],9,-51403784),d=f(d,h,l,u,s[p+7],14,1735328473),l=g(l,u=f(u,d,h,l,s[p+12],20,-1926607734),d,h,s[p+5],4,-378558),h=g(h,l,u,d,s[p+8],11,-2022574463),d=g(d,h,l,u,s[p+11],16,1839030562),u=g(u,d,h,l,s[p+14],23,-35309556),l=g(l,u,d,h,s[p+1],4,-1530992060),h=g(h,l,u,d,s[p+4],11,1272893353),d=g(d,h,l,u,s[p+7],16,-155497632),u=g(u,d,h,l,s[p+10],23,-1094730640),l=g(l,u,d,h,s[p+13],4,681279174),h=g(h,l,u,d,s[p+0],11,-358537222),d=g(d,h,l,u,s[p+3],16,-722521979),u=g(u,d,h,l,s[p+6],23,76029189),l=g(l,u,d,h,s[p+9],4,-640364487),h=g(h,l,u,d,s[p+12],11,-421815835),d=g(d,h,l,u,s[p+15],16,530742520),l=_(l,u=g(u,d,h,l,s[p+2],23,-995338651),d,h,s[p+0],6,-198630844),h=_(h,l,u,d,s[p+7],10,1126891415),d=_(d,h,l,u,s[p+14],15,-1416354905),u=_(u,d,h,l,s[p+5],21,-57434055),l=_(l,u,d,h,s[p+12],6,1700485571),h=_(h,l,u,d,s[p+3],10,-1894986606),d=_(d,h,l,u,s[p+10],15,-1051523),u=_(u,d,h,l,s[p+1],21,-2054922799),l=_(l,u,d,h,s[p+8],6,1873313359),h=_(h,l,u,d,s[p+15],10,-30611744),d=_(d,h,l,u,s[p+6],15,-1560198380),u=_(u,d,h,l,s[p+13],21,1309151649),l=_(l,u,d,h,s[p+4],6,-145523070),h=_(h,l,u,d,s[p+11],10,-1120210379),d=_(d,h,l,u,s[p+2],15,718787259),u=_(u,d,h,l,s[p+9],21,-343485551),l=l+b>>>0,u=u+v>>>0,d=d+y>>>0,h=h+w>>>0}return e.endian([l,u,d,h])};r._ff=function(e,t,i,n,r,o,a){var s=e+(t&i|~t&n)+(r>>>0)+a;return(s<<o|s>>>32-o)+t},r._gg=function(e,t,i,n,r,o,a){var s=e+(t&n|i&~n)+(r>>>0)+a;return(s<<o|s>>>32-o)+t},r._hh=function(e,t,i,n,r,o,a){var s=e+(t^i^n)+(r>>>0)+a;return(s<<o|s>>>32-o)+t},r._ii=function(e,t,i,n,r,o,a){var s=e+(i^(t|~n))+(r>>>0)+a;return(s<<o|s>>>32-o)+t},r._blocksize=16,r._digestsize=16,Jm.exports=function(t,i){if(null==t)throw new Error("Illegal argument "+t);var o=e.wordsToBytes(r(t,i));return i&&i.asBytes?o:i&&i.asString?n.bytesToString(o):e.bytesToHex(o)}}();var nf,rf,of=Jm.exports;(rf=nf||(nf={})).UP="up",rf.DOWN="down",rf.NORTH="north",rf.EAST="east",rf.SOUTH="south",rf.WEST="west";const af={[nf.UP]:[0,1,0],[nf.DOWN]:[0,-1,0],[nf.NORTH]:[0,0,-1],[nf.EAST]:[1,0,0],[nf.SOUTH]:[0,0,1],[nf.WEST]:[-1,0,0]};var sf,cf,lf,uf;function df(e,t,i){if(!e[t])throw new Error(`Missing ${t} tag`);if(e[t].type!==i)throw new Error(`Expected ${t} to be of type ${i}, but found ${e[t].type}`);return e[t].value}function hf(e){let t=null;return()=>(null==t&&(t=e()),t)}function pf(e,t,i){const n=e.get(t);if(n)return n;const r=i(t);return e.set(t,r),r}(lf=nf||(nf={})).ALL=[lf.UP,lf.DOWN,lf.NORTH,lf.EAST,lf.SOUTH,lf.WEST],lf.normal=function(e){return af[e]},(cf=sf||(sf={})).create=function(e,t,i){return[e,t,i]},cf.ZERO=cf.create(0,0,0),cf.offset=function(e,t,i,n){return[e[0]+t,e[1]+i,e[2]+n]},cf.towards=function(e,t){return cf.offset(e,...nf.normal(t))},cf.equals=function(e,t){return e===t||e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},cf.magnitude=function(e){return e[0]*e[0]+e[1]*e[1]+e[2]*e[2]},function(e){function t(e){return"object"==typeof e&&null!==e?e:void 0}e.readNumber=function(e){return"number"==typeof e?e:void 0},e.readInt=function(e){return"number"==typeof e?Math.floor(e):void 0},e.readString=function(e){return"string"==typeof e?e:void 0},e.readBoolean=function(e){return"boolean"==typeof e?e:void 0},e.readObject=t,e.readArray=function(e,t){if(Array.isArray(e))return e.map((e=>t(e)))},e.readMap=function(e,i){var n;const r=null!=(n=t(e))?n:{};return Object.fromEntries(Object.entries(r).map((([e,t])=>[e,i(t)])))},e.compose=function(e,t,i){const n=t(e);return n?i(n):void 0},e.readEnum=function(e,t){return"string"!=typeof e?t[0]:t.includes(e)?e:t[0]}}(uf||(uf={}));const mf=class{constructor(e,t){if(this.namespace=e,this.path=t,!e.match(/^[a-z0-9._-]+$/))throw new Error(`Non [a-z0-9._-] character in namespace of ${e}:${t}`);if(!t.match(/^[a-z0-9/._-]+$/))throw new Error(`Non [a-z0-9/._-] character in path of ${e}:${t}`)}equals(e){return this===e||this.namespace===e.namespace&&this.path===e.path}toString(){return`${this.namespace}:${this.path}`}static create(e){return new mf(this.DEFAULT_NAMESPACE,e)}static parse(e){const t=e.indexOf(this.SEPARATOR);if(t>=0){const i=t>=1?e.substring(0,t):this.DEFAULT_NAMESPACE,n=e.substring(t+1);return new mf(i,n)}return new mf(this.DEFAULT_NAMESPACE,e)}};let ff=mf;ff.DEFAULT_NAMESPACE="minecraft",ff.SEPARATOR=":";var gf=Object.defineProperty,_f=Object.defineProperties,bf=Object.getOwnPropertyDescriptors,vf=Object.getOwnPropertySymbols,yf=Object.prototype.hasOwnProperty,wf=Object.prototype.propertyIsEnumerable,xf=(e,t,i)=>t in e?gf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;const Nf=class{constructor(e,t={}){this.properties=t,this.name="string"==typeof e?ff.parse(e):e}getName(){return this.name}getProperties(){return this.properties}getProperty(e){return this.properties[e]}isFluid(){return this.is(Nf.WATER)||this.is(Nf.LAVA)}equals(e){return!!this.name.equals(e.name)&&Object.keys(this.properties).every((t=>e.properties[t]===this.properties[t]))}is(e){return this.name.equals(e.name)}toString(){return 0===Object.keys(this.properties).length?this.name.toString():`${this.name.toString()}[${Object.entries(this.properties).map((([e,t])=>e+"="+t)).join(",")}]`}static fromNbt(e){const t=ff.parse(df(e.value,"Name","string")),i=function(e,t){try{return e()}catch(i){return t}}((()=>df(e.value,"Properties","compound")),{}),n=Object.keys(i).reduce(((e,t)=>{return n=((e,t)=>{for(var i in t||(t={}))yf.call(t,i)&&xf(e,i,t[i]);if(vf)for(var i of vf(t))wf.call(t,i)&&xf(e,i,t[i]);return e})({},e),r={[t]:df(i,t,"string")},_f(n,bf(r));var n,r}),{});return new Nf(t,n)}static fromJson(e){var t,i;const n=null!=(t=uf.readObject(e))?t:{},r=ff.parse(null!=(i=uf.readString(n.Name))?i:Nf.STONE.name.toString()),o=uf.readMap(n.Properties,(e=>{var t;return null!=(t=uf.readString(e))?t:""}));return new Nf(r,o)}};let kf=Nf;kf.AIR=new Nf(ff.create("air")),kf.STONE=new Nf(ff.create("stone")),kf.WATER=new Nf(ff.create("water"),{level:"0"}),kf.LAVA=new Nf(ff.create("lava"),{level:"0"});const Af=class{constructor(e){this.minY=e,this.storage=Array(Af.SIZE).fill(0),this.palette=[kf.AIR]}get minBlockY(){return this.minY<<4}index(e,t,i){return(e<<8)+(t<<4)+i}getBlockState(e,t,i){var n;const r=this.storage[this.index(e,t,i)];return null!=(n=this.palette[r])?n:kf.AIR}setBlockState(e,t,i,n){let r=this.palette.findIndex((e=>e.equals(n)));-1===r&&(r=this.palette.length,this.palette.push(n)),this.storage[this.index(e,t,i)]=r}};let Cf=Af;Cf.WIDTH=16,Cf.SIZE=Af.WIDTH*Af.WIDTH*Af.WIDTH;class Of{constructor(e,t,i){this.minY=e,this.height=t,this.pos=i,this.sections=Array(this.sectionsCount).fill(null)}get maxY(){return this.minY+this.height}get minSection(){return this.minY>>4}get maxSection(){return 1+(this.maxY-1>>4)}get sectionsCount(){return this.maxSection-this.minSection}getSectionIndex(e){return(e>>4)-this.minSection}getBlockState(e){var t;const[i,n,r]=e,o=this.sections[this.getSectionIndex(n)];return null!=(t=null==o?void 0:o.getBlockState(15&i,15&n,15&r))?t:kf.AIR}setBlockState(e,t){const[i,n,r]=e,o=this.getSectionIndex(n);let a=this.sections[o];if(null===a){if(t.equals(kf.AIR))return;a=this.getOrCreateSection(o)}a.setBlockState(15&i,15&n,15&r,t)}getOrCreateSection(e){return null==this.sections[e]&&(this.sections[e]=new Cf(this.minSection+e)),this.sections[e]}}var Sf,Ef;!function(e){function t(e,t){return BigInt(4294967295&e)|BigInt(4294967295&t)<<BigInt(32)}e.create=function(e,t){return[e,t]},e.fromBlockPos=function(e){return[e[0]>>4,e[2]>>4]},e.fromLong=function(e){return[4294967295&Number(e),Number(e>>BigInt(32))]},e.toLong=function(e){return t(e[0],e[1])},e.asLong=t,e.minBlockX=function(e){return e[0]<<4},e.minBlockZ=function(e){return e[1]<<4},e.maxBlockX=function(e){return 15+(e[0]<<4)},e.maxBlockZ=function(e){return 15+(e[1]<<4)}}(Sf||(Sf={})),function(e){function t(e){return{value:()=>e,key:()=>{}}}function i(e,t){return{value:()=>e.getOrThrow(t),key:()=>t}}e.parser=function(e,n){return r=>"string"==typeof r?i(e,ff.parse(r)):t(n(r))},e.direct=t,e.reference=i}(Ef||(Ef={}));const Ff=class{constructor(e,t){this.key=e,this.parser=t,this.storage=new Map,this.builtin=new Map}register(e,t,i){return this.storage.set(e.toString(),t),i&&this.builtin.set(e.toString(),t),Ef.reference(this,e)}keys(){return[...this.storage.keys()].map((e=>ff.parse(e)))}get(e){return this.storage.get(e.toString())}getOrThrow(e){const t=this.storage.get(e.toString());if(void 0===t)throw new Error(`Missing key in ${this.key.toString()}: ${e.toString()}`);return t}parse(e){if(!this.parser)throw new Error(`No parser exists for ${this.key.toString()}`);return this.parser(e)}clear(){this.storage.clear();for(const[e,t]of this.builtin.entries())this.storage.set(e,t);return this}assign(e){if(!this.key.equals(e.key))throw new Error(`Cannot assign registry of type ${e.key.toString()} to registry of type ${this.key.toString()}`);for(const t of e.keys())this.storage.set(t.toString(),e.getOrThrow(t));return this}cloneEmpty(){return new Ff(this.key,this.parser)}};let Df=Ff;function Bf(e){return e*e}function Lf(e,t,i){return Math.max(t,Math.min(i,e))}function Mf(e,t,i){return t+e*(i-t)}function Tf(e,t,i,n,r,o){return Mf(t,Mf(e,i,n),Mf(e,r,o))}function Rf(e,t,i){return 0===e?t():1===e?i():t()+e*(i()-t())}function $f(e,t,i,n,r,o){return Rf(t,(()=>Rf(e,i,n)),(()=>Rf(e,r,o)))}function jf(e,t,i){return i<0?e:i>1?t:Mf(i,e,t)}function If(e,t,i){return(e-t)/(i-t)}function Pf(e){return e*e*e*(e*(6*e-15)+10)}function zf(e,t,i,n,r){return Mf(If(e,t,i),n,r)}function Uf(e,t,i,n,r){return jf(n,r,If(e,t,i))}function Wf(e,t,i){let n=BigInt(3129871*e)^BigInt(i)*BigInt(116129781)^BigInt(t);return n=n*n*BigInt(42317861)+n*BigInt(11),n>>BigInt(16)}function Hf(e,t,i,n,r,o,a,s){return BigInt(e)<<BigInt(56)|BigInt(t)<<BigInt(48)|BigInt(i)<<BigInt(40)|BigInt(n)<<BigInt(32)|BigInt(r)<<BigInt(24)|BigInt(o)<<BigInt(16)|BigInt(a)<<BigInt(8)|BigInt(s)}var qf;Df.REGISTRY=new Ff(ff.create("root")),function(e){e.fromJson=function e(n,r){var o,a,s,c;if("number"==typeof n)return new t(n);const l=null!=(o=uf.readObject(n))?o:{},u=new i(r(l.coordinate)),d=null!=(a=uf.readArray(l.points,(e=>{var t;return null!=(t=uf.readObject(e))?t:{}})))?a:[];if(0===d.length)return new t(0);for(const t of d){const i=null!=(s=uf.readNumber(t.location))?s:0,n=e(t.value,r),o=null!=(c=uf.readNumber(t.derivative))?c:0;u.addPoint(i,n,o)}return u};class t{constructor(e){this.value=e}compute(){return this.value}min(){return this.value}max(){return this.value}mapAll(){return this}}e.Constant=t;class i{constructor(e,t=[],i=[],n=[]){this.coordinate=e,this.locations=t,this.values=i,this.derivatives=n}compute(e){const t=this.coordinate.compute(e),i=function(e,t,i){let n=t-e;for(;n>0;){const t=Math.floor(n/2),r=e+t;i(r)?n=t:(e=r+1,n-=t+1)}return e}(0,this.locations.length,(e=>t<this.locations[e]))-1,n=this.locations.length-1;if(i<0)return this.values[0].compute(e)+this.derivatives[0]*(t-this.locations[0]);if(i===n)return this.values[n].compute(e)+this.derivatives[n]*(t-this.locations[n]);const r=this.locations[i],o=this.locations[i+1],a=this.derivatives[i],s=this.derivatives[i+1],c=(t-r)/(o-r),l=this.values[i].compute(e),u=this.values[i+1].compute(e),d=a*(o-r)-(u-l),h=-s*(o-r)+(u-l);return Mf(c,l,u)+c*(1-c)*Mf(c,d,h)}min(){return Math.min(...this.values.map((e=>e.min())))}max(){return Math.max(...this.values.map((e=>e.max())))}mapAll(e){return new i(e(this.coordinate),this.locations,this.values.map((t=>t.mapAll(e))),this.derivatives)}addPoint(t,i,n=0){return this.locations.push(t),this.values.push("number"==typeof i?new e.Constant(i):i),this.derivatives.push(n),this}}e.MultiPoint=i}(qf||(qf={}));const Vf=class{constructor(e){this.seed=BigInt(0),this.setSeed(e)}fork(){return new Vf(this.nextLong())}forkPositional(){return new Kf(this.nextLong())}setSeed(e){this.seed=e^Vf.MULTIPLIER&Vf.MODULUS_MASK}advance(){this.seed=this.seed*Vf.MULTIPLIER+Vf.INCREMENT&Vf.MODULUS_MASK}consume(e){for(let t=0;t<e;t+=1)this.advance()}next(e){this.advance();const t=Number(this.seed>>BigInt(Vf.MODULUS_BITS-e));return t>2147483647?t-4294967296:t}nextInt(e){if(void 0===e)return this.next(32);if(0==(e&e-1))return Number(BigInt(e)*BigInt(this.next(31))>>BigInt(31));let t,i;for(;(t=this.next(31))-(i=t%e)+(e-1)<0;);return i}nextLong(){return(BigInt(this.next(32))<<BigInt(32))+BigInt(this.next(32))}nextFloat(){return this.next(24)*Vf.FLOAT_MULTIPLIER}nextDouble(){const e=this.next(30);return this.advance(),e*Vf.DOUBLE_MULTIPLIER}};let Gf=Vf;Gf.MODULUS_BITS=48,Gf.MODULUS_MASK=BigInt("281474976710655"),Gf.MULTIPLIER=BigInt("25214903917"),Gf.INCREMENT=BigInt("11"),Gf.FLOAT_MULTIPLIER=1/Math.pow(2,24),Gf.DOUBLE_MULTIPLIER=1/Math.pow(2,30);class Kf{constructor(e){this.seed=e}at(e,t,i){const n=Wf(e,t,i);return new Gf(n^this.seed)}fromHashOf(e){const t=of(e,{asBytes:!0}),i=Hf(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]);return new Gf(i^this.seed)}seedKey(){return[this.seed,BigInt(0)]}}const Xf=class{constructor(e){this.seed=[BigInt(0),BigInt(0)],this.seed=e}static create(e){return new Xf(Xf.upgradeSeedTo128bit(e))}static mixStafford13(e){return((e=((e=(e^e>>Xf.BIGINT_30)*Xf.STAFFORD_1&Xf.MAX_ULONG)^e>>Xf.BIGINT_27)*Xf.STAFFORD_2&Xf.MAX_ULONG)^e>>Xf.BIGINT_31)&Xf.MAX_ULONG}static upgradeSeedTo128bit(e){e<0&&(e+=Xf.POW2_60);const t=e^Xf.SILVER_RATIO_64,i=t+Xf.GOLDEN_RATIO_64&Xf.MAX_ULONG;return[Xf.mixStafford13(t),Xf.mixStafford13(i)]}static rotateLeft(e,t){return e<<t&Xf.MAX_ULONG|e>>Xf.BIGINT_64-t}setSeed(e){this.seed=Xf.upgradeSeedTo128bit(e)}fork(){return new Xf([this.next(),this.next()])}forkPositional(){return new Yf(this.next(),this.next())}next(){const e=this.seed[0];let t=this.seed[1];const i=Xf.rotateLeft(e+t&Xf.MAX_ULONG,Xf.BIGINT_17)+e&Xf.MAX_ULONG;return t^=e,this.seed=[Xf.rotateLeft(e,Xf.BIGINT_49)^t^t<<Xf.BIGINT_21&Xf.MAX_ULONG,Xf.rotateLeft(t,Xf.BIGINT_28)],i}nextLong(){let e=this.next();return e>Xf.POW2_63&&(e-=Xf.POW2_60),e}consume(e){let t=this.seed[0],i=this.seed[1];for(let n=0;n<e;n+=1)i^=t,t=Xf.rotateLeft(t,Xf.BIGINT_49)^i^i<<Xf.BIGINT_21,i=Xf.rotateLeft(i,Xf.BIGINT_28);this.seed=[t,i]}nextBits(e){return this.next()>>BigInt(64-e)}nextInt(e){let t=this.next()&Xf.MAX_UINT;if(e){const i=BigInt(e);let n=t*i,r=n&Xf.MAX_UINT;if(r<i){const e=((~i&Xf.MAX_UINT)+Xf.BIGINT_1)%i;for(;r<e;)t=this.next()&Xf.MAX_UINT,n=t*i,r=n&Xf.MAX_UINT}const o=n>>Xf.BIGINT_32;return Number(o)}{let e=Number(t);return e>=2147483648&&(e-=4294967296),e}}nextFloat(){return Number(this.nextBits(24))*Xf.FLOAT_MULTIPLIER}nextDouble(){return Number(this.nextBits(53))*Xf.DOUBLE_MULTIPLIER}parityConfigString(){return"seedLo: "+this.seed[0]+", seedHi: "+this.seed[1]}};let Jf=Xf;Jf.SILVER_RATIO_64=BigInt("7640891576956012809"),Jf.GOLDEN_RATIO_64=BigInt("-7046029254386353131"),Jf.FLOAT_MULTIPLIER=1/Math.pow(2,24),Jf.DOUBLE_MULTIPLIER=11102230246251565e-32,Jf.BIGINT_1=BigInt(1),Jf.BIGINT_17=BigInt(17),Jf.BIGINT_21=BigInt(21),Jf.BIGINT_27=BigInt(27),Jf.BIGINT_28=BigInt(28),Jf.BIGINT_30=BigInt(30),Jf.BIGINT_31=BigInt(31),Jf.BIGINT_32=BigInt(32),Jf.BIGINT_49=BigInt(49),Jf.BIGINT_64=BigInt(64),Jf.STAFFORD_1=BigInt("-4658895280553007687"),Jf.STAFFORD_2=BigInt("-7723592293110705685"),Jf.MAX_ULONG=BigInt("0xFFFFFFFFFFFFFFFF"),Jf.POW2_60=BigInt("0x10000000000000000"),Jf.POW2_63=BigInt("0x8000000000000000"),Jf.MAX_UINT=BigInt(4294967295);class Yf{constructor(e,t){this.seedLo=e,this.seedHi=t}at(e,t,i){const n=Wf(e,t,i)^this.seedLo;return new Jf([n,this.seedHi])}fromHashOf(e){const t=of(e,{asBytes:!0}),i=Hf(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),n=Hf(t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]);return new Jf([i^this.seedLo,n^this.seedHi])}seedKey(){return[this.seedLo,this.seedHi]}}const Zf=class{constructor(e){this.xo=256*e.nextDouble(),this.yo=256*e.nextDouble(),this.zo=256*e.nextDouble(),this.p=Array(256);for(let t=0;t<256;t+=1)this.p[t]=t;for(let t=0;t<256;t+=1){const i=e.nextInt(256-t),n=this.p[t];this.p[t]=this.p[t+i],this.p[t+i]=n}}sample2D(e,t){let i,n,r;const o=(e+t)*Zf.F2,a=Math.floor(e+o),s=e-(a-(i=(a+(n=Math.floor(t+o)))*Zf.G2));let c,l;s>(r=t-(n-i))?(c=1,l=0):(c=0,l=1);const u=s-c+Zf.G2,d=r-l+Zf.G2,h=s-1+2*Zf.G2,p=r-1+2*Zf.G2,m=255&a,f=255&n,g=this.P(m+this.P(f))%12,_=this.P(m+c+this.P(f+l))%12,b=this.P(m+1+this.P(f+1))%12;return 70*(this.getCornerNoise3D(g,s,r,0,.5)+this.getCornerNoise3D(_,u,d,0,.5)+this.getCornerNoise3D(b,h,p,0,.5))}sample(e,t,i){const n=.3333333333333333*(e+t+i),r=Math.floor(e+n),o=Math.floor(t+n),a=Math.floor(i+n),s=.16666666666666666*(r+o+a),c=e-(r-s),l=t-(o-s),u=i-(a-s);let d,h,p,m,f,g;c>=l?l>=u?(d=1,h=0,p=0,m=1,f=1,g=0):c>=u?(d=1,h=0,p=0,m=1,f=0,g=1):(d=0,h=0,p=1,m=1,f=0,g=1):l<u?(d=0,h=0,p=1,m=0,f=1,g=1):c<u?(d=0,h=1,p=0,m=0,f=1,g=1):(d=0,h=1,p=0,m=1,f=1,g=0);const _=c-d+.16666666666666666,b=l-h+.16666666666666666,v=u-p+.16666666666666666,y=c-m+.3333333333333333,w=l-f+.3333333333333333,x=u-g+.3333333333333333,N=c-.5,k=l-.5,A=u-.5,C=255&r,O=255&o,S=255&a,E=this.P(C+this.P(O+this.P(S)))%12,F=this.P(C+d+this.P(O+h+this.P(S+p)))%12,D=this.P(C+m+this.P(O+f+this.P(S+g)))%12,B=this.P(C+1+this.P(O+1+this.P(S+1)))%12;return 32*(this.getCornerNoise3D(E,c,l,u,.6)+this.getCornerNoise3D(F,_,b,v,.6)+this.getCornerNoise3D(D,y,w,x,.6)+this.getCornerNoise3D(B,N,k,A,.6))}P(e){return this.p[255&e]}getCornerNoise3D(e,t,i,n,r){let o,a=r-t*t-i*i-n*n;return a<0?o=0:(a*=a,o=a*a*Zf.gradDot(e,t,i,n)),o}static gradDot(e,t,i,n){const r=Zf.GRADIENT[15&e];return r[0]*t+r[1]*i+r[2]*n}};let Qf=Zf;Qf.GRADIENT=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1],[1,1,0],[0,-1,1],[-1,1,0],[0,-1,-1]],Qf.F2=.5*(Math.sqrt(3)-1),Qf.G2=(3-Math.sqrt(3))/6;class eg{constructor(e){this.xo=256*e.nextDouble(),this.yo=256*e.nextDouble(),this.zo=256*e.nextDouble(),this.p=Array(256);for(let t=0;t<256;t+=1)this.p[t]=t>127?t-256:t;for(let t=0;t<256;t+=1){const i=e.nextInt(256-t),n=this.p[t];this.p[t]=this.p[t+i],this.p[t+i]=n}}sample(e,t,i,n=0,r=0){const o=e+this.xo,a=t+this.yo,s=i+this.zo,c=Math.floor(o),l=Math.floor(a),u=Math.floor(s),d=o-c,h=a-l,p=s-u;let m=0;if(0!==n){const e=r>=0&&r<h?r:h;m=Math.floor(e/n+1e-7)*n}return this.sampleAndLerp(c,l,u,d,h-m,p,h)}sampleAndLerp(e,t,i,n,r,o,a){const s=this.P(e),c=this.P(e+1),l=this.P(s+t),u=this.P(s+t+1),d=this.P(c+t),h=this.P(c+t+1),p=Qf.gradDot(this.P(l+i),n,r,o),m=Qf.gradDot(this.P(d+i),n-1,r,o),f=Qf.gradDot(this.P(u+i),n,r-1,o),g=Qf.gradDot(this.P(h+i),n-1,r-1,o),_=Qf.gradDot(this.P(l+i+1),n,r,o-1),b=Qf.gradDot(this.P(d+i+1),n-1,r,o-1),v=Qf.gradDot(this.P(u+i+1),n,r-1,o-1),y=Qf.gradDot(this.P(h+i+1),n-1,r-1,o-1);return function(e,t,i,n,r,o,a,s,c,l,u){return Mf(i,Tf(e,t,n,r,o,a),Tf(e,t,s,c,l,u))}(Pf(n),Pf(a),Pf(o),p,m,f,g,_,b,v,y)}P(e){return 255&this.p[255&e]}}class tg{constructor(e,t,i){if(e instanceof Jf){const n=e.forkPositional();this.noiseLevels=Array(i.length);for(let e=0;e<i.length;e++)if(0!==i[e]){const i=t+e;this.noiseLevels[e]=new eg(n.fromHashOf("octave_"+i))}}else{if(1-t<i.length)throw new Error("Positive octaves are not allowed when using LegacyRandom");this.noiseLevels=Array(i.length);for(let n=-t;n>=0;n-=1)n<i.length&&0!==i[n]?this.noiseLevels[n]=new eg(e):e.consume(262)}this.amplitudes=i,this.lowestFreqInputFactor=Math.pow(2,t),this.lowestFreqValueFactor=Math.pow(2,i.length-1)/(Math.pow(2,i.length)-1),this.maxValue=this.edgeValue(2)}sample(e,t,i,n=0,r=0,o=!1){let a=0,s=this.lowestFreqInputFactor,c=this.lowestFreqValueFactor;for(let l=0;l<this.noiseLevels.length;l+=1){const u=this.noiseLevels[l];u&&(a+=this.amplitudes[l]*c*u.sample(tg.wrap(e*s),o?-u.yo:tg.wrap(t*s),tg.wrap(i*s),n*s,r*s)),s*=2,c/=2}return a}getOctaveNoise(e){return this.noiseLevels[this.noiseLevels.length-1-e]}edgeValue(e){let t=0,i=this.lowestFreqValueFactor;for(let n=0;n<this.noiseLevels.length;n+=1)this.noiseLevels[n]&&(t+=this.amplitudes[n]*e*i),i/=2;return t}static wrap(e){return e-33554432*Math.floor(e/33554432+.5)}}class ig{constructor(e,t,i,n){this.cellWidth=i,this.cellHeight=n,this.minLimitNoise=new tg(e,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.maxLimitNoise=new tg(e,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.mainNoise=new tg(e,-7,[1,1,1,1,1,0,0,0]),this.xzScale=684.412*t.xzScale,this.yScale=684.412*t.yScale,this.xzMainScale=this.xzScale/t.xzFactor,this.yMainScale=this.yScale/t.yFactor,this.maxValue=this.minLimitNoise.edgeValue(this.yScale+2)}sample(e,t,i){let n;e=Math.floor(e/this.cellWidth),t=Math.floor(t/this.cellHeight),i=Math.floor(i/this.cellWidth);let r=0,o=1;for(let c=0;c<8;c+=1){if(n=this.mainNoise.getOctaveNoise(c),n){const a=this.xzMainScale*o,s=this.yMainScale*o,c=tg.wrap(e*a),l=tg.wrap(t*s),u=tg.wrap(i*a);r+=n.sample(c,l,u,s,t*s)/o}o/=2}r=(r/10+1)/2,o=1;let a=0,s=0;for(let c=0;c<16;c+=1){const l=this.xzScale*o,u=this.yScale*o,d=tg.wrap(e*l),h=tg.wrap(t*u),p=tg.wrap(i*l);r<1&&(n=this.minLimitNoise.getOctaveNoise(c))&&(a+=n.sample(d,h,p,u,t*u)/o),r>0&&(n=this.maxLimitNoise.getOctaveNoise(c))&&(s+=n.sample(d,h,p,u,t*u)/o),o/=2}return jf(a/512,s/512,r)/128}}var ng;(ng||(ng={})).fromJson=function(e){var t,i,n,r,o;const a=null!=(t=uf.readObject(e))?t:{};return{xzScale:null!=(i=uf.readNumber(a.xz_scale))?i:1,yScale:null!=(n=uf.readNumber(a.y_scale))?n:1,xzFactor:null!=(r=uf.readNumber(a.xz_factor))?r:80,yFactor:null!=(o=uf.readNumber(a.y_factor))?o:80}};const rg=class{constructor(e,{firstOctave:t,amplitudes:i}){this.first=new tg(e,t,i),this.second=new tg(e,t,i);let n=1/0,r=-1/0;for(let a=0;a<i.length;a+=1)0!==i[a]&&(n=Math.min(n,a),r=Math.max(r,a));const o=.1*(1+1/(r-n+1));this.valueFactor=1/6/o,this.maxValue=(this.first.maxValue+this.second.maxValue)*this.valueFactor}sample(e,t,i){const n=e*rg.INPUT_FACTOR,r=t*rg.INPUT_FACTOR,o=i*rg.INPUT_FACTOR;return(this.first.sample(e,t,i)+this.second.sample(n,r,o))*this.valueFactor}};let og=rg;var ag,sg,cg;og.INPUT_FACTOR=1.0181268882175227,(sg=ag||(ag={})).create=function(e,t){return{firstOctave:e,amplitudes:t}},sg.fromJson=function(e){var t,i,n;const r=null!=(t=uf.readObject(e))?t:{};return{firstOctave:null!=(i=uf.readInt(r.firstOctave))?i:0,amplitudes:null!=(n=uf.readArray(r.amplitudes,(e=>{var t;return null!=(t=uf.readNumber(e))?t:0})))?n:[]}},(cg||(cg={})).rotate=function(e,t,i){let{up:n,down:r,north:o,east:a,south:s,west:c}=e;switch(i){case 90:[o,a,s,c]=[a,s,c,o];break;case 180:[o,a,s,c]=[s,c,o,a];break;case 270:[o,a,s,c]=[c,o,a,s]}switch(t){case 90:[n,o,r,s]=[o,r,s,n];break;case 180:[n,o,r,s]=[r,s,n,o];break;case 270:[n,o,r,s]=[s,n,o,r]}return{up:n,down:r,north:o,east:a,south:s,west:c}};const lg=class{constructor(e,t,i){this.offsetSampler=e,this.factorSampler=t,this.jaggednessSampler=i}static extractor(e){return{compute:t=>t[e]}}static fromJson(e){var t;const i=null!=(t=uf.readObject(e))?t:{};return new lg(qf.fromJson(i.offset,this.EXTRACTOR),qf.fromJson(i.factor,this.EXTRACTOR),qf.fromJson(i.jaggedness,this.EXTRACTOR))}offset(e){return this.offsetSampler.compute(e)+lg.GLOBAL_OFFSET}factor(e){return this.factorSampler.compute(e)}jaggedness(e){return this.jaggednessSampler.compute(e)}static point(e,t,i){return{continents:e,erosion:t,weirdness:i,ridges:this.peaksAndValleys(i)}}static peaksAndValleys(e){return 3*-(Math.abs(Math.abs(e)-.6666667)-.33333334)}};let ug=lg;var dg,hg,pg,mg,fg,gg,_g;ug.GLOBAL_OFFSET=-.50375,ug.EXTRACTOR=e=>{var t;const i=null!=(t=uf.readString(e))?t:"continents";return lg.extractor(i)},ug.CONTINENTS=lg.extractor("continents"),ug.EROSION=lg.extractor("erosion"),ug.WEIRDNESS=lg.extractor("weirdness"),ug.RIDGES=lg.extractor("ridges"),function(e){function t(e){return e.ySize<<2}e.fromJson=function(e){var t,i,n,r,o;const a=null!=(t=uf.readObject(e))?t:{};return{minY:null!=(i=uf.readInt(a.min_y))?i:0,height:null!=(n=uf.readInt(a.height))?n:256,xzSize:null!=(r=uf.readInt(a.size_horizontal))?r:1,ySize:null!=(o=uf.readInt(a.size_vertical))?o:1,sampling:ng.fromJson(a.sampling),topSlide:hg.fromJson(a.top_slide),bottomSlide:hg.fromJson(a.bottom_slide),terrainShaper:ug.fromJson(a.terrain_shaper)}},e.cellHeight=t,e.cellWidth=function(e){return e.xzSize<<2},e.cellCountY=function(e){return e.height/t(e)},e.minCellY=function(e){return Math.floor(e.minY/t(e))},e.applySlides=function(i,n,r){const o=Math.floor(r/t(i))-e.minCellY(i);return n=hg.apply(i.topSlide,n,e.cellCountY(i)-o),hg.apply(i.bottomSlide,n,o)}}(dg||(dg={})),(pg=hg||(hg={})).fromJson=function(e){var t,i,n,r;const o=null!=(t=uf.readObject(e))?t:{};return{target:null!=(i=uf.readNumber(o.target))?i:0,size:null!=(n=uf.readInt(o.size))?n:0,offset:null!=(r=uf.readInt(o.offset))?r:0}},pg.apply=function(e,t,i){if(e.size<=0)return t;const n=(i-e.offset)/e.size;return jf(e.target,t,n)},function(e){function t(e){const t=new Df(ff.create(e));return Df.REGISTRY.register(t.key,t),t}e.NOISE=t("worldgen/noise"),e.DENSITY_FUNCTION=t("worldgen/density_function")}(mg||(mg={}));class bg{minValue(){return-this.maxValue()}mapAll(e){return e.map(this)}}!function(e){e.context=function(e,t,i){return{x:e,y:t,z:i}};class t extends e{constructor(e){super(),this.input=e}compute(e){return this.transform(e,this.input.compute(e))}}const i=Ef.parser(mg.NOISE,ag.fromJson);e.fromJson=function e(t,n=e){var c,_,w,O,R,$,j,I,P,z,U,W,H,q,V,G,K,X,J;if("string"==typeof t)return new o(Ef.reference(mg.DENSITY_FUNCTION,ff.parse(t)));if("number"==typeof t)return new r(t);const Y=null!=(c=uf.readObject(t))?c:{},Z=null==(_=uf.readString(Y.type))?void 0:_.replace(/^minecraft:/,"");switch(Z){case"blend_alpha":return new a(1,0,1);case"blend_offset":case"beardifier":return new a(0,-1/0,1/0);case"old_blended_noise":return new s;case"flat_cache":return new l(n(Y.argument));case"interpolated":return new p(n(Y.argument));case"cache_2d":return new d(n(Y.argument));case"cache_once":return new h(n(Y.argument));case"cache_all_in_cell":return new u(n(Y.argument));case"noise":return new m(null!=(w=uf.readNumber(Y.xz_scale))?w:1,null!=(O=uf.readNumber(Y.y_scale))?O:1,i(Y.noise));case"end_islands":return new f;case"weird_scaled_sampler":return new b(n(Y.input),uf.readEnum(Y.rarity_value_mapper,g),i(Y.noise));case"shifted_noise":return new v(n(Y.shift_x),n(Y.shift_y),n(Y.shift_z),null!=(R=uf.readNumber(Y.xz_scale))?R:1,null!=($=uf.readNumber(Y.y_scale))?$:1,i(Y.noise));case"range_choice":return new y(n(Y.input),null!=(j=uf.readNumber(Y.min_inclusive))?j:0,null!=(I=uf.readNumber(Y.max_exclusive))?I:1,n(Y.when_in_range),n(Y.when_out_of_range));case"shift_a":return new x(i(Y.argument));case"shift_b":return new N(i(Y.argument));case"shift":return new k(i(Y.argument));case"blend_density":return new A(n(Y.argument));case"clamp":return new C(n(Y.input),null!=(P=uf.readNumber(Y.min))?P:0,null!=(z=uf.readNumber(Y.max))?z:1);case"abs":case"square":case"cube":case"half_negative":case"quarter_negative":case"squeeze":return new S(Z,n(Y.argument));case"slide":return new E(n(Y.argument));case"add":case"mul":case"min":case"max":return new D(uf.readEnum(Z,F),n(Y.argument1),n(Y.argument2));case"spline":return new B(qf.fromJson(Y.spline,n),null!=(U=uf.readNumber(Y.min_value))?U:0,null!=(W=uf.readNumber(Y.max_value))?W:1);case"terrain_shaper_spline":return new M(n(Y.continentalness),n(Y.erosion),n(Y.weirdness),uf.readEnum(Y.spline,L),null!=(H=uf.readNumber(Y.min_value))?H:0,null!=(q=uf.readNumber(Y.max_value))?q:1);case"constant":return new r(null!=(V=uf.readNumber(Y.argument))?V:0);case"y_clamped_gradient":return new T(null!=(G=uf.readInt(Y.from_y))?G:-4064,null!=(K=uf.readInt(Y.to_y))?K:4062,null!=(X=uf.readNumber(Y.from_value))?X:-4064,null!=(J=uf.readNumber(Y.to_value))?J:4062)}return r.ZERO};const n=class extends e{constructor(e){super(),this.value=e}compute(){return this.value}minValue(){return this.value}maxValue(){return this.value}};let r=n;r.ZERO=new n(0),r.ONE=new n(1),e.Constant=r;class o extends e{constructor(e){super(),this.holder=e}compute(e){return this.holder.value().compute(e)}minValue(){return this.holder.value().minValue()}maxValue(){return this.holder.value().maxValue()}}e.HolderHolder=o;class a extends e.Constant{constructor(e,t,i){super(e),this.min=t,this.max=i}minValue(){return this.min}maxValue(){return this.max}}e.ConstantMinMax=a;class s extends e{constructor(e){super(),this.blendedNoise=null!=e?e:new ig(Jf.create(BigInt(0)),{xzScale:1,yScale:1,xzFactor:80,yFactor:160},4,8)}compute(e){return this.blendedNoise.sample(e.x,e.y,e.z)}maxValue(){return this.blendedNoise.maxValue}}e.OldBlendedNoise=s;class c extends e{constructor(e){super(),this.wrapped=e}minValue(){return this.wrapped.minValue()}maxValue(){return this.wrapped.maxValue()}}class l extends c{constructor(e){super(e),this.lastValue=0}compute(t){const i=t.x>>2,n=t.z>>2;return this.lastQuartX===i&&this.lastQuartZ===n||(this.lastValue=this.wrapped.compute(e.context(i<<2,0,n<<2)),this.lastQuartX=i,this.lastQuartZ=n),this.lastValue}mapAll(e){return e.map(new l(this.wrapped.mapAll(e)))}}e.FlatCache=l;class u extends c{constructor(e){super(e)}compute(e){return this.wrapped.compute(e)}mapAll(e){return e.map(new u(this.wrapped.mapAll(e)))}}e.CacheAllInCell=u;class d extends c{constructor(e){super(e),this.lastValue=0}compute(e){const t=e.x,i=e.z;return this.lastBlockX===t&&this.lastBlockZ===i||(this.lastValue=this.wrapped.compute(e),this.lastBlockX=t,this.lastBlockZ=i),this.lastValue}mapAll(e){return e.map(new d(this.wrapped.mapAll(e)))}}e.Cache2D=d;class h extends c{constructor(e){super(e),this.lastValue=0}compute(e){const t=e.x,i=e.y,n=e.z;return this.lastBlockX===t&&this.lastBlockY===i&&this.lastBlockZ===n||(this.lastValue=this.wrapped.compute(e),this.lastBlockX=t,this.lastBlockY=i,this.lastBlockZ=n),this.lastValue}mapAll(e){return e.map(new h(this.wrapped.mapAll(e)))}}e.CacheOnce=h;class p extends c{constructor(e,t=4,i=4){super(e),this.cellWidth=t,this.cellHeight=i,this.values=new Map}compute({x:e,y:t,z:i}){const n=this.cellWidth,r=this.cellHeight,o=(e%n+n)%n/n,a=(t%r+r)%r/r,s=(i%n+n)%n/n,c=Math.floor(e/n)*n,l=Math.floor(t/r)*r,u=Math.floor(i/n)*n;return function(e,t,i,n,r,o,a,s,c,l,u){return Rf(i,(()=>$f(e,t,n,r,o,a)),(()=>$f(e,t,s,c,l,u)))}(o,a,s,(()=>this.computeCorner(c,l,u)),(()=>this.computeCorner(c+n,l,u)),(()=>this.computeCorner(c,l+r,u)),(()=>this.computeCorner(c+n,l+r,u)),(()=>this.computeCorner(c,l,u+n)),(()=>this.computeCorner(c+n,l,u+n)),(()=>this.computeCorner(c,l+r,u+n)),(()=>this.computeCorner(c+n,l+r,u+n)))}computeCorner(t,i,n){return pf(this.values,`${t} ${i} ${n}`,(()=>this.wrapped.compute(e.context(t,i,n))))}mapAll(e){return e.map(new p(this.wrapped.mapAll(e)))}withCellSize(e,t){return new p(this.wrapped,e,t)}}e.Interpolated=p;class m extends e{constructor(e,t,i,n){super(),this.xzScale=e,this.yScale=t,this.noiseData=i,this.noise=n}compute(e){var t,i;return null!=(i=null==(t=this.noise)?void 0:t.sample(e.x*this.xzScale,e.y*this.yScale,e.z*this.xzScale))?i:0}maxValue(){var e,t;return null!=(t=null==(e=this.noise)?void 0:e.maxValue)?t:2}}e.Noise=m;class f extends e{compute(){return 0}minValue(){return-.84375}maxValue(){return.5625}}const g=["type_1","type_2"],_=class extends t{constructor(e,t,i,n){super(e),this.rarityValueMapper=t,this.noiseData=i,this.noise=n,this.mapper=_.ValueMapper[this.rarityValueMapper]}transform(e,t){if(!this.noise)return 0;const i=this.mapper(t);return i*Math.abs(this.noise.sample(e.x/i,e.y/i,e.z/i))}mapAll(e){return e.map(new _(this.input.mapAll(e),this.rarityValueMapper,this.noiseData,this.noise))}minValue(){return 0}maxValue(){return"type_1"===this.rarityValueMapper?2:3}static rarityValueMapper1(e){return e<-.5?.75:e<0?1:e<.5?1.5:2}static rarityValueMapper2(e){return e<-.75?.5:e<-.5?.75:e<.5?1:e<.75?2:3}};let b=_;b.ValueMapper={type_1:_.rarityValueMapper1,type_2:_.rarityValueMapper2},e.WeirdScaledSampler=b;class v extends m{constructor(e,t,i,n,r,o,a){super(n,r,o,a),this.shiftX=e,this.shiftY=t,this.shiftZ=i}compute(e){var t,i;const n=e.x*this.xzScale+this.shiftX.compute(e),r=e.y*this.yScale+this.shiftY.compute(e),o=e.z*this.xzScale+this.shiftZ.compute(e);return null!=(i=null==(t=this.noise)?void 0:t.sample(n,r,o))?i:0}mapAll(e){return e.map(new v(this.shiftX.mapAll(e),this.shiftY.mapAll(e),this.shiftZ.mapAll(e),this.xzScale,this.yScale,this.noiseData,this.noise))}}e.ShiftedNoise=v;class y extends e{constructor(e,t,i,n,r){super(),this.input=e,this.minInclusive=t,this.maxExclusive=i,this.whenInRange=n,this.whenOutOfRange=r}compute(e){const t=this.input.compute(e);return this.minInclusive<=t&&t<this.maxExclusive?this.whenInRange.compute(e):this.whenOutOfRange.compute(e)}mapAll(e){return e.map(new y(this.input.mapAll(e),this.minInclusive,this.maxExclusive,this.whenInRange.mapAll(e),this.whenOutOfRange.mapAll(e)))}minValue(){return Math.min(this.whenInRange.minValue(),this.whenOutOfRange.minValue())}maxValue(){return Math.max(this.whenInRange.maxValue(),this.whenOutOfRange.maxValue())}}e.RangeChoice=y;class w extends e{constructor(e,t){super(),this.noiseData=e,this.offsetNoise=t}compute(e){var t,i;return null!=(i=null==(t=this.offsetNoise)?void 0:t.sample(.25*e.x,.25*e.y,.25*e.z))?i:0}maxValue(){var e,t;return 4*(null!=(t=null==(e=this.offsetNoise)?void 0:e.maxValue)?t:2)}}e.ShiftNoise=w;class x extends w{constructor(e,t){super(e,t)}compute(t){return super.compute(e.context(t.x,0,t.z))}withNewNoise(e){return new x(this.noiseData,e)}}e.ShiftA=x;class N extends w{constructor(e,t){super(e,t)}compute(t){return super.compute(e.context(t.z,t.x,0))}withNewNoise(e){return new N(this.noiseData,e)}}e.ShiftB=N;class k extends w{constructor(e,t){super(e,t)}withNewNoise(e){return new k(this.noiseData,e)}}e.Shift=k;class A extends t{constructor(e){super(e)}transform(e,t){return t}mapAll(e){return e.map(new A(this.input.mapAll(e)))}minValue(){return-1/0}maxValue(){return 1/0}}e.BlendDensity=A;class C extends t{constructor(e,t,i){super(e),this.min=t,this.max=i}transform(e,t){return Lf(t,this.min,this.max)}mapAll(e){return e.map(new C(this.input.mapAll(e),this.min,this.max))}minValue(){return this.min}maxValue(){return this.max}}e.Clamp=C;const O=class extends t{constructor(e,t,i,n){super(t),this.type=e,this.min=i,this.max=n,this.transformer=O.MappedTypes[this.type]}transform(e,t){return this.transformer(t)}mapAll(e){return e.map(new O(this.type,this.input.mapAll(e)))}minValue(){var e;return null!=(e=this.min)?e:-1/0}maxValue(){var e;return null!=(e=this.max)?e:1/0}withMinMax(){const e=this.input.minValue();let t=this.transformer(e),i=this.transformer(this.input.maxValue());return"abs"!==this.type&&"square"!==this.type||(i=Math.max(t,i),t=Math.max(0,e)),new O(this.type,this.input,t,i)}};let S=O;S.MappedTypes={abs:e=>Math.abs(e),square:e=>e*e,cube:e=>e*e*e,half_negative:e=>e>0?e:.5*e,quarter_negative:e=>e>0?e:.25*e,squeeze:e=>{const t=Lf(e,-1,1);return t/2-t*t*t/24}},e.Mapped=S;class E extends t{constructor(e,t){super(e),this.settings=t}transform(e,t){return this.settings?dg.applySlides(this.settings,t,e.y):t}mapAll(e){return e.map(new E(this.input.mapAll(e),this.settings))}minValue(){return this.settings?Math.min(this.input.minValue(),this.settings.bottomSlide.target,this.settings.topSlide.target):this.input.minValue()}maxValue(){return this.settings?Math.max(this.input.maxValue(),this.settings.bottomSlide.target,this.settings.topSlide.target):this.input.maxValue()}}e.Slide=E;const F=["add","mul","min","max"];class D extends e{constructor(e,t,i,n,r){super(),this.type=e,this.argument1=t,this.argument2=i,this.min=n,this.max=r}compute(e){const t=this.argument1.compute(e);switch(this.type){case"add":return t+this.argument2.compute(e);case"mul":return 0===t?0:t*this.argument2.compute(e);case"min":return t<this.argument2.minValue()?t:Math.min(t,this.argument2.compute(e));case"max":return t>this.argument2.maxValue()?t:Math.max(t,this.argument2.compute(e))}}mapAll(e){return e.map(new D(this.type,this.argument1.mapAll(e),this.argument2.mapAll(e)))}minValue(){var e;return null!=(e=this.min)?e:-1/0}maxValue(){var e;return null!=(e=this.max)?e:1/0}withMinMax(){const e=this.argument1.minValue(),t=this.argument2.minValue(),i=this.argument1.maxValue(),n=this.argument2.maxValue();let r,o;switch("min"!==this.type&&"max"!==this.type||!(e>=n||t>=i)||console.warn(`Creating a ${this.type} function between two non-overlapping inputs`),this.type){case"add":r=e+t,o=i+n;break;case"mul":r=e>0&&t>0?e*t||0:i<0&&n<0?i*n||0:Math.min(e*n||0,t*i||0),o=e>0&&t>0?i*n||0:i<0&&n<0?e*t||0:Math.max(e*t||0,i*n||0);break;case"min":r=Math.min(e,t),o=Math.min(i,n);break;case"max":r=Math.max(e,t),o=Math.max(i,n)}return new D(this.type,this.argument1,this.argument2,r,o)}}e.Ap2=D;class B extends e{constructor(e,t,i){super(),this.spline=e,this.min=t,this.max=i}compute(e){return Lf(this.spline.compute(e),this.min,this.max)}mapAll(t){return t.map(new B(this.spline.mapAll((i=>i instanceof e?i.mapAll(t):i)),this.min,this.max))}minValue(){return this.min}maxValue(){return this.max}}e.Spline=B;const L=["offset","factor","jaggedness"];class M extends e{constructor(e,t,i,n,r,o,a){super(),this.continentalness=e,this.erosion=t,this.weirdness=i,this.spline=n,this.min=r,this.max=o,this.shaper=a}compute(e){if(!this.shaper)return 0;const t=ug.point(this.continentalness.compute(e),this.erosion.compute(e),this.weirdness.compute(e));return Lf(this.shaper[this.spline](t),this.min,this.max)}mapAll(e){return e.map(new M(this.continentalness.mapAll(e),this.erosion.mapAll(e),this.weirdness.mapAll(e),this.spline,this.min,this.max,this.shaper))}minValue(){return this.min}maxValue(){return this.max}}e.TerrainShaperSpline=M;class T extends e{constructor(e,t,i,n){super(),this.fromY=e,this.toY=t,this.fromValue=i,this.toValue=n}compute(e){return Uf(e.y,this.fromY,this.toY,this.fromValue,this.toValue)}minValue(){return Math.min(this.fromValue,this.toValue)}maxValue(){return Math.max(this.fromValue,this.toValue)}}e.YClampedGradient=T}(bg||(bg={}));class vg{constructor(e,t){this.level=e,this.type=t}at(e){return e<this.level?this.type:kf.AIR}}(fg||(fg={})).createDisabled=function(e){return{compute({x:t,y:i,z:n},r){if(!(r>0))return e(t,i,n).at(i)}}},function(e){function t(e,t){return"number"==typeof e?new i(e,null!=t?t:e):e}e.target=function(e,t,i,n,o,a){return new r(e,t,i,n,o,a)},e.parameters=function(e,i,r,o,a,s,c){return new n(t(e),t(i),t(r),t(o),t(a),t(s),c)},e.param=t;class i{constructor(e,t){this.min=e,this.max=t}distance(e){const t=("number"==typeof e?e:e.min)-this.max,i=this.min-("number"==typeof e?e:e.max);return t>0?t:Math.max(i,0)}union(e){return new i(Math.min(this.min,e.min),Math.max(this.max,e.max))}static fromJson(e){var t;if("number"==typeof e)return new i(e,e);const[n,r]=null!=(t=uf.readArray(e,(e=>uf.readNumber(e))))?t:[];return new i(null!=n?n:0,null!=r?r:0)}}e.Param=i;class n{constructor(e,t,i,n,r,o,a){this.temperature=e,this.humidity=t,this.continentalness=i,this.erosion=n,this.depth=r,this.weirdness=o,this.offset=a}fittness(e){return Bf(this.temperature.distance(e.temperature))+Bf(this.humidity.distance(e.humidity))+Bf(this.continentalness.distance(e.continentalness))+Bf(this.erosion.distance(e.erosion))+Bf(this.depth.distance(e.depth))+Bf(this.weirdness.distance(e.weirdness))+Bf(this.offset-e.offset)}space(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,new i(this.offset,this.offset)]}static fromJson(e){var t,r;const o=null!=(t=uf.readObject(e))?t:{};return new n(i.fromJson(o.temperature),i.fromJson(o.humidity),i.fromJson(o.continentalness),i.fromJson(o.erosion),i.fromJson(o.depth),i.fromJson(o.weirdness),null!=(r=uf.readInt(o.offset))?r:0)}}e.ParamPoint=n;class r{constructor(e,t,i,n,r,o){this.temperature=e,this.humidity=t,this.continentalness=i,this.erosion=n,this.depth=r,this.weirdness=o}get offset(){return 0}toArray(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,this.offset]}}e.TargetPoint=r,e.Parameters=class{constructor(e){this.things=e,this.index=new a(e)}find(e){return this.index.search(e,((e,t)=>e.distance(t)))}},e.Sampler=class{constructor(e,t,i,n,r,o){this.temperature=e,this.humidity=t,this.continentalness=i,this.erosion=n,this.depth=r,this.weirdness=o}static fromRouter(t){return new e.Sampler(t.temperature,t.vegetation,t.continents,t.erosion,t.depth,t.ridges)}sample(t,i,n){const r=bg.context(t<<2,i<<2,n<<2);return e.target(this.temperature.compute(r),this.humidity.compute(r),this.continentalness.compute(r),this.erosion.compute(r),this.depth.compute(r),this.weirdness.compute(r))}};const o=class{constructor(e){this.root=o.build(e.map((([e,t])=>new l(e,t))))}static build(e){if(1===e.length)return e[0];if(e.length<=o.CHILDREN_PER_NODE){const t=e.map((e=>{let t=0;for(let i=0;i<7;i+=1){const n=e.space[i];t+=Math.abs((n.min+n.max)/2)}return{key:t,node:e}})).sort(((e,t)=>e.key-t.key)).map((({node:e})=>e));return new c(t)}let t=1/0,i=-1,n=[];for(let r=0;r<7;++r){e=o.sort(e,r,!1),n=o.bucketize(e);let a=0;for(const e of n)a+=o.area(e.space);t>a&&(t=a,i=r)}return e=o.sort(e,i,!1),n=o.bucketize(e),n=o.sort(n,i,!0),new c(n.map((e=>o.build(e.children))))}static sort(e,t,i){return e.map((e=>{const n=e.space[t],r=(n.min+n.max)/2;return{key:i?Math.abs(r):r,node:e}})).sort(((e,t)=>e.key-t.key)).map((({node:e})=>e))}static bucketize(e){const t=[];let i=[];const n=Math.pow(10,Math.floor(Math.log(e.length-.01)/Math.log(10)));for(const r of e)i.push(r),i.length<n||(t.push(new c(i)),i=[]);return 0!==i.length&&t.push(new c(i)),t}static area(e){let t=0;for(const i of e)t+=Math.abs(i.max-i.min);return t}search(e,t){return this.root.search(e.toArray(),t).thing()}};let a=o;a.CHILDREN_PER_NODE=10,e.RTree=a;class s{constructor(e){this.space=e}distance(e){let t=0;for(let i=0;i<7;i+=1)t+=Bf(this.space[i].distance(e[i]));return t}}e.RNode=s;class c extends s{constructor(e){super(c.buildSpace(e)),this.children=e}static buildSpace(e){let t=[...Array(7)].map((()=>new i(1/0,-1/0)));for(const i of e)t=[...Array(7)].map(((e,n)=>t[n].union(i.space[n])));return t}search(e,t){let i=1/0,n=null;for(const r of this.children){const o=t(r,e);if(i<=o)continue;const a=r.search(e,t),s=r==a?o:t(a,e);i<=s||(i=s,n=a)}return n}}e.RSubTree=c;class l extends s{constructor(e,t){super(e.space()),this.thing=t}search(){return this}}e.RLeaf=l}(gg||(gg={}));class yg{constructor(e){this.biome=e}getBiome(){return this.biome}static fromJson(e){var t,i;const n=null!=(t=uf.readObject(e))?t:{},r=ff.parse(null!=(i=uf.readString(n.biome))?i:"minecraft:the_void");return new yg(r)}}!function(e){function t(e,t,i){return mg.NOISE.register(ff.create(e),ag.create(t,i))}e.TEMPERATURE=t("temperature",-10,[1.5,0,1,0,0,0]),e.VEGETATION=t("vegetation",-8,[1,1,0,0,0,0]),e.CONTINENTALNESS=t("continentalness",-9,[1,1,2,2,2,1,1,1,1]),e.EROSION=t("erosion",-9,[1,1,0,1,1]),e.TEMPERATURE_LARGE=t("temperature_large",-12,[1.5,0,1,0,0,0]),e.VEGETATION_LARGE=t("vegetation_large",-10,[1,1,0,0,0,0]),e.CONTINENTALNESS_LARGE=t("continentalness_large",-11,[1,1,2,2,2,1,1,1,1]),e.EROSION_LARGE=t("erosion_large",-11,[1,1,0,1,1]),e.RIDGE=t("ridge",-7,[1,2,1,0,0,0]),e.SHIFT=t("offset",-3,[1,1,1,0]),e.AQUIFER_BARRIER=t("aquifer_barrier",-3,[1]),e.AQUIFER_FLUID_LEVEL_FLOODEDNESS=t("aquifer_fluid_level_floodedness",-7,[1]),e.AQUIFER_FLUID_LEVEL_SPREAD=t("aquifer_fluid_level_spread",-5,[1]),e.AQUIFER_LAVA=t("aquifer_lava",-1,[1]),e.PILLAR=t("pillar",-7,[1,1]),e.PILLAR_RARENESS=t("pillar_rareness",-8,[1]),e.PILLAR_THICKNESS=t("pillar_thickness",-8,[1]),e.SPAGHETTI_2D=t("spaghetti_2d",-8,[1]),e.SPAGHETTI_2D_ELEVATION=t("spaghetti_2d_elevation",-8,[1]),e.SPAGHETTI_2D_MODULATOR=t("spaghetti_2d_modulator",-8,[1]),e.SPAGHETTI_2D_THICKNESS=t("spaghetti_2d_thickness",-8,[1]),e.SPAGHETTI_3D_1=t("spaghetti_3d_1",-8,[1]),e.SPAGHETTI_3D_2=t("spaghetti_3d_2",-8,[1]),e.SPAGHETTI_3D_RARITY=t("spaghetti_3d_rarity",-8,[1]),e.SPAGHETTI_3D_THICKNESS=t("spaghetti_3d_thickness",-8,[1]),e.SPAGHETTI_ROUGHNESS=t("spaghetti_roughness",-8,[1]),e.SPAGHETTI_ROUGHNESS_MODULATOR=t("spaghetti_roughness_modulator",-8,[1]),e.CAVE_ENTRANCE=t("cave_entrance",-7,[.4,.5,1]),e.CAVE_LAYER=t("cave_layer",-8,[1]),e.CAVE_CHEESE=t("cave_cheese",-8,[.5,1,2,1,2,1,0,2,0]),e.NOODLE=t("noodle",-8,[1]),e.NOODLE_THICKNESS=t("noodle_thickness",-8,[1]),e.NOODLE_RIDGE_A=t("noodle_ridge_a",-7,[1]),e.NOODLE_RIDGE_B=t("noodle_ridge_b",-7,[1]),e.JAGGED=t("jagged",-16,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),e.SURFACE=t("surface",-6,[1,1,1]),e.SURFACE_SECONDARY=t("surface_secondary",-6,[1,1,0,1]);const i=new Map;e.instantiate=function(e,t){var n;const r=null==(n=t.key())?void 0:n.toString();if(!r)throw new Error("Cannot instantiate noise from direct holder");const o=e.seedKey(),a=i.get(r);if(a&&a[0]===o[0]&&a[1]===o[1])return a[2];const s=new og(e.fromHashOf(r),t.value());return i.set(r,[o[0],o[1],s]),s}}(_g||(_g={}));var wg,xg,Ng,kg,Ag,Cg,Og,Sg=Object.defineProperty,Eg=Object.defineProperties,Fg=Object.getOwnPropertyDescriptors,Dg=Object.getOwnPropertySymbols,Bg=Object.prototype.hasOwnProperty,Lg=Object.prototype.propertyIsEnumerable,Mg=(e,t,i)=>t in e?Sg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Tg=(e,t)=>{for(var i in t||(t={}))Bg.call(t,i)&&Mg(e,i,t[i]);if(Dg)for(var i of Dg(t))Lg.call(t,i)&&Mg(e,i,t[i]);return e};!function(e){const t=e=>Ef.parser(mg.DENSITY_FUNCTION,bg.fromJson)(e).value();e.fromJson=function(e){var i;const n=null!=(i=uf.readObject(e))?i:{};return{barrier:t(n.barrier),fluidLevelFloodedness:t(n.fluid_level_floodedness),fluidLevelSpread:t(n.fluid_level_spread),lava:t(n.lava),temperature:t(n.temperature),vegetation:t(n.vegetation),continents:t(n.continents),erosion:t(n.erosion),depth:t(n.depth),ridges:t(n.ridges),initialDensityWithoutJaggedness:t(n.initial_density_without_jaggedness),finalDensity:t(n.final_density),veinToggle:t(n.vein_toggle),veinRidged:t(n.vein_ridged),veinGap:t(n.vein_gap)}},e.create=function(e){return Tg({barrier:bg.Constant.ZERO,fluidLevelFloodedness:bg.Constant.ZERO,fluidLevelSpread:bg.Constant.ZERO,lava:bg.Constant.ZERO,temperature:bg.Constant.ZERO,vegetation:bg.Constant.ZERO,continents:bg.Constant.ZERO,erosion:bg.Constant.ZERO,depth:bg.Constant.ZERO,ridges:bg.Constant.ZERO,initialDensityWithoutJaggedness:bg.Constant.ZERO,finalDensity:bg.Constant.ZERO,veinToggle:bg.Constant.ZERO,veinRidged:bg.Constant.ZERO,veinGap:bg.Constant.ZERO},e)},e.withSettings=function(e,t,n,r=!1){const o=(r?new Gf(n):Jf.create(n)).forkPositional(),a=new i(o,t);return s=Tg({},a.mapAll(e)),c={aquiferPositionalRandomFactory:o.fromHashOf(ff.create("aquifer").toString()).forkPositional(),oreVeinsPositionalRandomFactory:o.fromHashOf(ff.create("ore").toString()).forkPositional()},Eg(s,Fg(c));var s,c};class i{constructor(e,t){this.random=e,this.settings=t,this.mapped=new Map}map(e){if(e instanceof bg.HolderHolder){const t=e.holder.key();if(void 0!==t&&this.mapped.has(t.toString()))return this.mapped.get(t.toString());{const i=e.holder.value().mapAll(this);return void 0!==t&&this.mapped.set(t.toString(),i),i}}if(e instanceof bg.Interpolated)return e.withCellSize(dg.cellWidth(this.settings),dg.cellHeight(this.settings));if(e instanceof bg.Noise)return new bg.Noise(e.xzScale,e.yScale,e.noiseData,_g.instantiate(this.random,e.noiseData));if(e instanceof bg.ShiftNoise)return e.withNewNoise(_g.instantiate(this.random,e.noiseData));if(e instanceof bg.ShiftedNoise){const t=_g.instantiate(this.random,e.noiseData);return new bg.ShiftedNoise(e.shiftX,e.shiftY,e.shiftZ,e.xzScale,e.yScale,e.noiseData,t)}return e instanceof bg.WeirdScaledSampler?new bg.WeirdScaledSampler(e.input,e.rarityValueMapper,e.noiseData,_g.instantiate(this.random,e.noiseData)):e instanceof bg.OldBlendedNoise?new bg.OldBlendedNoise(new ig(this.random.fromHashOf(ff.create("terrain").toString()),this.settings.sampling,dg.cellWidth(this.settings),dg.cellHeight(this.settings))):e instanceof bg.Mapped||e instanceof bg.Ap2?e.withMinMax():e instanceof bg.TerrainShaperSpline?new bg.TerrainShaperSpline(e.continentalness,e.erosion,e.weirdness,e.spline,e.min,e.max,this.settings.terrainShaper):e instanceof bg.Slide?new bg.Slide(e.input,this.settings):e}mapAll(e){return{barrier:e.barrier.mapAll(this),fluidLevelFloodedness:e.fluidLevelFloodedness.mapAll(this),fluidLevelSpread:e.fluidLevelSpread.mapAll(this),lava:e.lava.mapAll(this),temperature:e.temperature.mapAll(this),vegetation:e.vegetation.mapAll(this),continents:e.continents.mapAll(this),erosion:e.erosion.mapAll(this),depth:e.depth.mapAll(this),ridges:e.ridges.mapAll(this),initialDensityWithoutJaggedness:e.initialDensityWithoutJaggedness.mapAll(this),finalDensity:e.finalDensity.mapAll(this),veinToggle:e.veinToggle.mapAll(this),veinRidged:e.veinRidged.mapAll(this),veinGap:e.veinGap.mapAll(this)}}}e.Visitor=i,e.computePreliminarySurfaceLevelScanning=function(e,t,i,n){const r=dg.minCellY(e)+dg.cellCountY(e),o=dg.minCellY(e),a=dg.cellHeight(e);for(let s=r;s>=o;s-=1){const r=s*a,o=Lf(t.compute(bg.context(i,r,n)),-64,64);if(dg.applySlides(e,o,r)>=.390625)return r}return Number.MAX_SAFE_INTEGER}}(wg||(wg={}));class Rg{constructor(e,t,i,n,r,o,a,s,c){this.cellCountXZ=e,this.cellCountY=t,this.cellNoiseMinY=i,this.router=n,this.minX=r,this.minZ=o,this.settings=a,this.preliminarySurfaceLevel=new Map,this.cellWidth=dg.cellWidth(a),this.cellHeight=dg.cellHeight(a),this.firstCellX=Math.floor(r/this.cellWidth),this.firstCellZ=Math.floor(o/this.cellWidth),this.firstNoiseX=r>>2,this.firstNoiseZ=o>>2,this.noiseSizeXZ=e*this.cellWidth>>2,this.aquifer=fg.createDisabled(c);const l=this.router.finalDensity;this.materialRule=xg.fromList([e=>this.aquifer.compute(e,l.compute(e))]),this.initialDensityWithoutJaggedness=this.router.initialDensityWithoutJaggedness}getFinalState(e,t,i){return this.materialRule({x:e,y:t,z:i})}getPreliminarySurfaceLevel(e,t){return pf(this.preliminarySurfaceLevel,Sf.asLong(e,t),(()=>wg.computePreliminarySurfaceLevelScanning(this.settings,this.initialDensityWithoutJaggedness,e<<2,t<<2)))}getAquifer(){return this.aquifer}}(xg||(xg={})).fromList=function(e){return t=>{for(const i of e){const e=i(t);if(e)return e}}},(Ng||(Ng={})).fromJson=function(e){var t,i,n,r;const o=null!=(t=uf.readObject(e))?t:{};return void 0!==o.absolute?(s=null!=(i=uf.readNumber(o.absolute))?i:0,()=>s):void 0!==o.above_bottom?(a=null!=(n=uf.readNumber(o.above_bottom))?n:0,e=>e.minY+a):void 0!==o.below_top?function(e){return t=>t.maxY-e}(null!=(r=uf.readNumber(o.below_top))?r:0):()=>0;var a,s},(kg||(kg={})).create=function(e,t){return{minY:e,height:t,maxY:e+t-1}};class $g{constructor(e,t,i){this.rule=e,this.defaultBlock=t,this.random=Jf.create(i).forkPositional(),this.surfaceNoise=_g.instantiate(this.random,_g.SURFACE),this.surfaceSecondaryNoise=_g.instantiate(this.random,_g.SURFACE_SECONDARY),this.positionalRandoms=new Map}buildSurface(e,t,i,n){const r=Sf.minBlockX(e.pos),o=Sf.minBlockZ(e.pos),a=new jg(this,e,t,i,n),s=this.rule(a);for(let c=0;c<16;c+=1){const t=r+c;for(let i=0;i<1;i+=1){const n=o+i;a.updateXZ(t,n);let r=0,c=Number.MIN_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER;for(let i=e.maxY;i>=e.minY;i-=1){const o=sf.create(t,i,n),u=e.getBlockState(o);if(u.equals(kf.AIR)){r=0,c=Number.MIN_SAFE_INTEGER;continue}if(u.isFluid()){c===Number.MIN_SAFE_INTEGER&&(c=i+1);continue}if(l>=i){l=Number.MIN_SAFE_INTEGER;for(let r=i-1;r>=e.minY;r-=1){const i=e.getBlockState(sf.create(t,r,n));if(i.equals(kf.AIR)||i.isFluid()){l=r+1;break}}}r+=1;const d=i-l+1;if(!u.equals(this.defaultBlock))continue;a.updateY(r,d,c,i);const h=s(t,i,n);h&&e.setBlockState(o,h)}}}}getSurfaceDepth(e,t){return 2.75*this.surfaceNoise.sample(e,0,t)+3+.25*this.random.at(e,0,t).nextDouble()}getSurfaceSecondary(e,t){return this.surfaceSecondaryNoise.sample(e,0,t)}getRandom(e){return pf(this.positionalRandoms,e,(()=>this.random.fromHashOf(e)))}}class jg{constructor(e,t,i,n,r){this.system=e,this.chunk=t,this.noiseChunk=i,this.context=n,this.getBiome=r,this.blockX=0,this.blockY=0,this.blockZ=0,this.stoneDepthAbove=0,this.stoneDepthBelow=0,this.surfaceDepth=0,this.waterHeight=0,this.biome=()=>"",this.surfaceSecondary=()=>0,this.minSurfaceLevel=()=>0}updateXZ(e,t){this.blockX=e,this.blockZ=t,this.surfaceDepth=this.system.getSurfaceDepth(e,t),this.surfaceSecondary=hf((()=>this.system.getSurfaceSecondary(e,t))),this.minSurfaceLevel=hf((()=>this.calculateMinSurfaceLevel(e,t)))}updateY(e,t,i,n){this.blockY=n,this.stoneDepthAbove=e,this.stoneDepthBelow=t,this.waterHeight=i,this.biome=hf((()=>this.getBiome(sf.create(this.blockX,this.blockY,this.blockZ))))}calculateMinSurfaceLevel(e,t){const i=e>>4,n=t>>4,r=this.noiseChunk.getPreliminarySurfaceLevel(i<<4,n<<4),o=this.noiseChunk.getPreliminarySurfaceLevel(i+1<<4,n<<4),a=this.noiseChunk.getPreliminarySurfaceLevel(i<<4,n+1<<4),s=this.noiseChunk.getPreliminarySurfaceLevel(i+1<<4,n+1<<4);return Math.floor(Tf((15&e)/16,(15&t)/16,r,o,a,s))+this.surfaceDepth-8}}!function(e){function t(e){return()=>()=>e}function i(e){return t=>{const i=e.map((e=>e(t)));return(e,t,n)=>{for(const r of i){const i=r(e,t,n);if(i)return i}}}}function n(e,t){return i=>(n,r,o)=>{if(e(i))return t(i)(n,r,o)}}e.NOOP=()=>()=>{},e.fromJson=function(r){var o,a,s;const c=null!=(o=uf.readObject(r))?o:{};switch(null==(a=uf.readString(c.type))?void 0:a.replace(/^minecraft:/,"")){case"block":return t(kf.fromJson(c.result_state));case"sequence":return i(null!=(s=uf.readArray(c.sequence,e.fromJson))?s:[]);case"condition":return n(Cg.fromJson(c.if_true),e.fromJson(c.then_run))}return e.NOOP},e.block=t,e.sequence=i,e.condition=n}(Ag||(Ag={})),function(e){function t(e){const t=new Set(e);return e=>t.has(e.biome())}function i(e){return t=>!e(t)}function n(e,t,i,n){return r=>{const o=n?r.stoneDepthBelow:r.stoneDepthAbove,a=t?r.surfaceDepth:0,s=0===i?0:zf(r.surfaceSecondary(),-1,1,0,i);return o<=1+e+a+s}}function r(e,t,i){return n=>{const r=t(n.context),o=i(n.context);if(n.blockY<=r)return!0;if(n.blockY>=o)return!1;const a=n.system.getRandom(e),s=zf(n.blockY,r,o,1,0);return a.nextFloat()<s}}function o(e,t,i){return n=>{if(n.waterHeight===Number.MIN_SAFE_INTEGER)return!0;const r=i?n.stoneDepthAbove:0;return n.blockY+r>=n.waterHeight+e+n.surfaceDepth*t}}function a(e,t,i){return n=>{const r=i?n.stoneDepthAbove:0;return n.blockY+r>=e(n.context)+n.surfaceDepth*t}}e.FALSE=()=>!1,e.TRUE=()=>!0,e.fromJson=function(s){var c,l,u,d,h,p,m,f,g,_,b,v;const y=null!=(c=uf.readObject(s))?c:{};switch(null==(l=uf.readString(y.type))?void 0:l.replace(/^minecraft:/,"")){case"above_preliminary_surface":return e=>e.blockY>=e.minSurfaceLevel();case"biome":return t(null!=(u=uf.readArray(y.biome_is,(e=>{var t;return null!=(t=uf.readString(e))?t:""})))?u:[]);case"not":return i(e.fromJson(y.invert));case"stone_depth":return n(null!=(d=uf.readInt(y.offset))?d:0,null!=(h=uf.readBoolean(y.add_surface_depth))&&h,null!=(p=uf.readInt(y.secondary_depth_range))?p:0,"ceiling"===uf.readString(y.surface_type));case"vertical_gradient":return r(null!=(m=uf.readString(y.random_name))?m:"",Ng.fromJson(y.true_at_and_below),Ng.fromJson(y.false_at_and_above));case"water":return o(null!=(f=uf.readInt(y.offset))?f:0,null!=(g=uf.readInt(y.surface_depth_multiplier))?g:0,null!=(_=uf.readBoolean(y.add_surface_depth))&&_);case"y_above":return a(Ng.fromJson(y.anchor),null!=(b=uf.readInt(y.surface_depth_multiplier))?b:0,null!=(v=uf.readBoolean(y.add_surface_depth))&&v)}return e.FALSE},e.abovePreliminarySurface=function(){return e=>e.blockY>=e.minSurfaceLevel()},e.biome=t,e.not=i,e.stoneDepth=n,e.verticalGradient=r,e.water=o,e.yAbove=a}(Cg||(Cg={}));class Ig{constructor(e,t,i){this.biomeSource=t,this.settings=i,this.router=wg.withSettings(i.noiseRouter,i.noise,e,i.legacyRandomSource),this.noiseChunkCache=new Map,this.surfaceSystem=new $g(i.surfaceRule,i.defaultBlock,e);const n=new vg(-54,kf.LAVA),r=new vg(i.seaLevel,i.defaultFluid);this.globalFluidPicker=(e,t,o)=>t<Math.min(-54,i.seaLevel)?n:r}fill(e,t=!1){var i;const n=Math.max(e.minY,this.settings.noise.minY),r=Math.min(e.maxY,this.settings.noise.minY+this.settings.noise.height),o=dg.cellWidth(this.settings.noise),a=dg.cellHeight(this.settings.noise),s=Math.floor(16/o),c=Math.floor(n/a),l=Math.floor((r-n)/a),u=Sf.minBlockX(e.pos),d=Sf.minBlockZ(e.pos),h=this.getNoiseChunk(e);for(let p=0;p<s;p+=1)for(let n=0;n<(t?1:s);n+=1){let r=e.getOrCreateSection(e.sectionsCount-1);for(let s=l-1;s>=0;s-=1)for(let l=a-1;l>=0;l-=1){const m=(c+s)*a+l,f=15&m,g=e.getSectionIndex(m);e.getSectionIndex(r.minBlockY)!==g&&(r=e.getOrCreateSection(g));for(let e=0;e<o;e+=1){const a=u+p*o+e,s=15&a;for(let e=0;e<(t?1:o);e+=1){const t=d+n*o+e,c=15&t,l=null!=(i=h.getFinalState(a,m,t))?i:this.settings.defaultBlock;r.setBlockState(s,f,c,l)}}}}}buildSurface(e,t="minecraft:plains"){const i=this.getNoiseChunk(e),n=kg.create(this.settings.noise.minY,this.settings.noise.height);this.surfaceSystem.buildSurface(e,i,n,(()=>t))}getNoiseChunk(e){return pf(this.noiseChunkCache,Sf.toLong(e.pos),(()=>{const t=Math.max(e.minY,this.settings.noise.minY),i=Math.min(e.maxY,this.settings.noise.minY+this.settings.noise.height),n=dg.cellWidth(this.settings.noise),r=dg.cellHeight(this.settings.noise),o=Math.floor(16/n),a=Math.floor(t/r),s=Math.floor((i-t)/r),c=Sf.minBlockX(e.pos),l=Sf.minBlockZ(e.pos);return new Rg(o,s,a,this.router,c,l,this.settings.noise,this.settings.aquifersEnabled,this.globalFluidPicker)}))}}let Pg;(Og||(Og={})).fromJson=function(e){var t,i,n,r,o,a;const s=null!=(t=uf.readObject(e))?t:{};return{surfaceRule:Ag.fromJson(s.surface_rule),noise:dg.fromJson(s.noise),defaultBlock:kf.fromJson(s.default_block),defaultFluid:kf.fromJson(s.default_fluid),noiseRouter:wg.fromJson(s.noise_router),seaLevel:null!=(i=uf.readInt(s.sea_level))?i:0,disableMobGeneration:null!=(n=uf.readBoolean(s.disable_mob_generation))&&n,aquifersEnabled:null!=(r=uf.readBoolean(s.aquifers_enabled))&&r,oreVeinsEnabled:null!=(o=uf.readBoolean(s.ore_veins_enabled))&&o,legacyRandomSource:null!=(a=uf.readBoolean(s.legacy_random_source))&&a}};let zg=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});zg.decode();let Ug=null;function Wg(e,t){return zg.decode((null!==Ug&&Ug.buffer===Pg.memory.buffer||(Ug=new Uint8Array(Pg.memory.buffer)),Ug).subarray(e,e+t))}const Hg=new Uint32Array(2),qg=new BigInt64Array(Hg.buffer);let Vg=null;function Gg(){return null!==Vg&&Vg.buffer===Pg.memory.buffer||(Vg=new Int32Array(Pg.memory.buffer)),Vg}let Kg=null;function Xg(){return null!==Kg&&Kg.buffer===Pg.memory.buffer||(Kg=new Float64Array(Pg.memory.buffer)),Kg}let Jg=0;function Yg(e,t){const i=t(8*e.length);return Xg().set(e,i/8),Jg=e.length,i}let Zg=null;function Qg(e,t){const i=t(4*e.length);return(null!==Zg&&Zg.buffer===Pg.memory.buffer||(Zg=new Uint32Array(Pg.memory.buffer)),Zg).set(e,i/4),Jg=e.length,i}function e_(e,t,i,n,r,o,a,s,c,l,u,d,h,p){var m=Yg(e,Pg.__wbindgen_malloc),f=Jg,g=Yg(t,Pg.__wbindgen_malloc),_=Jg,b=Yg(i,Pg.__wbindgen_malloc),v=Jg,y=Yg(n,Pg.__wbindgen_malloc),w=Jg,x=Yg(r,Pg.__wbindgen_malloc),N=Jg,k=Yg(o,Pg.__wbindgen_malloc),A=Jg,C=Yg(a,Pg.__wbindgen_malloc),O=Jg,S=Yg(s,Pg.__wbindgen_malloc),E=Jg,F=Yg(c,Pg.__wbindgen_malloc),D=Jg,B=Yg(l,Pg.__wbindgen_malloc),L=Jg,M=Yg(u,Pg.__wbindgen_malloc),T=Jg,R=Yg(d,Pg.__wbindgen_malloc),$=Jg,j=Yg(h,Pg.__wbindgen_malloc),I=Jg,P=Qg(p,Pg.__wbindgen_malloc),z=Jg,U=Pg.biome_parameters(m,f,g,_,b,v,y,w,x,N,k,A,C,O,S,E,F,D,B,L,M,T,R,$,j,I,P,z);return o_.__wrap(U)}function t_(e,t,i,n,r,o,a,s,c,l,u,d,h){qg[0]=e;const p=Hg[0],m=Hg[1];var f=Yg(i,Pg.__wbindgen_malloc),g=Jg,_=Yg(r,Pg.__wbindgen_malloc),b=Jg,v=Yg(a,Pg.__wbindgen_malloc),y=Jg,w=Yg(c,Pg.__wbindgen_malloc),x=Jg,N=Yg(u,Pg.__wbindgen_malloc),k=Jg,A=Yg(h,Pg.__wbindgen_malloc),C=Jg,O=Pg.climate_sampler(p,m,t,f,g,n,_,b,o,v,y,s,w,x,l,N,k,d,A,C);return a_.__wrap(O)}function i_(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`);return e.ptr}function n_(e,t,i,n,r,o,a,s,c,l,u){try{const m=Pg.__wbindgen_add_to_stack_pointer(-16);i_(e,o_),i_(t,a_),Pg.multi_noise(m,e.ptr,t.ptr,i,n,r,o,a,s,c,l,u);var d=Gg()[m/4+0],h=Gg()[m/4+1],p=function(e,t){return Gg().subarray(e/4,e/4+t)}(d,h).slice();return Pg.__wbindgen_free(d,4*h),p}finally{Pg.__wbindgen_add_to_stack_pointer(16)}}function r_(e,t,i,n,r,o,a,s,c,l){try{const p=Pg.__wbindgen_add_to_stack_pointer(-16);i_(e,a_),Pg.climate_noise(p,e.ptr,t,i,n,r,o,a,s,c,l);var u=Gg()[p/4+0],d=Gg()[p/4+1],h=function(e,t){return Xg().subarray(e/8,e/8+t)}(u,d).slice();return Pg.__wbindgen_free(u,8*d),h}finally{Pg.__wbindgen_add_to_stack_pointer(16)}}class o_{static __wrap(e){const t=Object.create(o_.prototype);return t.ptr=e,t}__destroy_into_raw(){const e=this.ptr;return this.ptr=0,e}free(){const e=this.__destroy_into_raw();Pg.__wbg_parameterlist_free(e)}}class a_{static __wrap(e){const t=Object.create(a_.prototype);return t.ptr=e,t}__destroy_into_raw(){const e=this.ptr;return this.ptr=0,e}free(){const e=this.__destroy_into_raw();Pg.__wbg_sampler_free(e)}}async function s_(e){void 0===e&&(e=new URL("deepslate_rs_bg.wasm",u.url));const t={wbg:{}};t.wbg.__wbindgen_throw=function(e,t){throw new Error(Wg(e,t))},("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:i,module:n}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(i){if("application/wasm"==e.headers.get("Content-Type"))throw i;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",i)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const i=await WebAssembly.instantiate(e,t);return i instanceof WebAssembly.Instance?{instance:i,module:e}:i}}(await e,t);return Pg=i.exports,s_.__wbindgen_wasm_module=n,Pg}var c_,l_="/assets/deepslate_rs_bg.4990c219.wasm";!function(e){e.UP="up",e.DOWN="down",e.NORTH="north",e.EAST="east",e.SOUTH="south",e.WEST="west"}(c_||(c_={}));const u_={[c_.UP]:[0,1,0],[c_.DOWN]:[0,-1,0],[c_.NORTH]:[0,0,-1],[c_.EAST]:[1,0,0],[c_.SOUTH]:[0,0,1],[c_.WEST]:[-1,0,0]};var d_,h_,p_,m_,f_,g_,__,b_,v_,y_,w_,x_,N_,k_,A_,C_,O_,S_,E_,F_;function D_(e,t,i){if(!e[t])throw new Error(`Missing ${t} tag`);if(e[t].type!==i)throw new Error(`Expected ${t} to be of type ${i}, but found ${e[t].type}`);return e[t].value}!function(e){e.ALL=[e.UP,e.DOWN,e.NORTH,e.EAST,e.SOUTH,e.WEST],e.normal=function(e){return u_[e]}}(c_||(c_={})),function(e){e.create=function(e,t,i){return[e,t,i]},e.offset=function(e,t,i,n){return[e[0]+t,e[1]+i,e[2]+n]},e.towards=function(t,i){return e.offset(t,...c_.normal(i))}}(d_||(d_={})),function(e){function t(e){return"object"==typeof e&&null!==e?e:void 0}e.readNumber=function(e){return"number"==typeof e?e:void 0},e.readInt=function(e){return"number"==typeof e?Math.floor(e):void 0},e.readString=function(e){return"string"==typeof e?e:void 0},e.readBoolean=function(e){return"boolean"==typeof e?e:void 0},e.readObject=t,e.readArray=function(e,t){if(Array.isArray(e))return e.map((e=>t(e)))},e.readMap=function(e,i){var n;const r=null!==(n=t(e))&&void 0!==n?n:{};return Object.fromEntries(Object.entries(r).map((([e,t])=>[e,i(t)])))},e.compose=function(e,t,i){const n=t(e);return n?i(n):void 0}}(h_||(h_={}));class B_{constructor(e,t={}){this.name=e,this.properties=t}getName(){return this.name}getProperties(){return this.properties}getProperty(e){return this.properties[e]}isFluid(){return"minecraft:water"===this.name||"minecraft:lava"===this.name}equals(e){return this.name===e.name&&Object.keys(this.properties).every((t=>e.properties[t]===this.properties[t]))}toString(){return 0===Object.keys(this.properties).length?this.name:`${this.name}[${Object.entries(this.properties).map((([e,t])=>e+"="+t)).join(",")}]`}static fromNbt(e){const t=D_(e.value,"Name","string"),i=function(e,t){try{return e()}catch(i){return t}}((()=>D_(e.value,"Properties","compound")),{}),n=Object.keys(i).reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:D_(i,t,"string")})),{});return new B_(t,n)}static fromJson(e){var t,i;const n=null!==(t=h_.readObject(e))&&void 0!==t?t:{},r=null!==(i=h_.readString(n.Name))&&void 0!==i?i:"minecraft:stone",o=h_.readMap(n.Properties,(e=>{var t;return null!==(t=h_.readString(e))&&void 0!==t?t:""}));return new B_(r,o)}}function L_(e){let t=null;return()=>(null==t&&(t=e()),t)}function M_(e,t,i){const n=e.get(t);if(n)return n;const r=i(t);return e.set(t,r),r}function T_(e){return e*e}function R_(e,t,i){return Math.max(t,Math.min(i,e))}function $_(e,t,i){return t+e*(i-t)}function j_(e,t,i,n,r,o){return $_(t,$_(e,i,n),$_(e,r,o))}function I_(e,t,i){return i<0?e:i>1?t:$_(i,e,t)}function P_(e,t,i){return(e-t)/(i-t)}function z_(e){return e*e*e*(e*(6*e-15)+10)}function U_(e,t,i,n,r){return $_(P_(e,t,i),n,r)}function W_(e,t,i){let n=BigInt(3129871*e)^BigInt(i)*BigInt(116129781)^BigInt(t);return n=n*n*BigInt(42317861)+n*BigInt(11),n>>BigInt(16)}function H_(e,t,i,n,r,o,a,s){return BigInt(e)<<BigInt(56)|BigInt(t)<<BigInt(48)|BigInt(i)<<BigInt(40)|BigInt(n)<<BigInt(32)|BigInt(r)<<BigInt(24)|BigInt(o)<<BigInt(16)|BigInt(a)<<BigInt(8)|BigInt(s)}B_.AIR=new B_("minecraft:air"),function(e){function t(e,t){return BigInt(4294967295&e)|BigInt(4294967295&t)<<BigInt(32)}e.create=function(e,t){return[e,t]},e.fromBlockPos=function(e){return[e[0]>>4,e[2]>>4]},e.fromLong=function(e){return[4294967295&Number(e),Number(e>>BigInt(32))]},e.toLong=function(e){return t(e[0],e[1])},e.asLong=t,e.minBlockX=function(e){return e[0]<<4},e.minBlockZ=function(e){return e[1]<<4},e.maxBlockX=function(e){return 15+(e[0]<<4)},e.maxBlockZ=function(e){return 15+(e[1]<<4)}}(p_||(p_={}));class q_{constructor(e){this.seed=BigInt(0),this.setSeed(e)}fork(){return new q_(this.nextLong())}forkPositional(){return new V_(this.seed)}setSeed(e){this.seed=e^q_.MULTIPLIER&q_.MODULUS_MASK}advance(){this.seed=this.seed*q_.MULTIPLIER+q_.INCREMENT&q_.MODULUS_MASK}consume(e){for(let t=0;t<e;t+=1)this.advance()}next(e){this.advance();const t=Number(this.seed>>BigInt(q_.MODULUS_BITS-e));return t>2147483647?t-4294967296:t}nextInt(e){if(void 0===e)return this.next(32);if(0==(e&e-1))return Number(BigInt(e)*BigInt(this.next(31))>>BigInt(31));let t,i;for(;(t=this.next(31))-(i=t%e)+(e-1)<0;);return i}nextLong(){return(BigInt(this.next(32))<<BigInt(32))+BigInt(this.next(32))}nextFloat(){return this.next(24)*q_.FLOAT_MULTIPLIER}nextDouble(){const e=this.next(30);return this.advance(),e*q_.DOUBLE_MULTIPLIER}}q_.MODULUS_BITS=48,q_.MODULUS_MASK=BigInt("281474976710655"),q_.MULTIPLIER=BigInt("25214903917"),q_.INCREMENT=BigInt("11"),q_.FLOAT_MULTIPLIER=1/Math.pow(2,24),q_.DOUBLE_MULTIPLIER=1/Math.pow(2,30);class V_{constructor(e){this.seed=e}at(e,t,i){const n=W_(e,t,i);return new q_(n^this.seed)}fromHashOf(e){const t=of(e,{asBytes:!0}),i=H_(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]);return new q_(i^this.seed)}}class G_{constructor(e){this.seed=[BigInt(0),BigInt(0)],this.seed=e}static create(e){return new G_(G_.upgradeSeedTo128bit(e))}static mixStafford13(e){return((e=((e=(e^e>>BigInt(30))*BigInt("-4658895280553007687")&BigInt("0xFFFFFFFFFFFFFFFF"))^e>>BigInt(27))*BigInt("-7723592293110705685")&BigInt("0xFFFFFFFFFFFFFFFF"))^e>>BigInt(31))&BigInt("0xFFFFFFFFFFFFFFFF")}static upgradeSeedTo128bit(e){e<0&&(e+=BigInt("0x10000000000000000"));const t=e^G_.SILVER_RATIO_64,i=t+G_.GOLDEN_RATIO_64&BigInt("0xFFFFFFFFFFFFFFFF");return[G_.mixStafford13(t),G_.mixStafford13(i)]}static rotateLeft(e,t){return e<<t&BigInt("0xFFFFFFFFFFFFFFFF")|e>>BigInt(64)-t}setSeed(e){this.seed=G_.upgradeSeedTo128bit(e)}fork(){return new G_([this.next(),this.next()])}forkPositional(){return new K_(this.next(),this.next())}next(){const e=this.seed[0];let t=this.seed[1];const i=G_.rotateLeft(e+t&BigInt("0xFFFFFFFFFFFFFFFF"),BigInt(17))+e&BigInt("0xFFFFFFFFFFFFFFFF");return t^=e,this.seed=[G_.rotateLeft(e,BigInt(49))^t^t<<BigInt(21)&BigInt("0xFFFFFFFFFFFFFFFF"),G_.rotateLeft(t,BigInt(28))],i}nextLong(){let e=this.next();return e>BigInt("0x8000000000000000")&&(e-=BigInt("0x10000000000000000")),e}consume(e){let t=this.seed[0],i=this.seed[1];for(let n=0;n<e;n+=1)i^=t,t=G_.rotateLeft(t,BigInt(49))^i^i<<BigInt(21),i=G_.rotateLeft(i,BigInt(28));this.seed=[t,i]}nextBits(e){return this.next()>>BigInt(64-e)}nextInt(e){let t=this.next()&BigInt(4294967295);if(e){const i=BigInt(e);let n=t*i,r=n&BigInt(4294967295);if(r<i){const e=((~i&BigInt(4294967295))+BigInt(1))%i;for(;r<e;)t=this.next()&BigInt(4294967295),n=t*i,r=n&BigInt(4294967295)}const o=n>>BigInt(32);return Number(o)}{let e=Number(t);return e>=2147483648&&(e-=4294967296),e}}nextFloat(){return Number(this.nextBits(24))*G_.FLOAT_MULTIPLIER}nextDouble(){return Number(this.nextBits(53))*G_.DOUBLE_MULTIPLIER}parityConfigString(){return"seedLo: "+this.seed[0]+", seedHi: "+this.seed[1]}}G_.SILVER_RATIO_64=BigInt("7640891576956012809"),G_.GOLDEN_RATIO_64=BigInt("-7046029254386353131"),G_.FLOAT_MULTIPLIER=1/Math.pow(2,24),G_.DOUBLE_MULTIPLIER=11102230246251565e-32;class K_{constructor(e,t){this.seedLo=e,this.seedHi=t}at(e,t,i){const n=W_(e,t,i)^this.seedLo;return new G_([n,this.seedHi])}fromHashOf(e){const t=of(e,{asBytes:!0}),i=H_(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),n=H_(t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]);return new G_([i^this.seedLo,n^this.seedHi])}}class X_{constructor(e){this.xo=256*e.nextDouble(),this.yo=256*e.nextDouble(),this.zo=256*e.nextDouble(),this.p=Array(256);for(let t=0;t<256;t+=1)this.p[t]=t;for(let t=0;t<256;t+=1){const i=e.nextInt(256-t),n=this.p[t];this.p[t]=this.p[t+i],this.p[t+i]=n}}sample2D(e,t){let i,n,r;const o=(e+t)*X_.F2,a=Math.floor(e+o),s=e-(a-(i=(a+(n=Math.floor(t+o)))*X_.G2));let c,l;s>(r=t-(n-i))?(c=1,l=0):(c=0,l=1);const u=s-c+X_.G2,d=r-l+X_.G2,h=s-1+2*X_.G2,p=r-1+2*X_.G2,m=255&a,f=255&n,g=this.P(m+this.P(f))%12,_=this.P(m+c+this.P(f+l))%12,b=this.P(m+1+this.P(f+1))%12;return 70*(this.getCornerNoise3D(g,s,r,0,.5)+this.getCornerNoise3D(_,u,d,0,.5)+this.getCornerNoise3D(b,h,p,0,.5))}sample(e,t,i){const n=.3333333333333333*(e+t+i),r=Math.floor(e+n),o=Math.floor(t+n),a=Math.floor(i+n),s=.16666666666666666*(r+o+a),c=e-(r-s),l=t-(o-s),u=i-(a-s);let d,h,p,m,f,g;c>=l?l>=u?(d=1,h=0,p=0,m=1,f=1,g=0):c>=u?(d=1,h=0,p=0,m=1,f=0,g=1):(d=0,h=0,p=1,m=1,f=0,g=1):l<u?(d=0,h=0,p=1,m=0,f=1,g=1):c<u?(d=0,h=1,p=0,m=0,f=1,g=1):(d=0,h=1,p=0,m=1,f=1,g=0);const _=c-d+.16666666666666666,b=l-h+.16666666666666666,v=u-p+.16666666666666666,y=c-m+.3333333333333333,w=l-f+.3333333333333333,x=u-g+.3333333333333333,N=c-.5,k=l-.5,A=u-.5,C=255&r,O=255&o,S=255&a,E=this.P(C+this.P(O+this.P(S)))%12,F=this.P(C+d+this.P(O+h+this.P(S+p)))%12,D=this.P(C+m+this.P(O+f+this.P(S+g)))%12,B=this.P(C+1+this.P(O+1+this.P(S+1)))%12;return 32*(this.getCornerNoise3D(E,c,l,u,.6)+this.getCornerNoise3D(F,_,b,v,.6)+this.getCornerNoise3D(D,y,w,x,.6)+this.getCornerNoise3D(B,N,k,A,.6))}P(e){return this.p[255&e]}getCornerNoise3D(e,t,i,n,r){let o,a=r-t*t-i*i-n*n;return a<0?o=0:(a*=a,o=a*a*X_.gradDot(e,t,i,n)),o}static gradDot(e,t,i,n){const r=X_.GRADIENT[15&e];return r[0]*t+r[1]*i+r[2]*n}}X_.GRADIENT=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1],[1,1,0],[0,-1,1],[-1,1,0],[0,-1,-1]],X_.F2=.5*(Math.sqrt(3)-1),X_.G2=(3-Math.sqrt(3))/6;class J_{constructor(e){this.xo=256*e.nextDouble(),this.yo=256*e.nextDouble(),this.zo=256*e.nextDouble(),this.p=Array(256);for(let t=0;t<256;t+=1)this.p[t]=t>127?t-256:t;for(let t=0;t<256;t+=1){const i=e.nextInt(256-t),n=this.p[t];this.p[t]=this.p[t+i],this.p[t+i]=n}}sample(e,t,i,n=0,r=0){const o=e+this.xo,a=t+this.yo,s=i+this.zo,c=Math.floor(o),l=Math.floor(a),u=Math.floor(s),d=o-c,h=a-l,p=s-u;let m=0;if(0!==n){const e=r>=0&&r<h?r:h;m=Math.floor(e/n+1e-7)*n}return this.sampleAndLerp(c,l,u,d,h-m,p,h)}sampleAndLerp(e,t,i,n,r,o,a){const s=this.P(e),c=this.P(e+1),l=this.P(s+t),u=this.P(s+t+1),d=this.P(c+t),h=this.P(c+t+1),p=X_.gradDot(this.P(l+i),n,r,o),m=X_.gradDot(this.P(d+i),n-1,r,o),f=X_.gradDot(this.P(u+i),n,r-1,o),g=X_.gradDot(this.P(h+i),n-1,r-1,o),_=X_.gradDot(this.P(l+i+1),n,r,o-1),b=X_.gradDot(this.P(d+i+1),n-1,r,o-1),v=X_.gradDot(this.P(u+i+1),n,r-1,o-1),y=X_.gradDot(this.P(h+i+1),n-1,r-1,o-1);return function(e,t,i,n,r,o,a,s,c,l,u){return $_(i,j_(e,t,n,r,o,a),j_(e,t,s,c,l,u))}(z_(n),z_(a),z_(o),p,m,f,g,_,b,v,y)}P(e){return 255&this.p[255&e]}}class Y_{constructor(e,t,i){if(e instanceof G_){const n=e.forkPositional();this.noiseLevels=Array(i.length);for(let e=0;e<i.length;e++)if(0!==i[e]){const i=t+e;this.noiseLevels[e]=new J_(n.fromHashOf("octave_"+i))}}else{if(1-t<i.length)throw new Error("Positive octaves are not allowed when using LegacyRandom");this.noiseLevels=Array(i.length);for(let n=-t;n>=0;n-=1)n<i.length&&0!==i[n]?this.noiseLevels[n]=new J_(e):e.consume(262)}this.amplitudes=i,this.lowestFreqInputFactor=Math.pow(2,t),this.lowestFreqValueFactor=Math.pow(2,i.length-1)/(Math.pow(2,i.length)-1)}sample(e,t,i,n=0,r=0,o=!1){let a=0,s=this.lowestFreqInputFactor,c=this.lowestFreqValueFactor;for(let l=0;l<this.noiseLevels.length;l+=1){const u=this.noiseLevels[l];u&&(a+=this.amplitudes[l]*c*u.sample(Y_.wrap(e*s),o?-u.yo:Y_.wrap(t*s),Y_.wrap(i*s),n*s,r*s)),s*=2,c/=2}return a}getOctaveNoise(e){return this.noiseLevels[this.noiseLevels.length-1-e]}static wrap(e){return e-33554432*Math.floor(e/33554432+.5)}}class Z_{constructor(e,t,i,n){this.cellWidth=i,this.cellHeight=n,this.minLimitNoise=new Y_(e,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.maxLimitNoise=new Y_(e,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.mainNoise=new Y_(e,-7,[1,1,1,1,1,0,0,0]),this.xzScale=684.412*t.xzScale,this.yScale=684.412*t.yScale,this.xzMainScale=this.xzScale/t.xzFactor,this.yMainScale=this.yScale/t.yFactor}sample(e,t,i){let n;e=Math.floor(e/this.cellWidth),t=Math.floor(t/this.cellHeight),i=Math.floor(i/this.cellWidth);let r=0,o=1;for(let c=0;c<8;c+=1){if(n=this.mainNoise.getOctaveNoise(c),n){const a=this.xzMainScale*o,s=this.yMainScale*o,c=Y_.wrap(e*a),l=Y_.wrap(t*s),u=Y_.wrap(i*a);r+=n.sample(c,l,u,s,t*s)/o}o/=2}r=(r/10+1)/2,o=1;let a=0,s=0;for(let c=0;c<16;c+=1){const l=this.xzScale*o,u=this.yScale*o,d=Y_.wrap(e*l),h=Y_.wrap(t*u),p=Y_.wrap(i*l);r<1&&(n=this.minLimitNoise.getOctaveNoise(c))&&(a+=n.sample(d,h,p,u,t*u)/o),r>0&&(n=this.maxLimitNoise.getOctaveNoise(c))&&(s+=n.sample(d,h,p,u,t*u)/o),o/=2}return I_(a/512,s/512,r)/128}}(m_||(m_={})).fromJson=function(e){var t,i,n,r,o;const a=null!==(t=h_.readObject(e))&&void 0!==t?t:{};return{xzScale:null!==(i=h_.readNumber(a.xz_scale))&&void 0!==i?i:1,yScale:null!==(n=h_.readNumber(a.y_scale))&&void 0!==n?n:1,xzFactor:null!==(r=h_.readNumber(a.xz_factor))&&void 0!==r?r:80,yFactor:null!==(o=h_.readNumber(a.y_factor))&&void 0!==o?o:80}};class Q_{constructor(e,{firstOctave:t,amplitudes:i}){this.first=new Y_(e,t,i),this.second=new Y_(e,t,i);let n=1/0,r=-1/0;for(let a=0;a<i.length;a+=1)0!==i[a]&&(n=Math.min(n,a),r=Math.max(r,a));const o=.1*(1+1/(r-n+1));this.valueFactor=1/6/o}sample(e,t,i){const n=e*Q_.INPUT_FACTOR,r=t*Q_.INPUT_FACTOR,o=i*Q_.INPUT_FACTOR;return(this.first.sample(e,t,i)+this.second.sample(n,r,o))*this.valueFactor}}Q_.INPUT_FACTOR=1.0181268882175227,function(e){e.create=function(e,t){return{firstOctave:e,amplitudes:t}},e.fromJson=function(e){var t,i,n;const r=null!==(t=h_.readObject(e))&&void 0!==t?t:{};return{firstOctave:null!==(i=h_.readInt(r.firstOctave))&&void 0!==i?i:0,amplitudes:null!==(n=h_.readArray(r.amplitudes,(e=>{var t;return null!==(t=h_.readNumber(e))&&void 0!==t?t:0})))&&void 0!==n?n:[]}}}(f_||(f_={})),function(e){e.fromJson=function(t,i){var n,r,o,a;if("number"==typeof t)return new eb(t);const s=null!==(n=h_.readObject(t))&&void 0!==n?n:{},c=new tb(i(s.coordinate)),l=null!==(r=h_.readArray(s.points,(e=>{var t;return null!==(t=h_.readObject(e))&&void 0!==t?t:{}})))&&void 0!==r?r:[];if(0===l.length)return new eb(0);for(const u of l){const t=null!==(o=h_.readNumber(u.location))&&void 0!==o?o:0,n=e.fromJson(u.value,i),r=null!==(a=h_.readNumber(u.derivative))&&void 0!==a?a:0;c.addPoint(t,n,r)}return c}}(g_||(g_={}));class eb{constructor(e){this.value=e}apply(){return this.value}toJson(){return this.value}}class tb{constructor(e,t=[],i=[],n=[]){this.coordinate=e,this.locations=t,this.values=i,this.derivatives=n}apply(e){const t=this.coordinate.apply(e),i=function(e,t,i){let n=t-e;for(;n>0;){const t=Math.floor(n/2),r=e+t;i(r)?n=t:(e=r+1,n-=t+1)}return e}(0,this.locations.length,(e=>t<this.locations[e]))-1,n=this.locations.length-1;if(i<0)return this.values[0].apply(e)+this.derivatives[0]*(t-this.locations[0]);if(i===n)return this.values[n].apply(e)+this.derivatives[n]*(t-this.locations[n]);const r=this.locations[i],o=this.locations[i+1],a=this.derivatives[i],s=this.derivatives[i+1],c=(t-r)/(o-r),l=this.values[i].apply(e),u=this.values[i+1].apply(e),d=a*(o-r)-(u-l),h=-s*(o-r)+(u-l);return $_(c,l,u)+c*(1-c)*$_(c,d,h)}addPoint(e,t,i=0){return this.locations.push(e),this.values.push("number"==typeof t?new eb(t):t),this.derivatives.push(i),this}toJson(){return{coordinate:this.coordinate.toJson(),points:this.locations.map(((e,t)=>({location:e,value:this.values[t].toJson(),derivative:this.derivatives[t]})))}}}(__||(__={})).rotate=function(e,t,i){let{up:n,down:r,north:o,east:a,south:s,west:c}=e;switch(i){case 90:[o,a,s,c]=[a,s,c,o];break;case 180:[o,a,s,c]=[s,c,o,a];break;case 270:[o,a,s,c]=[c,o,a,s]}switch(t){case 90:[n,o,r,s]=[o,r,s,n];break;case 180:[n,o,r,s]=[r,s,n,o];break;case 270:[n,o,r,s]=[s,n,o,r]}return{up:n,down:r,north:o,east:a,south:s,west:c}},function(e){function t(e,t){return"number"==typeof e?new i(e,null!=t?t:e):e}e.target=function(e,t,i,n,o,a){return new r(e,t,i,n,o,a)},e.parameters=function(e,i,r,o,a,s,c){return new n(t(e),t(i),t(r),t(o),t(a),t(s),c)},e.param=t;class i{constructor(e,t){this.min=e,this.max=t}distance(e){const t=("number"==typeof e?e:e.min)-this.max,i=this.min-("number"==typeof e?e:e.max);return t>0?t:Math.max(i,0)}union(e){return new i(Math.min(this.min,e.min),Math.max(this.max,e.max))}static fromJson(e){var t;if("number"==typeof e)return new i(e,e);const[n,r]=null!==(t=h_.readArray(e,(e=>h_.readNumber(e))))&&void 0!==t?t:[];return new i(null!=n?n:0,null!=r?r:0)}}e.Param=i;class n{constructor(e,t,i,n,r,o,a){this.temperature=e,this.humidity=t,this.continentalness=i,this.erosion=n,this.depth=r,this.weirdness=o,this.offset=a}fittness(e){return T_(this.temperature.distance(e.temperature))+T_(this.humidity.distance(e.humidity))+T_(this.continentalness.distance(e.continentalness))+T_(this.erosion.distance(e.erosion))+T_(this.depth.distance(e.depth))+T_(this.weirdness.distance(e.weirdness))+T_(this.offset-e.offset)}space(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,new i(this.offset,this.offset)]}static fromJson(e){var t,r;const o=null!==(t=h_.readObject(e))&&void 0!==t?t:{};return new n(i.fromJson(o.temperature),i.fromJson(o.humidity),i.fromJson(o.continentalness),i.fromJson(o.erosion),i.fromJson(o.depth),i.fromJson(o.weirdness),null!==(r=h_.readInt(o.offset))&&void 0!==r?r:0)}}e.ParamPoint=n;class r{constructor(e,t,i,n,r,o){this.temperature=e,this.humidity=t,this.continentalness=i,this.erosion=n,this.depth=r,this.weirdness=o}get offset(){return 0}toArray(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,this.offset]}}e.TargetPoint=r,e.Parameters=class{constructor(e){this.things=e,this.index=new o(e)}find(e){return this.index.search(e,((e,t)=>e.distance(t)))}};class o{constructor(e){this.root=o.build(e.map((([e,t])=>new c(e,t))))}static build(e){if(1===e.length)return e[0];if(e.length<=o.CHILDREN_PER_NODE){const t=e.map((e=>{let t=0;for(let i=0;i<7;i+=1){const n=e.space[i];t+=Math.abs((n.min+n.max)/2)}return{key:t,node:e}})).sort(((e,t)=>e.key-t.key)).map((({node:e})=>e));return new s(t)}let t=1/0,i=-1,n=[];for(let r=0;r<7;++r){e=o.sort(e,r,!1),n=o.bucketize(e);let a=0;for(const e of n)a+=o.area(e.space);t>a&&(t=a,i=r)}return e=o.sort(e,i,!1),n=o.bucketize(e),n=o.sort(n,i,!0),new s(n.map((e=>o.build(e.children))))}static sort(e,t,i){return e.map((e=>{const n=e.space[t],r=(n.min+n.max)/2;return{key:i?Math.abs(r):r,node:e}})).sort(((e,t)=>e.key-t.key)).map((({node:e})=>e))}static bucketize(e){const t=[];let i=[];const n=Math.pow(10,Math.floor(Math.log(e.length-.01)/Math.log(10)));for(const r of e)i.push(r),i.length<n||(t.push(new s(i)),i=[]);return 0!==i.length&&t.push(new s(i)),t}static area(e){let t=0;for(const i of e)t+=Math.abs(i.max-i.min);return t}search(e,t){return this.root.search(e.toArray(),t).thing()}}o.CHILDREN_PER_NODE=10,e.RTree=o;class a{constructor(e){this.space=e}distance(e){let t=0;for(let i=0;i<7;i+=1)t+=T_(this.space[i].distance(e[i]));return t}}e.RNode=a;class s extends a{constructor(e){super(s.buildSpace(e)),this.children=e}static buildSpace(e){let t=[...Array(7)].map((()=>new i(1/0,-1/0)));for(const i of e)t=[...Array(7)].map(((e,n)=>t[n].union(i.space[n])));return t}search(e,t){let i=1/0,n=null;for(const r of this.children){const o=t(r,e);if(i<=o)continue;const a=r.search(e,t),s=r==a?o:t(a,e);i<=s||(i=s,n=a)}return n}}e.RSubTree=s;class c extends a{constructor(e,t){super(e.space()),this.thing=t}search(){return this}}e.RLeaf=c}(b_||(b_={}));class ib{constructor(e){this.biome=e}getBiome(){return this.biome}static fromJson(e){var t,i;const n=null!==(t=h_.readObject(e))&&void 0!==t?t:{},r=null!==(i=h_.readString(n.biome))&&void 0!==i?i:"minecraft:the_void";return new ib(r)}}class nb{constructor(e,t,i){this.offsetSampler=e,this.factorSampler=t,this.jaggednessSampler=i}static extractor(e){return{apply:t=>t[e],toJson:()=>e}}static fromJson(e){var t;const i=null!==(t=h_.readObject(e))&&void 0!==t?t:{};return new nb(g_.fromJson(i.offset,this.EXTRACTOR),g_.fromJson(i.factor,this.EXTRACTOR),g_.fromJson(i.jaggedness,this.EXTRACTOR))}toJson(){return{offset:this.offsetSampler.toJson(),factor:this.factorSampler.toJson(),jaggedness:this.jaggednessSampler.toJson()}}offset(e){return this.offsetSampler.apply(e)+nb.GLOBAL_OFFSET}factor(e){return this.factorSampler.apply(e)}jaggedness(e){return this.jaggednessSampler.apply(e)}static point(e,t,i){return{continents:e,erosion:t,weirdness:i,ridges:this.peaksAndValleys(i)}}static peaksAndValleys(e){return 3*-(Math.abs(Math.abs(e)-.6666667)-.33333334)}static overworld(){const e=this.buildErosionOffsetSpline(-.05,0,0,.1,0,-.03,!1,!1),t=this.buildErosionOffsetSpline(-.1,.03,.1,.1,.01,-.03,!1,!1),i=this.buildErosionOffsetSpline(-.1,.03,.1,.7,.01,-.03,!0,!0),n=this.buildErosionOffsetSpline(.3,.03,.1,1,.01,.01,!0,!0),r=new tb(this.CONTINENTS).addPoint(-1.1,.044).addPoint(-1.02,-.2222).addPoint(-.51,-.2222).addPoint(-.44,-.12).addPoint(-.18,-.12).addPoint(-.16,e).addPoint(-.15,e).addPoint(-.1,t).addPoint(.25,i).addPoint(1,n),o=new tb(this.CONTINENTS).addPoint(-.19,3.95).addPoint(-.15,this.getErosionFactor(6.25,!0)).addPoint(-.1,this.getErosionFactor(5.47,!0)).addPoint(.03,this.getErosionFactor(5.08,!0)).addPoint(.06,this.getErosionFactor(4.69,!1)),a=new tb(this.CONTINENTS).addPoint(.11,0).addPoint(.03,this.buildErosionJaggednessSpline(1,.5,0,0)).addPoint(.65,this.buildErosionJaggednessSpline(1,1,1,0));return new nb(r,o,a)}static getErosionFactor(e,t){const i=new tb(this.WEIRDNESS).addPoint(-.2,6.3).addPoint(.2,e),n=new tb(this.EROSION).addPoint(-.6,i).addPoint(-.5,new tb(this.WEIRDNESS).addPoint(-.05,6.3).addPoint(.05,2.67)).addPoint(-.35,i).addPoint(-.25,i).addPoint(-.1,new tb(this.WEIRDNESS).addPoint(-.05,2.67).addPoint(.05,6.3)).addPoint(.03,i);if(t){const t=new tb(this.WEIRDNESS).addPoint(0,e).addPoint(.1,.625),i=new tb(this.RIDGES).addPoint(-.9,e).addPoint(-.69,t);n.addPoint(.35,e).addPoint(.45,i).addPoint(.55,i).addPoint(.62,e)}else{const t=new tb(this.RIDGES).addPoint(-.7,i).addPoint(-.15,1.37),r=new tb(this.RIDGES).addPoint(.45,i).addPoint(.7,1.56);n.addPoint(.05,r).addPoint(.4,r).addPoint(.45,t).addPoint(.55,t).addPoint(.58,e)}return n}static buildErosionOffsetSpline(e,t,i,n,r,o,a,s){const c=this.buildMountainRidgeSplineWithPoints($_(n,.6,1.5),s),l=this.buildMountainRidgeSplineWithPoints($_(n,.6,1),s),u=this.buildMountainRidgeSplineWithPoints(n,s),d=this.ridgeSpline(e-.15,.5*n,$_(.5,.5,.5)*n,.5*n,.6*n,.5),h=this.ridgeSpline(e,r*n,t*n,.5*n,.6*n,.5),p=this.ridgeSpline(e,r,r,t,i,.5),m=this.ridgeSpline(e,r,r,t,i,.5),f=new tb(this.RIDGES).addPoint(-1,e).addPoint(-.4,p).addPoint(0,i+.07),g=this.ridgeSpline(-.02,o,o,t,i,0),_=new tb(this.EROSION).addPoint(-.85,c).addPoint(-.7,l).addPoint(-.4,u).addPoint(-.35,d).addPoint(-.1,h).addPoint(.2,p);return a&&_.addPoint(.4,m).addPoint(.45,f).addPoint(.55,f).addPoint(.58,m),_.addPoint(.7,g),_}static buildMountainRidgeSplineWithPoints(e,t){const i=new tb(this.RIDGES),n=this.mountainContinentalness(-1,e,-.7),r=this.mountainContinentalness(1,e,-.7),o=this.calculateMountainRidgeZeroContinentalnessPoint(e);if(-.65<o&&o<1){const t=this.mountainContinentalness(-.65,e,-.7),a=this.mountainContinentalness(-.75,e,-.7),s=this.calculateSlope(n,a,-1,-.75);i.addPoint(-1,n,s),i.addPoint(-.75,a),i.addPoint(-.65,t);const c=this.mountainContinentalness(o,e,-.7),l=this.calculateSlope(c,r,o,1);i.addPoint(o-.01,c),i.addPoint(o,c,l),i.addPoint(1,r,l)}else{const e=this.calculateSlope(n,r,-1,1);t?(i.addPoint(-1,Math.max(.2,n)),i.addPoint(0,$_(.5,n,r),e)):i.addPoint(-1,n,e),i.addPoint(1,r,e)}return i}static mountainContinentalness(e,t,i){const n=.46082947*(e+1.17)*(1-.5*(1-t))-.5*(1-t);return e<i?Math.max(n,-.2222):Math.max(n,0)}static calculateMountainRidgeZeroContinentalnessPoint(e){return.5*(1-e)/(.46082947*(1-.5*(1-e)))-1.17}static calculateSlope(e,t,i,n){return(t-e)/(n-i)}static ridgeSpline(e,t,i,n,r,o){const a=Math.max(.5*(t-e),o),s=5*(i-t);return new tb(this.RIDGES).addPoint(-1,e,a).addPoint(-.4,t,Math.min(a,s)).addPoint(0,i,s).addPoint(.4,n,2*(n-i)).addPoint(1,r,.7*(r-n))}static buildErosionJaggednessSpline(e,t,i,n){const r=this.buildRidgeJaggednessSpline(e,i),o=this.buildRidgeJaggednessSpline(t,n);return new tb(this.EROSION).addPoint(-1,r).addPoint(-.78,o).addPoint(-.5775,o).addPoint(-.375,0)}static buildRidgeJaggednessSpline(e,t){const i=nb.peaksAndValleys(.4),n=(i+nb.peaksAndValleys(.56666666))/2;return new tb(this.RIDGES).addPoint(i,0).addPoint(n,t>0?this.buildWeirdnessJaggednessSpline(t):0).addPoint(1,e>0?this.buildWeirdnessJaggednessSpline(e):0)}static buildWeirdnessJaggednessSpline(e){return new tb(nb.WEIRDNESS).addPoint(-.01,.63*e).addPoint(.01,.3*e)}}nb.GLOBAL_OFFSET=-.50375,nb.EXTRACTOR=e=>{var t;const i=null!==(t=h_.readString(e))&&void 0!==t?t:"continents";return nb.extractor(i)},nb.CONTINENTS=nb.extractor("continents"),nb.EROSION=nb.extractor("erosion"),nb.WEIRDNESS=nb.extractor("weirdness"),nb.RIDGES=nb.extractor("ridges"),(v_||(v_={})).fromList=function(e){return(t,i,n,r)=>{for(const o of e){const e=o(t,i,n,r);if(e)return e}return null}},function(e){function t(e){return e.ySize<<2}e.fromJson=function(e){var t,i,n,r,o,a,s,c;const l=null!==(t=h_.readObject(e))&&void 0!==t?t:{};return{minY:null!==(i=h_.readInt(l.min_y))&&void 0!==i?i:0,height:null!==(n=h_.readInt(l.height))&&void 0!==n?n:256,xzSize:null!==(r=h_.readInt(l.size_horizontal))&&void 0!==r?r:1,ySize:null!==(o=h_.readInt(l.size_vertical))&&void 0!==o?o:1,sampling:m_.fromJson(l.sampling),topSlide:w_.fromJson(l.top_slide),bottomSlide:w_.fromJson(l.bottom_slide),terrainShaper:nb.fromJson(l.terrain_shaper),islandNoiseOverride:null!==(a=h_.readBoolean(l.island_noise_override))&&void 0!==a&&a,isAmplified:null!==(s=h_.readBoolean(l.amplified))&&void 0!==s&&s,hasLargeBiomes:null!==(c=h_.readBoolean(l.large_biomes))&&void 0!==c&&c}},e.cellHeight=t,e.cellWidth=function(e){return e.xzSize<<2},e.cellCountY=function(e){return e.height/t(e)},e.minCellY=function(e){return Math.floor(e.minY/t(e))}}(y_||(y_={})),function(e){e.fromJson=function(e){var t,i,n,r;const o=null!==(t=h_.readObject(e))&&void 0!==t?t:{};return{target:null!==(i=h_.readNumber(o.target))&&void 0!==i?i:0,size:null!==(n=h_.readInt(o.size))&&void 0!==n?n:0,offset:null!==(r=h_.readInt(o.offset))&&void 0!==r?r:0}},e.apply=function(e,t,i){if(e.size<=0)return t;const n=(i-e.offset)/e.size;return I_(e.target,t,n)}}(w_||(w_={}));class rb{constructor(e,t){this.chunk=e,this.filler=t,this.noise000=0,this.noise001=0,this.noise100=0,this.noise101=0,this.noise010=0,this.noise011=0,this.noise110=0,this.noise111=0,this.valueXZ00=0,this.valueXZ10=0,this.valueXZ01=0,this.valueXZ11=0,this.valueZ0=0,this.valueZ1=0,this.value=0,this.slice0=rb.allocateSlice(e.cellCountY,e.cellCountXZ),this.slice1=rb.allocateSlice(e.cellCountY,e.cellCountXZ)}static allocateSlice(e,t){const i=Array(t+1);for(let n=0;n<t+1;n+=1)i[n]=Array(e+1);return i}initializeForFirstCellX(){this.fillSlice(this.slice0,this.chunk.firstCellX)}advanceCellX(e){this.fillSlice(this.slice1,this.chunk.firstCellX+e+1)}fillSlice(e,t){const i=y_.cellWidth(this.chunk.settings.noise),n=y_.cellHeight(this.chunk.settings.noise),r=t*i;for(let o=0;o<this.chunk.cellCountXZ+1;o+=1){const t=(this.chunk.firstCellZ+o)*i;for(let i=0;i<this.chunk.cellCountY+1;i+=1){const a=(this.chunk.cellCountNoiseMinY+i)*n;e[o][i]=this.filler(r,a,t)}}}selectCellYZ(e,t){this.noise000=this.slice0[t][e],this.noise001=this.slice0[t+1][e],this.noise100=this.slice1[t][e],this.noise101=this.slice1[t+1][e],this.noise010=this.slice0[t][e+1],this.noise011=this.slice0[t+1][e+1],this.noise110=this.slice1[t][e+1],this.noise111=this.slice1[t+1][e+1]}updateForY(e){this.valueXZ00=$_(e,this.noise000,this.noise010),this.valueXZ10=$_(e,this.noise100,this.noise110),this.valueXZ01=$_(e,this.noise001,this.noise011),this.valueXZ11=$_(e,this.noise101,this.noise111)}updateForX(e){this.valueZ0=$_(e,this.valueXZ00,this.valueXZ10),this.valueZ1=$_(e,this.valueXZ01,this.valueXZ11)}updateForZ(e){this.value=$_(e,this.valueZ0,this.valueZ1)}sample(){return this.value}swapSlices(){[this.slice0,this.slice1]=[this.slice1,this.slice0]}}class ob{constructor(e,t,i,n,r,o,a,s){this.cellCountXZ=e,this.cellCountY=t,this.cellCountNoiseMinY=i,this.sampler=n,this.settings=s;const c=y_.cellWidth(s.noise);this.firstCellX=Math.floor(r/c),this.firstCellZ=Math.floor(o/c),this.firstNoiseX=r>>2,this.firstNoiseZ=o>>2,this.interpolators=[];const l=e*c>>2;this.noiseData=Array(l+1);for(let u=0;u<=l;u+=1){const e=this.firstNoiseX+u;this.noiseData[u]=Array(l+1);for(let t=0;t<=l;t+=1){const i=this.firstNoiseZ+t;this.noiseData[u][t]=n.noiseData(e,i)}}this.preliminarySurfaceLevel=new Map,this.baseNoise=n.makeBaseNoiseFiller(this,a,s.noodleCavesEnabled)}getNoiseData(e,t){return this.noiseData[e-this.firstNoiseX][t-this.firstNoiseZ]}getPreliminarySurfaceLevel(e,t){return M_(this.preliminarySurfaceLevel,p_.asLong(e,t),(()=>{const i=e-this.firstNoiseX,n=t-this.firstNoiseZ,r=this.noiseData.length,o=i>=0&&n>=0&&i<r&&n<r?this.noiseData[i][n].terrainInfo:this.sampler.noiseData(e,t).terrainInfo;return this.sampler.getPreliminarySurfaceLevel(e<<2,t<<2,o)}))}createNoiseInterpolator(e){const t=new rb(this,e);return this.interpolators.push(t),t.sample.bind(t)}initializeForFirstCellX(){this.interpolators.forEach((e=>e.initializeForFirstCellX()))}advanceCellX(e){this.interpolators.forEach((t=>t.advanceCellX(e)))}selectCellYZ(e,t){this.interpolators.forEach((i=>i.selectCellYZ(e,t)))}updateForY(e){this.interpolators.forEach((t=>t.updateForY(e)))}updateForX(e){this.interpolators.forEach((t=>t.updateForX(e)))}updateForZ(e){this.interpolators.forEach((t=>t.updateForZ(e)))}swapSlices(){this.interpolators.forEach((e=>e.swapSlices()))}updateNoiseAndGenerateBaseState(e,t,i){return this.baseNoise(e,t,i)}}(x_||(x_={})).create=function(e,t,i){return{offset:e,factor:t,jaggedness:i}},function(e){const t=new Map;function i(e,i,n){const r=Object.assign({name:`minecraft:${e}`},f_.create(i,n));return t.set(e,r),r}e.TEMPERATURE=i("temperature",-10,[1.5,0,1,0,0,0]),e.VEGETATION=i("vegetation",-8,[1,1,0,0,0,0]),e.CONTINENTALNESS=i("continentalness",-9,[1,1,2,2,2,1,1,1,1]),e.EROSION=i("erosion",-9,[1,1,0,1,1]),e.TEMPERATURE_LARGE=i("temperature_large",-12,[1.5,0,1,0,0,0]),e.VEGETATION_LARGE=i("vegetation_large",-10,[1,1,0,0,0,0]),e.CONTINENTALNESS_LARGE=i("continentalness_large",-11,[1,1,2,2,2,1,1,1,1]),e.EROSION_LARGE=i("erosion_large",-11,[1,1,0,1,1]),e.RIDGE=i("ridge",-7,[1,2,1,0,0,0]),e.SHIFT=i("offset",-3,[1,1,1,0]),e.PILLAR=i("pillar",-7,[1,1]),e.PILLAR_RARENESS=i("pillar_rareness",-8,[1]),e.PILLAR_THICKNESS=i("pillar_thickness",-8,[1]),e.SPAGHETTI_2D=i("spaghetti_2d",-8,[1]),e.SPAGHETTI_2D_ELEVATION=i("spaghetti_2d_elevation",-8,[1]),e.SPAGHETTI_2D_MODULATOR=i("spaghetti_2d_modulator",-8,[1]),e.SPAGHETTI_2D_THICKNESS=i("spaghetti_2d_thickness",-8,[1]),e.SPAGHETTI_3D_1=i("spaghetti_3d_1",-8,[1]),e.SPAGHETTI_3D_2=i("spaghetti_3d_2",-8,[1]),e.SPAGHETTI_3D_RARITY=i("spaghetti_3d_rarity",-8,[1]),e.SPAGHETTI_3D_THICKNESS=i("spaghetti_3d_thickness",-8,[1]),e.SPAGHETTI_ROUGHNESS=i("spaghetti_roughness",-8,[1]),e.SPAGHETTI_ROUGHNESS_MODULATOR=i("spaghetti_roughness_modulator",-8,[1]),e.CAVE_ENTRANCE=i("cave_entrance",-7,[.4,.5,1]),e.CAVE_LAYER=i("cave_layer",-8,[1]),e.CAVE_CHEESE=i("cave_cheese",-8,[.5,1,2,1,2,1,0,2,0]),e.NOODLE=i("noodle",-8,[1]),e.NOODLE_THICKNESS=i("noodle_thickness",-8,[1]),e.NOODLE_RIDGE_A=i("noodle_ridge_a",-7,[1]),e.NOODLE_RIDGE_B=i("noodle_ridge_b",-7,[1]),e.JAGGED=i("jagged",-16,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),e.SURFACE=i("surface",-6,[1,1,1]),e.SURFACE_SECONDARY=i("surface_secondary",-6,[1,1,0,1]),e.instantiate=function(e,t){return new Q_(e.fromHashOf(t.name),t)}}(N_||(N_={}));class ab{constructor(e,t,i,n=!1){this.settings=e,this.isNoiseCavesEnabled=t;const r=e.hasLargeBiomes,o=(n?new q_(i):G_.create(i)).forkPositional();n?(this.blendedNoise=new Z_(new q_(i),e.sampling,y_.cellWidth(e),y_.cellHeight(e)),this.temperatureNoise=new Q_(new q_(i),f_.create(-7,[1,1])),this.humidityNoise=new Q_(new q_(i+BigInt(1)),f_.create(-7,[1,1])),this.offsetNoise=new Q_(new q_(i+BigInt(5)),f_.create(0,[0]))):(this.blendedNoise=new Z_(o.fromHashOf("minecraft:terrain"),e.sampling,y_.cellWidth(e),y_.cellHeight(e)),this.temperatureNoise=N_.instantiate(o,r?N_.TEMPERATURE_LARGE:N_.TEMPERATURE),this.humidityNoise=N_.instantiate(o,r?N_.VEGETATION_LARGE:N_.VEGETATION),this.offsetNoise=N_.instantiate(o,N_.SHIFT)),this.continentalnessNoise=N_.instantiate(o,r?N_.CONTINENTALNESS_LARGE:N_.CONTINENTALNESS),this.erosionNoise=N_.instantiate(o,r?N_.EROSION_LARGE:N_.EROSION),this.weirdnessNoise=N_.instantiate(o,N_.RIDGE),this.pillarNoise=N_.instantiate(o,N_.PILLAR),this.pillarRarenessModulator=N_.instantiate(o,N_.PILLAR_RARENESS),this.pillarThicknessModulator=N_.instantiate(o,N_.PILLAR_THICKNESS),this.spaghetti2DNoise=N_.instantiate(o,N_.SPAGHETTI_2D),this.spaghetti2DElevationModulator=N_.instantiate(o,N_.SPAGHETTI_2D_ELEVATION),this.spaghetti2DRarityModulator=N_.instantiate(o,N_.SPAGHETTI_2D_MODULATOR),this.spaghetti2DThicknessModulator=N_.instantiate(o,N_.SPAGHETTI_2D_THICKNESS),this.spaghetti3DNoise1=N_.instantiate(o,N_.SPAGHETTI_3D_1),this.spaghetti3DNoise2=N_.instantiate(o,N_.SPAGHETTI_3D_2),this.spaghetti3DRarityModulator=N_.instantiate(o,N_.SPAGHETTI_3D_RARITY),this.spaghetti3DThicknessModulator=N_.instantiate(o,N_.SPAGHETTI_3D_THICKNESS),this.spaghettiRoughnessNoise=N_.instantiate(o,N_.SPAGHETTI_ROUGHNESS),this.spaghettiRoughnessModulator=N_.instantiate(o,N_.SPAGHETTI_ROUGHNESS_MODULATOR),this.bigEntranceNoise=N_.instantiate(o,N_.CAVE_ENTRANCE),this.layerNoise=N_.instantiate(o,N_.CAVE_LAYER),this.cheeseNoise=N_.instantiate(o,N_.CAVE_CHEESE);const a=e.minY+4,s=a+e.height;this.noodleToggleNoise=this.yLimitedInterpolatable(N_.instantiate(o,N_.NOODLE),a,s,-1,1),this.noodleThicknessNoise=this.yLimitedInterpolatable(N_.instantiate(o,N_.NOODLE_THICKNESS),a,s,0,1),this.noodleRidgeANoise=this.yLimitedInterpolatable(N_.instantiate(o,N_.NOODLE_RIDGE_A),a,s,0,8/3),this.noodleRidgeBNoise=this.yLimitedInterpolatable(N_.instantiate(o,N_.NOODLE_RIDGE_B),a,s,0,8/3),this.jaggedNoise=N_.instantiate(o,N_.JAGGED),this.shaper=e.terrainShaper,this.baseNoise=e=>e.createNoiseInterpolator(((t,i,n)=>this.calculateBlendedBaseNoise(t,i,n,e.getNoiseData(t>>2,n>>2).terrainInfo)))}yLimitedInterpolatable(e,t,i,n,r){const o=(o,a,s)=>a>i||a<t?n:e.sample(o*r,a*r,s*r);return e=>e.createNoiseInterpolator(o)}noiseData(e,t){const i=e+this.getOffset(e,0,t),n=t+this.getOffset(t,e,0),r=this.getContinentalness(i,n),o=this.getErosion(i,n),a=this.getWeirdness(i,n),s=this.terrainInfo(r,o,a);return k_.create(i,n,r,o,a,s)}sample(e,t,i){return this.target(e,t,i,this.noiseData(e,i))}target(e,t,i,n){const r=n.shiftedX,o=t+this.getOffset(t,i,e),a=n.shiftedZ,s=this.getTemperature(r,o,a),c=this.getHumidity(r,o,a),l=this.computeDimensionDensity(t<<2,n.terrainInfo);return b_.target(s,c,n.continentalness,n.erosion,l,n.weirdness)}terrainInfo(e,t,i){const n=nb.point(e,t,i),r=this.shaper.offset(n),o=this.shaper.factor(n),a=this.shaper.jaggedness(n);return x_.create(r,o,a)}getOffset(e,t,i){return 4*this.offsetNoise.sample(e,t,i)}getTemperature(e,t,i){return this.temperatureNoise.sample(e,t,i)}getHumidity(e,t,i){return this.humidityNoise.sample(e,t,i)}getContinentalness(e,t){return this.continentalnessNoise.sample(e,0,t)}getErosion(e,t){return this.erosionNoise.sample(e,0,t)}getWeirdness(e,t){return this.weirdnessNoise.sample(e,0,t)}makeBaseNoiseFiller(e,t,i){const n=this.baseNoise(e),r=i?this.noodleToggleNoise(e):()=>-1,o=i?this.noodleThicknessNoise(e):()=>0,a=i?this.noodleRidgeANoise(e):()=>0,s=i?this.noodleRidgeBNoise(e):()=>0;return(e,i,c)=>{let l=n();if(l=R_(.64*l,-1,1),l=l/2-l*l*l/24,r()>=0){const e=function(e,t,i,n,r){return I_(n,r,P_(e,t,i))}(o(),-1,1,.05,.1),t=Math.abs(1.5*a())-e,i=Math.abs(1.5*s())-e;l=Math.min(l,Math.max(t,i))}return l+=t(e,i,c),l>0?null:B_.AIR}}calculateBlendedBaseNoise(e,t,i,n){const r=this.blendedNoise.sample(e,t,i);return this.calculateBaseNoise(e,t,i,n,r,!this.isNoiseCavesEnabled,!0)}calculateBaseNoise(e,t,i,n,r,o,a){if(!this.settings.islandNoiseOverride){const o=a?this.sampleJaggedNoise(n.jaggedness,e,i):0,s=this.computeDimensionDensity(t,n),c=n.factor*(o+s);r+=c>0?4*c:c}let s=-64,c=64;if(!o&&r>=-64){const n=r-1.5625,o=this.getBigEntrances(e,t,i),a=this.getSpaghettiRoughness(e,t,i),l=this.getSpaghetti3D(e,t,i),u=Math.min(o,l+a);if(n<0)c=u;else{const o=this.getLayerizedCaverns(e,t,i);r=o>64?64:this.getCheese(e,t,i)+o+I_(.5,0,1.28*n);const l=this.getSpaghetti2D(e,t,i);s=this.getPillars(e,t,i),c=Math.min(u,l+a)}}return r=R_(r,s,c),R_(r=this.applySlide(r,t/y_.cellHeight(this.settings)),-64,64)}sampleJaggedNoise(e,t,i){if(0===e)return 0;const n=this.jaggedNoise.sample(1500*t,0,1500*i);return n>0?e*n:e/2*n}computeDimensionDensity(e,t){return 1-e/128+t.offset}getBigEntrances(e,t,i){return this.bigEntranceNoise.sample(.75*e,.5*t,.75*i)+.37+I_(.3,0,(t+10)/40)}getSpaghettiRoughness(e,t,i){const n=this.spaghettiRoughnessNoise.sample(e,t,i),r=U_(this.spaghettiRoughnessModulator.sample(e,t,i),-1,1,0,1);return(.4-Math.abs(n))*r}getSpaghetti2D(e,t,i){const n=this.quantizeSpaghettiRarity2D(this.spaghetti2DRarityModulator.sample(2*e,t,2*i)),r=U_(this.spaghetti2DThicknessModulator.sample(2*e,t,2*i),-1,1,.6,1.3),o=this.sampleWithRarity(this.spaghetti2DNoise,e,t,i,n),a=Math.abs(n*o)-.083*r,s=y_.minCellY(this.settings),c=U_(this.spaghetti2DElevationModulator.sample(e,0,i),-1,1,s,8),l=Math.abs(c-t/8)-1*r;return R_(Math.max(l,a),-1,1)}getSpaghetti3D(e,t,i){const n=this.quantizeSpaghettiRarity3D(this.spaghetti3DRarityModulator.sample(2*e,t,2*i)),r=U_(this.spaghetti3DThicknessModulator.sample(e,t,i),-1,1,.065,.088),o=this.sampleWithRarity(this.spaghetti3DNoise1,e,t,i,n),a=Math.abs(n*o)-r,s=this.sampleWithRarity(this.spaghetti3DNoise2,e,t,i,n),c=Math.abs(n*s)-r;return R_(Math.max(a,c),-1,1)}quantizeSpaghettiRarity2D(e){return e<-.75?.5:e<-.5?.75:e<.5?1:e<.75?2:3}quantizeSpaghettiRarity3D(e){return e<-.5?.75:e<0?1:e<.5?1.5:2}sampleWithRarity(e,t,i,n,r){return e.sample(t/r,i/r,n/r)}getLayerizedCaverns(e,t,i){return 4*T_(this.layerNoise.sample(e,8*t,i))}getCheese(e,t,i){return R_(this.cheeseNoise.sample(e,t/1.5,i)+.27,-1,1)}getPillars(e,t,i){const n=U_(this.pillarRarenessModulator.sample(e,t,i),-1,1,0,2),r=U_(this.pillarThicknessModulator.sample(e,t,i),-1,1,0,1.1),o=this.pillarNoise.sample(25*e,.3*t,25*i),a=Math.pow(r,3)*(2*o-n);return a<=.03?Number.MIN_SAFE_INTEGER:a}applySlide(e,t){const i=t-y_.minCellY(this.settings);return e=w_.apply(this.settings.topSlide,e,y_.cellCountY(this.settings)-i),w_.apply(this.settings.bottomSlide,e,i)}getPreliminarySurfaceLevel(e,t,i){const n=y_.minCellY(this.settings)+y_.cellCountY(this.settings),r=y_.minCellY(this.settings),o=y_.cellHeight(this.settings);for(let a=n;a>=r;a-=1){const n=a*o;if(this.calculateBaseNoise(e,n,t,i,-.703125,!0,!1)>=.390625)return n}return Number.MAX_SAFE_INTEGER}}(k_||(k_={})).create=function(e,t,i,n,r,o){return{shiftedX:e,shiftedZ:t,continentalness:i,weirdness:n,erosion:r,terrainInfo:o}},(A_||(A_={})).fromJson=function(e){var t,i,n,r;const o=null!==(t=h_.readObject(e))&&void 0!==t?t:{};return void 0!==o.absolute?(s=null!==(i=h_.readNumber(o.absolute))&&void 0!==i?i:0,()=>s):void 0!==o.above_bottom?(a=null!==(n=h_.readNumber(o.above_bottom))&&void 0!==n?n:0,e=>e.minY+a):void 0!==o.below_top?function(e){return t=>t.maxY-e}(null!==(r=h_.readNumber(o.below_top))&&void 0!==r?r:0):()=>0;var a,s},(C_||(C_={})).create=function(e,t){return{minY:e,height:t,maxY:e+t-1}};class sb{constructor(e,t,i){this.rule=e,this.defaultBlock=t,this.random=G_.create(i).forkPositional(),this.surfaceNoise=N_.instantiate(this.random,N_.SURFACE),this.surfaceSecondaryNoise=N_.instantiate(this.random,N_.SURFACE_SECONDARY),this.positionalRandoms=new Map}buildSurface(e,t,i,n){const r=p_.minBlockX(e.pos),o=p_.minBlockZ(e.pos),a=new cb(this,e,t,i,n),s=this.rule(a);for(let c=0;c<16;c+=1){const t=r+c;for(let i=0;i<1;i+=1){const n=o+i;a.updateXZ(t,n);let r=0,c=Number.MIN_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER;for(let i=e.maxY;i>=e.minY;i-=1){const o=d_.create(t,i,n),u=e.getBlockState(o);if(u.equals(B_.AIR)){r=0,c=Number.MIN_SAFE_INTEGER;continue}if(u.isFluid()){c===Number.MIN_SAFE_INTEGER&&(c=i+1);continue}if(l>=i){l=Number.MIN_SAFE_INTEGER;for(let r=i-1;r>=e.minY;r-=1){const i=e.getBlockState(d_.create(t,r,n));if(i.equals(B_.AIR)||i.isFluid()){l=r+1;break}}}r+=1;const d=i-l+1;if(!u.equals(this.defaultBlock))continue;a.updateY(r,d,c,i);const h=s(t,i,n);h&&e.setBlockState(o,h)}}}}getSurfaceDepth(e,t){return 2.75*this.surfaceNoise.sample(e,0,t)+3+.25*this.random.at(e,0,t).nextDouble()}getSurfaceSecondary(e,t){return this.surfaceSecondaryNoise.sample(e,0,t)}getRandom(e){return M_(this.positionalRandoms,e,(()=>this.random.fromHashOf(e)))}}class cb{constructor(e,t,i,n,r){this.system=e,this.chunk=t,this.noiseChunk=i,this.context=n,this.getBiome=r,this.blockX=0,this.blockY=0,this.blockZ=0,this.stoneDepthAbove=0,this.stoneDepthBelow=0,this.surfaceDepth=0,this.waterHeight=0,this.biome=()=>"",this.surfaceSecondary=()=>0,this.minSurfaceLevel=()=>0}updateXZ(e,t){this.blockX=e,this.blockZ=t,this.surfaceDepth=this.system.getSurfaceDepth(e,t),this.surfaceSecondary=L_((()=>this.system.getSurfaceSecondary(e,t))),this.minSurfaceLevel=L_((()=>this.calculateMinSurfaceLevel(e,t)))}updateY(e,t,i,n){this.blockY=n,this.stoneDepthAbove=e,this.stoneDepthBelow=t,this.waterHeight=i,this.biome=L_((()=>this.getBiome(d_.create(this.blockX,this.blockY,this.blockZ))))}calculateMinSurfaceLevel(e,t){const i=e>>4,n=t>>4,r=this.noiseChunk.getPreliminarySurfaceLevel(i<<4,n<<4),o=this.noiseChunk.getPreliminarySurfaceLevel(i+1<<4,n<<4),a=this.noiseChunk.getPreliminarySurfaceLevel(i<<4,n+1<<4),s=this.noiseChunk.getPreliminarySurfaceLevel(i+1<<4,n+1<<4);return Math.floor(j_((15&e)/16,(15&t)/16,r,o,a,s))+this.surfaceDepth-8}}!function(e){function t(e){return()=>()=>e}function i(e){return t=>{const i=e.map((e=>e(t)));return(e,t,n)=>{for(const r of i){const i=r(e,t,n);if(i)return i}}}}function n(e,t){return i=>(n,r,o)=>{if(e(i))return t(i)(n,r,o)}}e.NOOP=()=>()=>{},e.fromJson=function(r){var o,a,s;const c=null!==(o=h_.readObject(r))&&void 0!==o?o:{};switch(null===(a=h_.readString(c.type))||void 0===a?void 0:a.replace(/^minecraft:/,"")){case"block":return t(B_.fromJson(c.result_state));case"sequence":return i(null!==(s=h_.readArray(c.sequence,e.fromJson))&&void 0!==s?s:[]);case"condition":return n(S_.fromJson(c.if_true),e.fromJson(c.then_run))}return e.NOOP},e.block=t,e.sequence=i,e.condition=n}(O_||(O_={})),function(e){function t(e){const t=new Set(e);return e=>t.has(e.biome())}function i(e){return t=>!e(t)}function n(e,t,i,n){return r=>{const o=n?r.stoneDepthBelow:r.stoneDepthAbove,a=t?r.surfaceDepth:0,s=0===i?0:U_(r.surfaceSecondary(),-1,1,0,i);return o<=1+e+a+s}}function r(e,t,i){return n=>{const r=t(n.context),o=i(n.context);if(n.blockY<=r)return!0;if(n.blockY>=o)return!1;const a=n.system.getRandom(e),s=U_(n.blockY,r,o,1,0);return a.nextFloat()<s}}function o(e,t,i){return n=>{if(n.waterHeight===Number.MIN_SAFE_INTEGER)return!0;const r=i?n.stoneDepthAbove:0;return n.blockY+r>=n.waterHeight+e+n.surfaceDepth*t}}function a(e,t,i){return n=>{const r=i?n.stoneDepthAbove:0;return n.blockY+r>=e(n.context)+n.surfaceDepth*t}}e.FALSE=()=>!1,e.TRUE=()=>!0,e.fromJson=function(s){var c,l,u,d,h,p,m,f,g,_,b,v;const y=null!==(c=h_.readObject(s))&&void 0!==c?c:{};switch(null===(l=h_.readString(y.type))||void 0===l?void 0:l.replace(/^minecraft:/,"")){case"above_preliminary_surface":return e=>e.blockY>=e.minSurfaceLevel();case"biome":return t(null!==(u=h_.readArray(y.biome_is,(e=>{var t;return null!==(t=h_.readString(e))&&void 0!==t?t:""})))&&void 0!==u?u:[]);case"not":return i(e.fromJson(y.invert));case"stone_depth":return n(null!==(d=h_.readInt(y.offset))&&void 0!==d?d:0,null!==(h=h_.readBoolean(y.add_surface_depth))&&void 0!==h&&h,null!==(p=h_.readInt(y.secondary_depth_range))&&void 0!==p?p:0,"ceiling"===h_.readString(y.surface_type));case"vertical_gradient":return r(null!==(m=h_.readString(y.random_name))&&void 0!==m?m:"",A_.fromJson(y.true_at_and_below),A_.fromJson(y.false_at_and_above));case"water":return o(null!==(f=h_.readInt(y.offset))&&void 0!==f?f:0,null!==(g=h_.readInt(y.surface_depth_multiplier))&&void 0!==g?g:0,null!==(_=h_.readBoolean(y.add_surface_depth))&&void 0!==_&&_);case"y_above":return a(A_.fromJson(y.anchor),null!==(b=h_.readInt(y.surface_depth_multiplier))&&void 0!==b?b:0,null!==(v=h_.readBoolean(y.add_surface_depth))&&void 0!==v&&v)}return e.FALSE},e.abovePreliminarySurface=function(){return e=>e.blockY>=e.minSurfaceLevel()},e.biome=t,e.not=i,e.stoneDepth=n,e.verticalGradient=r,e.water=o,e.yAbove=a}(S_||(S_={}));class lb{constructor(e,t,i){this.biomeSource=t,this.settings=i,this.sampler=new ab(i.noise,i.noiseCavesEnabled,e,i.legacyRandomSource),this.noiseChunkCache=new Map,this.materialRule=v_.fromList([(e,t,i,n)=>e.updateNoiseAndGenerateBaseState(t,i,n)]),this.surfaceSystem=new sb(i.surfaceRule,i.defaultBlock,e)}fill(e){var t;const i=Math.max(e.minY,this.settings.noise.minY),n=Math.min(e.maxY,this.settings.noise.minY+this.settings.noise.height),r=y_.cellWidth(this.settings.noise),o=y_.cellHeight(this.settings.noise),a=Math.floor(16/r),s=Math.floor(i/o),c=Math.floor((n-i)/o),l=p_.minBlockX(e.pos),u=p_.minBlockZ(e.pos),d=this.getNoiseChunk(e);d.initializeForFirstCellX();for(let h=0;h<a;h+=1){d.advanceCellX(h);for(let i=0;i<a;i+=1){let n=e.getOrCreateSection(e.sectionsCount-1);for(let a=c-1;a>=0;a-=1){d.selectCellYZ(a,i);for(let c=o-1;c>=0;c-=1){const p=(s+a)*o+c,m=15&p,f=e.getSectionIndex(p);e.getSectionIndex(n.minBlockY)!==f&&(n=e.getOrCreateSection(f));const g=c/o;d.updateForY(g);for(let e=0;e<r;e+=1){const o=l+h*r+e,a=15&o,s=e/r;d.updateForX(s);for(let e=0;e<r;e+=1){const s=u+i*r+e,c=15&s,l=e/r;d.updateForZ(l);let h=null!==(t=this.materialRule(d,o,p,s))&&void 0!==t?t:this.settings.defaultBlock;if(h.equals(B_.AIR)){if(!(p<this.settings.seaLevel))continue;h=this.settings.defaultFluid}n.setBlockState(a,m,c,h)}}}}}d.swapSlices()}}buildSurface(e,t="minecraft:plains"){const i=this.getNoiseChunk(e),n=C_.create(this.settings.noise.minY,this.settings.noise.height);this.surfaceSystem.buildSurface(e,i,n,(()=>t))}getNoiseChunk(e){return M_(this.noiseChunkCache,p_.toLong(e.pos),(()=>{const t=Math.max(e.minY,this.settings.noise.minY),i=Math.min(e.maxY,this.settings.noise.minY+this.settings.noise.height),n=y_.cellWidth(this.settings.noise),r=y_.cellHeight(this.settings.noise),o=Math.floor(16/n),a=Math.floor(t/r),s=Math.floor((i-t)/r),c=p_.minBlockX(e.pos),l=p_.minBlockZ(e.pos);return new ob(o,s,a,this.sampler,c,l,(()=>0),this.settings)}))}}(E_||(E_={})).fromJson=function(e){var t,i,n,r,o,a,s,c,l,u,d;const h=null!==(t=h_.readObject(e))&&void 0!==t?t:{};return{structures:F_.fromJson(h.structures),surfaceRule:O_.fromJson(h.surface_rule),noise:y_.fromJson(h.noise),defaultBlock:B_.fromJson(h.default_block),defaultFluid:B_.fromJson(h.default_fluid),bedrockRoofPosition:null!==(i=h_.readInt(h.bedrock_roof_position))&&void 0!==i?i:0,bedrockFloorPosition:null!==(n=h_.readInt(h.bedrock_floor_position))&&void 0!==n?n:0,seaLevel:null!==(r=h_.readInt(h.sea_level))&&void 0!==r?r:0,disableMobGeneration:null!==(o=h_.readBoolean(h.disable_mob_generation))&&void 0!==o&&o,aquifersEnabled:null!==(a=h_.readBoolean(h.aquifers_enabled))&&void 0!==a&&a,noiseCavesEnabled:null!==(s=h_.readBoolean(h.noise_caves_enabled))&&void 0!==s&&s,deepslateEnabled:null!==(c=h_.readBoolean(h.deepslate_enabled))&&void 0!==c&&c,oreVeinsEnabled:null!==(l=h_.readBoolean(h.ore_veins_enabled))&&void 0!==l&&l,noodleCavesEnabled:null!==(u=h_.readBoolean(h.noodle_caves_enabled))&&void 0!==u&&u,legacyRandomSource:null!==(d=h_.readBoolean(h.legacy_random_source))&&void 0!==d&&d}},(F_||(F_={})).fromJson=function(e){var t;const i=null!==(t=h_.readObject(e))&&void 0!==t?t:{};return{stronghold:h_.compose(i.stronghold,h_.readObject,(e=>{var t,i,n;return{distance:null!==(t=h_.readInt(e.distance))&&void 0!==t?t:0,spread:null!==(i=h_.readInt(e.spread))&&void 0!==i?i:0,count:null!==(n=h_.readInt(e.count))&&void 0!==n?n:0}})),structures:h_.readMap(i.structures,(e=>{var t,i,n,r,o;return i=null!==(t=h_.readObject(e))&&void 0!==t?t:{},{spacing:null!==(n=h_.readInt(i.spacing))&&void 0!==n?n:0,separation:null!==(r=h_.readInt(i.separation))&&void 0!==r?r:0,salt:null!==(o=h_.readInt(i.salt))&&void 0!==o?o:0}}))}},function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,i,n){"string"==typeof e?(2==arguments.length&&(n=i),t.modules[e]||(t.payloads[e]=n,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var i,n,r=function(e,t,i){if("string"==typeof t){var n=s(e,t);if(null!=n)return i&&i(),n}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],a=0,c=t.length;a<c;++a){var l=s(e,t[a]);if(null==l&&o.original)return;r.push(l)}return i&&i.apply(null,r)||!0}},o=function(e,t){var i=r("",e,t);return null==i&&o.original?o.original.apply(this,arguments):i},a=function(e,t){if(-1!==t.indexOf("!")){var i=t.split("!");return a(e,i[0])+"!"+a(e,i[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&n!=t;){var n=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},s=function(e,i){i=a(e,i);var n=t.modules[i];if(!n){if("function"==typeof(n=t.payloads[i])){var o={},s={id:i,uri:"",exports:o,packaged:!0};o=n((function(e,t){return r(i,e,t)}),o,s)||s.exports,t.modules[i]=o,delete t.payloads[i]}n=t.modules[i]=o||n}return n};n=e,(i="ace")&&(e[i]||(e[i]={}),n=e[i]),n.define&&n.define.packaged||(t.original=n.define,n.define=t,n.define.packaged=!0),n.acequire&&n.acequire.packaged||(o.original=n.acequire,n.acequire=o,n.acequire.packaged=!0)}(),ace.define("ace/lib/regexp",["require","exports","module"],(function(e,t,i){var n,r={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},o=void 0===r.exec.call(/()??/,"")[1],a=(n=/^/g,r.test.call(n,""),!n.lastIndex);function s(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function c(e,t,i){if(Array.prototype.indexOf)return e.indexOf(t,i);for(var n=i||0;n<e.length;n++)if(e[n]===t)return n;return-1}a&&o||(RegExp.prototype.exec=function(e){var t,i,n=r.exec.apply(this,arguments);if("string"==typeof e&&n){if(!o&&n.length>1&&c(n,"")>-1&&(i=RegExp(this.source,r.replace.call(s(this),"g","")),r.replace.call(e.slice(n.index),i,(function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(n[e]=void 0)}))),this._xregexp&&this._xregexp.captureNames)for(var l=1;l<n.length;l++)(t=this._xregexp.captureNames[l-1])&&(n[t]=n[l]);!a&&this.global&&!n[0].length&&this.lastIndex>n.index&&this.lastIndex--}return n},a||(RegExp.prototype.test=function(e){var t=r.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))})),ace.define("ace/lib/es5-shim",["require","exports","module"],(function(e,t,i){function n(){}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var i=h.call(arguments,1),r=function(){if(this instanceof r){var n=t.apply(this,i.concat(h.call(arguments)));return Object(n)===n?n:this}return t.apply(e,i.concat(h.call(arguments)))};return t.prototype&&(n.prototype=t.prototype,r.prototype=new n,n.prototype=null),r});var r,o,a,s,c,l=Function.prototype.call,u=Array.prototype,d=Object.prototype,h=u.slice,p=l.bind(d.toString),m=l.bind(d.hasOwnProperty);if((c=m(d,"__defineGetter__"))&&(r=l.bind(d.__defineGetter__),o=l.bind(d.__defineSetter__),a=l.bind(d.__lookupGetter__),s=l.bind(d.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,i=[];if(i.splice.apply(i,e(20)),i.splice.apply(i,e(26)),t=i.length,i.splice(5,0,"XXX"),i.length,t+1==i.length)return!0}()){var f=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?f.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(h.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var i=this.length;e>0?e>i&&(e=i):null==e?e=0:e<0&&(e=Math.max(i+e,0)),e+t<i||(t=i-e);var n=this.slice(e,e+t),r=h.call(arguments,2),o=r.length;if(e===i)o&&this.push.apply(this,r);else{var a=Math.min(t,i-e),s=e+a,c=s+o-a,l=i-s,u=i-a;if(c<s)for(var d=0;d<l;++d)this[c+d]=this[s+d];else if(c>s)for(d=l;d--;)this[c+d]=this[s+d];if(o&&e===u)this.length=u,this.push.apply(this,r);else for(this.length=u+o,d=0;d<o;++d)this[e+d]=r[d]}return n};Array.isArray||(Array.isArray=function(e){return"[object Array]"==p(e)});var g,_,b=Object("a"),v="a"!=b[0]||!(0 in b);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=B(this),i=v&&"[object String]"==p(this)?this.split(""):t,n=arguments[1],r=-1,o=i.length>>>0;if("[object Function]"!=p(e))throw new TypeError;for(;++r<o;)r in i&&e.call(n,i[r],r,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=B(this),i=v&&"[object String]"==p(this)?this.split(""):t,n=i.length>>>0,r=Array(n),o=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var a=0;a<n;a++)a in i&&(r[a]=e.call(o,i[a],a,t));return r}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,i=B(this),n=v&&"[object String]"==p(this)?this.split(""):i,r=n.length>>>0,o=[],a=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)s in n&&(t=n[s],e.call(a,t,s,i)&&o.push(t));return o}),Array.prototype.every||(Array.prototype.every=function(e){var t=B(this),i=v&&"[object String]"==p(this)?this.split(""):t,n=i.length>>>0,r=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var o=0;o<n;o++)if(o in i&&!e.call(r,i[o],o,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=B(this),i=v&&"[object String]"==p(this)?this.split(""):t,n=i.length>>>0,r=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var o=0;o<n;o++)if(o in i&&e.call(r,i[o],o,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=B(this),i=v&&"[object String]"==p(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var r,o=0;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in i){r=i[o++];break}if(++o>=n)throw new TypeError("reduce of empty array with no initial value")}for(;o<n;o++)o in i&&(r=e.call(void 0,r,i[o],o,t));return r}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=B(this),i=v&&"[object String]"==p(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var r,o=n-1;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in i){r=i[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(r=e.call(void 0,r,i[o],o,t))}while(o--);return r}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=v&&"[object String]"==p(this)?this.split(""):B(this),i=t.length>>>0;if(!i)return-1;var n=0;for(arguments.length>1&&(n=D(arguments[1])),n=n>=0?n:Math.max(0,i+n);n<i;n++)if(n in t&&t[n]===e)return n;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=v&&"[object String]"==p(this)?this.split(""):B(this),i=t.length>>>0;if(!i)return-1;var n=i-1;for(arguments.length>1&&(n=Math.min(n,D(arguments[1]))),n=n>=0?n:i-Math.abs(n);n>=0;n--)if(n in t&&e===t[n])return n;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:d)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(m(e,t)){var i;if(i={enumerable:!0,configurable:!0},c){var n=e.__proto__;e.__proto__=d;var r=a(e,t),o=s(e,t);if(e.__proto__=n,r||o)return r&&(i.get=r),o&&(i.set=o),i}return i.value=e[t],i}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(g=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var i;if(null===e)i=g();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var n=function(){};n.prototype=e,(i=new n).__proto__=e}return void 0!==t&&Object.defineProperties(i,t),i});function y(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}if(Object.defineProperty){var w=y({}),x="undefined"==typeof document||y(document.createElement("div"));if(!w||!x)var N=Object.defineProperty}if(!Object.defineProperty||N){Object.defineProperty=function(e,t,i){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError("Property description must be an object: "+i);if(N)try{return N.call(Object,e,t,i)}catch(l){}if(m(i,"value"))if(c&&(a(e,t)||s(e,t))){var n=e.__proto__;e.__proto__=d,delete e[t],e[t]=i.value,e.__proto__=n}else e[t]=i.value;else{if(!c)throw new TypeError("getters & setters can not be defined on this javascript engine");m(i,"get")&&r(e,t,i.get),m(i,"set")&&o(e,t,i.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var i in t)m(t,i)&&Object.defineProperty(e,i,t[i]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze((function(){}))}catch(L){Object.freeze=(_=Object.freeze,function(e){return"function"==typeof e?e:_(e)})}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";m(e,t);)t+="?";e[t]=!0;var i=m(e,t);return delete e[t],i}),!Object.keys){var k=!0,A=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],C=A.length;for(var O in{toString:null})k=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var i in e)m(e,i)&&t.push(i);if(k)for(var n=0,r=C;n<r;n++){var o=A[n];m(e,o)&&t.push(o)}return t}}Date.now||(Date.now=function(){return(new Date).getTime()});var S="\t\n\v\f\r    \u2028\u2029\ufeff";if(!String.prototype.trim||S.trim()){S="["+S+"]";var E=new RegExp("^"+S+S+"*"),F=new RegExp(S+S+"*$");String.prototype.trim=function(){return String(this).replace(E,"").replace(F,"")}}function D(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}var B=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],(function(e,t,i){e("./regexp"),e("./es5-shim")})),ace.define("ace/lib/dom",["require","exports","module"],(function(e,t,i){t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){for(var i=e.className.split(/\s+/g);;){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){for(var i=e.className.split(/\s+/g),n=!0;;){var r=i.indexOf(t);if(-1==r)break;n=!1,i.splice(r,1)}return n&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){var i,n=0;if((t=t||document).createStyleSheet&&(i=t.styleSheets)){for(;n<i.length;)if(i[n++].owningElement.id===e)return!0}else if(i=t.getElementsByTagName("style"))for(;n<i.length;)if(i[n++].id===e)return!0;return!1},t.importCssString=function(e,i,n){if(n=n||document,i&&t.hasCssString(i,n))return null;var r;i&&(e+="\n/*# sourceURL=ace/css/"+i+" */"),n.createStyleSheet?((r=n.createStyleSheet()).cssText=e,i&&(r.owningElement.id=i)):((r=t.createElement("style")).appendChild(n.createTextNode(e)),i&&(r.id=i),t.getDocumentHead(n).appendChild(r))},t.importCssStylsheet=function(e,i){if(i.createStyleSheet)i.createStyleSheet(e);else{var n=t.createElement("link");n.rel="stylesheet",n.href=e,t.getDocumentHead(i).appendChild(n)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},t.scrollbarWidth=function(e){var i=t.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var n=t.createElement("ace_outer"),r=n.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",n.appendChild(i);var o=e.documentElement;o.appendChild(n);var a=i.offsetWidth;r.overflow="scroll";var s=i.offsetWidth;return a==s&&(s=n.clientWidth),o.removeChild(n),a-s},"undefined"!=typeof document?(void 0!==window.pageYOffset?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.setInnerHtml=function(e,t){var i=e.cloneNode(!1);return i.innerHTML=t,e.parentNode.replaceChild(i,e),i},"textContent"in document.documentElement?(t.setInnerText=function(e,t){e.textContent=t},t.getInnerText=function(e){return e.textContent}):(t.setInnerText=function(e,t){e.innerText=t},t.getInnerText=function(e){return e.innerText}),t.getParentWindow=function(e){return e.defaultView||e.parentWindow}):t.importCssString=function(){}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,i){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var i in t)e[i]=t[i];return e},t.implement=function(e,i){t.mixin(e,i)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],(function(e,t,i){e("./fixoldbrowsers");var n=e("./oop"),r=function(){var e,t,i={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in i.FUNCTION_KEYS)e=i.FUNCTION_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);for(t in i.PRINTABLE_KEYS)e=i.PRINTABLE_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);return n.mixin(i,i.MODIFIER_KEYS),n.mixin(i,i.PRINTABLE_KEYS),n.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,i[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)i.KEY_MODS[t]=e.filter((function(e){return t&i.KEY_MODS[e]})).join("-")+"-"}(),i.KEY_MODS[0]="",i.KEY_MODS[-1]="input-",i}();n.mixin(t,r),t.keyCodeToString=function(e){var t=r[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,i){if(t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS},"object"==typeof navigator){var n=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),r=navigator.userAgent;t.isWin="win"==n,t.isMac="mac"==n,t.isLinux="linux"==n,t.isIE="Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((r.match(/rv:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isAIR=r.indexOf("AdobeAIR")>=0,t.isIPad=r.indexOf("iPad")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(r)&&!window.MSStream,t.isIOS&&(t.isMac=!0)}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,i){var n=e("./keys"),r=e("./useragent"),o=null,a=0;t.addListener=function(e,t,i){if(e.addEventListener)return e.addEventListener(t,i,!1);if(e.attachEvent){var n=function(){i.call(e,window.event)};i._wrapper=n,e.attachEvent("on"+t,n)}},t.removeListener=function(e,t,i){if(e.removeEventListener)return e.removeEventListener(t,i,!1);e.detachEvent&&e.detachEvent("on"+t,i._wrapper||i)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||r.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,i,n){function r(e){i&&i(e),n&&n(e),t.removeListener(document,"mousemove",i,!0),t.removeListener(document,"mouseup",r,!0),t.removeListener(document,"dragstart",r,!0)}return t.addListener(document,"mousemove",i,!0),t.addListener(document,"mouseup",r,!0),t.addListener(document,"dragstart",r,!0),r},t.addTouchMoveListener=function(e,i){var n,r;t.addListener(e,"touchstart",(function(e){var t=e.touches[0];n=t.clientX,r=t.clientY})),t.addListener(e,"touchmove",(function(e){var t=e.touches;if(!(t.length>1)){var o=t[0];e.wheelX=n-o.clientX,e.wheelY=r-o.clientY,n=o.clientX,r=o.clientY,i(e)}}))},t.addMouseWheelListener=function(e,i){"onmousewheel"in e?t.addListener(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),i(e)})):"onwheel"in e?t.addListener(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}i(e)})):t.addListener(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),i(e)}))},t.addMultiMouseDownListener=function(e,i,n,o){var a,s,c,l=0,u={2:"dblclick",3:"tripleclick",4:"quadclick"};function d(e){if(0!==t.getButton(e)?l=0:e.detail>1?++l>4&&(l=1):l=1,r.isIE){var d=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-s)>5;c&&!d||(l=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),i[l-1]||600),1==l&&(a=e.clientX,s=e.clientY)}if(e._clicks=l,n[o]("mousedown",e),l>4)l=0;else if(l>1)return n[o](u[l],e)}function h(e){l=2,c&&clearTimeout(c),c=setTimeout((function(){c=null}),i[l-1]||600),n[o]("mousedown",e),n[o](u[l],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){t.addListener(e,"mousedown",d),r.isOldIE&&t.addListener(e,"dblclick",h)}))};var s=r.isMac&&r.isOpera&&!("KeyboardEvent"in window)?function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)}:function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function c(e,t,i){var c=s(t);if(!r.isMac&&o){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(c|=8),o.altGr){if(3==(3&c))return;o.altGr=0}if(18===i||17===i){var l="location"in t?t.location:t.keyLocation;if(17===i&&1===l)1==o[i]&&(a=t.timeStamp);else if(18===i&&3===c&&2===l){t.timeStamp-a<50&&(o.altGr=!0)}}}if((i in n.MODIFIER_KEYS&&(i=-1),8&c&&i>=91&&i<=93&&(i=-1),!c&&13===i)&&(3===(l="location"in t?t.location:t.keyLocation)&&(e(t,c,-i),t.defaultPrevented)))return;if(r.isChromeOS&&8&c){if(e(t,c,i),t.defaultPrevented)return;c&=-9}return!!(c||i in n.FUNCTION_KEYS||i in n.PRINTABLE_KEYS)&&e(t,c,i)}function l(){o=Object.create(null)}if(t.getModifierString=function(e){return n.KEY_MODS[s(e)]},t.addCommandKeyListener=function(e,i){var n=t.addListener;if(r.isOldGecko||r.isOpera&&!("KeyboardEvent"in window)){var a=null;n(e,"keydown",(function(e){a=e.keyCode})),n(e,"keypress",(function(e){return c(i,e,a)}))}else{var s=null;n(e,"keydown",(function(e){o[e.keyCode]=(o[e.keyCode]||0)+1;var t=c(i,e,e.keyCode);return s=e.defaultPrevented,t})),n(e,"keypress",(function(e){s&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),s=null)})),n(e,"keyup",(function(e){o[e.keyCode]=null})),o||(l(),n(window,"focus",l))}},"object"==typeof window&&window.postMessage&&!r.isOldIE){t.nextTick=function(e,i){i=i||window;var n="zero-timeout-message-1";t.addListener(i,"message",(function r(o){o.data==n&&(t.stopPropagation(o),t.removeListener(i,"message",r),e())})),i.postMessage(n,"*")}}t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/lib/lang",["require","exports","module"],(function(e,t,i){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var i="";t>0;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;i<n;i++)e[i]&&"object"==typeof e[i]?t[i]=this.copyObject(e[i]):t[i]=e[i];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var i;if(Array.isArray(t)){i=[];for(var n=0;n<t.length;n++)i[n]=e(t[n]);return i}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var n in i={},t)i[n]=e(t[n]);return i},t.arrayToMap=function(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var i in e)t[i]=e[i];return t},t.arrayRemove=function(e,t){for(var i=0;i<=e.length;i++)t===e[i]&&e.splice(i,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var i=[];return e.replace(t,(function(e){i.push({offset:arguments[arguments.length-2],length:e.length})})),i},t.deferredCall=function(e){var t=null,i=function(){t=null,e()},n=function(e){return n.cancel(),t=setTimeout(i,e||0),n};return n.schedule=n,n.call=function(){return this.cancel(),e(),n},n.cancel=function(){return clearTimeout(t),t=null,n},n.isPending=function(){return t},n},t.delayedCall=function(e,t){var i=null,n=function(){i=null,e()},r=function(e){null==i&&(i=setTimeout(n,e||t))};return r.delay=function(e){i&&clearTimeout(i),i=setTimeout(n,e||t)},r.schedule=r,r.call=function(){this.cancel(),e()},r.cancel=function(){i&&clearTimeout(i),i=null},r.isPending=function(){return i},r}})),ace.define("ace/keyboard/textinput_ios",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/lib/keys"],(function(e,t,i){var n=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),a=e("../lib/lang"),s=e("../lib/keys"),c=s.KEY_MODS,l=r.isChrome<18,u=r.isIE;t.TextInput=function(e,t){var i=o.createElement("textarea");i.className=r.isIOS?"ace_text-input ace_text-input-ios":"ace_text-input",r.isTouchPad&&i.setAttribute("x-palm-disable-auto-cap",!0),i.setAttribute("wrap","off"),i.setAttribute("autocorrect","off"),i.setAttribute("autocapitalize","off"),i.setAttribute("spellcheck",!1),i.style.opacity="0",e.insertBefore(i,e.firstChild);var d="\n aaaa a\n",h=!1,p=!1,m=!1,f=!1,g="",_=!0;try{var b=document.activeElement===i}catch(j){}n.addListener(i,"blur",(function(e){t.onBlur(e),b=!1})),n.addListener(i,"focus",(function(e){b=!0,t.onFocus(e),w()})),this.focus=function(){if(g)return i.focus();i.style.position="fixed",i.focus()},this.blur=function(){i.blur()},this.isFocused=function(){return b};var v=a.delayedCall((function(){b&&w(_)})),y=a.delayedCall((function(){f||(i.value=d,b&&w())}));function w(e){if(!f){if(f=!0,N)t=0,n=e?0:i.value.length-1;else var t=4,n=5;try{i.setSelectionRange(t,n)}catch(j){}f=!1}}function x(){f||(i.value=d,r.isWebKit&&y.schedule())}r.isWebKit||t.addEventListener("changeSelection",(function(){t.selection.isEmpty()!=_&&(_=!_,v.schedule())})),x(),b&&t.onFocus();var N=null;this.setInputHandler=function(e){N=e},this.getInputHandler=function(){return N};var k=!1,A=function(e){4===i.selectionStart&&5===i.selectionEnd||(N&&(e=N(e),N=null),m?(w(),e&&t.onPaste(e),m=!1):e==d.substr(0)&&4===i.selectionStart?k?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):h||(e.substring(0,9)==d&&e.length>d.length?e=e.substr(9):e.substr(0,4)==d.substr(0,4)?e=e.substr(4,e.length-d.length+1):e.charAt(e.length-1)==d.charAt(0)&&(e=e.slice(0,-1)),e==d.charAt(0)||e.charAt(e.length-1)==d.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),h&&(h=!1),k&&(k=!1))},C=function(e){if(!f){var t=i.value;A(t),x()}},O=function(e,t,i){var n=e.clipboardData||window.clipboardData;if(n&&!l){var r=u||i?"Text":"text/plain";try{return t?!1!==n.setData(r,t):n.getData(r)}catch(o){if(!i)return O(o,t,!0)}}},S=function(e,o){var a=t.getCopyText();if(!a)return n.preventDefault(e);O(e,a)?(r.isIOS&&(p=o,i.value="\n aa"+a+"a a\n",i.setSelectionRange(4,4+a.length),h={value:a}),o?t.onCut():t.onCopy(),r.isIOS||n.preventDefault(e)):(h=!0,i.value=a,i.select(),setTimeout((function(){h=!1,x(),w(),o?t.onCut():t.onCopy()})))};n.addCommandKeyListener(i,t.onCommandKey.bind(t)),n.addListener(i,"select",(function(e){var n;0===(n=i).selectionStart&&n.selectionEnd===n.value.length?(t.selectAll(),w()):N&&w(t.selection.isEmpty())})),n.addListener(i,"input",C),n.addListener(i,"cut",(function(e){S(e,!0)})),n.addListener(i,"copy",(function(e){S(e,!1)})),n.addListener(i,"paste",(function(e){var o=O(e);"string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(w),n.preventDefault(e)):(i.value="",m=!0)}));var E,F=function(){if(f&&t.onCompositionUpdate&&!t.$readOnly){var e=i.value.replace(/\x01/g,"");if(f.lastValue!==e&&(t.onCompositionUpdate(e),f.lastValue&&t.undo(),f.canUndo&&(f.lastValue=e),f.lastValue)){var n=t.selection.getRange();t.insert(f.lastValue),t.session.markUndoGroup(),f.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},D=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=f;f=!1;var o=setTimeout((function(){o=null;var e=i.value.replace(/\x01/g,"");f||(e==n.lastValue?x():!n.lastValue&&e&&(x(),A(e)))}));N=function(e){return o&&clearTimeout(o),(e=e.replace(/\x01/g,""))==n.lastValue?"":(n.lastValue&&o&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",D),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range),(!!r.isChrome&&r.isChrome>=53||!!r.isWebKit&&r.isWebKit>=603)&&C()}},B=a.delayedCall(F,50);function L(){clearTimeout(E),E=setTimeout((function(){g&&(i.style.cssText=g,g=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())}),0)}n.addListener(i,"compositionstart",(function(e){f||!t.onCompositionStart||t.$readOnly||((f={}).canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(F,0),t.on("mousedown",D),f.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())})),r.isGecko?n.addListener(i,"text",(function(){B.schedule()})):(n.addListener(i,"keyup",(function(){B.schedule()})),n.addListener(i,"keydown",(function(){B.schedule()}))),n.addListener(i,"compositionend",D),this.getElement=function(){return i},this.setReadOnly=function(e){i.readOnly=e},this.onContextMenu=function(e){k=!0,w(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,a){g||(g=i.style.cssText),i.style.cssText=(a?"z-index:100000;":"")+"height:"+i.style.height+";"+(r.isIE?"opacity:0.1;":"");var s=t.container.getBoundingClientRect(),c=o.computedStyle(t.container),l=s.top+(parseInt(c.borderTopWidth)||0),u=s.left+(parseInt(s.borderLeftWidth)||0),d=s.bottom-l-i.clientHeight-2,h=function(e){i.style.left=e.clientX-u-2+"px",i.style.top=Math.min(e.clientY-l-2,d)+"px"};h(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(E),r.isWin&&n.capture(t.container,h,L))},this.onContextMenuClose=L;var M=function(e){t.textInput.onContextMenu(e),L()};if(n.addListener(i,"mouseup",M),n.addListener(i,"mousedown",(function(e){e.preventDefault(),L()})),n.addListener(t.renderer.scroller,"contextmenu",M),n.addListener(i,"contextmenu",M),r.isIOS){var T=null,R=!1;e.addEventListener("keydown",(function(e){T&&clearTimeout(T),R=!0})),e.addEventListener("keyup",(function(e){T=setTimeout((function(){R=!1}),100)}));var $=function(e){if(document.activeElement===i&&!R){if(p)return setTimeout((function(){p=!1}),100);var n=i.selectionStart,r=i.selectionEnd;if(i.setSelectionRange(4,5),n==r)switch(n){case 0:t.onCommandKey(null,0,s.up);break;case 1:t.onCommandKey(null,0,s.home);break;case 2:t.onCommandKey(null,c.option,s.left);break;case 4:t.onCommandKey(null,0,s.left);break;case 5:t.onCommandKey(null,0,s.right);break;case 7:t.onCommandKey(null,c.option,s.right);break;case 8:t.onCommandKey(null,0,s.end);break;case 9:t.onCommandKey(null,0,s.down)}else{switch(r){case 6:t.onCommandKey(null,c.shift,s.right);break;case 7:t.onCommandKey(null,c.shift|c.option,s.right);break;case 8:t.onCommandKey(null,c.shift,s.end);break;case 9:t.onCommandKey(null,c.shift,s.down)}switch(n){case 0:t.onCommandKey(null,c.shift,s.up);break;case 1:t.onCommandKey(null,c.shift,s.home);break;case 2:t.onCommandKey(null,c.shift|c.option,s.left);break;case 3:t.onCommandKey(null,c.shift,s.left)}}}};document.addEventListener("selectionchange",$),t.on("destroy",(function(){document.removeEventListener("selectionchange",$)}))}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"],(function(e,t,i){var n=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),a=e("../lib/lang"),s=r.isChrome<18,c=r.isIE,l=e("./textinput_ios").TextInput;t.TextInput=function(e,t){if(r.isIOS)return l.call(this,e,t);var i=o.createElement("textarea");i.className="ace_text-input",i.setAttribute("wrap","off"),i.setAttribute("autocorrect","off"),i.setAttribute("autocapitalize","off"),i.setAttribute("spellcheck",!1),i.style.opacity="0",e.insertBefore(i,e.firstChild);var u="\u2028\u2028",d=!1,h=!1,p=!1,m="",f=!0;try{var g=document.activeElement===i}catch(R){}n.addListener(i,"blur",(function(e){t.onBlur(e),g=!1})),n.addListener(i,"focus",(function(e){g=!0,t.onFocus(e),v()})),this.focus=function(){if(m)return i.focus();var e=i.style.top;i.style.position="fixed",i.style.top="0px",i.focus(),setTimeout((function(){i.style.position="","0px"==i.style.top&&(i.style.top=e)}),0)},this.blur=function(){i.blur()},this.isFocused=function(){return g};var _=a.delayedCall((function(){g&&v(f)})),b=a.delayedCall((function(){p||(i.value=u,g&&v())}));function v(e){if(!p){if(p=!0,w)var t=0,n=e?0:i.value.length-1;else t=e?2:1,n=2;try{i.setSelectionRange(t,n)}catch(R){}p=!1}}function y(){p||(i.value=u,r.isWebKit&&b.schedule())}r.isWebKit||t.addEventListener("changeSelection",(function(){t.selection.isEmpty()!=f&&(f=!f,_.schedule())})),y(),g&&t.onFocus();var w=null;this.setInputHandler=function(e){w=e},this.getInputHandler=function(){return w};var x=!1,N=function(e){w&&(e=w(e),w=null),h?(v(),e&&t.onPaste(e),h=!1):e==u.charAt(0)?x?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==u?e=e.substr(2):e.charAt(0)==u.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==u.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==u.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),x&&(x=!1)},k=function(e){if(!p){var t=i.value;N(t),y()}},A=function(e,t,i){var n=e.clipboardData||window.clipboardData;if(n&&!s){var r=c||i?"Text":"text/plain";try{return t?!1!==n.setData(r,t):n.getData(r)}catch(o){if(!i)return A(o,t,!0)}}},C=function(e,r){var o=t.getCopyText();if(!o)return n.preventDefault(e);A(e,o)?(r?t.onCut():t.onCopy(),n.preventDefault(e)):(d=!0,i.value=o,i.select(),setTimeout((function(){d=!1,y(),v(),r?t.onCut():t.onCopy()})))},O=function(e){C(e,!0)},S=function(e){C(e,!1)},E=function(e){var o=A(e);"string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(v),n.preventDefault(e)):(i.value="",h=!0)};n.addCommandKeyListener(i,t.onCommandKey.bind(t)),n.addListener(i,"select",(function(e){var n;d?d=!1:0===(n=i).selectionStart&&n.selectionEnd===n.value.length?(t.selectAll(),v()):w&&v(t.selection.isEmpty())})),n.addListener(i,"input",k),n.addListener(i,"cut",O),n.addListener(i,"copy",S),n.addListener(i,"paste",E),"oncut"in i&&"oncopy"in i&&"onpaste"in i||n.addListener(e,"keydown",(function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:S(e);break;case 86:E(e);break;case 88:O(e)}}));var F,D=function(){if(p&&t.onCompositionUpdate&&!t.$readOnly){var e=i.value.replace(/\u2028/g,"");if(p.lastValue!==e&&(t.onCompositionUpdate(e),p.lastValue&&t.undo(),p.canUndo&&(p.lastValue=e),p.lastValue)){var n=t.selection.getRange();t.insert(p.lastValue),t.session.markUndoGroup(),p.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},B=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=p;p=!1;var o=setTimeout((function(){o=null;var e=i.value.replace(/\u2028/g,"");p||(e==n.lastValue?y():!n.lastValue&&e&&(y(),N(e)))}));w=function(e){return o&&clearTimeout(o),(e=e.replace(/\u2028/g,""))==n.lastValue?"":(n.lastValue&&o&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",B),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range),(!!r.isChrome&&r.isChrome>=53||!!r.isWebKit&&r.isWebKit>=603)&&k()}},L=a.delayedCall(D,50);function M(){clearTimeout(F),F=setTimeout((function(){m&&(i.style.cssText=m,m=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())}),0)}n.addListener(i,"compositionstart",(function(e){p||!t.onCompositionStart||t.$readOnly||((p={}).canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(D,0),t.on("mousedown",B),p.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())})),r.isGecko?n.addListener(i,"text",(function(){L.schedule()})):(n.addListener(i,"keyup",(function(){L.schedule()})),n.addListener(i,"keydown",(function(){L.schedule()}))),n.addListener(i,"compositionend",B),this.getElement=function(){return i},this.setReadOnly=function(e){i.readOnly=e},this.onContextMenu=function(e){x=!0,v(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,a){m||(m=i.style.cssText),i.style.cssText=(a?"z-index:100000;":"")+"height:"+i.style.height+";"+(r.isIE?"opacity:0.1;":"");var s=t.container.getBoundingClientRect(),c=o.computedStyle(t.container),l=s.top+(parseInt(c.borderTopWidth)||0),u=s.left+(parseInt(s.borderLeftWidth)||0),d=s.bottom-l-i.clientHeight-2,h=function(e){i.style.left=e.clientX-u-2+"px",i.style.top=Math.min(e.clientY-l-2,d)+"px"};h(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(F),r.isWin&&n.capture(t.container,h,M))},this.onContextMenuClose=M;var T=function(e){t.textInput.onContextMenu(e),M()};n.addListener(i,"mouseup",T),n.addListener(i,"mousedown",(function(e){e.preventDefault(),M()})),n.addListener(t.renderer.scroller,"contextmenu",T),n.addListener(i,"contextmenu",T)}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,i){e("../lib/dom"),e("../lib/event");var n=e("../lib/useragent");function r(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),t.setDefaultHandler("touchmove",this.onTouchMove.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function o(e,t){if(e.start.row==e.end.row)var i=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)i=2*t.row-e.start.row-e.end.row;else var i=t.column-4;return i<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),i=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,o=e.getButton();if(0!==o){var a=r.getSelectionRange().isEmpty();return r.$blockScrolling++,(a||1==o)&&r.selection.moveToPosition(i),r.$blockScrolling--,void(2==o&&(r.textInput.onContextMenu(e.domEvent),n.isMozilla||e.preventDefault()))}return this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(i,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;i.$blockScrolling++,this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(e):t||i.selection.moveToPosition(e),t||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"),i.$blockScrolling--},this.select=function(){var e,t=this.editor,i=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var n=this.$clickSelection.comparePoint(i);if(-1==n)e=this.$clickSelection.end;else if(1==n)e=this.$clickSelection.start;else{var r=o(this.$clickSelection,i);i=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(i),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y),r=i.selection[e](n.row,n.column);if(i.$blockScrolling++,this.$clickSelection){var a=this.$clickSelection.comparePoint(r.start),s=this.$clickSelection.comparePoint(r.end);if(-1==a&&s<=0)t=this.$clickSelection.end,r.end.row==n.row&&r.end.column==n.column||(n=r.start);else if(1==s&&a>=0)t=this.$clickSelection.start,r.start.row==n.row&&r.start.column==n.column||(n=r.end);else if(-1==a&&1==s)n=r.end,t=r.start;else{var c=o(this.$clickSelection,n);n=c.cursor,t=c.anchor}i.selection.setSelectionAnchor(t.row,t.column)}i.selection.selectToPosition(n),i.$blockScrolling--,i.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,i,n,r=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,i=this.x,n=this.y,Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))),o=Date.now();(r>0||o-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),i=this.editor,n=i.session.getBracketRange(t);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=i.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var n=i.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=i.selection.getLineRange(n.start.row),this.$clickSelection.end=i.selection.getLineRange(n.end.row).end):this.$clickSelection=i.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var i=this.$lastScroll,n=e.domEvent.timeStamp,r=n-i.t,o=e.wheelX/r,a=e.wheelY/r;r<250&&(o=(o+i.vx)/2,a=(a+i.vy)/2);var s=Math.abs(o/a),c=!1;if(s>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(c=!0),s<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(c=!0),c)i.allowed=n;else if(n-i.allowed<250){Math.abs(o)<=1.1*Math.abs(i.vx)&&Math.abs(a)<=1.1*Math.abs(i.vy)?(c=!0,i.allowed=n):i.allowed=0}return i.t=n,i.vx=o,i.vy=a,c?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},this.onTouchMove=function(e){this.editor._emit("mousewheel",e)}}).call(r.prototype),t.DefaultHandlers=r})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,i){e("./lib/oop");var n=e("./lib/dom");function r(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=n.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){n.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){n.addCssClass(this.getElement(),e)},this.show=function(e,t,i){null!=e&&this.setText(e),null!=t&&null!=i&&this.setPosition(t,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(r.prototype),t.Tooltip=r})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,i){var n=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event"),a=e("../tooltip").Tooltip;function s(e){a.call(this,e)}r.inherits(s,a),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();(e+=15)+r>i&&(e-=e+r-i),(t+=15)+o>n&&(t-=20+o),a.prototype.setPosition.call(this,e,t)}}.call(s.prototype),t.GutterHandler=function(e){var t,i,r,a=e.editor,c=a.renderer.$gutterLayer,l=new s(a.container);function u(){t&&(t=clearTimeout(t)),r&&(l.hide(),r=null,a._signal("hideGutterTooltip",l),a.removeEventListener("mousewheel",u))}function d(e){l.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(a.isFocused()&&0==t.getButton()&&"foldWidgets"!=c.getRegion(t)){var i=t.getDocumentPosition().row,n=a.session.selection;if(t.getShiftKey())n.selectTo(i,0);else{if(2==t.domEvent.detail)return a.selectAll(),t.preventDefault();e.$clickSelection=a.selection.getLineRange(i)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(o){var s=o.domEvent.target||o.domEvent.srcElement;if(n.hasCssClass(s,"ace_fold-widget"))return u();r&&e.$tooltipFollowsMouse&&d(o),i=o,t||(t=setTimeout((function(){t=null,i&&!e.isMousePressed?function(){var t=i.getDocumentPosition().row,n=c.$annotations[t];if(!n)return u();if(t==a.session.getLength()){var o=a.renderer.pixelToScreenCoordinates(0,i.y).row,s=i.$pos;if(o>a.session.documentToScreenRow(s.row,s.column))return u()}if(r!=n)if(r=n.text.join("<br/>"),l.setHtml(r),l.show(),a._signal("showGutterTooltip",l),a.on("mousewheel",u),e.$tooltipFollowsMouse)d(i);else{var h=i.domEvent.target.getBoundingClientRect(),p=l.getElement().style;p.left=h.right+"px",p.top=h.bottom+"px"}}():u()}),50))})),o.addListener(a.renderer.$gutter,"mouseout",(function(e){i=null,r&&!t&&(t=setTimeout((function(){t=null,u()}),50))})),a.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,i){var n=e("../lib/event"),r=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,i){var n=e("../lib/dom"),r=e("../lib/event"),o=e("../lib/useragent");function a(e){var t=e.editor,i=n.createElement("img");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o.isOpera&&(i.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.addEventListener("mousedown",this.onMouseDown.bind(e));var a,c,l,u,d,h,p,m,f,g,_,b=t.container,v=0;function y(){var e=h;(function(e,i){var n=Date.now(),r=!i||e.row!=i.row,o=!i||e.column!=i.column;!g||r||o?(t.$blockScrolling+=1,t.moveCursorToPosition(e),t.$blockScrolling-=1,g=n,_={x:c,y:l}):s(_.x,_.y,c,l)>5?g=null:n-g>=200&&(t.renderer.scrollCursorIntoView(),g=null)})(h=t.renderer.screenToTextCoordinates(c,l),e),function(e,i){var n=Date.now(),r=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),s={x:{left:c-a.left,right:a.right-c},y:{top:l-a.top,bottom:a.bottom-l}},u=Math.min(s.x.left,s.x.right),d=Math.min(s.y.top,s.y.bottom),h={row:e.row,column:e.column};u/o<=2&&(h.column+=s.x.left<s.x.right?-3:2),d/r<=1&&(h.row+=s.y.top<s.y.bottom?-1:1);var p=e.row!=h.row,m=e.column!=h.column,g=!i||e.row!=i.row;p||m&&!g?f?n-f>=200&&t.renderer.scrollCursorIntoView(h):f=n:f=null}(h,e)}function w(){d=t.selection.toOrientedRange(),a=t.session.addMarker(d,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),y(),u=setInterval(y,20),v=0,r.addListener(document,"mousemove",k)}function x(){clearInterval(u),t.session.removeMarker(a),a=null,t.$blockScrolling+=1,t.selection.fromOrientedRange(d),t.$blockScrolling-=1,t.isFocused()&&!m&&t.renderer.$cursorLayer.setBlinking(!t.getReadOnly()),d=null,h=null,v=0,f=null,g=null,r.removeListener(document,"mousemove",k)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var n=this;return setTimeout((function(){n.startSelect(),n.captureMouse(e)}),0),e.preventDefault()}d=t.getSelectionRange();var r=e.dataTransfer;r.effectAllowed=t.getReadOnly()?"copy":"copyMove",o.isOpera&&(t.container.appendChild(i),i.scrollTop=0),r.setDragImage&&r.setDragImage(i,0,0),o.isOpera&&t.container.removeChild(i),r.clearData(),r.setData("Text",t.session.getTextRange()),m=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,m=!1,this.setState(null),!t.getReadOnly()){var i=e.dataTransfer.dropEffect;p||"move"!=i||t.session.remove(t.getSelectionRange()),t.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&A(e.dataTransfer))return c=e.clientX,l=e.clientY,a||w(),v++,e.dataTransfer.dropEffect=p=C(e),r.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&A(e.dataTransfer))return c=e.clientX,l=e.clientY,a||(w(),v++),null!==N&&(N=null),e.dataTransfer.dropEffect=p=C(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--v<=0&&a)return x(),p=null,r.preventDefault(e)},this.onDrop=function(e){if(h){var i=e.dataTransfer;if(m)switch(p){case"move":d=d.contains(h.row,h.column)?{start:h,end:h}:t.moveText(d,h);break;case"copy":d=t.moveText(d,h,!0)}else{var n=i.getData("Text");d={start:h,end:t.session.insert(h,n)},t.focus(),p=null}return x(),r.preventDefault(e)}},r.addListener(b,"dragstart",this.onDragStart.bind(e)),r.addListener(b,"dragend",this.onDragEnd.bind(e)),r.addListener(b,"dragenter",this.onDragEnter.bind(e)),r.addListener(b,"dragover",this.onDragOver.bind(e)),r.addListener(b,"dragleave",this.onDragLeave.bind(e)),r.addListener(b,"drop",this.onDrop.bind(e));var N=null;function k(){null==N&&(N=setTimeout((function(){null!=N&&a&&x()}),20))}function A(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function C(e){var t=["copy","copymove","all","uninitialized"],i=o.isMac?e.altKey:e.ctrlKey,n="uninitialized";try{n=e.dataTransfer.effectAllowed.toLowerCase()}catch(a){}var r="none";return i&&t.indexOf(n)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(n)>=0?r="move":t.indexOf(n)>=0&&(r="copy"),r}}function s(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,i=e.inSelection(),n=e.getButton();if(1===(e.domEvent.detail||1)&&0===n&&i){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in r&&(r.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(a.prototype),t.DragdropHandler=a})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,i){var n=e("./dom");t.get=function(e,t){var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&t(i.responseText)},i.send(null)},t.loadScript=function(e,t){var i=n.getDocumentHead(),r=document.createElement("script");r.src=e,i.appendChild(r),r.onload=r.onreadystatechange=function(e,i){!i&&r.readyState&&"loaded"!=r.readyState&&"complete"!=r.readyState||(r=r.onload=r.onreadystatechange=null,i||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,i){var n={},r=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(i.length||n){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=o),i=i.slice();for(var a=0;a<i.length&&(i[a](t,this),!t.propagationStopped);a++);return n&&!t.defaultPrevented?n(t,this):void 0}},n._signal=function(e,t){var i=(this._eventRegistry||{})[e];if(i){i=i.slice();for(var n=0;n<i.length;n++)i[n](t,this)}},n.once=function(e,t){var i=this;t&&this.addEventListener(e,(function n(){i.removeEventListener(e,n),t.apply(null,arguments)}))},n.setDefaultHandler=function(e,t){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[e]){var n=i[e],r=i._disabled_[e];r||(i._disabled_[e]=r=[]),r.push(n);var o=r.indexOf(t);-1!=o&&r.splice(o,1)}i[e]=t},n.removeDefaultHandler=function(e,t){var i=this._defaultHandlers;if(i){var n=i._disabled_[e];if(i[e]==t)i[e],n&&this.setDefaultHandler(e,n.pop());else if(n){var r=n.indexOf(t);-1!=r&&n.splice(r,1)}}},n.on=n.addEventListener=function(e,t,i){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];return n||(n=this._eventRegistry[e]=[]),-1==n.indexOf(t)&&n[i?"unshift":"push"](t),t},n.off=n.removeListener=n.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];if(i){var n=i.indexOf(t);-1!==n&&i.splice(n,1)}},n.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=n})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,i){var n=e("./oop"),r=e("./event_emitter").EventEmitter,o={setOptions:function(e){Object.keys(e).forEach((function(t){this.setOption(t,e[t])}),this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach((function(e){t[e]=this.getOption(e)}),this),t},setOption:function(e,t){if(this["$"+e]!==t){var i=this.$options[e];if(!i)return a('misspelled option "'+e+'"');if(i.forwardTo)return this[i.forwardTo]&&this[i.forwardTo].setOption(e,t);i.handlesSet||(this["$"+e]=t),i&&i.set&&i.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:a('misspelled option "'+e+'"')}};function a(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function s(e,t){var i=new Error(e);i.data=t,"object"==typeof console&&console.error&&console.error(i),setTimeout((function(){throw i}))}var c=function(){this.$defaultOptions={}};(function(){n.implement(this,r),this.defineOptions=function(e,t,i){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(i).forEach((function(t){var n=i[t];"string"==typeof n&&(n={forwardTo:n}),n.name||(n.name=t),e.$options[n.name]=n,"initialValue"in n&&(e["$"+n.name]=n.initialValue)})),n.implement(e,o),this},this.resetOptions=function(e){Object.keys(e.$options).forEach((function(t){var i=e.$options[t];"value"in i&&e.setOption(t,i.value)}))},this.setDefaultValue=function(e,t,i){var n=this.$defaultOptions[e]||(this.$defaultOptions[e]={});n[t]&&(n.forwardTo?this.setDefaultValue(n.forwardTo,t,i):n[t].value=i)},this.setDefaultValues=function(e,t){Object.keys(t).forEach((function(i){this.setDefaultValue(e,i,t[i])}),this)},this.warn=a,this.reportError=s}).call(c.prototype),t.AppConfig=c})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],(function(e,t,i){var n=e("./lib/lang");e("./lib/oop");var r=e("./lib/net"),o=e("./lib/app_config").AppConfig;i.exports=t=new o;var a=function(){return this||"undefined"!=typeof window&&window}(),s={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};function c(n){if(a&&a.document){s.packaged=n||e.packaged||i.packaged||a.define&&(void 0).packaged;for(var r,o={},c="",l=document.currentScript||document._currentScript,u=(l&&l.ownerDocument||document).getElementsByTagName("script"),d=0;d<u.length;d++){var h=u[d],p=h.src||h.getAttribute("src");if(p){for(var m=h.attributes,f=0,g=m.length;f<g;f++){var _=m[f];0===_.name.indexOf("data-ace-")&&(o[(r=_.name.replace(/^data-ace-/,""),r.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=_.value)}var b=p.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);b&&(c=b[1])}}for(var v in c&&(o.base=o.base||c,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base,o)void 0!==o[v]&&t.set(v,o[v])}}t.get=function(e){if(!s.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return s[e]},t.set=function(e,t){if(!s.hasOwnProperty(e))throw new Error("Unknown config key: "+e);s[e]=t},t.all=function(){return n.copyObject(s)},t.moduleUrl=function(e,t){if(s.$moduleUrls[e])return s.$moduleUrls[e];var i=e.split("/"),n="snippets"==(t=t||i[i.length-2]||"")?"/":"-",r=i[i.length-1];if("worker"==t&&"-"==n){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");r=r.replace(o,"")}(!r||r==t)&&i.length>1&&(r=i[i.length-2]);var a=s[t+"Path"];return null==a?a=s.basePath:"/"==n&&(t=n=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+n+r+this.get("suffix")},t.setModuleUrl=function(e,t){return s.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(i,n){var o,a;Array.isArray(i)&&(a=i[0],i=i[1]);try{o=e(i)}catch(c){}if(o&&!t.$loading[i])return n&&n(o);if(t.$loading[i]||(t.$loading[i]=[]),t.$loading[i].push(n),!(t.$loading[i].length>1)){var s=function(){e([i],(function(e){t._emit("load.module",{name:i,module:e});var n=t.$loading[i];t.$loading[i]=null,n.forEach((function(t){t&&t(e)}))}))};if(!t.get("packaged"))return s();r.loadScript(t.moduleUrl(i,a),s)}},c(!0),t.init=c})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],(function(e,t,i){var n=e("../lib/event"),r=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,a=e("./default_gutter_handler").GutterHandler,s=e("./mouse_event").MouseEvent,c=e("./dragdrop_handler").DragdropHandler,l=e("../config"),u=function(e){var t=this;this.editor=e,new o(this),new a(this),new c(this);var i=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus()},s=e.renderer.getMouseEventTarget();n.addListener(s,"click",this.onMouseEvent.bind(this,"click")),n.addListener(s,"mousemove",this.onMouseMove.bind(this,"mousemove")),n.addMultiMouseDownListener([s,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),n.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),n.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var l=e.renderer.$gutter;n.addListener(l,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),n.addListener(l,"click",this.onMouseEvent.bind(this,"gutterclick")),n.addListener(l,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),n.addListener(l,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),n.addListener(s,"mousedown",i),n.addListener(l,"mousedown",i),r.isIE&&e.renderer.scrollBarV&&(n.addListener(e.renderer.scrollBarV.element,"mousedown",i),n.addListener(e.renderer.scrollBarH.element,"mousedown",i)),e.on("mousemove",(function(i){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var n=e.renderer.screenToTextCoordinates(i.x,i.y),r=e.session.selection.getRange(),o=e.renderer;!r.isEmpty()&&r.insideStart(n.row,n.column)?o.setCursorStyle("default"):o.setCursorStyle("")}}))};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new s(t,this.editor))},this.onMouseMove=function(e,t){var i=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;i&&i.length&&this.editor._emit(e,new s(t,this.editor))},this.onMouseWheel=function(e,t){var i=new s(t,this.editor);i.speed=2*this.$scrollSpeed,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.onTouchMove=function(e,t){var i=new s(t,this.editor);i.speed=1,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var i=this.editor.renderer;i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=null);var o=this,a=function(e){if(e){if(r.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new s(e,o.editor),o.$mouseMoved=!0}},c=function(e){clearInterval(u),l(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=!0,i.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},l=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout((function(){c(e)}));o.$onCaptureMouseMove=a,o.releaseMouse=n.capture(this.editor.container,a,c);var u=setInterval(l,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&n.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(u.prototype),l.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=u})),ace.define("ace/mouse/fold_handler",["require","exports","module"],(function(e,t,i){t.FoldHandler=function(e){e.on("click",(function(t){var i=t.getDocumentPosition(),n=e.session,r=n.getFoldAt(i.row,i.column,1);r&&(t.getAccelKey()?n.removeFold(r):n.expandFold(r),t.stop())})),e.on("gutterclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var i=t.getDocumentPosition().row,n=e.session;n.foldWidgets&&n.foldWidgets[i]&&e.session.onFoldWidgetClick(i,t),e.isFocused()||e.focus(),t.stop()}})),e.on("gutterdblclick",(function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var i=t.getDocumentPosition().row,n=e.session,r=n.getParentFoldRangeData(i,!0),o=r.range||r.firstRange;if(o){i=o.start.row;var a=n.getFoldAt(i,n.getLine(i).length,1);a?n.removeFold(a):(n.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}}))}})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(e,t,i){var n=e("../lib/keys"),r=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var i=this.$handlers.indexOf(e);-1!=i&&this.$handlers.splice(i,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==i&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map((function(i){return i.getStatusText&&i.getStatusText(t,e)||""})).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,i,n){for(var o,a=!1,s=this.$editor.commands,c=this.$handlers.length;c--&&!((o=this.$handlers[c].handleKeyboard(this.$data,e,t,i,n))&&o.command&&((a="null"==o.command||s.exec(o.command,this.$editor,o.args,n))&&n&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&r.stopEvent(n),a)););return a||-1!=e||(o={command:"insertstring"},a=s.exec("insertstring",this.$editor,t)),a&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),a},this.onCommandKey=function(e,t,i){var r=n.keyCodeToString(i);this.$callKeyboardHandlers(t,r,i,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(e,t,i){var n=0,r=0,o=!1,a=!1,s=!1,c=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],l=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=11,d=18,h=[d,d,d,d,d,d,d,d,d,6,5,6,8,5,d,d,d,d,d,d,d,d,d,d,d,d,d,d,5,5,5,6,8,4,4,u,u,u,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,d,d,d,d,d,d,5,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,9,4,u,u,u,u,4,4,4,4,0,4,4,d,4,4,u,u,2,2,4,0,4,4,4,2,0,4,4,4,4,4],p=[8,8,8,8,8,8,8,8,8,8,8,d,d,d,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,u,u,u,u,u,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8];function m(e,t,i){if(!(r<e))if(1!=e||1!=n||a)for(var o,s,c,l,u=i.length,d=0;d<u;){if(t[d]>=e){for(o=d+1;o<u&&t[o]>=e;)o++;for(s=d,c=o-1;s<c;s++,c--)l=i[s],i[s]=i[c],i[c]=l;d=o}d++}else i.reverse()}function f(e,t,i,r){var c,l,h,p,m=t[r];switch(m){case 0:case 1:o=!1;case 4:case 3:return m;case 2:return o?3:2;case 7:return o=!0,1;case 8:return 4;case 9:return r<1||r+1>=t.length||2!=(c=i[r-1])&&3!=c||2!=(l=t[r+1])&&3!=l?4:(o&&(l=3),l==c?l:4);case 10:return 2==(c=r>0?i[r-1]:5)&&r+1<t.length&&2==t[r+1]?2:4;case u:if(r>0&&2==i[r-1])return 2;if(o)return 4;for(p=r+1,h=t.length;p<h&&t[p]==u;)p++;return p<h&&2==t[p]?2:4;case 12:for(h=t.length,p=r+1;p<h&&12==t[p];)p++;if(p<h){var f=e[r],g=f>=1425&&f<=2303||64286==f;if(c=t[p],g&&(1==c||7==c))return 1}return r<1||5==(c=t[r-1])?4:i[r-1];case 5:return o=!1,a=!0,n;case 6:return s=!0,4;case 13:case 14:case 16:case 17:case 15:o=!1;case d:return 4}}function g(e){var t=e.charCodeAt(0),i=t>>8;return 0==i?t>191?0:h[t]:5==i?/[\u0591-\u05f4]/.test(e)?1:0:6==i?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?u:/[\u06f0-\u06f9]/.test(e)?2:7:32==i&&t<=8287?p[255&t]:254==i&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.DOT="·",t.doBidiReorder=function(e,i,u){if(e.length<2)return{};var h=e.split(""),p=new Array(h.length),_=new Array(h.length),b=[];n=u?1:0,function(e,t,i,u){var d=n?l:c,h=null,p=null,m=null,_=0,b=null,v=-1,y=null,w=null,x=[];if(!u)for(y=0,u=[];y<i;y++)u[y]=g(e[y]);for(r=n,o=!1,a=!1,s=!1,w=0;w<i;w++){if(h=_,x[w]=p=f(e,u,x,w),b=240&(_=d[h][p]),_&=15,t[w]=m=d[_][5],b>0)if(16==b){for(y=v;y<w;y++)t[y]=1;v=-1}else v=-1;if(d[_][6])-1==v&&(v=w);else if(v>-1){for(y=v;y<w;y++)t[y]=m;v=-1}5==u[w]&&(t[w]=0),r|=m}if(s)for(y=0;y<i;y++)if(6==u[y]){t[y]=n;for(var N=y-1;N>=0&&8==u[N];N--)t[N]=n}}(h,b,h.length,i);for(var v=0;v<p.length;p[v]=v,v++);m(2,b,p),m(1,b,p);for(v=0;v<p.length-1;v++)3===i[v]?b[v]=t.AN:1===b[v]&&(i[v]>7&&i[v]<13||4===i[v]||i[v]===d)?b[v]=t.ON_R:v>0&&"ل"===h[v-1]&&/\u0622|\u0623|\u0625|\u0627/.test(h[v])&&(b[v-1]=b[v]=t.R_H,v++);h[h.length-1]===t.DOT&&(b[h.length-1]=t.B);for(v=0;v<p.length;v++)_[v]=b[p[v]];return{logicalFromVisual:p,bidiLevels:_}},t.hasBidiCharacters=function(e,t){for(var i=!1,n=0;n<e.length;n++)t[n]=g(e.charAt(n)),i||1!=t[n]&&7!=t[n]||(i=!0);return i},t.getVisualFromLogicalIdx=function(e,t){for(var i=0;i<t.logicalFromVisual.length;i++)if(t.logicalFromVisual[i]==e)return i;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang","ace/lib/useragent"],(function(e,t,i){var n=e("./lib/bidiutil"),r=e("./lib/lang"),o=e("./lib/useragent"),a=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,s=function(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=n,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.line="",this.wrapIndent=0,this.isLastRow=!1,this.EOF="¶",this.seenBidi=!1};(function(){this.isBidiRow=function(e,t,i){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,i),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&a.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var i=this.session.$getRowCacheIndex(t,this.currentRow);i>=0&&(e=this.session.$docRowCache[i])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var i,n=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(i=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===n;)n=i,e++;return e},this.updateRowLine=function(e,t){if(void 0===e&&(e=this.getDocumentRow()),this.wrapIndent=0,this.isLastRow=e===this.session.getLength()-1,this.line=this.session.getLine(e),this.session.$useWrapMode){var i=this.session.$wrapData[e];i&&(void 0===t&&(t=this.getSplitIndex()),t>0&&i.length?(this.wrapIndent=i.indent,this.line=t<i.length?this.line.substring(i[t-1],i[i.length-1]):this.line.substring(i[i.length-1])):this.line=this.line.substring(0,i[t]))}var o,a=this.session,s=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(e,t){return"\t"===e||a.isFullWidth(e.charCodeAt(0))?(o="\t"===e?a.getScreenTabSize(t+s):2,s+=o-1,r.stringRepeat(n.DOT,o)):e}))},this.updateBidiMap=function(){var e=[],t=this.isLastRow?this.EOF:this.EOL,i=this.line+(this.showInvisibles?t:n.DOT);n.hasBidiCharacters(i,e)?this.bidiMap=n.doBidiReorder(i,e,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(e){if(this.seenBidi&&this.characterWidth!==e.$characterSize.width){var t=this.characterWidth=e.$characterSize.width,i=e.$measureCharWidth("ה");this.charWidths[n.L]=this.charWidths[n.EN]=this.charWidths[n.ON_R]=t,this.charWidths[n.R]=this.charWidths[n.AN]=i,this.charWidths[n.R_H]=o.isChrome?i:.45*i,this.charWidths[n.B]=0,this.currentRow=null}},this.getShowInvisibles=function(){return this.showInvisibles},this.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},this.setEolChar=function(e){this.EOL=e},this.setTextDir=function(e){this.isRtlDir=e},this.getPosLeft=function(e){e-=this.wrapIndent;var t=n.getVisualFromLogicalIdx(e>0?e-1:0,this.bidiMap),i=this.bidiMap.bidiLevels,r=0;0===e&&i[t]%2!=0&&t++;for(var o=0;o<t;o++)r+=this.charWidths[i[o]];return 0!==e&&i[t]%2==0&&(r+=this.charWidths[i[t]]),this.wrapIndent&&(r+=this.wrapIndent*this.charWidths[n.L]),r},this.getSelections=function(e,t){for(var i,r,o=this.bidiMap,a=o.bidiLevels,s=this.wrapIndent*this.charWidths[n.L],c=[],l=Math.min(e,t)-this.wrapIndent,u=Math.max(e,t)-this.wrapIndent,d=!1,h=!1,p=0,m=0;m<a.length;m++)r=o.logicalFromVisual[m],i=a[m],(d=r>=l&&r<u)&&!h?p=s:!d&&h&&c.push({left:p,width:s-p}),s+=this.charWidths[i],h=d;return d&&m===a.length&&c.push({left:p,width:s-p}),c},this.offsetToCol=function(e){var t=0,i=(e=Math.max(e,0),0),r=0,o=this.bidiMap.bidiLevels,a=this.charWidths[o[r]];for(this.wrapIndent&&(e-=this.wrapIndent*this.charWidths[n.L]);e>i+a/2;){if(i+=a,r===o.length-1){a=0;break}a=this.charWidths[o[++r]]}return r>0&&o[r-1]%2!=0&&o[r]%2==0?(e<i&&r--,t=this.bidiMap.logicalFromVisual[r]):r>0&&o[r-1]%2==0&&o[r]%2!=0?t=1+(e>i?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===o.length-1&&0===a&&o[r-1]%2==0||!this.isRtlDir&&0===r&&o[r]%2!=0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&o[r-1]%2!=0&&0!==a&&r--,t=this.bidiMap.logicalFromVisual[r]),t+this.wrapIndent}}).call(s.prototype),t.BidiHandler=s})),ace.define("ace/range",["require","exports","module"],(function(e,t,i){var n=function(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,i=e.end,n=e.start;return 1==(t=this.compare(i.row,i.column))?1==(t=this.compare(n.row,n.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(n.row,n.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var i={row:t+1,column:0};else if(this.end.row<e)i={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)r={row:e,column:0};return n.fromPoints(r||this.start,i||this.end)},this.extend=function(e,t){var i=this.compare(e,t);if(0==i)return this;if(-1==i)var r={row:e,column:t};else var o={row:e,column:t};return n.fromPoints(r||this.start,o||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return n.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new n(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new n(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),i=e.documentToScreenPosition(this.end);return new n(t.row,t.column,i.row,i.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(n.prototype),n.fromPoints=function(e,t){return new n(e.row,e.column,t.row,t.column)},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=n})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,i){var n=e("./lib/oop"),r=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",(function(e){t._emit("changeCursor"),t.$isEmpty||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.selectionAnchor.on("change",(function(){t.$isEmpty||t._emit("changeSelection")}))};(function(){n.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.isEmpty()&&this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(e){if(this.$isEmpty)this.moveCursorTo(this.lead.row,this.lead.column+e);else{var t=this.getSelectionAnchor(),i=this.getSelectionLead(),n=this.isBackwards();n&&0===t.column||this.setSelectionAnchor(t.row,t.column+e),(n||0!==i.column)&&this.$moveSelection((function(){this.moveCursorTo(i.row,i.column+e)}))}},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var i=e||this.lead;e=i.row,t=i.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var i,n="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(n);return r?(n=r.start.row,i=r.end.row):i=n,!0===t?new a(n,0,i,this.session.getLine(i).length):new a(n,0,i+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,i){var n=e.column,r=e.column+t;return i<0&&(n=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(n,r).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var i=this.session.getTabSize();t=this.lead;this.wouldMoveIntoSoftTab(t,i,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,i):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,i=this.session.documentToScreenRow(e,t),n=this.session.screenToDocumentPosition(i,0),r=this.session.getDisplayLine(e,null,n.row,n.column).match(/^\s*/);r[0].length==t||this.session.$useEmacsStyleLineStart||(n.column+=r[0].length),this.moveCursorToPosition(n)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var i=this.session.getLine(t.row);if(t.column==i.length){var n=i.search(/\s+$/);n>0&&(t.column=n)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(n)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(t)),t>=i.length)return this.moveCursorTo(e,i.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(n)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,i=this.lead.column;if(e=this.session.getFoldAt(t,i,-1))this.moveCursorTo(e.start.row,e.start.column);else{var n=this.session.getFoldStringAt(t,i,-1);null==n&&(n=this.doc.getLine(t).substring(0,i));var o=r.stringReverse(n);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(i-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),i<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,i)}},this.$shortWordEndIndex=function(e){var t,i=0,n=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))i=this.session.tokenRe.lastIndex;else{for(;(t=e[i])&&n.test(t);)i++;if(i<1)for(r.lastIndex=0;(t=e[i])&&!r.test(t);)if(r.lastIndex=0,i++,n.test(t)){if(i>2){i--;break}for(;(t=e[i])&&n.test(t);)i++;if(i>2)break}}return r.lastIndex=0,i},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==i.length){var o=this.doc.getLength();do{e++,n=this.doc.getLine(e)}while(e<o&&/^\s*$/.test(n));/^\s+/.test(n)||(n=""),t=0}var a=this.$shortWordEndIndex(n);this.moveCursorTo(e,t+a)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,i=this.lead.column;if(e=this.session.getFoldAt(t,i,-1))return this.moveCursorTo(e.start.row,e.start.column);var n=this.session.getLine(t).substring(0,i);if(0===i){do{t--,n=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(n));i=n.length,/\s+$/.test(n)||(n="")}var o=r.stringReverse(n),a=this.$shortWordEndIndex(o);return this.moveCursorTo(t,i-a)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var i,n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var r=this.session.screenToDocumentPosition(n.row+e,n.column,i);0!==e&&0===t&&r.row===this.lead.row&&r.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[r.row]&&(r.row>0||e>0)&&r.row++,this.moveCursorTo(r.row,r.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,i){var n=this.session.getFoldAt(e,t,1);n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(r.charAt(t))&&r.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,i){var n=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(n.row,n.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var i=this.getCursor();return a.fromPoints(t,i)}catch(n){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var i=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(s.prototype),t.Selection=s})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,i){var n=e("./config"),r=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var i=this.states[t],n=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],c=0;c<i.length;c++){var l=i[c];if(l.defaultToken&&(o.defaultToken=l.defaultToken),l.caseInsensitive&&(a="gi"),null!=l.regex){l.regex instanceof RegExp&&(l.regex=l.regex.toString().slice(1,-1));var u=l.regex,d=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(l.token)?1==l.token.length||1==d?l.token=l.token[0]:d-1!=l.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:l,groupCount:d-1}),l.token=l.token[0]):(l.tokenArray=l.token,l.token=null,l.onMatch=this.$arrayTokens):"function"!=typeof l.token||l.onMatch||(l.onMatch=d>1?this.$applyToken:l.token),d>1&&(/\\\d/.test(l.regex)?u=l.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+r+1)})):(d=1,u=this.removeCapturingGroups(l.regex)),l.splitRegex||"string"==typeof l.token||s.push(l)),o[r]=c,r+=d,n.push(u),l.onMatch||(l.onMatch=null)}}n.length||(o[0]=0,n.push("$")),s.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)}),this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",a)}};(function(){this.$setMaxTokenCount=function(e){r=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),i=this.token.apply(this,t);if("string"==typeof i)return[{type:i,value:e}];for(var n=[],r=0,o=i.length;r<o;r++)t[r]&&(n[n.length]={type:i[r],value:t[r]});return n},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var i=[],n=this.tokenArray,r=0,o=n.length;r<o;r++)t[r+1]&&(i[i.length]={type:n[r],value:t[r+1]});return i},this.removeCapturingGroups=function(e){return e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,(function(e,t){return t?"(?:":e}))},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var i=0,n=!1,r={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(e,t,o,a,s,c){return n?n="]"!=s:s?n=!0:a?(i==r.stack&&(r.end=c+1,r.stack=-1),i--):o&&(i++,1!=o.length&&(r.stack=i,r.start=c)),e})),null!=r.end&&/^\)*$/.test(e.substr(r.end))&&(e=e.substring(0,r.start)+e.substr(r.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var i=t.slice(0);"#tmp"===(t=i[0])&&(i.shift(),t=i.shift())}else i=[];var n=t||"start",o=this.states[n];o||(n="start",o=this.states[n]);var a=this.matchMappings[n],s=this.regExps[n];s.lastIndex=0;for(var c,l=[],u=0,d=0,h={type:null,value:""};c=s.exec(e);){var p=a.defaultToken,m=null,f=c[0],g=s.lastIndex;if(g-f.length>u){var _=e.substring(u,g-f.length);h.type==p?h.value+=_:(h.type&&l.push(h),h={type:p,value:_})}for(var b=0;b<c.length-2;b++)if(void 0!==c[b+1]){p=(m=o[a[b]]).onMatch?m.onMatch(f,n,i,e):m.token,m.next&&(n="string"==typeof m.next?m.next:m.next(n,i),(o=this.states[n])||(this.reportError("state doesn't exist",n),n="start",o=this.states[n]),a=this.matchMappings[n],u=g,(s=this.regExps[n]).lastIndex=g),m.consumeLineEnd&&(u=g);break}if(f)if("string"==typeof p)m&&!1===m.merge||h.type!==p?(h.type&&l.push(h),h={type:p,value:f}):h.value+=f;else if(p){h.type&&l.push(h),h={type:null,value:""};for(b=0;b<p.length;b++)l.push(p[b])}if(u==e.length)break;if(u=g,d++>r){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u<e.length;)h.type&&l.push(h),h={value:e.substring(u,u+=2e3),type:"overflow"};n="start",i=[];break}}return h.type&&l.push(h),i.length>1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:l,state:i.length?i:n}},this.reportError=n.reportError}).call(o.prototype),t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,i){var n=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var i in e){for(var n=e[i],r=0;r<n.length;r++){var o=n[r];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+i]=n}else for(var i in e)this.$rules[i]=e[i]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,i,r,o){var a="function"==typeof e?(new e).getRules():e;if(r)for(var s=0;s<r.length;s++)r[s]=t+r[s];else for(var c in r=[],a)r.push(t+c);if(this.addRules(a,t),i){var l=Array.prototype[o?"push":"unshift"];for(s=0;s<r.length;s++)l.apply(this.$rules[r[s]],n.deepCopy(i))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var i=0,n=this.$rules;Object.keys(n).forEach((function r(o){var a=n[o];a.processed=!0;for(var s=0;s<a.length;s++){var c=a[s],l=null;Array.isArray(c)&&(l=c,c={}),!c.regex&&c.start&&(c.regex=c.start,c.next||(c.next=[]),c.next.push({defaultToken:c.token},{token:c.token+".end",regex:c.end||c.start,next:"pop"}),c.token=c.token+".start",c.push=!0);var u=c.next||c.push;if(u&&Array.isArray(u)){var d=c.stateName;d||("string"!=typeof(d=c.token)&&(d=d[0]||""),n[d]&&(d+=i++)),n[d]=u,c.next=d,r(d)}else"pop"==u&&(c.next=t);if(c.push&&(c.nextState=c.next||c.push,c.next=e,delete c.push),c.rules)for(var h in c.rules)n[h]?n[h].push&&n[h].push.apply(n[h],c.rules[h]):n[h]=c.rules[h];var p="string"==typeof c?c:c.include;if(p&&(l=Array.isArray(p)?p.map((function(e){return n[e]})):n[p]),l){var m=[s,1].concat(l);c.noEscape&&(m=m.filter((function(e){return!e.next}))),a.splice.apply(a,m),s--}c.keywordMap&&(c.token=this.createKeywordMapper(c.keywordMap,c.defaultToken||"text",c.caseInsensitive),delete c.defaultToken)}}),this)},this.createKeywordMapper=function(e,t,i,n){var r=Object.create(null);return Object.keys(e).forEach((function(t){var o=e[t];i&&(o=o.toLowerCase());for(var a=o.split(n||"|"),s=a.length;s--;)r[a[s]]=t})),Object.getPrototypeOf(r)&&(r.__proto__=null),this.$keywordList=Object.keys(r),e=null,i?function(e){return r[e.toLowerCase()]||t}:function(e){return r[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(r.prototype),t.TextHighlightRules=r})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(e,t,i){var n=function(){this.$behaviours={}};(function(){this.add=function(e,t,i){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=i},this.addBehaviours=function(e){for(var t in e)for(var i in e[t])this.add(t,i,e[t][i])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var i=(new e).getBehaviours(t);else i=e.getBehaviours(t);this.addBehaviours(i)},this.getBehaviours=function(e){if(e){for(var t={},i=0;i<e.length;i++)this.$behaviours[e[i]]&&(t[e[i]]=this.$behaviours[e[i]]);return t}return this.$behaviours}}).call(n.prototype),t.Behaviour=n})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(e,t,i){var n=e("./range").Range,r=function(e,t,i){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var n=e.getTokenAt(t,i);this.$tokenIndex=n?n.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,i=e[t].start;if(void 0!==i)return i;for(i=0;t>0;)i+=e[t-=1].value.length;return i},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new n(this.$row,t,this.$row,t+e.value.length)}}).call(r.prototype),t.TokenIterator=r})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,i){var n,r=e("../../lib/oop"),o=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),c=["text","paren.rparen","punctuation.operator"],l=["text","paren.rparen","punctuation.operator","comment"],u={},d={'"':'"',"'":"'"},h=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return n=u[t];n=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(e,t,i,n){var r=e.end.row-e.start.row;return{text:i+t+n,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}},m=function(e){this.add("braces","insertion",(function(t,i,r,o,a){var c=r.getCursorPosition(),l=o.doc.getLine(c.row);if("{"==a){h(r);var u=r.getSelectionRange(),d=o.doc.getTextRange(u);if(""!==d&&"{"!==d&&r.getWrapBehavioursEnabled())return p(u,d,"{","}");if(m.isSaneInsertion(r,o))return/[\]\}\)]/.test(l[c.column])||r.inMultiSelectMode||e&&e.braces?(m.recordAutoInsert(r,o,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(r,o,"{"),{text:"{",selection:[1,1]})}else if("}"==a){if(h(r),"}"==l.substring(c.column,c.column+1))if(null!==o.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&m.isAutoInsertedClosing(c,l,a))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==a||"\r\n"==a){h(r);var f="";if(m.isMaybeInsertedClosing(c,l)&&(f=s.stringRepeat("}",n.maybeInsertedBrackets),m.clearMaybeInsertedClosing()),"}"===l.substring(c.column,c.column+1)){var g=o.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!g)return null;var _=this.$getIndent(o.getLine(g.row))}else{if(!f)return void m.clearMaybeInsertedClosing();_=this.$getIndent(l)}var b=_+o.getTabString();return{text:"\n"+b+"\n"+_+f,selection:[1,b.length,1,b.length]}}m.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,i,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==a){if(h(i),"}"==r.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;n.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,i,n,r){if("("==r){h(i);var o=i.getSelectionRange(),a=n.doc.getTextRange(o);if(""!==a&&i.getWrapBehavioursEnabled())return p(o,a,"(",")");if(m.isSaneInsertion(i,n))return m.recordAutoInsert(i,n,")"),{text:"()",selection:[1,1]}}else if(")"==r){h(i);var s=i.getCursorPosition(),c=n.doc.getLine(s.row);if(")"==c.substring(s.column,s.column+1))if(null!==n.$findOpeningBracket(")",{column:s.column+1,row:s.row})&&m.isAutoInsertedClosing(s,c,r))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,i,n,r){var o=n.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o&&(h(i),")"==n.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("brackets","insertion",(function(e,t,i,n,r){if("["==r){h(i);var o=i.getSelectionRange(),a=n.doc.getTextRange(o);if(""!==a&&i.getWrapBehavioursEnabled())return p(o,a,"[","]");if(m.isSaneInsertion(i,n))return m.recordAutoInsert(i,n,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){h(i);var s=i.getCursorPosition(),c=n.doc.getLine(s.row);if("]"==c.substring(s.column,s.column+1))if(null!==n.$findOpeningBracket("]",{column:s.column+1,row:s.row})&&m.isAutoInsertedClosing(s,c,r))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,i,n,r){var o=n.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o&&(h(i),"]"==n.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("string_dquotes","insertion",(function(e,t,i,n,r){var o=n.$mode.$quotes||d;if(1==r.length&&o[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;h(i);var a=r,s=i.getSelectionRange(),c=n.doc.getTextRange(s);if(!(""===c||1==c.length&&o[c])&&i.getWrapBehavioursEnabled())return p(s,c,a,a);if(!c){var l=i.getCursorPosition(),u=n.doc.getLine(l.row),m=u.substring(l.column-1,l.column),f=u.substring(l.column,l.column+1),g=n.getTokenAt(l.row,l.column),_=n.getTokenAt(l.row,l.column+1);if("\\"==m&&g&&/escape/.test(g.type))return null;var b,v=g&&/string|escape/.test(g.type),y=!_||/string|escape/.test(_.type);if(f==a)(b=v!==y)&&/string\.end/.test(_.type)&&(b=!1);else{if(v&&!y)return null;if(v&&y)return null;var w=n.$mode.tokenRe;w.lastIndex=0;var x=w.test(m);w.lastIndex=0;var N=w.test(m);if(x||N)return null;if(f&&!/[\s;,.})\]\\]/.test(f))return null;b=!0}return{text:b?a+a:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,i,n,r){var o=n.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==o||"'"==o)&&(h(i),n.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==o))return r.end.column++,r}))};m.isSaneInsertion=function(e,t){var i=e.getCursorPosition(),n=new a(t,i.row,i.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",c)){var r=new a(t,i.row,i.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",c))return!1}return n.stepForward(),n.getCurrentTokenRow()!==i.row||this.$matchTokenType(n.getCurrentToken()||"text",l)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,i){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,o,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=r.row,n.autoInsertedLineEnd=i+o.substr(r.column),n.autoInsertedBrackets++},m.recordMaybeInsert=function(e,t,i){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,o)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=r.row,n.maybeInsertedLineStart=o.substr(0,r.column)+i,n.maybeInsertedLineEnd=o.substr(r.column),n.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(e,t,i){return n.autoInsertedBrackets>0&&e.row===n.autoInsertedRow&&i===n.autoInsertedLineEnd[0]&&t.substr(e.column)===n.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(e,t){return n.maybeInsertedBrackets>0&&e.row===n.maybeInsertedRow&&t.substr(e.column)===n.maybeInsertedLineEnd&&t.substr(0,e.column)==n.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},r.inherits(m,o),t.CstyleBehaviour=m})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,i){t.packages={},function(e){var i=/\w{4}/g;for(var n in e)t.packages[n]=e[n].replace(i,"\\u$&")}({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})})),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(e,t,i){var n=e("../tokenizer").Tokenizer,r=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,a=e("../unicode"),s=e("../lib/lang"),c=e("../token_iterator").TokenIterator,l=e("../range").Range,u=function(){this.HighlightRules=r};(function(){this.$defaultBehaviour=new o,this.tokenRe=new RegExp("^["+a.packages.L+a.packages.Mn+a.packages.Mc+a.packages.Nd+a.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+a.packages.L+a.packages.Mn+a.packages.Mc+a.packages.Nd+a.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new n(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,i,n){var r=t.doc,o=!0,a=!0,c=1/0,l=t.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))f=this.lineCommentStart.map(s.escapeRegExp).join("|"),p=this.lineCommentStart[0];else f=s.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart;f=new RegExp("^(\\s*)(?:"+f+") ?"),u=t.getUseSoftTabs();b=function(e,t){var i=e.match(f);if(i){var n=i[1].length,o=i[0].length;h(e,n,o)||" "!=i[0][o-1]||o--,r.removeInLine(t,n,o)}};var d=p+" ",h=(_=function(e,t){o&&!/\S/.test(e)||(h(e,c,c)?r.insertInLine({row:t,column:c},d):r.insertInLine({row:t,column:c},p))},v=function(e,t){return f.test(e)},function(e,t,i){for(var n=0;t--&&" "==e.charAt(t);)n++;if(n%l!=0)return!1;for(n=0;" "==e.charAt(i++);)n++;return l>2?n%l!=l-1:n%l==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,m=this.blockComment.end,f=new RegExp("^(\\s*)(?:"+s.escapeRegExp(p)+")"),g=new RegExp("(?:"+s.escapeRegExp(m)+")\\s*$"),_=function(e,t){v(e,t)||o&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},m),r.insertInLine({row:t,column:c},p))},b=function(e,t){var i;(i=e.match(g))&&r.removeInLine(t,e.length-i[0].length,e.length),(i=e.match(f))&&r.removeInLine(t,i[1].length,i[0].length)},v=function(e,i){if(f.test(e))return!0;for(var n=t.getTokens(i),r=0;r<n.length;r++)if("comment"===n[r].type)return!0}}function y(e){for(var t=i;t<=n;t++)e(r.getLine(t),t)}var w=1/0;y((function(e,t){var i=e.search(/\S/);-1!==i?(i<c&&(c=i),a&&!v(e,t)&&(a=!1)):w>e.length&&(w=e.length)})),c==1/0&&(c=w,o=!1,a=!1),u&&c%l!=0&&(c=Math.floor(c/l)*l),y(a?b:_)},this.toggleBlockComment=function(e,t,i,n){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o=(f=new c(t,n.row,n.column)).getCurrentToken();t.selection;var a,s,u=t.selection.toOrientedRange();if(o&&/comment/.test(o.type)){for(var d,h;o&&/comment/.test(o.type);){if(-1!=(g=o.value.indexOf(r.start))){var p=f.getCurrentTokenRow(),m=f.getCurrentTokenColumn()+g;d=new l(p,m,p,m+r.start.length);break}o=f.stepBackward()}var f;for(o=(f=new c(t,n.row,n.column)).getCurrentToken();o&&/comment/.test(o.type);){var g;if(-1!=(g=o.value.indexOf(r.end))){p=f.getCurrentTokenRow(),m=f.getCurrentTokenColumn()+g;h=new l(p,m,p,m+r.end.length);break}o=f.stepForward()}h&&t.remove(h),d&&(t.remove(d),a=d.start.row,s=-r.start.length)}else s=r.start.length,a=i.start.row,t.insert(i.end,r.end),t.insert(i.start,r.start);u.start.row==a&&(u.start.column+=s),u.end.row==a&&(u.end.column+=s),t.selection.fromOrientedRange(u)}},this.getNextLineIndent=function(e,t,i){return this.$getIndent(t)},this.checkOutdent=function(e,t,i){return!1},this.autoOutdent=function(e,t,i){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);var i=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t<i.length;t++)!function(e){var n=i[t],r=e[n];e[i[t]]=function(){return this.$delegator(n,arguments,r)}}(this)},this.$delegator=function(e,t,i){var n=t[0];"string"!=typeof n&&(n=n[0]);for(var r=0;r<this.$embeds.length;r++)if(this.$modes[this.$embeds[r]]){var o=n.split(this.$embeds[r]);if(!o[0]&&o[1]){t[0]=o[1];var a=this.$modes[this.$embeds[r]];return a[e].apply(a,t)}}var s=i.apply(this,t);return i?s:void 0},this.transformAction=function(e,t,i,n,r){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var a in o)if(o[a][t]){var s=o[a][t].apply(this,arguments);if(s)return s}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,i=[];for(var n in t)for(var r=t[n],o=0,a=r.length;o<a;o++)if("string"==typeof r[o].token)/keyword|support|storage/.test(r[o].token)&&i.push(r[o].regex);else if("object"==typeof r[o].token)for(var s=0,c=r[o].token.length;s<c;s++)if(/keyword|support|storage/.test(r[o].token[s])){n=r[o].regex.match(/\(.+?\)/g)[s];i.push(n.substr(1,n.length-2))}this.completionKeywords=i}return e?i.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,i,n){return(this.$keywordList||this.$createKeywordList()).map((function(e){return{name:e,value:e,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}).call(u.prototype),t.Mode=u})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,i){t.applyDelta=function(e,t,i){var n=t.start.row,r=t.start.column,o=e[n]||"";switch(t.action){case"insert":if(1===t.lines.length)e[n]=o.substring(0,r)+t.lines[0]+o.substring(r);else{var a=[n,1].concat(t.lines);e.splice.apply(e,a),e[n]=o.substring(0,r)+e[n],e[n+t.lines.length-1]+=o.substring(r)}break;case"remove":var s=t.end.column,c=t.end.row;n===c?e[n]=o.substring(0,r)+o.substring(s):e.splice(n,c-n+1,o.substring(0,r)+e[c].substring(s))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,i){var n=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=t.Anchor=function(e,t,i){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===i?this.setPosition(t.row,t.column):this.setPosition(t,i)};(function(){function e(e,t,i){var n=i?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&n}n.implement(this,r),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(t){if(!(t.start.row==t.end.row&&t.start.row!=this.row||t.start.row>this.row)){var i=function(t,i,n){var r="insert"==t.action,o=(r?1:-1)*(t.end.row-t.start.row),a=(r?1:-1)*(t.end.column-t.start.column),s=t.start,c=r?s:t.end;if(e(i,s,n))return{row:i.row,column:i.column};if(e(c,i,!n))return{row:i.row+o,column:i.column+(i.row==c.row?a:0)};return{row:s.row,column:s.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},this.setPosition=function(e,t,i){var n;if(n=i?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=n.row||this.column!=n.column){var r={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:r,value:n})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var i={};return e>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):e<0?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}).call(o.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,i){var n=e("./lib/oop"),r=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=e("./anchor").Anchor,c=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){n.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new s(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var i=t.length-1;e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var i=this.clippedPos(e.row,e.column),n=this.pos(e.row,e.column+t.length);return this.applyDelta({start:i,end:n,action:"insert",lines:[t]},!0),this.clonePos(n)},this.clippedPos=function(e,t){var i=this.getLength();void 0===e?e=i:e<0?e=0:e>=i&&(e=i-1,t=void 0);var n=this.getLine(e);return null==t&&(t=n.length),{row:e,column:t=Math.min(Math.max(t,0),n.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var i=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),i=0):(t=[""].concat(t),e--,i=this.$lines[e].length),this.insertMergedLines({row:e,column:i},t)},this.insertMergedLines=function(e,t){var i=this.clippedPos(e.row,e.column),n={row:i.row+t.length-1,column:(1==t.length?i.column:0)+t[t.length-1].length};return this.applyDelta({start:i,end:n,action:"insert",lines:t}),this.clonePos(n)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),i=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:i,action:"remove",lines:this.getLinesForRange({start:t,end:i})}),this.clonePos(t)},this.removeInLine=function(e,t,i){var n=this.clippedPos(e,t),r=this.clippedPos(e,i);return this.applyDelta({start:n,end:r,action:"remove",lines:this.getLinesForRange({start:n,end:r})},!0),this.clonePos(n)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var i=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,n=t<this.getLength()-1,r=i?e-1:e,o=i?this.getLine(r).length:0,s=n?t+1:t,c=n?0:this.getLine(s).length,l=new a(r,o,s,c),u=this.$lines.slice(e,t+1);return this.applyDelta({start:l.start,end:l.end,action:"remove",lines:this.getLinesForRange(l)}),u},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var i="insert"==e.action;(i?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(i&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),r(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){for(var i=e.lines,n=i.length,r=e.start.row,o=e.start.column,a=0,s=0;;){a=s,s+=t-1;var c=i.slice(a,s);if(s>n){e.lines=c,e.start.row=r+a,e.start.column=o;break}c.push(""),this.applyDelta({start:this.pos(r+a,o),end:this.pos(r+s,o=0),action:e.action,lines:c},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,r=t||0,o=i.length;r<o;r++)if((e-=i[r].length+n)<0)return{row:r,column:e+i[r].length+n};return{row:o-1,column:i[o-1].length}},this.positionToIndex=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,r=0,o=Math.min(e.row,i.length),a=t||0;a<o;++a)r+=i[a].length+n;return r+e.column}}).call(c.prototype),t.Document=c})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,i){var n=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var i=this;this.$worker=function(){if(i.running){for(var e=new Date,t=i.currentLine,n=-1,r=i.doc,o=t;i.lines[t];)t++;var a=r.getLength(),s=0;for(i.running=!1;t<a;){i.$tokenizeRow(t),n=t;do{t++}while(i.lines[t]);if(++s%5==0&&new Date-e>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,-1==n&&(n=t),o<=n&&i.fireUpdateEvent(o,n)}}};(function(){n.implement(this,r),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var i={first:e,last:t};this._signal("update",{data:i})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,i=e.end.row-t;if(0===i)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,i+1,null),this.states.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),i=this.states[e-1],n=this.tokenizer.getLineTokens(t,i,e);return this.states[e]+""!=n.state+""?(this.states[e]=n.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=n.tokens}}).call(o.prototype),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,i){var n=e("./lib/lang");e("./lib/oop");var r=e("./range").Range,o=function(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,o){if(this.regExp)for(var a=o.firstRow,s=o.lastRow,c=a;c<=s;c++){var l=this.cache[c];null==l&&((l=n.getMatchOffsets(i.getLine(c),this.regExp)).length>this.MAX_RANGES&&(l=l.slice(0,this.MAX_RANGES)),l=l.map((function(e){return new r(c,e.offset,c,e.offset+e.length)})),this.cache[c]=l.length?l:"");for(var u=l.length;u--;)t.drawSingleLineMarker(e,l[u].toScreenRange(i),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,i){var n=e("../range").Range;function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var i=t[t.length-1];this.range=new n(t[0].start.row,t[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,i){var n,r,o=0,a=this.folds,s=!0;null==t&&(t=this.end.row,i=this.end.column);for(var c=0;c<a.length;c++){if(-1==(r=(n=a[c]).range.compareStart(t,i)))return void e(null,t,i,o,s);if(!e(null,n.start.row,n.start.column,o,s)&&e(n.placeholder,n.start.row,n.start.column,o)||0===r)return;s=!n.sameRow,o=n.end.column}e(null,t,i,o,s)},this.getNextFoldTo=function(e,t){for(var i,n,r=0;r<this.folds.length;r++){if(-1==(n=(i=this.folds[r]).range.compareEnd(e,t)))return{fold:i,kind:"after"};if(0===n)return{fold:i,kind:"inside"}}return null},this.addRemoveChars=function(e,t,i){var n,r,o=this.getNextFoldTo(e,t);if(o)if(n=o.fold,"inside"==o.kind&&n.start.column!=t&&n.start.row!=e)window.console&&window.console.log(e,t,n);else if(n.start.row==e){var a=(r=this.folds).indexOf(n);for(0===a&&(this.start.column+=i);a<r.length;a++){if((n=r[a]).start.column+=i,!n.sameRow)return;n.end.column+=i}this.end.column+=i}},this.split=function(e,t){var i=this.getNextFoldTo(e,t);if(!i||"inside"==i.kind)return null;var n=i.fold,o=this.folds,a=this.foldData,s=o.indexOf(n),c=o[s-1];this.end.row=c.end.row,this.end.column=c.end.column;var l=new r(a,o=o.splice(s,o.length-s));return a.splice(a.indexOf(this)+1,0,l),l},this.merge=function(e){for(var t=e.folds,i=0;i<t.length;i++)this.addFold(t[i]);var n=this.foldData;n.splice(n.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach((function(t){e.push(" "+t.toString())})),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,i=0;i<this.folds.length;i++){var n=this.folds[i];if((e-=n.start.column-t)<0)return{row:n.start.row,column:n.start.column+e};if((e-=n.placeholder.length)<0)return n.start;t=n.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(r.prototype),t.FoldLine=r})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(e,t,i){var n=e("./range").Range.comparePoints,r=function(){this.ranges=[]};(function(){this.comparePoints=n,this.pointIndex=function(e,t,i){for(var r=this.ranges,o=i||0;o<r.length;o++){var a=r[o],s=n(e,a.end);if(!(s>0)){var c=n(e,a.start);return 0===s?t&&0!==c?-o-2:o:c>0||0===c&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),i=this.pointIndex(e.start,t);i<0&&(i=-i-1);var n=this.pointIndex(e.end,t,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,e)},this.addList=function(e){for(var t=[],i=e.length;i--;)t.push.apply(t,this.add(e[i]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],i=this.ranges,r=(i=i.sort((function(e,t){return n(e.start,t.start)})))[0],o=1;o<i.length;o++){e=r,r=i[o];var a=n(e.end,r.start);a<0||(0!=a||e.isEmpty()||r.isEmpty())&&(n(e.end,r.end)<0&&(e.end.row=r.end.row,e.end.column=r.end.column),i.splice(o,1),t.push(r),r=e,o--)}return this.ranges=i,t},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.row<e)return[];var n=this.pointIndex({row:e,column:0});n<0&&(n=-n-1);var r=this.pointIndex({row:t,column:0},n);r<0&&(r=-r-1);for(var o=[],a=n;a<r;a++)o.push(i[a]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){if("insert"==e.action)var t=e.start,i=e.end;else i=e.start,t=e.end;for(var n=t.row,r=i.row-n,o=-t.column+i.column,a=this.ranges,s=0,c=a.length;s<c;s++){if(!((l=a[s]).end.row<n)){if(l.start.row>n)break;if(l.start.row==n&&l.start.column>=t.column&&(l.start.column==t.column&&this.$insertRight||(l.start.column+=o,l.start.row+=r)),l.end.row==n&&l.end.column>=t.column){if(l.end.column==t.column&&this.$insertRight)continue;l.end.column==t.column&&o>0&&s<c-1&&l.end.column>l.start.column&&l.end.column==a[s+1].start.column&&(l.end.column-=o),l.end.column+=o,l.end.row+=r}}}if(0!=r&&s<c)for(;s<c;s++){var l;(l=a[s]).start.row+=r,l.end.row+=r}}}).call(r.prototype),t.RangeList=r})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],(function(e,t,i){e("../range").Range;var n=e("../range_list").RangeList,r=e("../lib/oop"),o=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};function a(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function s(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}r.inherits(o,n),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach((function(t){t.setFoldLine(e)}))},this.clone=function(){var e=this.range.clone(),t=new o(e,this.placeholder);return this.subFolds.forEach((function(e){t.subFolds.push(e.clone())})),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);var t,i;t=e,i=this.start,a(t.start,i),a(t.end,i);for(var n=e.start.row,r=e.start.column,o=0,s=-1;o<this.subFolds.length&&1==(s=this.subFolds[o].range.compare(n,r));o++);var c=this.subFolds[o];if(0==s)return c.addSubFold(e);n=e.range.end.row,r=e.range.end.column;var l=o;for(s=-1;l<this.subFolds.length&&1==(s=this.subFolds[l].range.compare(n,r));l++);if(this.subFolds[l],0==s)throw new Error("A fold can't intersect already existing fold"+e.range+this.range);return this.subFolds.splice(o,l-o,e),e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return function(e,t){s(e.start,t),s(e.end,t)}(e,this.start)}}.call(o.prototype)})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],(function(e,t,i){var n=e("../range").Range,r=e("./fold_line").FoldLine,o=e("./fold").Fold,a=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,i){var n=this.getFoldLine(e);if(!n)return null;for(var r=n.folds,o=0;o<r.length;o++){var a=r[o];if(a.range.contains(e,t)){if(1==i&&a.range.isEnd(e,t))continue;if(-1==i&&a.range.isStart(e,t))continue;return a}}},this.getFoldsInRange=function(e){var t=e.start,i=e.end,n=this.$foldData,r=[];t.column+=1,i.column-=1;for(var o=0;o<n.length;o++){var a=n[o].range.compareRange(e);if(2!=a){if(-2==a)break;for(var s=n[o].folds,c=0;c<s.length;c++){var l=s[c];if(-2==(a=l.range.compareRange(e)))break;if(2!=a){if(42==a)break;r.push(l)}}}}return t.column-=1,i.column+=1,r},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach((function(e){t=t.concat(this.getFoldsInRange(e))}),this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,i=0;i<t.length;i++)for(var n=0;n<t[i].folds.length;n++)e.push(t[i].folds[n]);return e},this.getFoldStringAt=function(e,t,i,n){if(!(n=n||this.getFoldLine(e)))return null;for(var r,o,a={end:{column:0}},s=0;s<n.folds.length;s++){var c=(o=n.folds[s]).range.compareEnd(e,t);if(-1==c){r=this.getLine(o.start.row).substring(a.end.column,o.start.column);break}if(0===c)return null;a=o}return r||(r=this.getLine(o.start.row).substring(a.end.column)),-1==i?r.substring(0,t-a.end.column):1==i?r.substring(t-a.end.column):r},this.getFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0);n<i.length;n++){var r=i[n];if(r.start.row<=e&&r.end.row>=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0);n<i.length;n++){var r=i[n];if(r.end.row>=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,r=0;r<i.length;r++){var o=i[r],a=o.end.row,s=o.start.row;if(a>=t){s<t&&(s>=e?n-=t-s:n=0);break}a>=e&&(n-=s>=e?a-s:a-e+1)}return n},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var i,n=this.$foldData,a=!1;e instanceof o?i=e:(i=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(i.range);var s=i.start.row,c=i.start.column,l=i.end.row,u=i.end.column;if(!(s<l||s==l&&c<=u-2))throw new Error("The range has to be at least 2 characters width");var d=this.getFoldAt(s,c,1),h=this.getFoldAt(l,u,-1);if(d&&h==d)return d.addSubFold(i);d&&!d.range.isStart(s,c)&&this.removeFold(d),h&&!h.range.isEnd(l,u)&&this.removeFold(h);var p=this.getFoldsInRange(i.range);p.length>0&&(this.removeFolds(p),p.forEach((function(e){i.addSubFold(e)})));for(var m=0;m<n.length;m++){var f=n[m];if(l==f.start.row){f.addFold(i),a=!0;break}if(s==f.end.row){if(f.addFold(i),a=!0,!i.sameRow){var g=n[m+1];if(g&&g.start.row==l){f.merge(g);break}}break}if(l<=f.start.row)break}return a||(f=this.$addFoldLine(new r(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(f.start.row,f.start.row):this.$updateRowLengthCache(f.start.row,f.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i},this.addFolds=function(e){e.forEach((function(e){this.addFold(e)}),this)},this.removeFold=function(e){var t=e.foldLine,i=t.start.row,n=t.end.row,r=this.$foldData,o=t.folds;if(1==o.length)r.splice(r.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var a=t.split(e.start.row,e.start.column);(o=a.folds).shift(),a.start.row=o[0].start.row,a.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(i,n):this.$updateRowLengthCache(i,n)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);t.forEach((function(e){this.removeFold(e)}),this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach((function(t){e.restoreRange(t),this.addFold(t)}),this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var i,r;if(null==e?(i=new n(0,0,this.getLength(),0),t=!0):i="number"==typeof e?new n(e,0,e,this.getLine(e).length):"row"in e?n.fromPoints(e,e):e,r=this.getFoldsInRangeList(i),t)this.removeFolds(r);else for(var o=r;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(i);if(r.length)return r},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var i=this.getFoldLine(e,t);return i?i.end.row:e},this.getRowFoldStart=function(e,t){var i=this.getFoldLine(e,t);return i?i.start.row:e},this.getFoldDisplayLine=function(e,t,i,n,r){null==n&&(n=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==i&&(i=this.getLine(t).length);var o=this.doc,a="";return e.walk((function(e,t,i,s){if(!(t<n)){if(t==n){if(i<r)return;s=Math.max(r,s)}a+=null!=e?e:o.getLine(t).substring(s,i)}}),t,i),a},this.getDisplayLine=function(e,t,i,n){var r,o=this.getFoldLine(e);return o?this.getFoldDisplayLine(o,e,t,i,n):(r=this.doc.getLine(e)).substring(n||0,t||r.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map((function(t){var i=t.folds.map((function(e){return e.clone()}));return new r(e,i)}))},this.toggleFold=function(e){var t,i,n=this.selection.getRange();if(n.isEmpty()){var r=n.start;if(t=this.getFoldAt(r.row,r.column))return void this.expandFold(t);(i=this.findMatchingBracket(r))?1==n.comparePoint(i)?n.end=i:(n.start=i,n.start.column++,n.end.column--):(i=this.findMatchingBracket({row:r.row,column:r.column+1}))?(1==n.comparePoint(i)?n.end=i:n.start=i,n.start.column++):n=this.getCommentFoldRange(r.row,r.column)||n}else{var o=this.getFoldsInRange(n);if(e&&o.length)return void this.expandFolds(o);1==o.length&&(t=o[0])}if(t||(t=this.getFoldAt(n.start.row,n.start.column)),t&&t.range.toString()==n.toString())this.expandFold(t);else{var a="...";if(!n.isMultiLine()){if((a=this.getTextRange(n)).length<4)return;a=a.trim().substring(0,2)+".."}this.addFold(a,n)}},this.getCommentFoldRange=function(e,t,i){var r=new a(this,e,t),o=r.getCurrentToken(),s=o.type;if(o&&/^comment|string/.test(s)){"comment"==(s=s.match(/comment|string/)[0])&&(s+="|doc-start");var c=new RegExp(s),l=new n;if(1!=i){do{o=r.stepBackward()}while(o&&c.test(o.type));r.stepForward()}if(l.start.row=r.getCurrentTokenRow(),l.start.column=r.getCurrentTokenColumn()+2,r=new a(this,e,t),-1!=i){var u=-1;do{if(o=r.stepForward(),-1==u){var d=this.getState(r.$row);c.test(d)||(u=r.$row)}else if(r.$row>u)break}while(o&&c.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return l.end.row=r.getCurrentTokenRow(),l.end.column=r.getCurrentTokenColumn()+o.value.length-2,l}},this.foldAll=function(e,t,i){null==i&&(i=1e5);var n=this.foldWidgets;if(n){t=t||this.getLength();for(var r=e=e||0;r<t;r++)if(null==n[r]&&(n[r]=this.getFoldWidget(r)),"start"==n[r]){var o=this.getFoldWidgetRange(r);if(o&&o.isMultiLine()&&o.end.row<=t&&o.start.row>=e){r=o.end.row;try{var a=this.addFold("...",o);a&&(a.collapseChildren=i)}catch(s){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var i=this.foldWidgets;if(!i||t&&i[e])return{};for(var n,r=e-1;r>=0;){var o=i[r];if(null==o&&(o=i[r]=this.getFoldWidget(r)),"start"==o){var a=this.getFoldWidgetRange(r);if(n||(n=a),a&&a.end.row>=e)break}r--}return{range:-1!==r&&a,firstRange:n}},this.onFoldWidgetClick=function(e,t){var i={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,i)){var n=t.target||t.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var i=this.getFoldWidget(e),n=this.getLine(e),r="end"===i?-1:1,o=this.getFoldAt(e,-1===r?0:n.length,r);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(o=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var c=s.range.start.row+1,l=s.range.end.row;this.foldAll(c,l,t.all?1e4:0)}else t.children?(l=a?a.end.row:this.getLength(),this.foldAll(e+1,l,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var i=this.$toggleFoldWidget(t,{});if(!i){var n=this.getParentFoldRangeData(t,!0);if(i=n.range||n.firstRange){t=i.start.row;var r=this.getFoldAt(t,this.getLine(t).length,1);r?this.removeFold(r):this.addFold("...",i)}}},this.updateFoldWidgets=function(e){var t=e.start.row,i=e.end.row-t;if(0===i)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,i){var n=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var i=t||this.getLine(e.row).charAt(e.column-1);if(""==i)return null;var n=i.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e):null},this.getBracketRange=function(e){var t,i=this.getLine(e.row),n=!0,o=i.charAt(e.column-1),a=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(a||(o=i.charAt(e.column),e={row:e.row,column:e.column+1},a=o&&o.match(/([\(\[\{])|([\)\]\}])/),n=!1),!a)return null;if(a[1]){if(!(s=this.$findClosingBracket(a[1],e)))return null;t=r.fromPoints(e,s),n||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s;if(!(s=this.$findOpeningBracket(a[2],e)))return null;t=r.fromPoints(s,e),n||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,i){var r=this.$brackets[e],o=1,a=new n(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){i||(i=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var c=t.column-a.getCurrentTokenColumn()-2,l=s.value;;){for(;c>=0;){var u=l.charAt(c);if(u==r){if(0==(o-=1))return{row:a.getCurrentTokenRow(),column:c+a.getCurrentTokenColumn()}}else u==e&&(o+=1);c-=1}do{s=a.stepBackward()}while(s&&!i.test(s.type));if(null==s)break;c=(l=s.value).length-1}return null}},this.$findClosingBracket=function(e,t,i){var r=this.$brackets[e],o=1,a=new n(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){i||(i=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var c=t.column-a.getCurrentTokenColumn();;){for(var l=s.value,u=l.length;c<u;){var d=l.charAt(c);if(d==r){if(0==(o-=1))return{row:a.getCurrentTokenRow(),column:c+a.getCurrentTokenColumn()}}else d==e&&(o+=1);c+=1}do{s=a.stepForward()}while(s&&!i.test(s.type));if(null==s)break;c=0}return null}}}})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(e,t,i){var n=e("./lib/oop"),r=e("./lib/lang"),o=e("./bidihandler").BidiHandler,a=e("./config"),s=e("./lib/event_emitter").EventEmitter,c=e("./selection").Selection,l=e("./mode/text").Mode,u=e("./range").Range,d=e("./document").Document,h=e("./background_tokenizer").BackgroundTokenizer,p=e("./search_highlight").SearchHighlight,m=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++m.$uid,this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new d(e)),this.$bidiHandler=new o(this),this.setDocument(e),this.selection=new c(this),a.resetOptions(this),this.setMode(t),a._signal("session",this)};m.$uid=0,function(){n.implement(this,s),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,i=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>i&&(this.$docRowCache.splice(i,t),this.$screenRowCache.splice(i,t))},this.$getRowCacheIndex=function(e,t){for(var i=0,n=e.length-1;i<=n;){var r=i+n>>1,o=e[r];if(t>o)i=r+1;else{if(!(t<o))return r;n=r-1}}return i-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);this.$fromUndo||!this.$undoManager||e.ignore||(this.$deltasDoc.push(e),t&&0!=t.length&&this.$deltasFold.push({action:"removeFolds",folds:t}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var i,n=this.bgTokenizer.getTokens(e),r=0;if(null==t){var o=n.length-1;r=this.getLine(e).length}else for(o=0;o<n.length&&!((r+=n[o].value.length)>=t);o++);return(i=n[o])?(i.index=o,i.start=r-i.value.length,i):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,i,n){var r=this.$markerId++,o={range:e,type:i||"line",renderer:"function"==typeof i?i:null,clazz:t,inFront:!!n,id:r};return n?(this.$frontMarkers[r]=o,this._signal("changeFrontMarker")):(this.$backMarkers[r]=o,this._signal("changeBackMarker")),r},this.addDynamicMarker=function(e,t){if(e.update){var i=this.$markerId++;return e.id=i,e.inFront=!!t,t?(this.$frontMarkers[i]=e,this._signal("changeFrontMarker")):(this.$backMarkers[i]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(t){var i=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete i[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new p(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,i,n){"number"!=typeof t&&(i=t,t=e),i||(i="ace_step");var r=new u(e,0,t,1/0);return r.id=this.addMarker(r,i,"fullLine",n),r},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getWordRange=function(e,t){var i=this.getLine(e),n=!1;if(t>0&&(n=!!i.charAt(t-1).match(this.tokenRe)),n||(n=!!i.charAt(t).match(this.tokenRe)),n)var r=this.tokenRe;else if(/^\s+$/.test(i.slice(t-1,t+1)))r=/\s/;else r=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&i.charAt(o).match(r));o++}for(var a=t;a<i.length&&i.charAt(a).match(r);)a++;return new u(e,o,e,a)},this.getAWordRange=function(e,t){for(var i=this.getWordRange(e,t),n=this.getLine(i.end.row);n.charAt(i.end.column).match(/[ \t]/);)i.end.column+=1;return i},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var i=e,n=i.path}else n=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[n]&&!i)return this.$onChangeMode(this.$modes[n]),void(t&&t());this.$modeId=n,a.loadModule(["mode",n],function(e){if(this.$modeId!==n)return t&&t();this.$modes[n]&&!i?this.$onChangeMode(this.$modes[n]):e&&e.Mode&&(e=new e.Mode(i),i||(this.$modes[n]=e,e.$id=n),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var i=e.getTokenizer();if(void 0!==i.addEventListener){var n=this.onReloadTokenizer.bind(this);i.addEventListener("update",n)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(i);else{this.bgTokenizer=new h(i);var r=this;this.bgTokenizer.addEventListener("update",(function(e){r._signal("tokenizerUpdate",e)}))}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){a.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach((function(t){t&&t.screenWidth>e&&(e=t.screenWidth)})),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,r=0,o=this.$foldData[r],a=o?o.start.row:1/0,s=t.length,c=0;c<s;c++){if(c>a){if((c=o.end.row+1)>=s)break;a=(o=this.$foldData[r++])?o.start.row:1/0}null==i[c]&&(i[c]=this.$getStringScreenWidth(t[c])[0]),i[c]>n&&(n=i[c])}this.screenWidth=n}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=e.length-1;-1!=n;n--){var r=e[n];"doc"==r.group?(this.doc.revertDeltas(r.deltas),i=this.$getUndoSelection(r.deltas,!0,i)):r.deltas.forEach((function(e){this.addFolds(e.folds)}),this)}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=0;n<e.length;n++){var r=e[n];"doc"==r.group&&(this.doc.applyDeltas(r.deltas),i=this.$getUndoSelection(r.deltas,!1,i))}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,i){function n(e){return t?"insert"!==e.action:"insert"===e.action}var r,o,a=e[0];r=n(a)?u.fromPoints(a.start,a.end):u.fromPoints(a.start,a.start);for(var s=1;s<e.length;s++)n(a=e[s])?(o=a.start,-1==r.compare(o.row,o.column)&&r.setStart(o),o=a.end,1==r.compare(o.row,o.column)&&r.setEnd(o)):(o=a.start,-1==r.compare(o.row,o.column)&&(r=u.fromPoints(a.start,a.start)));if(null!=i){0===u.comparePoints(i.start,r.start)&&(i.start.column+=r.end.column-r.start.column,i.end.column+=r.end.column-r.start.column);var c=i.compareRange(r);1==c?r.setStart(i.start):-1==c&&r.setEnd(i.end)}return r},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,i){var n=this.getTextRange(e),r=this.getFoldsInRange(e),o=u.fromPoints(t,t);if(!i){this.remove(e);var a=e.start.row-e.end.row;(l=a?-e.end.column:e.start.column-e.end.column)&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=l),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=l)),a&&o.start.row>=e.end.row&&(o.start.row+=a,o.end.row+=a)}if(o.end=this.insert(o.start,n),r.length){var s=e.start,c=o.start,l=(a=c.row-s.row,c.column-s.column);this.addFolds(r.map((function(e){return(e=e.clone()).start.row==s.row&&(e.start.column+=l),e.end.row==s.row&&(e.end.column+=l),e.start.row+=a,e.end.row+=a,e})))}return o},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.doc.insertInLine({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new u(0,0,0,0),n=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);i.start.row=r,i.end.row=r;for(var a=0;a<n&&" "==o.charAt(a);++a);a<n&&"\t"==o.charAt(a)?(i.start.column=a,i.end.column=a+1):(i.start.column=0,i.end.column=a),this.remove(i)}},this.$moveLines=function(e,t,i){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),i<0){if((r=this.getRowFoldStart(e+i))<0)return 0;var n=r-e}else if(i>0){var r;if((r=this.getRowFoldEnd(t+i))>this.doc.getLength()-1)return 0;n=r-t}else{e=this.$clipRowToDocument(e);n=(t=this.$clipRowToDocument(t))-e+1}var o=new u(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=n,e.end.row+=n,e})),s=0==i?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+n,s),a.length&&this.addFolds(a),n},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var i=this.doc.getLength();e>=i?(e=i-1,t=this.doc.getLine(i-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var i=this.$wrapLimitRange;i.max<0&&(i={min:t,max:t});var n=this.$constrainWrapLimit(e,i.min,i.max);return n!=this.$wrapLimit&&n>1&&(this.$wrapLimit=n,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,i){return t&&(e=Math.max(t,e)),i&&(e=Math.min(i,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,i=e.action,n=e.start,r=e.end,o=n.row,a=r.row,s=a-o,c=null;if(this.$updating=!0,0!=s)if("remove"===i){this[t?"$wrapData":"$rowLengthCache"].splice(o,s);var l=this.$foldData;c=this.getFoldsInRange(e),this.removeFolds(c);var u=0;if(f=this.getFoldLine(r.row)){f.addRemoveChars(r.row,r.column,n.column-r.column),f.shiftRow(-s);var d=this.getFoldLine(o);d&&d!==f&&(d.merge(f),f=d),u=l.indexOf(f)+1}for(;u<l.length;u++){(f=l[u]).start.row>=r.row&&f.shiftRow(-s)}a=o}else{var h=Array(s);h.unshift(o,0);var p=t?this.$wrapData:this.$rowLengthCache;p.splice.apply(p,h);l=this.$foldData,u=0;if(f=this.getFoldLine(o)){var m=f.range.compareInside(n.row,n.column);0==m?(f=f.split(n.row,n.column))&&(f.shiftRow(s),f.addRemoveChars(a,0,r.column-n.column)):-1==m&&(f.addRemoveChars(o,0,r.column-n.column),f.shiftRow(s)),u=l.indexOf(f)+1}for(;u<l.length;u++){var f;(f=l[u]).start.row>=o&&f.shiftRow(s)}}else s=Math.abs(e.start.column-e.end.column),"remove"===i&&(c=this.getFoldsInRange(e),this.removeFolds(c),s=-s),(f=this.getFoldLine(o))&&f.addRemoveChars(o,n.column,s);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,a):this.$updateRowLengthCache(o,a),c},this.$updateRowLengthCache=function(e,t,i){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(i,n){var r,o,a=this.doc.getAllLines(),s=this.getTabSize(),c=this.$wrapData,l=this.$wrapLimit,u=i;for(n=Math.min(n,a.length-1);u<=n;)(o=this.getFoldLine(u,o))?(r=[],o.walk(function(i,n,o,s){var c;if(null!=i){(c=this.$getDisplayTokens(i,r.length))[0]=e;for(var l=1;l<c.length;l++)c[l]=t}else c=this.$getDisplayTokens(a[n].substring(s,o),r.length);r=r.concat(c)}.bind(this),o.end.row,a[o.end.row].length+1),c[o.start.row]=this.$computeWrapSplits(r,l,s),u=o.end.row+1):(r=this.$getDisplayTokens(a[u]),c[u]=this.$computeWrapSplits(r,l,s),u++)};var e=3,t=4;function i(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(i,n,r){if(0==i.length)return[];var o=[],a=i.length,s=0,c=0,l=this.$wrapAsCode,u=this.$indentedSoftWrap,d=n<=Math.max(2*r,8)||!1===u?0:Math.floor(n/2);function h(e){var t=i.slice(s,e),n=t.length;t.join("").replace(/12/g,(function(){n-=1})).replace(/2/g,(function(){n-=1})),o.length||(p=function(){var e=0;if(0===d)return e;if(u)for(var t=0;t<i.length;t++){var n=i[t];if(10==n)e+=1;else{if(11!=n){if(12==n)continue;break}e+=r}}return l&&!1!==u&&(e+=r),Math.min(e,d)}(),o.indent=p),c+=n,o.push(c),s=e}for(var p=0;a-s>n-p;){var m=s+n-p;if(i[m-1]>=10&&i[m]>=10)h(m);else if(i[m]!=e&&i[m]!=t){for(var f=Math.max(m-(n-(n>>2)),s-1);m>f&&i[m]<e;)m--;if(l){for(;m>f&&i[m]<e;)m--;for(;m>f&&9==i[m];)m--}else for(;m>f&&i[m]<10;)m--;m>f?h(++m):(2==i[m=s+n]&&m--,h(m-p))}else{for(;m!=s-1&&i[m]!=e;m--);if(m>s){h(m);continue}for(m=s+n;m<i.length&&i[m]==t;m++);if(m==i.length)break;h(m)}}return o},this.$getDisplayTokens=function(e,t){var n,r=[];t=t||0;for(var o=0;o<e.length;o++){var a=e.charCodeAt(o);if(9==a){n=this.getScreenTabSize(r.length+t),r.push(11);for(var s=1;s<n;s++)r.push(12)}else 32==a?r.push(10):a>39&&a<48||a>57&&a<64?r.push(9):a>=4352&&i(a)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var r,o;for(null==t&&(t=1/0),n=n||0,o=0;o<e.length&&(9==(r=e.charCodeAt(o))?n+=this.getScreenTabSize(n):r>=4352&&i(r)?n+=2:n+=1,!(n>t));o++);return[n,o]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),i=this.$wrapData[t.row];return i.length&&i[0]<t.column?i.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var i=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(i)},this.getDocumentLastRowColumnPosition=function(e,t){var i=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(i,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t,i){if(e<0)return{row:0,column:0};var n,r,o=0,a=0,s=0,c=0,l=this.$screenRowCache,u=this.$getRowCacheIndex(l,e),d=l.length;if(d&&u>=0){s=l[u],o=this.$docRowCache[u];var h=e>l[d-1]}else h=!d;for(var p=this.getLength()-1,m=this.getNextFoldLine(o),f=m?m.start.row:1/0;s<=e&&!(s+(c=this.getRowLength(o))>e||o>=p);)s+=c,++o>f&&(o=m.end.row+1,f=(m=this.getNextFoldLine(o,m))?m.start.row:1/0),h&&(this.$docRowCache.push(o),this.$screenRowCache.push(s));if(m&&m.start.row<=o)n=this.getFoldDisplayLine(m),o=m.start.row;else{if(s+c<=e||o>p)return{row:p,column:this.getLine(p).length};n=this.getLine(o),m=null}var g=0,_=Math.floor(e-s);if(this.$useWrapMode){var b=this.$wrapData[o];b&&(r=b[_],_>0&&b.length&&(g=b.indent,a=b[_-1]||b[b.length-1],n=n.substring(a)))}return void 0!==i&&this.$bidiHandler.isBidiRow(s+_,o,_)&&(t=this.$bidiHandler.offsetToCol(i)),a+=this.$getStringScreenWidth(n,t-g)[1],this.$useWrapMode&&a>=r&&(a=r-1),m?m.idxToPosition(a):{row:o,column:a}},this.documentToScreenPosition=function(e,t){if(void 0===t)var i=this.$clipPositionToDocument(e.row,e.column);else i=this.$clipPositionToDocument(e,t);e=i.row,t=i.column;var n,r=0,o=null;(n=this.getFoldAt(e,t,1))&&(e=n.start.row,t=n.start.column);var a,s=0,c=this.$docRowCache,l=this.$getRowCacheIndex(c,e),u=c.length;if(u&&l>=0){s=c[l],r=this.$screenRowCache[l];var d=e>c[u-1]}else d=!u;for(var h=this.getNextFoldLine(s),p=h?h.start.row:1/0;s<e;){if(s>=p){if((a=h.end.row+1)>e)break;p=(h=this.getNextFoldLine(a,h))?h.start.row:1/0}else a=s+1;r+=this.getRowLength(s),s=a,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(r))}var m="";h&&s>=p?(m=this.getFoldDisplayLine(h,e,t),o=h.start.row):(m=this.getLine(e).substring(0,t),o=e);var f=0;if(this.$useWrapMode){var g=this.$wrapData[o];if(g){for(var _=0;m.length>=g[_];)r++,_++;m=m.substring(g[_-1]||0,m.length),f=_>0?g.indent:0}}return{row:r,column:f+this.$getStringScreenWidth(m)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var i=this.$wrapData.length,n=0,r=(s=0,(t=this.$foldData[s++])?t.start.row:1/0);n<i;){var o=this.$wrapData[n];e+=o?o.length+1:1,++n>r&&(n=t.end.row+1,r=(t=this.$foldData[s++])?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,s=0;s<a.length;s++)e-=(t=a[s]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,i,n){if(0===i)return[0,0];var r,o;for(i||(i=1/0),n=n||0,o=0;o<t.length&&!((n+="\t"===(r=t.charAt(o))?this.getScreenTabSize(n):e.getCharacterWidth(r))>i);o++);return[n,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()},this.isFullWidth=i}.call(m.prototype),e("./edit_session/folding").Folding.call(m.prototype),e("./edit_session/bracket_match").BracketMatch.call(m.prototype),a.defineOptions(m.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),t.EditSession=m})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,i){var n=e("./lib/lang"),r=e("./lib/oop"),o=e("./range").Range,a=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return n.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,i=this.$matchIterator(e,t);if(!i)return!1;var n=null;return i.forEach((function(e,i,r,a){return n=new o(e,i,r,a),!(i==a&&t.start&&t.start.start&&0!=t.skipCurrent&&n.isEqual(t.start))||(n=null,!1)})),n},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var i=t.range,r=i?e.getLines(i.start.row,i.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var c,l=s.length,u=r.length-l;e:for(var d=s.offset||0;d<=u;d++){for(var h=0;h<l;h++)if(-1==r[d+h].search(s[h]))continue e;var p=r[d],m=r[d+l-1],f=p.length-p.match(s[0])[0].length,g=m.match(s[l-1])[0].length;c&&c.end.row===d&&c.end.column>f||(a.push(c=new o(d,f,d+l-1,g)),l>2&&(d=d+l-2))}}else for(var _=0;_<r.length;_++){var b=n.getMatchOffsets(r[_],s);for(h=0;h<b.length;h++){var v=b[h];a.push(new o(_,v.offset,_,v.offset+v.length))}}if(i){var y=i.start.column,w=i.start.column;for(_=0,h=a.length-1;_<h&&a[_].start.column<y&&a[_].start.row==i.start.row;)_++;for(;_<h&&a[h].end.column>w&&a[h].end.row==i.end.row;)h--;for(a=a.slice(_,h+1),_=0,h=a.length;_<h;_++)a[_].start.row+=i.start.row,a[_].end.row+=i.start.row}return a},this.replace=function(e,t){var i=this.$options,n=this.$assembleRegExp(i);if(i.$isMultiLine)return t;if(n){var r=n.exec(e);if(!r||r[0].length!=e.length)return null;if(t=e.replace(n,t),i.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var a=e[o];a&&a.toLowerCase()!=a?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var i=e.needle;if(!e.needle)return e.re=!1;e.regExp||(i=n.escapeRegExp(i)),e.wholeWord&&(i=function(e,t){function i(e){return/\w/.test(e)||t.regExp?"\\b":""}return i(e[0])+e+i(e[e.length-1])}(i,e));var r=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(i),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(i,r);try{var o=new RegExp(i,r)}catch(a){o=!1}return e.re=o},this.$assembleMultilineRegExp=function(e,t){for(var i=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),n=[],r=0;r<i.length;r++)try{n.push(new RegExp(i[r],t))}catch(o){return!1}return n},this.$matchIterator=function(e,t){var i=this.$assembleRegExp(t);if(!i)return!1;var n=1==t.backwards,r=0!=t.skipCurrent,o=t.range,a=t.start;a||(a=o?o[n?"end":"start"]:e.selection.getRange()),a.start&&(a=a[r!=n?"end":"start"]);var s=o?o.start.row:0,c=o?o.end.row:e.getLength()-1;if(n)var l=function(e){var i=a.row;if(!d(i,a.column,e)){for(i--;i>=s;i--)if(d(i,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(i=c,s=a.row;i>=s;i--)if(d(i,Number.MAX_VALUE,e))return}};else l=function(e){var i=a.row;if(!d(i,a.column,e)){for(i+=1;i<=c;i++)if(d(i,0,e))return;if(0!=t.wrap)for(i=s,c=a.row;i<=c;i++)if(d(i,0,e))return}};if(t.$isMultiLine)var u=i.length,d=function(t,r,o){var a=n?t-u+1:t;if(!(a<0)){var s=e.getLine(a),c=s.search(i[0]);if(!(!n&&c<r||-1===c)){for(var l=1;l<u;l++)if(-1==(s=e.getLine(a+l)).search(i[l]))return;var d=s.match(i[u-1])[0].length;if(!(n&&d>r))return!!o(a,c,a+u-1,d)||void 0}}};else if(n)d=function(t,n,r){var o,a=e.getLine(t),s=[],c=0;for(i.lastIndex=0;o=i.exec(a);){var l=o[0].length;if(c=o.index,!l){if(c>=a.length)break;i.lastIndex=c+=1}if(o.index+l>n)break;s.push(o.index,l)}for(var u=s.length-1;u>=0;u-=2){var d=s[u-1];if(r(t,d,t,d+(l=s[u])))return!0}};else d=function(t,n,r){var o,a=e.getLine(t),s=n;for(i.lastIndex=n;o=i.exec(a);){var c=o[0].length;if(r(t,s=o.index,t,s+c))return!0;if(!c&&(i.lastIndex=s+=1,s>=a.length))return!1}};return{forEach:l}}}).call(a.prototype),t.Search=a})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,i){var n=e("../lib/keys"),r=e("../lib/useragent"),o=n.KEY_MODS;function a(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function s(e,t){a.call(this,e,t),this.$singleCommand=!1}s.prototype=a.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var i=e&&("string"==typeof e?e:e.name);e=this.commands[i],t||delete this.commands[i];var n=this.commandKeyBinding;for(var r in n){var o=n[r];if(o==e)delete n[r];else if(Array.isArray(o)){var a=o.indexOf(e);-1!=a&&(o.splice(a,1),1==o.length&&(n[r]=o[0]))}}},this.bindKey=function(e,t,i){if("object"==typeof e&&e&&(null==i&&(i=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var n="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach((function(e){var t=this.parseKeys(e),i=o[t.hashId]+t.key;n+=(n?" ":"")+i,this._addCommandToBinding(n,"chainKeys")}),this),n+=" "}var a=this.parseKeys(e),s=o[a.hashId]+a.key;this._addCommandToBinding(n+s,t,i)}),this)},this._addCommandToBinding=function(t,i,n){var r,o=this.commandKeyBinding;if(i)if(!o[t]||this.$singleCommand)o[t]=i;else{Array.isArray(o[t])?-1!=(r=o[t].indexOf(i))&&o[t].splice(r,1):o[t]=[o[t]],"number"!=typeof n&&(n=e(i));var a=o[t];for(r=0;r<a.length;r++){if(e(a[r])>n)break}a.splice(r,0,i)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var i=e[t];if(i){if("string"==typeof i)return this.bindKey(i,t);"function"==typeof i&&(i={exec:i}),"object"==typeof i&&(i.name||(i.name=t),this.addCommand(i))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),i=t.pop(),r=n[i];if(n.FUNCTION_KEYS[r])i=n.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:i,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:i.toUpperCase(),hashId:-1}}for(var o=0,a=t.length;a--;){var s=n.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;o|=s}return{key:i,hashId:o}},this.findKeyCommand=function(e,t){var i=o[e]+t;return this.commandKeyBinding[i]},this.handleKeyboard=function(e,t,i,n){if(!(n<0)){var r=o[t]+i,a=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,a=this.commandKeyBinding[e.$keyChain]||a),!a||"chainKeys"!=a&&"chainKeys"!=a[a.length-1]?(e.$keyChain&&(t&&4!=t||1!=i.length?(-1==t||n>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:a}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(a.prototype),t.HashHandler=a,t.MultiHashHandler=s})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,i){var n=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,a=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",(function(e){return e.command.exec(e.editor,e.args||{})}))};n.inherits(a,r),function(){n.implement(this,o),this.exec=function(e,t,i){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,i))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(e.isAvailable&&!e.isAvailable(t))return!1;var r={editor:t,command:e,args:i};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))}}.call(a.prototype),t.CommandManager=a})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,i){var n=e("../lib/lang"),r=e("../config"),o=e("../range").Range;function a(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:a("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",bindKey:a("Alt-E","F4"),exec:function(e){r.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:a("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:a(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:a("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:a("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:a("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:a("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:a("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:a("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:a("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:a("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:a("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:a("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:a("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:a("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:a("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:a("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:a(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:a(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:a("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:a("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:a("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:a("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:a("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:a("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:a("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:a("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:a("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:a("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(n.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:a(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:a(null,null),exec:function(e){for(var t=e.selection.isBackwards(),i=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(i.row).length,s=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,c=e.session.doc.getLine(i.row),l=i.row+1;l<=r.row+1;l++){var u=n.stringTrimLeft(n.stringTrimRight(e.session.doc.getLine(l)));0!==u.length&&(u=" "+u),c+=u}r.row+1<e.session.doc.getLength()-1&&(c+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new o(i.row,0,r.row+2,0),c),s>0?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+s)):(a=e.session.doc.getLine(i.row).length>a?a+1:a,e.selection.moveCursorTo(i.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:a(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,r=[];n.length<1&&(n=[e.selection.getRange()]);for(var a=0;a<n.length;a++)a==n.length-1&&(n[a].end.row===t&&n[a].end.column===i||r.push(new o(n[a].end.row,n[a].end.column,t,i))),0===a?0===n[a].start.row&&0===n[a].start.column||r.push(new o(0,0,n[a].start.row,n[a].start.column)):r.push(new o(n[a-1].end.row,n[a-1].end.column,n[a].start.row,n[a].start.column));e.exitMultiSelectMode(),e.clearSelection();for(a=0;a<r.length;a++)e.selection.addRange(r[a],!1)},readOnly:!0,scrollIntoView:"none"}]})),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"],(function(e,t,i){e("./lib/fixoldbrowsers");var n=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/lang"),a=e("./lib/useragent"),s=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,l=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,h=e("./search").Search,p=e("./range").Range,m=e("./lib/event_emitter").EventEmitter,f=e("./commands/command_manager").CommandManager,g=e("./commands/default_commands").commands,_=e("./config"),b=e("./token_iterator").TokenIterator,v=function(e,t){var i=e.getContainerElement();this.container=i,this.renderer=e,this.id="editor"+ ++v.$uid,this.commands=new f(a.isMac?"mac":"win",g),"object"==typeof document&&(this.textInput=new s(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new l(this)),this.keyBinding=new u(this),this.$blockScrolling=0,this.$search=(new h).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(t||new d("")),_.resetOptions(this),_._signal("editor",this)};v.$uid=0,function(){n.implement(this,m),this.$initOperationListeners=function(){this.selections=[],this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=o.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.command.name&&void 0!==this.curOp.command.scrollIntoView&&this.$blockScrolling++},this.endOperation=function(e){if(this.curOp){if(e&&!1===e.returnValue)return this.curOp=null;this._signal("beforeEndOperation");var t=this.curOp.command;t.name&&this.$blockScrolling>0&&this.$blockScrolling--;var i=t&&t.scrollIntoView;if(i){switch(i){case"center-animate":i="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var n=this.selection.getRange(),r=this.renderer.layerConfig;(n.start.row>=r.lastRow||n.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==i&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else n=n&&-1!==i.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(n=!1),n?this.session.mergeUndoDeltas=!0:-1!==i.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var i=this;_.loadModule(["keybinding",e],(function(n){i.$keybindingId==e&&i.keyBinding.setKeyboardHandler(n&&n.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var i=this.session.getSelection();i.off("changeCursor",this.$onCursorChange),i.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=t.findMatchingBracket(e.getCursorPosition());if(i)var n=new p(i.row,i.column,i.row,i.column+1);else if(t.$mode.getMatching)n=t.$mode.getMatching(e.session);n&&(t.$bracketHighlight=t.addMarker(n,"ace_bracket","text"))}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout((function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=e.getCursorPosition(),n=new b(e.session,i.row,i.column),r=n.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==r.type.indexOf("tag-open")||(r=n.stepForward())){var o=r.value,a=0,s=n.stepBackward();if("<"==s.value)do{s=r,(r=n.stepForward())&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===s.value?a++:"</"===s.value&&a--)}while(r&&a>=0);else{do{r=s,s=n.stepBackward(),r&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===s.value?a++:"</"===s.value&&a--)}while(s&&a<=0);n.stepForward()}if(!r)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var c=n.getCurrentTokenRow(),l=n.getCurrentTokenColumn(),u=new p(c,l,c,l+r.value.length),d=t.$backMarkers[t.$tagHighlight];t.$tagHighlight&&null!=d&&0!==u.compareRange(d.range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),u&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(u,"ace_bracket","text"))}}}),50)}},this.focus=function(){var e=this;setTimeout((function(){e.textInput.focus()})),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,i=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,i,t),this._signal("change",e),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||(_.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var i=new p(e.row,e.column,e.row,1/0);i.id=t.addMarker(i,"ace_active-line","screenLine"),t.$highlightLineMarker=i}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var i=this.selection.getRange(),n=this.getSelectionStyle();t.$selectionMarker=t.addMarker(i,"ace_selection",n)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var i=t.start.column-1,n=t.end.column+1,r=e.getLine(t.start.row),o=r.length,a=r.substring(Math.max(i,0),Math.min(n,o));if(!(i>=0&&/^[\w\d]/.test(a)||n<=o&&/[\w\d]$/.test(a)))if(a=r.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(a))return this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:a})}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var i={text:e,event:t};this.commands.exec("paste",this,i)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var i=t.split(/\r\n|\r|\n/),n=this.selection.rangeList.ranges;if(i.length>n.length||i.length<2||!i[1])return this.commands.exec("insertstring",this,t);for(var r=n.length;r--;){var o=n[r];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,i[r])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var i=this.session,n=i.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=n.transformAction(i.getState(r.row),"insertion",this,i,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){(a=new p.fromPoints(r,r)).end.column+=e.length,this.session.remove(a)}}else{var a=this.getSelectionRange();r=this.session.remove(a),this.clearSelection()}if("\n"==e||"\r\n"==e){var s=i.getLine(r.row);if(r.column>s.search(/\S|$/)){var c=s.substr(r.column).search(/\S|$/);i.doc.removeInLine(r.row,r.column,r.column+c)}}this.clearSelection();var l=r.column,u=i.getState(r.row),d=(s=i.getLine(r.row),n.checkOutdent(u,s,e));if(i.insert(r,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new p(r.row,l+o.selection[0],r.row,l+o.selection[1])):this.selection.setSelectionRange(new p(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),i.getDocument().isNewLine(e)){var h=n.getNextLineIndent(u,s.slice(0,r.column),i.getTabString());i.insert({row:r.row+1,column:0},h)}d&&n.autoOutdent(u,i,r.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,i){this.keyBinding.onCommandKey(e,t,i)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var i=this.session,n=i.getState(t.start.row),r=i.getMode().transformAction(n,"deletion",this,i,t);if(0===t.end.column){var o=i.getTextRange(t);if("\n"==o[o.length-1]){var a=i.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}r&&(t=r)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var i,n,r=this.session.getLine(e.row);t<r.length?(i=r.charAt(t)+r.charAt(t-1),n=new p(e.row,t-1,e.row,t+1)):(i=r.charAt(t-1)+r.charAt(t-2),n=new p(e.row,t-2,e.row,t)),this.session.replace(n,i),this.session.selection.moveToPosition(n.end)}}},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),i=this.session.getTextRange(t);this.session.replace(t,i.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),i=this.session.getTextRange(t);this.session.replace(t,i.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var i=e.getTextRange(t);if(!/^\s+$/.test(i)){u=this.$getSelectedRows();return void e.indentRows(u.first,u.last,"\t")}}var n=e.getLine(t.start.row),r=t.start,a=e.getTabSize(),s=e.documentToScreenColumn(r.row,r.column);if(this.session.getUseSoftTabs())var c=a-s%a,l=o.stringRepeat(" ",c);else{for(c=s%a;" "==n[t.start.column-1]&&c;)t.start.column--,c--;this.selection.setSelectionRange(t),l="\t"}return this.insert(l)}var u=this.$getSelectedRows();e.indentRows(u.first,u.last,"\t")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,i=[],n=e.first;n<=e.last;n++)i.push(t.getLine(n));i.sort((function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0}));var r=new p(0,0,0,0);for(n=e.first;n<=e.last;n++){var o=t.getLine(n);r.start.row=n,r.end.row=n,r.end.column=o.length,t.replace(r,i[n-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g;i.lastIndex=0;for(var n=this.session.getLine(e);i.lastIndex<t;){var r=i.exec(n);if(r.index<=t&&r.index+r[0].length>=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,i=this.selection.getCursor().column,n=new p(t,i-1,t,i),r=this.session.getTextRange(n);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(t,i);if(o){var a=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,s=o.start+o.value.length-a,c=parseFloat(o.value);c*=Math.pow(10,s),a!==o.end&&i<a?e*=Math.pow(10,o.end-i-1):e*=Math.pow(10,o.end-i),c+=e;var l=(c/=Math.pow(10,s)).toFixed(s),u=new p(t,o.start,t,o.end);this.session.replace(u,l),this.moveCursorTo(t,Math.max(o.start+1,i+l.length-o.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,i=e.getRange(),n=e.isBackwards();if(i.isEmpty()){var r=i.start.row;t.duplicateLines(r,r)}else{var o=n?i.start:i.end,a=t.insert(o,t.getTextRange(i),!1);i.start=o,i.end=a,e.setSelectionRange(i,n)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,i){return this.session.moveText(e,t,i)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var i,n,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var o=r.toOrientedRange();i=this.$getSelectedRows(o),n=this.session.$moveLines(i.first,i.last,t?0:e),t&&-1==e&&(n=0),o.moveBy(n,0),r.fromOrientedRange(o)}else{var a=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var s=0,c=0,l=a.length,u=0;u<l;u++){var d=u;a[u].moveBy(s,0);for(var h=(i=this.$getSelectedRows(a[u])).first,p=i.last;++u<l;){c&&a[u].moveBy(c,0);var m=this.$getSelectedRows(a[u]);if(t&&m.first!=p)break;if(!t&&m.first>p+1)break;p=m.last}for(u--,s=this.session.$moveLines(h,p,t?0:e),t&&-1==e&&(d=u+1);d<=u;)a[d].moveBy(s,0),d++;t||(s=0),c+=s}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var i=this.renderer,n=this.renderer.layerConfig,r=e*Math.floor(n.height/n.lineHeight);this.$blockScrolling++,!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection()),this.$blockScrolling--;var o=i.scrollTop;i.scrollBy(0,r*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,i,n){this.renderer.scrollToLine(e,t,i,n)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var i=this.getCursorPosition(),n=new b(this.session,i.row,i.column),r=n.getCurrentToken(),o=r||n.stepForward();if(o){var a,s,c=!1,l={},u=i.column-o.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;u<o.value.length&&!c;u++)if(d[o.value[u]])switch(s=d[o.value[u]]+"."+o.type.replace("rparen","lparen"),isNaN(l[s])&&(l[s]=0),o.value[u]){case"(":case"[":case"{":l[s]++;break;case")":case"]":case"}":l[s]--,-1===l[s]&&(a="bracket",c=!0)}}else o&&-1!==o.type.indexOf("tag-name")&&(isNaN(l[o.value])&&(l[o.value]=0),"<"===r.value?l[o.value]++:"</"===r.value&&l[o.value]--,-1===l[o.value]&&(a="tag",c=!0));c||(r=o,o=n.stepForward(),u=0)}while(o&&!c);if(a){var h,m;if("bracket"===a)(h=this.session.getBracketRange(i))||(m=(h=new p(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+u-1,n.getCurrentTokenRow(),n.getCurrentTokenColumn()+u-1)).start,(t||m.row===i.row&&Math.abs(m.column-i.column)<2)&&(h=this.session.getBracketRange(m)));else if("tag"===a){if(!o||-1===o.type.indexOf("tag-name"))return;var f=o.value;if(0===(h=new p(n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2,n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2)).compare(i.row,i.column)){c=!1;do{o=r,(r=n.stepBackward())&&(-1!==r.type.indexOf("tag-close")&&h.setEnd(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1),o.value===f&&-1!==o.type.indexOf("tag-name")&&("<"===r.value?l[f]++:"</"===r.value&&l[f]--,0===l[f]&&(c=!0)))}while(r&&!c)}o&&o.type.indexOf("tag-name")&&(m=h.start).row==i.row&&Math.abs(m.column-i.column)<2&&(m=h.end)}(m=h&&h.cursor||m)&&(e?h&&t?this.selection.setRange(h):h&&h.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(m.row,m.column):this.selection.moveTo(m.row,m.column))}}},this.gotoLine=function(e,t,i){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,i)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var i=this.$search.find(this.session),n=0;return i?(this.$tryReplace(i,e)&&(n=1),null!==i&&(this.selection.setSelectionRange(i),this.renderer.scrollSelectionIntoView(i.start,i.end)),n):n},this.replaceAll=function(e,t){t&&this.$search.set(t);var i=this.$search.findAll(this.session),n=0;if(!i.length)return n;this.$blockScrolling+=1;var r=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=i.length-1;o>=0;--o)this.$tryReplace(i[o],e)&&n++;return this.selection.setSelectionRange(r),this.$blockScrolling-=1,n},this.$tryReplace=function(e,t){var i=this.session.getTextRange(e);return null!==(t=this.$search.replace(i,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,i){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&n.mixin(t,e);var r=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(r)||this.$search.$options.needle)||(r=this.session.getWordRange(r.start.row,r.start.column),e=this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,i),o):(t.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var i=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(i)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,i=this,n=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var o=this.on("changeSelection",(function(){n=!0})),a=this.renderer.on("beforeRender",(function(){n&&(t=i.renderer.container.getBoundingClientRect())})),s=this.renderer.on("afterRender",(function(){if(n&&t&&(i.isFocused()||i.searchBox&&i.searchBox.isFocused())){var e=i.renderer,o=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=o.top-a.offset;null!=(n=o.top>=0&&s+t.top<0||!(o.top<a.height&&o.top+t.top+a.lineHeight>window.innerHeight)&&null)&&(r.style.top=s+"px",r.style.left=o.left+"px",r.style.height=a.lineHeight+"px",r.scrollIntoView(n)),n=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",s),this.renderer.off("beforeRender",a))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,r.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}.call(v.prototype),_.defineOptions(v.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=v})),ace.define("ace/undomanager",["require","exports","module"],(function(e,t,i){var n=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function i(e,t){for(var i=new Array(e.length),n=0;n<e.length;n++){for(var r=e[n],o={group:r.group,deltas:new Array(r.length)},a=0;a<r.deltas.length;a++){var s=r.deltas[a];o.deltas[a]=t(s)}i[n]=o}return i}this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),i=null;return t&&(i=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),i},this.redo=function(e){var t=this.$redoStack.pop(),i=null;return t&&(i=this.$doc.redoChanges(this.$deserializeDeltas(t),e),this.$undoStack.push(t),this.dirtyCounter++),i},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(t){return i(t,e)},this.$deserializeDeltas=function(e){return i(e,t)}}).call(n.prototype),t.UndoManager=n})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],(function(e,t,i){var n=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/lang"),a=e("../lib/event_emitter").EventEmitter,s=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){r.implement(this,a),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var i=e[t],n=i.row,r=this.$annotations[n];r||(r=this.$annotations[n]={text:[]});var a=i.text;a=a?o.escapeHTML(a):i.html||"",-1===r.text.indexOf(a)&&r.text.push(a);var s=i.type;"error"==s?r.className=" ace_error":"warning"==s&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=s||r.className||(r.className=" ace_info")}},this.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,i=e.end.row-t;if(0===i);else if("remove"==e.action)this.$annotations.splice(t,i+1,null);else{var n=new Array(i+1);n.unshift(t,1),this.$annotations.splice.apply(this.$annotations,n)}}},this.update=function(e){for(var t=this.session,i=e.firstRow,r=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),o=t.getNextFoldLine(i),a=o?o.start.row:1/0,s=this.$showFoldWidgets&&t.foldWidgets,c=t.$breakpoints,l=t.$decorations,u=t.$firstLineNumber,d=0,h=t.gutterRenderer||this.$renderer,p=null,m=-1,f=i;;){if(f>a&&(f=o.end.row+1,a=(o=t.getNextFoldLine(f,o))?o.start.row:1/0),f>r){for(;this.$cells.length>m+1;)p=this.$cells.pop(),this.element.removeChild(p.element);break}(p=this.$cells[++m])||((p={element:null,textNode:null,foldWidget:null}).element=n.createElement("div"),p.textNode=document.createTextNode(""),p.element.appendChild(p.textNode),this.element.appendChild(p.element),this.$cells[m]=p);var g="ace_gutter-cell ";if(c[f]&&(g+=c[f]),l[f]&&(g+=l[f]),this.$annotations[f]&&(g+=this.$annotations[f].className),p.element.className!=g&&(p.element.className=g),(b=t.getRowLength(f)*e.lineHeight+"px")!=p.element.style.height&&(p.element.style.height=b),s){var _=s[f];null==_&&(_=s[f]=t.getFoldWidget(f))}if(_){p.foldWidget||(p.foldWidget=n.createElement("span"),p.element.appendChild(p.foldWidget));g="ace_fold-widget ace_"+_;"start"==_&&f==a&&f<o.end.row?g+=" ace_closed":g+=" ace_open",p.foldWidget.className!=g&&(p.foldWidget.className=g);var b=e.lineHeight+"px";p.foldWidget.style.height!=b&&(p.foldWidget.style.height=b)}else p.foldWidget&&(p.element.removeChild(p.foldWidget),p.foldWidget=null);var v=d=h?h.getText(t,f):f+u;v!==p.textNode.data&&(p.textNode.data=v),f++}this.element.style.height=e.minHeight+"px",(this.$fixedWidth||t.$useWrapMode)&&(d=t.getLength()+u);var y=h?h.getWidth(t,d,e):d.toString().length*e.characterWidth,w=this.$padding||this.$computePadding();(y+=w.left+w.right)===this.gutterWidth||isNaN(y)||(this.gutterWidth=y,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",y))},this.$fixedWidth=!1,this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return""},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?n.addCssClass(this.element,"ace_folding-enabled"):n.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=n.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(e.paddingLeft)+1||0,this.$padding.right=parseInt(e.paddingRight)||0,this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),i=this.element.getBoundingClientRect();return e.x<t.left+i.left?"markers":this.$showFoldWidgets&&e.x>i.right-t.right?"foldWidgets":void 0}}).call(s.prototype),t.Gutter=s})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,i){var n=e("../range").Range,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){if(e){this.config=e;var t=[];for(var i in this.markers){var n=this.markers[i];if(n.range){var r=n.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),n.renderer){var o=this.$getTop(r.start.row,e),a=this.$padding+(this.session.$bidiHandler.isBidiRow(r.start.row)?this.session.$bidiHandler.getPosLeft(r.start.column):r.start.column*e.characterWidth);n.renderer(t,r,a,o,e)}else"fullLine"==n.type?this.drawFullLineMarker(t,r,n.clazz,e):"screenLine"==n.type?this.drawScreenLineMarker(t,r,n.clazz,e):r.isMultiLine()?"text"==n.type?this.drawTextMarker(t,r,n.clazz,e):this.drawMultiLineMarker(t,r,n.clazz,e):this.session.$bidiHandler.isBidiRow(r.start.row)?this.drawBidiSingleLineMarker(t,r,n.clazz+" ace_start ace_br15",e):this.drawSingleLineMarker(t,r,n.clazz+" ace_start ace_br15",e)}else n.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,i,r,o){for(var a=this.session,s=t.start.row,c=t.end.row,l=s,u=0,d=0,h=a.getScreenLastRowColumn(l),p=null,m=new n(l,t.start.column,l,d);l<=c;l++)m.start.row=m.end.row=l,m.start.column=l==s?t.start.column:a.getRowWrapIndent(l),m.end.column=h,u=d,d=h,h=l+1<c?a.getScreenLastRowColumn(l+1):l==c?0:t.end.column,p=i+(l==s?" ace_start":"")+" ace_br"+((l==s||l==s+1&&t.start.column?1:0)|(u<d?2:0)|(d>h?4:0)|(l==c?8:0)),this.session.$bidiHandler.isBidiRow(l)?this.drawBidiSingleLineMarker(e,m,p,r,l==c?0:1,o):this.drawSingleLineMarker(e,m,p,r,l==c?0:1,o)},this.drawMultiLineMarker=function(e,t,i,n,r){var o,a,s,c=this.$padding;(r=r||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((l=t.clone()).end.row=l.start.row,l.end.column=this.session.getLine(l.start.row).length,this.drawBidiSingleLineMarker(e,l,i+" ace_br1 ace_start",n,null,r)):(o=n.lineHeight,a=this.$getTop(t.start.row,n),s=c+t.start.column*n.characterWidth,e.push("<div class='",i," ace_br1 ace_start' style='","height:",o,"px;","right:0;","top:",a,"px;","left:",s,"px;",r,"'></div>"));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var l;(l=t.clone()).start.row=l.end.row,l.start.column=0,this.drawBidiSingleLineMarker(e,l,i+" ace_br12",n,null,r)}else{var u=t.end.column*n.characterWidth;o=n.lineHeight,a=this.$getTop(t.end.row,n),e.push("<div class='",i," ace_br12' style='","height:",o,"px;","width:",u,"px;","top:",a,"px;","left:",c,"px;",r,"'></div>")}if(!((o=(t.end.row-t.start.row-1)*n.lineHeight)<=0)){a=this.$getTop(t.start.row+1,n);var d=(t.start.column?1:0)|(t.end.column?0:8);e.push("<div class='",i,d?" ace_br"+d:"","' style='","height:",o,"px;","right:0;","top:",a,"px;","left:",c,"px;",r,"'></div>")}},this.drawSingleLineMarker=function(e,t,i,n,r,o){var a=n.lineHeight,s=(t.end.column+(r||0)-t.start.column)*n.characterWidth,c=this.$getTop(t.start.row,n),l=this.$padding+t.start.column*n.characterWidth;e.push("<div class='",i,"' style='","height:",a,"px;","width:",s,"px;","top:",c,"px;","left:",l,"px;",o||"","'></div>")},this.drawBidiSingleLineMarker=function(e,t,i,n,r,o){var a=n.lineHeight,s=this.$getTop(t.start.row,n),c=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(t){e.push("<div class='",i,"' style='","height:",a,"px;","width:",t.width+(r||0),"px;","top:",s,"px;","left:",c+t.left,"px;",o||"","'></div>")}))},this.drawFullLineMarker=function(e,t,i,n,r){var o=this.$getTop(t.start.row,n),a=n.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,n)-o),e.push("<div class='",i,"' style='","height:",a,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")},this.drawScreenLineMarker=function(e,t,i,n,r){var o=this.$getTop(t.start.row,n),a=n.lineHeight;e.push("<div class='",i,"' style='","height:",a,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")}}).call(o.prototype),t.Marker=o})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,i){var n=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang");e("../lib/useragent");var a=e("../lib/event_emitter").EventEmitter,s=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){n.implement(this,a),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],i=1;i<e+1;i++)this.showInvisibles?t.push("<span class='ace_invisible ace_invisible_tab'>"+o.stringRepeat(this.TAB_CHAR,i)+"</span>"):t.push(o.stringRepeat(" ",i));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var n="ace_indent-guide",r="",a="";if(this.showInvisibles){n+=" ace_invisible",r=" ace_invisible_space",a=" ace_invisible_tab";var s=o.stringRepeat(this.SPACE_CHAR,this.tabSize),c=o.stringRepeat(this.TAB_CHAR,this.tabSize)}else c=s=o.stringRepeat(" ",this.tabSize);this.$tabStrings[" "]="<span class='"+n+r+"'>"+s+"</span>",this.$tabStrings["\t"]="<span class='"+n+a+"'>"+c+"</span>"}},this.updateLines=function(e,t,i){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var n=Math.max(t,e.firstRow),r=Math.min(i,e.lastRow),o=this.element.childNodes,a=0,s=e.firstRow;s<n;s++){if(c=this.session.getFoldLine(s)){if(c.containsRow(n)){n=c.start.row;break}s=c.end.row}a++}s=n;for(var c,l=(c=this.session.getNextFoldLine(s))?c.start.row:1/0;s>l&&(s=c.end.row+1,l=(c=this.session.getNextFoldLine(s,c))?c.start.row:1/0),!(s>r);){var u=o[a++];if(u){var d=[];this.$renderLine(d,s,!this.$useLineGroups(),s==l&&c),u.style.height=e.lineHeight*this.session.getRowLength(s)+"px",u.innerHTML=d.join("")}s++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var i=this.element;if(t.firstRow<e.firstRow)for(var n=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);n>0;n--)i.removeChild(i.firstChild);if(t.lastRow>e.lastRow)for(n=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);n>0;n--)i.removeChild(i.lastChild);if(e.firstRow<t.firstRow){var r=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r)}if(e.lastRow>t.lastRow){r=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);i.appendChild(r)}},this.$renderLinesFragment=function(e,t,i){for(var n=this.element.ownerDocument.createDocumentFragment(),o=t,a=this.session.getNextFoldLine(o),s=a?a.start.row:1/0;o>s&&(o=a.end.row+1,s=(a=this.session.getNextFoldLine(o,a))?a.start.row:1/0),!(o>i);){var c=r.createElement("div"),l=[];if(this.$renderLine(l,o,!1,o==s&&a),c.innerHTML=l.join(""),this.$useLineGroups())c.className="ace_line_group",n.appendChild(c),c.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;c.firstChild;)n.appendChild(c.firstChild);o++}return n},this.update=function(e){this.config=e;for(var t=[],i=e.firstRow,n=e.lastRow,r=i,o=this.session.getNextFoldLine(r),a=o?o.start.row:1/0;r>a&&(r=o.end.row+1,a=(o=this.session.getNextFoldLine(r,o))?o.start.row:1/0),!(r>n);)this.$useLineGroups()&&t.push("<div class='ace_line_group' style='height:",e.lineHeight*this.session.getRowLength(r),"px'>"),this.$renderLine(t,r,!1,r==a&&o),this.$useLineGroups()&&t.push("</div>"),r++;this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,i,n){var r=this,a=n.replace(/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,(function(e,i,n,a,s){if(i)return r.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+o.stringRepeat(r.SPACE_CHAR,e.length)+"</span>":e;if("&"==e)return"&#38;";if("<"==e)return"&#60;";if(">"==e)return"&#62;";if("\t"==e){var c=r.session.getScreenTabSize(t+a);return t+=c-1,r.$tabStrings[c]}if(" "==e){var l=r.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u=r.showInvisibles?r.SPACE_CHAR:"";return t+=1,"<span class='"+l+"' style='width:"+2*r.config.characterWidth+"px'>"+u+"</span>"}return n?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+r.SPACE_CHAR+"</span>":(t+=1,"<span class='ace_cjk' style='width:"+2*r.config.characterWidth+"px'>"+e+"</span>")}));if(this.$textToken[i.type])e.push(a);else{var s="ace_"+i.type.replace(/\./g," ace_"),c="";"fold"==i.type&&(c=" style='width:"+i.value.length*this.config.characterWidth+"px;' "),e.push("<span class='",s,"'",c,">",a,"</span>")}return t+n.length},this.renderIndentGuide=function(e,t,i){var n=t.search(this.$indentGuideRe);return n<=0||n>=i?t:" "==t[0]?(n-=n%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],n/this.tabSize)),t.substr(n)):"\t"==t[0]?(e.push(o.stringRepeat(this.$tabStrings["\t"],n)),t.substr(n)):t},this.$renderWrappedLine=function(e,t,i,n){for(var r=0,a=0,s=i[0],c=0,l=0;l<t.length;l++){var u=t[l],d=u.value;if(0==l&&this.displayIndentGuides){if(r=d.length,!(d=this.renderIndentGuide(e,d,s)))continue;r-=d.length}if(r+d.length<s)c=this.$renderToken(e,c,u,d),r+=d.length;else{for(;r+d.length>=s;)c=this.$renderToken(e,c,u,d.substring(0,s-r)),d=d.substring(s-r),r=s,n||e.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),e.push(o.stringRepeat(" ",i.indent)),c=0,s=i[++a]||Number.MAX_VALUE;0!=d.length&&(r+=d.length,c=this.$renderToken(e,c,u,d))}}},this.$renderSimpleLine=function(e,t){var i=0,n=t[0],r=n.value;this.displayIndentGuides&&(r=this.renderIndentGuide(e,r)),r&&(i=this.$renderToken(e,i,n,r));for(var o=1;o<t.length;o++)r=(n=t[o]).value,i=this.$renderToken(e,i,n,r)},this.$renderLine=function(e,t,i,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else r=this.session.getTokens(t);if(i||e.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(t)),"px'>"),r.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,r,o,i):this.$renderSimpleLine(e,r)}this.showInvisibles&&(n&&(t=n.end.row),e.push("<span class='ace_invisible ace_invisible_eol'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),i||e.push("</div>")},this.$getFoldLineTokens=function(e,t){var i=this.session,n=[];var r=i.getTokens(e);return t.walk((function(e,t,o,a,s){null!=e?n.push({type:"fold",value:e}):(s&&(r=i.getTokens(t)),r.length&&function(e,t,i){for(var r=0,o=0;o+e[r].value.length<t;)if(o+=e[r].value.length,++r==e.length)return;for(o!=t&&((a=e[r].value.substring(t-o)).length>i-t&&(a=a.substring(0,i-t)),n.push({type:e[r].type,value:a}),o=t+a.length,r+=1);o<i&&r<e.length;){var a;(a=e[r].value).length+o>i?n.push({type:e[r].type,value:a.substring(0,i-o)}):n.push(e[r]),o+=a.length,r+=1}}(r,a,o))}),t.end.row,this.session.getLine(t.end.row).length),n},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(s.prototype),t.Text=s})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,i){var n,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===n&&(n=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(n?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||n||(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),top:(i.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,i=0,n=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);i=0;for(var r=t.length;i<r;i++){var o=this.getPixelPosition(t[i].cursor,!0);if(!((o.top>e.height+e.offset||o.top<0)&&i>1)){var a=(this.cursors[n++]||this.addCursor()).style;this.drawCursor?this.drawCursor(a,o,e,t[i],this.session):(a.left=o.left+"px",a.top=o.top+"px",a.width=e.characterWidth+"px",a.height=e.lineHeight+"px")}}for(;this.cursors.length>n;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,i){var n=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter,s=32768,c=function(e){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){n.implement(this,a),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(c.prototype);var l=function(e,t){c.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};n.inherits(l,c),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>s?(this.coeff=s/e,e=s):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(l.prototype);var u=function(e,t){c.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};n.inherits(u,c),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(u.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=u,t.VScrollBar=l,t.HScrollBar=u})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,i){var n=e("./lib/event"),r=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;n.nextFrame((function(){var e;for(t.pending=!1;e=t.changes;)t.changes=0,t.onRender(e)}),this.window)}}}).call(r.prototype),t.RenderLoop=r})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,i){var n=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),a=e("../lib/useragent"),s=e("../lib/event_emitter").EventEmitter,c=0,l=t.FontMetrics=function(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),c||this.$testFractionalRect(),this.$measureNode.innerHTML=o.stringRepeat("X",c),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){n.implement(this,s),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=r.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;c=t>0&&t<1?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval((function(){e.checkForSizeChanges()}),500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===c){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(i){e={width:0,height:0}}var t={height:e.height,width:e.width/c}}else t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/c};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.innerHTML=o.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(l.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],(function(e,t,i){var n=e("./lib/oop"),r=e("./lib/dom"),o=e("./config"),a=e("./lib/useragent"),s=e("./layer/gutter").Gutter,c=e("./layer/marker").Marker,l=e("./layer/text").Text,u=e("./layer/cursor").Cursor,d=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,p=e("./renderloop").RenderLoop,m=e("./layer/font_metrics").FontMetrics,f=e("./lib/event_emitter").EventEmitter;r.importCssString('.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_text-input-ios {position: absolute !important;top: -100000px !important;left: -100000px !important;}',"ace_editor.css");var g=function(e,t){var i=this;this.container=e||r.createElement("div"),this.$keepTextAreaAtCursor=!a.isOldIE,r.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new c(this.content);var n=this.$textLayer=new l(this.content);this.canvas=n.element,this.$markerFront=new c(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.addEventListener("scroll",(function(e){i.$scrollAnimation||i.session.setScrollTop(e.data-i.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){i.$scrollAnimation||i.session.setScrollLeft(e.data-i.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",(function(e){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,f),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,i){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!i)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,i,n){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;n||(n=r.clientHeight||r.scrollHeight),i||(i=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(e,t,i,n);if(!this.$size.scrollerHeight||!i&&!n)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,i,n){n-=this.$extraHeight||0;var r=0,o=this.$size,a={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return n&&(e||o.height!=n)&&(o.height=n,r|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",r|=this.CHANGE_SCROLL),i&&(e||o.width!=i)&&(r|=this.CHANGE_SIZE,o.width=i,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,i-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(r|=this.CHANGE_FULL)),o.$dirty=!i||!n,r&&this._signal("resize",a),r},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var i=this.session.selection.getCursor();i.column=0,e=this.$cursorLayer.getPixelPosition(i,!0),t*=this.session.getRowLength(i.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,i=this.$cursorLayer.$pixelPos.left;t-=e.offset;var n=this.textarea.style,r=this.lineHeight;if(t<0||t>e.height-r)n.top=n.left="0";else{var o=this.characterWidth;if(this.$composition){var a=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(a)[0]+2,r+=2}(i-=this.scrollLeft)>this.$size.scrollerWidth-o&&(i=this.$size.scrollerWidth-o),i+=this.gutterWidth,n.height=r+"px",n.width=o+"px",n.left=Math.min(i,this.$size.scrollerWidth-o)+"px",n.top=Math.min(t,this.$size.height-r)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,i,n){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|n,r.left=0|i,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var i=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),i.firstRow!=this.layerConfig.firstRow&&i.firstRowScreen==this.layerConfig.firstRowScreen){var n=this.scrollTop+(i.firstRow-this.layerConfig.firstRow)*this.lineHeight;n>0&&(this.scrollTop=n,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}i=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-i.offset+"px",this.content.style.marginTop=-i.offset+"px",this.content.style.width=i.width+2*this.$padding+"px",this.content.style.height=i.minHeight+"px"}if(e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender");if(e&this.CHANGE_SCROLL)return e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(i):this.$textLayer.scrollLines(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender");e&this.CHANGE_TEXT?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(i):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(i),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(i),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(i),this._signal("afterRender")}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,i=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(i+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&i>this.$maxPixelHeight&&(i=this.$maxPixelHeight);var n=e>t;if(i!=this.desiredHeight||this.$size.height!=this.desiredHeight||n!=this.$vScroll){n!=this.$vScroll&&(this.$vScroll=n,this.scrollBarV.setVisible(n));var r=this.container.clientWidth;this.container.style.height=i+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,i),this.desiredHeight=i,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,i=t.height<=2*this.lineHeight,n=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),o=!i&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),a=this.$horizScroll!==o;a&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var s=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var c=this.scrollTop%this.lineHeight,l=t.scrollerHeight+this.lineHeight,u=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;n+=u;var d=this.scrollMargin;this.session.setScrollTop(Math.max(-d.top,Math.min(this.scrollTop,n-t.scrollerHeight+d.bottom))),this.session.setScrollLeft(Math.max(-d.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+d.right)));var h=!i&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-n+u<0||this.scrollTop>d.top),p=s!==h;p&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var m,f,g=Math.ceil(l/this.lineHeight)-1,_=Math.max(0,Math.round((this.scrollTop-c)/this.lineHeight)),b=_+g,v=this.lineHeight;_=e.screenToDocumentRow(_,0);var y=e.getFoldLine(_);y&&(_=y.start.row),m=e.documentToScreenRow(_,0),f=e.getRowLength(_)*v,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(b)*v+f,c=this.scrollTop-m*v;var w=0;return this.layerConfig.width!=r&&(w=this.CHANGE_H_SCROLL),(a||p)&&(w=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),p&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:_,firstRowScreen:m,lastRow:b,lineHeight:v,characterWidth:this.characterWidth,minHeight:l,maxHeight:n,offset:c,gutterOffset:v?Math.max(0,Math.ceil((c+t.height-t.scrollerHeight)/v)):0,height:this.$size.scrollerHeight},w},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var i=this.layerConfig;if(!(e>i.lastRow+1||t<i.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(i),void this.$textLayer.update(i)):(this.$textLayer.updateLines(i,e,t),!0)}},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,i){this.scrollCursorIntoView(e,i),this.scrollCursorIntoView(t,i)},this.scrollCursorIntoView=function(e,t,i){if(0!==this.$size.scrollerHeight){var n=this.$cursorLayer.getPixelPosition(e),r=n.left,o=n.top,a=i&&i.top||0,s=i&&i.bottom||0,c=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;c+a>o?(t&&c+a>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):c+this.$size.scrollerHeight-s<o+this.lineHeight&&(t&&c+this.$size.scrollerHeight-s<o-this.lineHeight&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight-this.$size.scrollerHeight));var l=this.scrollLeft;l>r?(r<this.$padding+2*this.layerConfig.characterWidth&&(r=-this.scrollMargin.left),this.session.setScrollLeft(r)):l+this.$size.scrollerWidth<r+this.characterWidth?this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth)):l<=this.$padding&&r-l<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var i=this.$cursorLayer.getPixelPosition(e),n=this.$size.scrollerHeight-this.lineHeight,r=i.top-n*(t||0);return this.session.setScrollTop(r),r},this.STEPS=8,this.$calcSteps=function(e,t){var i=0,n=this.STEPS,r=[],o=function(e,t,i){return i*(Math.pow(e-1,3)+1)+t};for(i=0;i<n;++i)r.push(o(i/this.STEPS,e,t-e));return r},this.scrollToLine=function(e,t,i,n){var r=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(r-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(r),!1!==i&&this.animateScrolling(o,n)},this.animateScrolling=function(e,t){var i=this.scrollTop;if(this.$animatedScroll){var n=this;if(e!=i){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(e=r[0])==i)return}var o=n.$calcSteps(e,i);this.$scrollAnimation={from:e,to:i,steps:o},clearInterval(this.$timer),n.session.setScrollTop(o.shift()),n.session.$scrollTop=i,this.$timer=setInterval((function(){o.length?(n.session.setScrollTop(o.shift()),n.session.$scrollTop=i):null!=i?(n.session.$scrollTop=-1,n.session.setScrollTop(i),i=null):(n.$timer=clearInterval(n.$timer),n.$scrollAnimation=null,t&&t())}),10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=e+this.scrollLeft-i.left-this.$padding,r=n/this.characterWidth,o=Math.floor((t+this.scrollTop-i.top)/this.lineHeight),a=Math.round(r);return{row:o,column:a,side:r-a>0?1:-1,offsetX:n}},this.screenToTextCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=e+this.scrollLeft-i.left-this.$padding,r=Math.round(n/this.characterWidth),o=(t+this.scrollTop-i.top)/this.lineHeight;return this.session.screenToDocumentPosition(o,Math.max(r,0),n)},this.textToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=this.session.documentToScreenPosition(e,t),r=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e)?this.session.$bidiHandler.getPosLeft(n.column):Math.round(n.column*this.characterWidth)),o=n.row*this.lineHeight;return{pageX:i.left+r-this.scrollLeft,pageY:i.top+o-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(r.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){var i=this;if(this.$themeId=e,i._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)a(e);else{var n=e||this.$options.theme.initialValue;o.loadModule(["theme",n],a)}function a(n){if(i.$themeId!=e)return t&&t();if(!n||!n.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");r.importCssString(n.cssText,n.cssClass,i.container.ownerDocument),i.theme&&r.removeCssClass(i.container,i.theme.cssClass);var o="padding"in n?n.padding:"padding"in(i.theme||{})?4:i.$padding;i.$padding&&o!=i.$padding&&i.setPadding(o),i.$theme=n.cssClass,i.theme=n,r.addCssClass(i.container,n.cssClass),r.setCssClass(i.container,"ace_dark",n.isDark),i.$size&&(i.$size.width=0,i.$updateSizeAsync()),i._dispatchEvent("themeLoaded",{theme:n}),t&&t()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){r.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){r.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(g.prototype),o.defineOptions(g.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight)return this.$gutterLineHighlight=r.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight);this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=g})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,i){var n=e("../lib/oop"),r=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,a=e("../config");function s(e,t){var i=function(e,t){var i=t.src;r.qualifyURL(e);try{return new Blob([i],{type:"application/javascript"})}catch(o){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(i),n.getBlob("application/javascript")}}(e,t),n=(window.URL||window.webkitURL).createObjectURL(i);return new Worker(n)}var c=function(t,i,n,r,o){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)r=r||a.moduleUrl(i.id,"worker");else{var c=this.$normalizePath;r=r||c(e.toUrl("ace/worker/worker.js",null,"_"));var l={};t.forEach((function(t){l[t]=c(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}this.$worker=s(r,i),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:l,module:i.id,classname:n}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){n.implement(this,o),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var i=this.callbacks[t.id];i&&(i(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return r.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,i){if(i){var n=this.callbackId++;this.callbacks[n]=i,t.push(n)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(i){console.error(i.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(c.prototype);var l=function(e,t,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var n=null,r=!1,s=Object.create(o),c=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){c.messageBuffer.push(e),n&&(r?setTimeout(l):l())},this.setEmitSync=function(e){r=e};var l=function(){var e=c.messageBuffer.shift();e.command?n[e.command].apply(n,e.args):e.event&&s._signal(e.event,e.data)};s.postMessage=function(e){c.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],(function(e){for(n=new e[i](s);c.messageBuffer.length;)l()}))};l.prototype=c.prototype,t.UIWorkerClient=l,t.WorkerClient=c,t.createWorker=s})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,i){var n=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),a=function(e,t,i,n,r,o){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout((function(){a.onCursorChange()}))},this.$pos=i;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,r),this.setup=function(){var e=this,t=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=i.addMarker(new n(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(i){var n=t.createAnchor(i.row,i.column);n.$insertRight=!0,n.detach(),e.others.push(n)})),i.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(i){i.markerId=e.addMarker(new n(i.row,i.column,i.row,i.column+t.length),t.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var i="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,r=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=i),r&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s={row:(c=this.others[a]).row,column:c.column+o};this.doc.insertMergedLines(s,e.lines)}else if("remove"===e.action)for(a=this.others.length-1;a>=0;a--){var c;s={row:(c=this.others[a]).row,column:c.column+o};this.doc.remove(new n(s.row,s.column,s.row,s.column-i))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,i=function(i,r){t.removeMarker(i.markerId),i.markerId=t.addMarker(new n(i.row,i.column,i.row,i.column+e.length),r,null,!1)};i(this.pos,this.mainClass);for(var r=this.others.length;r--;)i(this.others[r],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,i=0;i<t;i++)e.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(a.prototype),t.PlaceHolder=a})),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,i){var n=e("../lib/event"),r=e("../lib/useragent");function o(e,t){return e.row==t.row&&e.column==t.column}t.onMouseDown=function(e){var t=e.domEvent,i=t.altKey,a=t.shiftKey,s=t.ctrlKey,c=e.getAccelKey(),l=e.getButton();if(s&&r.isMac&&(l=t.button),e.editor.inMultiSelectMode&&2==l)e.editor.textInput.onContextMenu(e.domEvent);else if(s||i||c){if(0===l){var u,d=e.editor,h=d.selection,p=d.inMultiSelectMode,m=e.getDocumentPosition(),f=h.getCursor(),g=e.inSelection()||h.isEmpty()&&o(m,f),_=e.x,b=e.y,v=d.session,y=d.renderer.pixelToScreenCoordinates(_,b),w=y;if(d.$mouseHandler.$enableJumpToDef)s&&i||c&&i?u=a?"block":"add":i&&d.$blockSelectEnabled&&(u="block");else if(c&&!i){if(u="add",!p&&a)return}else i&&d.$blockSelectEnabled&&(u="block");if(u&&r.isMac&&t.ctrlKey&&d.$mouseHandler.cancelContextMenu(),"add"==u){if(!p&&g)return;if(!p){var x=h.toOrientedRange();d.addSelectionMarker(x)}var N=h.rangeList.rangeAtPoint(m);d.$blockScrolling++,d.inVirtualSelectionMode=!0,a&&(N=null,x=h.ranges[0]||x,d.removeSelectionMarker(x)),d.once("mouseup",(function(){var e=h.toOrientedRange();N&&e.isEmpty()&&o(N.cursor,e.cursor)?h.substractPoint(e.cursor):(a?h.substractPoint(x.cursor):x&&(d.removeSelectionMarker(x),h.addRange(x)),h.addRange(e)),d.$blockScrolling--,d.inVirtualSelectionMode=!1}))}else if("block"==u){var k;e.stop(),d.inVirtualSelectionMode=!0;var A=[];d.$blockScrolling++,p&&!c?h.toSingleRange():!p&&c&&(k=h.toOrientedRange(),d.addSelectionMarker(k)),a?y=v.documentToScreenPosition(h.lead):h.moveToPosition(m),d.$blockScrolling--,w={row:-1,column:-1};var C=function(){var e=d.renderer.pixelToScreenCoordinates(_,b),t=v.screenToDocumentPosition(e.row,e.column,e.offsetX);o(w,e)&&o(t,h.lead)||(w=e,d.$blockScrolling++,d.selection.moveToPosition(t),d.renderer.scrollCursorIntoView(),d.removeSelectionMarkers(A),A=h.rectangularRangeBlock(w,y),d.$mouseHandler.$clickSelection&&1==A.length&&A[0].isEmpty()&&(A[0]=d.$mouseHandler.$clickSelection.clone()),A.forEach(d.addSelectionMarker,d),d.updateSelectionMarkers(),d.$blockScrolling--)};n.capture(d.container,(function(e){_=e.clientX,b=e.clientY}),(function(e){clearInterval(O),d.removeSelectionMarkers(A),A.length||(A=[h.toOrientedRange()]),d.$blockScrolling++,k&&(d.removeSelectionMarker(k),h.toSingleRange(k));for(var t=0;t<A.length;t++)h.addRange(A[t]);d.inVirtualSelectionMode=!1,d.$mouseHandler.$clickSelection=null,d.$blockScrolling--}));var O=setInterval((function(){C()}),20);return e.preventDefault()}}}else 0===l&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}})),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],(function(e,t,i){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var n=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new n(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,i){var n=e("./range_list").RangeList,r=e("./range").Range,o=e("./selection").Selection,a=e("./mouse/multi_select_handler").onMouseDown,s=e("./lib/event"),c=e("./lib/lang"),l=e("./commands/multi_select_commands");t.commands=l.defaultCommands.concat(l.multiSelectCommands);var u=new(0,e("./search").Search);var d=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(d.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var i=this.toOrientedRange();if(this.rangeList.add(i),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(i),this.$onAddRange(i)}e.cursor||(e.cursor=e.end);var n=this.rangeList.add(e);return this.$onAddRange(e),n.length&&this.$onRemoveRange(n),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var i=e.length;i--;){var n=this.ranges.indexOf(e[i]);this.ranges.splice(n,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new n,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],i=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{i=this.getRange();var n=this.isBackwards(),o=i.start.row,a=i.end.row;if(o==a){if(n)var s=i.end,c=i.start;else s=i.start,c=i.end;return this.addRange(r.fromPoints(c,c)),void this.addRange(r.fromPoints(s,s))}var l=[],u=this.getLineRange(o,!0);u.start.column=i.start.column,l.push(u);for(var d=o+1;d<a;d++)l.push(this.getLineRange(d,!0));(u=this.getLineRange(a,!0)).end.column=i.end.column,l.push(u),l.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],i=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{var n=this.session.documentToScreenPosition(this.selectionLead),o=this.session.documentToScreenPosition(this.selectionAnchor);this.rectangularRangeBlock(n,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,i){var n=[],o=e.column<t.column;if(o)var a=e.column,s=t.column,c=e.offsetX,l=t.offsetX;else a=t.column,s=e.column,c=t.offsetX,l=e.offsetX;var u,d,h=e.row<t.row;if(h)var p=e.row,m=t.row;else p=t.row,m=e.row;a<0&&(a=0),p<0&&(p=0),p==m&&(i=!0);for(var f=p;f<=m;f++){var g=r.fromPoints(this.session.screenToDocumentPosition(f,a,c),this.session.screenToDocumentPosition(f,s,l));if(g.isEmpty()){if(_&&(u=g.end,d=_,u.row==d.row&&u.column==d.column))break;var _=g.end}g.cursor=o?g.start:g.end,n.push(g)}if(h&&n.reverse(),!i){for(var b=n.length-1;n[b].isEmpty()&&b>0;)b--;if(b>0)for(var v=0;n[v].isEmpty();)v++;for(var y=b;y>=v;y--)n[y].isEmpty()&&n.splice(y,1)}return n}}.call(o.prototype);var h=e("./editor").Editor;function p(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",a),e.commands.addCommands(l.defaultCommands),function(e){var t=e.textInput.getElement(),i=!1;function n(t){i&&(e.renderer.setMouseCursor(""),i=!1)}s.addListener(t,"keydown",(function(t){var r=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&r?i||(e.renderer.setMouseCursor("crosshair"),i=!0):i&&n()})),s.addListener(t,"keyup",n),s.addListener(t,"blur",n)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,i=e.length;i--;){var n=e[i];if(n.marker){this.session.removeMarker(n.marker);var r=t.indexOf(n);-1!=r&&t.splice(r,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(l.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,i=e.editor;if(i.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?n=i.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?n=i.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(i.exitMultiSelectMode(),n=t.exec(i,e.args||{})):n=t.multiSelectAction(i,e.args||{});else{var n=t.exec(i,e.args||{});i.multiSelect.addRange(i.multiSelect.toOrientedRange()),i.multiSelect.mergeOverlappingRanges()}return n}},this.forEachSelection=function(e,t,i){if(!this.inVirtualSelectionMode){var n,r=i&&i.keepOrder,a=1==i||i&&i.$byLines,s=this.session,c=this.selection,l=c.rangeList,u=(r?c:l).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=c._eventRegistry;c._eventRegistry={};var h=new o(s);this.inVirtualSelectionMode=!0;for(var p=u.length;p--;){if(a)for(;p>0&&u[p].start.row==u[p-1].end.row;)p--;h.fromOrientedRange(u[p]),h.index=p,this.selection=s.selection=h;var m=e.exec?e.exec(this,t||{}):e(this,t||{});n||void 0===m||(n=m),h.toOrientedRange(u[p])}h.detach(),this.selection=s.selection=c,this.inVirtualSelectionMode=!1,c._eventRegistry=d,c.mergeOverlappingRanges();var f=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),f&&f.from==f.to&&this.renderer.animateScrolling(f.from),n}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,i=[],n=0;n<t.length;n++)i.push(this.session.getTextRange(t[n]));var r=this.session.getDocument().getNewLineCharacter();(e=i.join(r)).length==(i.length-1)*r.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var i=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var n=t==this.multiSelect.anchor?i.cursor==i.start?i.end:i.start:i.cursor;n.row==t.row&&this.session.$clipPositionToDocument(n.row,n.column).column==t.column||this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}},this.findAll=function(e,t,i){if((t=t||{}).needle=e||t.needle,null==t.needle){var n=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(n)}this.$search.set(t);var r=this.$search.findAll(this.session);if(!r.length)return 0;this.$blockScrolling+=1;var o=this.multiSelect;i||o.toSingleRange(r[0]);for(var a=r.length;a--;)o.addRange(r[a],!0);return n&&o.rangeList.rangeAtPoint(n.start)&&o.addRange(n,!0),this.$blockScrolling-=1,r.length},this.selectMoreLines=function(e,t){var i=this.selection.toOrientedRange(),n=i.cursor==i.end,o=this.session.documentToScreenPosition(i.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var a,s=this.session.screenToDocumentPosition(o.row+e,o.column);if(i.isEmpty())l=s;else var c=this.session.documentToScreenPosition(n?i.end:i.start),l=this.session.screenToDocumentPosition(c.row+e,c.column);n?(a=r.fromPoints(s,l)).cursor=a.start:(a=r.fromPoints(l,s)).cursor=a.end;if(a.desiredColumn=o.column,this.selection.inMultiSelectMode){if(t)var u=i.cursor}else this.selection.addRange(i);this.selection.addRange(a),u&&this.selection.substractPoint(u)},this.transposeSelections=function(e){for(var t=this.session,i=t.multiSelect,n=i.ranges,r=n.length;r--;){if((s=n[r]).isEmpty()){var o=t.getWordRange(s.start.row,s.start.column);s.start.row=o.start.row,s.start.column=o.start.column,s.end.row=o.end.row,s.end.column=o.end.column}}i.mergeOverlappingRanges();var a=[];for(r=n.length;r--;){var s=n[r];a.unshift(t.getTextRange(s))}e<0?a.unshift(a.pop()):a.push(a.shift());for(r=n.length;r--;){o=(s=n[r]).clone();t.replace(s,a[r]),s.start.row=o.start.row,s.start.column=o.start.column}},this.selectMore=function(e,t,i){var n=this.session,r=n.multiSelect.toOrientedRange();if(!r.isEmpty()||((r=n.getWordRange(r.start.row,r.start.column)).cursor=-1==e?r.start:r.end,this.multiSelect.addRange(r),!i)){var o=n.getTextRange(r),a=function(e,t,i){return u.$options.wrap=!0,u.$options.needle=t,u.$options.backwards=-1==i,u.find(e)}(n,o,e);a&&(a.cursor=-1==e?a.start:a.end,this.$blockScrolling+=1,this.session.unfold(a),this.multiSelect.addRange(a),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(r.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,i=t.ranges,n=-1,o=i.filter((function(e){if(e.cursor.row==n)return!0;n=e.cursor.row}));if(i.length&&o.length!=i.length-1){o.forEach((function(e){t.substractPoint(e.cursor)}));var a=0,s=1/0,l=i.map((function(t){var i=t.cursor,n=e.getLine(i.row).substr(i.column).search(/\S/g);return-1==n&&(n=0),i.column>a&&(a=i.column),n<s&&(s=n),n}));i.forEach((function(t,i){var n=t.cursor,o=a-n.column,u=l[i]-s;o>u?e.insert(n,c.stringRepeat(" ",o-u)):e.remove(new r(n.row,n.column,n.row,n.column-o+u)),t.start.column=t.end.column=a,t.start.row=t.end.row=n.row,t.cursor=t.end})),t.fromOrientedRange(i[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),d=u.start.row,h=u.end.row,p=d==h;if(p){var m,f=this.session.getLength();do{m=this.session.getLine(h)}while(/[=:]/.test(m)&&++h<f);do{m=this.session.getLine(d)}while(/[=:]/.test(m)&&--d>0);d<0&&(d=0),h>=f&&(h=f-1)}var g=this.session.removeFullLines(d,h);g=this.$reAlignText(g,p),this.session.insert({row:d,column:0},g.join("\n")+"\n"),p||(u.start.column=0,u.end.column=g[g.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var i,n,r,o=!0,a=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==i?(i=t[1].length,n=t[2].length,r=t[3].length,t):(i+n+r!=t[1].length+t[2].length+t[3].length&&(a=!1),i!=t[1].length&&(o=!1),i>t[1].length&&(i=t[1].length),n<t[2].length&&(n=t[2].length),r>t[3].length&&(r=t[3].length),t):[e]})).map(t?l:o?a?function(e){return e[2]?s(i+n-e[2].length)+e[2]+s(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:l:function(e){return e[2]?s(i)+e[2]+s(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function s(e){return c.stringRepeat(" ",e)}function l(e){return e[2]?s(i)+e[2]+s(n-e[2].length+r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(h.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var i=e.oldSession;i&&(i.multiSelect.off("addRange",this.$onAddRange),i.multiSelect.off("removeRange",this.$onRemoveRange),i.multiSelect.off("multiSelect",this.$onMultiSelect),i.multiSelect.off("singleSelect",this.$onSingleSelect),i.multiSelect.lead.off("change",this.$checkMultiselectChange),i.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=p,e("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(e){p(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",a)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",a))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,i){var n=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);return this.foldingStartMarker.test(n)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(e,t,i){return null},this.indentationBlock=function(e,t,i){var r=/\S/,o=e.getLine(t),a=o.search(r);if(-1!=a){for(var s=i||o.length,c=e.getLength(),l=t,u=t;++t<c;){var d=e.getLine(t).search(r);if(-1!=d){if(d<=a)break;u=t}}if(u>l){var h=e.getLine(u).length;return new n(l,s,u,h)}}},this.openingBracketBlock=function(e,t,i,r,o){var a={row:i,column:r+1},s=e.$findClosingBracket(t,a,o);if(s){var c=e.foldWidgets[s.row];return null==c&&(c=e.getFoldWidget(s.row)),"start"==c&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),n.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,i,r,o){var a={row:i,column:r},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,n.fromPoints(s,a)}}).call(r.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(e,t,i){t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',e("../lib/dom").importCssString(t.cssText,t.cssClass)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],(function(e,t,i){e("./lib/oop");var n=e("./lib/dom");function r(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}e("./range").Range,function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},this.updateOnFold=function(e,t){var i=t.lineWidgets;if(i&&e.action){for(var n=e.data,r=n.start.row,o=n.end.row,a="add"==e.action,s=r+1;s<o;s++)i[s]&&(i[s].hidden=a);i[o]&&(a?i[r]?i[o].hidden=a:i[r]=i[o]:(i[r]==i[o]&&(i[r]=void 0),i[o].hidden=a))}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var i=e.start.row,n=e.end.row-i;if(0===n);else if("remove"==e.action){t.splice(i+1,n).forEach((function(e){e&&this.removeLineWidget(e)}),this),this.$updateRows()}else{var r=new Array(n);r.unshift(i,0),t.splice.apply(t,r),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,i){if(e)for(t=!1,e.row=i;e.$oldWidget;)e.$oldWidget.row=i,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e.session=this.session;var i=this.editor.renderer;e.html&&!e.el&&(e.el=n.createElement("div"),e.el.innerHTML=e.html),e.el&&(n.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,i.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/i.layerConfig.lineHeight);var r=this.session.getFoldAt(e.row,0);if(e.$fold=r,r){var o=this.session.lineWidgets;e.row!=r.end.row||o[r.start.row]?e.hidden=!0:o[r.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,i),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(i){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,i=t&&t[e],n=[];i;)n.push(i),i=i.$oldWidget;return n},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var i=this.session._changedWidgets,n=t.layerConfig;if(i&&i.length){for(var r=1/0,o=0;o<i.length;o++){var a=i[o];if(a&&a.el&&a.session==this.session){if(!a._inDocument){if(this.session.lineWidgets[a.row]!=a)continue;a._inDocument=!0,t.container.appendChild(a.el)}a.h=a.el.offsetHeight,a.fixedWidth||(a.w=a.el.offsetWidth,a.screenWidth=Math.ceil(a.w/n.characterWidth));var s=a.h/n.lineHeight;a.coverLine&&(s-=this.session.getRowLineCount(a.row))<0&&(s=0),a.rowCount!=s&&(a.rowCount=s,a.row<r&&(r=a.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var i=t.layerConfig,n=this.session.lineWidgets;if(n){for(var r=Math.min(this.firstRow,i.firstRow),o=Math.max(this.lastRow,i.lastRow,n.length);r>0&&!n[r];)r--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,t.$cursorLayer.config=i;for(var a=r;a<=o;a++){var s=n[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var c=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(c+=i.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=c-i.offset+"px";var l=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(l-=t.scrollLeft),s.el.style.left=l+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=i.width+2*i.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}}}.call(r.prototype),t.LineWidgets=r})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(e,t,i){var n=e("../line_widgets").LineWidgets,r=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var i=e.session;i.widgetManager||(i.widgetManager=new n(i),i.widgetManager.attach(e));var a=e.getCursorPosition(),s=a.row,c=i.widgetManager.getWidgetsAtRow(s).filter((function(e){return"errorMarker"==e.type}))[0];c?c.destroy():s-=t;var l,u=function(e,t,i){var n=e.getAnnotations().sort(o.comparePoints);if(n.length){var r=function(e,t,i){for(var n=0,r=e.length-1;n<=r;){var o=n+r>>1,a=i(t,e[o]);if(a>0)n=o+1;else{if(!(a<0))return o;r=o-1}}return-(n+1)}(n,{row:t,column:-1},o.comparePoints);r<0&&(r=-r-1),r>=n.length?r=i>0?0:n.length-1:0===r&&i<0&&(r=n.length-1);var a=n[r];if(a&&i){if(a.row===t){do{a=n[r+=i]}while(a&&a.row===t);if(!a)return n.slice()}var s=[];t=a.row;do{s[i<0?"unshift":"push"](a),a=n[r+=i]}while(a&&a.row==t);return s.length&&s}}}(i,s,t);if(u){var d=u[0];a.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,a.row=d.row,l=e.renderer.$gutterLayer.$annotations[a.row]}else{if(c)return;l={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var h={row:a.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},p=h.el.appendChild(r.createElement("div")),m=h.el.appendChild(r.createElement("div"));m.className="error_widget_arrow "+l.className;var f=e.renderer.$cursorLayer.getPixelPosition(a).left;m.style.left=f+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+l.className,p.innerHTML=l.text.join("<br>"),p.appendChild(r.createElement("div"));var g=function(e,t,i){if(0===t&&("esc"===i||"return"===i))return h.destroy(),{command:"null"}};h.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),i.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},r.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],(function(e,t,i){e("./lib/fixoldbrowsers");var n=e("./lib/dom"),r=e("./lib/event"),o=e("./editor").Editor,a=e("./edit_session").EditSession,s=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.acequire=e,t.edit=function(e){if("string"==typeof e){var i=e;if(!(e=document.getElementById(i)))throw new Error("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editor instanceof o)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var s=e;a=s.value,e=n.createElement("pre"),s.parentNode.replaceChild(e,s)}else e&&(a=n.getInnerText(e),e.innerHTML="");var l=t.createEditSession(a),u=new o(new c(e));u.setSession(l);var d={document:l,editor:u,onResize:u.resize.bind(u,null)};return s&&(d.textarea=s),r.addListener(window,"resize",d.onResize),u.on("destroy",(function(){r.removeListener(window,"resize",d.onResize),d.editor.container.env=null})),u.container.env=u.env=d,u},t.createEditSession=function(e,t){var i=new a(e,t);return i.setUndoManager(new s),i},t.EditSession=a,t.UndoManager=s,t.version="1.2.9"})),ace.acequire(["ace/ace"],(function(e){for(var t in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])}));var ub=window.ace.acequire("ace/ace"),db={id:"ace/mode/json_worker",src:'"no use strict";!function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,"/")+(tail||alias.main||alias.name);if(alias===!1)return"";var i=testPath.lastIndexOf("/");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log("unable to load "+id);var path=resolveModuleId(id,window.acequire.tlns);return".js"!=path.slice(-3)&&(path+=".js"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error("Unknown command:"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}}(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/apply_delta",["require","exports","module"],function(acequire,exports){"use strict";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||"";switch(delta.action){case"insert":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case"remove":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert="insert"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),applyDelta=acequire("./apply_delta").applyDelta,EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(textOrLines){this.$lines=[""],0===textOrLines.length?this.$lines=[""]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:"\\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\\r\\n";case"unix":return"\\n";default:return this.$autoNewLine||"\\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead."),this.insertMergedLines(position,["",""])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:"insert",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([""]),column=0):(lines=[""].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:"insert",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:"remove",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:"remove",lines:["",""]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert="insert"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal("change",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(""),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:"insert"==delta.action?"remove":"insert",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if("object"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if("[object Object]"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/\'/g,"&#39;").replace(/</g,"&#60;")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(acequire,exports){"use strict";acequire("../range").Range;var Document=acequire("../document").Document,lang=acequire("../lib/lang"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(""),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on("change",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:"insert",start:data[i],lines:data[i+1]};else var d={action:"remove",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define("ace/mode/json/json_parse",["require","exports","module"],function(){"use strict";var at,ch,text,value,escapee={\'"\':\'"\',"\\\\":"\\\\","/":"/",b:"\\b",f:"\\f",n:"\\n",r:"\\r",t:"\t"},error=function(m){throw{name:"SyntaxError",message:m,at:at,text:text}},next=function(c){return c&&c!==ch&&error("Expected \'"+c+"\' instead of \'"+ch+"\'"),ch=text.charAt(at),at+=1,ch},number=function(){var number,string="";for("-"===ch&&(string="-",next("-"));ch>="0"&&"9">=ch;)string+=ch,next();if("."===ch)for(string+=".";next()&&ch>="0"&&"9">=ch;)string+=ch;if("e"===ch||"E"===ch)for(string+=ch,next(),("-"===ch||"+"===ch)&&(string+=ch,next());ch>="0"&&"9">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error("Bad number"),void 0):number},string=function(){var hex,i,uffff,string="";if(\'"\'===ch)for(;next();){if(\'"\'===ch)return next(),string;if("\\\\"===ch)if(next(),"u"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if("string"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error("Bad string")},white=function(){for(;ch&&" ">=ch;)next()},word=function(){switch(ch){case"t":return next("t"),next("r"),next("u"),next("e"),!0;case"f":return next("f"),next("a"),next("l"),next("s"),next("e"),!1;case"n":return next("n"),next("u"),next("l"),next("l"),null}error("Unexpected \'"+ch+"\'")},array=function(){var array=[];if("["===ch){if(next("["),white(),"]"===ch)return next("]"),array;for(;ch;){if(array.push(value()),white(),"]"===ch)return next("]"),array;next(","),white()}}error("Bad array")},object=function(){var key,object={};if("{"===ch){if(next("{"),white(),"}"===ch)return next("}"),object;for(;ch;){if(key=string(),white(),next(":"),Object.hasOwnProperty.call(object,key)&&error(\'Duplicate key "\'+key+\'"\'),object[key]=value(),white(),"}"===ch)return next("}"),object;next(","),white()}}error("Bad object")};return value=function(){switch(white(),ch){case"{":return object();case"[":return array();case\'"\':return string();case"-":return number();default:return ch>="0"&&"9">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=" ",result=value(),white(),ch&&error("Syntax error"),"function"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&"object"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({"":result},""):result}}),ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(acequire,exports){"use strict";var oop=acequire("../lib/oop"),Mirror=acequire("../worker/mirror").Mirror,parse=acequire("./json/json_parse"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue(),errors=[];try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);errors.push({row:pos.row,column:pos.column,text:e.message,type:"error"})}this.sender.emit("annotate",errors)}}.call(JsonWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0\n}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != \'object\'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws="\t\\n\v\\f\\r    \\u2028\\u2029\ufeff";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can\'t convert "+o+" to object");return Object(o)}});'};ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,i){var n=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};n.inherits(o,r),t.JsonHighlightRules=o})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,i){var n=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var i=e.getLine(t).match(/^(\s*\})/);if(!i)return 0;var r=i[1].length,o=e.findMatchingBracket({row:t,column:r});if(!o||o.row==t)return 0;var a=this.$getIndent(e.getLine(o.row));e.replace(new n(t,0,t,r-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,i){var n=e("../../lib/oop"),r=e("../../range").Range,o=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};n.inherits(a,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var r=this._getFoldWidgetBase(e,t,i);return!r&&this.startRegionRe.test(n)?"start":r},this.getFoldWidgetRange=function(e,t,i,n){var r,o=e.getLine(i);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,i);if(r=o.match(this.foldingStartMarker)){var a=r.index;if(r[1])return this.openingBracketBlock(e,r[1],i,a);var s=e.getCommentFoldRange(i,a+r[0].length,1);return s&&!s.isMultiLine()&&(n?s=this.getSectionRange(e,i):"all"!=t&&(s=null)),s}if("markbegin"!==t&&(r=o.match(this.foldingStopMarker))){a=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],i,a):e.getCommentFoldRange(i,a,-1)}},this.getSectionRange=function(e,t){for(var i=e.getLine(t),n=i.search(/\S/),o=t,a=i.length,s=t+=1,c=e.getLength();++t<c;){var l=(i=e.getLine(t)).search(/\S/);if(-1!==l){if(n>l)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=o)break;if(u.isMultiLine())t=u.end.row;else if(n==l)break}s=t}}return new r(o,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,i){for(var n=t.search(/\s*$/),o=e.getLength(),a=i,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++i<o;){t=e.getLine(i);var l=s.exec(t);if(l&&(l[1]?c--:c++,!c))break}if(i>a)return new r(a,n,i,t.length)}}.call(a.prototype)})),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],(function(e,t,i){var n=e("../lib/oop"),r=e("./text").Mode,o=e("./json_highlight_rules").JsonHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,l=e("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=o,this.$outdent=new a,this.$behaviour=new s,this.foldingRules=new c};n.inherits(u,r),function(){this.getNextLineIndent=function(e,t,i){var n=this.$getIndent(t);"start"==e&&(t.match(/^.*[\{\(\[]\s*$/)&&(n+=i));return n},this.checkOutdent=function(e,t,i){return this.$outdent.checkOutdent(t,i)},this.autoOutdent=function(e,t,i){this.$outdent.autoOutdent(t,i)},this.createWorker=function(e){var t=new l(["ace"],db,"JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/json"}.call(u.prototype),t.Mode=u})),ace.define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,i){var n=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"list.markup",regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:"list.markup",regex:/^\s*[\-?](?:$|\s)/},{token:"constant",regex:"!![\\w//]+"},{token:"constant.language",regex:"[&\\*][a-zA-Z0-9-_]+"},{token:["meta.tag","keyword"],regex:/^(\s*\w.*?)(:(?=\s|$))/},{token:["meta.tag","keyword"],regex:/(\w+?)(\s*:(?=\s|$))/},{token:"keyword.operator",regex:"<<\\w*:\\w*"},{token:"keyword.operator",regex:"-\\s*(?=[{])"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:/[|>][-+\d\s]*$/,onMatch:function(e,t,i,n){var r=/^\s*/.exec(n)[0];return i.length<1?i.push(this.next):i[0]="mlString",i.length<2?i.push(r.length):i[1]=r.length,this.token},next:"mlString"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:/[^\s,:\[\]\{\}]+/}],mlString:[{token:"indent",regex:/^\s*$/},{token:"indent",regex:/^\s*/,onMatch:function(e,t,i){return i[1]>=e.length?(this.next="start",i.splice(0)):this.next="mlString",this.token},next:"mlString"},{token:"string",regex:".+"}]},this.normalizeRules()};n.inherits(o,r),t.YamlHighlightRules=o})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,i){var n=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var i=e.getLine(t).match(/^(\s*\})/);if(!i)return 0;var r=i[1].length,o=e.findMatchingBracket({row:t,column:r});if(!o||o.row==t)return 0;var a=this.$getIndent(e.getLine(o.row));e.replace(new n(t,0,t,r-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r})),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],(function(e,t,i){var n=e("../../lib/oop"),r=e("./fold_mode").FoldMode,o=e("../../range").Range,a=t.FoldMode=function(){};n.inherits(a,r),function(){this.getFoldWidgetRange=function(e,t,i){var n=this.indentationBlock(e,i);if(n)return n;var r=/\S/,a=e.getLine(i),s=a.search(r);if(-1!=s&&"#"==a[s]){for(var c=a.length,l=e.getLength(),u=i,d=i;++i<l;){var h=(a=e.getLine(i)).search(r);if(-1!=h){if("#"!=a[h])break;d=i}}if(d>u){var p=e.getLine(d).length;return new o(u,c,d,p)}}},this.getFoldWidget=function(e,t,i){var n=e.getLine(i),r=n.search(/\S/),o=e.getLine(i+1),a=e.getLine(i-1),s=a.search(/\S/),c=o.search(/\S/);if(-1==r)return e.foldWidgets[i-1]=-1!=s&&s<c?"start":"","";if(-1==s){if(r==c&&"#"==n[r]&&"#"==o[r])return e.foldWidgets[i-1]="",e.foldWidgets[i+1]="","start"}else if(s==r&&"#"==n[r]&&"#"==a[r]&&-1==e.getLine(i-2).search(/\S/))return e.foldWidgets[i-1]="start",e.foldWidgets[i+1]="","";return e.foldWidgets[i-1]=-1!=s&&s<r?"start":"",r<c?"start":""}}.call(a.prototype)})),ace.define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee"],(function(e,t,i){var n=e("../lib/oop"),r=e("./text").Mode,o=e("./yaml_highlight_rules").YamlHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("./folding/coffee").FoldMode,c=function(){this.HighlightRules=o,this.$outdent=new a,this.foldingRules=new s,this.$behaviour=this.$defaultBehaviour};n.inherits(c,r),function(){this.lineCommentStart=["#","//"],this.getNextLineIndent=function(e,t,i){var n=this.$getIndent(t);"start"==e&&(t.match(/^.*[\{\(\[]\s*$/)&&(n+=i));return n},this.checkOutdent=function(e,t,i){return this.$outdent.checkOutdent(t,i)},this.autoOutdent=function(e,t,i){this.$outdent.autoOutdent(t,i)},this.$id="ace/mode/yaml"}.call(c.prototype),t.Mode=c}));var hb={exports:{}};hb.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}return i.m=e,i.c=t,i.p="",i(0)}([function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),r=i(3),o=i(8),a=i(15);function s(e,t,i){var a=null,s=function(e,t){i&&i(e,t),a&&a.visit(e,t)},c="function"==typeof i?s:null,l=!1;if(t){l="boolean"==typeof t.comment&&t.comment;var u="boolean"==typeof t.attachComment&&t.attachComment;(l||u)&&((a=new n.CommentHandler).attach=u,t.comment=!0,c=s)}var d,h=!1;t&&"string"==typeof t.sourceType&&(h="module"===t.sourceType),d=t&&"boolean"==typeof t.jsx&&t.jsx?new r.JSXParser(e,t,c):new o.Parser(e,t,c);var p=h?d.parseModule():d.parseScript();return l&&a&&(p.comments=a.comments),d.config.tokens&&(p.tokens=d.tokens),d.config.tolerant&&(p.errors=d.errorHandler.errors),p}t.parse=s,t.parseModule=function(e,t,i){var n=t||{};return n.sourceType="module",s(e,n,i)},t.parseScript=function(e,t,i){var n=t||{};return n.sourceType="script",s(e,n,i)},t.tokenize=function(e,t,i){var n,r=new a.Tokenizer(e,t);n=[];try{for(;;){var o=r.getNextToken();if(!o)break;i&&(o=i(o)),n.push(o)}}catch(s){r.errorHandler.tolerate(s)}return r.errorHandler.tolerant&&(n.errors=r.errors()),n};var c=i(2);t.Syntax=c.Syntax,t.version="4.0.1"},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===n.Syntax.BlockStatement&&0===e.body.length){for(var i=[],r=this.leading.length-1;r>=0;--r){var o=this.leading[r];t.end.offset>=o.start&&(i.unshift(o.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}i.length&&(e.innerComments=i)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var i=this.trailing.length-1;i>=0;--i){var n=this.trailing[i];n.start>=e.end.offset&&t.unshift(n.comment)}return this.trailing.length=0,t}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var o=r.node.trailingComments[0];o&&o.range[0]>=e.end.offset&&(t=r.node.trailingComments,delete r.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,i=[];this.stack.length>0&&(o=this.stack[this.stack.length-1])&&o.start>=e.start.offset;)t=o.node,this.stack.pop();if(t){for(var n=(t.leadingComments?t.leadingComments.length:0)-1;n>=0;--n){var r=t.leadingComments[n];r.range[1]<=e.start.offset&&(i.unshift(r),t.leadingComments.splice(n,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,i}for(n=this.leading.length-1;n>=0;--n){var o;(o=this.leading[n]).start<=e.start.offset&&(i.unshift(o.comment),this.leading.splice(n,1))}return i},e.prototype.visitNode=function(e,t){if(!(e.type===n.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var i=this.findTrailingComments(t),r=this.findLeadingComments(t);r.length>0&&(e.leadingComments=r),i.length>0&&(e.trailingComments=i),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var i="L"===e.type[0]?"Line":"Block",n={type:i,value:e.value};if(e.range&&(n.range=e.range),e.loc&&(n.loc=e.loc),this.comments.push(n),this.attach){var r={comment:{type:i,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(r.comment.loc=e.loc),e.type=i,this.leading.push(r),this.trailing.push(r)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=r},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,i){var n,r=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var o=i(4),a=i(5),s=i(6),c=i(7),l=i(8),u=i(13),d=i(14);function h(e){var t;switch(e.type){case s.JSXSyntax.JSXIdentifier:t=e.name;break;case s.JSXSyntax.JSXNamespacedName:var i=e;t=h(i.namespace)+":"+h(i.name);break;case s.JSXSyntax.JSXMemberExpression:var n=e;t=h(n.object)+"."+h(n.property)}return t}u.TokenName[100]="JSXIdentifier",u.TokenName[101]="JSXText";var p=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return r(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",i=!0,n=!1,r=!1,a=!1;!this.scanner.eof()&&i&&!n;){var s=this.scanner.source[this.scanner.index];if(s===e)break;if(n=";"===s,t+=s,++this.scanner.index,!n)switch(t.length){case 2:r="#"===s;break;case 3:r&&(i=(a="x"===s)||o.Character.isDecimalDigit(s.charCodeAt(0)),r=r&&!a);break;default:i=(i=i&&!(r&&!o.Character.isDecimalDigit(s.charCodeAt(0))))&&!(a&&!o.Character.isHexDigit(s.charCodeAt(0)))}}if(i&&n&&t.length>2){var c=t.substr(1,t.length-2);r&&c.length>1?t=String.fromCharCode(parseInt(c.substr(1),10)):a&&c.length>2?t=String.fromCharCode(parseInt("0"+c.substr(1),16)):r||a||!d.XHTMLEntities[c]||(t=d.XHTMLEntities[c])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:s=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,i=this.scanner.source[this.scanner.index++],n="";!this.scanner.eof()&&(c=this.scanner.source[this.scanner.index++])!==i;)n+="&"===c?this.scanXHTMLEntity(i):c;return{type:8,value:n,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var r=this.scanner.source.charCodeAt(this.scanner.index+1),a=this.scanner.source.charCodeAt(this.scanner.index+2),s=46===r&&46===a?"...":".";return t=this.scanner.index,this.scanner.index+=s.length,{type:7,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(o.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var c=this.scanner.source.charCodeAt(this.scanner.index);if(o.Character.isIdentifierPart(c)&&92!==c)++this.scanner.index;else{if(45!==c)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var i=this.scanner.source[this.scanner.index];if("{"===i||"<"===i)break;++this.scanner.index,t+=i,o.Character.isLineTerminator(i.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===i&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var n={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(n)),n},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new a.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=t;this.expectJSX(":");var n=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(i,n))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var r=t;this.expectJSX(".");var o=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(r,o))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),i=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=i;this.expectJSX(":");var r=this.parseJSXIdentifier();e=this.finalize(t,new a.JSXNamespacedName(n,r))}else e=i;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var i=this.getTokenRaw(t);return this.finalize(e,new c.Literal(t.value,i))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),i=null;return this.matchJSX("=")&&(this.expectJSX("="),i=this.parseJSXAttributeValue()),this.finalize(e,new a.JSXAttribute(t,i))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),i=this.parseJSXAttributes(),n=this.matchJSX("/");return n&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(t,n,i))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new a.JSXClosingElement(t))}var i=this.parseJSXElementName(),n=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(i,r,n))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new a.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new a.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),i=this.nextJSXText();if(i.start<i.end){var n=this.getTokenRaw(i),r=this.finalize(t,new a.JSXText(i.value,n));e.push(r)}if("{"!==this.scanner.source[this.scanner.index])break;var o=this.parseJSXExpressionContainer();e.push(o)}return e},t.prototype.parseComplexJSXElement=function(e){for(var t=[];!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());var i=this.createJSXChildNode(),n=this.parseJSXBoundaryElement();if(n.type===s.JSXSyntax.JSXOpeningElement){var r=n;if(r.selfClosing){var o=this.finalize(i,new a.JSXElement(r,[],null));e.children.push(o)}else t.push(e),e={node:i,opening:r,closing:null,children:[]}}if(n.type===s.JSXSyntax.JSXClosingElement){e.closing=n;var c=h(e.opening.name);if(c!==h(e.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",c),!(t.length>0))break;o=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(o),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),i=[],n=null;if(!t.selfClosing){var r=this.parseComplexJSXElement({node:e,opening:t,closing:n,children:i});i=r.children,n=r.closing}return this.finalize(e,new a.JSXElement(t,i,n))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(l.Parser);t.JSXParser=p},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&i.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&i.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var n=i(6),r=function(e){this.type=n.JSXSyntax.JSXClosingElement,this.name=e};t.JSXClosingElement=r;var o=function(e,t,i){this.type=n.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=i};t.JSXElement=o;var a=function(){this.type=n.JSXSyntax.JSXEmptyExpression};t.JSXEmptyExpression=a;var s=function(e){this.type=n.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXExpressionContainer=s;var c=function(e){this.type=n.JSXSyntax.JSXIdentifier,this.name=e};t.JSXIdentifier=c;var l=function(e,t){this.type=n.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXMemberExpression=l;var u=function(e,t){this.type=n.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXAttribute=u;var d=function(e,t){this.type=n.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXNamespacedName=d;var h=function(e,t,i){this.type=n.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=i};t.JSXOpeningElement=h;var p=function(e){this.type=n.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXSpreadAttribute=p;var m=function(e,t){this.type=n.JSXSyntax.JSXText,this.value=e,this.raw=t};t.JSXText=m},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=function(e){this.type=n.Syntax.ArrayExpression,this.elements=e};t.ArrayExpression=r;var o=function(e){this.type=n.Syntax.ArrayPattern,this.elements=e};t.ArrayPattern=o;var a=function(e,t,i){this.type=n.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=i,this.async=!1};t.ArrowFunctionExpression=a;var s=function(e,t,i){this.type=n.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=i};t.AssignmentExpression=s;var c=function(e,t){this.type=n.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AssignmentPattern=c;var l=function(e,t,i){this.type=n.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=i,this.async=!0};t.AsyncArrowFunctionExpression=l;var u=function(e,t,i){this.type=n.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=i,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionDeclaration=u;var d=function(e,t,i){this.type=n.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=i,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=d;var h=function(e){this.type=n.Syntax.AwaitExpression,this.argument=e};t.AwaitExpression=h;var p=function(e,t,i){var r="||"===e||"&&"===e;this.type=r?n.Syntax.LogicalExpression:n.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=i};t.BinaryExpression=p;var m=function(e){this.type=n.Syntax.BlockStatement,this.body=e};t.BlockStatement=m;var f=function(e){this.type=n.Syntax.BreakStatement,this.label=e};t.BreakStatement=f;var g=function(e,t){this.type=n.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CallExpression=g;var _=function(e,t){this.type=n.Syntax.CatchClause,this.param=e,this.body=t};t.CatchClause=_;var b=function(e){this.type=n.Syntax.ClassBody,this.body=e};t.ClassBody=b;var v=function(e,t,i){this.type=n.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=i};t.ClassDeclaration=v;var y=function(e,t,i){this.type=n.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=i};t.ClassExpression=y;var w=function(e,t){this.type=n.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ComputedMemberExpression=w;var x=function(e,t,i){this.type=n.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=i};t.ConditionalExpression=x;var N=function(e){this.type=n.Syntax.ContinueStatement,this.label=e};t.ContinueStatement=N;var k=function(){this.type=n.Syntax.DebuggerStatement};t.DebuggerStatement=k;var A=function(e,t){this.type=n.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.Directive=A;var C=function(e,t){this.type=n.Syntax.DoWhileStatement,this.body=e,this.test=t};t.DoWhileStatement=C;var O=function(){this.type=n.Syntax.EmptyStatement};t.EmptyStatement=O;var S=function(e){this.type=n.Syntax.ExportAllDeclaration,this.source=e};t.ExportAllDeclaration=S;var E=function(e){this.type=n.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportDefaultDeclaration=E;var F=function(e,t,i){this.type=n.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=i};t.ExportNamedDeclaration=F;var D=function(e,t){this.type=n.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExportSpecifier=D;var B=function(e){this.type=n.Syntax.ExpressionStatement,this.expression=e};t.ExpressionStatement=B;var L=function(e,t,i){this.type=n.Syntax.ForInStatement,this.left=e,this.right=t,this.body=i,this.each=!1};t.ForInStatement=L;var M=function(e,t,i){this.type=n.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=i};t.ForOfStatement=M;var T=function(e,t,i,r){this.type=n.Syntax.ForStatement,this.init=e,this.test=t,this.update=i,this.body=r};t.ForStatement=T;var R=function(e,t,i,r){this.type=n.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=i,this.generator=r,this.expression=!1,this.async=!1};t.FunctionDeclaration=R;var $=function(e,t,i,r){this.type=n.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=i,this.generator=r,this.expression=!1,this.async=!1};t.FunctionExpression=$;var j=function(e){this.type=n.Syntax.Identifier,this.name=e};t.Identifier=j;var I=function(e,t,i){this.type=n.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=i};t.IfStatement=I;var P=function(e,t){this.type=n.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDeclaration=P;var z=function(e){this.type=n.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportDefaultSpecifier=z;var U=function(e){this.type=n.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportNamespaceSpecifier=U;var W=function(e,t){this.type=n.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.ImportSpecifier=W;var H=function(e,t){this.type=n.Syntax.LabeledStatement,this.label=e,this.body=t};t.LabeledStatement=H;var q=function(e,t){this.type=n.Syntax.Literal,this.value=e,this.raw=t};t.Literal=q;var V=function(e,t){this.type=n.Syntax.MetaProperty,this.meta=e,this.property=t};t.MetaProperty=V;var G=function(e,t,i,r,o){this.type=n.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=i,this.kind=r,this.static=o};t.MethodDefinition=G;var K=function(e){this.type=n.Syntax.Program,this.body=e,this.sourceType="module"};t.Module=K;var X=function(e,t){this.type=n.Syntax.NewExpression,this.callee=e,this.arguments=t};t.NewExpression=X;var J=function(e){this.type=n.Syntax.ObjectExpression,this.properties=e};t.ObjectExpression=J;var Y=function(e){this.type=n.Syntax.ObjectPattern,this.properties=e};t.ObjectPattern=Y;var Z=function(e,t,i,r,o,a){this.type=n.Syntax.Property,this.key=t,this.computed=i,this.value=r,this.kind=e,this.method=o,this.shorthand=a};t.Property=Z;var Q=function(e,t,i,r){this.type=n.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:i,flags:r}};t.RegexLiteral=Q;var ee=function(e){this.type=n.Syntax.RestElement,this.argument=e};t.RestElement=ee;var te=function(e){this.type=n.Syntax.ReturnStatement,this.argument=e};t.ReturnStatement=te;var ie=function(e){this.type=n.Syntax.Program,this.body=e,this.sourceType="script"};t.Script=ie;var ne=function(e){this.type=n.Syntax.SequenceExpression,this.expressions=e};t.SequenceExpression=ne;var re=function(e){this.type=n.Syntax.SpreadElement,this.argument=e};t.SpreadElement=re;var oe=function(e,t){this.type=n.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.StaticMemberExpression=oe;var ae=function(){this.type=n.Syntax.Super};t.Super=ae;var se=function(e,t){this.type=n.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchCase=se;var ce=function(e,t){this.type=n.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.SwitchStatement=ce;var le=function(e,t){this.type=n.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TaggedTemplateExpression=le;var ue=function(e,t){this.type=n.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateElement=ue;var de=function(e,t){this.type=n.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.TemplateLiteral=de;var he=function(){this.type=n.Syntax.ThisExpression};t.ThisExpression=he;var pe=function(e){this.type=n.Syntax.ThrowStatement,this.argument=e};t.ThrowStatement=pe;var me=function(e,t,i){this.type=n.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=i};t.TryStatement=me;var fe=function(e,t){this.type=n.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UnaryExpression=fe;var ge=function(e,t,i){this.type=n.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=i};t.UpdateExpression=ge;var _e=function(e,t){this.type=n.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclaration=_e;var be=function(e,t){this.type=n.Syntax.VariableDeclarator,this.id=e,this.init=t};t.VariableDeclarator=be;var ve=function(e,t){this.type=n.Syntax.WhileStatement,this.test=e,this.body=t};t.WhileStatement=ve;var ye=function(e,t){this.type=n.Syntax.WithStatement,this.object=e,this.body=t};t.WithStatement=ye;var we=function(e,t){this.type=n.Syntax.YieldExpression,this.argument=e,this.delegate=t};t.YieldExpression=we},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var n=i(9),r=i(10),o=i(11),a=i(7),s=i(12),c=i(2),l=i(13),u="ArrowParameterPlaceHolder",d=function(){function e(e,t,i){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=i,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new s.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var r=Array.prototype.slice.call(arguments,1),o=e.replace(/%(\d)/g,(function(e,t){return n.assert(t<r.length,"Message reference must be in range"),r[t]})),a=this.lastMarker.index,s=this.lastMarker.line,c=this.lastMarker.column+1;throw this.errorHandler.createError(a,s,c,o)},e.prototype.tolerateError=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var r=Array.prototype.slice.call(arguments,1),o=e.replace(/%(\d)/g,(function(e,t){return n.assert(t<r.length,"Message reference must be in range"),r[t]})),a=this.lastMarker.index,s=this.scanner.lineNumber,c=this.lastMarker.column+1;this.errorHandler.tolerateError(a,s,c,o)},e.prototype.unexpectedTokenError=function(e,t){var i,n=t||o.Messages.UnexpectedToken;if(e?(t||(n=2===e.type?o.Messages.UnexpectedEOS:3===e.type?o.Messages.UnexpectedIdentifier:6===e.type?o.Messages.UnexpectedNumber:8===e.type?o.Messages.UnexpectedString:10===e.type?o.Messages.UnexpectedTemplate:o.Messages.UnexpectedToken,4===e.type&&(this.scanner.isFutureReservedWord(e.value)?n=o.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(n=o.Messages.StrictReservedWord))),i=e.value):i="ILLEGAL",n=n.replace("%0",i),e&&"number"==typeof e.lineNumber){var r=e.start,a=e.lineNumber,s=this.lastMarker.index-this.lastMarker.column,c=e.start-s+1;return this.errorHandler.createError(r,a,c,n)}return r=this.lastMarker.index,a=this.lastMarker.line,c=this.lastMarker.column+1,this.errorHandler.createError(r,a,c,n)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var i=e[t],n=void 0;n={type:i.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(i.slice[0],i.slice[1])},this.config.range&&(n.range=i.range),this.config.loc&&(n.loc=i.loc);var r={start:{line:i.loc.start.line,column:i.loc.start.column,offset:i.range[0]},end:{line:i.loc.end.line,column:i.loc.end.column,offset:i.range[1]}};this.delegate(n,r)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t={type:l.TokenName[e.type],value:this.getTokenRaw(e)};if(this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===e.type){var i=e.pattern,n=e.flags;t.regex={pattern:i,flags:n}}return t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&3===t.type&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&2!==t.type&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},e.prototype.startNode=function(e,t){void 0===t&&(t=0);var i=e.start-e.lineStart,n=e.lineNumber;return i<0&&(i+=t,n--),{index:e.start,line:n,column:i}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var i={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,i)}return t},e.prototype.expect=function(e){var t=this.nextToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;7===e.type&&","===e.value?this.nextToken():7===e.type&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,o.Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();4===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return 7===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return 4===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return 3===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,i=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=i,this.context.firstCoverInitializedNameError=n,r},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,i=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&i,this.context.firstCoverInitializedNameError=n||this.context.firstCoverInitializedNameError,r},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,i,n=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(n,new a.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),i=this.getTokenRaw(t),e=this.finalize(n,new a.Literal(t.value,i));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),i=this.getTokenRaw(t),e=this.finalize(n,new a.Literal("true"===t.value,i));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),i=this.getTokenRaw(t),e=this.finalize(n,new a.Literal(null,i));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),i=this.getTokenRaw(t),e=this.finalize(n,new a.RegexLiteral(t.regex,i,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(n,new a.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(n,new a.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new a.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var i=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(i)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new a.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,i=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var n=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=i,n},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters(),n=this.parsePropertyMethod(i);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,i.params,n,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,i=this.context.await;this.context.allowYield=!1,this.context.await=!0;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.context.await=i,this.finalize(e,new a.AsyncFunctionExpression(null,n.params,r))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),i=this.nextToken();switch(i.type){case 8:case 6:this.context.strict&&i.octal&&this.tolerateUnexpectedToken(i,o.Messages.StrictOctalLiteral);var n=this.getTokenRaw(i);e=this.finalize(t,new a.Literal(i.value,n));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new a.Identifier(i.value));break;case 7:"["===i.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(i);break;default:e=this.throwUnexpectedToken(i)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===c.Syntax.Identifier&&e.name===t||e.type===c.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,i=this.createNode(),n=this.lookahead,r=null,s=null,c=!1,l=!1,u=!1,d=!1;if(3===n.type){var h=n.value;this.nextToken(),c=this.match("["),r=(d=!(this.hasLineTerminator||"async"!==h||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(i,new a.Identifier(h))}else this.match("*")?this.nextToken():(c=this.match("["),r=this.parseObjectPropertyKey());var p=this.qualifiedPropertyName(this.lookahead);if(3===n.type&&!d&&"get"===n.value&&p)t="get",c=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod();else if(3===n.type&&!d&&"set"===n.value&&p)t="set",c=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseSetterMethod();else if(7===n.type&&"*"===n.value&&p)t="init",c=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),l=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!d)!c&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),s=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))s=d?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),l=!0;else if(3===n.type)if(h=this.finalize(i,new a.Identifier(n.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),u=!0;var m=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(i,new a.AssignmentPattern(h,m))}else u=!0,s=h;else this.throwUnexpectedToken(this.nextToken());return this.finalize(i,new a.Property(t,r,c,s,l,u))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],i={value:!1};!this.match("}");)t.push(this.parseObjectProperty(i)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new a.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){n.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),i=t.value,r=t.cooked;return this.finalize(e,new a.TemplateElement({raw:i,cooked:r},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),i=t.value,n=t.cooked;return this.finalize(e,new a.TemplateElement({raw:i,cooked:n},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],i=[],n=this.parseTemplateHead();for(i.push(n);!n.tail;)t.push(this.parseExpression()),n=this.parseTemplateElement(),i.push(n);return this.finalize(e,new a.TemplateLiteral(i,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case c.Syntax.Identifier:case c.Syntax.MemberExpression:case c.Syntax.RestElement:case c.Syntax.AssignmentPattern:break;case c.Syntax.SpreadElement:e.type=c.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case c.Syntax.ArrayExpression:e.type=c.Syntax.ArrayPattern;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case c.Syntax.ObjectExpression:for(e.type=c.Syntax.ObjectPattern,t=0;t<e.properties.length;t++)this.reinterpretExpressionAsPattern(e.properties[t].value);break;case c.Syntax.AssignmentExpression:e.type=c.Syntax.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:u,params:[],async:!1};else{var t=this.lookahead,i=[];if(this.match("..."))e=this.parseRestElement(i),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:u,params:[e],async:!1};else{var n=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o<r.length;o++)this.reinterpretExpressionAsPattern(r[o]);n=!0,e={type:u,params:r,async:!1}}else if(this.match("...")){for(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),r.push(this.parseRestElement(i)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1,o=0;o<r.length;o++)this.reinterpretExpressionAsPattern(r[o]);n=!0,e={type:u,params:r,async:!1}}else r.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(n)break}n||(e=this.finalize(this.startNode(t),new a.SequenceExpression(r)))}if(!n){if(this.expect(")"),this.match("=>")&&(e.type===c.Syntax.Identifier&&"yield"===e.name&&(n=!0,e={type:u,params:[e],async:!1}),!n)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===c.Syntax.SequenceExpression)for(o=0;o<e.expressions.length;o++)this.reinterpretExpressionAsPattern(e.expressions[o]);else this.reinterpretExpressionAsPattern(e);var s=e.type===c.Syntax.SequenceExpression?e.expressions:[e];e={type:u,params:s,async:!1}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return 3===e.type||4===e.type||1===e.type||5===e.type},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new a.Identifier(t.value))},e.prototype.parseNewExpression=function(){var e,t=this.createNode(),i=this.parseIdentifierName();if(n.assert("new"===i.name,"New expression must start with `new`"),this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var r=this.parseIdentifierName();e=new a.MetaProperty(i,r)}else this.throwUnexpectedToken(this.lookahead);else{var o=this.isolateCoverGrammar(this.parseLeftHandSideExpression),s=this.match("(")?this.parseArguments():[];e=new a.NewExpression(o,s),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(t,e)},e.prototype.parseAsyncArgument=function(){var e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e},e.prototype.parseAsyncArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e,t=this.lookahead,i=this.matchContextualKeyword("async"),n=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(e=this.createNode(),this.nextToken(),e=this.finalize(e,new a.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):e=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var r=this.parseIdentifierName();e=this.finalize(this.startNode(t),new a.StaticMemberExpression(e,r))}else if(this.match("(")){var o=i&&t.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var s=o?this.parseAsyncArguments():this.parseArguments();if(e=this.finalize(this.startNode(t),new a.CallExpression(e,s)),o&&this.match("=>")){for(var c=0;c<s.length;++c)this.reinterpretExpressionAsPattern(s[c]);e={type:u,params:s,async:!0}}}else if(this.match("["))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("["),r=this.isolateCoverGrammar(this.parseExpression),this.expect("]"),e=this.finalize(this.startNode(t),new a.ComputedMemberExpression(e,r));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var l=this.parseTemplateLiteral();e=this.finalize(this.startNode(t),new a.TaggedTemplateExpression(e,l))}return this.context.allowIn=n,e},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new a.Super)},e.prototype.parseLeftHandSideExpression=function(){n.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var i=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new a.ComputedMemberExpression(t,i))}else if(this.match("."))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("."),i=this.parseIdentifierName(),t=this.finalize(e,new a.StaticMemberExpression(t,i));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var r=this.parseTemplateLiteral();t=this.finalize(e,new a.TaggedTemplateExpression(t,r))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var i=this.startNode(t),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===c.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(o.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment);var r=!0;e=this.finalize(i,new a.UpdateExpression(n.value,e,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===c.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(o.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var s=this.nextToken().value;r=!1,e=this.finalize(this.startNode(t),new a.UpdateExpression(s,e,r))}return e},e.prototype.parseAwaitExpression=function(){var e=this.createNode();this.nextToken();var t=this.parseUnaryExpression();return this.finalize(e,new a.AwaitExpression(t))},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),i=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new a.UnaryExpression(i.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===c.Syntax.Identifier&&this.tolerateError(o.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(t.type!==c.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=t,n=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new a.BinaryExpression("**",i,n))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return 7===e.type?this.operatorPrecedence[t]||0:4===e.type&&("instanceof"===t||this.context.allowIn&&"in"===t)?7:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),i=this.lookahead,n=this.binaryPrecedence(i);if(n>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var r=[e,this.lookahead],o=t,s=this.isolateCoverGrammar(this.parseExponentiationExpression),c=[o,i.value,s],l=[n];!((n=this.binaryPrecedence(this.lookahead))<=0);){for(;c.length>2&&n<=l[l.length-1];){s=c.pop();var u=c.pop();l.pop(),o=c.pop(),r.pop();var d=this.startNode(r[r.length-1]);c.push(this.finalize(d,new a.BinaryExpression(u,o,s)))}c.push(this.nextToken().value),l.push(n),r.push(this.lookahead),c.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var h=c.length-1;t=c[h];for(var p=r.pop();h>1;){var m=r.pop(),f=p&&p.lineStart;d=this.startNode(m,f),u=c[h-1],t=this.finalize(d,new a.BinaryExpression(u,c[h-2],t)),h-=2,p=m}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var i=this.context.allowIn;this.context.allowIn=!0;var n=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=i,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new a.ConditionalExpression(t,n,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case c.Syntax.Identifier:this.validateParam(e,t,t.name);break;case c.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case c.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case c.Syntax.ArrayPattern:for(var i=0;i<t.elements.length;i++)null!==t.elements[i]&&this.checkPatternParam(e,t.elements[i]);break;case c.Syntax.ObjectPattern:for(i=0;i<t.properties.length;i++)this.checkPatternParam(e,t.properties[i].value)}e.simple=e.simple&&t instanceof a.Identifier},e.prototype.reinterpretAsCoverFormalsList=function(e){var t,i=[e],n=!1;switch(e.type){case c.Syntax.Identifier:break;case u:i=e.params,n=e.async;break;default:return null}t={simple:!0,paramSet:{}};for(var r=0;r<i.length;++r)(a=i[r]).type===c.Syntax.AssignmentPattern?a.right.type===c.Syntax.YieldExpression&&(a.right.argument&&this.throwUnexpectedToken(this.lookahead),a.right.type=c.Syntax.Identifier,a.right.name="yield",delete a.right.argument,delete a.right.delegate):n&&a.type===c.Syntax.Identifier&&"await"===a.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(t,a),i[r]=a;if(this.context.strict||!this.context.allowYield)for(r=0;r<i.length;++r){var a;(a=i[r]).type===c.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(t.message===o.Messages.StrictParamDupe){var s=this.context.strict?t.stricted:t.firstRestricted;this.throwUnexpectedToken(s,t.message)}return{simple:t.simple,params:i,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,i=t;if(e=this.parseConditionalExpression(),3===i.type&&i.lineNumber===this.lookahead.lineNumber&&"async"===i.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var n=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(n),e={type:u,params:[n],async:!0}}if(e.type===u||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=e.async,s=this.reinterpretAsCoverFormalsList(e);if(s){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var l=this.context.strict,d=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var h=this.context.allowYield,p=this.context.await;this.context.allowYield=!0,this.context.await=r;var m=this.startNode(t);this.expect("=>");var f=void 0;if(this.match("{")){var g=this.context.allowIn;this.context.allowIn=!0,f=this.parseFunctionSourceElements(),this.context.allowIn=g}else f=this.isolateCoverGrammar(this.parseAssignmentExpression);var _=f.type!==c.Syntax.BlockStatement;this.context.strict&&s.firstRestricted&&this.throwUnexpectedToken(s.firstRestricted,s.message),this.context.strict&&s.stricted&&this.tolerateUnexpectedToken(s.stricted,s.message),e=r?this.finalize(m,new a.AsyncArrowFunctionExpression(s.params,f,_)):this.finalize(m,new a.ArrowFunctionExpression(s.params,f,_)),this.context.strict=l,this.context.allowStrictDirective=d,this.context.allowYield=h,this.context.await=p}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===c.Syntax.Identifier){var b=e;this.scanner.isRestrictedWord(b.name)&&this.tolerateUnexpectedToken(i,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(b.name)&&this.tolerateUnexpectedToken(i,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var v=(i=this.nextToken()).value,y=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new a.AssignmentExpression(v,e,y)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var i=[];for(i.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),i.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new a.SequenceExpression(i))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new a.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var i=this.createNode(),n=this.parsePattern([],e);this.context.strict&&n.type===c.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(o.Messages.StrictVarName);var r=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&n.type!==c.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(i,new a.VariableDeclarator(n,r))},e.prototype.parseBindingList=function(e,t){for(var i=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),i.push(this.parseLexicalBinding(e,t));return i},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),i=this.nextToken().value;n.assert("let"===i||"const"===i,"Lexical declaration must be either let or const");var r=this.parseBindingList(i,e);return this.consumeSemicolon(),this.finalize(t,new a.VariableDeclaration(r,i))},e.prototype.parseBindingRestElement=function(e,t){var i=this.createNode();this.expect("...");var n=this.parsePattern(e,t);return this.finalize(i,new a.RestElement(n))},e.prototype.parseArrayPattern=function(e,t){var i=this.createNode();this.expect("[");for(var n=[];!this.match("]");)if(this.match(","))this.nextToken(),n.push(null);else{if(this.match("...")){n.push(this.parseBindingRestElement(e,t));break}n.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(i,new a.ArrayPattern(n))},e.prototype.parsePropertyPattern=function(e,t){var i,n,r=this.createNode(),o=!1,s=!1;if(3===this.lookahead.type){var c=this.lookahead;i=this.parseVariableIdentifier();var l=this.finalize(r,new a.Identifier(c.value));if(this.match("=")){e.push(c),s=!0,this.nextToken();var u=this.parseAssignmentExpression();n=this.finalize(this.startNode(c),new a.AssignmentPattern(l,u))}else this.match(":")?(this.expect(":"),n=this.parsePatternWithDefault(e,t)):(e.push(c),s=!0,n=l)}else o=this.match("["),i=this.parseObjectPropertyKey(),this.expect(":"),n=this.parsePatternWithDefault(e,t);return this.finalize(r,new a.Property("init",i,o,n,!1,s))},e.prototype.parseObjectPattern=function(e,t){var i=this.createNode(),n=[];for(this.expect("{");!this.match("}");)n.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(i,new a.ObjectPattern(n))},e.prototype.parsePattern=function(e,t){var i;return this.match("[")?i=this.parseArrayPattern(e,t):this.match("{")?i=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),e.push(this.lookahead),i=this.parseVariableIdentifier(t)),i},e.prototype.parsePatternWithDefault=function(e,t){var i=this.lookahead,n=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,n=this.finalize(this.startNode(i),new a.AssignmentPattern(n,o))}return n},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),i=this.nextToken();return 4===i.type&&"yield"===i.value?this.context.strict?this.tolerateUnexpectedToken(i,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(i):3!==i.type?this.context.strict&&4===i.type&&this.scanner.isStrictModeReservedWord(i.value)?this.tolerateUnexpectedToken(i,o.Messages.StrictReservedWord):(this.context.strict||"let"!==i.value||"var"!==e)&&this.throwUnexpectedToken(i):(this.context.isModule||this.context.await)&&3===i.type&&"await"===i.value&&this.tolerateUnexpectedToken(i),this.finalize(t,new a.Identifier(i.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),i=this.parsePattern([],"var");this.context.strict&&i.type===c.Syntax.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(o.Messages.StrictVarName);var n=null;return this.match("=")?(this.nextToken(),n=this.isolateCoverGrammar(this.parseAssignmentExpression)):i.type===c.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new a.VariableDeclarator(i,n))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},i=[];for(i.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),i.push(this.parseVariableDeclaration(t));return i},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new a.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new a.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),i=null;this.expectKeyword("if"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),i=this.parseIfClause())),this.finalize(t,new a.IfStatement(n,e,i))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var i=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new a.DoWhileStatement(i,n))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var n=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=n}return this.finalize(t,new a.WhileStatement(i,e))},e.prototype.parseForStatement=function(){var e,t,i,n=null,r=null,s=null,l=!0,u=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){n=this.createNode(),this.nextToken();var d=this.context.allowIn;this.context.allowIn=!1;var h=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=d,1===h.length&&this.matchKeyword("in")){var p=h[0];p.init&&(p.id.type===c.Syntax.ArrayPattern||p.id.type===c.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),n=this.finalize(n,new a.VariableDeclaration(h,"var")),this.nextToken(),e=n,t=this.parseExpression(),n=null}else 1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(n=this.finalize(n,new a.VariableDeclaration(h,"var")),this.nextToken(),e=n,t=this.parseAssignmentExpression(),n=null,l=!1):(n=this.finalize(n,new a.VariableDeclaration(h,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){n=this.createNode();var m=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(d=this.context.allowIn,this.context.allowIn=!1,h=this.parseBindingList(m,{inFor:!0}),this.context.allowIn=d,1===h.length&&null===h[0].init&&this.matchKeyword("in")?(n=this.finalize(n,new a.VariableDeclaration(h,m)),this.nextToken(),e=n,t=this.parseExpression(),n=null):1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(n=this.finalize(n,new a.VariableDeclaration(h,m)),this.nextToken(),e=n,t=this.parseAssignmentExpression(),n=null,l=!1):(this.consumeSemicolon(),n=this.finalize(n,new a.VariableDeclaration(h,m)))):(n=this.finalize(n,new a.Identifier(m)),this.nextToken(),e=n,t=this.parseExpression(),n=null)}else{var f=this.lookahead;if(d=this.context.allowIn,this.context.allowIn=!1,n=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=d,this.matchKeyword("in"))this.context.isAssignmentTarget&&n.type!==c.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(n),e=n,t=this.parseExpression(),n=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&n.type!==c.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(n),e=n,t=this.parseAssignmentExpression(),n=null,l=!1;else{if(this.match(",")){for(var g=[n];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));n=this.finalize(this.startNode(f),new a.SequenceExpression(g))}this.expect(";")}}if(void 0===e&&(this.match(";")||(r=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),i=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var _=this.context.inIteration;this.context.inIteration=!0,i=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=_}return void 0===e?this.finalize(u,new a.ForStatement(n,r,s,i)):l?this.finalize(u,new a.ForInStatement(e,t,i)):this.finalize(u,new a.ForOfStatement(e,t,i))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var i=this.parseVariableIdentifier();t=i;var n="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,n)||this.throwError(o.Messages.UnknownLabel,i.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(o.Messages.IllegalContinue),this.finalize(e,new a.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var i=this.parseVariableIdentifier(),n="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,n)||this.throwError(o.Messages.UnknownLabel,i.name),t=i}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(o.Messages.IllegalBreak),this.finalize(e,new a.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new a.WithStatement(i,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var i=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)i.push(this.parseStatementListItem());return this.finalize(t,new a.SwitchCase(e,i))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var i=this.context.inSwitch;this.context.inSwitch=!0;var n=[],r=!1;for(this.expect("{");!this.match("}");){var s=this.parseSwitchCase();null===s.test&&(r&&this.throwError(o.Messages.MultipleDefaultsInSwitch),r=!0),n.push(s)}return this.expect("}"),this.context.inSwitch=i,this.finalize(e,new a.SwitchStatement(t,n))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),i=this.parseExpression();if(i.type===c.Syntax.Identifier&&this.match(":")){this.nextToken();var n=i,r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(o.Messages.Redeclaration,"Label",n.name),this.context.labelSet[r]=!0;var s=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),s=this.parseClassDeclaration();else if(this.matchKeyword("function")){var l=this.lookahead,u=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(l,o.Messages.StrictFunction):u.generator&&this.tolerateUnexpectedToken(l,o.Messages.GeneratorInLegacyContext),s=u}else s=this.parseStatement();delete this.context.labelSet[r],e=new a.LabeledStatement(n,s)}else this.consumeSemicolon(),e=new a.ExpressionStatement(i);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],i=this.parsePattern(t),n={},r=0;r<t.length;r++){var s="$"+t[r].value;Object.prototype.hasOwnProperty.call(n,s)&&this.tolerateError(o.Messages.DuplicateBinding,t[r].value),n[s]=!0}this.context.strict&&i.type===c.Syntax.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(o.Messages.StrictCatchVariable),this.expect(")");var l=this.parseBlock();return this.finalize(e,new a.CatchClause(i,l))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),i=this.matchKeyword("catch")?this.parseCatchClause():null,n=this.matchKeyword("finally")?this.parseFinallyClause():null;return i||n||this.throwError(o.Messages.NoCatchOrFinally),this.finalize(e,new a.TryStatement(t,i,n))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new a.DebuggerStatement)},e.prototype.parseStatement=function(){var e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:e=this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),i=this.context.labelSet,n=this.context.inIteration,r=this.context.inSwitch,o=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=i,this.context.inIteration=n,this.context.inSwitch=r,this.context.inFunctionBody=o,this.finalize(e,new a.BlockStatement(t))},e.prototype.validateParam=function(e,t,i){var n="$"+i;this.context.strict?(this.scanner.isRestrictedWord(i)&&(e.stricted=t,e.message=o.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=o.Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(i)?(e.firstRestricted=t,e.message=o.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(i)?(e.firstRestricted=t,e.message=o.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.message=o.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,n,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[n]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var i=this.parsePattern(e);return this.match("=")&&this.throwError(o.Messages.DefaultRestParameter),this.match(")")||this.throwError(o.Messages.ParameterAfterRestParameter),this.finalize(t,new a.RestElement(i))},e.prototype.parseFormalParameter=function(e){for(var t=[],i=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),n=0;n<t.length;n++)this.validateParam(e,t[n],t[n].value);e.simple=e.simple&&i instanceof a.Identifier,e.params.push(i)},e.prototype.parseFormalParameters=function(e){var t;if(t={simple:!0,params:[],firstRestricted:e},this.expect("("),!this.match(")"))for(t.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(t),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.matchAsyncFunction=function(){var e=this.matchContextualKeyword("async");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var i=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===i.lineNumber&&4===i.type&&"function"===i.value}return e},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode(),i=this.matchContextualKeyword("async");i&&this.nextToken(),this.expectKeyword("function");var n,r=!i&&this.match("*");r&&this.nextToken();var s=null,c=null;if(!e||!this.match("(")){var l=this.lookahead;s=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(l.value)&&this.tolerateUnexpectedToken(l,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(l.value)?(c=l,n=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(l.value)&&(c=l,n=o.Messages.StrictReservedWord)}var u=this.context.await,d=this.context.allowYield;this.context.await=i,this.context.allowYield=!r;var h=this.parseFormalParameters(c),p=h.params,m=h.stricted;c=h.firstRestricted,h.message&&(n=h.message);var f=this.context.strict,g=this.context.allowStrictDirective;this.context.allowStrictDirective=h.simple;var _=this.parseFunctionSourceElements();return this.context.strict&&c&&this.throwUnexpectedToken(c,n),this.context.strict&&m&&this.tolerateUnexpectedToken(m,n),this.context.strict=f,this.context.allowStrictDirective=g,this.context.await=u,this.context.allowYield=d,i?this.finalize(t,new a.AsyncFunctionDeclaration(s,p,_)):this.finalize(t,new a.FunctionDeclaration(s,p,_,r))},e.prototype.parseFunctionExpression=function(){var e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");var i,n=!t&&this.match("*");n&&this.nextToken();var r,s=null,c=this.context.await,l=this.context.allowYield;if(this.context.await=t,this.context.allowYield=!n,!this.match("(")){var u=this.lookahead;s=this.context.strict||n||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(u.value)&&this.tolerateUnexpectedToken(u,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(u.value)?(r=u,i=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(u.value)&&(r=u,i=o.Messages.StrictReservedWord)}var d=this.parseFormalParameters(r),h=d.params,p=d.stricted;r=d.firstRestricted,d.message&&(i=d.message);var m=this.context.strict,f=this.context.allowStrictDirective;this.context.allowStrictDirective=d.simple;var g=this.parseFunctionSourceElements();return this.context.strict&&r&&this.throwUnexpectedToken(r,i),this.context.strict&&p&&this.tolerateUnexpectedToken(p,i),this.context.strict=m,this.context.allowStrictDirective=f,this.context.await=c,this.context.allowYield=l,t?this.finalize(e,new a.AsyncFunctionExpression(s,h,g)):this.finalize(e,new a.FunctionExpression(s,h,g,n))},e.prototype.parseDirective=function(){var e=this.lookahead,t=this.createNode(),i=this.parseExpression(),n=i.type===c.Syntax.Literal?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,n?new a.Directive(i,n):new a.ExpressionStatement(i))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var i=this.lookahead;if(8!==i.type)break;var n=this.parseDirective();t.push(n);var r=n.directive;if("string"!=typeof r)break;"use strict"===r?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,o.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(i,o.Messages.IllegalLanguageModeDirective)):!e&&i.octal&&(e=i)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters();i.params.length>0&&this.tolerateError(o.Messages.BadGetterArity);var n=this.parsePropertyMethod(i);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,i.params,n,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters();1!==i.params.length?this.tolerateError(o.Messages.BadSetterArity):i.params[0]instanceof a.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var n=this.parsePropertyMethod(i);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,i.params,n,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters();this.context.allowYield=!1;var n=this.parsePropertyMethod(i);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,i.params,n,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,i=!1;if(!this.hasLineTerminator){var n=this.context.allowYield;this.context.allowYield=!1,(i=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=n}return this.finalize(e,new a.YieldExpression(t,i))},e.prototype.parseClassElement=function(e){var t=this.lookahead,i=this.createNode(),n="",r=null,s=null,c=!1,l=!1,u=!1,d=!1;if(this.match("*"))this.nextToken();else if(c=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,u=!0,c=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var h=this.lookahead.value;":"!==h&&"("!==h&&"*"!==h&&(d=!0,t=this.lookahead,r=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,o.Messages.ConstructorIsAsync))}var p=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&p?(n="get",c=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod()):"set"===t.value&&p&&(n="set",c=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseSetterMethod()):7===t.type&&"*"===t.value&&p&&(n="init",c=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),l=!0),!n&&r&&this.match("(")&&(n="init",s=d?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),l=!0),n||this.throwUnexpectedToken(this.lookahead),"init"===n&&(n="method"),c||(u&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(t,o.Messages.StaticPrototype),!u&&this.isPropertyKey(r,"constructor")&&(("method"!==n||!l||s&&s.generator)&&this.throwUnexpectedToken(t,o.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,o.Messages.DuplicateConstructor):e.value=!0,n="constructor")),this.finalize(i,new a.MethodDefinition(r,c,s,n,u))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new a.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),i=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=i,this.finalize(t,new a.ClassDeclaration(n,r,o))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var i=3===this.lookahead.type?this.parseVariableIdentifier():null,n=null;this.matchKeyword("extends")&&(this.nextToken(),n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=t,this.finalize(e,new a.ClassExpression(i,n,r))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(o.Messages.InvalidModuleSpecifier);var t=this.nextToken(),i=this.getTokenRaw(t);return this.finalize(e,new a.Literal(t.value,i))},e.prototype.parseImportSpecifier=function(){var e,t,i=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(i,new a.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new a.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new a.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var i=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?i=i.concat(this.parseNamedImports()):this.match("*")?i.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(i.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?i.push(this.parseImportNamespaceSpecifier()):this.match("{")?i=i.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var n=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(n,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new a.ImportDeclaration(i,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),i=t;return this.matchContextualKeyword("as")&&(this.nextToken(),i=this.parseIdentifierName()),this.finalize(e,new a.ExportSpecifier(t,i))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var i=this.parseFunctionDeclaration(!0);e=this.finalize(t,new a.ExportDefaultDeclaration(i))}else this.matchKeyword("class")?(i=this.parseClassDeclaration(!0),e=this.finalize(t,new a.ExportDefaultDeclaration(i))):this.matchContextualKeyword("async")?(i=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new a.ExportDefaultDeclaration(i))):(this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value),i=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new a.ExportDefaultDeclaration(i)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var n=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(n,this.lookahead.value)}this.nextToken();var r=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new a.ExportAllDeclaration(r))}else if(4===this.lookahead.type){switch(i=void 0,this.lookahead.value){case"let":case"const":i=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":i=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new a.ExportNamedDeclaration(i,[],null))}else if(this.matchAsyncFunction())i=this.parseFunctionDeclaration(),e=this.finalize(t,new a.ExportNamedDeclaration(i,[],null));else{var s=[],c=null,l=!1;for(this.expect("{");!this.match("}");)l=l||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),c=this.parseModuleSpecifier(),this.consumeSemicolon()):l?(n=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause,this.throwError(n,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new a.ExportNamedDeclaration(null,s,c))}return e},e}();t.Parser=d},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var i=new Error(e);try{throw i}catch(n){Object.create&&Object.defineProperty&&(i=Object.create(n),Object.defineProperty(i,"column",{value:t}))}return i},e.prototype.createError=function(e,t,i,n){var r="Line "+t+": "+n,o=this.constructError(r,i);return o.index=e,o.lineNumber=t,o.description=n,o},e.prototype.throwError=function(e,t,i,n){throw this.createError(e,t,i,n)},e.prototype.tolerateError=function(e,t,i,n){var r=this.createError(e,t,i,n);if(!this.tolerant)throw r;this.recordError(r)},e}();t.ErrorHandler=i},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var n=i(9),r=i(4),o=i(11);function a(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function s(e){return"01234567".indexOf(e)}var c=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,i,n=[];for(this.trackComment&&(n=[],t=this.index-e,i={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(++this.index,r.Character.isLineTerminator(o)){if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart-1};var a={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:i};n.push(a)}return 13===o&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,n}}return this.trackComment&&(i.end={line:this.lineNumber,column:this.index-this.lineStart},a={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:i},n.push(a)),n},e.prototype.skipMultiLineComment=function(){var e,t,i=[];for(this.trackComment&&(i=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var n=this.source.charCodeAt(this.index);if(r.Character.isLineTerminator(n))13===n&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===n){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};i.push(o)}return i}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},i.push(o)),this.tolerateUnexpectedToken(),i},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var i=this.source.charCodeAt(this.index);if(r.Character.isWhiteSpace(i))++this.index;else if(r.Character.isLineTerminator(i))++this.index,13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===i)if(47===(i=this.source.charCodeAt(this.index+1))){this.index+=2;var n=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(n)),t=!0}else{if(42!==i)break;this.index+=2,n=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(n))}else if(t&&45===i){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,n=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(n))}else{if(60!==i||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,n=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(n))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var i=this.source.charCodeAt(e+1);i>=56320&&i<=57343&&(t=1024*(t-55296)+i-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,i=0,n=0;n<t;++n){if(this.eof()||!r.Character.isHexDigit(this.source.charCodeAt(this.index)))return null;i=16*i+a(this.source[this.index++])}return String.fromCharCode(i)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],r.Character.isHexDigit(e.charCodeAt(0)));)t=16*t+a(e);return(t>1114111||"}"!==e)&&this.throwUnexpectedToken(),r.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!r.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),i=r.Character.fromCodePoint(t);for(this.index+=i.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),i=e);!this.eof()&&(t=this.codePointAt(this.index),r.Character.isIdentifierPart(t));)i+=e=r.Character.fromCodePoint(t),this.index+=e.length,92===t&&(i=i.substr(0,i.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),i+=e);return i},e.prototype.octalToDecimal=function(e){var t="0"!==e,i=s(e);return!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,i=8*i+s(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(i=8*i+s(this.source[this.index++]))),{code:i,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,i=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===i.length?3:this.isKeyword(i)?4:"null"===i?5:"true"===i||"false"===i?1:3)&&t+i.length!==this.index){var n=this.index;this.index=t,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=n}return{type:e,value:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&r.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,i="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)i+=this.source[this.index++];return 0===i.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(r.Character.isIdentifierStart(t)||r.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(i,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var i="",n=!1;for(r.Character.isOctalDigit(e.charCodeAt(0))?(n=!0,i="0"+this.source[this.index++]):++this.index;!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index));)i+=this.source[this.index++];return n||0!==i.length||this.throwUnexpectedToken(),(r.Character.isIdentifierStart(this.source.charCodeAt(this.index))||r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(i,8),octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!r.Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];n.assert(r.Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var i="";if("."!==t){if(i=this.source[this.index++],t=this.source[this.index],"0"===i){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&r.Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)i+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(i+=this.source[this.index++];r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)i+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(i+=this.source[this.index++],"+"!==(t=this.source[this.index])&&"-"!==t||(i+=this.source[this.index++]),r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)i+=this.source[this.index++];else this.throwUnexpectedToken();return r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(i),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];n.assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var i=!1,a="";!this.eof();){var s=this.source[this.index++];if(s===t){t="";break}if("\\"===s)if((s=this.source[this.index++])&&r.Character.isLineTerminator(s.charCodeAt(0)))++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(s){case"u":if("{"===this.source[this.index])++this.index,a+=this.scanUnicodeCodePointEscape();else{var c=this.scanHexEscape(s);null===c&&this.throwUnexpectedToken(),a+=c}break;case"x":var l=this.scanHexEscape(s);null===l&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),a+=l;break;case"n":a+="\n";break;case"r":a+="\r";break;case"t":a+="\t";break;case"b":a+="\b";break;case"f":a+="\f";break;case"v":a+="\v";break;case"8":case"9":a+=s,this.tolerateUnexpectedToken();break;default:if(s&&r.Character.isOctalDigit(s.charCodeAt(0))){var u=this.octalToDecimal(s);i=u.octal||i,a+=String.fromCharCode(u.code)}else a+=s}else{if(r.Character.isLineTerminator(s.charCodeAt(0)))break;a+=s}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:a,octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,i=this.index,n="`"===this.source[i],a=!1,s=2;for(++this.index;!this.eof();){var c=this.source[this.index++];if("`"===c){s=1,a=!0,t=!0;break}if("$"===c){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=c}else if("\\"===c)if(c=this.source[this.index++],r.Character.isLineTerminator(c.charCodeAt(0)))++this.lineNumber,"\r"===c&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(c){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{var l=this.index,u=this.scanHexEscape(c);null!==u?e+=u:(this.index=l,e+=c)}break;case"x":var d=this.scanHexEscape(c);null===d&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),e+=d;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===c?(r.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral),e+="\0"):r.Character.isOctalDigit(c.charCodeAt(0))?this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral):e+=c}else r.Character.isLineTerminator(c.charCodeAt(0))?(++this.lineNumber,"\r"===c&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=c}return t||this.throwUnexpectedToken(),n||this.curlyStack.pop(),{type:10,value:this.source.slice(i+1,this.index-s),cooked:e,head:n,tail:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:i,end:this.index}},e.prototype.testRegExp=function(e,t){var i=e,n=this;t.indexOf("u")>=0&&(i=i.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,i){var r=parseInt(t||i,16);return r>1114111&&n.throwUnexpectedToken(o.Messages.InvalidRegExp),r<=65535?String.fromCharCode(r):"￿"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(i)}catch(r){this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(a){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];n.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],i=!1,a=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],r.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t+=e;else if(r.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(i)"]"===e&&(i=!1);else{if("/"===e){a=!0;break}"["===e&&(i=!0)}return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!r.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var i=this.index,n=this.scanHexEscape("u");if(null!==n)for(e+=n;i<this.index;++i)this.source[i];else this.index=i,e+="u";this.tolerateUnexpectedToken()}else this.tolerateUnexpectedToken()}return e},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),i=this.scanRegExpFlags();return{type:9,value:"",pattern:t,flags:i,regex:this.testRegExp(t,i),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return r.Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?r.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():r.Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&r.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=c},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:"",emsp:"",thinsp:"",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"",mdash:"—",lsquo:"",rsquo:"",sbquo:"",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"",Prime:"″",lsaquo:"",rsaquo:"",oline:"‾",frasl:"",euro:"€",image:"",weierp:"℘",real:"",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"",lowast:"",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"",cap:"∩",cup:"",int:"∫",there4:"∴",sim:"",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0});var n=i(10),r=i(12),o=i(13),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var i=this.values[this.paren-1];t="if"===i||"while"===i||"for"===i||"with"===i;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(n=this.values[this.curly-4])&&!this.beforeFunctionExpression(n);else if("function"===this.values[this.curly-4]){var n;t=!(n=this.values[this.curly-5])||!this.beforeFunctionExpression(n)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),s=function(){function e(e,t){this.errorHandler=new n.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var i=e[t],n=this.scanner.source.slice(i.slice[0],i.slice[1]),r={type:i.multiLine?"BlockComment":"LineComment",value:n};this.trackRange&&(r.range=i.range),this.trackLoc&&(r.loc=i.loc),this.buffer.push(r)}if(!this.scanner.eof()){var a=void 0;this.trackLoc&&(a={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var s="/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(s);var c={type:o.TokenName[s.type],value:this.scanner.source.slice(s.start,s.end)};if(this.trackRange&&(c.range=[s.start,s.end]),this.trackLoc&&(a.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},c.loc=a),9===s.type){var l=s.pattern,u=s.flags;c.regex={pattern:l,flags:u}}this.buffer.push(c)}}return this.buffer.shift()},e}();t.Tokenizer=s}]);for(var pb={},mb={},fb={byteLength:function(e){var t=xb(e),i=t[0],n=t[1];return 3*(i+n)/4-n},toByteArray:function(e){var t,i,n=xb(e),r=n[0],o=n[1],a=new bb(function(e,t,i){return 3*(t+i)/4-i}(0,r,o)),s=0,c=o>0?r-4:r;for(i=0;i<c;i+=4)t=_b[e.charCodeAt(i)]<<18|_b[e.charCodeAt(i+1)]<<12|_b[e.charCodeAt(i+2)]<<6|_b[e.charCodeAt(i+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;2===o&&(t=_b[e.charCodeAt(i)]<<2|_b[e.charCodeAt(i+1)]>>4,a[s++]=255&t);1===o&&(t=_b[e.charCodeAt(i)]<<10|_b[e.charCodeAt(i+1)]<<4|_b[e.charCodeAt(i+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t);return a},fromByteArray:function(e){for(var t,i=e.length,n=i%3,r=[],o=16383,a=0,s=i-n;a<s;a+=o)r.push(Nb(e,a,a+o>s?s:a+o));1===n?(t=e[i-1],r.push(gb[t>>2]+gb[t<<4&63]+"==")):2===n&&(t=(e[i-2]<<8)+e[i-1],r.push(gb[t>>10]+gb[t>>4&63]+gb[t<<2&63]+"="));return r.join("")}},gb=[],_b=[],bb="undefined"!=typeof Uint8Array?Uint8Array:Array,vb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yb=0,wb=vb.length;yb<wb;++yb)gb[yb]=vb[yb],_b[vb.charCodeAt(yb)]=yb;function xb(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function Nb(e,t,i){for(var n,r,o=[],a=t;a<i;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(gb[(r=n)>>18&63]+gb[r>>12&63]+gb[r>>6&63]+gb[63&r]);return o.join("")}_b["-".charCodeAt(0)]=62,_b["_".charCodeAt(0)]=63;var kb={};
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */function Ab(e){return Object.prototype.toString.call(e)}kb.read=function(e,t,i,n,r){var o,a,s=8*r-n-1,c=(1<<s)-1,l=c>>1,u=-7,d=i?r-1:0,h=i?-1:1,p=e[t+d];for(d+=h,o=p&(1<<-u)-1,p>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=h,u-=8);if(0===o)o=1-l;else{if(o===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=l}return(p?-1:1)*a*Math.pow(2,o-n)},kb.write=function(e,t,i,n,r,o){var a,s,c,l=8*o-r-1,u=(1<<l)-1,d=u>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,m=n?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*c-1)*Math.pow(2,r),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,r),a=0));r>=8;e[i+p]=255&s,p+=m,s/=256,r-=8);for(a=a<<r|s,l+=r;l>0;e[i+p]=255&a,p+=m,a/=256,l-=8);e[i+p-m]|=128*f},
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
function(e){const t=fb,i=kb,n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=function(e){+e!=e&&(e=0);return a.alloc(+e)},e.INSPECT_MAX_BYTES=50;const r=2147483647;function o(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return s(e,t,i)}function s(e,t,i){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const i=0|p(e,t);let n=o(i);const r=n.write(e,t);r!==i&&(n=n.slice(0,r));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(G(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return u(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer))return d(e,t,i);if("undefined"!=typeof SharedArrayBuffer&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return d(e,t,i);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,i);const r=function(e){if(a.isBuffer(e)){const t=0|h(e.length),i=o(t);return 0===i.length||e.copy(i,0,0,t),i}if(void 0!==e.length)return"number"!=typeof e.length||K(e.length)?o(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}(e);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return c(e),o(e<0?0:0|h(e))}function u(e){const t=e.length<0?0:0|h(e.length),i=o(t);for(let n=0;n<t;n+=1)i[n]=255&e[n];return i}function d(e,t,i){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(i||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i),Object.setPrototypeOf(n,a.prototype),n}function h(e){if(e>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const i=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===i)return 0;let r=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return q(e).length;default:if(r)return n?-1:H(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,i){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,i);case"utf8":case"utf-8":return k(this,t,i);case"ascii":return C(this,t,i);case"latin1":case"binary":return O(this,t,i);case"base64":return N(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function f(e,t,i){const n=e[t];e[t]=e[i],e[i]=n}function g(e,t,i,n,r){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),K(i=+i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:_(e,t,i,n,r);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):_(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function _(e,t,i,n,r){let o,a=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,i/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(r){let n=-1;for(o=i;o<s;o++)if(l(e,o)===l(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(i+c>s&&(i=s-c),o=i;o>=0;o--){let i=!0;for(let n=0;n<c;n++)if(l(e,o+n)!==l(t,n)){i=!1;break}if(i)return o}return-1}function b(e,t,i,n){i=Number(i)||0;const r=e.length-i;n?(n=Number(n))>r&&(n=r):n=r;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(K(n))return a;e[i+a]=n}return a}function v(e,t,i,n){return V(H(t,e.length-i),e,i,n)}function y(e,t,i,n){return V(function(e){const t=[];for(let i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,n)}function w(e,t,i,n){return V(q(t),e,i,n)}function x(e,t,i,n){return V(function(e,t){let i,n,r;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)i=e.charCodeAt(a),n=i>>8,r=i%256,o.push(r),o.push(n);return o}(t,e.length-i),e,i,n)}function N(e,i,n){return 0===i&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(i,n))}function k(e,t,i){i=Math.min(e.length,i);const n=[];let r=t;for(;r<i;){const t=e[r];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(r+a<=i){let i,n,s,c;switch(a){case 1:t<128&&(o=t);break;case 2:i=e[r+1],128==(192&i)&&(c=(31&t)<<6|63&i,c>127&&(o=c));break;case 3:i=e[r+1],n=e[r+2],128==(192&i)&&128==(192&n)&&(c=(15&t)<<12|(63&i)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:i=e[r+1],n=e[r+2],s=e[r+3],128==(192&i)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&i)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),r+=a}return function(e){const t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let i="",n=0;for(;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=A));return i}(n)}e.kMaxLength=r,a.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,i){return s(e,t,i)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,i){return function(e,t,i){return c(e),e<=0?o(e):void 0!==t?"string"==typeof i?o(e).fill(t,i):o(e).fill(t):o(e)}(e,t,i)},a.allocUnsafe=function(e){return l(e)},a.allocUnsafeSlow=function(e){return l(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(G(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let i=e.length,n=t.length;for(let r=0,o=Math.min(i,n);r<o;++r)if(e[r]!==t[r]){i=e[r],n=t[r];break}return i<n?-1:n<i?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);let i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;const n=a.allocUnsafe(t);let r=0;for(i=0;i<e.length;++i){let t=e[i];if(G(t,Uint8Array))r+t.length>n.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(n,r)):Uint8Array.prototype.set.call(n,t,r);else{if(!a.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,r)}r+=t.length}return n},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)f(this,t,t+1);return this},a.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)f(this,t,t+3),f(this,t+1,t+2);return this},a.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},a.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):m.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){let t="";const i=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(t+=" ... "),"<Buffer "+t+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(e,t,i,n,r){if(G(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(this===e)return 0;let o=(r>>>=0)-(n>>>=0),s=(i>>>=0)-(t>>>=0);const c=Math.min(o,s),l=this.slice(n,r),u=e.slice(t,i);for(let a=0;a<c;++a)if(l[a]!==u[a]){o=l[a],s=u[a];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},a.prototype.indexOf=function(e,t,i){return g(this,e,t,i,!0)},a.prototype.lastIndexOf=function(e,t,i){return g(this,e,t,i,!1)},a.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(i)?(i>>>=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}const r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return b(this,e,t,i);case"utf8":case"utf-8":return v(this,e,t,i);case"ascii":case"latin1":case"binary":return y(this,e,t,i);case"base64":return w(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function C(e,t,i){let n="";i=Math.min(e.length,i);for(let r=t;r<i;++r)n+=String.fromCharCode(127&e[r]);return n}function O(e,t,i){let n="";i=Math.min(e.length,i);for(let r=t;r<i;++r)n+=String.fromCharCode(e[r]);return n}function S(e,t,i){const n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);let r="";for(let o=t;o<i;++o)r+=X[e[o]];return r}function E(e,t,i){const n=e.slice(t,i);let r="";for(let o=0;o<n.length-1;o+=2)r+=String.fromCharCode(n[o]+256*n[o+1]);return r}function F(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,i,n,r,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function B(e,t,i,n,r){P(t,n,r,e,i,7);let o=Number(t&BigInt(4294967295));e[i++]=o,o>>=8,e[i++]=o,o>>=8,e[i++]=o,o>>=8,e[i++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[i++]=a,a>>=8,e[i++]=a,a>>=8,e[i++]=a,a>>=8,e[i++]=a,i}function L(e,t,i,n,r){P(t,n,r,e,i,7);let o=Number(t&BigInt(4294967295));e[i+7]=o,o>>=8,e[i+6]=o,o>>=8,e[i+5]=o,o>>=8,e[i+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[i+3]=a,a>>=8,e[i+2]=a,a>>=8,e[i+1]=a,a>>=8,e[i]=a,i+8}function M(e,t,i,n,r,o){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function T(e,t,n,r,o){return t=+t,n>>>=0,o||M(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function R(e,t,n,r,o){return t=+t,n>>>=0,o||M(e,0,n,8),i.write(e,t,n,r,52,8),n+8}a.prototype.slice=function(e,t){const i=this.length;(e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,i){e>>>=0,t>>>=0,i||F(e,t,this.length);let n=this[e],r=1,o=0;for(;++o<t&&(r*=256);)n+=this[e+o]*r;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,i){e>>>=0,t>>>=0,i||F(e,t,this.length);let n=this[e+--t],r=1;for(;t>0&&(r*=256);)n+=this[e+--t]*r;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=J((function(e){z(e>>>=0,"offset");const t=this[e],i=this[e+7];void 0!==t&&void 0!==i||U(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,r=this[++e]+256*this[++e]+65536*this[++e]+i*2**24;return BigInt(n)+(BigInt(r)<<BigInt(32))})),a.prototype.readBigUInt64BE=J((function(e){z(e>>>=0,"offset");const t=this[e],i=this[e+7];void 0!==t&&void 0!==i||U(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],r=this[++e]*2**24+65536*this[++e]+256*this[++e]+i;return(BigInt(n)<<BigInt(32))+BigInt(r)})),a.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||F(e,t,this.length);let n=this[e],r=1,o=0;for(;++o<t&&(r*=256);)n+=this[e+o]*r;return r*=128,n>=r&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||F(e,t,this.length);let n=t,r=1,o=this[e+--n];for(;n>0&&(r*=256);)o+=this[e+--n]*r;return r*=128,o>=r&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);const i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},a.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);const i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=J((function(e){z(e>>>=0,"offset");const t=this[e],i=this[e+7];void 0!==t&&void 0!==i||U(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),a.prototype.readBigInt64BE=J((function(e){z(e>>>=0,"offset");const t=this[e],i=this[e+7];void 0!==t&&void 0!==i||U(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+i)})),a.prototype.readFloatLE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,i,n){if(e=+e,t>>>=0,i>>>=0,!n){D(this,e,t,i,Math.pow(2,8*i)-1,0)}let r=1,o=0;for(this[t]=255&e;++o<i&&(r*=256);)this[t+o]=e/r&255;return t+i},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,i,n){if(e=+e,t>>>=0,i>>>=0,!n){D(this,e,t,i,Math.pow(2,8*i)-1,0)}let r=i-1,o=1;for(this[t+r]=255&e;--r>=0&&(o*=256);)this[t+r]=e/o&255;return t+i},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=J((function(e,t=0){return B(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeBigUInt64BE=J((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*i-1);D(this,e,t,i,n-1,-n)}let r=0,o=1,a=0;for(this[t]=255&e;++r<i&&(o*=256);)e<0&&0===a&&0!==this[t+r-1]&&(a=1),this[t+r]=(e/o>>0)-a&255;return t+i},a.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*i-1);D(this,e,t,i,n-1,-n)}let r=i-1,o=1,a=0;for(this[t+r]=255&e;--r>=0&&(o*=256);)e<0&&0===a&&0!==this[t+r+1]&&(a=1),this[t+r]=(e/o>>0)-a&255;return t+i},a.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=J((function(e,t=0){return B(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeBigInt64BE=J((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeFloatLE=function(e,t,i){return T(this,e,t,!0,i)},a.prototype.writeFloatBE=function(e,t,i){return T(this,e,t,!1,i)},a.prototype.writeDoubleLE=function(e,t,i){return R(this,e,t,!0,i)},a.prototype.writeDoubleBE=function(e,t,i){return R(this,e,t,!1,i)},a.prototype.copy=function(e,t,i,n){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);const r=n-i;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,i,n):Uint8Array.prototype.set.call(e,this.subarray(i,n),t),r},a.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;let r;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(r=t;r<i;++r)this[r]=e;else{const o=a.isBuffer(e)?e:a.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(r=0;r<i-t;++r)this[r+t]=o[r%s]}return this};const $={};function j(e,t,i){$[e]=class extends i{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function I(e){let t="",i=e.length;const n="-"===e[0]?1:0;for(;i>=n+4;i-=3)t=`_${e.slice(i-3,i)}${t}`;return`${e.slice(0,i)}${t}`}function P(e,t,i,n,r,o){if(e>i||e<t){const n="bigint"==typeof t?"n":"";let r;throw r=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${i}${n}`,new $.ERR_OUT_OF_RANGE("value",r,e)}!function(e,t,i){z(t,"offset"),void 0!==e[t]&&void 0!==e[t+i]||U(t,e.length-(i+1))}(n,r,o)}function z(e,t){if("number"!=typeof e)throw new $.ERR_INVALID_ARG_TYPE(t,"number",e)}function U(e,t,i){if(Math.floor(e)!==e)throw z(e,i),new $.ERR_OUT_OF_RANGE(i||"offset","an integer",e);if(t<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(i||"offset",`>= ${i?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,i){let n=`The value of "${e}" is out of range.`,r=i;return Number.isInteger(i)&&Math.abs(i)>2**32?r=I(String(i)):"bigint"==typeof i&&(r=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(r=I(r)),r+="n"),n+=` It must be ${t}. Received ${r}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function H(e,t){let i;t=t||1/0;const n=e.length;let r=null;const o=[];for(let a=0;a<n;++a){if(i=e.charCodeAt(a),i>55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&o.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;o.push(i)}else if(i<2048){if((t-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function q(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,i,n){let r;for(r=0;r<n&&!(r+i>=t.length||r>=e.length);++r)t[r+i]=e[r];return r}function G(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let i=0;i<16;++i){const n=16*i;for(let r=0;r<16;++r)t[n+r]=e[i]+e[r]}return t}();function J(e){return"undefined"==typeof BigInt?Y:e}function Y(){throw new Error("BigInt not supported")}}(mb),pb.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Ab(e)},pb.isBoolean=function(e){return"boolean"==typeof e},pb.isNull=function(e){return null===e},pb.isNullOrUndefined=function(e){return null==e},pb.isNumber=function(e){return"number"==typeof e},pb.isString=function(e){return"string"==typeof e},pb.isSymbol=function(e){return"symbol"==typeof e},pb.isUndefined=function(e){return void 0===e},pb.isRegExp=function(e){return"[object RegExp]"===Ab(e)},pb.isObject=function(e){return"object"==typeof e&&null!==e},pb.isDate=function(e){return"[object Date]"===Ab(e)},pb.isError=function(e){return"[object Error]"===Ab(e)||e instanceof Error},pb.isFunction=function(e){return"function"==typeof e},pb.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},pb.isBuffer=mb.Buffer.isBuffer;const Cb=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];let Ob;const Sb=e=>e<1e5?e<100?e<10?0:1:e<1e4?e<1e3?2:3:4:e<1e7?e<1e6?5:6:e<1e9?e<1e8?7:8:9;function Eb(e,t){if(e===t)return 0;if(~~e===e&&~~t===t){if(0===e||0===t)return e<t?-1:1;if(e<0||t<0){if(t>=0)return-1;if(e>=0)return 1;e=-e,t=-t}const i=Sb(e),n=Sb(t);let r=0;return i<n?(e*=Cb[n-i-1],t/=10,r=-1):i>n&&(t*=Cb[i-n-1],e/=10,r=1),e===t?r:e<t?-1:1}const i=String(e),n=String(t);return i===n?0:i<n?-1:1}function Fb(e,t,i,n){let r=t+1;if(r===i)return 1;if(n(e[r++],e[t])<0){for(;r<i&&n(e[r],e[r-1])<0;)r++;Db(e,t,r),Db(Ob,t,r)}else for(;r<i&&n(e[r],e[r-1])>=0;)r++;return r-t}function Db(e,t,i){for(i--;t<i;){const n=e[t];e[t++]=e[i],e[i--]=n}}function Bb(e,t,i,n,r){for(n===t&&n++;n<i;n++){const i=e[n],o=Ob[n];let a=t,s=n;for(;a<s;){const t=a+s>>>1;r(i,e[t])<0?s=t:a=t+1}let c=n-a;switch(c){case 3:e[a+3]=e[a+2],Ob[a+3]=Ob[a+2];case 2:e[a+2]=e[a+1],Ob[a+2]=Ob[a+1];case 1:e[a+1]=e[a],Ob[a+1]=Ob[a];break;default:for(;c>0;)e[a+c]=e[a+c-1],Ob[a+c]=Ob[a+c-1],c--}e[a]=i,Ob[a]=o}}function Lb(e,t,i,n,r,o){let a=0,s=0,c=1;if(o(e,t[i+r])>0){for(s=n-r;c<s&&o(e,t[i+r+c])>0;)a=c,c=1+(c<<1),c<=0&&(c=s);c>s&&(c=s),a+=r,c+=r}else{for(s=r+1;c<s&&o(e,t[i+r-c])<=0;)a=c,c=1+(c<<1),c<=0&&(c=s);c>s&&(c=s);const n=a;a=r-c,c=r-n}for(a++;a<c;){const n=a+(c-a>>>1);o(e,t[i+n])>0?a=n+1:c=n}return c}function Mb(e,t,i,n,r,o){let a=0,s=0,c=1;if(o(e,t[i+r])<0){for(s=r+1;c<s&&o(e,t[i+r-c])<0;)a=c,c=1+(c<<1),c<=0&&(c=s);c>s&&(c=s);const n=a;a=r-c,c=r-n}else{for(s=n-r;c<s&&o(e,t[i+r+c])>=0;)a=c,c=1+(c<<1),c<=0&&(c=s);c>s&&(c=s),a+=r,c+=r}for(a++;a<c;){const n=a+(c-a>>>1);o(e,t[i+n])<0?c=n:a=n+1}return c}class Tb{constructor(e,t){this.array=e,this.compare=t;const{length:i}=e;this.length=i,this.minGallop=7,this.tmpStorageLength=i<512?i>>>1:256,this.tmp=new Array(this.tmpStorageLength),this.tmpIndex=new Array(this.tmpStorageLength),this.stackLength=i<120?5:i<1542?10:i<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength),this.stackSize=0}pushRun(e,t){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=t,this.stackSize+=1}mergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;if(e>=1&&this.runLength[e-1]<=this.runLength[e]+this.runLength[e+1]||e>=2&&this.runLength[e-2]<=this.runLength[e]+this.runLength[e-1])this.runLength[e-1]<this.runLength[e+1]&&e--;else if(this.runLength[e]>this.runLength[e+1])break;this.mergeAt(e)}}forceMergeRuns(){for(;this.stackSize>1;){let e=this.stackSize-2;e>0&&this.runLength[e-1]<this.runLength[e+1]&&e--,this.mergeAt(e)}}mergeAt(e){const{compare:t}=this,{array:i}=this;let n=this.runStart[e],r=this.runLength[e];const o=this.runStart[e+1];let a=this.runLength[e+1];this.runLength[e]=r+a,e===this.stackSize-3&&(this.runStart[e+1]=this.runStart[e+2],this.runLength[e+1]=this.runLength[e+2]),this.stackSize--;const s=Mb(i[o],i,n,r,0,t);n+=s,r-=s,0!==r&&(a=Lb(i[n+r-1],i,o,a,a-1,t),0!==a&&(r<=a?this.mergeLow(n,r,o,a):this.mergeHigh(n,r,o,a)))}mergeLow(e,t,i,n){const{compare:r}=this,{array:o}=this,{tmp:a}=this,{tmpIndex:s}=this;let c=0;for(c=0;c<t;c++)a[c]=o[e+c],s[c]=Ob[e+c];let l=0,u=i,d=e;if(o[d]=o[u],Ob[d]=Ob[u],d++,u++,0==--n){for(c=0;c<t;c++)o[d+c]=a[l+c],Ob[d+c]=s[l+c];return}if(1===t){for(c=0;c<n;c++)o[d+c]=o[u+c],Ob[d+c]=Ob[u+c];return o[d+n]=a[l],void(Ob[d+n]=s[l])}let{minGallop:h}=this;for(;;){let e=0,i=0,p=!1;do{if(r(o[u],a[l])<0){if(o[d]=o[u],Ob[d]=Ob[u],d++,u++,i++,e=0,0==--n){p=!0;break}}else if(o[d]=a[l],Ob[d]=s[l],d++,l++,e++,i=0,1==--t){p=!0;break}}while((e|i)<h);if(p)break;do{if(e=Mb(o[u],a,l,t,0,r),0!==e){for(c=0;c<e;c++)o[d+c]=a[l+c],Ob[d+c]=s[l+c];if(d+=e,l+=e,(t-=e)<=1){p=!0;break}}if(o[d]=o[u],Ob[d]=Ob[u],d++,u++,0==--n){p=!0;break}if(i=Lb(a[l],o,u,n,0,r),0!==i){for(c=0;c<i;c++)o[d+c]=o[u+c],Ob[d+c]=Ob[u+c];if(d+=i,u+=i,0===(n-=i)){p=!0;break}}if(o[d]=a[l],Ob[d]=s[l],d++,l++,1==--t){p=!0;break}h--}while(e>=7||i>=7);if(p)break;h<0&&(h=0),h+=2}if(this.minGallop=h,h<1&&(this.minGallop=1),1===t){for(c=0;c<n;c++)o[d+c]=o[u+c],Ob[d+c]=Ob[u+c];o[d+n]=a[l],Ob[d+n]=s[l]}else{if(0===t)throw new Error("mergeLow preconditions were not respected");for(c=0;c<t;c++)o[d+c]=a[l+c],Ob[d+c]=s[l+c]}}mergeHigh(e,t,i,n){const{compare:r}=this,{array:o}=this,{tmp:a}=this,{tmpIndex:s}=this;let c=0;for(c=0;c<n;c++)a[c]=o[i+c],s[c]=Ob[i+c];let l=e+t-1,u=n-1,d=i+n-1,h=0,p=0;if(o[d]=o[l],Ob[d]=Ob[l],d--,l--,0==--t){for(h=d-(n-1),c=0;c<n;c++)o[h+c]=a[c],Ob[h+c]=s[c];return}if(1===n){for(d-=t,l-=t,p=d+1,h=l+1,c=t-1;c>=0;c--)o[p+c]=o[h+c],Ob[p+c]=Ob[h+c];return o[d]=a[u],void(Ob[d]=s[u])}let{minGallop:m}=this;for(;;){let i=0,f=0,g=!1;do{if(r(a[u],o[l])<0){if(o[d]=o[l],Ob[d]=Ob[l],d--,l--,i++,f=0,0==--t){g=!0;break}}else if(o[d]=a[u],Ob[d]=s[u],d--,u--,f++,i=0,1==--n){g=!0;break}}while((i|f)<m);if(g)break;do{if(i=t-Mb(a[u],o,e,t,t-1,r),0!==i){for(d-=i,l-=i,t-=i,p=d+1,h=l+1,c=i-1;c>=0;c--)o[p+c]=o[h+c],Ob[p+c]=Ob[h+c];if(0===t){g=!0;break}}if(o[d]=a[u],Ob[d]=s[u],d--,u--,1==--n){g=!0;break}if(f=n-Lb(o[l],a,0,n,n-1,r),0!==f){for(d-=f,u-=f,n-=f,p=d+1,h=u+1,c=0;c<f;c++)o[p+c]=a[h+c],Ob[p+c]=s[h+c];if(n<=1){g=!0;break}}if(o[d]=o[l],Ob[d]=Ob[l],d--,l--,0==--t){g=!0;break}m--}while(i>=7||f>=7);if(g)break;m<0&&(m=0),m+=2}if(this.minGallop=m,m<1&&(this.minGallop=1),1===n){for(d-=t,l-=t,p=d+1,h=l+1,c=t-1;c>=0;c--)o[p+c]=o[h+c],Ob[p+c]=Ob[h+c];o[d]=a[u],Ob[d]=s[u]}else{if(0===n)throw new Error("mergeHigh preconditions were not respected");for(h=d-(n-1),c=0;c<n;c++)o[h+c]=a[c],Ob[h+c]=s[c]}}}var Rb={sort:function(e,t,i,n){if(!Array.isArray(e))throw new TypeError(`The "array" argument must be an array. Received ${e}`);Ob=[];const{length:r}=e;let o=0;for(;o<r;)Ob[o]=o++;t?"function"!=typeof t&&(n=i,i=t,t=Eb):t=Eb,i||(i=0),n||(n=r);let a=n-i;if(a<2)return Ob;let s=0;if(a<32)return s=Fb(e,i,n,t),Bb(e,i,n,i+s,t),Ob;const c=new Tb(e,t),l=function(e){let t=0;for(;e>=32;)t|=1&e,e>>=1;return e+t}(a);do{if(s=Fb(e,i,n,t),s<l){let n=a;n>l&&(n=l),Bb(e,i,i+n,i+s,t),s=n}c.pushRun(i,s),c.mergeRuns(),a-=s,i+=s}while(0!==a);return c.forceMergeRuns(),Ob}};const $b=Object.prototype.hasOwnProperty;const jb=(e,t)=>$b.call(e,t),{isObject:Ib,isArray:Pb}=pb,zb="before",Ub="before-all",Wb="after-all",Hb=[zb,"after-prop","after-colon","after-value","after"],qb=[zb,Ub,Wb].map(Symbol.for),Vb=(e,t)=>Symbol.for(e+":"+t),Gb=(e,t,i)=>Object.defineProperty(e,t,{value:i,writable:!0,configurable:!0}),Kb=(e,t,i,n,r,o)=>{const a=Vb(r,n);if(!jb(t,a))return;const s=i===n?a:Vb(r,i);Gb(e,s,t[a]),o&&delete t[a]},Xb=(e,t,i,n,r)=>{Hb.forEach((o=>{Kb(e,t,i,n,o,r)}))},Jb=(e,t)=>{qb.forEach((i=>{const n=t[i];n&&Gb(e,i,n)}))};var Yb={SYMBOL_PREFIXES:Hb,PREFIX_BEFORE:zb,PREFIX_AFTER_PROP:"after-prop",PREFIX_AFTER_COLON:"after-colon",PREFIX_AFTER_VALUE:"after-value",PREFIX_AFTER:"after",PREFIX_BEFORE_ALL:Ub,PREFIX_AFTER_ALL:Wb,BRACKET_OPEN:"[",BRACKET_CLOSE:"]",CURLY_BRACKET_OPEN:"{",CURLY_BRACKET_CLOSE:"}",COLON:":",COMMA:",",MINUS:"-",EMPTY:"",UNDEFINED:undefined,symbol:Vb,define:Gb,copy_comments:Xb,swap_comments:(e,t,i)=>{t!==i&&Hb.forEach((n=>{const r=Vb(n,i);if(!jb(e,r))return void Kb(e,e,i,t,n,!0);const o=e[r];delete e[r],Kb(e,e,i,t,n,!0),Gb(e,Vb(n,t),o)}))},assign_non_prop_comments:Jb,assign(e,t,i){if(!Ib(e))throw new TypeError("Cannot convert undefined or null to object");if(!Ib(t))return e;if(undefined===i)i=Object.keys(t),Jb(e,t);else{if(!Pb(i))throw new TypeError("keys must be array or undefined");0===i.length&&Jb(e,t)}return((e,t,i)=>(i.forEach((i=>{jb(t,i)&&(e[i]=t[i],Xb(e,t,i,i))})),e))(e,t,i)}};const{isArray:Zb}=pb,{sort:Qb}=Rb,{SYMBOL_PREFIXES:ev,UNDEFINED:tv,symbol:iv,copy_comments:nv,swap_comments:rv}=Yb,ov=(e,t,i,n,r)=>{nv(e,t,i+n,i,r)},av=(e,t,i,n,r,o)=>{if(r>0){let a=n;for(;a-- >0;)ov(e,t,i+a,r,o);return}let a=0;for(;a<n;){const n=a++;ov(e,t,i+n,r,o)}},sv=(e,t)=>{ev.forEach((i=>{const n=iv(i,t);delete e[n]}))};class cv extends Array{splice(...e){const{length:t}=this,i=super.splice(...e);let[n,r,...o]=e;n<0&&(n+=t),r=1===arguments.length?t-n:Math.min(t-n,r);const{length:a}=o,s=n+r;return av(this,this,s,t-s,a-r,!0),i}slice(...e){const{length:t}=this,i=super.slice(...e);if(!i.length)return new cv;let[n,r]=e;return r===tv?r=t:r<0&&(r+=t),n<0?n+=t:n===tv&&(n=0),av(i,this,n,r-n,-n),i}unshift(...e){const{length:t}=this,i=super.unshift(...e),{length:n}=e;return n>0&&av(this,this,0,t,n,!0),i}shift(){const e=super.shift(),{length:t}=this;return sv(this,0),av(this,this,1,t,-1,!0),e}reverse(){return super.reverse(),(e=>{const{length:t}=e;let i=0;const n=t/2;for(;i<n;i++)rv(e,i,t-i-1)})(this),this}pop(){const e=super.pop();return sv(this,this.length),e}concat(...e){let{length:t}=this;const i=super.concat(...e);return e.length?(av(i,this,0,this.length,0),e.forEach((e=>{const n=t;t+=Zb(e)?e.length:1,e instanceof cv&&av(i,e,0,e.length,n)})),i):i}sort(...e){const t=Qb(this,...e.slice(0,1)),i=Object.create(null);return t.forEach(((e,t)=>{if(e===t)return;const n=((e,t)=>{let i=t;for(;i in e;)i=e[i];return i})(i,e);n!==t&&(i[t]=n,rv(this,t,n))})),this}}var lv={CommentArray:cv};const uv=hb.exports,{CommentArray:dv}=lv,{PREFIX_BEFORE:hv,PREFIX_AFTER_PROP:pv,PREFIX_AFTER_COLON:mv,PREFIX_AFTER_VALUE:fv,PREFIX_AFTER:gv,PREFIX_BEFORE_ALL:_v,PREFIX_AFTER_ALL:bv,BRACKET_OPEN:vv,BRACKET_CLOSE:yv,CURLY_BRACKET_OPEN:wv,CURLY_BRACKET_CLOSE:xv,COLON:Nv,COMMA:kv,MINUS:Av,EMPTY:Cv,UNDEFINED:Ov,define:Sv,assign_non_prop_comments:Ev}=Yb,Fv=e=>uv.tokenize(e,{comment:!0,loc:!0}),Dv=[];let Bv=null,Lv=null;const Mv=[];let Tv,Rv,$v=!1,jv=!1,Iv=null,Pv=null,zv=null,Uv=null;const Wv=()=>{Mv.length=Dv.length=0,Pv=null,Tv=Ov},Hv=e=>Symbol.for(Tv!==Ov?e+Nv+Tv:e),qv=(e,t)=>Uv?Uv(e,t):t,Vv=()=>{const e=new SyntaxError(`Unexpected token ${zv.value.slice(0,1)}`);throw Object.assign(e,zv.loc.start),e},Gv=()=>{const e=new SyntaxError("Unexpected end of JSON input");throw Object.assign(e,Pv?Pv.loc.end:{line:1,column:0}),e},Kv=()=>{const e=Iv[++Rv];jv=zv&&e&&zv.loc.end.line===e.loc.start.line||!1,Pv=zv,zv=e},Xv=()=>(zv||Gv(),"Punctuator"===zv.type?zv.value:zv.type),Jv=e=>Xv()===e,Yv=e=>{Jv(e)||Vv()},Zv=e=>{Dv.push(Bv),Bv=e},Qv=()=>{Bv=Dv.pop()},ey=()=>{if(!Lv)return;const e=[];for(const i of Lv){if(!i.inline)break;e.push(i)}const{length:t}=e;t&&(t===Lv.length?Lv=null:Lv.splice(0,t),Sv(Bv,Hv(gv),e))},ty=e=>{Lv&&(Sv(Bv,Hv(e),Lv),Lv=null)},iy=e=>{const t=[];for(;zv&&(Jv("LineComment")||Jv("BlockComment"));){const e=c(s({},zv),{inline:jv});t.push(e),Kv()}$v||t.length&&(e?Sv(Bv,Hv(e),t):Lv=t)},ny=(e,t)=>{t&&Mv.push(Tv),Tv=e},ry=()=>{Tv=Mv.pop()};function oy(){let e=Xv();if(e===wv)return Kv(),(()=>{const e={};Zv(e),ny(Ov,!0);let t,i=!1;for(iy();!(Jv(xv)||i&&(ty(fv),Yv(kv),Kv(),iy(),ey(),Jv(xv)));)i=!0,Yv("String"),t=JSON.parse(zv.value),ny(t),ty(hv),Kv(),iy(pv),Yv(Nv),Kv(),iy(mv),e[t]=qv(t,oy()),iy();return i&&ty(gv),Kv(),Tv=void 0,i||ty(hv),Qv(),ry(),e})();if(e===vv)return Kv(),(()=>{const e=new dv;Zv(e),ny(Ov,!0);let t=!1,i=0;for(iy();!(Jv(yv)||t&&(ty(fv),Yv(kv),Kv(),iy(),ey(),Jv(yv)));)t=!0,ny(i),ty(hv),e[i]=qv(i,oy()),i++,iy();return t&&ty(gv),Kv(),Tv=void 0,t||ty(hv),Qv(),ry(),e})();let t,i=Cv;switch(e===Av&&(Kv(),e=Xv(),i=Av),e){case"String":case"Boolean":case"Null":case"Numeric":return t=zv.value,Kv(),JSON.parse(i+t)}}var ay,sy={parse:(e,t,i)=>{Wv(),Iv=Fv(e),Uv=t,$v=i,Iv.length||Gv(),Rv=-1,Kv(),Zv({}),iy(_v);let n=oy();var r;return iy(bv),zv&&Vv(),i||null===n||(r=n,Object(r)!==r&&(n=new Object(n)),Ev(n,Bv)),Qv(),n=qv("",n),Wv(),Iv.length=0,Lv=Bv=Iv=Pv=zv=Uv=null,n},tokenize:Fv},cy="",ly=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var i=e.length*t;if(ay!==e||void 0===ay)ay=e,cy="";else if(cy.length>=i)return cy.substr(0,i);for(;i>cy.length&&t>1;)1&t&&(cy+=e),t>>=1,e+=e;return cy=(cy+=e).substr(0,i)};
/*!
* repeat-string <https://github.com/jonschlinkert/repeat-string>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/const{isArray:uy,isObject:dy,isFunction:hy,isNumber:py,isString:my}=pb,fy=ly,{PREFIX_BEFORE_ALL:gy,PREFIX_BEFORE:_y,PREFIX_AFTER_PROP:by,PREFIX_AFTER_COLON:vy,PREFIX_AFTER_VALUE:yy,PREFIX_AFTER:wy,PREFIX_AFTER_ALL:xy,BRACKET_OPEN:Ny,BRACKET_CLOSE:ky,CURLY_BRACKET_OPEN:Ay,CURLY_BRACKET_CLOSE:Cy,COLON:Oy,COMMA:Sy,EMPTY:Ey,UNDEFINED:Fy}=Yb,Dy=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,By=e=>`${_y}:${e}`,Ly=e=>`${yy}:${e}`,My=e=>`${wy}:${e}`,Ty={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},Ry=e=>`"${(e=>(Dy.lastIndex=0,Dy.test(e)?e.replace(Dy,(e=>{const t=Ty[e];return"string"==typeof t?t:e})):e))(e)}"`,$y=(e,t,i,n)=>{const r=e[Symbol.for(t)];if(!r||!r.length)return Ey;let o=!1;const a=r.reduce(((e,{inline:t,type:n,value:r})=>(o="LineComment"===n,e+(t?" ":"\n"+i)+((e,t)=>t?`//${e}`:`/*${e}*/`)(r,o))),Ey);return n||o?a+"\n"+i:a};let jy=null,Iy=Ey;const Py=(e,t,i)=>e?t?e+t.trim()+"\n"+i:e.trimRight()+"\n"+i:t?t.trimRight()+"\n"+i:Ey,zy=(e,t,i)=>{const n=$y(t,_y,i+Iy,!0);return Py(n,e,i)},Uy=(e,t)=>{if(!e)return"null";const i=t+Iy;let n=Ey,r=Ey,o=!0;return(uy(jy)?jy:Object.keys(e)).forEach((t=>{const a=Wy(t,e,i);if(a===Fy)return;o||(n+=Sy),o=!1;const s=Py(r,$y(e,By(t),i),i);n+=s||"\n"+i,n+=Ry(t)+$y(e,`${by}:${t}`,i)+Oy+$y(e,(e=>`${vy}:${e}`)(t),i)+" "+a+$y(e,Ly(t),i),r=$y(e,My(t),i)})),n+=Py(r,$y(e,wy,i),i),Ay+zy(n,e,t)+Cy};function Wy(e,t,i){let n=t[e];switch(dy(n)&&hy(n.toJSON)&&(n=n.toJSON(e)),hy(jy)&&(n=jy.call(t,e,n)),typeof n){case"string":return Ry(n);case"number":return Number.isFinite(n)?String(n):"null";case"boolean":case"null":return String(n);case"object":return uy(n)?((e,t)=>{const i=t+Iy,{length:n}=e;let r=Ey,o=Ey;for(let a=0;a<n;a++)0!==a&&(r+=Sy),r+=Py(o,$y(e,By(a),i),i)||"\n"+i,r+=Wy(a,e,i)||"null",r+=$y(e,Ly(a),i),o=$y(e,My(a),i);return r+=Py(o,$y(e,wy,i),i),Ny+zy(r,e,t)+ky})(n,i):Uy(n,i)}}const{toString:Hy}=Object.prototype,qy=["[object Number]","[object String]","[object Boolean]"];const{parse:Vy,tokenize:Gy}=sy,Ky=(e,t,i)=>{const n=(e=>my(e)?e:py(e)?fy(" ",e):Ey)(i);if(!n)return JSON.stringify(e,t);hy(t)||uy(t)||(t=null),jy=t,Iy=n;const r=(e=>{if("object"!=typeof e)return!1;const t=Hy.call(e);return qy.includes(t)})(e)?JSON.stringify(e):Wy("",{"":e},Ey);return jy=null,Iy=Ey,dy(e)?$y(e,gy,Ey).trimLeft()+r+$y(e,xy,Ey).trimRight():r},{CommentArray:Xy}=lv,{assign:Jy}=Yb;var Yy={parse:Vy,stringify:Ky,tokenize:Gy,CommentArray:Xy,assign:Jy},Zy={},Qy={},ew={};function tw(e){return null==e}function iw(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}ew.isNothing=tw,ew.isObject=function(e){return"object"==typeof e&&null!==e},ew.toArray=function(e){return Array.isArray(e)?e:tw(e)?[]:[e]},ew.repeat=function(e,t){var i,n="";for(i=0;i<t;i+=1)n+=e;return n},ew.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},ew.extend=function(e,t){var i,n,r,o;if(t)for(i=0,n=(o=Object.keys(t)).length;i<n;i+=1)e[r=o[i]]=t[r];return e},iw.prototype=Object.create(Error.prototype),iw.prototype.constructor=iw,iw.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t};var nw=iw,rw=ew;function ow(e,t,i,n,r){this.name=e,this.buffer=t,this.position=i,this.line=n,this.column=r}ow.prototype.getSnippet=function(e,t){var i,n,r,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,i="",n=this.position;n>0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(n-1));)if(n-=1,this.position-n>t/2-1){i=" ... ",n+=5;break}for(r="",o=this.position;o<this.buffer.length&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(o));)if((o+=1)-this.position>t/2-1){r=" ... ",o-=5;break}return a=this.buffer.slice(n,o),rw.repeat(" ",e)+i+a+r+"\n"+rw.repeat(" ",e+this.position-n+i.length)+"^"},ow.prototype.toString=function(e){var t,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(i+=":\n"+t),i};var aw=ow,sw=nw,cw=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],lw=["scalar","sequence","mapping"];var uw=function(e,t){var i,n;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===cw.indexOf(t))throw new sw('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(i=t.styleAliases||null,n={},null!==i&&Object.keys(i).forEach((function(e){i[e].forEach((function(t){n[String(t)]=e}))})),n),-1===lw.indexOf(this.kind))throw new sw('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')},dw=ew,hw=nw,pw=uw;function mw(e,t,i){var n=[];return e.include.forEach((function(e){i=mw(e,t,i)})),e[t].forEach((function(e){i.forEach((function(t,i){t.tag===e.tag&&t.kind===e.kind&&n.push(i)})),i.push(e)})),i.filter((function(e,t){return-1===n.indexOf(t)}))}function fw(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach((function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new hw("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=mw(this,"implicit",[]),this.compiledExplicit=mw(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,i={scalar:{},sequence:{},mapping:{},fallback:{}};function n(e){i[e.kind][e.tag]=i.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return i}(this.compiledImplicit,this.compiledExplicit)}fw.DEFAULT=null,fw.create=function(){var e,t;switch(arguments.length){case 1:e=fw.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new hw("Wrong number of arguments for Schema.create function")}if(e=dw.toArray(e),t=dw.toArray(t),!e.every((function(e){return e instanceof fw})))throw new hw("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every((function(e){return e instanceof pw})))throw new hw("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new fw({include:e,explicit:t})};var gw=fw,_w=new gw({explicit:[new uw("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),new uw("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),new uw("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})]});var bw=new uw("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"});var vw=new uw("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}),yw=ew;function ww(e){return 48<=e&&e<=55}function xw(e){return 48<=e&&e<=57}var Nw=new uw("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,i,n=e.length,r=0,o=!1;if(!n)return!1;if("-"!==(t=e[r])&&"+"!==t||(t=e[++r]),"0"===t){if(r+1===n)return!0;if("b"===(t=e[++r])){for(r++;r<n;r++)if("_"!==(t=e[r])){if("0"!==t&&"1"!==t)return!1;o=!0}return o&&"_"!==t}if("x"===t){for(r++;r<n;r++)if("_"!==(t=e[r])){if(!(48<=(i=e.charCodeAt(r))&&i<=57||65<=i&&i<=70||97<=i&&i<=102))return!1;o=!0}return o&&"_"!==t}for(;r<n;r++)if("_"!==(t=e[r])){if(!ww(e.charCodeAt(r)))return!1;o=!0}return o&&"_"!==t}if("_"===t)return!1;for(;r<n;r++)if("_"!==(t=e[r])){if(":"===t)break;if(!xw(e.charCodeAt(r)))return!1;o=!0}return!(!o||"_"===t)&&(":"!==t||/^(:[0-5]?[0-9])+$/.test(e.slice(r)))},construct:function(e){var t,i,n=e,r=1,o=[];return-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(t=n[0])&&"+"!==t||("-"===t&&(r=-1),t=(n=n.slice(1))[0]),"0"===n?0:"0"===t?"b"===n[1]?r*parseInt(n.slice(2),2):"x"===n[1]?r*parseInt(n,16):r*parseInt(n,8):-1!==n.indexOf(":")?(n.split(":").forEach((function(e){o.unshift(parseInt(e,10))})),n=0,i=1,o.forEach((function(e){n+=e*i,i*=60})),r*n):r*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!yw.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),kw=ew,Aw=uw,Cw=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var Ow=/^[-+]?[0-9]+e/;var Sw=new gw({include:[_w],implicit:[bw,vw,Nw,new Aw("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!Cw.test(e)||"_"===e[e.length-1])},construct:function(e){var t,i,n,r;return i="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,r=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){r.unshift(parseFloat(e,10))})),t=0,n=1,r.forEach((function(e){t+=e*n,n*=60})),i*t):i*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||kw.isNegativeZero(e))},represent:function(e,t){var i;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(kw.isNegativeZero(e))return"-0.0";return i=e.toString(10),Ow.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"})]}),Ew=new gw({include:[Sw]}),Fw=uw,Dw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Bw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var Lw=new Fw("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==Dw.exec(e)||null!==Bw.exec(e))},construct:function(e){var t,i,n,r,o,a,s,c,l=0,u=null;if(null===(t=Dw.exec(e))&&(t=Bw.exec(e)),null===t)throw new Error("Date resolve error");if(i=+t[1],n=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(i,n,r));if(o=+t[4],a=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),c=new Date(Date.UTC(i,n,r,o,a,s,l)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(e){return e.toISOString()}});var Mw,Tw=new uw("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}});try{var Rw=require;Mw=Rw("buffer").Buffer}catch(Jk){}var $w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var jw=new uw("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,i,n=0,r=e.length,o=$w;for(i=0;i<r;i++)if(!((t=o.indexOf(e.charAt(i)))>64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,i,n=e.replace(/[\r\n=]/g,""),r=n.length,o=$w,a=0,s=[];for(t=0;t<r;t++)t%4==0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(n.charAt(t));return 0===(i=r%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===i?(s.push(a>>10&255),s.push(a>>2&255)):12===i&&s.push(a>>4&255),Mw?Mw.from?Mw.from(s):new Mw(s):s},predicate:function(e){return Mw&&Mw.isBuffer(e)},represent:function(e){var t,i,n="",r=0,o=e.length,a=$w;for(t=0;t<o;t++)t%3==0&&t&&(n+=a[r>>18&63],n+=a[r>>12&63],n+=a[r>>6&63],n+=a[63&r]),r=(r<<8)+e[t];return 0===(i=o%3)?(n+=a[r>>18&63],n+=a[r>>12&63],n+=a[r>>6&63],n+=a[63&r]):2===i?(n+=a[r>>10&63],n+=a[r>>4&63],n+=a[r<<2&63],n+=a[64]):1===i&&(n+=a[r>>2&63],n+=a[r<<4&63],n+=a[64],n+=a[64]),n}}),Iw=uw,Pw=Object.prototype.hasOwnProperty,zw=Object.prototype.toString;var Uw=new Iw("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,i,n,r,o,a=[],s=e;for(t=0,i=s.length;t<i;t+=1){if(n=s[t],o=!1,"[object Object]"!==zw.call(n))return!1;for(r in n)if(Pw.call(n,r)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==a.indexOf(r))return!1;a.push(r)}return!0},construct:function(e){return null!==e?e:[]}}),Ww=uw,Hw=Object.prototype.toString;var qw=new Ww("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,i,n,r,o,a=e;for(o=new Array(a.length),t=0,i=a.length;t<i;t+=1){if(n=a[t],"[object Object]"!==Hw.call(n))return!1;if(1!==(r=Object.keys(n)).length)return!1;o[t]=[r[0],n[r[0]]]}return!0},construct:function(e){if(null===e)return[];var t,i,n,r,o,a=e;for(o=new Array(a.length),t=0,i=a.length;t<i;t+=1)n=a[t],r=Object.keys(n),o[t]=[r[0],n[r[0]]];return o}}),Vw=uw,Gw=Object.prototype.hasOwnProperty;var Kw=new gw({include:[Ew],implicit:[Lw,Tw],explicit:[jw,Uw,qw,new Vw("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,i=e;for(t in i)if(Gw.call(i,t)&&null!==i[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})]});var Xw=new uw("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}});var Jw,Yw=new uw("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,i=/\/([gim]*)$/.exec(e),n="";if("/"===t[0]){if(i&&(n=i[1]),n.length>3)return!1;if("/"!==t[t.length-n.length-1])return!1}return!0},construct:function(e){var t=e,i=/\/([gim]*)$/.exec(e),n="";return"/"===t[0]&&(i&&(n=i[1]),t=t.slice(1,t.length-n.length-1)),new RegExp(t,n)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}});try{var Zw=require;Jw=Zw("esprima")}catch(Yk){"undefined"!=typeof window&&(Jw=window.esprima)}var Qw=new uw("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",i=Jw.parse(t,{range:!0});return"Program"===i.type&&1===i.body.length&&"ExpressionStatement"===i.body[0].type&&("ArrowFunctionExpression"===i.body[0].expression.type||"FunctionExpression"===i.body[0].expression.type)}catch(n){return!1}},construct:function(e){var t,i="("+e+")",n=Jw.parse(i,{range:!0}),r=[];if("Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"ArrowFunctionExpression"!==n.body[0].expression.type&&"FunctionExpression"!==n.body[0].expression.type)throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach((function(e){r.push(e.name)})),t=n.body[0].expression.body.range,"BlockStatement"===n.body[0].expression.body.type?new Function(r,i.slice(t[0]+1,t[1]-1)):new Function(r,"return "+i.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}}),ex=gw,tx=ex.DEFAULT=new ex({include:[Kw],explicit:[Xw,Yw,Qw]}),ix=ew,nx=nw,rx=aw,ox=Kw,ax=tx,sx=Object.prototype.hasOwnProperty,cx=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,lx=/[\x85\u2028\u2029]/,ux=/[,\[\]\{\}]/,dx=/^(?:!|!!|![a-z\-]+!)$/i,hx=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function px(e){return Object.prototype.toString.call(e)}function mx(e){return 10===e||13===e}function fx(e){return 9===e||32===e}function gx(e){return 9===e||32===e||10===e||13===e}function _x(e){return 44===e||91===e||93===e||123===e||125===e}function bx(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function vx(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function yx(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var wx=new Array(256),xx=new Array(256),Nx=0;Nx<256;Nx++)wx[Nx]=vx(Nx)?1:0,xx[Nx]=vx(Nx);function kx(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||ax,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function Ax(e,t){return new nx(t,new rx(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function Cx(e,t){throw Ax(e,t)}function Ox(e,t){e.onWarning&&e.onWarning.call(null,Ax(e,t))}var Sx={YAML:function(e,t,i){var n,r,o;null!==e.version&&Cx(e,"duplication of %YAML directive"),1!==i.length&&Cx(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]))&&Cx(e,"ill-formed argument of the YAML directive"),r=parseInt(n[1],10),o=parseInt(n[2],10),1!==r&&Cx(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&Ox(e,"unsupported YAML version of the document")},TAG:function(e,t,i){var n,r;2!==i.length&&Cx(e,"TAG directive accepts exactly two arguments"),n=i[0],r=i[1],dx.test(n)||Cx(e,"ill-formed tag handle (first argument) of the TAG directive"),sx.call(e.tagMap,n)&&Cx(e,'there is a previously declared suffix for "'+n+'" tag handle'),hx.test(r)||Cx(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=r}};function Ex(e,t,i,n){var r,o,a,s;if(t<i){if(s=e.input.slice(t,i),n)for(r=0,o=s.length;r<o;r+=1)9===(a=s.charCodeAt(r))||32<=a&&a<=1114111||Cx(e,"expected valid JSON character");else cx.test(s)&&Cx(e,"the stream contains non-printable characters");e.result+=s}}function Fx(e,t,i,n){var r,o,a,s;for(ix.isObject(i)||Cx(e,"cannot merge mappings; the provided source object is unacceptable"),a=0,s=(r=Object.keys(i)).length;a<s;a+=1)o=r[a],sx.call(t,o)||(t[o]=i[o],n[o]=!0)}function Dx(e,t,i,n,r,o,a,s){var c,l;if(Array.isArray(r))for(c=0,l=(r=Array.prototype.slice.call(r)).length;c<l;c+=1)Array.isArray(r[c])&&Cx(e,"nested arrays are not supported inside keys"),"object"==typeof r&&"[object Object]"===px(r[c])&&(r[c]="[object Object]");if("object"==typeof r&&"[object Object]"===px(r)&&(r="[object Object]"),r=String(r),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(o))for(c=0,l=o.length;c<l;c+=1)Fx(e,t,o[c],i);else Fx(e,t,o,i);else e.json||sx.call(i,r)||!sx.call(t,r)||(e.line=a||e.line,e.position=s||e.position,Cx(e,"duplicated mapping key")),t[r]=o,delete i[r];return t}function Bx(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):Cx(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function Lx(e,t,i){for(var n=0,r=e.input.charCodeAt(e.position);0!==r;){for(;fx(r);)r=e.input.charCodeAt(++e.position);if(t&&35===r)do{r=e.input.charCodeAt(++e.position)}while(10!==r&&13!==r&&0!==r);if(!mx(r))break;for(Bx(e),r=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position)}return-1!==i&&0!==n&&e.lineIndent<i&&Ox(e,"deficient indentation"),n}function Mx(e){var t,i=e.position;return!(45!==(t=e.input.charCodeAt(i))&&46!==t||t!==e.input.charCodeAt(i+1)||t!==e.input.charCodeAt(i+2)||(i+=3,0!==(t=e.input.charCodeAt(i))&&!gx(t)))}function Tx(e,t){1===t?e.result+=" ":t>1&&(e.result+=ix.repeat("\n",t-1))}function Rx(e,t){var i,n,r=e.tag,o=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),n=e.input.charCodeAt(e.position);0!==n&&45===n&&gx(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,Lx(e,!0,-1)&&e.lineIndent<=t)a.push(null),n=e.input.charCodeAt(e.position);else if(i=e.line,Ix(e,t,3,!1,!0),a.push(e.result),Lx(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>t)&&0!==n)Cx(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=r,e.anchor=o,e.kind="sequence",e.result=a,!0)}function $x(e){var t,i,n,r,o=!1,a=!1;if(33!==(r=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&Cx(e,"duplication of a tag property"),60===(r=e.input.charCodeAt(++e.position))?(o=!0,r=e.input.charCodeAt(++e.position)):33===r?(a=!0,i="!!",r=e.input.charCodeAt(++e.position)):i="!",t=e.position,o){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&62!==r);e.position<e.length?(n=e.input.slice(t,e.position),r=e.input.charCodeAt(++e.position)):Cx(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==r&&!gx(r);)33===r&&(a?Cx(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),dx.test(i)||Cx(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),ux.test(n)&&Cx(e,"tag suffix cannot contain flow indicator characters")}return n&&!hx.test(n)&&Cx(e,"tag name cannot contain such characters: "+n),o?e.tag=n:sx.call(e.tagMap,i)?e.tag=e.tagMap[i]+n:"!"===i?e.tag="!"+n:"!!"===i?e.tag="tag:yaml.org,2002:"+n:Cx(e,'undeclared tag handle "'+i+'"'),!0}function jx(e){var t,i;if(38!==(i=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&Cx(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!gx(i)&&!_x(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&Cx(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Ix(e,t,i,n,r){var o,a,s,c,l,u,d,h,p=1,m=!1,f=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=s=4===i||3===i,n&&Lx(e,!0,-1)&&(m=!0,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)),1===p)for(;$x(e)||jx(e);)Lx(e,!0,-1)?(m=!0,s=o,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)):s=!1;if(s&&(s=m||r),1!==p&&4!==i||(d=1===i||2===i?t:t+1,h=e.position-e.lineStart,1===p?s&&(Rx(e,h)||function(e,t,i){var n,r,o,a,s,c=e.tag,l=e.anchor,u={},d={},h=null,p=null,m=null,f=!1,g=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=u),s=e.input.charCodeAt(e.position);0!==s;){if(n=e.input.charCodeAt(e.position+1),o=e.line,a=e.position,63!==s&&58!==s||!gx(n)){if(!Ix(e,i,2,!1,!0))break;if(e.line===o){for(s=e.input.charCodeAt(e.position);fx(s);)s=e.input.charCodeAt(++e.position);if(58===s)gx(s=e.input.charCodeAt(++e.position))||Cx(e,"a whitespace character is expected after the key-value separator within a block mapping"),f&&(Dx(e,u,d,h,p,null),h=p=m=null),g=!0,f=!1,r=!1,h=e.tag,p=e.result;else{if(!g)return e.tag=c,e.anchor=l,!0;Cx(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!g)return e.tag=c,e.anchor=l,!0;Cx(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===s?(f&&(Dx(e,u,d,h,p,null),h=p=m=null),g=!0,f=!0,r=!0):f?(f=!1,r=!0):Cx(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,s=n;if((e.line===o||e.lineIndent>t)&&(Ix(e,t,4,!0,r)&&(f?p=e.result:m=e.result),f||(Dx(e,u,d,h,p,m,o,a),h=p=m=null),Lx(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)Cx(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return f&&Dx(e,u,d,h,p,null),g&&(e.tag=c,e.anchor=l,e.kind="mapping",e.result=u),g}(e,h,d))||function(e,t){var i,n,r,o,a,s,c,l,u,d,h=!0,p=e.tag,m=e.anchor,f={};if(91===(d=e.input.charCodeAt(e.position)))r=93,s=!1,n=[];else{if(123!==d)return!1;r=125,s=!0,n={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=n),d=e.input.charCodeAt(++e.position);0!==d;){if(Lx(e,!0,t),(d=e.input.charCodeAt(e.position))===r)return e.position++,e.tag=p,e.anchor=m,e.kind=s?"mapping":"sequence",e.result=n,!0;h||Cx(e,"missed comma between flow collection entries"),u=null,o=a=!1,63===d&&gx(e.input.charCodeAt(e.position+1))&&(o=a=!0,e.position++,Lx(e,!0,t)),i=e.line,Ix(e,t,1,!1,!0),l=e.tag,c=e.result,Lx(e,!0,t),d=e.input.charCodeAt(e.position),!a&&e.line!==i||58!==d||(o=!0,d=e.input.charCodeAt(++e.position),Lx(e,!0,t),Ix(e,t,1,!1,!0),u=e.result),s?Dx(e,n,f,l,c,u):o?n.push(Dx(e,null,f,l,c,u)):n.push(c),Lx(e,!0,t),44===(d=e.input.charCodeAt(e.position))?(h=!0,d=e.input.charCodeAt(++e.position)):h=!1}Cx(e,"unexpected end of the stream within a flow collection")}(e,d)?f=!0:(a&&function(e,t){var i,n,r,o,a,s=1,c=!1,l=!1,u=t,d=0,h=!1;if(124===(o=e.input.charCodeAt(e.position)))n=!1;else{if(62!==o)return!1;n=!0}for(e.kind="scalar",e.result="";0!==o;)if(43===(o=e.input.charCodeAt(++e.position))||45===o)1===s?s=43===o?3:2:Cx(e,"repeat of a chomping mode identifier");else{if(!((r=48<=(a=o)&&a<=57?a-48:-1)>=0))break;0===r?Cx(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Cx(e,"repeat of an indentation width identifier"):(u=t+r-1,l=!0)}if(fx(o)){do{o=e.input.charCodeAt(++e.position)}while(fx(o));if(35===o)do{o=e.input.charCodeAt(++e.position)}while(!mx(o)&&0!==o)}for(;0!==o;){for(Bx(e),e.lineIndent=0,o=e.input.charCodeAt(e.position);(!l||e.lineIndent<u)&&32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>u&&(u=e.lineIndent),mx(o))d++;else{if(e.lineIndent<u){3===s?e.result+=ix.repeat("\n",c?1+d:d):1===s&&c&&(e.result+="\n");break}for(n?fx(o)?(h=!0,e.result+=ix.repeat("\n",c?1+d:d)):h?(h=!1,e.result+=ix.repeat("\n",d+1)):0===d?c&&(e.result+=" "):e.result+=ix.repeat("\n",d):e.result+=ix.repeat("\n",c?1+d:d),c=!0,l=!0,d=0,i=e.position;!mx(o)&&0!==o;)o=e.input.charCodeAt(++e.position);Ex(e,i,e.position,!1)}}return!0}(e,d)||function(e,t){var i,n,r;if(39!==(i=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(i=e.input.charCodeAt(e.position));)if(39===i){if(Ex(e,n,e.position,!0),39!==(i=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,r=e.position}else mx(i)?(Ex(e,n,r,!0),Tx(e,Lx(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Mx(e)?Cx(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);Cx(e,"unexpected end of the stream within a single quoted scalar")}(e,d)||function(e,t){var i,n,r,o,a,s,c;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return Ex(e,i,e.position,!0),e.position++,!0;if(92===s){if(Ex(e,i,e.position,!0),mx(s=e.input.charCodeAt(++e.position)))Lx(e,!1,t);else if(s<256&&wx[s])e.result+=xx[s],e.position++;else if((a=120===(c=s)?2:117===c?4:85===c?8:0)>0){for(r=a,o=0;r>0;r--)(a=bx(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:Cx(e,"expected hexadecimal character");e.result+=yx(o),e.position++}else Cx(e,"unknown escape sequence");i=n=e.position}else mx(s)?(Ex(e,i,n,!0),Tx(e,Lx(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Mx(e)?Cx(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}Cx(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?f=!0:!function(e){var t,i,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!gx(n)&&!_x(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Cx(e,"name of an alias node must contain at least one character"),i=e.input.slice(t,e.position),sx.call(e.anchorMap,i)||Cx(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],Lx(e,!0,-1),!0}(e)?function(e,t,i){var n,r,o,a,s,c,l,u,d=e.kind,h=e.result;if(gx(u=e.input.charCodeAt(e.position))||_x(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(gx(n=e.input.charCodeAt(e.position+1))||i&&_x(n)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==u;){if(58===u){if(gx(n=e.input.charCodeAt(e.position+1))||i&&_x(n))break}else if(35===u){if(gx(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Mx(e)||i&&_x(u))break;if(mx(u)){if(s=e.line,c=e.lineStart,l=e.lineIndent,Lx(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=c,e.lineIndent=l;break}}a&&(Ex(e,r,o,!1),Tx(e,e.line-s),r=o=e.position,a=!1),fx(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return Ex(e,r,o,!1),!!e.result||(e.kind=d,e.result=h,!1)}(e,d,1===i)&&(f=!0,null===e.tag&&(e.tag="?")):(f=!0,null===e.tag&&null===e.anchor||Cx(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===p&&(f=s&&Rx(e,h))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&Cx(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),c=0,l=e.implicitTypes.length;c<l;c+=1)if((u=e.implicitTypes[c]).resolve(e.result)){e.result=u.construct(e.result),e.tag=u.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else sx.call(e.typeMap[e.kind||"fallback"],e.tag)?(u=e.typeMap[e.kind||"fallback"][e.tag],null!==e.result&&u.kind!==e.kind&&Cx(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+u.kind+'", not "'+e.kind+'"'),u.resolve(e.result)?(e.result=u.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):Cx(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):Cx(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||f}function Px(e){var t,i,n,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(r=e.input.charCodeAt(e.position))&&(Lx(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!gx(r);)r=e.input.charCodeAt(++e.position);for(n=[],(i=e.input.slice(t,e.position)).length<1&&Cx(e,"directive name must not be less than one character in length");0!==r;){for(;fx(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!mx(r));break}if(mx(r))break;for(t=e.position;0!==r&&!gx(r);)r=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==r&&Bx(e),sx.call(Sx,i)?Sx[i](e,i,n):Ox(e,'unknown document directive "'+i+'"')}Lx(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,Lx(e,!0,-1)):a&&Cx(e,"directives end mark is expected"),Ix(e,e.lineIndent-1,4,!1,!0),Lx(e,!0,-1),e.checkLineBreaks&&lx.test(e.input.slice(o,e.position))&&Ox(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Mx(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Lx(e,!0,-1)):e.position<e.length-1&&Cx(e,"end of the stream or a document separator is expected")}function zx(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var i=new kx(e,t),n=e.indexOf("\0");for(-1!==n&&(i.position=n,Cx(i,"null byte is not allowed in input")),i.input+="\0";32===i.input.charCodeAt(i.position);)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)Px(i);return i.documents}function Ux(e,t,i){null!==t&&"object"==typeof t&&void 0===i&&(i=t,t=null);var n=zx(e,i);if("function"!=typeof t)return n;for(var r=0,o=n.length;r<o;r+=1)t(n[r])}function Wx(e,t){var i=zx(e,t);if(0!==i.length){if(1===i.length)return i[0];throw new nx("expected a single document in the stream, but found more")}}Qy.loadAll=Ux,Qy.load=Wx,Qy.safeLoadAll=function(e,t,i){return"object"==typeof t&&null!==t&&void 0===i&&(i=t,t=null),Ux(e,t,ix.extend({schema:ox},i))},Qy.safeLoad=function(e,t){return Wx(e,ix.extend({schema:ox},t))};var Hx={},qx=ew,Vx=nw,Gx=tx,Kx=Kw,Xx=Object.prototype.toString,Jx=Object.prototype.hasOwnProperty,Yx={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Zx=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Qx(e){var t,i,n;if(t=e.toString(16).toUpperCase(),e<=255)i="x",n=2;else if(e<=65535)i="u",n=4;else{if(!(e<=4294967295))throw new Vx("code point within a string may not be greater than 0xFFFFFFFF");i="U",n=8}return"\\"+i+qx.repeat("0",n-t.length)+t}function eN(e){this.schema=e.schema||Gx,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=qx.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var i,n,r,o,a,s,c;if(null===t)return{};for(i={},r=0,o=(n=Object.keys(t)).length;r<o;r+=1)a=n[r],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(c=e.compiledTypeMap.fallback[a])&&Jx.call(c.styleAliases,s)&&(s=c.styleAliases[s]),i[a]=s;return i}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function tN(e,t){for(var i,n=qx.repeat(" ",t),r=0,o=-1,a="",s=e.length;r<s;)-1===(o=e.indexOf("\n",r))?(i=e.slice(r),r=s):(i=e.slice(r,o+1),r=o+1),i.length&&"\n"!==i&&(a+=n),a+=i;return a}function iN(e,t){return"\n"+qx.repeat(" ",e.indent*t)}function nN(e){return 32===e||9===e}function rN(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function oN(e,t){return rN(e)&&65279!==e&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e&&58!==e&&(35!==e||t&&function(e){return rN(e)&&!nN(e)&&65279!==e&&13!==e&&10!==e}(t))}function aN(e){return/^\n* /.test(e)}function sN(e,t,i,n,r){var o,a,s,c,l=!1,u=!1,d=-1!==n,h=-1,p=rN(c=e.charCodeAt(0))&&65279!==c&&!nN(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&!nN(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(!rN(a=e.charCodeAt(o)))return 5;s=o>0?e.charCodeAt(o-1):null,p=p&&oN(a,s)}else{for(o=0;o<e.length;o++){if(10===(a=e.charCodeAt(o)))l=!0,d&&(u=u||o-h-1>n&&" "!==e[h+1],h=o);else if(!rN(a))return 5;s=o>0?e.charCodeAt(o-1):null,p=p&&oN(a,s)}u=u||d&&o-h-1>n&&" "!==e[h+1]}return l||u?i>9&&aN(e)?5:u?4:3:p&&!r(e)?1:2}function cN(e,t,i,n){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==Zx.indexOf(t))return"'"+t+"'";var r=e.indent*Math.max(1,i),o=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-r),a=n||e.flowLevel>-1&&i>=e.flowLevel;switch(sN(t,a,e.indent,o,(function(t){return function(e,t){var i,n;for(i=0,n=e.implicitTypes.length;i<n;i+=1)if(e.implicitTypes[i].resolve(t))return!0;return!1}(e,t)}))){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+lN(t,e.indent)+uN(tN(t,r));case 4:return">"+lN(t,e.indent)+uN(tN(function(e,t){var i,n,r=/(\n+)([^\n]*)/g,o=(s=e.indexOf("\n"),s=-1!==s?s:e.length,r.lastIndex=s,dN(e.slice(0,s),t)),a="\n"===e[0]||" "===e[0];var s;for(;n=r.exec(e);){var c=n[1],l=n[2];i=" "===l[0],o+=c+(a||i||""===l?"":"\n")+dN(l,t),a=i}return o}(t,o),r));case 5:return'"'+function(e){for(var t,i,n,r="",o=0;o<e.length;o++)(t=e.charCodeAt(o))>=55296&&t<=56319&&(i=e.charCodeAt(o+1))>=56320&&i<=57343?(r+=Qx(1024*(t-55296)+i-56320+65536),o++):r+=!(n=Yx[t])&&rN(t)?e[o]:n||Qx(t);return r}(t)+'"';default:throw new Vx("impossible error: invalid scalar style")}}()}function lN(e,t){var i=aN(e)?String(t):"",n="\n"===e[e.length-1];return i+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function uN(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function dN(e,t){if(""===e||" "===e[0])return e;for(var i,n,r=/ [^ ]/g,o=0,a=0,s=0,c="";i=r.exec(e);)(s=i.index)-o>t&&(n=a>o?a:s,c+="\n"+e.slice(o,n),o=n+1),a=s;return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function hN(e,t,i){var n,r,o,a,s,c;for(o=0,a=(r=i?e.explicitTypes:e.implicitTypes).length;o<a;o+=1)if(((s=r[o]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=i?s.tag:"?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===Xx.call(s.represent))n=s.represent(t,c);else{if(!Jx.call(s.represent,c))throw new Vx("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');n=s.represent[c](t,c)}e.dump=n}return!0}return!1}function pN(e,t,i,n,r,o){e.tag=null,e.dump=i,hN(e,i,!1)||hN(e,i,!0);var a=Xx.call(e.dump);n&&(n=e.flowLevel<0||e.flowLevel>t);var s,c,l="[object Object]"===a||"[object Array]"===a;if(l&&(c=-1!==(s=e.duplicates.indexOf(i))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&t>0)&&(r=!1),c&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(l&&c&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===a)n&&0!==Object.keys(e.dump).length?(!function(e,t,i,n){var r,o,a,s,c,l,u="",d=e.tag,h=Object.keys(i);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new Vx("sortKeys must be a boolean or a function");for(r=0,o=h.length;r<o;r+=1)l="",n&&0===r||(l+=iN(e,t)),s=i[a=h[r]],pN(e,t+1,a,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,c&&(l+=iN(e,t)),pN(e,t+1,s,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?l+=":":l+=": ",u+=l+=e.dump));e.tag=d,e.dump=u||"{}"}(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(!function(e,t,i){var n,r,o,a,s,c="",l=e.tag,u=Object.keys(i);for(n=0,r=u.length;n<r;n+=1)s="",0!==n&&(s+=", "),e.condenseFlow&&(s+='"'),a=i[o=u[n]],pN(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),pN(e,t,a,!1,!1)&&(c+=s+=e.dump));e.tag=l,e.dump="{"+c+"}"}(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===a){var u=e.noArrayIndent&&t>0?t-1:t;n&&0!==e.dump.length?(!function(e,t,i,n){var r,o,a="",s=e.tag;for(r=0,o=i.length;r<o;r+=1)pN(e,t+1,i[r],!0,!0)&&(n&&0===r||(a+=iN(e,t)),e.dump&&10===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}(e,u,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(!function(e,t,i){var n,r,o="",a=e.tag;for(n=0,r=i.length;n<r;n+=1)pN(e,t,i[n],!1,!1)&&(0!==n&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=a,e.dump="["+o+"]"}(e,u,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump))}else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new Vx("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&cN(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function mN(e,t){var i,n,r=[],o=[];for(fN(e,r,o),i=0,n=o.length;i<n;i+=1)t.duplicates.push(r[o[i]]);t.usedDuplicates=new Array(n)}function fN(e,t,i){var n,r,o;if(null!==e&&"object"==typeof e)if(-1!==(r=t.indexOf(e)))-1===i.indexOf(r)&&i.push(r);else if(t.push(e),Array.isArray(e))for(r=0,o=e.length;r<o;r+=1)fN(e[r],t,i);else for(r=0,o=(n=Object.keys(e)).length;r<o;r+=1)fN(e[n[r]],t,i)}function gN(e,t){var i=new eN(t=t||{});return i.noRefs||mN(e,i),pN(i,0,e,!0,!0)?i.dump+"\n":""}Hx.dump=gN,Hx.safeDump=function(e,t){return gN(e,qx.extend({schema:Kx},t))};var _N=Qy,bN=Hx;function vN(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Zy.Type=uw,Zy.Schema=gw,Zy.FAILSAFE_SCHEMA=_w,Zy.JSON_SCHEMA=Sw,Zy.CORE_SCHEMA=Ew,Zy.DEFAULT_SAFE_SCHEMA=Kw,Zy.DEFAULT_FULL_SCHEMA=tx,Zy.load=_N.load,Zy.loadAll=_N.loadAll,Zy.safeLoad=_N.safeLoad,Zy.safeLoadAll=_N.safeLoadAll,Zy.dump=bN.dump,Zy.safeDump=bN.safeDump,Zy.YAMLException=nw,Zy.MINIMAL_SCHEMA=_w,Zy.SAFE_SCHEMA=Kw,Zy.DEFAULT_SCHEMA=tx,Zy.scan=vN("scan"),Zy.parse=vN("parse"),Zy.compose=vN("compose"),Zy.addConstructor=vN("addConstructor");var yN=Zy;function wN(e,t){for(var i in t)e[i]=t[i];return e}function xN(e,t){for(var i in e)if("__source"!==i&&!(i in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function NN(e){this.props=e}function kN(e,t){function i(e){var i=this.props.ref,n=i==e.ref;return!n&&i&&(i.call?i(null):i.current=null),t?!t(this.props,e)||!n:xN(this.props,e)}function n(t){return this.shouldComponentUpdate=i,w(e,t)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(NN.prototype=new k).isPureReactComponent=!0,NN.prototype.shouldComponentUpdate=function(e,t){return xN(this.props,e)||xN(this.state,t)};var AN=d.__b;d.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),AN&&AN(e)};var CN="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var ON=function(e,t){return null==e?null:D(D(e).map(t))},SN={map:ON,forEach:ON,count:function(e){return e?D(e).length:0},only:function(e){var t=D(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:D},EN=d.__e;d.__e=function(e,t,i){if(e.then)for(var n,r=t;r=r.__;)if((n=r.__c)&&n.__c)return null==t.__e&&(t.__e=i.__e,t.__k=i.__k),n.__c(e,t);EN(e,t,i)};var FN=d.unmount;function DN(){this.__u=0,this.t=null,this.__b=null}function BN(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function LN(){this.u=null,this.o=null}d.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),FN&&FN(e)},(DN.prototype=new k).__c=function(e,t){var i=t.__c,n=this;null==n.t&&(n.t=[]),n.t.push(i);var r=BN(n.__v),o=!1,a=function(){o||(o=!0,i.__R=null,r?r(s):s())};i.__R=a;var s=function(){if(!--n.__u){if(n.state.__e){var e=n.state.__e;n.__v.__k[0]=function e(t,i,n){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,i,n)})),t.__c&&t.__c.__P===i&&(t.__e&&n.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=n)),t}(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__e:n.__b=null});t=n.t.pop();)t.forceUpdate()}},c=!0===t.__h;n.__u++||c||n.setState({__e:n.__b=n.__v.__k[0]}),e.then(a,a)},DN.prototype.componentWillUnmount=function(){this.t=[]},DN.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var i=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,i,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=wN({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=i),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,i,n)}))),t}(this.__b,i,n.__O=n.__P)}this.__b=null}var r=t.__e&&w(N,null,e.fallback);return r&&(r.__h=null),[w(N,null,t.__e?null:e.children),r]};var MN=function(e,t,i){if(++i[1]===i[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(i=e.u;i;){for(;i.length>3;)i.pop()();if(i[1]<i[0])break;e.u=i=i[2]}};function TN(e){return this.getChildContext=function(){return e.context},e.children}function RN(e){var t=this,i=e.i;t.componentWillUnmount=function(){U(null,t.l),t.l=null,t.i=null},t.i&&t.i!==i&&t.componentWillUnmount(),e.__v?(t.l||(t.i=i,t.l={nodeType:1,parentNode:i,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,i){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),U(w(TN,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}(LN.prototype=new k).__e=function(e){var t=this,i=BN(t.__v),n=t.o.get(e);return n[0]++,function(r){var o=function(){t.props.revealOrder?(n.push(r),MN(t,e,n)):r()};i?i(o):o()}},LN.prototype.render=function(e){this.u=null,this.o=new Map;var t=D(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var i=t.length;i--;)this.o.set(t[i],this.u=[1,0,this.u]);return e.children},LN.prototype.componentDidUpdate=LN.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,i){MN(e,i,t)}))};var $N="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,jN=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,IN=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};k.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(k.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var PN=d.event;function zN(){}function UN(){return this.cancelBubble}function WN(){return this.defaultPrevented}d.event=function(e){return PN&&(e=PN(e)),e.persist=zN,e.isPropagationStopped=UN,e.isDefaultPrevented=WN,e.nativeEvent=e};var HN,qN={configurable:!0,get:function(){return this.class}},VN=d.vnode;d.vnode=function(e){var t=e.type,i=e.props,n=i;if("string"==typeof t){for(var r in n={},i){var o=i[r];"value"===r&&"defaultValue"in i&&null==o||("defaultValue"===r&&"value"in i&&null==i.value?r="value":"download"===r&&!0===o?o="":/ondoubleclick/i.test(r)?r="ondblclick":/^onchange(textarea|input)/i.test(r+t)&&!IN(i.type)?r="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(r)?r=r.toLowerCase():jN.test(r)?r=r.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===o&&(o=void 0),n[r]=o)}"select"==t&&n.multiple&&Array.isArray(n.value)&&(n.value=D(i.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==t&&null!=n.defaultValue&&(n.value=D(i.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),e.props=n}t&&i.class!=i.className&&(qN.enumerable="className"in i,null!=i.className&&(n.class=i.className),Object.defineProperty(n,"className",qN)),e.$$typeof=$N,VN&&VN(e)};var GN=d.__r;d.__r=function(e){GN&&GN(e),HN=e.__c};var KN={ReactCurrentDispatcher:{current:{readContext:function(e){return HN.__n[e.__c].props.value}}}};function XN(e){return!!e&&e.$$typeof===$N}"object"==typeof performance&&"function"==typeof performance.now&&performance.now.bind(performance);var JN={useState:ke,useReducer:Ae,useEffect:Ce,useLayoutEffect:Oe,useRef:Se,useImperativeHandle:function(e,t,i){ge=6,Oe((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==i?i:i.concat(e))},useMemo:Ee,useCallback:Fe,useContext:De,useDebugValue:function(e,t){d.useDebugValue&&d.useDebugValue(t?t(e):e)},version:"16.8.0",Children:SN,render:function(e,t,i){return null==t.__k&&(t.textContent=""),U(e,t),"function"==typeof i&&i(),e?e.__c:null},hydrate:function(e,t,i){return W(e,t),"function"==typeof i&&i(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(U(null,e),!0)},createPortal:function(e,t){return w(RN,{__v:e,i:t})},createElement:w,createContext:q,createFactory:function(e){return w.bind(null,e)},cloneElement:function(e){return XN(e)?H.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:N,isValidElement:XN,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:k,PureComponent:NN,memo:kN,forwardRef:function(e){function t(t,i){var n=wN({},t);return delete n.ref,e(n,(i=t.ref||i)&&("object"!=typeof i||"current"in i)?i:null)}return t.$$typeof=CN,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:N,Suspense:DN,SuspenseList:LN,lazy:function(e){var t,i,n;function r(r){if(t||(t=e()).then((function(e){i=e.default||e}),(function(e){n=e})),n)throw n;if(!i)throw t;return w(i,r)}return r.displayName="Lazy",r.__f=!0,r},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:KN},YN=Object.defineProperty,ZN=Object.defineProperties,QN=Object.getOwnPropertyDescriptors,ek=Object.getOwnPropertySymbols,tk=Object.prototype.hasOwnProperty,ik=Object.prototype.propertyIsEnumerable,nk=(e,t,i)=>t in e?YN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,rk=(e,t)=>{for(var i in t||(t={}))tk.call(t,i)&&nk(e,i,t[i]);if(ek)for(var i of ek(t))ik.call(t,i)&&nk(e,i,t[i]);return e};const ok="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function ak(e){return`[giscus] An error occurred. Error message: "${e}".`}function sk(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function ck(){const e=document.getElementById("giscus-css")||document.createElement("style");e.id="giscus-css",e.textContent="\n .giscus, .giscus-frame {\n width: 100%;\n }\n .giscus-frame {\n border: none;\n color-scheme: normal;\n }\n ",document.head.prepend(e)}function lk(e){const[t,i]=ke(""),n=function({repo:e,repoId:t,category:i="",categoryId:n="",mapping:r,term:o="",theme:a="light",reactionsEnabled:s="1",emitMetadata:c="0",inputPosition:l="bottom",lang:u="en",session:d,origin:h}){const p=new URL(location.href);p.searchParams.delete("giscus");const m=p.toString(),f={origin:h=h||m,session:d,theme:a,reactionsEnabled:s,emitMetadata:c,inputPosition:l,repo:e,repoId:t,category:i,categoryId:n,description:sk("description")};switch(r){case"url":f.term=m;break;case"title":f.term=document.title;break;case"og:title":f.term=sk("title");break;case"specific":f.term=o;break;case"number":f.number=o;break;case"pathname":default:f.term=location.pathname.length<2?"index":location.pathname.substring(1).replace(/\.\w+$/,"")}return`https://giscus.app/${u}/widget?${new URLSearchParams(f)}`}((r=rk({},e),ZN(r,QN({session:t}))));var r;const o=Se(null);return Ce((()=>{const e=location.href,t=new URL(e),n=localStorage.getItem("giscus-session"),r=t.searchParams.get("giscus")||"";if(r)return localStorage.setItem("giscus-session",JSON.stringify(r)),i(r),t.searchParams.delete("giscus"),void history.replaceState(void 0,document.title,t.toString());if(n)try{i(JSON.parse(n||"")||"")}catch(o){i(""),localStorage.removeItem("giscus-session"),console.warn(`${ak(null==o?void 0:o.message)} Session has been cleared.`)}}),[]),Ce(ck,[]),Ce((()=>{const e=function(e,t=null){return function(i){if("https://giscus.app"!==i.origin)return;const{data:n}=i;if("object"!=typeof n||!n.giscus)return;if(t&&n.giscus.resizeHeight&&(t.style.height=`${n.giscus.resizeHeight}px`),!n.giscus.error)return;const r=n.giscus.error;if(r.includes("Bad credentials")||r.includes("Invalid state value")){if(null!==localStorage.getItem("giscus-session"))return localStorage.removeItem("giscus-session"),e(),void console.warn(`${ak(r)} Session has been cleared.`);console.error(`${ak(r)} No session is stored initially. ${ok}`)}r.includes("Discussion not found")?console.warn(`[giscus] ${r}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${ak(r)} ${ok}`)}}((()=>i("")),o.current);return window.addEventListener("message",e),()=>window.removeEventListener("message",e)}),[]),JN.createElement("div",{className:"giscus"},JN.createElement("iframe",{className:"giscus-frame",title:"Comments",scrolling:"no",src:n,ref:o}))}function uk(e){const[t,i]=ke(!1);return Ce((()=>i(!0)),[]),t?JN.createElement(lk,rk({},e)):null}var dk={};
/*!
* howler.js v2.2.3
* howlerjs.com
*
* (c) 2013-2020, James Simpson of GoldFire Studios
* goldfirestudios.com
*
* MIT License
*/function hk(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}!function(e){!function(){var t=function(){this.init()};t.prototype={init:function(){var e=this||i;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.autoUnlock=!0,e._setup(),e},volume:function(e){var t=this||i;if(e=parseFloat(e),t.ctx||u(),void 0!==e&&e>=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,i.ctx.currentTime);for(var n=0;n<t._howls.length;n++)if(!t._howls[n]._webAudio)for(var r=t._howls[n]._getSoundIds(),o=0;o<r.length;o++){var a=t._howls[n]._soundById(r[o]);a&&a._node&&(a._node.volume=a._volume*e)}return t}return t._volume},mute:function(e){var t=this||i;t.ctx||u(),t._muted=e,t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e?0:t._volume,i.ctx.currentTime);for(var n=0;n<t._howls.length;n++)if(!t._howls[n]._webAudio)for(var r=t._howls[n]._getSoundIds(),o=0;o<r.length;o++){var a=t._howls[n]._soundById(r[o]);a&&a._node&&(a._node.muted=!!e||a._muted)}return t},stop:function(){for(var e=this||i,t=0;t<e._howls.length;t++)e._howls[t].stop();return e},unload:function(){for(var e=this||i,t=e._howls.length-1;t>=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&void 0!==e.ctx.close&&(e.ctx.close(),e.ctx=null,u()),e},codecs:function(e){return(this||i)._codecs[e.replace(/^x-/,"")]},_setup:function(){var e=this||i;if(e.state=e.ctx&&e.ctx.state||"suspended",e._autoSuspend(),!e.usingWebAudio)if("undefined"!=typeof Audio)try{void 0===(new Audio).oncanplaythrough&&(e._canPlayEvent="canplay")}catch(t){e.noAudio=!0}else e.noAudio=!0;try{(new Audio).muted&&(e.noAudio=!0)}catch(t){}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||i,t=null;try{t="undefined"!=typeof Audio?new Audio:null}catch(u){return e}if(!t||"function"!=typeof t.canPlayType)return e;var n=t.canPlayType("audio/mpeg;").replace(/^no$/,""),r=e._navigator?e._navigator.userAgent:"",o=r.match(/OPR\/([0-6].)/g),a=o&&parseInt(o[0].split("/")[1],10)<33,s=-1!==r.indexOf("Safari")&&-1===r.indexOf("Chrome"),c=r.match(/Version\/(.*?) /),l=s&&c&&parseInt(c[1],10)<15;return e._codecs={mp3:!(a||!n&&!t.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!n,opus:!!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(t.canPlayType('audio/wav; codecs="1"')||t.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!t.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!t.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(t.canPlayType("audio/x-m4b;")||t.canPlayType("audio/m4b;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(t.canPlayType("audio/x-mp4;")||t.canPlayType("audio/mp4;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(l||!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(l||!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!t.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(t.canPlayType("audio/x-flac;")||t.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||i;if(!e._audioUnlocked&&e.ctx){e._audioUnlocked=!1,e.autoUnlock=!1,e._mobileUnloaded||44100===e.ctx.sampleRate||(e._mobileUnloaded=!0,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var t=function(i){for(;e._html5AudioPool.length<e.html5PoolSize;)try{var n=new Audio;n._unlocked=!0,e._releaseHtml5Audio(n)}catch(l){e.noAudio=!0;break}for(var r=0;r<e._howls.length;r++)if(!e._howls[r]._webAudio)for(var o=e._howls[r]._getSoundIds(),a=0;a<o.length;a++){var s=e._howls[r]._soundById(o[a]);s&&s._node&&!s._node._unlocked&&(s._node._unlocked=!0,s._node.load())}e._autoResume();var c=e.ctx.createBufferSource();c.buffer=e._scratchBuffer,c.connect(e.ctx.destination),void 0===c.start?c.noteOn(0):c.start(0),"function"==typeof e.ctx.resume&&e.ctx.resume(),c.onended=function(){c.disconnect(0),e._audioUnlocked=!0,document.removeEventListener("touchstart",t,!0),document.removeEventListener("touchend",t,!0),document.removeEventListener("click",t,!0),document.removeEventListener("keydown",t,!0);for(var i=0;i<e._howls.length;i++)e._howls[i]._emit("unlock")}};return document.addEventListener("touchstart",t,!0),document.addEventListener("touchend",t,!0),document.addEventListener("click",t,!0),document.addEventListener("keydown",t,!0),e}},_obtainHtml5Audio:function(){var e=this||i;if(e._html5AudioPool.length)return e._html5AudioPool.pop();var t=(new Audio).play();return t&&"undefined"!=typeof Promise&&(t instanceof Promise||"function"==typeof t.then)&&t.catch((function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")})),new Audio},_releaseHtml5Audio:function(e){var t=this||i;return e._unlocked&&t._html5AudioPool.push(e),t},_autoSuspend:function(){var e=this;if(e.autoSuspend&&e.ctx&&void 0!==e.ctx.suspend&&i.usingWebAudio){for(var t=0;t<e._howls.length;t++)if(e._howls[t]._webAudio)for(var n=0;n<e._howls[t]._sounds.length;n++)if(!e._howls[t]._sounds[n]._paused)return e;return e._suspendTimer&&clearTimeout(e._suspendTimer),e._suspendTimer=setTimeout((function(){if(e.autoSuspend){e._suspendTimer=null,e.state="suspending";var t=function(){e.state="suspended",e._resumeAfterSuspend&&(delete e._resumeAfterSuspend,e._autoResume())};e.ctx.suspend().then(t,t)}}),3e4),e}},_autoResume:function(){var e=this;if(e.ctx&&void 0!==e.ctx.resume&&i.usingWebAudio)return"running"===e.state&&"interrupted"!==e.ctx.state&&e._suspendTimer?(clearTimeout(e._suspendTimer),e._suspendTimer=null):"suspended"===e.state||"running"===e.state&&"interrupted"===e.ctx.state?(e.ctx.resume().then((function(){e.state="running";for(var t=0;t<e._howls.length;t++)e._howls[t]._emit("resume")})),e._suspendTimer&&(clearTimeout(e._suspendTimer),e._suspendTimer=null)):"suspending"===e.state&&(e._resumeAfterSuspend=!0),e}};var i=new t,n=function(e){e.src&&0!==e.src.length?this.init(e):console.error("An array of source files must be passed with any new Howl.")};n.prototype={init:function(e){var t=this;return i.ctx||u(),t._autoplay=e.autoplay||!1,t._format="string"!=typeof e.format?e.format:[e.format],t._html5=e.html5||!1,t._muted=e.mute||!1,t._loop=e.loop||!1,t._pool=e.pool||5,t._preload="boolean"!=typeof e.preload&&"metadata"!==e.preload||e.preload,t._rate=e.rate||1,t._sprite=e.sprite||{},t._src="string"!=typeof e.src?e.src:[e.src],t._volume=void 0!==e.volume?e.volume:1,t._xhr={method:e.xhr&&e.xhr.method?e.xhr.method:"GET",headers:e.xhr&&e.xhr.headers?e.xhr.headers:null,withCredentials:!(!e.xhr||!e.xhr.withCredentials)&&e.xhr.withCredentials},t._duration=0,t._state="unloaded",t._sounds=[],t._endTimers={},t._queue=[],t._playLock=!1,t._onend=e.onend?[{fn:e.onend}]:[],t._onfade=e.onfade?[{fn:e.onfade}]:[],t._onload=e.onload?[{fn:e.onload}]:[],t._onloaderror=e.onloaderror?[{fn:e.onloaderror}]:[],t._onplayerror=e.onplayerror?[{fn:e.onplayerror}]:[],t._onpause=e.onpause?[{fn:e.onpause}]:[],t._onplay=e.onplay?[{fn:e.onplay}]:[],t._onstop=e.onstop?[{fn:e.onstop}]:[],t._onmute=e.onmute?[{fn:e.onmute}]:[],t._onvolume=e.onvolume?[{fn:e.onvolume}]:[],t._onrate=e.onrate?[{fn:e.onrate}]:[],t._onseek=e.onseek?[{fn:e.onseek}]:[],t._onunlock=e.onunlock?[{fn:e.onunlock}]:[],t._onresume=[],t._webAudio=i.usingWebAudio&&!t._html5,void 0!==i.ctx&&i.ctx&&i.autoUnlock&&i._unlockAudio(),i._howls.push(t),t._autoplay&&t._queue.push({event:"play",action:function(){t.play()}}),t._preload&&"none"!==t._preload&&t.load(),t},load:function(){var e=this,t=null;if(i.noAudio)e._emit("loaderror",null,"No audio support.");else{"string"==typeof e._src&&(e._src=[e._src]);for(var n=0;n<e._src.length;n++){var o,s;if(e._format&&e._format[n])o=e._format[n];else{if("string"!=typeof(s=e._src[n])){e._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(o=/^data:audio\/([^;,]+);/i.exec(s))||(o=/\.([^.]+)$/.exec(s.split("?",1)[0])),o&&(o=o[1].toLowerCase())}if(o||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),o&&i.codecs(o)){t=e._src[n];break}}if(t)return e._src=t,e._state="loading","https:"===window.location.protocol&&"http:"===t.slice(0,5)&&(e._html5=!0,e._webAudio=!1),new r(e),e._webAudio&&a(e),e;e._emit("loaderror",null,"No codec support for selected audio sources.")}},play:function(e,t){var n=this,r=null;if("number"==typeof e)r=e,e=null;else{if("string"==typeof e&&"loaded"===n._state&&!n._sprite[e])return null;if(void 0===e&&(e="__default",!n._playLock)){for(var o=0,a=0;a<n._sounds.length;a++)n._sounds[a]._paused&&!n._sounds[a]._ended&&(o++,r=n._sounds[a]._id);1===o?e=null:r=null}}var s=r?n._soundById(r):n._inactiveSound();if(!s)return null;if(r&&!e&&(e=s._sprite||"__default"),"loaded"!==n._state){s._sprite=e,s._ended=!1;var c=s._id;return n._queue.push({event:"play",action:function(){n.play(c)}}),c}if(r&&!s._paused)return t||n._loadQueue("play"),s._id;n._webAudio&&i._autoResume();var l=Math.max(0,s._seek>0?s._seek:n._sprite[e][0]/1e3),u=Math.max(0,(n._sprite[e][0]+n._sprite[e][1])/1e3-l),d=1e3*u/Math.abs(s._rate),h=n._sprite[e][0]/1e3,p=(n._sprite[e][0]+n._sprite[e][1])/1e3;s._sprite=e,s._ended=!1;var m=function(){s._paused=!1,s._seek=l,s._start=h,s._stop=p,s._loop=!(!s._loop&&!n._sprite[e][2])};if(!(l>=p)){var f=s._node;if(n._webAudio){var g=function(){n._playLock=!1,m(),n._refreshBuffer(s);var e=s._muted||n._muted?0:s._volume;f.gain.setValueAtTime(e,i.ctx.currentTime),s._playStart=i.ctx.currentTime,void 0===f.bufferSource.start?s._loop?f.bufferSource.noteGrainOn(0,l,86400):f.bufferSource.noteGrainOn(0,l,u):s._loop?f.bufferSource.start(0,l,86400):f.bufferSource.start(0,l,u),d!==1/0&&(n._endTimers[s._id]=setTimeout(n._ended.bind(n,s),d)),t||setTimeout((function(){n._emit("play",s._id),n._loadQueue()}),0)};"running"===i.state&&"interrupted"!==i.ctx.state?g():(n._playLock=!0,n.once("resume",g),n._clearTimer(s._id))}else{var _=function(){f.currentTime=l,f.muted=s._muted||n._muted||i._muted||f.muted,f.volume=s._volume*i.volume(),f.playbackRate=s._rate;try{var r=f.play();if(r&&"undefined"!=typeof Promise&&(r instanceof Promise||"function"==typeof r.then)?(n._playLock=!0,m(),r.then((function(){n._playLock=!1,f._unlocked=!0,t?n._loadQueue():n._emit("play",s._id)})).catch((function(){n._playLock=!1,n._emit("playerror",s._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),s._ended=!0,s._paused=!0}))):t||(n._playLock=!1,m(),n._emit("play",s._id)),f.playbackRate=s._rate,f.paused)return void n._emit("playerror",s._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");"__default"!==e||s._loop?n._endTimers[s._id]=setTimeout(n._ended.bind(n,s),d):(n._endTimers[s._id]=function(){n._ended(s),f.removeEventListener("ended",n._endTimers[s._id],!1)},f.addEventListener("ended",n._endTimers[s._id],!1))}catch(o){n._emit("playerror",s._id,o)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===f.src&&(f.src=n._src,f.load());var b=window&&window.ejecta||!f.readyState&&i._navigator.isCocoonJS;if(f.readyState>=3||b)_();else{n._playLock=!0,n._state="loading";var v=function(){n._state="loaded",_(),f.removeEventListener(i._canPlayEvent,v,!1)};f.addEventListener(i._canPlayEvent,v,!1),n._clearTimer(s._id)}}return s._id}n._ended(s)},pause:function(e){var t=this;if("loaded"!==t._state||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e)}}),t;for(var i=t._getSoundIds(e),n=0;n<i.length;n++){t._clearTimer(i[n]);var r=t._soundById(i[n]);if(r&&!r._paused&&(r._seek=t.seek(i[n]),r._rateSeek=0,r._paused=!0,t._stopFade(i[n]),r._node))if(t._webAudio){if(!r._node.bufferSource)continue;void 0===r._node.bufferSource.stop?r._node.bufferSource.noteOff(0):r._node.bufferSource.stop(0),t._cleanBuffer(r._node)}else isNaN(r._node.duration)&&r._node.duration!==1/0||r._node.pause();arguments[1]||t._emit("pause",r?r._id:null)}return t},stop:function(e,t){var i=this;if("loaded"!==i._state||i._playLock)return i._queue.push({event:"stop",action:function(){i.stop(e)}}),i;for(var n=i._getSoundIds(e),r=0;r<n.length;r++){i._clearTimer(n[r]);var o=i._soundById(n[r]);o&&(o._seek=o._start||0,o._rateSeek=0,o._paused=!0,o._ended=!0,i._stopFade(n[r]),o._node&&(i._webAudio?o._node.bufferSource&&(void 0===o._node.bufferSource.stop?o._node.bufferSource.noteOff(0):o._node.bufferSource.stop(0),i._cleanBuffer(o._node)):isNaN(o._node.duration)&&o._node.duration!==1/0||(o._node.currentTime=o._start||0,o._node.pause(),o._node.duration===1/0&&i._clearSound(o._node))),t||i._emit("stop",o._id))}return i},mute:function(e,t){var n=this;if("loaded"!==n._state||n._playLock)return n._queue.push({event:"mute",action:function(){n.mute(e,t)}}),n;if(void 0===t){if("boolean"!=typeof e)return n._muted;n._muted=e}for(var r=n._getSoundIds(t),o=0;o<r.length;o++){var a=n._soundById(r[o]);a&&(a._muted=e,a._interval&&n._stopFade(a._id),n._webAudio&&a._node?a._node.gain.setValueAtTime(e?0:a._volume,i.ctx.currentTime):a._node&&(a._node.muted=!!i._muted||e),n._emit("mute",a._id))}return n},volume:function(){var e,t,n,r=this,o=arguments;if(0===o.length)return r._volume;if(1===o.length||2===o.length&&void 0===o[1]){var a=r._getSoundIds(),s=a.indexOf(o[0]);s>=0?t=parseInt(o[0],10):e=parseFloat(o[0])}else o.length>=2&&(e=parseFloat(o[0]),t=parseInt(o[1],10));if(!(void 0!==e&&e>=0&&e<=1))return(n=t?r._soundById(t):r._sounds[0])?n._volume:0;if("loaded"!==r._state||r._playLock)return r._queue.push({event:"volume",action:function(){r.volume.apply(r,o)}}),r;void 0===t&&(r._volume=e),t=r._getSoundIds(t);for(var c=0;c<t.length;c++)(n=r._soundById(t[c]))&&(n._volume=e,o[2]||r._stopFade(t[c]),r._webAudio&&n._node&&!n._muted?n._node.gain.setValueAtTime(e,i.ctx.currentTime):n._node&&!n._muted&&(n._node.volume=e*i.volume()),r._emit("volume",n._id));return r},fade:function(e,t,n,r){var o=this;if("loaded"!==o._state||o._playLock)return o._queue.push({event:"fade",action:function(){o.fade(e,t,n,r)}}),o;e=Math.min(Math.max(0,parseFloat(e)),1),t=Math.min(Math.max(0,parseFloat(t)),1),n=parseFloat(n),o.volume(e,r);for(var a=o._getSoundIds(r),s=0;s<a.length;s++){var c=o._soundById(a[s]);if(c){if(r||o._stopFade(a[s]),o._webAudio&&!c._muted){var l=i.ctx.currentTime,u=l+n/1e3;c._volume=e,c._node.gain.setValueAtTime(e,l),c._node.gain.linearRampToValueAtTime(t,u)}o._startFadeInterval(c,e,t,n,a[s],void 0===r)}}return o},_startFadeInterval:function(e,t,i,n,r,o){var a=this,s=t,c=i-t,l=Math.abs(c/.01),u=Math.max(4,l>0?n/l:n),d=Date.now();e._fadeTo=i,e._interval=setInterval((function(){var r=(Date.now()-d)/n;d=Date.now(),s+=c*r,s=Math.round(100*s)/100,s=c<0?Math.max(i,s):Math.min(i,s),a._webAudio?e._volume=s:a.volume(s,e._id,!0),o&&(a._volume=s),(i<t&&s<=i||i>t&&s>=i)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,a.volume(i,e._id),a._emit("fade",e._id))}),u)},_stopFade:function(e){var t=this,n=t._soundById(e);return n&&n._interval&&(t._webAudio&&n._node.gain.cancelScheduledValues(i.ctx.currentTime),clearInterval(n._interval),n._interval=null,t.volume(n._fadeTo,e),n._fadeTo=null,t._emit("fade",e)),t},loop:function(){var e,t,i,n=this,r=arguments;if(0===r.length)return n._loop;if(1===r.length){if("boolean"!=typeof r[0])return!!(i=n._soundById(parseInt(r[0],10)))&&i._loop;e=r[0],n._loop=e}else 2===r.length&&(e=r[0],t=parseInt(r[1],10));for(var o=n._getSoundIds(t),a=0;a<o.length;a++)(i=n._soundById(o[a]))&&(i._loop=e,n._webAudio&&i._node&&i._node.bufferSource&&(i._node.bufferSource.loop=e,e&&(i._node.bufferSource.loopStart=i._start||0,i._node.bufferSource.loopEnd=i._stop,n.playing(o[a])&&(n.pause(o[a],!0),n.play(o[a],!0)))));return n},rate:function(){var e,t,n,r=this,o=arguments;if(0===o.length)t=r._sounds[0]._id;else if(1===o.length){var a=r._getSoundIds(),s=a.indexOf(o[0]);s>=0?t=parseInt(o[0],10):e=parseFloat(o[0])}else 2===o.length&&(e=parseFloat(o[0]),t=parseInt(o[1],10));if("number"!=typeof e)return(n=r._soundById(t))?n._rate:r._rate;if("loaded"!==r._state||r._playLock)return r._queue.push({event:"rate",action:function(){r.rate.apply(r,o)}}),r;void 0===t&&(r._rate=e),t=r._getSoundIds(t);for(var c=0;c<t.length;c++)if(n=r._soundById(t[c])){r.playing(t[c])&&(n._rateSeek=r.seek(t[c]),n._playStart=r._webAudio?i.ctx.currentTime:n._playStart),n._rate=e,r._webAudio&&n._node&&n._node.bufferSource?n._node.bufferSource.playbackRate.setValueAtTime(e,i.ctx.currentTime):n._node&&(n._node.playbackRate=e);var l=r.seek(t[c]),u=(r._sprite[n._sprite][0]+r._sprite[n._sprite][1])/1e3-l,d=1e3*u/Math.abs(n._rate);!r._endTimers[t[c]]&&n._paused||(r._clearTimer(t[c]),r._endTimers[t[c]]=setTimeout(r._ended.bind(r,n),d)),r._emit("rate",n._id)}return r},seek:function(){var e,t,n=this,r=arguments;if(0===r.length)n._sounds.length&&(t=n._sounds[0]._id);else if(1===r.length){var o=n._getSoundIds(),a=o.indexOf(r[0]);a>=0?t=parseInt(r[0],10):n._sounds.length&&(t=n._sounds[0]._id,e=parseFloat(r[0]))}else 2===r.length&&(e=parseFloat(r[0]),t=parseInt(r[1],10));if(void 0===t)return 0;if("number"==typeof e&&("loaded"!==n._state||n._playLock))return n._queue.push({event:"seek",action:function(){n.seek.apply(n,r)}}),n;var s=n._soundById(t);if(s){if(!("number"==typeof e&&e>=0)){if(n._webAudio){var c=n.playing(t)?i.ctx.currentTime-s._playStart:0,l=s._rateSeek?s._rateSeek-s._seek:0;return s._seek+(l+c*Math.abs(s._rate))}return s._node.currentTime}var u=n.playing(t);u&&n.pause(t,!0),s._seek=e,s._ended=!1,n._clearTimer(t),n._webAudio||!s._node||isNaN(s._node.duration)||(s._node.currentTime=e);var d=function(){u&&n.play(t,!0),n._emit("seek",t)};if(u&&!n._webAudio){var h=function(){n._playLock?setTimeout(h,0):d()};setTimeout(h,0)}else d()}return n},playing:function(e){var t=this;if("number"==typeof e){var i=t._soundById(e);return!!i&&!i._paused}for(var n=0;n<t._sounds.length;n++)if(!t._sounds[n]._paused)return!0;return!1},duration:function(e){var t=this,i=t._duration,n=t._soundById(e);return n&&(i=t._sprite[n._sprite][1]/1e3),i},state:function(){return this._state},unload:function(){for(var e=this,t=e._sounds,n=0;n<t.length;n++)t[n]._paused||e.stop(t[n]._id),e._webAudio||(e._clearSound(t[n]._node),t[n]._node.removeEventListener("error",t[n]._errorFn,!1),t[n]._node.removeEventListener(i._canPlayEvent,t[n]._loadFn,!1),t[n]._node.removeEventListener("ended",t[n]._endFn,!1),i._releaseHtml5Audio(t[n]._node)),delete t[n]._node,e._clearTimer(t[n]._id);var r=i._howls.indexOf(e);r>=0&&i._howls.splice(r,1);var a=!0;for(n=0;n<i._howls.length;n++)if(i._howls[n]._src===e._src||e._src.indexOf(i._howls[n]._src)>=0){a=!1;break}return o&&a&&delete o[e._src],i.noAudio=!1,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,i,n){var r=this["_on"+e];return"function"==typeof t&&r.push(n?{id:i,fn:t,once:n}:{id:i,fn:t}),this},off:function(e,t,i){var n=this,r=n["_on"+e],o=0;if("number"==typeof t&&(i=t,t=null),t||i)for(o=0;o<r.length;o++){var a=i===r[o].id;if(t===r[o].fn&&a||!t&&a){r.splice(o,1);break}}else if(e)n["_on"+e]=[];else{var s=Object.keys(n);for(o=0;o<s.length;o++)0===s[o].indexOf("_on")&&Array.isArray(n[s[o]])&&(n[s[o]]=[])}return n},once:function(e,t,i){return this.on(e,t,i,1),this},_emit:function(e,t,i){for(var n=this,r=n["_on"+e],o=r.length-1;o>=0;o--)r[o].id&&r[o].id!==t&&"load"!==e||(setTimeout(function(e){e.call(this,t,i)}.bind(n,r[o].fn),0),r[o].once&&n.off(e,r[o].fn,r[o].id));return n._loadQueue(e),n},_loadQueue:function(e){var t=this;if(t._queue.length>0){var i=t._queue[0];i.event===e&&(t._queue.shift(),t._loadQueue()),e||i.action()}return t},_ended:function(e){var t=this,n=e._sprite;if(!t._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime<e._stop)return setTimeout(t._ended.bind(t,e),100),t;var r=!(!e._loop&&!t._sprite[n][2]);if(t._emit("end",e._id),!t._webAudio&&r&&t.stop(e._id,!0).play(e._id),t._webAudio&&r){t._emit("play",e._id),e._seek=e._start||0,e._rateSeek=0,e._playStart=i.ctx.currentTime;var o=1e3*(e._stop-e._start)/Math.abs(e._rate);t._endTimers[e._id]=setTimeout(t._ended.bind(t,e),o)}return t._webAudio&&!r&&(e._paused=!0,e._ended=!0,e._seek=e._start||0,e._rateSeek=0,t._clearTimer(e._id),t._cleanBuffer(e._node),i._autoSuspend()),t._webAudio||r||t.stop(e._id,!0),t},_clearTimer:function(e){var t=this;if(t._endTimers[e]){if("function"!=typeof t._endTimers[e])clearTimeout(t._endTimers[e]);else{var i=t._soundById(e);i&&i._node&&i._node.removeEventListener("ended",t._endTimers[e],!1)}delete t._endTimers[e]}return t},_soundById:function(e){for(var t=this,i=0;i<t._sounds.length;i++)if(e===t._sounds[i]._id)return t._sounds[i];return null},_inactiveSound:function(){var e=this;e._drain();for(var t=0;t<e._sounds.length;t++)if(e._sounds[t]._ended)return e._sounds[t].reset();return new r(e)},_drain:function(){var e=this,t=e._pool,i=0,n=0;if(!(e._sounds.length<t)){for(n=0;n<e._sounds.length;n++)e._sounds[n]._ended&&i++;for(n=e._sounds.length-1;n>=0;n--){if(i<=t)return;e._sounds[n]._ended&&(e._webAudio&&e._sounds[n]._node&&e._sounds[n]._node.disconnect(0),e._sounds.splice(n,1),i--)}}},_getSoundIds:function(e){if(void 0===e){for(var t=[],i=0;i<this._sounds.length;i++)t.push(this._sounds[i]._id);return t}return[e]},_refreshBuffer:function(e){return e._node.bufferSource=i.ctx.createBufferSource(),e._node.bufferSource.buffer=o[this._src],e._panner?e._node.bufferSource.connect(e._panner):e._node.bufferSource.connect(e._node),e._node.bufferSource.loop=e._loop,e._loop&&(e._node.bufferSource.loopStart=e._start||0,e._node.bufferSource.loopEnd=e._stop||0),e._node.bufferSource.playbackRate.setValueAtTime(e._rate,i.ctx.currentTime),this},_cleanBuffer:function(e){var t=i._navigator&&i._navigator.vendor.indexOf("Apple")>=0;if(i._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),t))try{e.bufferSource.buffer=i._scratchBuffer}catch(n){}return e.bufferSource=null,this},_clearSound:function(e){/MSIE |Trident\//.test(i._navigator&&i._navigator.userAgent)||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var r=function(e){this._parent=e,this.init()};r.prototype={init:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++i._counter,t._sounds.push(e),e.create(),e},create:function(){var e=this,t=e._parent,n=i._muted||e._muted||e._parent._muted?0:e._volume;return t._webAudio?(e._node=void 0===i.ctx.createGain?i.ctx.createGainNode():i.ctx.createGain(),e._node.gain.setValueAtTime(n,i.ctx.currentTime),e._node.paused=!0,e._node.connect(i.masterGain)):i.noAudio||(e._node=i._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener("error",e._errorFn,!1),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(i._canPlayEvent,e._loadFn,!1),e._endFn=e._endListener.bind(e),e._node.addEventListener("ended",e._endFn,!1),e._node.src=t._src,e._node.preload=!0===t._preload?"auto":t._preload,e._node.volume=n*i.volume(),e._node.load()),e},reset:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._rateSeek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++i._counter,e},_errorListener:function(){var e=this;e._parent._emit("loaderror",e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener("error",e._errorFn,!1)},_loadListener:function(){var e=this,t=e._parent;t._duration=Math.ceil(10*e._node.duration)/10,0===Object.keys(t._sprite).length&&(t._sprite={__default:[0,1e3*t._duration]}),"loaded"!==t._state&&(t._state="loaded",t._emit("load"),t._loadQueue()),e._node.removeEventListener(i._canPlayEvent,e._loadFn,!1)},_endListener:function(){var e=this,t=e._parent;t._duration===1/0&&(t._duration=Math.ceil(10*e._node.duration)/10,t._sprite.__default[1]===1/0&&(t._sprite.__default[1]=1e3*t._duration),t._ended(e)),e._node.removeEventListener("ended",e._endFn,!1)}};var o={},a=function(e){var t=e._src;if(o[t])return e._duration=o[t].duration,void l(e);if(/^data:[^;]+;base64,/.test(t)){for(var i=atob(t.split(",")[1]),n=new Uint8Array(i.length),r=0;r<i.length;++r)n[r]=i.charCodeAt(r);c(n.buffer,e)}else{var a=new XMLHttpRequest;a.open(e._xhr.method,t,!0),a.withCredentials=e._xhr.withCredentials,a.responseType="arraybuffer",e._xhr.headers&&Object.keys(e._xhr.headers).forEach((function(t){a.setRequestHeader(t,e._xhr.headers[t])})),a.onload=function(){var t=(a.status+"")[0];"0"===t||"2"===t||"3"===t?c(a.response,e):e._emit("loaderror",null,"Failed loading audio file with status: "+a.status+".")},a.onerror=function(){e._webAudio&&(e._html5=!0,e._webAudio=!1,e._sounds=[],delete o[t],e.load())},s(a)}},s=function(e){try{e.send()}catch(t){e.onerror()}},c=function(e,t){var n=function(){t._emit("loaderror",null,"Decoding audio data failed.")},r=function(e){e&&t._sounds.length>0?(o[t._src]=e,l(t,e)):n()};"undefined"!=typeof Promise&&1===i.ctx.decodeAudioData.length?i.ctx.decodeAudioData(e).then(r).catch(n):i.ctx.decodeAudioData(e,r,n)},l=function(e,t){t&&!e._duration&&(e._duration=t.duration),0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue())},u=function(){if(i.usingWebAudio){try{"undefined"!=typeof AudioContext?i.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?i.ctx=new webkitAudioContext:i.usingWebAudio=!1}catch(o){i.usingWebAudio=!1}i.ctx||(i.usingWebAudio=!1);var e=/iP(hone|od|ad)/.test(i._navigator&&i._navigator.platform),t=i._navigator&&i._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),n=t?parseInt(t[1],10):null;if(e&&n&&n<9){var r=/safari/.test(i._navigator&&i._navigator.userAgent.toLowerCase());i._navigator&&!r&&(i.usingWebAudio=!1)}i.usingWebAudio&&(i.masterGain=void 0===i.ctx.createGain?i.ctx.createGainNode():i.ctx.createGain(),i.masterGain.gain.setValueAtTime(i._muted?0:i._volume,i.ctx.currentTime),i.masterGain.connect(i.ctx.destination)),i._setup()}};e.Howler=i,e.Howl=n,void 0!==Ie?(Ie.HowlerGlobal=t,Ie.Howler=i,Ie.Howl=n,Ie.Sound=r):"undefined"!=typeof window&&(window.HowlerGlobal=t,window.Howler=i,window.Howl=n,window.Sound=r)}(),
/*!
* Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
*
* howler.js v2.2.3
* howlerjs.com
*
* (c) 2013-2020, James Simpson of GoldFire Studios
* goldfirestudios.com
*
* MIT License
*/
function(){var e;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){var t=this;if(!t.ctx||!t.ctx.listener)return t;for(var i=t._howls.length-1;i>=0;i--)t._howls[i].stereo(e);return t},HowlerGlobal.prototype.pos=function(e,t,i){var n=this;return n.ctx&&n.ctx.listener?(t="number"!=typeof t?n._pos[1]:t,i="number"!=typeof i?n._pos[2]:i,"number"!=typeof e?n._pos:(n._pos=[e,t,i],void 0!==n.ctx.listener.positionX?(n.ctx.listener.positionX.setTargetAtTime(n._pos[0],Howler.ctx.currentTime,.1),n.ctx.listener.positionY.setTargetAtTime(n._pos[1],Howler.ctx.currentTime,.1),n.ctx.listener.positionZ.setTargetAtTime(n._pos[2],Howler.ctx.currentTime,.1)):n.ctx.listener.setPosition(n._pos[0],n._pos[1],n._pos[2]),n)):n},HowlerGlobal.prototype.orientation=function(e,t,i,n,r,o){var a=this;if(!a.ctx||!a.ctx.listener)return a;var s=a._orientation;return t="number"!=typeof t?s[1]:t,i="number"!=typeof i?s[2]:i,n="number"!=typeof n?s[3]:n,r="number"!=typeof r?s[4]:r,o="number"!=typeof o?s[5]:o,"number"!=typeof e?s:(a._orientation=[e,t,i,n,r,o],void 0!==a.ctx.listener.forwardX?(a.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),a.ctx.listener.forwardY.setTargetAtTime(t,Howler.ctx.currentTime,.1),a.ctx.listener.forwardZ.setTargetAtTime(i,Howler.ctx.currentTime,.1),a.ctx.listener.upX.setTargetAtTime(n,Howler.ctx.currentTime,.1),a.ctx.listener.upY.setTargetAtTime(r,Howler.ctx.currentTime,.1),a.ctx.listener.upZ.setTargetAtTime(o,Howler.ctx.currentTime,.1)):a.ctx.listener.setOrientation(e,t,i,n,r,o),a)},Howl.prototype.init=(e=Howl.prototype.init,function(t){var i=this;return i._orientation=t.orientation||[1,0,0],i._stereo=t.stereo||null,i._pos=t.pos||null,i._pannerAttr={coneInnerAngle:void 0!==t.coneInnerAngle?t.coneInnerAngle:360,coneOuterAngle:void 0!==t.coneOuterAngle?t.coneOuterAngle:360,coneOuterGain:void 0!==t.coneOuterGain?t.coneOuterGain:0,distanceModel:void 0!==t.distanceModel?t.distanceModel:"inverse",maxDistance:void 0!==t.maxDistance?t.maxDistance:1e4,panningModel:void 0!==t.panningModel?t.panningModel:"HRTF",refDistance:void 0!==t.refDistance?t.refDistance:1,rolloffFactor:void 0!==t.rolloffFactor?t.rolloffFactor:1},i._onstereo=t.onstereo?[{fn:t.onstereo}]:[],i._onpos=t.onpos?[{fn:t.onpos}]:[],i._onorientation=t.onorientation?[{fn:t.onorientation}]:[],e.call(this,t)}),Howl.prototype.stereo=function(e,i){var n=this;if(!n._webAudio)return n;if("loaded"!==n._state)return n._queue.push({event:"stereo",action:function(){n.stereo(e,i)}}),n;var r=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===i){if("number"!=typeof e)return n._stereo;n._stereo=e,n._pos=[e,0,0]}for(var o=n._getSoundIds(i),a=0;a<o.length;a++){var s=n._soundById(o[a]);if(s){if("number"!=typeof e)return s._stereo;s._stereo=e,s._pos=[e,0,0],s._node&&(s._pannerAttr.panningModel="equalpower",s._panner&&s._panner.pan||t(s,r),"spatial"===r?void 0!==s._panner.positionX?(s._panner.positionX.setValueAtTime(e,Howler.ctx.currentTime),s._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),s._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):s._panner.setPosition(e,0,0):s._panner.pan.setValueAtTime(e,Howler.ctx.currentTime)),n._emit("stereo",s._id)}}return n},Howl.prototype.pos=function(e,i,n,r){var o=this;if(!o._webAudio)return o;if("loaded"!==o._state)return o._queue.push({event:"pos",action:function(){o.pos(e,i,n,r)}}),o;if(i="number"!=typeof i?0:i,n="number"!=typeof n?-.5:n,void 0===r){if("number"!=typeof e)return o._pos;o._pos=[e,i,n]}for(var a=o._getSoundIds(r),s=0;s<a.length;s++){var c=o._soundById(a[s]);if(c){if("number"!=typeof e)return c._pos;c._pos=[e,i,n],c._node&&(c._panner&&!c._panner.pan||t(c,"spatial"),void 0!==c._panner.positionX?(c._panner.positionX.setValueAtTime(e,Howler.ctx.currentTime),c._panner.positionY.setValueAtTime(i,Howler.ctx.currentTime),c._panner.positionZ.setValueAtTime(n,Howler.ctx.currentTime)):c._panner.setPosition(e,i,n)),o._emit("pos",c._id)}}return o},Howl.prototype.orientation=function(e,i,n,r){var o=this;if(!o._webAudio)return o;if("loaded"!==o._state)return o._queue.push({event:"orientation",action:function(){o.orientation(e,i,n,r)}}),o;if(i="number"!=typeof i?o._orientation[1]:i,n="number"!=typeof n?o._orientation[2]:n,void 0===r){if("number"!=typeof e)return o._orientation;o._orientation=[e,i,n]}for(var a=o._getSoundIds(r),s=0;s<a.length;s++){var c=o._soundById(a[s]);if(c){if("number"!=typeof e)return c._orientation;c._orientation=[e,i,n],c._node&&(c._panner||(c._pos||(c._pos=o._pos||[0,0,-.5]),t(c,"spatial")),void 0!==c._panner.orientationX?(c._panner.orientationX.setValueAtTime(e,Howler.ctx.currentTime),c._panner.orientationY.setValueAtTime(i,Howler.ctx.currentTime),c._panner.orientationZ.setValueAtTime(n,Howler.ctx.currentTime)):c._panner.setOrientation(e,i,n)),o._emit("orientation",c._id)}}return o},Howl.prototype.pannerAttr=function(){var e,i,n,r=this,o=arguments;if(!r._webAudio)return r;if(0===o.length)return r._pannerAttr;if(1===o.length){if("object"!=typeof o[0])return(n=r._soundById(parseInt(o[0],10)))?n._pannerAttr:r._pannerAttr;e=o[0],void 0===i&&(e.pannerAttr||(e.pannerAttr={coneInnerAngle:e.coneInnerAngle,coneOuterAngle:e.coneOuterAngle,coneOuterGain:e.coneOuterGain,distanceModel:e.distanceModel,maxDistance:e.maxDistance,refDistance:e.refDistance,rolloffFactor:e.rolloffFactor,panningModel:e.panningModel}),r._pannerAttr={coneInnerAngle:void 0!==e.pannerAttr.coneInnerAngle?e.pannerAttr.coneInnerAngle:r._coneInnerAngle,coneOuterAngle:void 0!==e.pannerAttr.coneOuterAngle?e.pannerAttr.coneOuterAngle:r._coneOuterAngle,coneOuterGain:void 0!==e.pannerAttr.coneOuterGain?e.pannerAttr.coneOuterGain:r._coneOuterGain,distanceModel:void 0!==e.pannerAttr.distanceModel?e.pannerAttr.distanceModel:r._distanceModel,maxDistance:void 0!==e.pannerAttr.maxDistance?e.pannerAttr.maxDistance:r._maxDistance,refDistance:void 0!==e.pannerAttr.refDistance?e.pannerAttr.refDistance:r._refDistance,rolloffFactor:void 0!==e.pannerAttr.rolloffFactor?e.pannerAttr.rolloffFactor:r._rolloffFactor,panningModel:void 0!==e.pannerAttr.panningModel?e.pannerAttr.panningModel:r._panningModel})}else 2===o.length&&(e=o[0],i=parseInt(o[1],10));for(var a=r._getSoundIds(i),s=0;s<a.length;s++)if(n=r._soundById(a[s])){var c=n._pannerAttr;c={coneInnerAngle:void 0!==e.coneInnerAngle?e.coneInnerAngle:c.coneInnerAngle,coneOuterAngle:void 0!==e.coneOuterAngle?e.coneOuterAngle:c.coneOuterAngle,coneOuterGain:void 0!==e.coneOuterGain?e.coneOuterGain:c.coneOuterGain,distanceModel:void 0!==e.distanceModel?e.distanceModel:c.distanceModel,maxDistance:void 0!==e.maxDistance?e.maxDistance:c.maxDistance,refDistance:void 0!==e.refDistance?e.refDistance:c.refDistance,rolloffFactor:void 0!==e.rolloffFactor?e.rolloffFactor:c.rolloffFactor,panningModel:void 0!==e.panningModel?e.panningModel:c.panningModel};var l=n._panner;l?(l.coneInnerAngle=c.coneInnerAngle,l.coneOuterAngle=c.coneOuterAngle,l.coneOuterGain=c.coneOuterGain,l.distanceModel=c.distanceModel,l.maxDistance=c.maxDistance,l.refDistance=c.refDistance,l.rolloffFactor=c.rolloffFactor,l.panningModel=c.panningModel):(n._pos||(n._pos=r._pos||[0,0,-.5]),t(n,"spatial"))}return r},Sound.prototype.init=function(e){return function(){var t=this,i=t._parent;t._orientation=i._orientation,t._stereo=i._stereo,t._pos=i._pos,t._pannerAttr=i._pannerAttr,e.call(this),t._stereo?i.stereo(t._stereo):t._pos&&i.pos(t._pos[0],t._pos[1],t._pos[2],t._id)}}(Sound.prototype.init),Sound.prototype.reset=function(e){return function(){var t=this,i=t._parent;return t._orientation=i._orientation,t._stereo=i._stereo,t._pos=i._pos,t._pannerAttr=i._pannerAttr,t._stereo?i.stereo(t._stereo):t._pos?i.pos(t._pos[0],t._pos[1],t._pos[2],t._id):t._panner&&(t._panner.disconnect(0),t._panner=void 0,i._refreshBuffer(t)),e.call(this)}}(Sound.prototype.reset);var t=function(e,t){"spatial"===(t=t||"spatial")?(e._panner=Howler.ctx.createPanner(),e._panner.coneInnerAngle=e._pannerAttr.coneInnerAngle,e._panner.coneOuterAngle=e._pannerAttr.coneOuterAngle,e._panner.coneOuterGain=e._pannerAttr.coneOuterGain,e._panner.distanceModel=e._pannerAttr.distanceModel,e._panner.maxDistance=e._pannerAttr.maxDistance,e._panner.refDistance=e._pannerAttr.refDistance,e._panner.rolloffFactor=e._pannerAttr.rolloffFactor,e._panner.panningModel=e._pannerAttr.panningModel,void 0!==e._panner.positionX?(e._panner.positionX.setValueAtTime(e._pos[0],Howler.ctx.currentTime),e._panner.positionY.setValueAtTime(e._pos[1],Howler.ctx.currentTime),e._panner.positionZ.setValueAtTime(e._pos[2],Howler.ctx.currentTime)):e._panner.setPosition(e._pos[0],e._pos[1],e._pos[2]),void 0!==e._panner.orientationX?(e._panner.orientationX.setValueAtTime(e._orientation[0],Howler.ctx.currentTime),e._panner.orientationY.setValueAtTime(e._orientation[1],Howler.ctx.currentTime),e._panner.orientationZ.setValueAtTime(e._orientation[2],Howler.ctx.currentTime)):e._panner.setOrientation(e._orientation[0],e._orientation[1],e._orientation[2])):(e._panner=Howler.ctx.createStereoPanner(),e._panner.pan.setValueAtTime(e._stereo,Howler.ctx.currentTime)),e._panner.connect(e._node),e._paused||e._parent.pause(e._id,!0).play(e._id,!0)}}()}(dk);let pk={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const mk=/[&<>"']/,fk=/[&<>"']/g,gk=/[<>"']|&(?!#?\w+;)/,_k=/[<>"']|&(?!#?\w+;)/g,bk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vk=e=>bk[e];function yk(e,t){if(t){if(mk.test(e))return e.replace(fk,vk)}else if(gk.test(e))return e.replace(_k,vk);return e}const wk=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function xk(e){return e.replace(wk,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const Nk=/(^|[^\[])\^/g;function kk(e,t){e=e.source||e,t=t||"";const i={replace:(t,n)=>(n=(n=n.source||n).replace(Nk,"$1"),e=e.replace(t,n),i),getRegex:()=>new RegExp(e,t)};return i}const Ak=/[^\w:]/g,Ck=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ok(e,t,i){if(e){let e;try{e=decodeURIComponent(xk(i)).replace(Ak,"").toLowerCase()}catch(n){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!Ck.test(i)&&(i=function(e,t){Sk[" "+e]||(Ek.test(e)?Sk[" "+e]=e+"/":Sk[" "+e]=Tk(e,"/",!0));const i=-1===(e=Sk[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(Fk,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(Dk,"$1")+t:e+t}(t,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(n){return null}return i}const Sk={},Ek=/^[^:]+:\/*[^/]*$/,Fk=/^([^:]+:)[\s\S]*$/,Dk=/^([^:]+:\/*[^/]*)[\s\S]*$/;const Bk={exec:function(){}};function Lk(e){let t,i,n=1;for(;n<arguments.length;n++)for(i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}function Mk(e,t){const i=e.replace(/\|/g,((e,t,i)=>{let n=!1,r=t;for(;--r>=0&&"\\"===i[r];)n=!n;return n?"|":" |"})).split(/ \|/);let n=0;if(i[0].trim()||i.shift(),i[i.length-1].trim()||i.pop(),i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i}function Tk(e,t,i){const n=e.length;if(0===n)return"";let r=0;for(;r<n;){const o=e.charAt(n-r-1);if(o!==t||i){if(o===t||!i)break;r++}else r++}return e.substr(0,n-r)}function Rk(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function $k(e,t){if(t<1)return"";let i="";for(;t>1;)1&t&&(i+=e),t>>=1,e+=e;return i+e}function jk(e,t,i,n){const r=t.href,o=t.title?yk(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:i,href:r,title:o,text:a,tokens:n.inlineTokens(a,[])};return n.state.inLink=!1,e}return{type:"image",raw:i,href:r,title:o,text:yk(a)}}class Ik{constructor(e){this.options=e||pk}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Tk(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=function(e,t){const i=e.match(/^(\s+)(?:```)/);if(null===i)return t;const n=i[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[i]=t;return i.length>=n.length?e.slice(n.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=Tk(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}const i={type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i,n,r,o,a,s,c,l,u,d,h,p,m=t[1].trim();const f=m.length>1,g={type:"list",raw:"",ordered:f,start:f?+m.slice(0,-1):"",loose:!1,items:[]};m=f?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=f?m:"[*+-]");const _=new RegExp(`^( {0,3}${m})((?: [^\\n]*)?(?:\\n|$))`);for(;e&&(p=!1,t=_.exec(e))&&!this.rules.block.hr.test(e);){if(i=t[0],e=e.substring(i.length),l=t[2].split("\n",1)[0],u=e.split("\n",1)[0],this.options.pedantic?(o=2,h=l.trimLeft()):(o=t[2].search(/[^ ]/),o=o>4?1:o,h=l.slice(o),o+=t[1].length),s=!1,!l&&/^ *$/.test(u)&&(i+=u+"\n",e=e.substring(u.length+1),p=!0),!p){const t=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;e&&(d=e.split("\n",1)[0],l=d,this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!t.test(l));){if(l.search(/[^ ]/)>=o||!l.trim())h+="\n"+l.slice(o);else{if(s)break;h+="\n"+l}s||l.trim()||(s=!0),i+=d+"\n",e=e.substring(d.length+1)}}g.loose||(c?g.loose=!0:/\n *\n *$/.test(i)&&(c=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(h),n&&(r="[ ] "!==n[0],h=h.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:i,task:!!n,checked:r,loose:!1,text:h}),g.raw+=i}g.items[g.items.length-1].raw=i.trimRight(),g.items[g.items.length-1].text=h.trimRight(),g.raw=g.raw.trimRight();const b=g.items.length;for(a=0;a<b;a++){this.lexer.state.top=!1,g.items[a].tokens=this.lexer.blockTokens(g.items[a].text,[]);const e=g.items[a].tokens.filter((e=>"space"===e.type)),t=e.every((e=>{const t=e.raw.split("");let i=0;for(const n of t)if("\n"===n&&(i+=1),i>1)return!0;return!1}));!g.loose&&e.length&&t&&(g.loose=!0,g.items[a].loose=!0)}return g}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(e.type="paragraph",e.text=this.options.sanitizer?this.options.sanitizer(t[0]):yk(t[0]),e.tokens=[],this.lexer.inline(e.text,e.tokens)),e}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));return{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:Mk(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let i,n,r,o,a=e.align.length;for(i=0;i<a;i++)/^ *-+: *$/.test(e.align[i])?e.align[i]="right":/^ *:-+: *$/.test(e.align[i])?e.align[i]="center":/^ *:-+ *$/.test(e.align[i])?e.align[i]="left":e.align[i]=null;for(a=e.rows.length,i=0;i<a;i++)e.rows[i]=Mk(e.rows[i],e.header.length).map((e=>({text:e})));for(a=e.header.length,n=0;n<a;n++)e.header[n].tokens=[],this.lexer.inlineTokens(e.header[n].text,e.header[n].tokens);for(a=e.rows.length,n=0;n<a;n++)for(o=e.rows[n],r=0;r<o.length;r++)o[r].tokens=[],this.lexer.inlineTokens(o[r].text,o[r].tokens);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t){const e={type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e={type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}text(e){const t=this.rules.block.text.exec(e);if(t){const e={type:"text",raw:t[0],text:t[0],tokens:[]};return this.lexer.inline(e.text,e.tokens),e}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:yk(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):yk(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=Tk(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const i=e.length;let n=0,r=0;for(;r<i;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}(t[2],"()");if(e>-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);e&&(i=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(i=this.options.pedantic&&!/>$/.test(e)?i.slice(1):i.slice(1,-1)),jk(t,{href:i?i.replace(this.rules.inline._escapes,"$1"):i,title:n?n.replace(this.rules.inline._escapes,"$1"):n},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let e=(i[2]||i[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return jk(i,e,i[0],this.lexer)}}emStrong(e,t,i=""){let n=this.rules.inline.emStrong.lDelim.exec(e);if(!n)return;if(n[3]&&i.match(/[\p{L}\p{N}]/u))return;const r=n[1]||n[2]||"";if(!r||r&&(""===i||this.rules.inline.punctuation.exec(i))){const i=n[0].length-1;let r,o,a=i,s=0;const c="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);null!=(n=c.exec(t));){if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!r)continue;if(o=r.length,n[3]||n[4]){a+=o;continue}if((n[5]||n[6])&&i%3&&!((i+o)%3)){s+=o;continue}if(a-=o,a>0)continue;if(o=Math.min(o,o+a+s),Math.min(i,o)%2){const t=e.slice(1,i+n.index+o);return{type:"em",raw:e.slice(0,i+n.index+o+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}const t=e.slice(2,i+n.index+o-1);return{type:"strong",raw:e.slice(0,i+n.index+o+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const i=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return i&&n&&(e=e.substring(1,e.length-1)),e=yk(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){const i=this.rules.inline.autolink.exec(e);if(i){let e,n;return"@"===i[2]?(e=yk(this.options.mangle?t(i[1]):i[1]),n="mailto:"+e):(e=yk(i[1]),n=e),{type:"link",raw:i[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let i;if(i=this.rules.inline.url.exec(e)){let e,n;if("@"===i[2])e=yk(this.options.mangle?t(i[0]):i[0]),n="mailto:"+e;else{let t;do{t=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(t!==i[0]);e=yk(i[0]),n="www."===i[1]?"http://"+e:e}return{type:"link",raw:i[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const i=this.rules.inline.text.exec(e);if(i){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):yk(i[0]):i[0]:yk(this.options.smartypants?t(i[0]):i[0]),{type:"text",raw:i[0],text:e}}}}const Pk={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Bk,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Pk.def=kk(Pk.def).replace("label",Pk._label).replace("title",Pk._title).getRegex(),Pk.bullet=/(?:[*+-]|\d{1,9}[.)])/,Pk.listItemStart=kk(/^( *)(bull) */).replace("bull",Pk.bullet).getRegex(),Pk.list=kk(Pk.list).replace(/bull/g,Pk.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Pk.def.source+")").getRegex(),Pk._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Pk._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Pk.html=kk(Pk.html,"i").replace("comment",Pk._comment).replace("tag",Pk._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Pk.paragraph=kk(Pk._paragraph).replace("hr",Pk.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pk._tag).getRegex(),Pk.blockquote=kk(Pk.blockquote).replace("paragraph",Pk.paragraph).getRegex(),Pk.normal=Lk({},Pk),Pk.gfm=Lk({},Pk.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Pk.gfm.table=kk(Pk.gfm.table).replace("hr",Pk.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pk._tag).getRegex(),Pk.gfm.paragraph=kk(Pk._paragraph).replace("hr",Pk.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Pk.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pk._tag).getRegex(),Pk.pedantic=Lk({},Pk.normal,{html:kk("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Pk._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Bk,paragraph:kk(Pk.normal._paragraph).replace("hr",Pk.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Pk.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const zk={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Bk,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Bk,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function Uk(e){return e.replace(/---/g,"—").replace(/--/g,"").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1").replace(/'/g,"").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function Wk(e){let t,i,n="";const r=e.length;for(t=0;t<r;t++)i=e.charCodeAt(t),Math.random()>.5&&(i="x"+i.toString(16)),n+="&#"+i+";";return n}zk._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",zk.punctuation=kk(zk.punctuation).replace(/punctuation/g,zk._punctuation).getRegex(),zk.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,zk.escapedEmSt=/\\\*|\\_/g,zk._comment=kk(Pk._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),zk.emStrong.lDelim=kk(zk.emStrong.lDelim).replace(/punct/g,zk._punctuation).getRegex(),zk.emStrong.rDelimAst=kk(zk.emStrong.rDelimAst,"g").replace(/punct/g,zk._punctuation).getRegex(),zk.emStrong.rDelimUnd=kk(zk.emStrong.rDelimUnd,"g").replace(/punct/g,zk._punctuation).getRegex(),zk._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,zk._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,zk._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,zk.autolink=kk(zk.autolink).replace("scheme",zk._scheme).replace("email",zk._email).getRegex(),zk._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,zk.tag=kk(zk.tag).replace("comment",zk._comment).replace("attribute",zk._attribute).getRegex(),zk._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,zk._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,zk._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,zk.link=kk(zk.link).replace("label",zk._label).replace("href",zk._href).replace("title",zk._title).getRegex(),zk.reflink=kk(zk.reflink).replace("label",zk._label).replace("ref",Pk._label).getRegex(),zk.nolink=kk(zk.nolink).replace("ref",Pk._label).getRegex(),zk.reflinkSearch=kk(zk.reflinkSearch,"g").replace("reflink",zk.reflink).replace("nolink",zk.nolink).getRegex(),zk.normal=Lk({},zk),zk.pedantic=Lk({},zk.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:kk(/^!?\[(label)\]\((.*?)\)/).replace("label",zk._label).getRegex(),reflink:kk(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",zk._label).getRegex()}),zk.gfm=Lk({},zk.normal,{escape:kk(zk.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),zk.gfm.url=kk(zk.gfm.url,"i").replace("email",zk.gfm._extended_email).getRegex(),zk.breaks=Lk({},zk.gfm,{br:kk(zk.br).replace("{2,}","*").getRegex(),text:kk(zk.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});class Hk{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||pk,this.options.tokenizer=this.options.tokenizer||new Ik,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:Pk.normal,inline:zk.normal};this.options.pedantic?(t.block=Pk.pedantic,t.inline=zk.pedantic):this.options.gfm&&(t.block=Pk.gfm,this.options.breaks?t.inline=zk.breaks:t.inline=zk.gfm),this.tokenizer.rules=t}static get rules(){return{block:Pk,inline:zk}}static lex(e,t){return new Hk(t).lex(e)}static lexInline(e,t){return new Hk(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let i,n,r,o;for(this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(i=n.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))))if(i=this.tokenizer.space(e))e=e.substring(i.raw.length),1===i.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(i);else if(i=this.tokenizer.code(e))e=e.substring(i.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?t.push(i):(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.fences(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.heading(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.hr(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.blockquote(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.list(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.html(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.def(e))e=e.substring(i.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(n.raw+="\n"+i.raw,n.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.table(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.lheading(e))e=e.substring(i.raw.length),t.push(i);else{if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startBlock.forEach((function(e){n=e.call({lexer:this},i),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(r)))n=t[t.length-1],o&&"paragraph"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i),o=r.length!==e.length,e=e.substring(i.raw.length);else if(i=this.tokenizer.text(e))e=e.substring(i.raw.length),n=t[t.length-1],n&&"text"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e,t=[]){let i,n,r,o,a,s,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,o.index)+"["+$k("a",o[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,o.index)+"["+$k("a",o[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,o.index)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(s=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(i=n.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),n=t[t.length-1],n&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),n=t[t.length-1],n&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,c,s))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e,Wk))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e,Wk))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startInline.forEach((function(e){n=e.call({lexer:this},i),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(i=this.tokenizer.inlineText(r,Uk))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(s=i.raw.slice(-1)),a=!0,n=t[t.length-1],n&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(i.raw.length),t.push(i);return t}}class qk{constructor(e){this.options=e||pk}code(e,t,i){const n=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,n);null!=t&&t!==e&&(i=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",n?'<pre><code class="'+this.options.langPrefix+yk(n,!0)+'">'+(i?e:yk(e,!0))+"</code></pre>\n":"<pre><code>"+(i?e:yk(e,!0))+"</code></pre>\n"}blockquote(e){return"<blockquote>\n"+e+"</blockquote>\n"}html(e){return e}heading(e,t,i,n){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+n.slug(i)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,i){const n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"</"+n+">\n"}listitem(e){return"<li>"+e+"</li>\n"}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return"<p>"+e+"</p>\n"}table(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return"<tr>\n"+e+"</tr>\n"}tablecell(e,t){const i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"</"+i+">\n"}strong(e){return"<strong>"+e+"</strong>"}em(e){return"<em>"+e+"</em>"}codespan(e){return"<code>"+e+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return"<del>"+e+"</del>"}link(e,t,i){if(null===(e=Ok(this.options.sanitize,this.options.baseUrl,e)))return i;let n='<a href="'+yk(e)+'"';return t&&(n+=' title="'+t+'"'),n+=">"+i+"</a>",n}image(e,t,i){if(null===(e=Ok(this.options.sanitize,this.options.baseUrl,e)))return i;let n='<img src="'+e+'" alt="'+i+'"';return t&&(n+=' title="'+t+'"'),n+=this.options.xhtml?"/>":">",n}text(e){return e}}class Vk{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}}class Gk{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{n++,i=e+"-"+n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i}slug(e,t={}){const i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)}}class Kk{constructor(e){this.options=e||pk,this.options.renderer=this.options.renderer||new qk,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Vk,this.slugger=new Gk}static parse(e,t){return new Kk(t).parse(e)}static parseInline(e,t){return new Kk(t).parseInline(e)}parse(e,t=!0){let i,n,r,o,a,s,c,l,u,d,h,p,m,f,g,_,b,v,y,w="";const x=e.length;for(i=0;i<x;i++)if(d=e[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type]&&(y=this.options.extensions.renderers[d.type].call({parser:this},d),!1!==y||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)))w+=y||"";else switch(d.type){case"space":continue;case"hr":w+=this.renderer.hr();continue;case"heading":w+=this.renderer.heading(this.parseInline(d.tokens),d.depth,xk(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":w+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(l="",c="",o=d.header.length,n=0;n<o;n++)c+=this.renderer.tablecell(this.parseInline(d.header[n].tokens),{header:!0,align:d.align[n]});for(l+=this.renderer.tablerow(c),u="",o=d.rows.length,n=0;n<o;n++){for(s=d.rows[n],c="",a=s.length,r=0;r<a;r++)c+=this.renderer.tablecell(this.parseInline(s[r].tokens),{header:!1,align:d.align[r]});u+=this.renderer.tablerow(c)}w+=this.renderer.table(l,u);continue;case"blockquote":u=this.parse(d.tokens),w+=this.renderer.blockquote(u);continue;case"list":for(h=d.ordered,p=d.start,m=d.loose,o=d.items.length,u="",n=0;n<o;n++)g=d.items[n],_=g.checked,b=g.task,f="",g.task&&(v=this.renderer.checkbox(_),m?g.tokens.length>0&&"paragraph"===g.tokens[0].type?(g.tokens[0].text=v+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=v+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:v}):f+=v),f+=this.parse(g.tokens,m),u+=this.renderer.listitem(f,b,_);w+=this.renderer.list(u,h,p);continue;case"html":w+=this.renderer.html(d.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;i+1<x&&"text"===e[i+1].type;)d=e[++i],u+="\n"+(d.tokens?this.parseInline(d.tokens):d.text);w+=t?this.renderer.paragraph(u):u;continue;default:{const e='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return w}parseInline(e,t){t=t||this.renderer;let i,n,r,o="";const a=e.length;for(i=0;i<a;i++)if(n=e[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type]&&(r=this.options.extensions.renderers[n.type].call({parser:this},n),!1!==r||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)))o+=r||"";else switch(n.type){case"escape":o+=t.text(n.text);break;case"html":o+=t.html(n.text);break;case"link":o+=t.link(n.href,n.title,this.parseInline(n.tokens,t));break;case"image":o+=t.image(n.href,n.title,n.text);break;case"strong":o+=t.strong(this.parseInline(n.tokens,t));break;case"em":o+=t.em(this.parseInline(n.tokens,t));break;case"codespan":o+=t.codespan(n.text);break;case"br":o+=t.br();break;case"del":o+=t.del(this.parseInline(n.tokens,t));break;case"text":o+=t.text(n.text);break;default:{const e='Token with "'+n.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return o}}function Xk(e,t,i){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(i=t,t=null),Rk(t=Lk({},Xk.defaults,t||{})),i){const r=t.highlight;let o;try{o=Hk.lex(e,t)}catch(n){return i(n)}const a=function(e){let a;if(!e)try{t.walkTokens&&Xk.walkTokens(o,t.walkTokens),a=Kk.parse(o,t)}catch(n){e=n}return t.highlight=r,e?i(e):i(null,a)};if(!r||r.length<3)return a();if(delete t.highlight,!o.length)return a();let s=0;return Xk.walkTokens(o,(function(e){"code"===e.type&&(s++,setTimeout((()=>{r(e.text,e.lang,(function(t,i){if(t)return a(t);null!=i&&i!==e.text&&(e.text=i,e.escaped=!0),s--,0===s&&a()}))}),0))})),void(0===s&&a())}try{const i=Hk.lex(e,t);return t.walkTokens&&Xk.walkTokens(i,t.walkTokens),Kk.parse(i,t)}catch(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+yk(n.message+"",!0)+"</pre>";throw n}}Xk.options=Xk.setOptions=function(e){var t;return Lk(Xk.defaults,e),t=Xk.defaults,pk=t,Xk},Xk.getDefaults=hk,Xk.defaults=pk,Xk.use=function(...e){const t=Lk({},...e),i=Xk.defaults.extensions||{renderers:{},childTokens:{}};let n;e.forEach((e=>{if(e.extensions&&(n=!0,e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const t=i.renderers?i.renderers[e.name]:null;i.renderers[e.name]=t?function(...i){let n=e.renderer.apply(this,i);return!1===n&&(n=t.apply(this,i)),n}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");i[e.level]?i[e.level].unshift(e.tokenizer):i[e.level]=[e.tokenizer],e.start&&("block"===e.level?i.startBlock?i.startBlock.push(e.start):i.startBlock=[e.start]:"inline"===e.level&&(i.startInline?i.startInline.push(e.start):i.startInline=[e.start]))}e.childTokens&&(i.childTokens[e.name]=e.childTokens)}))),e.renderer){const i=Xk.defaults.renderer||new qk;for(const t in e.renderer){const n=i[t];i[t]=(...r)=>{let o=e.renderer[t].apply(i,r);return!1===o&&(o=n.apply(i,r)),o}}t.renderer=i}if(e.tokenizer){const i=Xk.defaults.tokenizer||new Ik;for(const t in e.tokenizer){const n=i[t];i[t]=(...r)=>{let o=e.tokenizer[t].apply(i,r);return!1===o&&(o=n.apply(i,r)),o}}t.tokenizer=i}if(e.walkTokens){const i=Xk.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens.call(this,t),i&&i.call(this,t)}}n&&(t.extensions=i),Xk.setOptions(t)}))},Xk.walkTokens=function(e,t){for(const i of e)switch(t.call(Xk,i),i.type){case"table":for(const e of i.header)Xk.walkTokens(e.tokens,t);for(const e of i.rows)for(const i of e)Xk.walkTokens(i.tokens,t);break;case"list":Xk.walkTokens(i.items,t);break;default:Xk.defaults.extensions&&Xk.defaults.extensions.childTokens&&Xk.defaults.extensions.childTokens[i.type]?Xk.defaults.extensions.childTokens[i.type].forEach((function(e){Xk.walkTokens(i[e],t)})):i.tokens&&Xk.walkTokens(i.tokens,t)}},Xk.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");Rk(t=Lk({},Xk.defaults,t||{}));try{const i=Hk.lexInline(e,t);return t.walkTokens&&Xk.walkTokens(i,t.walkTokens),Kk.parseInline(i,t)}catch(i){if(i.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+yk(i.message+"",!0)+"</pre>";throw i}},Xk.Parser=Kk,Xk.parser=Kk.parse,Xk.Renderer=qk,Xk.TextRenderer=Vk,Xk.Lexer=Hk,Xk.lexer=Hk.lex,Xk.Tokenizer=Ik,Xk.Slugger=Gk,Xk.parse=Xk,Kk.parse,Hk.lex;export{he as $,Fe as A,l_ as B,ff as C,sf as D,bg as E,De as F,Uf as G,Jf as H,og as I,dg as J,wg as K,Df as L,mg as M,Og as N,Ig as O,lb as P,Of as Q,ag as R,ub as S,Yy as T,yN as U,kN as V,Be as W,Sf as X,uk as Y,ib as Z,tg as _,w as a,dk as a0,Xk as a1,de as a2,U as a3,re as b,ke as c,Ft as d,Ee as e,N as f,ne as g,_r as h,da as i,Si as j,rc as k,Pe as l,ou as m,hh as n,mh as o,e_ as p,q,St as r,Se as s,t_ as t,n_ as u,r_ as v,Gf as w,yg as x,Ce as y,s_ as z};
//# sourceMappingURL=vendor.753ffb9a.js.map