Files
misode.github.io/assets/index.fbc79ff6.js
2022-06-07 15:52:59 +00:00

113 lines
385 KiB
JavaScript

var vu=Object.defineProperty,wu=Object.defineProperties;var yu=Object.getOwnPropertyDescriptors;var Br=Object.getOwnPropertySymbols;var cs=Object.prototype.hasOwnProperty,us=Object.prototype.propertyIsEnumerable;var ls=(e,t,n)=>t in e?vu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z=(e,t)=>{for(var n in t||(t={}))cs.call(t,n)&&ls(e,n,t[n]);if(Br)for(var n of Br(t))us.call(t,n)&&ls(e,n,t[n]);return e},_e=(e,t)=>wu(e,yu(t));var Yi=e=>typeof e=="symbol"?e:e+"",ds=(e,t)=>{var n={};for(var r in e)cs.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Br)for(var r of Br(e))t.indexOf(r)<0&&us.call(e,r)&&(n[r]=e[r]);return n};const bu=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}};bu();var G,rr,ja,hs,Va,si={},Oo=[],xu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Ft(e,t){for(var n in t)e[n]=t[n];return e}function Ha(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,n){var r,i,o,s=arguments,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>3)for(n=[n],o=3;o<arguments.length;o++)n.push(s[o]);if(n!=null&&(a.children=n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return ir(e,a,r,i,null)}function ir(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++G.__v:i};return G.vnode!=null&&G.vnode(o),o}function Au(){return{current:null}}function ne(e){return e.children}function _t(e,t){this.props=e,this.context=t}function ur(e,t){if(t==null)return e.__?ur(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ur(e):null}function Ua(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Ua(e)}}function ao(e){(!e.__d&&(e.__d=!0)&&rr.push(e)&&!ai.__r++||hs!==G.debounceRendering)&&((hs=G.debounceRendering)||ja)(ai)}function ai(){for(var e;ai.__r=rr.length;)e=rr.sort(function(t,n){return t.__v.__b-n.__v.__b}),rr=[],e.some(function(t){var n,r,i,o,s,a;t.__d&&(s=(o=(n=t).__v).__e,(a=n.__P)&&(r=[],(i=Ft({},o)).__v=o.__v+1,No(a,o,i,n.__n,a.ownerSVGElement!==void 0,o.__h!=null?[s]:null,r,s==null?ur(o):s,o.__h),qa(r,o),o.__e!=s&&Ua(o)))})}function Ga(e,t,n,r,i,o,s,a,l,u){var c,d,f,p,m,v,g,_=r&&r.__k||Oo,x=_.length;for(n.__k=[],c=0;c<t.length;c++)if((p=n.__k[c]=(p=t[c])==null||typeof p=="boolean"?null:typeof p=="string"||typeof p=="number"||typeof p=="bigint"?ir(null,p,null,null,p):Array.isArray(p)?ir(ne,{children:p},null,null,null):p.__b>0?ir(p.type,p.props,p.key,null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(f=_[c])===null||f&&p.key==f.key&&p.type===f.type)_[c]=void 0;else for(d=0;d<x;d++){if((f=_[d])&&p.key==f.key&&p.type===f.type){_[d]=void 0;break}f=null}No(e,p,f=f||si,i,o,s,a,l,u),m=p.__e,(d=p.ref)&&f.ref!=d&&(g||(g=[]),f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||m,p)),m!=null?(v==null&&(v=m),typeof p.type=="function"&&p.__k!=null&&p.__k===f.__k?p.__d=l=Ya(p,l,e):l=Wa(e,p,f,_,m,l),u||n.type!=="option"?typeof n.type=="function"&&(n.__d=l):e.value=""):l&&f.__e==l&&l.parentNode!=e&&(l=ur(f))}for(n.__e=v,c=x;c--;)_[c]!=null&&(typeof n.type=="function"&&_[c].__e!=null&&_[c].__e==n.__d&&(n.__d=ur(r,c+1)),Xa(_[c],_[c]));if(g)for(c=0;c<g.length;c++)Za(g[c],g[++c],g[++c])}function Ya(e,t,n){var r,i;for(r=0;r<e.__k.length;r++)(i=e.__k[r])&&(i.__=e,t=typeof i.type=="function"?Ya(i,t,n):Wa(n,i,i,e.__k,i.__e,t));return t}function vt(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){vt(n,t)}):t.push(e)),t}function Wa(e,t,n,r,i,o){var s,a,l;if(t.__d!==void 0)s=t.__d,t.__d=void 0;else if(n==null||i!=o||i.parentNode==null)e:if(o==null||o.parentNode!==e)e.appendChild(i),s=null;else{for(a=o,l=0;(a=a.nextSibling)&&l<r.length;l+=2)if(a==i)break e;e.insertBefore(i,o),s=o}return s!==void 0?s:i.nextSibling}function ku(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||li(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||li(e,o,t[o],n[o],r)}function fs(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||xu.test(t)?n:n+"px"}function li(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||fs(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||fs(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")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]=n,n?r||e.addEventListener(t,o?ms:ps,o):e.removeEventListener(t,o?ms:ps,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function ps(e){this.l[e.type+!1](G.event?G.event(e):e)}function ms(e){this.l[e.type+!0](G.event?G.event(e):e)}function No(e,t,n,r,i,o,s,a,l){var u,c,d,f,p,m,v,g,_,x,w,b=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(u=G.__b)&&u(t);try{e:if(typeof b=="function"){if(g=t.props,_=(u=b.contextType)&&r[u.__c],x=u?_?_.props.value:u.__:r,n.__c?v=(c=t.__c=n.__c).__=c.__E:("prototype"in b&&b.prototype.render?t.__c=c=new b(g,x):(t.__c=c=new _t(g,x),c.constructor=b,c.render=Eu),_&&_.sub(c),c.props=g,c.state||(c.state={}),c.context=x,c.__n=r,d=c.__d=!0,c.__h=[]),c.__s==null&&(c.__s=c.state),b.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Ft({},c.__s)),Ft(c.__s,b.getDerivedStateFromProps(g,c.__s))),f=c.props,p=c.state,d)b.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(b.getDerivedStateFromProps==null&&g!==f&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(g,x),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(g,c.__s,x)===!1||t.__v===n.__v){c.props=g,c.state=c.__s,t.__v!==n.__v&&(c.__d=!1),c.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(A){A&&(A.__=t)}),c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(g,c.__s,x),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(f,p,m)})}c.context=x,c.props=g,c.state=c.__s,(u=G.__r)&&u(t),c.__d=!1,c.__v=t,c.__P=e,u=c.render(c.props,c.state,c.context),c.state=c.__s,c.getChildContext!=null&&(r=Ft(Ft({},r),c.getChildContext())),d||c.getSnapshotBeforeUpdate==null||(m=c.getSnapshotBeforeUpdate(f,p)),w=u!=null&&u.type===ne&&u.key==null?u.props.children:u,Ga(e,Array.isArray(w)?w:[w],t,n,r,i,o,s,a,l),c.base=t.__e,t.__h=null,c.__h.length&&s.push(c),v&&(c.__E=c.__=null),c.__e=!1}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Su(n.__e,t,n,r,i,o,s,l);(u=G.diffed)&&u(t)}catch(A){t.__v=null,(l||o!=null)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),G.__e(A,t,n)}}function qa(e,t){G.__c&&G.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(r){r.call(n)})}catch(r){G.__e(r,n.__v)}})}function Su(e,t,n,r,i,o,s,a){var l,u,c,d,f=n.props,p=t.props,m=t.type,v=0;if(m==="svg"&&(i=!0),o!=null){for(;v<o.length;v++)if((l=o[v])&&(l===e||(m?l.localName==m:l.nodeType==3))){e=l,o[v]=null;break}}if(e==null){if(m===null)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,p.is&&p),o=null,a=!1}if(m===null)f===p||a&&e.data===p||(e.data=p);else{if(o=o&&Oo.slice.call(e.childNodes),u=(f=n.props||si).dangerouslySetInnerHTML,c=p.dangerouslySetInnerHTML,!a){if(o!=null)for(f={},d=0;d<e.attributes.length;d++)f[e.attributes[d].name]=e.attributes[d].value;(c||u)&&(c&&(u&&c.__html==u.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(ku(e,p,f,i,a),c)t.__k=[];else if(v=t.props.children,Ga(e,Array.isArray(v)?v:[v],t,n,r,i&&m!=="foreignObject",o,s,e.firstChild,a),o!=null)for(v=o.length;v--;)o[v]!=null&&Ha(o[v]);a||("value"in p&&(v=p.value)!==void 0&&(v!==e.value||m==="progress"&&!v)&&li(e,"value",v,f.value,!1),"checked"in p&&(v=p.checked)!==void 0&&v!==e.checked&&li(e,"checked",v,f.checked,!1))}return e}function Za(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){G.__e(r,n)}}function Xa(e,t,n){var r,i,o;if(G.unmount&&G.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Za(r,null,t)),n||typeof e.type=="function"||(n=(i=e.__e)!=null),e.__e=e.__d=void 0,(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){G.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Xa(r[o],t,n);i!=null&&Ha(i)}function Eu(e,t,n){return this.constructor(e,n)}function Rn(e,t,n){var r,i,o;G.__&&G.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],No(t,e=(!r&&n||t).__k=h(ne,null,[e]),i||si,si,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?Oo.slice.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),qa(o,e)}function Ja(e,t){Rn(e,t,Ja)}function Ka(e,t,n){var r,i,o,s=arguments,a=Ft({},e.props);for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>3)for(n=[n],o=3;o<arguments.length;o++)n.push(s[o]);return n!=null&&(a.children=n),ir(e.type,a,r||e.key,i||e.ref,null)}function pn(e,t){var n={__c:t="__cC"+Va++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(ao)},this.sub=function(s){i.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}G={__e:function(e,t){for(var n,r,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&r.getDerivedStateFromError!=null&&(n.setState(r.getDerivedStateFromError(e)),i=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e),i=n.__d),i)return n.__E=n}catch(o){e=o}throw e},__v:0},_t.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ft({},this.state),typeof e=="function"&&(e=e(Ft({},n),this.props)),e&&Ft(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),ao(this))},_t.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ao(this))},_t.prototype.render=ne,rr=[],ja=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ai.__r=0,Va=0;var Cu={};function Qa(e,t){for(var n in t)e[n]=t[n];return e}function el(e,t,n){var r=/(?:\?([^#]*))?(#.*)?$/,i=e.match(r),o={},s;if(i&&i[1])for(var a=i[1].split("&"),l=0;l<a.length;l++){var u=a[l].split("=");o[decodeURIComponent(u[0])]=decodeURIComponent(u.slice(1).join("="))}e=lo(e.replace(r,"")),t=lo(t||"");for(var c=Math.max(e.length,t.length),d=0;d<c;d++)if(t[d]&&t[d].charAt(0)===":"){var f=t[d].replace(/(^:|[+*?]+$)/g,""),p=(t[d].match(/[+*?]+$/)||Cu)[0]||"",m=~p.indexOf("+"),v=~p.indexOf("*"),g=e[d]||"";if(!g&&!v&&(p.indexOf("?")<0||m)){s=!1;break}if(o[f]=decodeURIComponent(g),m||v){o[f]=e.slice(d).map(decodeURIComponent).join("/");break}}else if(t[d]!==e[d]){s=!1;break}return n.default!==!0&&s===!1?!1:o}function Iu(e,t){return e.rank<t.rank?1:e.rank>t.rank?-1:e.index-t.index}function Mu(e,t){return e.index=t,e.rank=Tu(e),e.props}function lo(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function Ou(e){return e.charAt(0)==":"?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}function Nu(e){return lo(e).map(Ou).join("")}function Tu(e){return e.props.default?0:Nu(e.props.path)}var it=null,rn=[],co=[],Lu={};function Ru(e,t){t===void 0&&(t="push"),it&&it[t]?it[t](e):typeof history!="undefined"&&history[t+"State"]&&history[t+"State"](null,null,e)}function Pn(){var e;return it&&it.location?e=it.location:it&&it.getCurrentLocation?e=it.getCurrentLocation():e=typeof location!="undefined"?location:Lu,""+(e.pathname||"")+(e.search||"")}function Jt(e,t){return t===void 0&&(t=!1),typeof e!="string"&&e.url&&(t=e.replace,e=e.url),Pu(e)&&Ru(e,t?"replace":"push"),tl(e)}function Pu(e){for(var t=rn.length;t--;)if(rn[t].canRoute(e))return!0;return!1}function tl(e){for(var t=!1,n=0;n<rn.length;n++)rn[n].routeTo(e)===!0&&(t=!0);for(var r=co.length;r--;)co[r](e);return t}function nl(e){if(!(!e||!e.getAttribute)){var t=e.getAttribute("href"),n=e.getAttribute("target");if(!(!t||!t.match(/^\//g)||n&&!n.match(/^_?self$/i)))return Jt(t)}}function $u(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0))return nl(e.currentTarget||e.target||this),rl(e)}function rl(e){return e&&(e.stopImmediatePropagation&&e.stopImmediatePropagation(),e.stopPropagation&&e.stopPropagation(),e.preventDefault()),!1}function Du(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.button!==0)){var t=e.target;do if(String(t.nodeName).toUpperCase()==="A"&&t.getAttribute("href")){if(t.hasAttribute("native"))return;if(nl(t))return rl(e)}while(t=t.parentNode)}}var gs=!1;function Bu(){gs||(typeof addEventListener=="function"&&(it||addEventListener("popstate",function(){tl(Pn())}),addEventListener("click",Du)),gs=!0)}var jt=function(e){function t(n){e.call(this,n),n.history&&(it=n.history),this.state={url:n.url||Pn()},Bu()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.shouldComponentUpdate=function(r){return r.static!==!0?!0:r.url!==this.props.url||r.onChange!==this.props.onChange},t.prototype.canRoute=function(r){var i=vt(this.props.children);return this.getMatchingChildren(i,r,!1).length>0},t.prototype.routeTo=function(r){this.setState({url:r});var i=this.canRoute(r);return this.updating||this.forceUpdate(),i},t.prototype.componentWillMount=function(){rn.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var r=this;it&&(this.unlisten=it.listen(function(i){r.routeTo(""+(i.pathname||"")+(i.search||""))})),this.updating=!1},t.prototype.componentWillUnmount=function(){typeof this.unlisten=="function"&&this.unlisten(),rn.splice(rn.indexOf(this),1)},t.prototype.componentWillUpdate=function(){this.updating=!0},t.prototype.componentDidUpdate=function(){this.updating=!1},t.prototype.getMatchingChildren=function(r,i,o){return r.filter(Mu).sort(Iu).map(function(s){var a=el(i,s.props.path,s.props);if(a){if(o!==!1){var l={url:i,matches:a};return Qa(l,a),delete l.ref,delete l.key,Ka(s,l)}return s}}).filter(Boolean)},t.prototype.render=function(r,i){var o=r.children,s=r.onChange,a=i.url,l=this.getMatchingChildren(vt(o),a,!0),u=l[0]||null,c=this.previousUrl;return a!==c&&(this.previousUrl=a,typeof s=="function"&&s({router:this,url:a,previous:c,active:l,current:u})),u},t}(_t),il=function(e){return h("a",Qa({onClick:$u},e))},Fu=function(e){return h(e.component,e)};jt.subscribers=co;jt.getCurrentUrl=Pn;jt.route=Jt;jt.Router=jt;jt.Route=Fu;jt.Link=il;jt.exec=el;var ve;(e=>{const t="Site",n="Generator";function l(C,y,E){ga("send","event",C,y,E)}function u(C,y){ga("set",`dimension${C}`,y)}function c(C){ga("set","page",C),ga("send","pageview")}e.pageview=c;function d(C,y){l(n,C,y)}e.generatorEvent=d;function f(C){return C==="menu"?"Menu":"Hotkey"}function p(C){u(4,C),gtag("set",{locale:C})}e.setLocale=p;function m(C,y){p(y),l(t,"set-language",y),gtag("event","change_locale",{prev_locale:C})}e.changeLocale=m;function v(C){u(1,C),gtag("set",{theme:C})}e.setTheme=v;function g(C,y){v(y),l(t,"set-theme",y),gtag("event","change_theme",{prev_theme:C})}e.changeTheme=g;function _(C){u(3,C),gtag("set",{version:C})}e.setVersion=_;function x(C,y){_(y),l(n,"set-version",y),gtag("event","change_version",{prev_version:C})}e.changeVersion=x;function w(C){u(6,C),gtag("event","use_generator",{file_type:C})}e.setGenerator=w;function b(C){u(7,C),gtag("set",{prefers_color_scheme:C})}e.setPrefersColorScheme=b;function A(C,y,E){l(n,"reset"),gtag("event","reset_generator",{file_type:C,history:y,method:E})}e.resetGenerator=A;function S(C,y,E){l(n,"undo",f(E)),gtag("event","undo_generator",{file_type:C,history:y,method:E})}e.undoGenerator=S;function I(C,y,E){l(n,"undo",f(E)),gtag("event","redo_generator",{file_type:C,history:y,method:E})}e.redoGenerator=I;function k(C,y,E,R){l(n,"save-project-file",f(R)),gtag("event","save_project_file",{file_type:C,project_size:y,projects_count:E,method:R})}e.saveProjectFile=k;function M(C,y){l(n,"load-preset",y),gtag("event","load_generator_preset",{file_type:C,file_name:y})}e.loadPreset=M;function N(C,y){gtag("event","open_generator_preset",{file_type:C,file_name:y})}e.openPreset=N;function L(C,y,E,R,V,W){gtag("event","create_generator_snippet",{file_type:C,snippet_id:y,version:E,data_size:R,compressed_size:V,compression_rate:W})}e.createSnippet=L;function F(C,y,E){gtag("event","open_generator_snippet",{file_type:C,snippet_id:y,version:E})}e.openSnippet=F;function z(C,y){l(n,"copy"),gtag("event","copy_generator_output",{file_type:C,method:y})}e.copyOutput=z;function oe(C,y){l(n,"download"),gtag("event","download_generator_output",{file_type:C,method:y})}e.downloadOutput=oe;function le(C,y){l(n,"toggle-output","visible"),gtag("event","show_generator_output",{file_type:C,method:y})}e.showOutput=le;function T(C,y){l(n,"toggle-output","hidden"),gtag("event","hide_generator_output",{file_type:C,method:y})}e.hideOutput=T;function $(C,y){l(n,"toggle-preview","visible"),gtag("event","show_generator_preview",{file_type:C,method:y})}e.showPreview=$;function H(C,y){l(n,"toggle-preview","hidden"),gtag("event","hide_generator_preview",{file_type:C,method:y})}e.hidePreview=H})(ve||(ve={}));var mn,ze,_s,$n=0,uo=[],vs=G.__b,ws=G.__r,ys=G.diffed,bs=G.__c,xs=G.unmount;function Un(e,t){G.__h&&G.__h(ze,e,$n||t),$n=0;var n=ze.__H||(ze.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function D(e){return $n=1,ol(ll,e)}function ol(e,t,n){var r=Un(mn++,2);return r.t=e,r.__c||(r.__=[n?n(t):ll(void 0,t),function(i){var o=r.t(r.__[0],i);r.__[0]!==o&&(r.__=[o,r.__[1]],r.__c.setState({}))}],r.__c=ze),r.__}function Q(e,t){var n=Un(mn++,3);!G.__s&&To(n.__H,t)&&(n.__=e,n.__H=t,ze.__H.__h.push(n))}function sl(e,t){var n=Un(mn++,4);!G.__s&&To(n.__H,t)&&(n.__=e,n.__H=t,ze.__h.push(n))}function me(e){return $n=5,ke(function(){return{current:e}},[])}function zu(e,t,n){$n=6,sl(function(){typeof e=="function"?e(t()):e&&(e.current=t())},n==null?n:n.concat(e))}function ke(e,t){var n=Un(mn++,7);return To(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ce(e,t){return $n=8,ke(function(){return e},t)}function gn(e){var t=ze.context[e.__c],n=Un(mn++,9);return n.__c=e,t?(n.__==null&&(n.__=!0,t.sub(ze)),t.props.value):e.__}function ju(e,t){G.useDebugValue&&G.useDebugValue(t?t(e):e)}function al(e){var t=Un(mn++,10),n=D();return t.__=e,ze.componentDidCatch||(ze.componentDidCatch=function(r){t.__&&t.__(r),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Vu(){uo.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(qr),e.__H.__h.forEach(ho),e.__H.__h=[]}catch(t){e.__H.__h=[],G.__e(t,e.__v)}}),uo=[]}G.__b=function(e){ze=null,vs&&vs(e)},G.__r=function(e){ws&&ws(e),mn=0;var t=(ze=e.__c).__H;t&&(t.__h.forEach(qr),t.__h.forEach(ho),t.__h=[])},G.diffed=function(e){ys&&ys(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(uo.push(t)!==1&&_s===G.requestAnimationFrame||((_s=G.requestAnimationFrame)||function(n){var r,i=function(){clearTimeout(o),As&&cancelAnimationFrame(r),setTimeout(n)},o=setTimeout(i,100);As&&(r=requestAnimationFrame(i))})(Vu)),ze=void 0},G.__c=function(e,t){t.some(function(n){try{n.__h.forEach(qr),n.__h=n.__h.filter(function(r){return!r.__||ho(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],G.__e(r,n.__v)}}),bs&&bs(e,t)},G.unmount=function(e){xs&&xs(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(qr)}catch(n){G.__e(n,t.__v)}};var As=typeof requestAnimationFrame=="function";function qr(e){var t=ze;typeof e.__c=="function"&&e.__c(),ze=t}function ho(e){var t=ze;e.__c=e.__(),ze=t}function To(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function ll(e,t){return typeof t=="function"?t(e):t}function Ar({type:e,id:t}){return Q(()=>{var n;(n=document.getElementById("ad-placeholder"))==null||n.remove(),"ethicalads"in window&&ethicalads.load()},[]),h("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function X({icon:e,label:t,active:n,class:r,tooltip:i,tooltipLoc:o,onClick:s}){return h("div",{class:`btn${n?" active":""}${r?` ${r}`:""}${i?` tooltipped tip-${o!=null?o:"sw"}`:""}${n?" tip-shown":""}`,onClick:s,"aria-label":i},e&&te[e],t&&h("span",null,t))}var Fr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function cl(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var O={},Mt={},St={};Object.defineProperty(St,"__esModule",{value:!0});St.ModelPath=St.Path=St.relativePath=void 0;function Hu(e,t){return t.reduce((n,r)=>r==="pop"?n.pop():n.push(r.push),e)}St.relativePath=Hu;class Rt{constructor(t,n){this.modelArr=t!=null?t:[],this.contextArr=n!=null?n:[]}last(){return this.modelArr[this.modelArr.length-1]}slice(t,n){return new Rt(this.modelArr.slice(t,n),this.contextArr)}shift(){return new Rt(this.modelArr.slice(1),this.contextArr)}pop(){return new Rt(this.modelArr.slice(0,-1),this.contextArr)}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Rt([...this.modelArr,t],[...this.contextArr])}contextPush(t){if(typeof t=="number")return this.copy();const n=t.startsWith("minecraft:")?t.slice(10):t;return new Rt([...this.modelArr],[...this.contextArr,n])}copy(){return new Rt([...this.modelArr],[...this.contextArr])}getArray(){return this.modelArr}withModel(t){return new Pt(t,this)}getContext(){return this.contextArr}equals(t){return t.modelArr.length===this.modelArr.length&&t.modelArr.every((n,r)=>n===this.modelArr[r])}startsWith(t){return this.modelArr.length<t.modelArr.length?!1:t.modelArr.every((n,r)=>n===this.modelArr[r])}endsWith(t){const n=this.modelArr.length-t.modelArr.length;return n<0?!1:t.modelArr.every((r,i)=>r===this.modelArr[n+i])}toString(){return this.modelArr.map(t=>typeof t=="string"?`.${t}`:`[${t}]`).join("").replace(/^\./,"")}forEach(t,n){return this.modelArr.forEach(t,n)}}St.Path=Rt;class Pt extends Rt{constructor(t,n){super(n==null?void 0:n.modelArr,n==null?void 0:n.contextArr),this.model=t}getModel(){return this.model}get(){var t;return(t=this.model)===null||t===void 0?void 0:t.get(this)}set(t){var n;(n=this.model)===null||n===void 0||n.set(this,t)}slice(t,n){return new Pt(this.model,super.slice(t,n))}shift(){return new Pt(this.model,super.shift())}pop(){return new Pt(this.model,super.pop())}push(t){return this.modelPush(t).contextPush(t)}modelPush(t){return new Pt(this.model,super.modelPush(t))}contextPush(t){return new Pt(this.model,super.contextPush(t))}copy(){return new Pt(this.model,super.copy())}}St.ModelPath=Pt;var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});Gn.Errors=void 0;class Uu{constructor(){this.errors=[]}add(t,n,...r){return this.errors.push({path:t,error:n,params:r}),!1}get(t,n=!1){return n?this.errors.filter(r=>r.path.equals(t)):this.errors.filter(r=>r.path.startsWith(t))}getAll(){return this.errors}clear(){this.errors=[]}count(){return this.errors.length}*[Symbol.iterator](){for(const t of this.errors)yield t}}Gn.Errors=Uu;var Et={};Object.defineProperty(Et,"__esModule",{value:!0});Et.hexId=Et.quoteString=Et.escapeString=void 0;function ul(e){return e.replace(/(\\|")/g,"\\$1")}Et.escapeString=ul;function Gu(e){return`"${ul(e)}"`}Et.quoteString=Gu;const Yu=e=>("0"+e.toString(16)).substr(-2);function Wu(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Yu).join("")}Et.hexId=Wu;Object.defineProperty(Mt,"__esModule",{value:!0});Mt.DataModel=void 0;const qu=St,ks=Gn,Wi=Et;class Lo{constructor(t,n){var r,i,o,s;this.historyMax=(r=n==null?void 0:n.historyMax)!==null&&r!==void 0?r:50,this.verbose=(i=n==null?void 0:n.verbose)!==null&&i!==void 0?i:!1,this.wrapLists=(o=n==null?void 0:n.wrapLists)!==null&&o!==void 0?o:!1,this.schema=t;const a=(s=n==null?void 0:n.initialData)!==null&&s!==void 0?s:t.default();this.data=this.wrapLists?Lo.wrapLists(a):a,this.listeners=[],this.errors=new ks.Errors,this.history=[JSON.stringify(this.data)],this.historyIndex=0}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);n>-1&&this.listeners.splice(n,1)}invalidate(){const t=JSON.stringify(this.data);this.history[this.historyIndex]!==t&&(this.historyIndex+=1,this.history.splice(this.historyIndex,this.historyMax,t),this.history.length>this.historyMax&&(this.history.splice(0,1),this.historyIndex-=1)),this.silentInvalidate()}silentInvalidate(){this.listeners.forEach(t=>{t.invalidated&&t.invalidated(this),t.errors&&t.errors(this.errors)})}reset(t,n){this.data=t,this.validate(n),this.invalidate()}get(t){let n=this.data;return t.forEach(r=>{if(n===void 0)return n;this.wrapLists&&typeof r=="number"?n=n[r].node:n=n[r]}),n}set(t,n,r){if(t.getArray().length===0){this.reset(n,!0);return}let i=this.data;t.pop().forEach(o=>{(i[o]===void 0||typeof i[o]=="string"||typeof i[o]=="number")&&(this.wrapLists&&typeof o=="number"?i[o]={node:{},id:(0,Wi.hexId)()}:i[o]={}),this.wrapLists&&typeof o=="number"?i=i[o].node:i=i[o]}),i!==null&&(n===void 0||typeof n=="number"&&isNaN(n)?typeof t.last()=="number"?i.splice(t.last(),1):delete i[t.last()]:this.wrapLists&&typeof t.last()=="number"?i[t.last()]={node:n,id:(0,Wi.hexId)()}:i[t.last()]=n,!r&&(this.verbose&&console.log("Set",t.toString(),JSON.stringify(n)),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(t){var n;const r=new qu.Path().withModel(this);this.errors.clear(),this.data=(n=this.schema.validate(r,this.data,this.errors,{loose:t,wrapLists:this.wrapLists}))!==null&&n!==void 0?n:{}}error(t,n,...r){const i=new ks.Errors;i.add(t,n,r),this.listeners.forEach(o=>{o.errors&&o.errors(i)})}static wrapLists(t){if(Array.isArray(t)){const n=t.map(r=>({node:this.wrapLists(r),id:(0,Wi.hexId)()}));for(const r of Object.getOwnPropertySymbols(t))n[r]=t[r];return n}else if(typeof t=="object"&&t!==null){const n={};Object.entries(t).map(([r,i])=>{n[r]=this.wrapLists(i)});for(const r of Object.getOwnPropertySymbols(t))n[r]=t[r];return n}else return t}static unwrapLists(t){if(Array.isArray(t)){const n=t.map(r=>this.unwrapLists(r.node));for(const r of Object.getOwnPropertySymbols(t))n[r]=t[r];return n}else if(typeof t=="object"&&t!==null){const n={};Object.entries(t).map(([r,i])=>{n[r]=this.unwrapLists(i)});for(const r of Object.getOwnPropertySymbols(t))n[r]=t[r];return n}else return t}}Mt.DataModel=Lo;var Yt={};(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:o=>o,suggest:()=>[],validate:(o,s)=>s,validationOption:()=>{},hook(o,s,...a){return o.base({node:this},s,...a)},canUpdate:()=>!1,update:()=>[]};const t=(o,s)=>Z(Z({},o),typeof s=="function"?s(o):s);e.Mod=t;const n=(o,s)=>(0,e.Mod)(s,{enabled:a=>a.push(o).get()!==void 0});e.Has=n;function r(o){return _e(Z({},o),{optional:()=>!0})}e.Opt=r;function i(o){return _e(Z({},o),{keep:()=>!0})}e.Keep=i})(Yt);var Ei={};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.BooleanNode=void 0;const Zu=Mt,Xu=Yt,Ju=()=>_e(Z({},Xu.Base),{type:()=>"boolean",default:()=>!1,suggest:()=>["false","true"],validate(e,t,n,r){return r.loose&&typeof t!="boolean"&&(t=r.wrapLists?Zu.DataModel.wrapLists(this.default()):this.default()),(typeof t!="boolean"||t===void 0)&&n.add(e,"error.expected_boolean"),t},hook(e,t,...n){var r;return((r=e.boolean)!==null&&r!==void 0?r:e.base).call(e,{node:this},t,...n)}});Ei.BooleanNode=Ju;var dl={},kr={};Object.defineProperty(kr,"__esModule",{value:!0});kr.ListNode=void 0;const Ku=Mt,Qu=Yt,ed=(e,t)=>{var n,r;const i=(n=t==null?void 0:t.minLength)!==null&&n!==void 0?n:0,o=(r=t==null?void 0:t.maxLength)!==null&&r!==void 0?r:1/0,s=(t==null?void 0:t.minLength)&&(t==null?void 0:t.maxLength);return _e(Z({},Qu.Base),{type:()=>"list",default:()=>t!=null&&t.minLength?[...Array(i)].map(a=>e.default()):[],navigate(a,l){const u=l+1;return a.getArray().length<=u?this:e.navigate(a,u)},pathPush(a,l){return a.push(parseInt(l.toString())).contextPush("entry")},validate(a,l,u,c){if(c.loose&&!Array.isArray(l)&&(l=c.wrapLists?Ku.DataModel.wrapLists(this.default()):this.default()),Array.isArray(l))s&&(l.length<i||l.length>o)?i===o?u.add(a,"error.invalid_list_range.exact",l.length,i):u.add(a,"error.invalid_list_range.between",l.length,i,o):l.length<i?u.add(a,"error.invalid_list_range.smaller",l.length,i):l.length>o&&u.add(a,"error.invalid_list_range.larger",l.length,o);else return u.add(a,"error.expected_list"),l;const d=l.map((f,p)=>{const m=e.validate(a.push(p),c.wrapLists?f.node:f,u,c);return c.wrapLists?{node:m,id:f.id}:m});for(const f of Object.getOwnPropertySymbols(l))d[f]=l[f];return d},hook(a,l,...u){var c;return((c=a.list)!==null&&c!==void 0?c:a.base).call(a,{node:this,children:e,config:t!=null?t:{}},l,...u)}})};kr.ListNode=ed;var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0});Sr.SwitchNode=void 0;const td=Yt,nd=e=>_e(Z({},td.Base),{type(t){return this.activeCase(t,!0).node.type(t)},category(t){return this.activeCase(t,!0).node.category(t)},default:()=>e[0].node.default(),navigate(t,n){var r;const i=n+1;return(r=this.activeCase(t.slice(0,i)))===null||r===void 0?void 0:r.node.navigate(t,n)},pathPush(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.pathPush(t,n))!==null&&i!==void 0?i:t},suggest(t,n){var r,i;return(i=(r=this.activeCase(t))===null||r===void 0?void 0:r.node.suggest(t,n))!==null&&i!==void 0?i:e.filter(o=>o.match(t)).map(o=>o.node.suggest(t,n)).reduce((o,s)=>o.concat(s))},validate(t,n,r,i){let o=this.activeCase(t);return o===void 0?n:o.node.validate(t,n,r,i)},validationOption(t){var n;return(n=this.activeCase(t))===null||n===void 0?void 0:n.node.validationOption(t)},activeCase(t,n){const r=(o,s)=>{var a,l;return((a=s.priority)!==null&&a!==void 0?a:0)-((l=o.priority)!==null&&l!==void 0?l:0)},i=e.filter(o=>o.match(t)).sort(r);return n&&i.length===0?e.sort(r)[0]:i.length>0?i[0]:void 0},hook(t,n,...r){return this.activeCase(n,!0).node.hook(t,n,...r)}});Sr.SwitchNode=nd;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectOrPreset=e.StringOrList=e.ObjectOrList=e.ChoiceNode=void 0;const t=kr,n=Sr,r=(s,a)=>{const l=(c,d)=>{if(c.match)return c.match(d);switch(c.type){case"list":return Array.isArray(d);case"object":return typeof d=="object"&&!Array.isArray(d);default:return typeof d===c.type}},u=(0,n.SwitchNode)(s.map(c=>({type:c.type,priority:c.priority,match:d=>l(c,d.get()),node:c.node})));return _e(Z({},u),{validate(c,d,f,p){let m=u.activeCase(c,!0);return m.node.optional()?d:m.node.validate(c,d,f,p)},hook(c,d,...f){var p;return((p=c.choice)!==null&&p!==void 0?p:c.base).call(c,{node:this,choices:s,config:a!=null?a:{},switchNode:u},d,...f)}})};e.ChoiceNode=r;const i=s=>(a,l)=>(0,e.ChoiceNode)([{type:s,node:a,change:u=>{var c;return(c=u[0])!==null&&c!==void 0?c:a.default()}},{type:"list",node:(0,t.ListNode)(a),change:u=>u?[u]:[]}],l);e.ObjectOrList=i("object"),e.StringOrList=i("string");const o=(s,a,l)=>(0,e.ChoiceNode)([{type:"string",priority:1,node:s,change:u=>Object.keys(l)[0]},{type:"object",node:a,change:u=>{var c;return(c=l[u])!==null&&c!==void 0?c:l[Object.keys(l)[0]]}}]);e.ObjectOrPreset=o})(dl);var Ci={};Object.defineProperty(Ci,"__esModule",{value:!0});Ci.MapNode=void 0;const rd=Yt,id=Mt,od=(e,t,n)=>_e(Z({},rd.Base),{type:()=>"map",default:()=>({}),navigate(r,i){const o=i+1;return r.getArray().length<=o?this:t.navigate(r,o)},pathPush(r,i){return r.modelPush(i)},suggest:r=>e.suggest(r,""),validate(r,i,o,s){if(s.loose&&typeof i!="object"&&(i=s.wrapLists?id.DataModel.wrapLists(this.default()):this.default()),i===null||typeof i!="object")return o.add(r,"error.expected_object"),i;const a={};Object.keys(i).forEach(l=>{e.validate(r,l,o,s),a[l]=t.validate(r.push(l),i[l],o,s)});for(const l of Object.getOwnPropertySymbols(i))a[l]=i[l];return a},validationOption(r){var i;return(i=n==null?void 0:n.validation)!==null&&i!==void 0?i:e.validationOption(r.push(""))},hook(r,i,...o){var s;return((s=r.map)!==null&&s!==void 0?s:r.base).call(r,{node:this,keys:e,children:t,config:n!=null?n:{}},i,...o)}});Ci.MapNode=od;var hl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberEnum=e.NumberNode=void 0;const t=O,n=Mt,r=Yt,i=s=>{var a,l,u;const c=s!=null&&s.color?!0:(a=s==null?void 0:s.integer)!==null&&a!==void 0?a:!1,d=s!=null&&s.color?0:(l=s==null?void 0:s.min)!==null&&l!==void 0?l:-1/0,f=s!=null&&s.color?16777215:(u=s==null?void 0:s.max)!==null&&u!==void 0?u:1/0,p=(s==null?void 0:s.min)!==void 0&&(s==null?void 0:s.max)!==void 0;return _e(Z({},r.Base),{type:()=>"number",default:()=>d>0?d:0,validate(m,v,g,_){return _.loose&&typeof v!="number"&&(v=_.wrapLists?n.DataModel.wrapLists(this.default()):this.default()),typeof v!="number"?g.add(m,"error.expected_number"):c&&!Number.isInteger(v)?g.add(m,"error.expected_integer"):p&&(v<d||v>f)?g.add(m,"error.invalid_number_range.between",v,d,f):v<d?g.add(m,"error.invalid_number_range.smaller",v,d):v>f&&g.add(m,"error.invalid_number_range.larger",v,f),v},hook(m,v,...g){var _;return((_=m.number)!==null&&_!==void 0?_:m.base).call(m,{node:this,integer:c,min:d,max:f,between:p,config:s!=null?s:{}},v,...g)}})};e.NumberNode=i;const o=({integer:s,values:a})=>(0,t.Mod)((0,e.NumberNode)({integer:s}),l=>({validate:(u,c,d,f)=>(c=l.validate(u,c,d,f),a.includes(c)||d.add(u,"error.invalid_number_enum",a.join(", ")),c)}));e.NumberEnum=o})(hl);var fl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectNode=e.Case=e.Switch=void 0;const t=Yt,n=St,r=Gn,i=Et,o=Mt;e.Switch=Symbol("switch"),e.Case=Symbol("case");const s=(a,l)=>{var m,v;const g=a,{[m=e.Switch]:u,[v=e.Case]:c}=g,d=ds(g,[Yi(m),Yi(v)]),f=_=>{if(u===void 0)return d;const x=(0,n.relativePath)(_,u).get(),w=c[x];return Z(Z({},d),w)},p=(_,x)=>{var w;const b=u?(0,n.relativePath)(_,u).get():void 0,A=u?(w=c[b])!==null&&w!==void 0?w:{}:{},S=Object.keys(A),I=l!=null&&l.context?new n.ModelPath(_.getModel(),new n.Path(_.getArray(),[l.context])):_;return(!(l!=null&&l.disableSwitchContext)&&b&&S.includes(x)?I.contextPush(b):I).push(x)};return _e(Z({},t.Base),{type:()=>"object",category:()=>l==null?void 0:l.category,default:()=>({}),keep(){return this.optional()},navigate(_,x){const w=x+1,b=_.getArray();if(b.length<=w)return this;const S=f(_.slice(0,w))[b[w]];return S==null?void 0:S.navigate(_,w)},pathPush(_,x){return p(_,x.toString())},suggest(_,x){const w=f(_),b=Object.keys(typeof x=="object"?x:{});return Object.keys(w).filter(A=>w[A].enabled(_)).filter(A=>!b.includes(A)).map(i.quoteString)},validate(_,x,w,b){if(b.loose&&typeof x!="object"&&(x=b.wrapLists?o.DataModel.wrapLists(this.default()):this.default()),typeof x!="object"||x===null)return w.add(_,"error.expected_object"),x;let A=d;if(u){const N=(0,n.relativePath)(_,u);let L=N.get();if(_.equals(N.pop())){const F=N.last();L=d[F].validate(_.push(F),x[F],new r.Errors,b)}A=Z(Z({},A),c[L])}const S=Object.keys(A),I=S.filter(N=>!A[N].optional()),k=new Set([...I,...Object.keys(x)]),M={};k.forEach(N=>{if(S.includes(N)){if(!A[N].enabled(_))return;const L=A[N].validate(_.push(N),x[N],w,b);!A[N].keep()&&A[N].optional()&&(L===void 0||Array.isArray(L)&&L.length===0||L.constructor===Object&&Object.keys(L).length===0)?delete M[N]:(M[N]=L,_.getModel().set(_.push(N),L,!0))}else M[N]=x[N]});for(const N of Object.getOwnPropertySymbols(x))M[N]=x[N];return M},hook(_,x,...w){var b;return((b=_.object)!==null&&b!==void 0?b:_.base).call(_,{node:this,fields:d,config:l!=null?l:{},filter:u,cases:c,getActiveFields:f,getChildModelPath:p},x,...w)}})};e.ObjectNode=s})(fl);var Ii={};Object.defineProperty(Ii,"__esModule",{value:!0});Ii.Reference=void 0;const sd=(e,t)=>({type(n){return e.get(t).type.bind(this)(n)},category(n){return e.get(t).category.bind(this)(n)},default(){return e.get(t).default.bind(this)()},transform(n,r){return e.get(t).transform(n,r)},enabled(n){return e.get(t).enabled.bind(this)(n)},keep(){return e.get(t).keep.bind(this)()},optional(){return e.get(t).optional.bind(this)()},navigate(n,r){return e.get(t).navigate.bind(this)(n,r)},pathPush(n,r){return e.get(t).pathPush.bind(this)(n,r)},suggest(n,r){return e.get(t).suggest.bind(this)(n,r)},validate(n,r,i,o){return e.get(t).validate.bind(this)(n,r,i,o)},validationOption(n){return e.get(t).validationOption.bind(this)(n)},hook(n,r,...i){return e.get(t).hook.bind(this)(n,r,...i)},activeCase(n,r){return e.get(t).activeCase.bind(this)(n,r)},canUpdate(n,r){return e.get(t).canUpdate.bind(this)(n,r)},update(n,r){return e.get(t).update.bind(this)(n,r)}});Ii.Reference=sd;var Mi={};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.StringNode=void 0;const ad=Yt,ld=Et,cd=Mt,Ss=e=>!!(e!=null&&e.enum),Es=e=>!!(e!=null&&e.validator),ud=(e,t)=>{const n=()=>{var r,i,o,s;if(Ss(t))return typeof t.enum=="string"?(r=e==null?void 0:e.get(t.enum))!==null&&r!==void 0?r:[]:t.enum;if((t==null?void 0:t.validator)==="resource"){if(typeof t.params.pool=="string"){if(t.params.requireTag)return(i=e==null?void 0:e.get(`tag/${t.params.pool}`).map(l=>`#${l}`))!==null&&i!==void 0?i:[];const a=t.params.pool.replace(/^\$/,"");return[...t.params.allowTag?(o=e==null?void 0:e.get(`tag/${a}`).map(l=>`#${l}`))!==null&&o!==void 0?o:[]:[],...(s=e==null?void 0:e.get(a))!==null&&s!==void 0?s:[]]}return t.params.pool}return[]};return _e(Z({},ad.Base),{type:()=>"string",default:()=>"",validate(r,i,o,s){if(s.loose&&typeof i!="string"&&(i=(s.wrapLists?cd.DataModel.wrapLists(this.default()):this.default())||void 0),typeof i!="string")return o.add(r,"error.expected_string"),i;if(Es(t)){if(t.validator==="resource"&&i.length>0&&!i.includes(":")&&(i=i.startsWith("#")?"#minecraft:"+i.slice(1):"minecraft:"+i),t.validator==="resource"&&typeof i=="string"){let l=i;if(i.startsWith("#")){if(typeof t.params.pool=="string"&&t.params.pool.startsWith("$tag/"))return o.add(r,"error.disallowed_tag_prefix"),i;if(!t.params.allowTag&&!t.params.requireTag)return o.add(r,"error.disallowed_tag"),i;l=l.slice(1)}else if(t.params.requireTag)return o.add(r,"error.expected_tag"),i;if(!l.match(/^(?:[_\-a-z0-9.]*:)?[_\-a-z0-9/.]*$/g))return o.add(r,"error.invalid_resource_location"),i}if(t.validator==="resource"&&(typeof t.params.pool=="string"&&t.params.pool.startsWith("$")||(t.params.allowTag||t.params.requireTag)&&i.startsWith("#")||typeof i=="string"&&i.includes(":")&&!i.startsWith("minecraft:")||t.params.isDefinition||t.params.allowUnknown))return i}if(Ss(t)&&t.additional)return i;const a=n();return a.length>0&&!a.includes(i)&&o.add(r,"error.invalid_enum_option",i),i},suggest:()=>n().map(ld.quoteString),validationOption(){return Es(t)?t:void 0},hook(r,i,...o){var s;return((s=r.string)!==null&&s!==void 0?s:r.base).call(r,{node:this,getValues:n,config:t},i,...o)}})};Mi.StringNode=ud;var pl={};Object.defineProperty(pl,"__esModule",{value:!0});var Dn={};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.CollectionRegistry=Dn.SchemaRegistry=void 0;class dd{constructor(){this.registry={}}register(t,n){this.registry[t]=n}get(t){const n=this.registry[t];return n===void 0&&console.error(`Tried to access schema "${t}", but that doesn't exist.`),n}}Dn.SchemaRegistry=dd;class hd{constructor(){this.registry={}}register(t,n){this.registry[t]=n}get(t){const n=this.registry[t];return n===void 0&&console.warn(`Tried to access collection "${t}", but that doesn't exist.`),n!=null?n:[]}}Dn.CollectionRegistry=hd;var ml={};Object.defineProperty(ml,"__esModule",{value:!0});(function(e){var t=Fr&&Fr.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=Fr&&Fr.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(Mt,e),n(St,e),n(Gn,e),n(Yt,e),n(Ei,e),n(dl,e),n(kr,e),n(Ci,e),n(hl,e),n(fl,e),n(Ii,e),n(Mi,e),n(Sr,e),n(pl,e),n(Dn,e),n(ml,e)})(O);var Oe={},Er={},ht={};function gl(e){return typeof e=="undefined"||e===null}function fd(e){return typeof e=="object"&&e!==null}function pd(e){return Array.isArray(e)?e:gl(e)?[]:[e]}function md(e,t){var n,r,i,o;if(t)for(o=Object.keys(t),n=0,r=o.length;n<r;n+=1)i=o[n],e[i]=t[i];return e}function gd(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function _d(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}ht.isNothing=gl;ht.isObject=fd;ht.toArray=pd;ht.repeat=gd;ht.isNegativeZero=_d;ht.extend=md;function dr(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||""}dr.prototype=Object.create(Error.prototype);dr.prototype.constructor=dr;dr.prototype.toString=function(t){var n=this.name+": ";return n+=this.reason||"(unknown reason)",!t&&this.mark&&(n+=" "+this.mark.toString()),n};var Cr=dr,Cs=ht;function Ro(e,t,n,r,i){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=i}Ro.prototype.getSnippet=function(t,n){var r,i,o,s,a;if(!this.buffer)return null;for(t=t||4,n=n||75,r="",i=this.position;i>0&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>n/2-1){r=" ... ",i+=5;break}for(o="",s=this.position;s<this.buffer.length&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>n/2-1){o=" ... ",s-=5;break}return a=this.buffer.slice(i,s),Cs.repeat(" ",t)+r+a+o+`
`+Cs.repeat(" ",t+this.position-i+r.length)+"^"};Ro.prototype.toString=function(t){var n,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),t||(n=this.getSnippet(),n&&(r+=`:
`+n)),r};var vd=Ro,Is=Cr,wd=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],yd=["scalar","sequence","mapping"];function bd(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function xd(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(wd.indexOf(n)===-1)throw new Is('Unknown option "'+n+'" 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(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=bd(t.styleAliases||null),yd.indexOf(this.kind)===-1)throw new Is('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Be=xd,Ms=ht,Zr=Cr,Ad=Be;function fo(e,t,n){var r=[];return e.include.forEach(function(i){n=fo(i,t,n)}),e[t].forEach(function(i){n.forEach(function(o,s){o.tag===i.tag&&o.kind===i.kind&&r.push(s)}),n.push(i)}),n.filter(function(i,o){return r.indexOf(o)===-1})}function kd(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,n;function r(i){e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function Sn(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar")throw new Zr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=fo(this,"implicit",[]),this.compiledExplicit=fo(this,"explicit",[]),this.compiledTypeMap=kd(this.compiledImplicit,this.compiledExplicit)}Sn.DEFAULT=null;Sn.create=function(){var t,n;switch(arguments.length){case 1:t=Sn.DEFAULT,n=arguments[0];break;case 2:t=arguments[0],n=arguments[1];break;default:throw new Zr("Wrong number of arguments for Schema.create function")}if(t=Ms.toArray(t),n=Ms.toArray(n),!t.every(function(r){return r instanceof Sn}))throw new Zr("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!n.every(function(r){return r instanceof Ad}))throw new Zr("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Sn({include:t,explicit:n})};var Yn=Sn,Sd=Be,Ed=new Sd("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Cd=Be,Id=new Cd("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Md=Be,Od=new Md("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Nd=Yn,Po=new Nd({explicit:[Ed,Id,Od]}),Td=Be;function Ld(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Rd(){return null}function Pd(e){return e===null}var $d=new Td("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ld,construct:Rd,predicate:Pd,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),Dd=Be;function Bd(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function Fd(e){return e==="true"||e==="True"||e==="TRUE"}function zd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var jd=new Dd("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Bd,construct:Fd,predicate:zd,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"}),Vd=ht,Hd=Be;function Ud(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Gd(e){return 48<=e&&e<=55}function Yd(e){return 48<=e&&e<=57}function Wd(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i==="-"||i==="+")&&(i=e[++n]),i==="0"){if(n+1===t)return!0;if(i=e[++n],i==="b"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(i!=="0"&&i!=="1")return!1;r=!0}return r&&i!=="_"}if(i==="x"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!Ud(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}for(;n<t;n++)if(i=e[n],i!=="_"){if(!Gd(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}if(i==="_")return!1;for(;n<t;n++)if(i=e[n],i!=="_"){if(i===":")break;if(!Yd(e.charCodeAt(n)))return!1;r=!0}return!r||i==="_"?!1:i!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(n))}function qd(e){var t=e,n=1,r,i,o=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0"?0:r==="0"?t[1]==="b"?n*parseInt(t.slice(2),2):t[1]==="x"?n*parseInt(t,16):n*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(s){o.unshift(parseInt(s,10))}),t=0,i=1,o.forEach(function(s){t+=s*i,i*=60}),n*t):n*parseInt(t,10)}function Zd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Vd.isNegativeZero(e)}var Xd=new Hd("tag:yaml.org,2002:int",{kind:"scalar",resolve:Wd,construct:qd,predicate:Zd,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"]}}),_l=ht,Jd=Be,Kd=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))$");function Qd(e){return!(e===null||!Kd.test(e)||e[e.length-1]==="_")}function eh(e){var t,n,r,i;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(o){i.unshift(parseFloat(o,10))}),t=0,r=1,i.forEach(function(o){t+=o*r,r*=60}),n*t):n*parseFloat(t,10)}var th=/^[-+]?[0-9]+e/;function nh(e,t){var n;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(_l.isNegativeZero(e))return"-0.0";return n=e.toString(10),th.test(n)?n.replace("e",".e"):n}function rh(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||_l.isNegativeZero(e))}var ih=new Jd("tag:yaml.org,2002:float",{kind:"scalar",resolve:Qd,construct:eh,predicate:rh,represent:nh,defaultStyle:"lowercase"}),oh=Yn,vl=new oh({include:[Po],implicit:[$d,jd,Xd,ih]}),sh=Yn,wl=new sh({include:[vl]}),ah=Be,yl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),bl=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]))?))?$");function lh(e){return e===null?!1:yl.exec(e)!==null||bl.exec(e)!==null}function ch(e){var t,n,r,i,o,s,a,l=0,u=null,c,d,f;if(t=yl.exec(e),t===null&&(t=bl.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],s=+t[5],a=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],d=+(t[11]||0),u=(c*60+d)*6e4,t[9]==="-"&&(u=-u)),f=new Date(Date.UTC(n,r,i,o,s,a,l)),u&&f.setTime(f.getTime()-u),f}function uh(e){return e.toISOString()}var dh=new ah("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:lh,construct:ch,instanceOf:Date,represent:uh}),hh=Be;function fh(e){return e==="<<"||e===null}var ph=new hh("tag:yaml.org,2002:merge",{kind:"scalar",resolve:fh}),nn;try{var mh=cl;nn=mh("buffer").Buffer}catch{}var gh=Be,$o=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function _h(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=$o;for(n=0;n<i;n++)if(t=o.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function vh(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=$o,s=0,a=[];for(t=0;t<i;t++)t%4===0&&t&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|o.indexOf(r.charAt(t));return n=i%4*6,n===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):n===18?(a.push(s>>10&255),a.push(s>>2&255)):n===12&&a.push(s>>4&255),nn?nn.from?nn.from(a):new nn(a):a}function wh(e){var t="",n=0,r,i,o=e.length,s=$o;for(r=0;r<o;r++)r%3===0&&r&&(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]):i===2?(t+=s[n>>10&63],t+=s[n>>4&63],t+=s[n<<2&63],t+=s[64]):i===1&&(t+=s[n>>2&63],t+=s[n<<4&63],t+=s[64],t+=s[64]),t}function yh(e){return nn&&nn.isBuffer(e)}var bh=new gh("tag:yaml.org,2002:binary",{kind:"scalar",resolve:_h,construct:vh,predicate:yh,represent:wh}),xh=Be,Ah=Object.prototype.hasOwnProperty,kh=Object.prototype.toString;function Sh(e){if(e===null)return!0;var t=[],n,r,i,o,s,a=e;for(n=0,r=a.length;n<r;n+=1){if(i=a[n],s=!1,kh.call(i)!=="[object Object]")return!1;for(o in i)if(Ah.call(i,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function Eh(e){return e!==null?e:[]}var Ch=new xh("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Sh,construct:Eh}),Ih=Be,Mh=Object.prototype.toString;function Oh(e){if(e===null)return!0;var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(r=s[t],Mh.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;o[t]=[i[0],r[i[0]]]}return!0}function Nh(e){if(e===null)return[];var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1)r=s[t],i=Object.keys(r),o[t]=[i[0],r[i[0]]];return o}var Th=new Ih("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Oh,construct:Nh}),Lh=Be,Rh=Object.prototype.hasOwnProperty;function Ph(e){if(e===null)return!0;var t,n=e;for(t in n)if(Rh.call(n,t)&&n[t]!==null)return!1;return!0}function $h(e){return e!==null?e:{}}var Dh=new Lh("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ph,construct:$h}),Bh=Yn,Ir=new Bh({include:[wl],implicit:[dh,ph],explicit:[bh,Ch,Th,Dh]}),Fh=Be;function zh(){return!0}function jh(){}function Vh(){return""}function Hh(e){return typeof e=="undefined"}var Uh=new Fh("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:zh,construct:jh,predicate:Hh,represent:Vh}),Gh=Be;function Yh(e){if(e===null||e.length===0)return!1;var t=e,n=/\/([gim]*)$/.exec(e),r="";return!(t[0]==="/"&&(n&&(r=n[1]),r.length>3||t[t.length-r.length-1]!=="/"))}function Wh(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return t[0]==="/"&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function qh(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function Zh(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var Xh=new Gh("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Yh,construct:Wh,predicate:Zh,represent:qh}),ci;try{var Jh=cl;ci=Jh("esprima")}catch{typeof window!="undefined"&&(ci=window.esprima)}var Kh=Be;function Qh(e){if(e===null)return!1;try{var t="("+e+")",n=ci.parse(t,{range:!0});return!(n.type!=="Program"||n.body.length!==1||n.body[0].type!=="ExpressionStatement"||n.body[0].expression.type!=="ArrowFunctionExpression"&&n.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function ef(e){var t="("+e+")",n=ci.parse(t,{range:!0}),r=[],i;if(n.type!=="Program"||n.body.length!==1||n.body[0].type!=="ExpressionStatement"||n.body[0].expression.type!=="ArrowFunctionExpression"&&n.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach(function(o){r.push(o.name)}),i=n.body[0].expression.body.range,n.body[0].expression.body.type==="BlockStatement"?new Function(r,t.slice(i[0]+1,i[1]-1)):new Function(r,"return "+t.slice(i[0],i[1]))}function tf(e){return e.toString()}function nf(e){return Object.prototype.toString.call(e)==="[object Function]"}var rf=new Kh("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:Qh,construct:ef,predicate:nf,represent:tf}),Os=Yn,Oi=Os.DEFAULT=new Os({include:[Ir],explicit:[Uh,Xh,rf]}),Dt=ht,xl=Cr,of=vd,Al=Ir,sf=Oi,Kt=Object.prototype.hasOwnProperty,ui=1,kl=2,Sl=3,di=4,qi=1,af=2,Ns=3,lf=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,cf=/[\x85\u2028\u2029]/,uf=/[,\[\]\{\}]/,El=/^(?:!|!!|![a-z\-]+!)$/i,Cl=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ts(e){return Object.prototype.toString.call(e)}function Ct(e){return e===10||e===13}function on(e){return e===9||e===32}function Qe(e){return e===9||e===32||e===10||e===13}function En(e){return e===44||e===91||e===93||e===123||e===125}function df(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function hf(e){return e===120?2:e===117?4:e===85?8:0}function ff(e){return 48<=e&&e<=57?e-48:-1}function Ls(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function pf(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var Il=new Array(256),Ml=new Array(256);for(var yn=0;yn<256;yn++)Il[yn]=Ls(yn)?1:0,Ml[yn]=Ls(yn);function mf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||sf,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 Ol(e,t){return new xl(t,new of(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function J(e,t){throw Ol(e,t)}function hi(e,t){e.onWarning&&e.onWarning.call(null,Ol(e,t))}var Rs={YAML:function(t,n,r){var i,o,s;t.version!==null&&J(t,"duplication of %YAML directive"),r.length!==1&&J(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&J(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&J(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&hi(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,o;r.length!==2&&J(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],El.test(i)||J(t,"ill-formed tag handle (first argument) of the TAG directive"),Kt.call(t.tagMap,i)&&J(t,'there is a previously declared suffix for "'+i+'" tag handle'),Cl.test(o)||J(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=o}};function Xt(e,t,n,r){var i,o,s,a;if(t<n){if(a=e.input.slice(t,n),r)for(i=0,o=a.length;i<o;i+=1)s=a.charCodeAt(i),s===9||32<=s&&s<=1114111||J(e,"expected valid JSON character");else lf.test(a)&&J(e,"the stream contains non-printable characters");e.result+=a}}function Ps(e,t,n,r){var i,o,s,a;for(Dt.isObject(n)||J(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),s=0,a=i.length;s<a;s+=1)o=i[s],Kt.call(t,o)||(t[o]=n[o],r[o]=!0)}function Cn(e,t,n,r,i,o,s,a){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&J(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Ts(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&Ts(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,u=o.length;l<u;l+=1)Ps(e,t,o[l],n);else Ps(e,t,o,n);else!e.json&&!Kt.call(n,i)&&Kt.call(t,i)&&(e.line=s||e.line,e.position=a||e.position,J(e,"duplicated mapping key")),t[i]=o,delete n[i];return t}function Do(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):J(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function Ne(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;on(i);)i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(Ct(i))for(Do(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&hi(e,"deficient indentation"),r}function Ni(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||Qe(n)))}function Bo(e,t){t===1?e.result+=" ":t>1&&(e.result+=Dt.repeat(`
`,t-1))}function gf(e,t,n){var r,i,o,s,a,l,u,c,d=e.kind,f=e.result,p;if(p=e.input.charCodeAt(e.position),Qe(p)||En(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),Qe(i)||n&&En(i)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,a=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),Qe(i)||n&&En(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),Qe(r))break}else{if(e.position===e.lineStart&&Ni(e)||n&&En(p))break;if(Ct(p))if(l=e.line,u=e.lineStart,c=e.lineIndent,Ne(e,!1,-1),e.lineIndent>=t){a=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=u,e.lineIndent=c;break}}a&&(Xt(e,o,s,!1),Bo(e,e.line-l),o=s=e.position,a=!1),on(p)||(s=e.position+1),p=e.input.charCodeAt(++e.position)}return Xt(e,o,s,!1),e.result?!0:(e.kind=d,e.result=f,!1)}function _f(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Xt(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else Ct(n)?(Xt(e,r,i,!0),Bo(e,Ne(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ni(e)?J(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);J(e,"unexpected end of the stream within a single quoted scalar")}function vf(e,t){var n,r,i,o,s,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return Xt(e,n,e.position,!0),e.position++,!0;if(a===92){if(Xt(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),Ct(a))Ne(e,!1,t);else if(a<256&&Il[a])e.result+=Ml[a],e.position++;else if((s=hf(a))>0){for(i=s,o=0;i>0;i--)a=e.input.charCodeAt(++e.position),(s=df(a))>=0?o=(o<<4)+s:J(e,"expected hexadecimal character");e.result+=pf(o),e.position++}else J(e,"unknown escape sequence");n=r=e.position}else Ct(a)?(Xt(e,n,r,!0),Bo(e,Ne(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Ni(e)?J(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}J(e,"unexpected end of the stream within a double quoted scalar")}function wf(e,t){var n=!0,r,i=e.tag,o,s=e.anchor,a,l,u,c,d,f={},p,m,v,g;if(g=e.input.charCodeAt(e.position),g===91)l=93,d=!1,o=[];else if(g===123)l=125,d=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),g=e.input.charCodeAt(++e.position);g!==0;){if(Ne(e,!0,t),g=e.input.charCodeAt(e.position),g===l)return e.position++,e.tag=i,e.anchor=s,e.kind=d?"mapping":"sequence",e.result=o,!0;n||J(e,"missed comma between flow collection entries"),m=p=v=null,u=c=!1,g===63&&(a=e.input.charCodeAt(e.position+1),Qe(a)&&(u=c=!0,e.position++,Ne(e,!0,t))),r=e.line,Bn(e,t,ui,!1,!0),m=e.tag,p=e.result,Ne(e,!0,t),g=e.input.charCodeAt(e.position),(c||e.line===r)&&g===58&&(u=!0,g=e.input.charCodeAt(++e.position),Ne(e,!0,t),Bn(e,t,ui,!1,!0),v=e.result),d?Cn(e,o,f,m,p,v):u?o.push(Cn(e,null,f,m,p,v)):o.push(p),Ne(e,!0,t),g=e.input.charCodeAt(e.position),g===44?(n=!0,g=e.input.charCodeAt(++e.position)):n=!1}J(e,"unexpected end of the stream within a flow collection")}function yf(e,t){var n,r,i=qi,o=!1,s=!1,a=t,l=0,u=!1,c,d;if(d=e.input.charCodeAt(e.position),d===124)r=!1;else if(d===62)r=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)qi===i?i=d===43?Ns:af:J(e,"repeat of a chomping mode identifier");else if((c=ff(d))>=0)c===0?J(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?J(e,"repeat of an indentation width identifier"):(a=t+c-1,s=!0);else break;if(on(d)){do d=e.input.charCodeAt(++e.position);while(on(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Ct(d)&&d!==0)}for(;d!==0;){for(Do(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!s||e.lineIndent<a)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>a&&(a=e.lineIndent),Ct(d)){l++;continue}if(e.lineIndent<a){i===Ns?e.result+=Dt.repeat(`
`,o?1+l:l):i===qi&&o&&(e.result+=`
`);break}for(r?on(d)?(u=!0,e.result+=Dt.repeat(`
`,o?1+l:l)):u?(u=!1,e.result+=Dt.repeat(`
`,l+1)):l===0?o&&(e.result+=" "):e.result+=Dt.repeat(`
`,l):e.result+=Dt.repeat(`
`,o?1+l:l),o=!0,s=!0,l=0,n=e.position;!Ct(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Xt(e,n,e.position,!1)}return!0}function $s(e,t){var n,r=e.tag,i=e.anchor,o=[],s,a=!1,l;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&!(l!==45||(s=e.input.charCodeAt(e.position+1),!Qe(s)));){if(a=!0,e.position++,Ne(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(n=e.line,Bn(e,t,Sl,!1,!0),o.push(e.result),Ne(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&l!==0)J(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}function bf(e,t,n){var r,i,o,s,a=e.tag,l=e.anchor,u={},c={},d=null,f=null,p=null,m=!1,v=!1,g;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),g=e.input.charCodeAt(e.position);g!==0;){if(r=e.input.charCodeAt(e.position+1),o=e.line,s=e.position,(g===63||g===58)&&Qe(r))g===63?(m&&(Cn(e,u,c,d,f,null),d=f=p=null),v=!0,m=!0,i=!0):m?(m=!1,i=!0):J(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,g=r;else if(Bn(e,n,kl,!1,!0))if(e.line===o){for(g=e.input.charCodeAt(e.position);on(g);)g=e.input.charCodeAt(++e.position);if(g===58)g=e.input.charCodeAt(++e.position),Qe(g)||J(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Cn(e,u,c,d,f,null),d=f=p=null),v=!0,m=!1,i=!1,d=e.tag,f=e.result;else if(v)J(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=a,e.anchor=l,!0}else if(v)J(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=a,e.anchor=l,!0;else break;if((e.line===o||e.lineIndent>t)&&(Bn(e,t,di,!0,i)&&(m?f=e.result:p=e.result),m||(Cn(e,u,c,d,f,p,o,s),d=f=p=null),Ne(e,!0,-1),g=e.input.charCodeAt(e.position)),e.lineIndent>t&&g!==0)J(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&Cn(e,u,c,d,f,null),v&&(e.tag=a,e.anchor=l,e.kind="mapping",e.result=u),v}function xf(e){var t,n=!1,r=!1,i,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&J(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(n=!0,s=e.input.charCodeAt(++e.position)):s===33?(r=!0,i="!!",s=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):J(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Qe(s);)s===33&&(r?J(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),El.test(i)||J(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),uf.test(o)&&J(e,"tag suffix cannot contain flow indicator characters")}return o&&!Cl.test(o)&&J(e,"tag name cannot contain such characters: "+o),n?e.tag=o:Kt.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:J(e,'undeclared tag handle "'+i+'"'),!0}function Af(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&J(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Qe(n)&&!En(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function kf(e){var t,n,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Qe(r)&&!En(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),Kt.call(e.anchorMap,n)||J(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Ne(e,!0,-1),!0}function Bn(e,t,n,r,i){var o,s,a,l=1,u=!1,c=!1,d,f,p,m,v;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=a=di===n||Sl===n,r&&Ne(e,!0,-1)&&(u=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;xf(e)||Af(e);)Ne(e,!0,-1)?(u=!0,a=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):a=!1;if(a&&(a=u||i),(l===1||di===n)&&(ui===n||kl===n?m=t:m=t+1,v=e.position-e.lineStart,l===1?a&&($s(e,v)||bf(e,v,m))||wf(e,m)?c=!0:(s&&yf(e,m)||_f(e,m)||vf(e,m)?c=!0:kf(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&J(e,"alias node should not have any properties")):gf(e,m,ui===n)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=a&&$s(e,v))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&J(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,f=e.implicitTypes.length;d<f;d+=1)if(p=e.implicitTypes[d],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else Kt.call(e.typeMap[e.kind||"fallback"],e.tag)?(p=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&p.kind!==e.kind&&J(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):J(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):J(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}function Sf(e){var t=e.position,n,r,i,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(s=e.input.charCodeAt(e.position))!==0&&(Ne(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),n=e.position;s!==0&&!Qe(s);)s=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&J(e,"directive name must not be less than one character in length");s!==0;){for(;on(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!Ct(s));break}if(Ct(s))break;for(n=e.position;s!==0&&!Qe(s);)s=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}s!==0&&Do(e),Kt.call(Rs,r)?Rs[r](e,r,i):hi(e,'unknown document directive "'+r+'"')}if(Ne(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Ne(e,!0,-1)):o&&J(e,"directives end mark is expected"),Bn(e,e.lineIndent-1,di,!1,!0),Ne(e,!0,-1),e.checkLineBreaks&&cf.test(e.input.slice(t,e.position))&&hi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ni(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ne(e,!0,-1));return}if(e.position<e.length-1)J(e,"end of the stream or a document separator is expected");else return}function Nl(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new mf(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,J(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Sf(n);return n.documents}function Tl(e,t,n){t!==null&&typeof t=="object"&&typeof n=="undefined"&&(n=t,t=null);var r=Nl(e,n);if(typeof t!="function")return r;for(var i=0,o=r.length;i<o;i+=1)t(r[i])}function Ll(e,t){var n=Nl(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new xl("expected a single document in the stream, but found more")}}function Ef(e,t,n){return typeof t=="object"&&t!==null&&typeof n=="undefined"&&(n=t,t=null),Tl(e,t,Dt.extend({schema:Al},n))}function Cf(e,t){return Ll(e,Dt.extend({schema:Al},t))}Er.loadAll=Tl;Er.load=Ll;Er.safeLoadAll=Ef;Er.safeLoad=Cf;var Fo={},Mr=ht,Or=Cr,If=Oi,Mf=Ir,Rl=Object.prototype.toString,Pl=Object.prototype.hasOwnProperty,Of=9,hr=10,Nf=13,Tf=32,Lf=33,Rf=34,$l=35,Pf=37,$f=38,Df=39,Bf=42,Dl=44,Ff=45,Bl=58,zf=61,jf=62,Vf=63,Hf=64,Fl=91,zl=93,Uf=96,jl=123,Gf=124,Vl=125,He={};He[0]="\\0";He[7]="\\a";He[8]="\\b";He[9]="\\t";He[10]="\\n";He[11]="\\v";He[12]="\\f";He[13]="\\r";He[27]="\\e";He[34]='\\"';He[92]="\\\\";He[133]="\\N";He[160]="\\_";He[8232]="\\L";He[8233]="\\P";var Yf=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Wf(e,t){var n,r,i,o,s,a,l;if(t===null)return{};for(n={},r=Object.keys(t),i=0,o=r.length;i<o;i+=1)s=r[i],a=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&Pl.call(l.styleAliases,a)&&(a=l.styleAliases[a]),n[s]=a;return n}function Ds(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new Or("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+Mr.repeat("0",r-t.length)+t}function qf(e){this.schema=e.schema||If,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Mr.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Wf(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 Bs(e,t){for(var n=Mr.repeat(" ",t),r=0,i=-1,o="",s,a=e.length;r<a;)i=e.indexOf(`
`,r),i===-1?(s=e.slice(r),r=a):(s=e.slice(r,i+1),r=i+1),s.length&&s!==`
`&&(o+=n),o+=s;return o}function po(e,t){return`
`+Mr.repeat(" ",e.indent*t)}function Zf(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function zo(e){return e===Tf||e===Of}function Fn(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function Xf(e){return Fn(e)&&!zo(e)&&e!==65279&&e!==Nf&&e!==hr}function Fs(e,t){return Fn(e)&&e!==65279&&e!==Dl&&e!==Fl&&e!==zl&&e!==jl&&e!==Vl&&e!==Bl&&(e!==$l||t&&Xf(t))}function Jf(e){return Fn(e)&&e!==65279&&!zo(e)&&e!==Ff&&e!==Vf&&e!==Bl&&e!==Dl&&e!==Fl&&e!==zl&&e!==jl&&e!==Vl&&e!==$l&&e!==$f&&e!==Bf&&e!==Lf&&e!==Gf&&e!==zf&&e!==jf&&e!==Df&&e!==Rf&&e!==Pf&&e!==Hf&&e!==Uf}function Hl(e){var t=/^\n* /;return t.test(e)}var Ul=1,Gl=2,Yl=3,Wl=4,Xr=5;function Kf(e,t,n,r,i){var o,s,a,l=!1,u=!1,c=r!==-1,d=-1,f=Jf(e.charCodeAt(0))&&!zo(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),!Fn(s))return Xr;a=o>0?e.charCodeAt(o-1):null,f=f&&Fs(s,a)}else{for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),s===hr)l=!0,c&&(u=u||o-d-1>r&&e[d+1]!==" ",d=o);else if(!Fn(s))return Xr;a=o>0?e.charCodeAt(o-1):null,f=f&&Fs(s,a)}u=u||c&&o-d-1>r&&e[d+1]!==" "}return!l&&!u?f&&!i(e)?Ul:Gl:n>9&&Hl(e)?Xr:u?Wl:Yl}function Qf(e,t,n,r){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&Yf.indexOf(t)!==-1)return"'"+t+"'";var i=e.indent*Math.max(1,n),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),s=r||e.flowLevel>-1&&n>=e.flowLevel;function a(l){return Zf(e,l)}switch(Kf(t,s,e.indent,o,a)){case Ul:return t;case Gl:return"'"+t.replace(/'/g,"''")+"'";case Yl:return"|"+zs(t,e.indent)+js(Bs(t,i));case Wl:return">"+zs(t,e.indent)+js(Bs(e0(t,o),i));case Xr:return'"'+t0(t)+'"';default:throw new Or("impossible error: invalid scalar style")}}()}function zs(e,t){var n=Hl(e)?String(t):"",r=e[e.length-1]===`
`,i=r&&(e[e.length-2]===`
`||e===`
`),o=i?"+":r?"":"-";return n+o+`
`}function js(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function e0(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var u=e.indexOf(`
`);return u=u!==-1?u:e.length,n.lastIndex=u,Vs(e.slice(0,u),t)}(),i=e[0]===`
`||e[0]===" ",o,s;s=n.exec(e);){var a=s[1],l=s[2];o=l[0]===" ",r+=a+(!i&&!o&&l!==""?`
`:"")+Vs(l,t),i=o}return r}function Vs(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,o,s=0,a=0,l="";r=n.exec(e);)a=r.index,a-i>t&&(o=s>i?s:a,l+=`
`+e.slice(i,o),i=o+1),s=a;return l+=`
`,e.length-i>t&&s>i?l+=e.slice(i,s)+`
`+e.slice(s+1):l+=e.slice(i),l.slice(1)}function t0(e){for(var t="",n,r,i,o=0;o<e.length;o++){if(n=e.charCodeAt(o),n>=55296&&n<=56319&&(r=e.charCodeAt(o+1),r>=56320&&r<=57343)){t+=Ds((n-55296)*1024+r-56320+65536),o++;continue}i=He[n],t+=!i&&Fn(n)?e[o]:i||Ds(n)}return t}function n0(e,t,n){var r="",i=e.tag,o,s;for(o=0,s=n.length;o<s;o+=1)ln(e,t,n[o],!1,!1)&&(o!==0&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function r0(e,t,n,r){var i="",o=e.tag,s,a;for(s=0,a=n.length;s<a;s+=1)ln(e,t+1,n[s],!0,!0)&&((!r||s!==0)&&(i+=po(e,t)),e.dump&&hr===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function i0(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,a,l,u,c;for(s=0,a=o.length;s<a;s+=1)c="",s!==0&&(c+=", "),e.condenseFlow&&(c+='"'),l=o[s],u=n[l],ln(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ln(e,t,u,!1,!1)&&(c+=e.dump,r+=c));e.tag=i,e.dump="{"+r+"}"}function o0(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),a,l,u,c,d,f;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Or("sortKeys must be a boolean or a function");for(a=0,l=s.length;a<l;a+=1)f="",(!r||a!==0)&&(f+=po(e,t)),u=s[a],c=n[u],ln(e,t+1,u,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&hr===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=po(e,t)),ln(e,t+1,c,!0,d)&&(e.dump&&hr===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,i+=f));e.tag=o,e.dump=i||"{}"}function Hs(e,t,n){var r,i,o,s,a,l;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o<s;o+=1)if(a=i[o],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(e.tag=n?a.tag:"?",a.represent){if(l=e.styleMap[a.tag]||a.defaultStyle,Rl.call(a.represent)==="[object Function]")r=a.represent(t,l);else if(Pl.call(a.represent,l))r=a.represent[l](t,l);else throw new Or("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function ln(e,t,n,r,i,o){e.tag=null,e.dump=n,Hs(e,n,!1)||Hs(e,n,!0);var s=Rl.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var a=s==="[object Object]"||s==="[object Array]",l,u;if(a&&(l=e.duplicates.indexOf(n),u=l!==-1),(e.tag!==null&&e.tag!=="?"||u||e.indent!==2&&t>0)&&(i=!1),u&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(a&&u&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),s==="[object Object]")r&&Object.keys(e.dump).length!==0?(o0(e,t,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(i0(e,t,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump));else if(s==="[object Array]"){var c=e.noArrayIndent&&t>0?t-1:t;r&&e.dump.length!==0?(r0(e,c,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(n0(e,c,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump))}else if(s==="[object String]")e.tag!=="?"&&Qf(e,e.dump,t,o);else{if(e.skipInvalid)return!1;throw new Or("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function s0(e,t){var n=[],r=[],i,o;for(mo(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function mo(e,t,n){var r,i,o;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)mo(e[i],t,n);else for(r=Object.keys(e),i=0,o=r.length;i<o;i+=1)mo(e[r[i]],t,n)}function ql(e,t){t=t||{};var n=new qf(t);return n.noRefs||s0(e,n),ln(n,0,e,!0,!0)?n.dump+`
`:""}function a0(e,t){return ql(e,Mr.extend({schema:Mf},t))}Fo.dump=ql;Fo.safeDump=a0;var Ti=Er,Zl=Fo;function Li(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Oe.Type=Be;Oe.Schema=Yn;Oe.FAILSAFE_SCHEMA=Po;Oe.JSON_SCHEMA=vl;Oe.CORE_SCHEMA=wl;Oe.DEFAULT_SAFE_SCHEMA=Ir;Oe.DEFAULT_FULL_SCHEMA=Oi;Oe.load=Ti.load;Oe.loadAll=Ti.loadAll;Oe.safeLoad=Ti.safeLoad;Oe.safeLoadAll=Ti.safeLoadAll;Oe.dump=Zl.dump;Oe.safeDump=Zl.safeDump;Oe.YAMLException=Cr;Oe.MINIMAL_SCHEMA=Po;Oe.SAFE_SCHEMA=Ir;Oe.DEFAULT_SCHEMA=Oi;Oe.scan=Li("scan");Oe.parse=Li("parse");Oe.compose=Li("compose");Oe.addConstructor=Li("addConstructor");var l0=Oe,go=l0,c0=u0;function Mn(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function u0(e){if(e=e||{},e.circles)return d0(e);return e.proto?r:n;function t(i,o){for(var s=Object.keys(i),a=new Array(s.length),l=0;l<s.length;l++){var u=s[l],c=i[u];typeof c!="object"||c===null?a[u]=c:c instanceof Date?a[u]=new Date(c):ArrayBuffer.isView(c)?a[u]=Mn(c):a[u]=o(c)}return a}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,n);if(i instanceof Map)return new Map(t(Array.from(i),n));if(i instanceof Set)return new Set(t(Array.from(i),n));var o={};for(var s in i)if(Object.hasOwnProperty.call(i,s)!==!1){var a=i[s];typeof a!="object"||a===null?o[s]=a:a instanceof Date?o[s]=new Date(a):a instanceof Map?o[s]=new Map(t(Array.from(a),n)):a instanceof Set?o[s]=new Set(t(Array.from(a),n)):ArrayBuffer.isView(a)?o[s]=Mn(a):o[s]=n(a)}return o}function r(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return t(i,r);if(i instanceof Map)return new Map(t(Array.from(i),r));if(i instanceof Set)return new Set(t(Array.from(i),r));var o={};for(var s in i){var a=i[s];typeof a!="object"||a===null?o[s]=a:a instanceof Date?o[s]=new Date(a):a instanceof Map?o[s]=new Map(t(Array.from(a),r)):a instanceof Set?o[s]=new Set(t(Array.from(a),r)):ArrayBuffer.isView(a)?o[s]=Mn(a):o[s]=r(a)}return o}}function d0(e){var t=[],n=[];return e.proto?o:i;function r(s,a){for(var l=Object.keys(s),u=new Array(l.length),c=0;c<l.length;c++){var d=l[c],f=s[d];if(typeof f!="object"||f===null)u[d]=f;else if(f instanceof Date)u[d]=new Date(f);else if(ArrayBuffer.isView(f))u[d]=Mn(f);else{var p=t.indexOf(f);p!==-1?u[d]=n[p]:u[d]=a(f)}}return u}function i(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return r(s,i);if(s instanceof Map)return new Map(r(Array.from(s),i));if(s instanceof Set)return new Set(r(Array.from(s),i));var a={};t.push(s),n.push(a);for(var l in s)if(Object.hasOwnProperty.call(s,l)!==!1){var u=s[l];if(typeof u!="object"||u===null)a[l]=u;else if(u instanceof Date)a[l]=new Date(u);else if(u instanceof Map)a[l]=new Map(r(Array.from(u),i));else if(u instanceof Set)a[l]=new Set(r(Array.from(u),i));else if(ArrayBuffer.isView(u))a[l]=Mn(u);else{var c=t.indexOf(u);c!==-1?a[l]=n[c]:a[l]=i(u)}}return t.pop(),n.pop(),a}function o(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return r(s,o);if(s instanceof Map)return new Map(r(Array.from(s),o));if(s instanceof Set)return new Set(r(Array.from(s),o));var a={};t.push(s),n.push(a);for(var l in s){var u=s[l];if(typeof u!="object"||u===null)a[l]=u;else if(u instanceof Date)a[l]=new Date(u);else if(u instanceof Map)a[l]=new Map(r(Array.from(u),o));else if(u instanceof Set)a[l]=new Set(r(Array.from(u),o));else if(ArrayBuffer.isView(u))a[l]=Mn(u);else{var c=t.indexOf(u);c!==-1?a[l]=n[c]:a[l]=o(u)}}return t.pop(),n.pop(),a}}var de=JSON.parse('{"languages":[{"code":"de","name":"Deutsch"},{"code":"en","name":"English"},{"code":"es","name":"Espa\xF1ol"},{"code":"fr","name":"Fran\xE7ais"},{"code":"it","name":"Italiano"},{"code":"ja","name":"\u65E5\u672C\u8A9E"},{"code":"pl","name":"Polski"},{"code":"pt","name":"Portugu\xEAs"},{"code":"ru","name":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},{"code":"sk","name":"Sloven\u010Dina","schemas":false},{"code":"zh-cn","name":"\u7B80\u4F53\u4E2D\u6587"},{"code":"zh-tw","name":"\u6B63\u9AD4\u4E2D\u6587"}],"versions":[{"id":"1.15","ref":"1.15.2","pack_format":5},{"id":"1.16","ref":"1.16.5","pack_format":6},{"id":"1.17","ref":"1.17.1","pack_format":7},{"id":"1.18","ref":"1.18.1","pack_format":8},{"id":"1.18.2","ref":"1.18.2","pack_format":9},{"id":"1.19","dynamic":true,"pack_format":10}],"generators":[{"id":"loot_table","url":"loot-table","path":"loot_tables","schema":"loot_table"},{"id":"predicate","url":"predicate","path":"predicates","schema":"predicate"},{"id":"item_modifier","url":"item-modifier","path":"item_modifiers","schema":"item_modifier","minVersion":"1.17"},{"id":"advancement","url":"advancement","path":"advancements","schema":"advancement"},{"id":"recipe","url":"recipe","path":"recipes","schema":"recipe"},{"id":"text_component","url":"text-component","schema":"text_component"},{"id":"chat_type","url":"chat-type","schema":"chat_type","minVersion":"1.19"},{"id":"dimension","url":"dimension","schema":"dimension","category":"worldgen","minVersion":"1.16"},{"id":"dimension_type","url":"dimension-type","schema":"dimension_type","category":"worldgen","minVersion":"1.16"},{"id":"world","url":"world","schema":"world_settings","category":"worldgen","minVersion":"1.16"},{"id":"worldgen/biome","url":"worldgen/biome","category":"worldgen","schema":"biome","minVersion":"1.16"},{"id":"worldgen/configured_carver","url":"worldgen/carver","category":"worldgen","schema":"configured_carver","minVersion":"1.16"},{"id":"worldgen/configured_feature","url":"worldgen/feature","category":"worldgen","schema":"configured_feature","minVersion":"1.16"},{"id":"worldgen/density_function","url":"worldgen/density-function","category":"worldgen","schema":"density_function","minVersion":"1.18.2"},{"id":"worldgen/placed_feature","url":"worldgen/placed-feature","category":"worldgen","schema":"placed_feature","minVersion":"1.18"},{"id":"worldgen/noise","url":"worldgen/noise","category":"worldgen","schema":"noise_parameters","minVersion":"1.18"},{"id":"worldgen/noise_settings","url":"worldgen/noise-settings","category":"worldgen","schema":"noise_settings","minVersion":"1.16"},{"id":"worldgen/configured_structure_feature","url":"worldgen/structure-feature","category":"worldgen","schema":"configured_structure_feature","minVersion":"1.16","maxVersion":"1.18.2"},{"id":"worldgen/structure","url":"worldgen/structure","category":"worldgen","schema":"structure","minVersion":"1.19"},{"id":"worldgen/structure_set","url":"worldgen/structure-set","category":"worldgen","schema":"structure_set","minVersion":"1.18.2"},{"id":"worldgen/configured_surface_builder","url":"worldgen/surface-builder","category":"worldgen","schema":"configured_surface_builder","minVersion":"1.16","maxVersion":"1.17"},{"id":"worldgen/processor_list","url":"worldgen/processor-list","category":"worldgen","schema":"processor_list","minVersion":"1.16"},{"id":"worldgen/template_pool","url":"worldgen/template-pool","category":"worldgen","schema":"template_pool","minVersion":"1.16"},{"id":"worldgen/world_preset","url":"worldgen/world-preset","category":"worldgen","schema":"world_preset","minVersion":"1.19"},{"id":"worldgen/flat_level_generator_preset","url":"worldgen/flat-world-preset","category":"worldgen","schema":"flat_level_generator_preset","minVersion":"1.19"},{"id":"tag/block","url":"tags/block","category":"tags","path":"tags/blocks","schema":"block_tag"},{"id":"tag/entity_type","url":"tags/entity-type","category":"tags","path":"tags/entity_types","schema":"entity_type_tag"},{"id":"tag/fluid","url":"tags/fluid","category":"tags","path":"tags/fluids","schema":"fluid_tag"},{"id":"tag/game_event","url":"tags/game-event","category":"tags","path":"tags/game_events","schema":"game_event_tag","minVersion":"1.17"},{"id":"tag/item","url":"tags/item","category":"tags","path":"tags/items","schema":"item_tag"},{"id":"tag/worldgen/biome","url":"tags/biome","category":"tags","path":"tags/worldgen/biome","schema":"biome_tag","minVersion":"1.18.2"},{"id":"block_definition","url":"assets/blockstate","path":"blockstates","category":"assets","schema":"block_definition"},{"id":"model","url":"assets/model","path":"models","category":"assets","schema":"model"},{"id":"block_growth","url":"partners/immersive-weathering/block-growth","path":"block_growths","category":"partners","partner":"immersive_weathering","schema":"immersive_weathering:block_growth","minVersion":"1.18.2"}]}');function Qt(e){return typeof e=="object"&&e!==null}function Jr(e){return e.toString(16).padStart(2,"0")}function sn(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Jr).join("")}function Vt(){return BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))}function h0(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function Xl(e){const t=Math.floor(Math.random()*4294967296)-2147483648,n=e.get(new O.Path(["dimensions"]));e.set(new O.Path(["seed"]),t,!0),Qt(n)&&Object.keys(n).forEach(r=>{e.set(new O.Path(["dimensions",r,"generator","seed"]),t,!0),e.set(new O.Path(["dimensions",r,"generator","biome_source","seed"]),t,!0)}),e.set(new O.Path(["placement","salt"]),Math.abs(t),!0),e.set(new O.Path(["generator","seed"]),t,!0),e.set(new O.Path(["generator","biome_source","seed"]),t)}function Jl(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return t}function It(e){return`/${e}/`.replaceAll("//","/")}function f0(e){const t=e.indexOf("?");return t>=0&&(e=e.slice(0,t)),It(e)}function Kl(e){const t=f0(e).replace(/^\//,"").replace(/\/$/,"");return de.generators.find(n=>n.url===t)}function Ql({path:e,search:t,hash:n,replace:r}){const i=(e!==void 0?It(e):location.pathname)+(t!==void 0?t.startsWith("?")||t.length===0?t:"?"+t:location.search)+(n!==void 0?n.startsWith("#")?n:"#"+n:location.hash);Jt(i,r)}function p0(e){const t=go.load(e.substring(3,e.indexOf("---",3)));return Qt(t)?t:{}}function m0(e,t){var r;let n=0;for(;;){const i=e.indexOf("{#",n);if(i<0)break;const o=g0(e,i+2),s=e.indexOf("#[",i+1);let a="";if(s>=0&&s<o){const l=e.indexOf("]",s+2);e.substring(s+2,l)===t&&(a=e.substring(l+1,o).trim())}else{const l=e.substring(i+2,o),u=de.versions.find(c=>c.id===t);a=(r={version:u==null?void 0:u.id,pack_format:u==null?void 0:u.pack_format.toString()}[l])!=null?r:""}e=e.substring(0,i)+a+e.substring(o+2),n=i}return e}function g0(e,t){let n=0,r=0;for(;r++<1e3;){const i=e.indexOf("#}",t),o=e.indexOf("{#",t);if(i<0)return console.warn("Missing closing bracket"),e.length;if(o<0){if(n===0)return i;n-=1,t=i+2}else if(o<i)n+=1,t=o+2;else{if(n===0)return i;n-=1,t=i+2}}return console.warn("Exceeded max iterations while finding closing bracket"),e.length}function jo(e){const t=Math.abs(Jl(e));return[t%256,(t>>8)%256,(t>>16)%256]}function _0(e){if(!Array.isArray(e)||e.length!==3)return"#000000";const[t,n,r]=e;return"#"+Jr(t)+Jr(n)+Jr(r)}function v0(e){if(typeof e!="string")return[0,0,0];const t=parseInt(e.startsWith("#")?e.slice(1):e,16),n=t>>16&255,r=t>>8&255,i=t&255;return[n,r,i]}function Zn(e){return e*e}function ot(e,t,n){return Math.max(e,Math.min(t,n))}function Zi(e,t,n){return n<0?e:n>1?t:Kr(n,e,t)}function Kr(e,t,n){return t+e*(n-t)}function w0(e,t,n,r,i,o){return Kr(t,Kr(e,n,r),Kr(e,i,o))}function ut(e){return e instanceof Error?e.message:`${e}`}const Ri=c0();function cn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,r;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=0;r<n;r++)if(!cn(e[r],t[r]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const i=Object.keys(e);if(n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!cn(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}class y0{constructor(){this.forward=new Map,this.backward=new Map}set(t,n){this.forward.set(t,n),this.backward.set(n,t)}getA(t){return this.backward.get(t)}getB(t){return this.forward.get(t)}getOrPut(t,n){const r=this.forward.get(t);return r===void 0?(this.set(t,n),n):r}}function Qr({icon:e,label:t,large:n,larger:r,doSelect:i,value:o,placeholder:s,dataList:a,onChange:l}){const u=l===void 0?()=>{}:f=>{const p=f.target.value;l==null||l(p)},c=me(null);Q(()=>{i&&c.current&&c.current.select()},[i]);const d=a&&sn();return h("div",{class:`btn btn-input ${n?"large-input":""} ${r?"larger-input":""}`,onClick:f=>f.stopPropagation()},e&&te[e],t&&h("span",null,t),h("input",{ref:c,type:"text",value:o,onChange:u,placeholder:s,list:d}),a&&h("datalist",{id:d},a.map(f=>h("option",{value:f}))))}function Qn({cooldown:e,invert:t,initial:n}={}){const[r,i]=D(n),o=me(void 0);return[r,()=>{i(!t),o.current!==void 0&&clearTimeout(o.current),o.current=setTimeout(()=>{i(!!t)},e!=null?e:2e3)}]}const _o=Symbol("async-cancel");function b0(e,t=[],n={loading:!1}){const[r,i]=D(n),o=me(!1),s=me(0);Q(()=>(o.current=!0,()=>o.current=!1),[]);const a=Ce((...l)=>{const u=++s.current;return r.loading||i(c=>_e(Z({},c),{loading:!0})),e(...l).then(c=>(o.current&&u===s.current&&c!==_o&&i({value:c,loading:!1}),c),c=>{o.current&&u===s.current&&i({error:c,loading:!1})})},t);return[r,a]}function Nr(e,t=[],n={loading:!0}){const[r,i]=b0(e,t,n);return Q(()=>{i()},[i]),_e(Z({},r),{refresh:i})}function Tr({size:e,draw:t,onDrag:n,onHover:r,onLeave:i},o){const s=me(null),a=me(),l=me(),u=me([0,0]),c=me(!1);Q(()=>{if(!s.current)return;const p=_=>{a.current=[_.offsetX,_.offsetY]},m=_=>{if(a.current===void 0){if(!s.current)return;const b=_.offsetX/s.current.clientWidth,A=_.offsetY/s.current.clientHeight;r==null||r(b,A);return}if(!n)return;const x=_.offsetX-a.current[0],w=_.offsetY-a.current[1];x===0&&w===0||(u.current=[u.current[0]+x,u.current[1]+w],c.current||(l.current&&cancelAnimationFrame(l.current),l.current=requestAnimationFrame(async()=>{if(!s.current)return;c.current=!0;const b=u.current[0]/s.current.clientWidth,A=u.current[1]/s.current.clientHeight;u.current=[0,0],await(n==null?void 0:n(b,A)),c.current=!1}))),a.current=[_.offsetX,_.offsetY]},v=()=>{a.current=void 0},g=()=>{i==null||i()};return s.current.addEventListener("mousedown",p),s.current.addEventListener("mousemove",m),s.current.addEventListener("mouseleave",g),document.body.addEventListener("mouseup",v),()=>{var _,x,w;(_=s.current)==null||_.removeEventListener("mousedown",p),(x=s.current)==null||x.removeEventListener("mousemove",m),(w=s.current)==null||w.removeEventListener("mouseleave",g),document.body.removeEventListener("mouseup",v)}},[...o!=null?o:[],s.current]);const d=me(),f=me(0);return d.current=async()=>{if(!s.current)return;const p=s.current.getContext("2d"),m=e();s.current.width=m[0],s.current.height=m[1];const v=p.getImageData(0,0,m[0],m[1]),g=f.current+=1;try{await t(v)}catch(_){throw _}g===f.current&&p.putImageData(v,0,0)},{canvas:s,redraw:d.current}}function Vo(){const[e,t]=D(!1),n=()=>{t(!1)};return Q(()=>(e&&(document.body.addEventListener("click",n),document.body.addEventListener("contextmenu",n)),()=>{document.body.removeEventListener("click",n),document.body.removeEventListener("contextmenu",n)}),[e]),[e,()=>t(!0)]}function x0(){const[e,t]=D(window.location.hash),n=Ce(()=>{t(window.location.hash)},[]);Q(()=>(window.addEventListener("hashchange",n),window.addEventListener("replacestate",n),()=>{window.removeEventListener("hashchange",n),window.removeEventListener("replacestate",n)}),[]);const r=Ce(i=>{i!==e&&Ql({hash:i})},[e]);return[e,r]}function A0(e,t,n,r){const i=Ce(()=>{const l=localStorage.getItem(e);return l===null?t:n===void 0?l:n(l)},[]),[o,s]=D(i()),a=Ce(l=>{l==null?(localStorage.removeItem(e),s(t)):r!==void 0?(localStorage.setItem(e,r(l)),s(l)):(localStorage.setItem(e,l),s(l))},[]);return[o,a]}function Us(e){const[t,n]=D(matchMedia(e).matches),r=i=>{n(i.matches)};return Q(()=>{const i=matchMedia(e);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[e]),t}function Pi(e,t,n){const r={invalidated(){e&&t(e)}};Q(()=>(e==null||e.addListener(r),()=>{e==null||e.removeListener(r)}),[e,...n!=null?n:[]])}const Gs=(e,t)=>{var n;return(n=new URLSearchParams(e).get(t))!=null?n:void 0};function un(e){const t=window.location,[n,r]=D(Gs(t.search,e));Q(()=>{const o=()=>{r(Gs(t.search,e))};return window.addEventListener("popstate",o),window.addEventListener("pushstate",o),window.addEventListener("replacestate",o),()=>{window.removeEventListener("popstate",o),window.removeEventListener("pushstate",o),window.removeEventListener("replacestate",o)}},[]);const i=Ce((o,s)=>{if(o!==n){r(o);const a=new URLSearchParams(t.search);o===void 0||o.length===0?a.delete(e):a.set(e,o),Ql({search:a.toString().replaceAll("%7C","|"),replace:s})}},[n]);return[n,i]}function et(e){const{icon:t,label:n,relative:r,tooltip:i,tooltipLoc:o,children:s}=e,[a,l]=Vo();return h("div",Z({class:`btn-menu${r===!1?" no-relative":""}`},e),h(X,{icon:t,label:n,tooltip:i,tooltipLoc:o,onClick:l}),a&&h("div",{class:"btn-group"},s))}const k0="modulepreload",Ys={},S0="/",ae=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${S0}${r}`,r in Ys)return;Ys[r]=!0;const i=r.endsWith(".css"),o=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${o}`))return;const s=document.createElement("link");if(s.rel=i?"stylesheet":k0,i||(s.as="script",s.crossOrigin=""),s.href=r,document.head.appendChild(s),i)return new Promise((a,l)=>{s.addEventListener("load",a),s.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},te={alert:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"})),archive:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M1.75 2.5a.25.25 0 00-.25.25v1.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-1.5a.25.25 0 00-.25-.25H1.75zM0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v1.5A1.75 1.75 0 0114.25 6H1.75A1.75 1.75 0 010 4.25v-1.5zM1.75 7a.75.75 0 01.75.75v5.5c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25v-5.5a.75.75 0 111.5 0v5.5A1.75 1.75 0 0113.25 15H2.75A1.75 1.75 0 011 13.25v-5.5A.75.75 0 011.75 7zm4.5 1a.75.75 0 000 1.5h3.5a.75.75 0 100-1.5h-3.5z"})),arrow_left:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M7.78 12.53a.75.75 0 01-1.06 0L2.47 8.28a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 1.06L4.81 7h7.44a.75.75 0 010 1.5H4.81l2.97 2.97a.75.75 0 010 1.06z"})),arrow_right:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M8.22 2.97a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06l2.97-2.97H3.75a.75.75 0 010-1.5h7.44L8.22 4.03a.75.75 0 010-1.06z"})),check:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"})),chevron_down:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M12.78 6.22a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06 0L3.22 7.28a.75.75 0 011.06-1.06L8 9.94l3.72-3.72a.75.75 0 011.06 0z"})),chevron_right:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z"})),chevron_up:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M3.22 9.78a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 0l4.25 4.25a.75.75 0 01-1.06 1.06L8 6.06 4.28 9.78a.75.75 0 01-1.06 0z"})),clippy:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M5.75 1a.75.75 0 00-.75.75v3c0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75v-3a.75.75 0 00-.75-.75h-4.5zm.75 3V2.5h3V4h-3zm-2.874-.467a.75.75 0 00-.752-1.298A1.75 1.75 0 002 3.75v9.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 13.25v-9.5a1.75 1.75 0 00-.874-1.515.75.75 0 10-.752 1.298.25.25 0 01.126.217v9.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-9.5a.25.25 0 01.126-.217z"})),code:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M4.72 3.22a.75.75 0 011.06 1.06L2.06 8l3.72 3.72a.75.75 0 11-1.06 1.06L.47 8.53a.75.75 0 010-1.06l4.25-4.25zm6.56 0a.75.75 0 10-1.06 1.06L13.94 8l-3.72 3.72a.75.75 0 101.06 1.06l4.25-4.25a.75.75 0 000-1.06l-4.25-4.25z"})),dash:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M2 8a.75.75 0 01.75-.75h10.5a.75.75 0 010 1.5H2.75A.75.75 0 012 8z"})),device_desktop:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M1.75 2.5h12.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25zM14.25 1H1.75A1.75 1.75 0 000 2.75v7.5C0 11.216.784 12 1.75 12h3.727c-.1 1.041-.52 1.872-1.292 2.757A.75.75 0 004.75 16h6.5a.75.75 0 00.565-1.243c-.772-.885-1.193-1.716-1.292-2.757h3.727A1.75 1.75 0 0016 10.25v-7.5A1.75 1.75 0 0014.25 1zM9.018 12H6.982a5.72 5.72 0 01-.765 2.5h3.566a5.72 5.72 0 01-.765-2.5z"})),dot_fill:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8z"})),download:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5 0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z"})),duplicate:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{d:"M10.5 3a.75.75 0 01.75.75v1h1a.75.75 0 010 1.5h-1v1a.75.75 0 01-1.5 0v-1h-1a.75.75 0 010-1.5h1v-1A.75.75 0 0110.5 3z"}),h("path",{"fill-rule":"evenodd",d:"M6.75 0A1.75 1.75 0 005 1.75v7.5c0 .966.784 1.75 1.75 1.75h7.5A1.75 1.75 0 0016 9.25v-7.5A1.75 1.75 0 0014.25 0h-7.5zM6.5 1.75a.25.25 0 01.25-.25h7.5a.25.25 0 01.25.25v7.5a.25.25 0 01-.25.25h-7.5a.25.25 0 01-.25-.25v-7.5z"}),h("path",{d:"M1.75 5A1.75 1.75 0 000 6.75v7.5C0 15.216.784 16 1.75 16h7.5A1.75 1.75 0 0011 14.25v-1.5a.75.75 0 00-1.5 0v1.5a.25.25 0 01-.25.25h-7.5a.25.25 0 01-.25-.25v-7.5a.25.25 0 01.25-.25h1.5a.75.75 0 000-1.5h-1.5z"})),eye:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z"})),eye_closed:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M.143 2.31a.75.75 0 011.047-.167l14.5 10.5a.75.75 0 11-.88 1.214l-2.248-1.628C11.346 13.19 9.792 14 8 14c-1.981 0-3.67-.992-4.933-2.078C1.797 10.832.88 9.577.43 8.9a1.618 1.618 0 010-1.797c.353-.533.995-1.42 1.868-2.305L.31 3.357A.75.75 0 01.143 2.31zm3.386 3.378a14.21 14.21 0 00-1.85 2.244.12.12 0 00-.022.068c0 .021.006.045.022.068.412.621 1.242 1.75 2.366 2.717C5.175 11.758 6.527 12.5 8 12.5c1.195 0 2.31-.488 3.29-1.191L9.063 9.695A2 2 0 016.058 7.52l-2.53-1.832zM8 3.5c-.516 0-1.017.09-1.499.251a.75.75 0 11-.473-1.423A6.23 6.23 0 018 2c1.981 0 3.67.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.619 1.619 0 010 1.798c-.11.166-.248.365-.41.587a.75.75 0 11-1.21-.887c.148-.201.272-.382.371-.53a.119.119 0 000-.137c-.412-.621-1.242-1.75-2.366-2.717C10.825 4.242 9.473 3.5 8 3.5z"})),file:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z"})),file_directory:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3h-6.5a.25.25 0 01-.2-.1l-.9-1.2c-.33-.44-.85-.7-1.4-.7h-3.5z"})),gear:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M7.429 1.525a6.593 6.593 0 011.142 0c.036.003.108.036.137.146l.289 1.105c.147.56.55.967.997 1.189.174.086.341.183.501.29.417.278.97.423 1.53.27l1.102-.303c.11-.03.175.016.195.046.219.31.41.641.573.989.014.031.022.11-.059.19l-.815.806c-.411.406-.562.957-.53 1.456a4.588 4.588 0 010 .582c-.032.499.119 1.05.53 1.456l.815.806c.08.08.073.159.059.19a6.494 6.494 0 01-.573.99c-.02.029-.086.074-.195.045l-1.103-.303c-.559-.153-1.112-.008-1.529.27-.16.107-.327.204-.5.29-.449.222-.851.628-.998 1.189l-.289 1.105c-.029.11-.101.143-.137.146a6.613 6.613 0 01-1.142 0c-.036-.003-.108-.037-.137-.146l-.289-1.105c-.147-.56-.55-.967-.997-1.189a4.502 4.502 0 01-.501-.29c-.417-.278-.97-.423-1.53-.27l-1.102.303c-.11.03-.175-.016-.195-.046a6.492 6.492 0 01-.573-.989c-.014-.031-.022-.11.059-.19l.815-.806c.411-.406.562-.957.53-1.456a4.587 4.587 0 010-.582c.032-.499-.119-1.05-.53-1.456l-.815-.806c-.08-.08-.073-.159-.059-.19a6.44 6.44 0 01.573-.99c.02-.029.086-.075.195-.045l1.103.303c.559.153 1.112.008 1.529-.27.16-.107.327-.204.5-.29.449-.222.851-.628.998-1.189l.289-1.105c.029-.11.101-.143.137-.146zM8 0c-.236 0-.47.01-.701.03-.743.065-1.29.615-1.458 1.261l-.29 1.106c-.017.066-.078.158-.211.224a5.994 5.994 0 00-.668.386c-.123.082-.233.09-.3.071L3.27 2.776c-.644-.177-1.392.02-1.82.63a7.977 7.977 0 00-.704 1.217c-.315.675-.111 1.422.363 1.891l.815.806c.05.048.098.147.088.294a6.084 6.084 0 000 .772c.01.147-.038.246-.088.294l-.815.806c-.474.469-.678 1.216-.363 1.891.2.428.436.835.704 1.218.428.609 1.176.806 1.82.63l1.103-.303c.066-.019.176-.011.299.071.213.143.436.272.668.386.133.066.194.158.212.224l.289 1.106c.169.646.715 1.196 1.458 1.26a8.094 8.094 0 001.402 0c.743-.064 1.29-.614 1.458-1.26l.29-1.106c.017-.066.078-.158.211-.224a5.98 5.98 0 00.668-.386c.123-.082.233-.09.3-.071l1.102.302c.644.177 1.392-.02 1.82-.63.268-.382.505-.789.704-1.217.315-.675.111-1.422-.364-1.891l-.814-.806c-.05-.048-.098-.147-.088-.294a6.1 6.1 0 000-.772c-.01-.147.039-.246.088-.294l.814-.806c.475-.469.679-1.216.364-1.891a7.992 7.992 0 00-.704-1.218c-.428-.609-1.176-.806-1.82-.63l-1.103.303c-.066.019-.176.011-.299-.071a5.991 5.991 0 00-.668-.386c-.133-.066-.194-.158-.212-.224L10.16 1.29C9.99.645 9.444.095 8.701.031A8.094 8.094 0 008 0zm1.5 8a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM11 8a3 3 0 11-6 0 3 3 0 016 0z"})),globe:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M1.543 7.25h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.506 6.506 0 00-4.666 5.5zm2.733 1.5H1.543a6.506 6.506 0 004.666 5.5 11.13 11.13 0 01-.352-.552c-.715-1.192-1.437-2.874-1.581-4.948zm1.504 0h4.44a9.637 9.637 0 01-1.363 4.177c-.306.51-.612.919-.857 1.215a9.978 9.978 0 01-.857-1.215A9.637 9.637 0 015.78 8.75zm4.44-1.5H5.78a9.637 9.637 0 011.363-4.177c.306-.51.612-.919.857-1.215.245.296.55.705.857 1.215A9.638 9.638 0 0110.22 7.25zm1.504 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.506 6.506 0 004.666-5.5h-2.733zm2.733-1.5h-2.733c-.144-2.074-.866-3.756-1.58-4.948a11.738 11.738 0 00-.353-.552 6.506 6.506 0 014.666 5.5zM8 0a8 8 0 100 16A8 8 0 008 0z"})),heart:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z"})),history:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M1.643 3.143L.427 1.927A.25.25 0 000 2.104V5.75c0 .138.112.25.25.25h3.646a.25.25 0 00.177-.427L2.715 4.215a6.5 6.5 0 11-1.18 4.458.75.75 0 10-1.493.154 8.001 8.001 0 101.6-5.684zM7.75 4a.75.75 0 01.75.75v2.992l2.028.812a.75.75 0 01-.557 1.392l-2.5-1A.75.75 0 017 8.25v-3.5A.75.75 0 017.75 4z"})),info:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm6.5-.25A.75.75 0 017.25 7h1a.75.75 0 01.75.75v2.75h.25a.75.75 0 010 1.5h-2a.75.75 0 010-1.5h.25v-2h-.25a.75.75 0 01-.75-.75zM8 6a1 1 0 100-2 1 1 0 000 2z"})),issue_opened:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z"})),kebab_horizontal:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{d:"M8 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM1.5 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm13 0a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"})),link:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"})),link_external:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M10.604 1h4.146a.25.25 0 01.25.25v4.146a.25.25 0 01-.427.177L13.03 4.03 9.28 7.78a.75.75 0 01-1.06-1.06l3.75-3.75-1.543-1.543A.25.25 0 0110.604 1zM3.75 2A1.75 1.75 0 002 3.75v8.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 12.25v-3.5a.75.75 0 00-1.5 0v3.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-8.5a.25.25 0 01.25-.25h3.5a.75.75 0 000-1.5h-3.5z"})),mark_github:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})),moon:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M9.598 1.591a.75.75 0 01.785-.175 7 7 0 11-8.967 8.967.75.75 0 01.961-.96 5.5 5.5 0 007.046-7.046.75.75 0 01.175-.786zm1.616 1.945a7 7 0 01-7.678 7.678 5.5 5.5 0 107.678-7.678z"})),package:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M8.878.392a1.75 1.75 0 00-1.756 0l-5.25 3.045A1.75 1.75 0 001 4.951v6.098c0 .624.332 1.2.872 1.514l5.25 3.045a1.75 1.75 0 001.756 0l5.25-3.045c.54-.313.872-.89.872-1.514V4.951c0-.624-.332-1.2-.872-1.514L8.878.392zM7.875 1.69a.25.25 0 01.25 0l4.63 2.685L8 7.133 3.245 4.375l4.63-2.685zM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432L2.5 5.677zm6.25 8.271l4.625-2.683a.25.25 0 00.125-.216V5.677L8.75 8.432v5.516z"})),play:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM6.379 5.227A.25.25 0 006 5.442v5.117a.25.25 0 00.379.214l4.264-2.559a.25.25 0 000-.428L6.379 5.227z"})),plus:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M8 2a.75.75 0 01.75.75v4.5h4.5a.75.75 0 010 1.5h-4.5v4.5a.75.75 0 01-1.5 0v-4.5h-4.5a.75.75 0 010-1.5h4.5v-4.5A.75.75 0 018 2z"})),plus_circle:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.75 4.75a.75.75 0 00-1.5 0v2.5h-2.5a.75.75 0 000 1.5h2.5v2.5a.75.75 0 001.5 0v-2.5h2.5a.75.75 0 000-1.5h-2.5v-2.5z"})),repo:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"})),search:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"})),sort_asc:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M0 4.25a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5H.75A.75.75 0 010 4.25zm0 4a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5H.75A.75.75 0 010 8.25zm0 4a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5H.75a.75.75 0 01-.75-.75zm12.927-9.677a.25.25 0 00-.354 0l-3 3A.25.25 0 009.75 6H12v6.75a.75.75 0 001.5 0V6h2.25a.25.25 0 00.177-.427l-3-3z"})),sort_desc:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M0 4.25a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5H.75A.75.75 0 010 4.25zm0 4a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5H.75A.75.75 0 010 8.25zm0 4a.75.75 0 01.75-.75h2.5a.75.75 0 010 1.5H.75a.75.75 0 01-.75-.75z"}),h("path",{d:"M13.5 10h2.25a.25.25 0 01.177.427l-3 3a.25.25 0 01-.354 0l-3-3A.25.25 0 019.75 10H12V3.75a.75.75 0 011.5 0V10z"})),square:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M4 5.75C4 4.784 4.784 4 5.75 4h4.5c.966 0 1.75.784 1.75 1.75v4.5A1.75 1.75 0 0110.25 12h-4.5A1.75 1.75 0 014 10.25v-4.5zm1.75-.25a.25.25 0 00-.25.25v4.5c0 .138.112.25.25.25h4.5a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-4.5z"})),square_fill:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M5.75 4A1.75 1.75 0 004 5.75v4.5c0 .966.784 1.75 1.75 1.75h4.5A1.75 1.75 0 0012 10.25v-4.5A1.75 1.75 0 0010.25 4h-4.5z"})),stack:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M7.122.392a1.75 1.75 0 011.756 0l5.003 2.902c.83.481.83 1.68 0 2.162L8.878 8.358a1.75 1.75 0 01-1.756 0L2.119 5.456a1.25 1.25 0 010-2.162L7.122.392zM8.125 1.69a.25.25 0 00-.25 0l-4.63 2.685 4.63 2.685a.25.25 0 00.25 0l4.63-2.685-4.63-2.685zM1.601 7.789a.75.75 0 011.025-.273l5.249 3.044a.25.25 0 00.25 0l5.249-3.044a.75.75 0 01.752 1.298l-5.248 3.044a1.75 1.75 0 01-1.756 0L1.874 8.814A.75.75 0 011.6 7.789zm0 3.5a.75.75 0 011.025-.273l5.249 3.044a.25.25 0 00.25 0l5.249-3.044a.75.75 0 01.752 1.298l-5.248 3.044a1.75 1.75 0 01-1.756 0l-5.248-3.044a.75.75 0 01-.273-1.025z"})),sun:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M8 10.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zM8 12a4 4 0 100-8 4 4 0 000 8zM8 0a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0V.75A.75.75 0 018 0zm0 13a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 018 13zM2.343 2.343a.75.75 0 011.061 0l1.06 1.061a.75.75 0 01-1.06 1.06l-1.06-1.06a.75.75 0 010-1.06zm9.193 9.193a.75.75 0 011.06 0l1.061 1.06a.75.75 0 01-1.06 1.061l-1.061-1.06a.75.75 0 010-1.061zM16 8a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0116 8zM3 8a.75.75 0 01-.75.75H.75a.75.75 0 010-1.5h1.5A.75.75 0 013 8zm10.657-5.657a.75.75 0 010 1.061l-1.061 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zm-9.193 9.193a.75.75 0 010 1.06l-1.06 1.061a.75.75 0 11-1.061-1.06l1.06-1.061a.75.75 0 011.061 0z"})),sync:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M8 2.5a5.487 5.487 0 00-4.131 1.869l1.204 1.204A.25.25 0 014.896 6H1.25A.25.25 0 011 5.75V2.104a.25.25 0 01.427-.177l1.38 1.38A7.001 7.001 0 0114.95 7.16a.75.75 0 11-1.49.178A5.501 5.501 0 008 2.5zM1.705 8.005a.75.75 0 01.834.656 5.501 5.501 0 009.592 2.97l-1.204-1.204a.25.25 0 01.177-.427h3.646a.25.25 0 01.25.25v3.646a.25.25 0 01-.427.177l-1.38-1.38A7.001 7.001 0 011.05 8.84a.75.75 0 01.656-.834z"})),tag:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"})),terminal:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V2.75zm1.75-.25a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25V2.75a.25.25 0 00-.25-.25H1.75zM7.25 8a.75.75 0 01-.22.53l-2.25 2.25a.75.75 0 11-1.06-1.06L5.44 8 3.72 6.28a.75.75 0 111.06-1.06l2.25 2.25c.141.14.22.331.22.53zm1.5 1.5a.75.75 0 000 1.5h3a.75.75 0 000-1.5h-3z"})),three_bars:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z"})),trashcan:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M6.5 1.75a.25.25 0 01.25-.25h2.5a.25.25 0 01.25.25V3h-3V1.75zm4.5 0V3h2.25a.75.75 0 010 1.5H2.75a.75.75 0 010-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75zM4.496 6.675a.75.75 0 10-1.492.15l.66 6.6A1.75 1.75 0 005.405 15h5.19c.9 0 1.652-.681 1.741-1.576l.66-6.6a.75.75 0 00-1.492-.149l-.66 6.6a.25.25 0 01-.249.225h-5.19a.25.25 0 01-.249-.225l-.66-6.6z"})),unfold:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{d:"M8.177.677l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25a.75.75 0 01-1.5 0V4H5.104a.25.25 0 01-.177-.427L7.823.677a.25.25 0 01.354 0zM7.25 10.75a.75.75 0 011.5 0V12h2.146a.25.25 0 01.177.427l-2.896 2.896a.25.25 0 01-.354 0l-2.896-2.896A.25.25 0 015.104 12H7.25v-1.25zm-5-2a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM6 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 016 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5zM12 8a.75.75 0 01-.75.75h-.5a.75.75 0 010-1.5h.5A.75.75 0 0112 8zm2.25.75a.75.75 0 000-1.5h-.5a.75.75 0 000 1.5h.5z"})),upload:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M8.53 1.22a.75.75 0 00-1.06 0L3.72 4.97a.75.75 0 001.06 1.06l2.47-2.47v6.69a.75.75 0 001.5 0V3.56l2.47 2.47a.75.75 0 101.06-1.06L8.53 1.22zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z"})),x:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"})),x_circle:h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},h("path",{"fill-rule":"evenodd",d:"M3.404 12.596a6.5 6.5 0 119.192-9.192 6.5 6.5 0 01-9.192 9.192zM2.344 2.343a8 8 0 1011.313 11.314A8 8 0 002.343 2.343zM6.03 4.97a.75.75 0 00-1.06 1.06L6.94 8 4.97 9.97a.75.75 0 101.06 1.06L8 9.06l1.97 1.97a.75.75 0 101.06-1.06L9.06 8l1.97-1.97a.75.75 0 10-1.06-1.06L8 6.94 6.03 4.97z"}))};function On({error:e,onDismiss:t}){const[n,r]=D(!1),[i,o]=D(void 0);Q(()=>{if(e instanceof Error){const a=e.stack.split(`
`).map(l=>l.replace(/^(\s+)at (?:async )?(https?:.*)/,"$1at ($2)"));o(a.join(`
`)),ae(()=>import("./sourcemapped-stacktrace.1bea8ce6.js").then(function(l){return l.s}),[]).then(({mapStackTrace:l})=>{l(a.join(`
`),u=>{const c=u.map(d=>d.replace(/..\/..\/src\//,"src/")).join(`
`);o(c)})})}},[e]);const s=ke(()=>{let a="https://github.com/misode/misode.github.io/issues/new";return e instanceof Error?(a+=`?title=${encodeURIComponent(`${e.name}: ${e.message}`)}`,i&&(a+=`&body=${encodeURIComponent(`\`\`\`
${e.name}: ${e.message}
${i}
\`\`\`
`)}`)):a+=`?title=${encodeURIComponent(e.toString())}`,a},[e,i]);return h("div",{class:"error"},t&&h("div",{class:"error-dismiss",onClick:t},te.x),h("h3",null,e instanceof Error?e.message:e,i&&h("span",{onClick:()=>r(!n)},te.info)),i&&n&&h("pre",null,i),h("p",null,"If you think this is a bug, you can report it ",h("a",{href:s,target:"_blank"},"on GitHub")))}var ec=JSON.parse('{"add":"Add","add_bottom":"Add to bottom","add_top":"Add to top","advancement":"Advancement","any_version":"Any","assets":"Assets","block_definition":"Blockstate","changelog.search":"Search changes","changelog.no_results":"No changes","chat_type":"Chat Type","collapse":"Collapse","collapse_all":"Hold %0% to collapse all","configure_layers":"Configure layers","copy":"Copy","copy_share":"Copy share link","copied":"Copied!","copy_context":"Copy context","developed_by":"Developed by","dimension_type":"Dimension Type","dimension":"Dimension","disabled":"Disabled","donate":"Donate","download":"Download","duplicate":"Duplicate","enabled":"Enabled","entries_hidden":"%0% entries hidden","entries_hidden.more":"Show %0% more","entries_hidden.all":"Show all","expand":"Expand","expand_all":"Hold %0% to expand all","feature.decorated.decorators":"Decorators","feature.decorated.decorators.entry":"Decorator","follow_reference":"Follow reference","format.json":"JSON","format.yaml":"YAML","fields":"Fields","generate_new_seed":"Generate new seed","generate_new_uuid":"Generate new UUID","github":"GitHub","guides.all":"All guides","guides.search":"Search guides","guides.no_results.version":"No guides for this version","guides.no_results.query":"No guides for this query","hide_output":"Hide output","hide_preview":"Hide preview","home":"Home","import":"Import","indentation.2_spaces":"2 spaces","indentation.4_spaces":"4 spaces","indentation.minified":"Minified","indentation.tabs":"Tabs","item_modifier":"Item Modifier","language":"Language","layer.biomes":"Biomes","layer.temperature":"Temperature","layer.humidity":"Humidity","layer.continentalness":"Continentalness","layer.erosion":"Erosion","layer.weirdness":"Weirdness","layer.offset":"Offset","layer.factor":"Factor","layer.jaggedness":"Jaggedness","highlighting":"Highlighting","loading":"Loading...","loot_table":"Loot Table","model":"Model","more":"More","move_down":"Move down","move_up":"Move up","not_found.description":"The page you were looking for does not exist.","no_presets":"No presets","output_settings":"Output settings","predicate":"Predicate","recipe":"Recipe","redo":"Redo","reset":"Reset","restore_backup":"Restore last backup","settings":"Settings","settings.fields.description":"Customize advanced field settings","settings.fields.path":"Context","settings.fields.name":"Name","share":"Share","theme":"Theme","tag/block":"Block Tag","tag/entity_type":"Entity Type Tag","tag/fluid":"Fluid Tag","tag/game_event":"Game Event Tag","tag/item":"Item Tag","tag/worldgen/biome":"Biome Tag","tags":"Tags","theme.dark":"Dark","theme.light":"Light","theme.system":"System","title.changelog":"Technical Changelog","title.generator":"%0% Generator","title.generator_category":"%0% Generators","title.guides":"Data Pack Guides","title.home":"Data Pack Generators","title.partners":"Partners","title.project":"%0% Project","title.sounds":"Sound Explorer","title.versions":"Versions Explorer","partner.immersive_weathering":"Immersive Weathering","partner.immersive_weathering.block_growth":"Block Growth","presets":"Presets","preview":"Visualize","preview.auto_scroll":"Auto scroll","preview.biome":"Biome","preview.scale":"Scale","preview.depth":"Depth","preview.factor":"Factor","preview.offset":"Offset","preview.peaks":"Peaks","preview.width":"Width","project.delete_file":"Delete file","project.go_to":"Go to project","project.new_file":"New file","project.no_files":"No files","project.search":"Search project","project.search_drafts":"Search drafts","project.unsaved_file":"Unsaved file","remove":"Remove","search":"Search","show_output":"Show output","show_preview":"Show preview","sounds.play":"Play","sounds.play_sound":"Play sound","sounds.play_all":"Play all","sounds.search":"Search sounds","sounds.download_function":"Download Mcfunction","sounds.delay":"Delay","sounds.pitch":"Pitch","sounds.volume":"Volume","sounds.copy_command":"Copy command","sounds.add_sound":"Add sound","sounds.remove_sound":"Remove sound","sounds.unknown_sound":"Unknown sound","sounds.loading_sound":"Loading sound","source_code_on":"Source code on","source_placeholder":"Paste raw %0% content here","switch_generator":"Switch generator","switch_version":"Switch version","terrain_settings":"Terrain settings","text_component":"Text Component","undo":"Undo","versions.article":"Article","versions.search":"Search versions","versions.no_results":"No results","versions.all":"All versions","versions.previous":"Previous","versions.next":"Next","versions.released":"Released","versions.release_target":"Release target","versions.data_version":"Data version","versions.protocol_version":"Protocol version","versions.pack_format":"Pack format","versions.data_pack_format":"Data pack format","versions.resource_pack_format":"Resource pack format","versions.technical_changes":"Technical changes","versions.discussion":"Discussion","world":"World Settings","worldgen":"Worldgen","worldgen/biome":"Biome","worldgen/configured_carver":"Carver","worldgen/configured_feature":"Feature","worldgen/density_function":"Density Function","worldgen/placed_feature":"Placed Feature","worldgen/noise":"Noise","worldgen/noise_settings":"Noise Settings","worldgen/processor_list":"Processor List","worldgen/configured_structure_feature":"Structure Feature","worldgen/structure":"Structure","worldgen/structure_set":"Structure Set","worldgen/configured_surface_builder":"Surface Builder","worldgen/template_pool":"Template Pool","worldgen/world_preset":"World Preset","worldgen/flat_level_generator_preset":"Flat World Preset","zoom_in":"Zoom in","zoom_out":"Zoom out"}'),E0=Object.freeze(Object.defineProperty({__proto__:null,default:ec},Symbol.toStringTag,{value:"Module"}));const Ho="https://raw.githubusercontent.com/misode/technical-changes/main";let Xi=null;async function tc(){if(!Xi){const e=await(await fetch(`${Ho}/index.json`)).json();Xi=(await Promise.all(e.map((t,n)=>C0(nc(t),n)))).flat().map(t=>_e(Z({},t),{tags:[t.group,...t.tags]}))}return Xi}async function C0(e,t){const n=await(await fetch(`${Ho}/${e}/index.json`)).json();return(await Promise.all(n.map((r,i)=>I0(e,nc(r),t,i)))).flat()}async function I0(e,t,n,r){const i=await(await fetch(`${Ho}/${e}/${t}.md`)).text();return M0(i).map(o=>Z({version:t,group:e,order:n*1e3+r},o))}function M0(e){return e.split(`
`).map(t=>{const n=t.indexOf("|");return{tags:t.substring(0,n).trim().split(" "),content:t.slice(n+1).trim().replaceAll("->","\u2192").replaceAll(`
...
`,`
`)}})}function nc(e){return typeof e=="string"?e:Qt(e)?e.id:"unknown"}const Xn="https://www.minecraft.net/article/",O0=new Map(Object.entries({"1.16-pre2":"minecraft-1-16-pre-release-1","1.16-pre4":"minecraft-1-16-pre-release-3","1.16-pre5":"minecraft-1-16-pre-release-3","1.16-pre7":"minecraft-1-16-pre-release-6","1.16-pre8":"minecraft-1-16-pre-release-6","1.16-rc1":"minecraft-1-16-release-candidate",1.16:"nether-update-java","1.16.2-pre3":"minecraft-1-16-2-pre-release-2","1.16.2-rc1":"minecraft-1-16-2-pre-release-2","1.16.2-rc2":"minecraft-1-16-2-pre-release-2","1.17-pre3":"minecraft-1-17-pre-release-2","1.17-pre4":"minecraft-1-17-pre-release-2","1.17-pre5":"minecraft-1-17-pre-release-2","1.17.1-pre3":"minecraft-1-17-1-pre-release-2",1.17:"caves---cliffs--part-i-out-today-java","1.18-pre3":"minecraft-1-18-pre-release-2","1.18-pre4":"minecraft-1-18-pre-release-2","1.18-pre5":"minecraft-1-18-pre-release-2","1.18-pre7":"minecraft-1-18-pre-release-6","1.18-pre8":"minecraft-1-18-pre-release-6",1.18:"caves---cliffs--part-ii-out-today-java","1.18.2-pre3":"minecraft-1-18-2-pre-release-2","1.18.2-pre5":"minecraft-1-18-2-pre-release-4",1.19:"the-wild-update-out-today-java"}));function N0(e){const t=O0.get(e);if(t)return Xn+t;let n;if((n=e.match(/^(\d\dw\d\d)[a-z]$/))&&n[1])return Xn+"minecraft-snapshot-"+n[1]+"a";if((n=e.match(/^(\d+\.\d+(?:\.\d+)?)-pre([0-9]+)$/))&&n[1]&&n[2])return Xn+"minecraft-"+n[1].replaceAll(".","-")+"-pre-release-"+n[2];if((n=e.match(/^(\d+\.\d+(?:\.\d+)?)-rc[0-9]+$/))&&n[1])return Xn+"minecraft-"+n[1].replaceAll(".","-")+"-release-candidate-1";if(e.match(/^\d+\.\d+\.\d+$/))return Xn+"minecraft-java-edition-"+e.replaceAll(".","-")}const Nn="misode-v2",Ws="cached_latest_version",qs="misode_cache_patch",Ji="1.19",In="https://raw.githubusercontent.com/misode/mcmeta";function Ht(e,t){return`${In}/${e.dynamic?t:`${e.ref}-${t}`}`}async function $i(e){await z0(),e.dynamic&&(localStorage.getItem(Ws)!==Ji&&(await ic(t=>t.startsWith(`${In}/summary/`)||t.startsWith(`${In}/data/`)||t.startsWith(`${In}/assets/`)||t.startsWith(`${In}/registries/`)),localStorage.setItem(Ws,Ji)),e.ref=Ji)}async function T0(e,t,n){const r=de.versions.find(i=>i.id===e);if(!r){console.error(`[fetchData] Unknown version ${r} in ${JSON.stringify(de.versions)}`);return}await $i(r),await Promise.all([L0(r,t),R0(r,n)])}async function L0(e,t){console.debug(`[fetchRegistries] ${e.id}`);try{const n=await zn(`${Ht(e,"summary")}/registries/data.min.json`);for(const r in n)t.register(r,n[r].map(i=>"minecraft:"+i))}catch(n){console.warn("Error occurred while fetching registries:",ut(n))}}async function R0(e,t){console.debug(`[fetchBlockStateMap] ${e.id}`);try{const n=await zn(`${Ht(e,"summary")}/blocks/data.min.json`);for(const r in n)t["minecraft:"+r]={properties:n[r][0],default:n[r][1]}}catch(n){console.warn("Error occurred while fetching block state map:",ut(n))}}async function rc(e,t,n){console.debug(`[fetchPreset] ${e} ${t} ${n}`);const r=de.versions.find(i=>i.id===e);try{let i;if(n.startsWith("immersive_weathering:"))i=`https://raw.githubusercontent.com/AstralOrdana/Immersive-Weathering/main/src/main/resources/data/immersive_weathering/block_growths/${n.slice(21)}.json`;else{const s=["blockstates","models"].includes(t)?"assets":"data";i=`${Ht(r,s)}/${s}/minecraft/${t}/${n}.json`}return await(await fetch(i)).json()}catch(i){throw new Error(`Error occurred while fetching ${t} preset ${n}: ${ut(i)}`)}}async function P0(e,t){console.debug(`[fetchAllPresets] ${e} ${t}`);const n=de.versions.find(r=>r.id===e);await $i(n);try{const r=await zn(`${Ht(n,"registries")}/${t}/data.min.json`);return new Map(await Promise.all(r.map(async i=>[i,await zn(`${Ht(n,"data")}/data/minecraft/${t}/${i}.json`)])))}catch(r){throw new Error(`Error occurred while fetching all ${t} presets: ${ut(r)}`)}}async function $0(e){const t=de.versions.find(n=>n.id===e);await $i(t);try{const n=`${Ht(t,"summary")}/sounds/data.min.json`;return await zn(n)}catch(n){throw new Error(`Error occurred while fetching sounds for ${t}: ${ut(n)}`)}}function D0(e,t){const n=de.versions.find(r=>r.id===e);return`${Ht(n,"assets")}/assets/minecraft/sounds/${t}.ogg`}async function B0(){const e=de.versions[de.versions.length-1];await $i(e);try{return zn(`${Ht(e,"summary")}/versions/data.min.json`)}catch(t){throw new Error(`Error occured while fetching versions: ${ut(t)}`)}}function F0(e,t){const n=de.versions.find(r=>r.id===e);return`${Ht(n,"assets")}/assets/minecraft/textures/${t}.png`}async function zn(e,t=n=>n){try{const n=await caches.open(Nn);console.debug(`[getData] Opened cache ${Nn} ${e}`);const r=await n.match(e);if(r&&r.ok)return console.debug(`[getData] Retrieving cached data ${e}`),await r.json();console.debug(`[getData] fetching data ${e}`);const i=await fetch(e),o=t(await i.json());return await n.put(e,new Response(JSON.stringify(o))),o}catch(n){console.warn(`[getData] Failed to open cache ${Nn}: ${ut(n)}`),console.debug(`[getData] fetching data ${e}`);const r=await fetch(e);return t(await r.json())}}async function ic(e){try{const t=await caches.open(Nn);console.debug(`[deleteMatching] Opened cache ${Nn}`);const n=[];for(const r of await t.keys())e(r.url)&&n.push(t.delete(r));console.debug(`[deleteMatching] Removing ${n.length} cache objects...`),await Promise.all(n)}catch(t){console.warn(`[deleteMatching] Failed to open cache ${Nn}: ${ut(t)}`)}}const Zs=[async()=>{["1.15","1.16","1.17"].forEach(e=>localStorage.removeItem(`cache_${e}`)),["mcdata_master","vanilla_datapack_summary"].forEach(e=>localStorage.removeItem(`cached_${e}`)),caches.delete("misode-v1")},async()=>{await ic(e=>e.startsWith(`${In}/1.18.2-summary/`))}];async function z0(){var t;const e=parseInt((t=localStorage.getItem(qs))!=null?t:"0");for(let n=e+1;n<=Zs.length;n+=1){const r=Zs[n-1];r&&await r(),localStorage.setItem(qs,n.toFixed())}}const Ie="immersive_weathering";function j0(e,t){const n=O.Reference.bind(void 0,e),r=O.StringNode.bind(void 0,t),i=o=>O.ChoiceNode([{type:"string",node:r({validator:"resource",params:{pool:o,allowTag:!0}}),change:s=>{if(Array.isArray(s)&&typeof s[0]=="string"&&!s[0].startsWith("#"))return s[0]}},{type:"list",node:O.ListNode(r({validator:"resource",params:{pool:o}})),change:s=>typeof s=="string"&&!s.startsWith("#")?[s]:[]}],{choiceContext:"tag"});e.register(`${Ie}:block_growth`,O.ObjectNode({area_condition:n(`${Ie}:area_condition`),position_predicates:O.Opt(O.ListNode(n(`${Ie}:position_test`))),growth_chance:O.NumberNode({min:0,max:1}),growth_for_face:O.ListNode(O.ObjectNode({direction:O.Opt(r({enum:"direction"})),weight:O.Opt(O.NumberNode({integer:!0})),growth:O.ListNode(O.ObjectNode({data:n(`${Ie}:block_pair`),weight:O.NumberNode({integer:!0})}))},{category:"pool"})),owners:O.ListNode(r({validator:"resource",params:{pool:"block"}})),replacing_target:n(`${Ie}:rule_test`),target_self:O.Opt(O.BooleanNode()),destroy_target:O.Opt(O.BooleanNode())},{context:`${Ie}.block_growth`})),e.register(`${Ie}:area_condition`,O.ObjectNode({type:r({enum:["generate_if_not_too_many","neighbor_based_generation"]}),[O.Switch]:[{push:"type"}],[O.Case]:{generate_if_not_too_many:{radiusX:O.NumberNode({integer:!0}),radiusY:O.NumberNode({integer:!0}),radiusZ:O.NumberNode({integer:!0}),requiredAmount:O.NumberNode({integer:!0}),yOffset:O.Opt(O.NumberNode({integer:!0})),must_have:O.Opt(n(`${Ie}:rule_test`)),must_not_have:O.Opt(n(`${Ie}:rule_test`)),includes:O.Opt(i("block"))},neighbor_based_generation:{must_have:n(`${Ie}:rule_test`),must_not_have:O.Opt(n(`${Ie}:rule_test`)),required_amount:O.Opt(O.NumberNode({integer:!0})),directions:O.ListNode(r({enum:"direction"}))}}},{context:`${Ie}.area_condition`})),e.register(`${Ie}:block_pair`,O.ObjectNode({block:n(`${Ie}:block_state`),above_block:O.Opt(n(`${Ie}:block_state`))},{context:`${Ie}.block_pair`})),e.register(`${Ie}:block_state`,O.ObjectNode({Name:r({validator:"resource",params:{pool:"block"}}),Properties:O.Opt(O.MapNode(r(),r()))},{context:"block_state"})),e.register(`${Ie}:position_test`,O.ObjectNode({predicate_type:r({enum:["biome_match","day_test","nand","precipitation_test","temperature_range"]}),[O.Switch]:[{push:"predicate_type"}],[O.Case]:{biome_match:{biomes:i("$worldgen/biome")},day_test:{day:O.BooleanNode()},nand:{predicates:O.ListNode(n(`${Ie}:position_test`))},precipitation_test:{precipitation:r({enum:["none","rain","snow"]})},temperature_range:{min:O.NumberNode(),max:O.NumberNode(),use_local_pos:O.Opt(O.BooleanNode())}}},{context:`${Ie}.position_test`,category:"predicate"})),t.register(`${Ie}:rule_test`,[...t.get("rule_test"),"immersive_weathering:block_set_match","immersive_weathering:fluid_match","immersive_weathering:tree_log"]),e.register(`${Ie}:rule_test`,O.ObjectNode({predicate_type:r({validator:"resource",params:{pool:`${Ie}:rule_test`}}),[O.Switch]:[{push:"predicate_type"}],[O.Case]:{"minecraft:block_match":{block:r({validator:"resource",params:{pool:"block"}})},"minecraft:blockstate_match":{block_state:n("block_state")},"minecraft:random_block_match":{block:r({validator:"resource",params:{pool:"block"}}),probability:O.NumberNode({min:0,max:1})},"minecraft:random_blockstate_match":{block_state:n("block_state"),probability:O.NumberNode({min:0,max:1})},"minecraft:tag_match":{tag:r({validator:"resource",params:{pool:"$tag/block"}})},"immersive_weathering:block_set_match":{blocks:i("block"),probability:O.Opt(O.NumberNode({min:0,max:1}))},"immersive_weathering:fluid_match":{fluid:r({validator:"resource",params:{pool:"fluid"}})}}},{context:"rule_test",disableSwitchContext:!0})),t.register("block_growth",["immersive_weathering:brain_coral","immersive_weathering:bubble_coral","immersive_weathering:cracked_mud_rivers","immersive_weathering:crimson_nylium","immersive_weathering:cryosol","immersive_weathering:farmland_rare_weeds","immersive_weathering:farmland_weeds","immersive_weathering:fire_coral","immersive_weathering:fire_soot","immersive_weathering:fluvisol","immersive_weathering:grass_base","immersive_weathering:grass_block_badlands","immersive_weathering:grass_block_bamboo_jungle","immersive_weathering:grass_block_birch_forest","immersive_weathering:grass_block_dark_forest","immersive_weathering:grass_block_flower_forest","immersive_weathering:grass_block_forest","immersive_weathering:grass_block_jungle","immersive_weathering:grass_block_lush_caves","immersive_weathering:grass_block_old_growth_spruce","immersive_weathering:grass_block_plains","immersive_weathering:grass_block_sunflower_plains","immersive_weathering:grass_block_swamp","immersive_weathering:grass_block_taiga","immersive_weathering:grass_block_wooded_badlands","immersive_weathering:hanging_roots","immersive_weathering:horn_coral","immersive_weathering:humus","immersive_weathering:icicle_growth","immersive_weathering:large_fern","immersive_weathering:magma","immersive_weathering:mycelium","immersive_weathering:podzol","immersive_weathering:red_sand_weathering","immersive_weathering:rooted_dirt","immersive_weathering:rooted_grass","immersive_weathering:sand_weathering","immersive_weathering:sapling","immersive_weathering:sapling_nether","immersive_weathering:silt","immersive_weathering:tall_grass","immersive_weathering:tall_seagrass","immersive_weathering:tube_coral","immersive_weathering:vertisol","immersive_weathering:warped_nylium"])}function V0(e,t){j0(e,t)}const oc=["1.15","1.16","1.17","1.18","1.18.2","1.19"],bn={},xn={},H0={1.15:()=>ae(()=>import("./index.33dad5e5.js").then(function(e){return e.i}),[]),1.16:()=>ae(()=>import("./index.b3c419d7.js").then(function(e){return e.i}),[]),1.17:()=>ae(()=>import("./index.1e859893.js").then(function(e){return e.i}),[]),1.18:()=>ae(()=>import("./index.dd344703.js").then(function(e){return e.i}),[]),"1.18.2":()=>ae(()=>import("./index.9cb09bb6.js").then(function(e){return e.i}),[]),1.19:()=>ae(()=>import("./index.986884f4.js").then(function(e){return e.i}),[])};let sc,ac,or;async function Uo(e){return bn[e]||(bn[e]=(async()=>{try{const t=await H0[e](),n=t.getCollections(),r={};await T0(e,n,r);const i=t.getSchemas(n);return V0(i,n),bn[e]={collections:n,schemas:i,blockStates:r},bn[e]}catch(t){throw new Error(`Cannot get version "${e}": ${ut(t)}`)}})()),bn[e]}async function U0(e,t){var n;if(!xn[t]||xn[t].version!==e){const r=await Uo(e);sc=O.Reference(r.schemas,"configured_decorator"),ac=O.ChoiceNode([{type:"string",node:O.StringNode(r.collections,{validator:"resource",params:{pool:"$worldgen/configured_feature"}})},{type:"object",node:O.Reference(r.schemas,"configured_feature")}],{choiceContext:"feature"});const i=(n=de.generators.find(o=>o.id===t))==null?void 0:n.schema;if(!i)throw new Error(`Cannot find model ${t}`);try{const o=r.schemas.get(i),s=new O.DataModel(o,{wrapLists:!0});xn[t]?s.reset(xn[t].model.data,!1):(s.validate(!0),s.history=[JSON.stringify(s.data)]),xn[t]={model:s,version:e}}catch(o){const s=new Error(`Cannot get generator "${t}" for version "${e}": ${ut(o)}`);throw o instanceof Error&&(s.stack=o.stack),s}}return xn[t].model}async function G0(e){const t=await Uo(e);return or=t.collections,t.collections}async function Y0(e){return(await Uo(e)).blockStates}function qe(e,t,n){const r=de.versions.findIndex(s=>s.id===e),i=t?de.versions.findIndex(s=>s.id===t):0,o=n?de.versions.findIndex(s=>s.id===n):de.versions.length-1;return i<=r&&r<=o}var lc={exports:{}};(function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function s(l,u){if(!o[l]){o[l]={};for(var c=0;c<l.length;c++)o[l][l.charAt(c)]=c}return o[l][u]}var a={compressToBase64:function(l){if(l==null)return"";var u=a._compress(l,6,function(c){return r.charAt(c)});switch(u.length%4){default:case 0:return u;case 1:return u+"===";case 2:return u+"==";case 3:return u+"="}},decompressFromBase64:function(l){return l==null?"":l==""?null:a._decompress(l.length,32,function(u){return s(r,l.charAt(u))})},compressToUTF16:function(l){return l==null?"":a._compress(l,15,function(u){return n(u+32)})+" "},decompressFromUTF16:function(l){return l==null?"":l==""?null:a._decompress(l.length,16384,function(u){return l.charCodeAt(u)-32})},compressToUint8Array:function(l){for(var u=a.compress(l),c=new Uint8Array(u.length*2),d=0,f=u.length;d<f;d++){var p=u.charCodeAt(d);c[d*2]=p>>>8,c[d*2+1]=p%256}return c},decompressFromUint8Array:function(l){if(l==null)return a.decompress(l);for(var u=new Array(l.length/2),c=0,d=u.length;c<d;c++)u[c]=l[c*2]*256+l[c*2+1];var f=[];return u.forEach(function(p){f.push(n(p))}),a.decompress(f.join(""))},compressToEncodedURIComponent:function(l){return l==null?"":a._compress(l,6,function(u){return i.charAt(u)})},decompressFromEncodedURIComponent:function(l){return l==null?"":l==""?null:(l=l.replace(/ /g,"+"),a._decompress(l.length,32,function(u){return s(i,l.charAt(u))}))},compress:function(l){return a._compress(l,16,function(u){return n(u)})},_compress:function(l,u,c){if(l==null)return"";var d,f,p={},m={},v="",g="",_="",x=2,w=3,b=2,A=[],S=0,I=0,k;for(k=0;k<l.length;k+=1)if(v=l.charAt(k),Object.prototype.hasOwnProperty.call(p,v)||(p[v]=w++,m[v]=!0),g=_+v,Object.prototype.hasOwnProperty.call(p,g))_=g;else{if(Object.prototype.hasOwnProperty.call(m,_)){if(_.charCodeAt(0)<256){for(d=0;d<b;d++)S=S<<1,I==u-1?(I=0,A.push(c(S)),S=0):I++;for(f=_.charCodeAt(0),d=0;d<8;d++)S=S<<1|f&1,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=f>>1}else{for(f=1,d=0;d<b;d++)S=S<<1|f,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=0;for(f=_.charCodeAt(0),d=0;d<16;d++)S=S<<1|f&1,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=f>>1}x--,x==0&&(x=Math.pow(2,b),b++),delete m[_]}else for(f=p[_],d=0;d<b;d++)S=S<<1|f&1,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=f>>1;x--,x==0&&(x=Math.pow(2,b),b++),p[g]=w++,_=String(v)}if(_!==""){if(Object.prototype.hasOwnProperty.call(m,_)){if(_.charCodeAt(0)<256){for(d=0;d<b;d++)S=S<<1,I==u-1?(I=0,A.push(c(S)),S=0):I++;for(f=_.charCodeAt(0),d=0;d<8;d++)S=S<<1|f&1,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=f>>1}else{for(f=1,d=0;d<b;d++)S=S<<1|f,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=0;for(f=_.charCodeAt(0),d=0;d<16;d++)S=S<<1|f&1,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=f>>1}x--,x==0&&(x=Math.pow(2,b),b++),delete m[_]}else for(f=p[_],d=0;d<b;d++)S=S<<1|f&1,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=f>>1;x--,x==0&&(x=Math.pow(2,b),b++)}for(f=2,d=0;d<b;d++)S=S<<1|f&1,I==u-1?(I=0,A.push(c(S)),S=0):I++,f=f>>1;for(;;)if(S=S<<1,I==u-1){A.push(c(S));break}else I++;return A.join("")},decompress:function(l){return l==null?"":l==""?null:a._decompress(l.length,32768,function(u){return l.charCodeAt(u)})},_decompress:function(l,u,c){var d=[],f=4,p=4,m=3,v="",g=[],_,x,w,b,A,S,I,k={val:c(0),position:u,index:1};for(_=0;_<3;_+=1)d[_]=_;for(w=0,A=Math.pow(2,2),S=1;S!=A;)b=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),w|=(b>0?1:0)*S,S<<=1;switch(w){case 0:for(w=0,A=Math.pow(2,8),S=1;S!=A;)b=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),w|=(b>0?1:0)*S,S<<=1;I=n(w);break;case 1:for(w=0,A=Math.pow(2,16),S=1;S!=A;)b=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),w|=(b>0?1:0)*S,S<<=1;I=n(w);break;case 2:return""}for(d[3]=I,x=I,g.push(I);;){if(k.index>l)return"";for(w=0,A=Math.pow(2,m),S=1;S!=A;)b=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),w|=(b>0?1:0)*S,S<<=1;switch(I=w){case 0:for(w=0,A=Math.pow(2,8),S=1;S!=A;)b=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),w|=(b>0?1:0)*S,S<<=1;d[p++]=n(w),I=p-1,f--;break;case 1:for(w=0,A=Math.pow(2,16),S=1;S!=A;)b=k.val&k.position,k.position>>=1,k.position==0&&(k.position=u,k.val=c(k.index++)),w|=(b>0?1:0)*S,S<<=1;d[p++]=n(w),I=p-1,f--;break;case 2:return g.join("")}if(f==0&&(f=Math.pow(2,m),m++),d[I])v=d[I];else if(I===p)v=x+x.charAt(0);else return null;g.push(v),d[p++]=x+v.charAt(0),f--,x=v,f==0&&(f=Math.pow(2,m),m++)}}};return a}();e!=null&&(e.exports=t)})(lc);var cc=lc.exports;const W0="https://z15g7can.directus.app/items",Xs=new Map;async function q0(e,t,n,r){try{const i=JSON.stringify(n),o=cc.compressToBase64(i);console.log("Compression rate",i.length/i.length);const s=JSON.stringify({data:o,type:e,version:t,show_preview:r});let a=Xs.get(s);if(!a){const l=await uc("/snippets",s);Xs.set(s,l.id),a=l.id}return{id:a,length:i.length,compressed:o.length,rate:i.length/o.length}}catch(i){throw i instanceof Error&&(i.message=`Error creating share link: ${i.message}`),i}}async function Z0(e){var t;try{const n=await uc(`/snippets/${e}`);return _e(Z({},n),{data:JSON.parse((t=cc.decompressFromBase64(n.data))!=null?t:"{}")})}catch(n){throw n instanceof Error&&(n.message=`Error loading shared content: ${n.message}`),n}}async function uc(e,t){var i,o,s;const r=await(await fetch(W0+e,t?{method:"post",headers:{"Content-Type":"application/json"},body:t}:void 0)).json();if(r.data)return r.data;throw new Error((s=(o=(i=r.errors)==null?void 0:i[0])==null?void 0:o.message)!=null?s:"Unknown error")}var De;(e=>{e.ID_LANGUAGE="language",e.ID_THEME="theme",e.ID_VERSION="schema_version",e.ID_INDENT="indentation",e.ID_FORMAT="output_format",e.ID_HIGHLIGHTING="output_highlighting",e.ID_SOUNDS_VERSION="minecraft_sounds_version",e.ID_PROJECTS="misode_projects",e.ID_BACKUPS="misode_generator_backups";function t(){var w;return(w=localStorage.getItem(e.ID_LANGUAGE))!=null?w:"en"}e.getLanguage=t;function n(){var w;return(w=localStorage.getItem(e.ID_THEME))!=null?w:"dark"}e.getTheme=n;function r(){const w=localStorage.getItem(e.ID_VERSION);return w&&oc.includes(w)?w:"1.19"}e.getVersion=r;function i(){var w;return(w=localStorage.getItem(e.ID_INDENT))!=null?w:"2_spaces"}e.getIndent=i;function o(){var w;return(w=localStorage.getItem(e.ID_FORMAT))!=null?w:"json"}e.getFormat=o;function s(){return localStorage.getItem(e.ID_HIGHLIGHTING)!=="false"}e.getHighlighting=s;function a(){var w;return(w=localStorage.getItem(e.ID_SOUNDS_VERSION))!=null?w:"latest"}e.getSoundsVersion=a;function l(){const w=localStorage.getItem(e.ID_PROJECTS);return w?JSON.parse(w):[fr]}e.getProjects=l;function u(w){var A;return JSON.parse((A=localStorage.getItem(e.ID_BACKUPS))!=null?A:"{}")[w]}e.getBackup=u;function c(w){w&&localStorage.setItem(e.ID_LANGUAGE,w)}e.setLanguage=c;function d(w){w&&localStorage.setItem(e.ID_THEME,w)}e.setTheme=d;function f(w){w&&localStorage.setItem(e.ID_VERSION,w)}e.setVersion=f;function p(w){w&&localStorage.setItem(e.ID_INDENT,w)}e.setIndent=p;function m(w){w&&localStorage.setItem(e.ID_FORMAT,w)}e.setFormat=m;function v(w){w!==void 0&&localStorage.setItem(e.ID_HIGHLIGHTING,w.toString())}e.setHighlighting=v;function g(w){w&&localStorage.setItem(e.ID_SOUNDS_VERSION,w)}e.setSoundsVersion=g;function _(w){w&&localStorage.setItem(e.ID_PROJECTS,JSON.stringify(w))}e.setProjects=_;function x(w,b){var S;const A=JSON.parse((S=localStorage.getItem(e.ID_BACKUPS))!=null?S:"{}");b===void 0?delete A[w]:A[w]=b,localStorage.setItem(e.ID_BACKUPS,JSON.stringify(A))}e.setBackup=x})(De||(De={}));function X0(e){switch(e){case"../../../node_modules/@mcschema/locales/src/cs.json":return ae(()=>import("./cs.967a01eb.js"),[]);case"../../../node_modules/@mcschema/locales/src/de.json":return ae(()=>import("./de.489974c1.js"),[]);case"../../../node_modules/@mcschema/locales/src/en.json":return ae(()=>import("./en.48a63f6e.js"),[]);case"../../../node_modules/@mcschema/locales/src/es.json":return ae(()=>import("./es.6b3597bc.js"),[]);case"../../../node_modules/@mcschema/locales/src/fr.json":return ae(()=>import("./fr.e316b1e2.js"),[]);case"../../../node_modules/@mcschema/locales/src/it.json":return ae(()=>import("./it.7ff123cd.js"),[]);case"../../../node_modules/@mcschema/locales/src/ja.json":return ae(()=>import("./ja.3170354d.js"),[]);case"../../../node_modules/@mcschema/locales/src/pl.json":return ae(()=>import("./pl.ae1f6791.js"),[]);case"../../../node_modules/@mcschema/locales/src/pt.json":return ae(()=>import("./pt.31e14993.js"),[]);case"../../../node_modules/@mcschema/locales/src/ru.json":return ae(()=>import("./ru.1298edc9.js"),[]);case"../../../node_modules/@mcschema/locales/src/sk.json":return ae(()=>import("./sk.d4265232.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-cn.json":return ae(()=>import("./zh-cn.4129665a.js"),[]);case"../../../node_modules/@mcschema/locales/src/zh-tw.json":return ae(()=>import("./zh-tw.bdc36a24.js"),[]);default:return new Promise(function(t,n){(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))})}}function J0(e){switch(e){case"../../locales/de.json":return ae(()=>import("./de.a269acce.js"),[]);case"../../locales/en.json":return ae(()=>Promise.resolve().then(function(){return E0}),void 0);case"../../locales/es.json":return ae(()=>import("./es.833a9774.js"),[]);case"../../locales/fr.json":return ae(()=>import("./fr.f5531eea.js"),[]);case"../../locales/it.json":return ae(()=>import("./it.fd9a8268.js"),[]);case"../../locales/ja.json":return ae(()=>import("./ja.167de97b.js"),[]);case"../../locales/pl.json":return ae(()=>import("./pl.3a9fb38c.js"),[]);case"../../locales/pt.json":return ae(()=>import("./pt.1a04bd2d.js"),[]);case"../../locales/ru.json":return ae(()=>import("./ru.578070fe.js"),[]);case"../../locales/sk.json":return ae(()=>import("./sk.96bbf351.js"),[]);case"../../locales/zh-cn.json":return ae(()=>import("./zh-cn.e3c47b68.js"),[]);case"../../locales/zh-tw.json":return ae(()=>import("./zh-tw.42e9d37d.js"),[]);default:return new Promise(function(t,n){(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))})}}const dc=pn({lang:"none",locale:e=>e,changeLocale:()=>{}}),sr={fallback:ec};function ue(e,t,...n){var i,o,s,a,l;const r=(l=(a=(s=(i=sr[e])==null?void 0:i[t])!=null?s:(o=sr.en)==null?void 0:o[t])!=null?a:sr.fallback[t])!=null?l:t;return K0(r,n)}function K0(e,t){return e.replace(/%\d+%/g,n=>{const r=parseInt(n.slice(1,-1));return(t==null?void 0:t[r])!==void 0?t[r]:n})}async function Ki(e){if(sr[e])return;const t=de.languages.find(o=>o.code===e);if(!t)return;const n=await J0(`../../locales/${e}.json`),r=t.schemas!==!1&&await X0(`../../../node_modules/@mcschema/locales/src/${e}.json`);let i={default:{}};e==="en"&&(i=await ae(()=>import("./en.321d8b56.js"),[])),sr[e]=Z(Z(Z({},n.default),r.default),i.default)}function Ee(){return gn(dc)}function Q0({children:e}){const[t,n]=D("none"),r=Ce((s,...a)=>ue(t,s,...a),[t]),i=Ce(async s=>{await Ki(s),ve.changeLocale(t,s),De.setLanguage(s),n(s)},[t]);Q(()=>{(async()=>{const s=De.getLanguage();ve.setLocale(s),await Promise.all([Ki("en"),...s!=="en"?[Ki(s)]:[]]),n(s)})()},[]);const o={lang:t,locale:r,changeLocale:i};return h(dc.Provider,{value:o},e)}const fr={name:"Drafts",namespace:"draft",files:[]},hc=pn({projects:[fr],project:fr,changeProject:()=>{},updateProject:()=>{},updateFile:()=>!1,openFile:()=>{},closeFile:()=>{}});function fc(){return gn(hc)}function ep({children:e}){const[t,n]=D(De.getProjects()),[r,i]=D(fr.name),o=ke(()=>{var v;return(v=t.find(g=>g.name===r))!=null?v:fr},[t,r]),[s,a]=D(void 0),l=ke(()=>{if(!!s)return o.files.find(v=>v.type===s[0]&&v.id===s[1])},[o,s]),u=Ce(v=>{De.setProjects(v),n(v)},[]),c=Ce(v=>{u(t.map(g=>g.name===r?Z(Z({},g),v):g))},[t,r]),d=Ce((v,g,_)=>{var x;if(!_.id)c({files:o.files.filter(w=>w.type!==v||w.id!==g)});else{const w=_.id.includes(":")?_.id:`${o.namespace}:${_.id}`,b=o.files.some(A=>A.type===v&&A.id===w);if(g){if((l==null?void 0:l.id)===g&&g!==w&&b)return!1;c({files:o.files.map(A=>A.type===v&&A.id===g?_e(Z(Z({},A),_),{id:w}):A)}),(l==null?void 0:l.id)===g&&a([v,w])}else{if(b)return!1;c({files:[...o.files,{type:v,id:w,data:(x=_.data)!=null?x:{}}]}),a([v,w])}}return!0},[c,o,l]),f=Ce((v,g)=>{const _=de.generators.find(x=>x.id===v||x.path===v);if(!_)throw new Error(`Cannot find generator of type ${v}`);a([_.id,g]),Jt(It(_.url))},[]),p=Ce(()=>{a(void 0)},[]),m={projects:t,project:o,file:l,changeProject:i,updateProject:c,updateFile:d,openFile:f,closeFile:p};return h(hc.Provider,{value:m},e)}function tp(e){var i;const[t,n]=e.id.includes(":")?e.id.split(":"):["minecraft",e.id];if(e.type==="pack_mcmeta")return"pack.mcmeta";const r=de.generators.find(o=>o.id===e.type);if(!r){console.error(`Cannot find generator of type ${e.type}`);return}return`data/${t}/${(i=r.path)!=null?i:r.id}/${n}`}const pc=pn({biomeColors:{},setBiomeColor:()=>{}});function mc(){return gn(pc)}function np({children:e}){const[t,n]=A0("misode_biome_colors",{},JSON.parse,JSON.stringify),r=Ce((o,s)=>{n(_e(Z({},t),{[o]:s}))},[t]),i={biomeColors:t,setBiomeColor:r};return h(pc.Provider,{value:i},e)}const gc=pn({theme:"dark",actualTheme:"dark",changeTheme:()=>{}});function _c(){return gn(gc)}function rp({children:e}){const[t,n]=D(De.getTheme()),r=Us("(prefers-color-scheme: light)"),i=Us("(prefers-color-scheme: dark)");Q(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const o=Ce(a=>{ve.changeTheme(t,a),De.setTheme(a),n(a)},[t]);Q(()=>{ve.setPrefersColorScheme(r?"light":i?"dark":"none")},[r,i]),Q(()=>{ve.setTheme(t)},[]);const s={theme:t,actualTheme:t==="light"||t!=="dark"&&r?"light":"dark",changeTheme:o};return h(gc.Provider,{value:s},e)}const ip=3,vc=pn({title:"",changeTitle:()=>{}});function dt(e,t,n){const r=gn(vc);return Q(()=>{e&&r.changeTitle(e,t,n)},[e,t,n]),r}function op({children:e}){const{locale:t}=Ee(),[n,r]=D(t("title.home")),i=Ce((s,a,l)=>{let u=de.versions;a!==void 0&&(u=de.versions.filter(d=>a==null?void 0:a.includes(d.id)));let c="";l&&(c=` - ${l}`),(a==null?void 0:a.length)!==0&&(c=` - Minecraft ${u.map(f=>f.id).slice(-ip).join(", ")}`),document.title=s+c,r(s)},[]),o={title:n,changeTitle:i};return h(vc.Provider,{value:o},e)}const sp="version",wc=pn({version:"1.18.2",changeVersion:()=>{},changeTargetVersion:()=>{}});function Wn(){return gn(wc)}function ap({children:e}){const[t,n]=D(De.getVersion()),[r,i]=un(sp);Q(()=>{oc.includes(r)&&t!==r&&(ve.setVersion(r),n(r))},[t,r]);const o=Ce((a,l=!0,u=!1)=>{(u||r)&&i(a,!0),l&&(ve.changeVersion(t,a),De.setVersion(a)),n(a)},[t,r]);Q(()=>{ve.setVersion(t)},[]);const s={version:t,changeVersion:o,changeTargetVersion:i};return h(wc.Provider,{value:s},e)}function Wt({donate:e}){const{locale:t}=Ee();return h("footer",null,h("p",null,h("span",null,t("developed_by")," ",h("a",{href:"https://github.com/misode",target:"_blank",rel:"noreferrer"},"Misode"))),e!==!1&&h("p",{class:"donate"},te.heart,h("a",{href:"https://ko-fi.com/misode",target:"_blank",rel:"noreferrer"},t("donate"))),h("p",null,te.mark_github,h("span",null,t("source_code_on")," ",h("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer"},t("github")))))}function lp({label:e,value:t,onChange:n}){const r=sn();return h("label",{class:"checkbox"},h("input",{id:r,type:"checkbox",checked:t,onClick:()=>n(!t)}),e)}function Go(e,t,n){const r=i=>{const o=i.onChange&&(a=>{var u;const l=a.target.value;(u=i.onChange)==null||u.call(i,n(l))}),s=i.onEnter&&(a=>{var l;if(a.key==="Enter"){const u=a.target.value;(l=i.onEnter)==null||l.call(i,n(u))}});return h("input",_e(Z({},i),{type:t,onChange:o,onKeyDown:s}))};return r.displayName=e,r}const dn=Go("TextInput","text",e=>e),cp=Go("NumberInput","number",e=>Number(e)),Js=Go("RangeInput","range",e=>Number(e));function Ks({values:e,onSelect:t,searchPlaceholder:n,noResults:r}){const[i,o]=D(""),s=ke(()=>{var l;const a=i.trim().split(" ");return(l=e==null?void 0:e.filter(u=>a.every(c=>u.includes(c))))!=null?l:[]},[e,i]);return h(ne,null,h(Qr,{icon:"search",large:!0,value:i,onChange:o,doSelect:1,placeholder:n!=null?n:"Search"}),h("div",{class:"result-list"},s.map(a=>h(X,{key:a,label:a,onClick:()=>t==null?void 0:t(a)})),s.length===0&&h(X,{label:r!=null?r:"No results"})))}let ie,yc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});yc.decode();let zr=null;function up(){return(zr===null||zr.buffer!==ie.memory.buffer)&&(zr=new Uint8Array(ie.memory.buffer)),zr}function dp(e,t){return yc.decode(up().subarray(e,e+t))}const vo=new Uint32Array(2),hp=new BigInt64Array(vo.buffer);let jr=null;function pr(){return(jr===null||jr.buffer!==ie.memory.buffer)&&(jr=new Int32Array(ie.memory.buffer)),jr}let Vr=null;function bc(){return(Vr===null||Vr.buffer!==ie.memory.buffer)&&(Vr=new Float64Array(ie.memory.buffer)),Vr}function fp(e,t){return bc().subarray(e/8,e/8+t)}let Me=0;function Le(e,t){const n=t(e.length*8);return bc().set(e,n/8),Me=e.length,n}let Hr=null;function pp(){return(Hr===null||Hr.buffer!==ie.memory.buffer)&&(Hr=new Uint32Array(ie.memory.buffer)),Hr}function mp(e,t){const n=t(e.length*4);return pp().set(e,n/4),Me=e.length,n}function gp(e,t,n,r,i,o,s,a,l,u,c,d,f,p){var m=Le(e,ie.__wbindgen_malloc),v=Me,g=Le(t,ie.__wbindgen_malloc),_=Me,x=Le(n,ie.__wbindgen_malloc),w=Me,b=Le(r,ie.__wbindgen_malloc),A=Me,S=Le(i,ie.__wbindgen_malloc),I=Me,k=Le(o,ie.__wbindgen_malloc),M=Me,N=Le(s,ie.__wbindgen_malloc),L=Me,F=Le(a,ie.__wbindgen_malloc),z=Me,oe=Le(l,ie.__wbindgen_malloc),le=Me,T=Le(u,ie.__wbindgen_malloc),$=Me,H=Le(c,ie.__wbindgen_malloc),C=Me,y=Le(d,ie.__wbindgen_malloc),E=Me,R=Le(f,ie.__wbindgen_malloc),V=Me,W=mp(p,ie.__wbindgen_malloc),he=Me,Ue=ie.biome_parameters(m,v,g,_,x,w,b,A,S,I,k,M,N,L,F,z,oe,le,T,$,H,C,y,E,R,V,W,he);return Di.__wrap(Ue)}function _p(e,t,n,r,i,o,s,a,l,u,c,d,f){hp[0]=e;const p=vo[0],m=vo[1];var v=Le(n,ie.__wbindgen_malloc),g=Me,_=Le(i,ie.__wbindgen_malloc),x=Me,w=Le(s,ie.__wbindgen_malloc),b=Me,A=Le(l,ie.__wbindgen_malloc),S=Me,I=Le(c,ie.__wbindgen_malloc),k=Me,M=Le(f,ie.__wbindgen_malloc),N=Me,L=ie.climate_sampler(p,m,t,v,g,r,_,x,o,w,b,a,A,S,u,I,k,d,M,N);return Lr.__wrap(L)}function wo(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`);return e.ptr}function vp(e,t){return pr().subarray(e/4,e/4+t)}function Qs(e,t,n,r,i,o,s,a,l,u,c){try{const m=ie.__wbindgen_add_to_stack_pointer(-16);wo(e,Di),wo(t,Lr),ie.multi_noise(m,e.ptr,t.ptr,n,r,i,o,s,a,l,u,c);var d=pr()[m/4+0],f=pr()[m/4+1],p=vp(d,f).slice();return ie.__wbindgen_free(d,f*4),p}finally{ie.__wbindgen_add_to_stack_pointer(16)}}function ea(e,t,n,r,i,o,s,a,l,u){try{const p=ie.__wbindgen_add_to_stack_pointer(-16);wo(e,Lr),ie.climate_noise(p,e.ptr,t,n,r,i,o,s,a,l,u);var c=pr()[p/4+0],d=pr()[p/4+1],f=fp(c,d).slice();return ie.__wbindgen_free(c,d*8),f}finally{ie.__wbindgen_add_to_stack_pointer(16)}}class Di{static __wrap(t){const n=Object.create(Di.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();ie.__wbg_parameterlist_free(t)}}class Lr{static __wrap(t){const n=Object.create(Lr.prototype);return n.ptr=t,n}__destroy_into_raw(){const t=this.ptr;return this.ptr=0,t}free(){const t=this.__destroy_into_raw();ie.__wbg_sampler_free(t)}}async function wp(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(r){if(e.headers.get("Content-Type")!="application/wasm")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",r);else throw r}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}async function xc(e){typeof e=="undefined"&&(e=new URL("/assets/deepslate_rs_bg.4990c219.wasm",self.location));const t={};t.wbg={},t.wbg.__wbindgen_throw=function(i,o){throw new Error(dp(i,o))},(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:r}=await wp(await e,t);return ie=n.exports,xc.__wbindgen_wasm_module=r,ie}var ta="/assets/deepslate_rs_bg.4990c219.wasm",Ac={exports:{}},kc={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(n,r){return n<<r|n>>>32-r},rotr:function(n,r){return n<<32-r|n>>>r},endian:function(n){if(n.constructor==Number)return t.rotl(n,8)&16711935|t.rotl(n,24)&4278255360;for(var r=0;r<n.length;r++)n[r]=t.endian(n[r]);return n},randomBytes:function(n){for(var r=[];n>0;n--)r.push(Math.floor(Math.random()*256));return r},bytesToWords:function(n){for(var r=[],i=0,o=0;i<n.length;i++,o+=8)r[o>>>5]|=n[i]<<24-o%32;return r},wordsToBytes:function(n){for(var r=[],i=0;i<n.length*32;i+=8)r.push(n[i>>>5]>>>24-i%32&255);return r},bytesToHex:function(n){for(var r=[],i=0;i<n.length;i++)r.push((n[i]>>>4).toString(16)),r.push((n[i]&15).toString(16));return r.join("")},hexToBytes:function(n){for(var r=[],i=0;i<n.length;i+=2)r.push(parseInt(n.substr(i,2),16));return r},bytesToBase64:function(n){for(var r=[],i=0;i<n.length;i+=3)for(var o=n[i]<<16|n[i+1]<<8|n[i+2],s=0;s<4;s++)i*8+s*6<=n.length*8?r.push(e.charAt(o>>>6*(3-s)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],i=0,o=0;i<n.length;o=++i%4)o!=0&&r.push((e.indexOf(n.charAt(i-1))&Math.pow(2,-2*o+8)-1)<<o*2|e.indexOf(n.charAt(i))>>>6-o*2);return r}};kc.exports=t})();var yo={utf8:{stringToBytes:function(e){return yo.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(yo.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(e.charCodeAt(n)&255);return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},na=yo;/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var yp=function(e){return e!=null&&(Sc(e)||bp(e)||!!e._isBuffer)};function Sc(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function bp(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&Sc(e.slice(0,0))}(function(){var e=kc.exports,t=na.utf8,n=yp,r=na.bin,i=function(o,s){o.constructor==String?s&&s.encoding==="binary"?o=r.stringToBytes(o):o=t.stringToBytes(o):n(o)?o=Array.prototype.slice.call(o,0):!Array.isArray(o)&&o.constructor!==Uint8Array&&(o=o.toString());for(var a=e.bytesToWords(o),l=o.length*8,u=1732584193,c=-271733879,d=-1732584194,f=271733878,p=0;p<a.length;p++)a[p]=(a[p]<<8|a[p]>>>24)&16711935|(a[p]<<24|a[p]>>>8)&4278255360;a[l>>>5]|=128<<l%32,a[(l+64>>>9<<4)+14]=l;for(var m=i._ff,v=i._gg,g=i._hh,_=i._ii,p=0;p<a.length;p+=16){var x=u,w=c,b=d,A=f;u=m(u,c,d,f,a[p+0],7,-680876936),f=m(f,u,c,d,a[p+1],12,-389564586),d=m(d,f,u,c,a[p+2],17,606105819),c=m(c,d,f,u,a[p+3],22,-1044525330),u=m(u,c,d,f,a[p+4],7,-176418897),f=m(f,u,c,d,a[p+5],12,1200080426),d=m(d,f,u,c,a[p+6],17,-1473231341),c=m(c,d,f,u,a[p+7],22,-45705983),u=m(u,c,d,f,a[p+8],7,1770035416),f=m(f,u,c,d,a[p+9],12,-1958414417),d=m(d,f,u,c,a[p+10],17,-42063),c=m(c,d,f,u,a[p+11],22,-1990404162),u=m(u,c,d,f,a[p+12],7,1804603682),f=m(f,u,c,d,a[p+13],12,-40341101),d=m(d,f,u,c,a[p+14],17,-1502002290),c=m(c,d,f,u,a[p+15],22,1236535329),u=v(u,c,d,f,a[p+1],5,-165796510),f=v(f,u,c,d,a[p+6],9,-1069501632),d=v(d,f,u,c,a[p+11],14,643717713),c=v(c,d,f,u,a[p+0],20,-373897302),u=v(u,c,d,f,a[p+5],5,-701558691),f=v(f,u,c,d,a[p+10],9,38016083),d=v(d,f,u,c,a[p+15],14,-660478335),c=v(c,d,f,u,a[p+4],20,-405537848),u=v(u,c,d,f,a[p+9],5,568446438),f=v(f,u,c,d,a[p+14],9,-1019803690),d=v(d,f,u,c,a[p+3],14,-187363961),c=v(c,d,f,u,a[p+8],20,1163531501),u=v(u,c,d,f,a[p+13],5,-1444681467),f=v(f,u,c,d,a[p+2],9,-51403784),d=v(d,f,u,c,a[p+7],14,1735328473),c=v(c,d,f,u,a[p+12],20,-1926607734),u=g(u,c,d,f,a[p+5],4,-378558),f=g(f,u,c,d,a[p+8],11,-2022574463),d=g(d,f,u,c,a[p+11],16,1839030562),c=g(c,d,f,u,a[p+14],23,-35309556),u=g(u,c,d,f,a[p+1],4,-1530992060),f=g(f,u,c,d,a[p+4],11,1272893353),d=g(d,f,u,c,a[p+7],16,-155497632),c=g(c,d,f,u,a[p+10],23,-1094730640),u=g(u,c,d,f,a[p+13],4,681279174),f=g(f,u,c,d,a[p+0],11,-358537222),d=g(d,f,u,c,a[p+3],16,-722521979),c=g(c,d,f,u,a[p+6],23,76029189),u=g(u,c,d,f,a[p+9],4,-640364487),f=g(f,u,c,d,a[p+12],11,-421815835),d=g(d,f,u,c,a[p+15],16,530742520),c=g(c,d,f,u,a[p+2],23,-995338651),u=_(u,c,d,f,a[p+0],6,-198630844),f=_(f,u,c,d,a[p+7],10,1126891415),d=_(d,f,u,c,a[p+14],15,-1416354905),c=_(c,d,f,u,a[p+5],21,-57434055),u=_(u,c,d,f,a[p+12],6,1700485571),f=_(f,u,c,d,a[p+3],10,-1894986606),d=_(d,f,u,c,a[p+10],15,-1051523),c=_(c,d,f,u,a[p+1],21,-2054922799),u=_(u,c,d,f,a[p+8],6,1873313359),f=_(f,u,c,d,a[p+15],10,-30611744),d=_(d,f,u,c,a[p+6],15,-1560198380),c=_(c,d,f,u,a[p+13],21,1309151649),u=_(u,c,d,f,a[p+4],6,-145523070),f=_(f,u,c,d,a[p+11],10,-1120210379),d=_(d,f,u,c,a[p+2],15,718787259),c=_(c,d,f,u,a[p+9],21,-343485551),u=u+x>>>0,c=c+w>>>0,d=d+b>>>0,f=f+A>>>0}return e.endian([u,c,d,f])};i._ff=function(o,s,a,l,u,c,d){var f=o+(s&a|~s&l)+(u>>>0)+d;return(f<<c|f>>>32-c)+s},i._gg=function(o,s,a,l,u,c,d){var f=o+(s&l|a&~l)+(u>>>0)+d;return(f<<c|f>>>32-c)+s},i._hh=function(o,s,a,l,u,c,d){var f=o+(s^a^l)+(u>>>0)+d;return(f<<c|f>>>32-c)+s},i._ii=function(o,s,a,l,u,c,d){var f=o+(a^(s|~l))+(u>>>0)+d;return(f<<c|f>>>32-c)+s},i._blocksize=16,i._digestsize=16,Ac.exports=function(o,s){if(o==null)throw new Error("Illegal argument "+o);var a=e.wordsToBytes(i(o,s));return s&&s.asBytes?a:s&&s.asString?r.bytesToString(a):e.bytesToHex(a)}})();var Ec=Ac.exports,P;(function(e){function t(c){return typeof c=="number"?c:void 0}e.readNumber=t;function n(c){return typeof c=="number"?Math.floor(c):void 0}e.readInt=n;function r(c){return typeof c=="string"?c:void 0}e.readString=r;function i(c){return typeof c=="boolean"?c:void 0}e.readBoolean=i;function o(c){return typeof c=="object"&&c!==null?c:void 0}e.readObject=o;function s(c,d){if(!!Array.isArray(c))return c.map(f=>d(f))}e.readArray=s;function a(c,d){var p;const f=(p=o(c))!=null?p:{};return Object.fromEntries(Object.entries(f).map(([m,v])=>[m,d(v)]))}e.readMap=a;function l(c,d,f){const p=d(c);return p?f(p):void 0}e.compose=l;function u(c,d){return typeof c!="string"?d[0]:d.includes(c)?c:d[0]}e.readEnum=u})(P||(P={}));function ar(e){let t=null;return()=>(t==null&&(t=e()),t)}function Rr(e,t,n){const r=e.get(t);if(r)return r;const i=n(t);return e.set(t,i),i}function Tt(e){return e*e}function mr(e,t,n){return Math.max(t,Math.min(n,e))}function zt(e,t,n){return t+e*(n-t)}function fi(e,t,n,r,i,o){return zt(t,zt(e,n,r),zt(e,i,o))}function Cc(e,t,n,r,i,o,s,a,l,u,c){return zt(n,fi(e,t,r,i,o,s),fi(e,t,a,l,u,c))}function lr(e,t,n){return e===0?t():e===1?n():t()+e*(n()-t())}function bo(e,t,n,r,i,o){return lr(t,()=>lr(e,n,r),()=>lr(e,i,o))}function Ic(e,t,n,r,i,o,s,a,l,u,c){return lr(n,()=>bo(e,t,r,i,o,s),()=>bo(e,t,a,l,u,c))}function Bi(e,t,n){return n<0?e:n>1?t:zt(n,e,t)}function Yo(e,t,n){return(e-t)/(n-t)}function ei(e){return e*e*e*(e*(e*6-15)+10)}function gr(e,t,n,r,i){return zt(Yo(e,t,n),r,i)}function Fi(e,t,n,r,i){return Bi(r,i,Yo(e,t,n))}function Mc(e,t,n){let r=t-e;for(;r>0;){const i=Math.floor(r/2),o=e+i;if(n(o)){r=i;continue}e=o+1,r-=i+1}return e}function Wo(e,t,n){let r=BigInt(e*3129871)^BigInt(n)*BigInt(116129781)^BigInt(t);return r=r*r*BigInt(42317861)+r*BigInt(11),r>>BigInt(16)}function pi(e,t,n,r,i,o,s,a){return BigInt(e)<<BigInt(56)|BigInt(t)<<BigInt(48)|BigInt(n)<<BigInt(40)|BigInt(r)<<BigInt(32)|BigInt(i)<<BigInt(24)|BigInt(o)<<BigInt(16)|BigInt(s)<<BigInt(8)|BigInt(a)}function xp(e){return(e&e-1)===0}function Ap(e){return e-=1,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>18,e|=e>>32,e+1}var mi;(function(e){function t(n){return typeof n=="object"&&n!==null&&"minValue"in n&&"maxValue"in n}e.is=t})(mi||(mi={}));var gi;(function(e){function t(i,o){var u,c,d,f;if(typeof i=="number")return new n(i);const s=(u=P.readObject(i))!=null?u:{},a=new r(o(s.coordinate)),l=(c=P.readArray(s.points,p=>{var m;return(m=P.readObject(p))!=null?m:{}}))!=null?c:[];if(l.length===0)return new n(0);for(const p of l){const m=(d=P.readNumber(p.location))!=null?d:0,v=t(p.value,o),g=(f=P.readNumber(p.derivative))!=null?f:0;a.addPoint(m,v,g)}return a}e.fromJson=t;class n{constructor(o){this.value=o}compute(){return this.value}min(){return this.value}max(){return this.value}mapAll(){return this}calculateMinMax(){}}e.Constant=n;class r{constructor(o,s=[],a=[],l=[]){this.coordinate=o,this.locations=s,this.values=a,this.derivatives=l,this.calculatedMin=Number.NEGATIVE_INFINITY,this.calculatedMax=Number.POSITIVE_INFINITY}compute(o){const s=this.coordinate.compute(o),a=Mc(0,this.locations.length,w=>s<this.locations[w])-1,l=this.locations.length-1;if(a<0)return this.values[0].compute(o)+this.derivatives[0]*(s-this.locations[0]);if(a===l)return this.values[l].compute(o)+this.derivatives[l]*(s-this.locations[l]);const u=this.locations[a],c=this.locations[a+1],d=this.derivatives[a],f=this.derivatives[a+1],p=(s-u)/(c-u),m=this.values[a].compute(o),v=this.values[a+1].compute(o),g=d*(c-u)-(v-m),_=-f*(c-u)+(v-m);return zt(p,m,v)+p*(1-p)*zt(p,g,_)}min(){return this.calculatedMin}max(){return this.calculatedMax}mapAll(o){return new r(o(this.coordinate),this.locations,this.values.map(s=>s.mapAll(o)),this.derivatives)}addPoint(o,s,a=0){return this.locations.push(o),this.values.push(typeof s=="number"?new e.Constant(s):s),this.derivatives.push(a),this}calculateMinMax(){if(!mi.is(this.coordinate))return;const o=this.locations.length-1;var s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;const l=this.coordinate.minValue(),u=this.coordinate.maxValue();for(const d of this.values)d.calculateMinMax();if(l<this.locations[0]){const d=r.linearExtend(l,this.locations,this.values[0].min(),this.derivatives,0),f=r.linearExtend(l,this.locations,this.values[0].max(),this.derivatives,0);s=Math.min(s,Math.min(d,f)),a=Math.max(a,Math.max(d,f))}if(u>this.locations[o]){const d=r.linearExtend(u,this.locations,this.values[o].min(),this.derivatives,o),f=r.linearExtend(u,this.locations,this.values[o].max(),this.derivatives,o);s=Math.min(s,Math.min(d,f)),a=Math.max(a,Math.max(d,f))}for(const d of this.values)s=Math.min(s,d.min()),a=Math.max(a,d.max());for(var c=0;c<o;++c){const d=this.locations[c],p=this.locations[c+1]-d,m=this.values[c],v=this.values[c+1],g=m.min(),_=m.max(),x=v.min(),w=v.max(),b=this.derivatives[c],A=this.derivatives[c+1];if(b!==0||A!==0){const S=b*p,I=A*p,k=Math.min(g,x),M=Math.max(_,w),N=S-w+g,L=S-x+_,F=-I+x-_,z=-I+w-g,oe=Math.min(N,F),le=Math.max(L,z);s=Math.min(s,k+.25*oe),a=Math.max(a,M+.25*le)}}this.calculatedMin=s,this.calculatedMax=a}static linearExtend(o,s,a,l,u){const c=l[u];return c==0?a:a+c*(o-s[u])}}e.MultiPoint=r})(gi||(gi={}));const At=class{constructor(e){this.seed=BigInt(0),this.setSeed(e)}fork(){return new At(this.nextLong())}forkPositional(){return new Oc(this.nextLong())}setSeed(e){this.seed=e^At.MULTIPLIER&At.MODULUS_MASK}advance(){this.seed=this.seed*At.MULTIPLIER+At.INCREMENT&At.MODULUS_MASK}consume(e){for(let t=0;t<e;t+=1)this.advance()}next(e){this.advance();const t=Number(this.seed>>BigInt(At.MODULUS_BITS-e));return t>2147483647?t-4294967296:t}nextInt(e){if(e===void 0)return this.next(32);if((e&e-1)==0)return Number(BigInt(e)*BigInt(this.next(31))>>BigInt(31));let t,n;for(;(t=this.next(31))-(n=t%e)+(e-1)<0;);return n}nextLong(){return(BigInt(this.next(32))<<BigInt(32))+BigInt(this.next(32))}nextFloat(){return this.next(24)*At.FLOAT_MULTIPLIER}nextDouble(){const e=this.next(30);return this.advance(),e*At.DOUBLE_MULTIPLIER}};let tt=At;tt.MODULUS_BITS=48;tt.MODULUS_MASK=BigInt("281474976710655");tt.MULTIPLIER=BigInt("25214903917");tt.INCREMENT=BigInt("11");tt.FLOAT_MULTIPLIER=1/Math.pow(2,24);tt.DOUBLE_MULTIPLIER=1/Math.pow(2,30);class Oc{constructor(t){this.seed=t}at(t,n,r){const i=Wo(t,n,r);return new tt(i^this.seed)}fromHashOf(t){const n=Ec(t,{asBytes:!0}),r=pi(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]);return new tt(r^this.seed)}seedKey(){return[this.seed,BigInt(0)]}}const ee=class{constructor(e){this.seed=[BigInt(0),BigInt(0)],this.seed=e}static create(e){return new ee(ee.upgradeSeedTo128bit(e))}static mixStafford13(e){return e=(e^e>>ee.BIGINT_30)*ee.STAFFORD_1&ee.MAX_ULONG,e=(e^e>>ee.BIGINT_27)*ee.STAFFORD_2&ee.MAX_ULONG,(e^e>>ee.BIGINT_31)&ee.MAX_ULONG}static upgradeSeedTo128bit(e){e<0&&(e+=ee.POW2_60);const t=e^ee.SILVER_RATIO_64,n=t+ee.GOLDEN_RATIO_64&ee.MAX_ULONG;return[ee.mixStafford13(t),ee.mixStafford13(n)]}static rotateLeft(e,t){return e<<t&ee.MAX_ULONG|e>>ee.BIGINT_64-t}setSeed(e){this.seed=ee.upgradeSeedTo128bit(e)}fork(){return new ee([this.next(),this.next()])}forkPositional(){return new Nc(this.next(),this.next())}next(){const e=this.seed[0];let t=this.seed[1];const n=ee.rotateLeft(e+t&ee.MAX_ULONG,ee.BIGINT_17)+e&ee.MAX_ULONG;return t^=e,this.seed=[ee.rotateLeft(e,ee.BIGINT_49)^t^t<<ee.BIGINT_21&ee.MAX_ULONG,ee.rotateLeft(t,ee.BIGINT_28)],n}nextLong(){let e=this.next();return e>ee.POW2_63&&(e-=ee.POW2_60),e}consume(e){let t=this.seed[0],n=this.seed[1];for(let r=0;r<e;r+=1)n^=t,t=ee.rotateLeft(t,ee.BIGINT_49)^n^n<<ee.BIGINT_21,n=ee.rotateLeft(n,ee.BIGINT_28);this.seed=[t,n]}nextBits(e){return this.next()>>BigInt(64-e)}nextInt(e){let t=this.next()&ee.MAX_UINT;if(e){const n=BigInt(e);let r=t*n,i=r&ee.MAX_UINT;if(i<n){const s=((~n&ee.MAX_UINT)+ee.BIGINT_1)%n;for(;i<s;)t=this.next()&ee.MAX_UINT,r=t*n,i=r&ee.MAX_UINT}const o=r>>ee.BIGINT_32;return Number(o)}else{let n=Number(t);return n>=2147483648&&(n-=4294967296),n}}nextFloat(){return Number(this.nextBits(24))*ee.FLOAT_MULTIPLIER}nextDouble(){return Number(this.nextBits(53))*ee.DOUBLE_MULTIPLIER}parityConfigString(){return"seedLo: "+this.seed[0]+", seedHi: "+this.seed[1]}};let Se=ee;Se.SILVER_RATIO_64=BigInt("7640891576956012809");Se.GOLDEN_RATIO_64=BigInt("-7046029254386353131");Se.FLOAT_MULTIPLIER=1/Math.pow(2,24);Se.DOUBLE_MULTIPLIER=11102230246251565e-32;Se.BIGINT_1=BigInt(1);Se.BIGINT_17=BigInt(17);Se.BIGINT_21=BigInt(21);Se.BIGINT_27=BigInt(27);Se.BIGINT_28=BigInt(28);Se.BIGINT_30=BigInt(30);Se.BIGINT_31=BigInt(31);Se.BIGINT_32=BigInt(32);Se.BIGINT_49=BigInt(49);Se.BIGINT_64=BigInt(64);Se.STAFFORD_1=BigInt("-4658895280553007687");Se.STAFFORD_2=BigInt("-7723592293110705685");Se.MAX_ULONG=BigInt("0xFFFFFFFFFFFFFFFF");Se.POW2_60=BigInt("0x10000000000000000");Se.POW2_63=BigInt("0x8000000000000000");Se.MAX_UINT=BigInt(4294967295);class Nc{constructor(t,n){this.seedLo=t,this.seedHi=n}at(t,n,r){const o=Wo(t,n,r)^this.seedLo;return new Se([o,this.seedHi])}fromHashOf(t){const n=Ec(t,{asBytes:!0}),r=pi(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),i=pi(n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);return new Se([r^this.seedLo,i^this.seedHi])}seedKey(){return[this.seedLo,this.seedHi]}}const Lt=class{constructor(e){this.xo=e.nextDouble()*256,this.yo=e.nextDouble()*256,this.zo=e.nextDouble()*256,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 n=e.nextInt(256-t),r=this.p[t];this.p[t]=this.p[t+n],this.p[t+n]=r}}sample2D(e,t){let n,r,i;const o=(e+t)*Lt.F2,s=Math.floor(e+o),a=s-(n=(s+(r=Math.floor(t+o)))*Lt.G2),l=e-a;let u,c;l>(i=t-(r-n))?(u=1,c=0):(u=0,c=1);const d=l-u+Lt.G2,f=i-c+Lt.G2,p=l-1+2*Lt.G2,m=i-1+2*Lt.G2,v=s&255,g=r&255,_=this.P(v+this.P(g))%12,x=this.P(v+u+this.P(g+c))%12,w=this.P(v+1+this.P(g+1))%12,b=this.getCornerNoise3D(_,l,i,0,.5),A=this.getCornerNoise3D(x,d,f,0,.5),S=this.getCornerNoise3D(w,p,m,0,.5);return 70*(b+A+S)}sample(e,t,n){const r=(e+t+n)*.3333333333333333,i=Math.floor(e+r),o=Math.floor(t+r),s=Math.floor(n+r),a=(i+o+s)*.16666666666666666,l=e-(i-a),u=t-(o-a),c=n-(s-a);let d,f,p,m,v,g;l>=u?u>=c?(d=1,f=0,p=0,m=1,v=1,g=0):l>=c?(d=1,f=0,p=0,m=1,v=0,g=1):(d=0,f=0,p=1,m=1,v=0,g=1):u<c?(d=0,f=0,p=1,m=0,v=1,g=1):l<c?(d=0,f=1,p=0,m=0,v=1,g=1):(d=0,f=1,p=0,m=1,v=1,g=0);const _=l-d+.16666666666666666,x=u-f+.16666666666666666,w=c-p+.16666666666666666,b=l-m+.3333333333333333,A=u-v+.3333333333333333,S=c-g+.3333333333333333,I=l-.5,k=u-.5,M=c-.5,N=i&255,L=o&255,F=s&255,z=this.P(N+this.P(L+this.P(F)))%12,oe=this.P(N+d+this.P(L+f+this.P(F+p)))%12,le=this.P(N+m+this.P(L+v+this.P(F+g)))%12,T=this.P(N+1+this.P(L+1+this.P(F+1)))%12,$=this.getCornerNoise3D(z,l,u,c,.6),H=this.getCornerNoise3D(oe,_,x,w,.6),C=this.getCornerNoise3D(le,b,A,S,.6),y=this.getCornerNoise3D(T,I,k,M,.6);return 32*($+H+C+y)}P(e){return this.p[e&255]}getCornerNoise3D(e,t,n,r,i){let o,s=i-t*t-n*n-r*r;return s<0?o=0:(s*=s,o=s*s*Lt.gradDot(e,t,n,r)),o}static gradDot(e,t,n,r){const i=Lt.GRADIENT[e&15];return i[0]*t+i[1]*n+i[2]*r}};let Je=Lt;Je.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]];Je.F2=.5*(Math.sqrt(3)-1);Je.G2=(3-Math.sqrt(3))/6;class xo{constructor(t){this.xo=t.nextDouble()*256,this.yo=t.nextDouble()*256,this.zo=t.nextDouble()*256,this.p=Array(256);for(let n=0;n<256;n+=1)this.p[n]=n>127?n-256:n;for(let n=0;n<256;n+=1){const r=t.nextInt(256-n),i=this.p[n];this.p[n]=this.p[n+r],this.p[n+r]=i}}sample(t,n,r,i=0,o=0){const s=t+this.xo,a=n+this.yo,l=r+this.zo,u=Math.floor(s),c=Math.floor(a),d=Math.floor(l),f=s-u,p=a-c,m=l-d;let v=0;if(i!==0){const g=o>=0&&o<p?o:p;v=Math.floor(g/i+1e-7)*i}return this.sampleAndLerp(u,c,d,f,p-v,m,p)}sampleAndLerp(t,n,r,i,o,s,a){const l=this.P(t),u=this.P(t+1),c=this.P(l+n),d=this.P(l+n+1),f=this.P(u+n),p=this.P(u+n+1),m=Je.gradDot(this.P(c+r),i,o,s),v=Je.gradDot(this.P(f+r),i-1,o,s),g=Je.gradDot(this.P(d+r),i,o-1,s),_=Je.gradDot(this.P(p+r),i-1,o-1,s),x=Je.gradDot(this.P(c+r+1),i,o,s-1),w=Je.gradDot(this.P(f+r+1),i-1,o,s-1),b=Je.gradDot(this.P(d+r+1),i,o-1,s-1),A=Je.gradDot(this.P(p+r+1),i-1,o-1,s-1),S=ei(i),I=ei(a),k=ei(s);return Cc(S,I,k,m,v,g,_,x,w,b,A)}P(t){return this.p[t&255]&255}}class ye{constructor(t,n,r){if(t instanceof Se){const i=t.forkPositional();this.noiseLevels=Array(r.length);for(let o=0;o<r.length;o++)if(r[o]!==0){const s=n+o;this.noiseLevels[o]=new xo(i.fromHashOf("octave_"+s))}}else{if(1-n<r.length)throw new Error("Positive octaves are not allowed when using LegacyRandom");this.noiseLevels=Array(r.length);for(let i=-n;i>=0;i-=1)i<r.length&&r[i]!==0?this.noiseLevels[i]=new xo(t):t.consume(262)}this.amplitudes=r,this.lowestFreqInputFactor=Math.pow(2,n),this.lowestFreqValueFactor=Math.pow(2,r.length-1)/(Math.pow(2,r.length)-1),this.maxValue=this.edgeValue(2)}sample(t,n,r,i=0,o=0,s=!1){let a=0,l=this.lowestFreqInputFactor,u=this.lowestFreqValueFactor;for(let c=0;c<this.noiseLevels.length;c+=1){const d=this.noiseLevels[c];d&&(a+=this.amplitudes[c]*u*d.sample(ye.wrap(t*l),s?-d.yo:ye.wrap(n*l),ye.wrap(r*l),i*l,o*l)),l*=2,u/=2}return a}getOctaveNoise(t){return this.noiseLevels[this.noiseLevels.length-1-t]}edgeValue(t){let n=0,r=this.lowestFreqValueFactor;for(let i=0;i<this.noiseLevels.length;i+=1)this.noiseLevels[i]&&(n+=this.amplitudes[i]*t*r),r/=2;return n}static wrap(t){return t-Math.floor(t/33554432+.5)*33554432}}class Tc{constructor(t,n,r,i,o,s){this.xzScale=n,this.yScale=r,this.xzFactor=i,this.yFactor=o,this.smearScaleMultiplier=s,this.minLimitNoise=new ye(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.maxLimitNoise=new ye(t,-15,[1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0]),this.mainNoise=new ye(t,-7,[1,1,1,1,1,0,0,0]),this.xzMultiplier=684.412*n,this.yMultiplier=684.412*r,this.maxValue=this.minLimitNoise.edgeValue(this.yScale+2)}sample(t,n,r){const i=t*this.xzMultiplier,o=n*this.yMultiplier,s=r*this.xzMultiplier,a=i/this.xzFactor,l=o/this.yFactor,u=s/this.xzFactor,c=this.yMultiplier*this.smearScaleMultiplier,d=c/this.yFactor;let f,p=0,m=1;for(let _=0;_<8;_+=1){if(f=this.mainNoise.getOctaveNoise(_),f){const x=ye.wrap(a*m),w=ye.wrap(l*m),b=ye.wrap(u*m);p+=f.sample(x,w,b,d*m,l*m)/m}m/=2}p=(p/10+1)/2,m=1;let v=0,g=0;for(let _=0;_<16;_+=1){const x=ye.wrap(i*m),w=ye.wrap(o*m),b=ye.wrap(s*m),A=c*m;p<1&&(f=this.minLimitNoise.getOctaveNoise(_))&&(v+=f.sample(x,w,b,A,o*m)/m),p>0&&(f=this.maxLimitNoise.getOctaveNoise(_))&&(g+=f.sample(x,w,b,A,o*m)/m),m/=2}return Bi(v/512,g/512,p)/128}}const ti=class{constructor(e,{firstOctave:t,amplitudes:n}){this.first=new ye(e,t,n),this.second=new ye(e,t,n);let r=1/0,i=-1/0;for(let s=0;s<n.length;s+=1)n[s]!==0&&(r=Math.min(r,s),i=Math.max(i,s));const o=.1*(1+1/(i-r+1));this.valueFactor=1/6/o,this.maxValue=(this.first.maxValue+this.second.maxValue)*this.valueFactor}sample(e,t,n){const r=e*ti.INPUT_FACTOR,i=t*ti.INPUT_FACTOR,o=n*ti.INPUT_FACTOR;return(this.first.sample(e,t,n)+this.second.sample(r,i,o))*this.valueFactor}};let Pr=ti;Pr.INPUT_FACTOR=1.0181268882175227;var jn;(function(e){function t(r,i){return{firstOctave:r,amplitudes:i}}e.create=t;function n(r){var o,s,a;const i=(o=P.readObject(r))!=null?o:{};return{firstOctave:(s=P.readInt(i.firstOctave))!=null?s:0,amplitudes:(a=P.readArray(i.amplitudes,l=>{var u;return(u=P.readNumber(l))!=null?u:0}))!=null?a:[]}}e.fromJson=n})(jn||(jn={}));class kp{constructor(t,n){const r=n[n.length-1],o=-n[0]+r+1,s=new Set(n),a=new Je(t);this.noiseLevels=Array(o),r>=0&&r<o&&s.has(0)&&(this.noiseLevels[r]=a);for(let l=r+1;l<o;l+=1)l>=0&&s.has(r-l)?this.noiseLevels[l]=new Je(t):t.consume(262);if(r>0)throw new Error("Positive octaves are not allowed");this.highestFreqInputFactor=Math.pow(2,r),this.highestFreqValueFactor=1/(Math.pow(2,o)-1)}sample(t,n,r){let i=0,o=this.highestFreqInputFactor,s=this.highestFreqValueFactor;for(let a=0;a<this.noiseLevels.length;a+=1){const l=this.noiseLevels[a];l&&(i+=s*l.sample2D(t*o+(r?l.xo:0),n*o+(r?l.yo:0))),o/=2,s*=2}return i}}var ct;(function(e){e.UP="up",e.DOWN="down",e.NORTH="north",e.EAST="east",e.SOUTH="south",e.WEST="west"})(ct||(ct={}));const Sp={[ct.UP]:[0,1,0],[ct.DOWN]:[0,-1,0],[ct.NORTH]:[0,0,-1],[ct.EAST]:[1,0,0],[ct.SOUTH]:[0,0,1],[ct.WEST]:[-1,0,0]};(function(e){e.ALL=[e.UP,e.DOWN,e.NORTH,e.EAST,e.SOUTH,e.WEST];function t(n){return Sp[n]}e.normal=t})(ct||(ct={}));var Ke;(function(e){function t(s,a,l){return[s,a,l]}e.create=t,e.ZERO=e.create(0,0,0);function n(s,a,l,u){return[s[0]+a,s[1]+l,s[2]+u]}e.offset=n;function r(s,a){return e.offset(s,...ct.normal(a))}e.towards=r;function i(s,a){return s===a?!0:s[0]===a[0]&&s[1]===a[1]&&s[2]===a[2]}e.equals=i;function o(s){return s[0]*s[0]+s[1]*s[1]+s[2]*s[2]}e.magnitude=o})(Ke||(Ke={}));function Tn(e,t,n){if(!e[t])throw new Error(`Missing ${t} tag`);if(e[t].type!==n)throw new Error(`Expected ${t} to be of type ${n}, but found ${e[t].type}`);return e[t].value}function Ur(e,t,n,r){const i=Tn(e,t,"list");if(i.type!==n)throw new Error(`Expected ${t} to be a list of ${n}s, but found ${i.type}s`);if(r&&i.value.length!==r)throw new Error(`Expected ${t} to be a list of length ${r}, but found length ${i.value.length}`);return i.value}function Lc(e,t){try{return e()}catch{return t}}const ni=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?!0:this.namespace===e.namespace&&this.path===e.path}toString(){return`${this.namespace}:${this.path}`}static create(e){return new ni(this.DEFAULT_NAMESPACE,e)}static parse(e){const t=e.indexOf(this.SEPARATOR);if(t>=0){const n=t>=1?e.substring(0,t):this.DEFAULT_NAMESPACE,r=e.substring(t+1);return new ni(n,r)}return new ni(this.DEFAULT_NAMESPACE,e)}};let be=ni;be.DEFAULT_NAMESPACE="minecraft";be.SEPARATOR=":";const kt=class{constructor(e,t={}){this.properties=t,this.name=typeof e=="string"?be.parse(e):e}getName(){return this.name}getProperties(){return this.properties}getProperty(e){return this.properties[e]}isFluid(){return this.is(kt.WATER)||this.is(kt.LAVA)}equals(e){return this.name.equals(e.name)?Object.keys(this.properties).every(t=>e.properties[t]===this.properties[t]):!1}is(e){return this.name.equals(e.name)}toString(){return Object.keys(this.properties).length===0?this.name.toString():`${this.name.toString()}[${Object.entries(this.properties).map(([e,t])=>e+"="+t).join(",")}]`}static fromNbt(e){const t=be.parse(Tn(e.value,"Name","string")),n=Lc(()=>Tn(e.value,"Properties","compound"),{}),r=Object.keys(n).reduce((i,o)=>_e(Z({},i),{[o]:Tn(n,o,"string")}),{});return new kt(t,r)}static fromJson(e){var i,o;const t=(i=P.readObject(e))!=null?i:{},n=be.parse((o=P.readString(t.Name))!=null?o:kt.STONE.name.toString()),r=P.readMap(t.Properties,s=>{var a;return(a=P.readString(s))!=null?a:""});return new kt(n,r)}};let ge=kt;ge.AIR=new kt(be.create("air"));ge.STONE=new kt(be.create("stone"));ge.WATER=new kt(be.create("water"),{level:"0"});ge.LAVA=new kt(be.create("lava"),{level:"0"});const cr=class{constructor(e){this.minY=e,this.storage=Array(cr.SIZE).fill(0),this.palette=[ge.AIR]}get minBlockY(){return this.minY<<4}index(e,t,n){return(e<<8)+(t<<4)+n}getBlockState(e,t,n){var i;const r=this.storage[this.index(e,t,n)];return(i=this.palette[r])!=null?i:ge.AIR}setBlockState(e,t,n,r){let i=this.palette.findIndex(o=>o.equals(r));i===-1&&(i=this.palette.length,this.palette.push(r)),this.storage[this.index(e,t,n)]=i}};let zi=cr;zi.WIDTH=16;zi.SIZE=cr.WIDTH*cr.WIDTH*cr.WIDTH;class Ep{constructor(t,n,r){this.minY=t,this.height=n,this.pos=r,this.sections=Array(this.sectionsCount).fill(null)}get maxY(){return this.minY+this.height}get minSection(){return this.minY>>4}get maxSection(){return(this.maxY-1>>4)+1}get sectionsCount(){return this.maxSection-this.minSection}getSectionIndex(t){return(t>>4)-this.minSection}getBlockState(t){var s;const[n,r,i]=t,o=this.sections[this.getSectionIndex(r)];return(s=o==null?void 0:o.getBlockState(n&15,r&15,i&15))!=null?s:ge.AIR}setBlockState(t,n){const[r,i,o]=t,s=this.getSectionIndex(i);let a=this.sections[s];if(a===null){if(n.equals(ge.AIR))return;a=this.getOrCreateSection(s)}a.setBlockState(r&15,i&15,o&15,n)}getOrCreateSection(t){return this.sections[t]==null&&(this.sections[t]=new zi(this.minSection+t)),this.sections[t]}}var We;(function(e){function t(c,d){return[c,d]}e.create=t;function n(c){return[c[0]>>4,c[2]>>4]}e.fromBlockPos=n;function r(c){return[Number(c)&4294967295,Number(c>>BigInt(32))]}e.fromLong=r;function i(c){return o(c[0],c[1])}e.toLong=i;function o(c,d){return BigInt(c&4294967295)|BigInt(d&4294967295)<<BigInt(32)}e.asLong=o;function s(c){return c[0]<<4}e.minBlockX=s;function a(c){return c[1]<<4}e.minBlockZ=a;function l(c){return(c[0]<<4)+15}e.maxBlockX=l;function u(c){return(c[1]<<4)+15}e.maxBlockZ=u})(We||(We={}));var hn;(function(e){function t(i,o){return s=>typeof s=="string"?r(i,be.parse(s)):n(o(s))}e.parser=t;function n(i){return{value:()=>i,key:()=>{}}}e.direct=n;function r(i,o){return{value:()=>i.getOrThrow(o),key:()=>o}}e.reference=r})(hn||(hn={}));const qo=class{constructor(e,t){this.key=e,this.parser=t,this.storage=new Map,this.builtin=new Map}register(e,t,n){return this.storage.set(e.toString(),t),n&&this.builtin.set(e.toString(),t),hn.reference(this,e)}keys(){return[...this.storage.keys()].map(e=>be.parse(e))}get(e){return this.storage.get(e.toString())}getOrThrow(e){const t=this.storage.get(e.toString());if(t===void 0)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 qo(this.key,this.parser)}};let _i=qo;_i.REGISTRY=new qo(be.create("root"));class Zo{constructor(t,n=[],r=[]){this.size=t,this.palette=n,this.blocks=r,this.blocksMap=[],r.forEach(i=>{if(!this.isInside(i.pos))throw new Error(`Found block at ${i.pos} which is outside the structure bounds ${this.size}`);this.blocksMap[i.pos[0]*t[1]*t[2]+i.pos[1]*t[2]+i.pos[2]]=i})}getSize(){return this.size}addBlock(t,n,r,i){if(!this.isInside(t))throw new Error(`Cannot add block at ${t} outside the structure bounds ${this.size}`);const o=new ge(n,r);let s=this.palette.findIndex(a=>a.equals(o));return s===-1&&(s=this.palette.length,this.palette.push(o)),this.blocks.push({pos:t,state:s,nbt:i}),this.blocksMap[t[0]*this.size[1]*this.size[2]+t[1]*this.size[2]+t[2]]={pos:t,state:s,nbt:i},this}getBlocks(){return this.blocks.map(t=>({pos:t.pos,state:this.palette[t.state],nbt:t.nbt}))}getBlock(t){if(!this.isInside(t))return null;const n=this.blocksMap[t[0]*this.size[1]*this.size[2]+t[1]*this.size[2]+t[2]];return n?{pos:n.pos,state:this.palette[n.state],nbt:n.nbt}:null}isInside(t){return t[0]>=0&&t[0]<this.size[0]&&t[1]>=0&&t[1]<this.size[1]&&t[2]>=0&&t[2]<this.size[2]}static fromNbt(t){const n=Ur(t.value,"size","int",3),r=Ur(t.value,"palette","compound").map(o=>ge.fromNbt({name:"",value:o})),i=Ur(t.value,"blocks","compound").map(o=>{const s=Ur(o,"pos","int",3),a=Tn(o,"state","int"),l=Lc(()=>Tn(o,"nbt","compound"),void 0);return{pos:s,state:a,nbt:l}});return new Zo(n,r,i)}}var fn;(function(e){e.NOISE=t("worldgen/noise"),e.DENSITY_FUNCTION=t("worldgen/density_function");function t(n){const r=new _i(be.create(n));return _i.REGISTRY.register(r.key,r),r}})(fn||(fn={}));class ce{minValue(){return-this.maxValue()}mapAll(t){return t.map(this)}}(function(e){function t(C,y,E){return{x:C,y,z:E}}e.context=t;class n extends e{constructor(y){super(),this.input=y}compute(y){return this.transform(y,this.input.compute(y))}}const r=hn.parser(fn.NOISE,jn.fromJson);function i(C,y=i){var V,W,he,Ue,ft,Ge,Ye,Re,yt,pt,st,Te,en,Ot,K,Fe,Ae,fe,bt,nt;if(typeof C=="string")return new a(hn.reference(fn.DENSITY_FUNCTION,be.parse(C)));if(typeof C=="number")return new s(C);const E=(V=P.readObject(C))!=null?V:{},R=(W=P.readString(E.type))==null?void 0:W.replace(/^minecraft:/,"");switch(R){case"blend_alpha":return new l(1,0,1);case"blend_offset":return new l(0,-1/0,1/0);case"beardifier":return new l(0,-1/0,1/0);case"old_blended_noise":return new u((he=P.readNumber(E.xz_scale))!=null?he:1,(Ue=P.readNumber(E.y_scale))!=null?Ue:1,(ft=P.readNumber(E.xz_factor))!=null?ft:80,(Ge=P.readNumber(E.y_factor))!=null?Ge:160,(Ye=P.readNumber(E.smear_scale_multiplier))!=null?Ye:8);case"flat_cache":return new d(y(E.argument));case"interpolated":return new v(y(E.argument));case"cache_2d":return new p(y(E.argument));case"cache_once":return new m(y(E.argument));case"cache_all_in_cell":return new f(y(E.argument));case"noise":return new g((Re=P.readNumber(E.xz_scale))!=null?Re:1,(yt=P.readNumber(E.y_scale))!=null?yt:1,r(E.noise));case"end_islands":return new _;case"weird_scaled_sampler":return new b(y(E.input),P.readEnum(E.rarity_value_mapper,x),r(E.noise));case"shifted_noise":return new A(y(E.shift_x),y(E.shift_y),y(E.shift_z),(pt=P.readNumber(E.xz_scale))!=null?pt:1,(st=P.readNumber(E.y_scale))!=null?st:1,r(E.noise));case"range_choice":return new S(y(E.input),(Te=P.readNumber(E.min_inclusive))!=null?Te:0,(en=P.readNumber(E.max_exclusive))!=null?en:1,y(E.when_in_range),y(E.when_out_of_range));case"shift_a":return new k(r(E.argument));case"shift_b":return new M(r(E.argument));case"shift":return new N(r(E.argument));case"blend_density":return new L(y(E.argument));case"clamp":return new F(y(E.input),(Ot=P.readNumber(E.min))!=null?Ot:0,(K=P.readNumber(E.max))!=null?K:1);case"abs":case"square":case"cube":case"half_negative":case"quarter_negative":case"squeeze":return new oe(R,y(E.argument));case"add":case"mul":case"min":case"max":return new T(P.readEnum(R,le),y(E.argument1),y(E.argument2));case"spline":return new $(gi.fromJson(E.spline,y));case"constant":return new s((Fe=P.readNumber(E.argument))!=null?Fe:0);case"y_clamped_gradient":return new H((Ae=P.readInt(E.from_y))!=null?Ae:-4064,(fe=P.readInt(E.to_y))!=null?fe:4062,(bt=P.readNumber(E.from_value))!=null?bt:-4064,(nt=P.readNumber(E.to_value))!=null?nt:4062)}return s.ZERO}e.fromJson=i;const o=class extends e{constructor(C){super(),this.value=C}compute(){return this.value}minValue(){return this.value}maxValue(){return this.value}};let s=o;s.ZERO=new o(0),s.ONE=new o(1),e.Constant=s;class a extends e{constructor(y){super(),this.holder=y}compute(y){return this.holder.value().compute(y)}minValue(){return this.holder.value().minValue()}maxValue(){return this.holder.value().maxValue()}}e.HolderHolder=a;class l extends e.Constant{constructor(y,E,R){super(y),this.min=E,this.max=R}minValue(){return this.min}maxValue(){return this.max}}e.ConstantMinMax=l;class u extends e{constructor(y,E,R,V,W,he){super(),this.xzScale=y,this.yScale=E,this.xzFactor=R,this.yFactor=V,this.smearScaleMultiplier=W,this.blendedNoise=he}compute(y){var E,R;return(R=(E=this.blendedNoise)==null?void 0:E.sample(y.x,y.y,y.z))!=null?R:0}maxValue(){var y,E;return(E=(y=this.blendedNoise)==null?void 0:y.maxValue)!=null?E:0}}e.OldBlendedNoise=u;class c extends e{constructor(y){super(),this.wrapped=y}minValue(){return this.wrapped.minValue()}maxValue(){return this.wrapped.maxValue()}}class d extends c{constructor(y){super(y),this.lastValue=0}compute(y){const E=y.x>>2,R=y.z>>2;return(this.lastQuartX!==E||this.lastQuartZ!==R)&&(this.lastValue=this.wrapped.compute(e.context(E<<2,0,R<<2)),this.lastQuartX=E,this.lastQuartZ=R),this.lastValue}mapAll(y){return y.map(new d(this.wrapped.mapAll(y)))}}e.FlatCache=d;class f extends c{constructor(y){super(y)}compute(y){return this.wrapped.compute(y)}mapAll(y){return y.map(new f(this.wrapped.mapAll(y)))}}e.CacheAllInCell=f;class p extends c{constructor(y){super(y),this.lastValue=0}compute(y){const E=y.x,R=y.z;return(this.lastBlockX!==E||this.lastBlockZ!==R)&&(this.lastValue=this.wrapped.compute(y),this.lastBlockX=E,this.lastBlockZ=R),this.lastValue}mapAll(y){return y.map(new p(this.wrapped.mapAll(y)))}}e.Cache2D=p;class m extends c{constructor(y){super(y),this.lastValue=0}compute(y){const E=y.x,R=y.y,V=y.z;return(this.lastBlockX!==E||this.lastBlockY!==R||this.lastBlockZ!==V)&&(this.lastValue=this.wrapped.compute(y),this.lastBlockX=E,this.lastBlockY=R,this.lastBlockZ=V),this.lastValue}mapAll(y){return y.map(new m(this.wrapped.mapAll(y)))}}e.CacheOnce=m;class v extends c{constructor(y,E=4,R=4){super(y),this.cellWidth=E,this.cellHeight=R,this.values=new Map}compute({x:y,y:E,z:R}){const V=this.cellWidth,W=this.cellHeight,he=(y%V+V)%V/V,Ue=(E%W+W)%W/W,ft=(R%V+V)%V/V,Ge=Math.floor(y/V)*V,Ye=Math.floor(E/W)*W,Re=Math.floor(R/V)*V;return Ic(he,Ue,ft,()=>this.computeCorner(Ge,Ye,Re),()=>this.computeCorner(Ge+V,Ye,Re),()=>this.computeCorner(Ge,Ye+W,Re),()=>this.computeCorner(Ge+V,Ye+W,Re),()=>this.computeCorner(Ge,Ye,Re+V),()=>this.computeCorner(Ge+V,Ye,Re+V),()=>this.computeCorner(Ge,Ye+W,Re+V),()=>this.computeCorner(Ge+V,Ye+W,Re+V))}computeCorner(y,E,R){return Rr(this.values,`${y} ${E} ${R}`,()=>this.wrapped.compute(e.context(y,E,R)))}mapAll(y){return y.map(new v(this.wrapped.mapAll(y)))}withCellSize(y,E){return new v(this.wrapped,y,E)}}e.Interpolated=v;class g extends e{constructor(y,E,R,V){super(),this.xzScale=y,this.yScale=E,this.noiseData=R,this.noise=V}compute(y){var E,R;return(R=(E=this.noise)==null?void 0:E.sample(y.x*this.xzScale,y.y*this.yScale,y.z*this.xzScale))!=null?R:0}maxValue(){var y,E;return(E=(y=this.noise)==null?void 0:y.maxValue)!=null?E:2}}e.Noise=g;class _ extends e{compute(){return 0}minValue(){return-.84375}maxValue(){return .5625}}const x=["type_1","type_2"],w=class extends n{constructor(C,y,E,R){super(C),this.rarityValueMapper=y,this.noiseData=E,this.noise=R,this.mapper=w.ValueMapper[this.rarityValueMapper]}transform(C,y){if(!this.noise)return 0;const E=this.mapper(y);return E*Math.abs(this.noise.sample(C.x/E,C.y/E,C.z/E))}mapAll(C){return C.map(new w(this.input.mapAll(C),this.rarityValueMapper,this.noiseData,this.noise))}minValue(){return 0}maxValue(){return this.rarityValueMapper==="type_1"?2:3}static rarityValueMapper1(C){return C<-.5?.75:C<0?1:C<.5?1.5:2}static rarityValueMapper2(C){return C<-.75?.5:C<-.5?.75:C<.5?1:C<.75?2:3}};let b=w;b.ValueMapper={type_1:w.rarityValueMapper1,type_2:w.rarityValueMapper2},e.WeirdScaledSampler=b;class A extends g{constructor(y,E,R,V,W,he,Ue){super(V,W,he,Ue),this.shiftX=y,this.shiftY=E,this.shiftZ=R}compute(y){var W,he;const E=y.x*this.xzScale+this.shiftX.compute(y),R=y.y*this.yScale+this.shiftY.compute(y),V=y.z*this.xzScale+this.shiftZ.compute(y);return(he=(W=this.noise)==null?void 0:W.sample(E,R,V))!=null?he:0}mapAll(y){return y.map(new A(this.shiftX.mapAll(y),this.shiftY.mapAll(y),this.shiftZ.mapAll(y),this.xzScale,this.yScale,this.noiseData,this.noise))}}e.ShiftedNoise=A;class S extends e{constructor(y,E,R,V,W){super(),this.input=y,this.minInclusive=E,this.maxExclusive=R,this.whenInRange=V,this.whenOutOfRange=W}compute(y){const E=this.input.compute(y);return this.minInclusive<=E&&E<this.maxExclusive?this.whenInRange.compute(y):this.whenOutOfRange.compute(y)}mapAll(y){return y.map(new S(this.input.mapAll(y),this.minInclusive,this.maxExclusive,this.whenInRange.mapAll(y),this.whenOutOfRange.mapAll(y)))}minValue(){return Math.min(this.whenInRange.minValue(),this.whenOutOfRange.minValue())}maxValue(){return Math.max(this.whenInRange.maxValue(),this.whenOutOfRange.maxValue())}}e.RangeChoice=S;class I extends e{constructor(y,E){super(),this.noiseData=y,this.offsetNoise=E}compute(y){var E,R;return(R=(E=this.offsetNoise)==null?void 0:E.sample(y.x*.25,y.y*.25,y.z*.25))!=null?R:0}maxValue(){var y,E;return((E=(y=this.offsetNoise)==null?void 0:y.maxValue)!=null?E:2)*4}}e.ShiftNoise=I;class k extends I{constructor(y,E){super(y,E)}compute(y){return super.compute(e.context(y.x,0,y.z))}withNewNoise(y){return new k(this.noiseData,y)}}e.ShiftA=k;class M extends I{constructor(y,E){super(y,E)}compute(y){return super.compute(e.context(y.z,y.x,0))}withNewNoise(y){return new M(this.noiseData,y)}}e.ShiftB=M;class N extends I{constructor(y,E){super(y,E)}withNewNoise(y){return new N(this.noiseData,y)}}e.Shift=N;class L extends n{constructor(y){super(y)}transform(y,E){return E}mapAll(y){return y.map(new L(this.input.mapAll(y)))}minValue(){return-1/0}maxValue(){return 1/0}}e.BlendDensity=L;class F extends n{constructor(y,E,R){super(y),this.min=E,this.max=R}transform(y,E){return mr(E,this.min,this.max)}mapAll(y){return y.map(new F(this.input.mapAll(y),this.min,this.max))}minValue(){return this.min}maxValue(){return this.max}}e.Clamp=F;const z=class extends n{constructor(C,y,E,R){super(y),this.type=C,this.min=E,this.max=R,this.transformer=z.MappedTypes[this.type]}transform(C,y){return this.transformer(y)}mapAll(C){return C.map(new z(this.type,this.input.mapAll(C)))}minValue(){var C;return(C=this.min)!=null?C:-1/0}maxValue(){var C;return(C=this.max)!=null?C:1/0}withMinMax(){const C=this.input.minValue();let y=this.transformer(C),E=this.transformer(this.input.maxValue());return(this.type==="abs"||this.type==="square")&&(E=Math.max(y,E),y=Math.max(0,C)),new z(this.type,this.input,y,E)}};let oe=z;oe.MappedTypes={abs:C=>Math.abs(C),square:C=>C*C,cube:C=>C*C*C,half_negative:C=>C>0?C:C*.5,quarter_negative:C=>C>0?C:C*.25,squeeze:C=>{const y=mr(C,-1,1);return y/2-y*y*y/24}},e.Mapped=oe;const le=["add","mul","min","max"];class T extends e{constructor(y,E,R,V,W){super(),this.type=y,this.argument1=E,this.argument2=R,this.min=V,this.max=W}compute(y){const E=this.argument1.compute(y);switch(this.type){case"add":return E+this.argument2.compute(y);case"mul":return E===0?0:E*this.argument2.compute(y);case"min":return E<this.argument2.minValue()?E:Math.min(E,this.argument2.compute(y));case"max":return E>this.argument2.maxValue()?E:Math.max(E,this.argument2.compute(y))}}mapAll(y){return y.map(new T(this.type,this.argument1.mapAll(y),this.argument2.mapAll(y)))}minValue(){var y;return(y=this.min)!=null?y:-1/0}maxValue(){var y;return(y=this.max)!=null?y:1/0}withMinMax(){const y=this.argument1.minValue(),E=this.argument2.minValue(),R=this.argument1.maxValue(),V=this.argument2.maxValue();(this.type==="min"||this.type==="max")&&(y>=V||E>=R)&&console.warn(`Creating a ${this.type} function between two non-overlapping inputs`);let W,he;switch(this.type){case"add":W=y+E,he=R+V;break;case"mul":W=y>0&&E>0?y*E||0:R<0&&V<0?R*V||0:Math.min(y*V||0,E*R||0),he=y>0&&E>0?R*V||0:R<0&&V<0?y*E||0:Math.max(y*E||0,R*V||0);break;case"min":W=Math.min(y,E),he=Math.min(R,V);break;case"max":W=Math.max(y,E),he=Math.max(R,V);break}return new T(this.type,this.argument1,this.argument2,W,he)}}e.Ap2=T;class $ extends e{constructor(y){super(),this.spline=y}compute(y){return this.spline.compute(y)}mapAll(y){const E=this.spline.mapAll(R=>R instanceof e?R.mapAll(y):R);return E.calculateMinMax(),y.map(new $(E))}minValue(){return this.spline.min()}maxValue(){return this.spline.max()}}e.Spline=$;class H extends e{constructor(y,E,R,V){super(),this.fromY=y,this.toY=E,this.fromValue=R,this.toValue=V}compute(y){return Fi(y.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=H})(ce||(ce={}));class _r{constructor(t,n){this.level=t,this.type=n}at(t){return t<this.level?this.type:ge.AIR}}var vi;(function(e){function t(n){return{compute({x:r,y:i,z:o},s){if(!(s>0))return n(r,i,o).at(i)}}}e.createDisabled=t})(vi||(vi={}));const mt=class{constructor(e,t,n,r,i,o,s,a,l,u){this.noiseChunk=e,this.barrierNoise=n,this.fluidLevelFloodednessNoise=r,this.fluidLevelSpreadNoise=i,this.lavaNoise=o,this.random=s,this.globalFluidPicker=u,this.minGridX=this.gridX(We.minBlockX(t))-1,this.gridSizeX=this.gridX(We.maxBlockX(t))+1-this.minGridX+1,this.minGridY=this.gridY(a)-1,this.minGridZ=this.gridZ(We.minBlockZ(t))-1,this.gridSizeZ=this.gridZ(We.maxBlockZ(t))+1-this.minGridZ+1;const c=this.gridY(a+l)+1-this.minGridY+1;this.gridSize=this.gridSizeX*c*this.gridSizeZ,this.aquiferCache=Array(this.gridSize).fill(void 0),this.aquiferLocationCache=Array(this.gridSize).fill(Ke.ZERO)}compute({x:e,y:t,z:n},r){if(r<=0){if(this.globalFluidPicker(e,t,n).at(t).is(ge.LAVA))return ge.LAVA;{const i=this.gridX(e-5),o=this.gridY(t+1),s=this.gridZ(n-5);let a=Number.MAX_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,c=Ke.ZERO,d=Ke.ZERO,f=Ke.ZERO;for(let b=0;b<=1;b+=1)for(let A=-1;A<=1;A+=1)for(let S=0;S<=1;S+=1){const I=this.getLocation(i+b,o+A,s+S),k=Ke.magnitude(I);a>=k?(f=d,d=c,c=I,u=l,l=a,a=k):l>=k?(f=d,d=I,u=l,l=k):u>=k&&(f=I,u=k)}const p=this.getStatus(c),m=this.getStatus(d),v=this.getStatus(f),g=mt.similarity(a,l),_=mt.similarity(a,u),x=mt.similarity(l,u);let w;if(p.at(t).is(ge.WATER)&&this.globalFluidPicker(e,t-1,n).at(t-1).is(ge.LAVA))w=1;else if(g>-1){const b=ar(()=>this.barrierNoise.compute(ce.context(e,t*.5,n))),A=this.calculatePressure(t,p,m,b),S=this.calculatePressure(t,p,v,b),I=this.calculatePressure(t,m,v,b),k=Math.max(A,S*Math.max(0,_),I*Math.max(x));w=Math.max(0,2*Math.max(0,g)*k)}else w=0;if(r+w<=0)return p.at(t)}}}static similarity(e,t){return 1-Math.abs(t-e)/25}calculatePressure(e,t,n,r){const i=t.at(e),o=n.at(e);if(i.is(ge.LAVA)&&o.is(ge.WATER)||i.is(ge.WATER)&&o.is(ge.LAVA))return 1;const s=Math.abs(t.level-n.level);if(s===0)return 0;const a=(t.level+n.level)/2,l=e+.5-a,u=s/2-Math.abs(l),c=l>0?u>0?u/1.5:u/2.5:u>-3?(u+3)/3:(u+3)/10;return c<-2||c>2?c:c+r()}getStatus(e){const[t,n,r]=e,i=this.getIndex(this.gridX(t),this.gridY(n),this.gridZ(r)),o=this.aquiferCache[i];if(o!==void 0)return o;const s=this.computeStatus(t,n,r);return this.aquiferCache[i]=s,s}computeStatus(e,t,n){const r=this.globalFluidPicker(e,t,n);let i=Number.MAX_SAFE_INTEGER,o=!1;for(const[p,m]of mt.SURFACE_SAMPLING){const v=e+(m<<4),g=n+(m<<4),_=this.noiseChunk.getPreliminarySurfaceLevel(v,g);i=Math.min(i,_);const x=p===0&&m===0;if(x&&t-12>_+8)return r;if(x||t+12>_+8){const w=this.globalFluidPicker(v,_+8,g);if(!w.at(_+8).is(ge.AIR)){if(x)return w;o=!0}}}const s=o?Fi(i+8-t,0,64,1,0):0,a=mr(this.fluidLevelFloodednessNoise.compute(ce.context(e,t*.67,n)),-1,1);if(a>gr(s,1,0,-.3,.8))return r;if(a<=gr(s,1,0,-.8,.4))return new _r(Number.MIN_SAFE_INTEGER,r.type);const l=Math.floor(t/40),u=this.fluidLevelSpreadNoise.compute(ce.context(Math.floor(e/16),l,Math.floor(n/16))),c=l*40+20+Math.floor(u/3)*3,d=Math.min(i,c),f=this.getFluidType(e,t,n,r.type,c);return new _r(d,f)}getFluidType(e,t,n,r,i){if(i<=-10){const o=this.lavaNoise.compute(ce.context(Math.floor(e/64),Math.floor(t/40),Math.floor(n/64)));if(Math.abs(o)>.3)return ge.LAVA}return r}getLocation(e,t,n){const r=this.getIndex(e,t,n),i=this.aquiferLocationCache[r];if(Ke.equals(i,Ke.ZERO))return i;const o=this.random.at(e,t,n),s=Ke.create(e*mt.X_SPACING+o.nextInt(10),t*mt.Y_SPACING+o.nextInt(9),n*mt.Z_SPACING+o.nextInt(10));return this.aquiferLocationCache[r]=s,s}getIndex(e,t,n){const r=e-this.minGridX,i=t-this.minGridY,o=n-this.minGridZ,s=(i*this.gridSizeZ+o)*this.gridSizeX+r;if(s<0||s>=this.gridSize)throw new Error(`Invalid aquifer index at ${e} ${t} ${n}: 0 <= ${s} < ${this.gridSize}`);return s}gridX(e){return Math.floor(e/mt.X_SPACING)}gridY(e){return Math.floor(e/mt.Y_SPACING)}gridZ(e){return Math.floor(e/mt.Z_SPACING)}};let $r=mt;$r.X_SPACING=16;$r.Y_SPACING=12;$r.Z_SPACING=16;$r.SURFACE_SAMPLING=[[-2,-1],[-1,-1],[0,-1],[1,-1],[-3,0],[-2,0],[-1,0],[0,0],[1,0],[-2,1],[-1,1],[0,1],[1,1]];var vr;(function(e){function n(v,g,_,x,w,b){return new a(v,g,_,x,w,b)}e.target=n;function r(v,g,_,x,w,b,A){return new s(i(v),i(g),i(_),i(x),i(w),i(b),A)}e.parameters=r;function i(v,g){return typeof v=="number"?new o(v,g!=null?g:v):v}e.param=i;class o{constructor(g,_){this.min=g,this.max=_}distance(g){const _=(typeof g=="number"?g:g.min)-this.max,x=this.min-(typeof g=="number"?g:g.max);return _>0?_:Math.max(x,0)}union(g){return new o(Math.min(this.min,g.min),Math.max(this.max,g.max))}static fromJson(g){var w;if(typeof g=="number")return new o(g,g);const[_,x]=(w=P.readArray(g,b=>P.readNumber(b)))!=null?w:[];return new o(_!=null?_:0,x!=null?x:0)}}e.Param=o;class s{constructor(g,_,x,w,b,A,S){this.temperature=g,this.humidity=_,this.continentalness=x,this.erosion=w,this.depth=b,this.weirdness=A,this.offset=S}fittness(g){return Tt(this.temperature.distance(g.temperature))+Tt(this.humidity.distance(g.humidity))+Tt(this.continentalness.distance(g.continentalness))+Tt(this.erosion.distance(g.erosion))+Tt(this.depth.distance(g.depth))+Tt(this.weirdness.distance(g.weirdness))+Tt(this.offset-g.offset)}space(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,new o(this.offset,this.offset)]}static fromJson(g){var x,w;const _=(x=P.readObject(g))!=null?x:{};return new s(o.fromJson(_.temperature),o.fromJson(_.humidity),o.fromJson(_.continentalness),o.fromJson(_.erosion),o.fromJson(_.depth),o.fromJson(_.weirdness),(w=P.readInt(_.offset))!=null?w:0)}}e.ParamPoint=s;class a{constructor(g,_,x,w,b,A){this.temperature=g,this.humidity=_,this.continentalness=x,this.erosion=w,this.depth=b,this.weirdness=A}get offset(){return 0}toArray(){return[this.temperature,this.humidity,this.continentalness,this.erosion,this.depth,this.weirdness,this.offset]}}e.TargetPoint=a;class l{constructor(g){this.things=g,this.index=new d(g)}find(g){return this.index.search(g,(_,x)=>_.distance(x))}}e.Parameters=l;class u{constructor(g,_,x,w,b,A){this.temperature=g,this.humidity=_,this.continentalness=x,this.erosion=w,this.depth=b,this.weirdness=A}static fromRouter(g){return new e.Sampler(g.temperature,g.vegetation,g.continents,g.erosion,g.depth,g.ridges)}sample(g,_,x){const w=ce.context(g<<2,_<<2,x<<2);return e.target(this.temperature.compute(w),this.humidity.compute(w),this.continentalness.compute(w),this.erosion.compute(w),this.depth.compute(w),this.weirdness.compute(w))}}e.Sampler=u;const c=class{constructor(v){this.root=c.build(v.map(([g,_])=>new m(g,_)))}static build(v){if(v.length===1)return v[0];if(v.length<=c.CHILDREN_PER_NODE){const w=v.map(b=>{let A=0;for(let S=0;S<7;S+=1){const I=b.space[S];A+=Math.abs((I.min+I.max)/2)}return{key:A,node:b}}).sort((b,A)=>b.key-A.key).map(({node:b})=>b);return new p(w)}let g=1/0,_=-1,x=[];for(let w=0;w<7;++w){v=c.sort(v,w,!1),x=c.bucketize(v);let b=0;for(const A of x)b+=c.area(A.space);g>b&&(g=b,_=w)}return v=c.sort(v,_,!1),x=c.bucketize(v),x=c.sort(x,_,!0),new p(x.map(w=>c.build(w.children)))}static sort(v,g,_){return v.map(x=>{const w=x.space[g],b=(w.min+w.max)/2;return{key:_?Math.abs(b):b,node:x}}).sort((x,w)=>x.key-w.key).map(({node:x})=>x)}static bucketize(v){const g=[];let _=[];const x=Math.pow(10,Math.floor(Math.log(v.length-.01)/Math.log(10)));for(const w of v)_.push(w),!(_.length<x)&&(g.push(new p(_)),_=[]);return _.length!==0&&g.push(new p(_)),g}static area(v){let g=0;for(const _ of v)g+=Math.abs(_.max-_.min);return g}search(v,g){return this.root.search(v.toArray(),g).thing()}};let d=c;d.CHILDREN_PER_NODE=10,e.RTree=d;class f{constructor(g){this.space=g}distance(g){let _=0;for(let x=0;x<7;x+=1)_+=Tt(this.space[x].distance(g[x]));return _}}e.RNode=f;class p extends f{constructor(g){super(p.buildSpace(g)),this.children=g}static buildSpace(g){let _=[...Array(7)].map(()=>new o(1/0,-1/0));for(const x of g)_=[...Array(7)].map((w,b)=>_[b].union(x.space[b]));return _}search(g,_){let x=1/0,w=null;for(const b of this.children){const A=_(b,g);if(x<=A)continue;const S=b.search(g,_),I=b==S?A:_(S,g);x<=I||(x=I,w=S)}return w}}e.RSubTree=p;class m extends f{constructor(g,_){super(g.space()),this.thing=_}search(){return this}}e.RLeaf=m})(vr||(vr={}));class wr{constructor(t){this.biome=t}getBiome(){return this.biome}static fromJson(t){var i,o;const n=(i=P.readObject(t))!=null?i:{},r=be.parse((o=P.readString(n.biome))!=null?o:"minecraft:the_void");return new wr(r)}}class Xo{constructor(t){this.parameters=t}getBiome(t,n,r,i){const o=i.sample(t,n,r);return this.parameters.find(o)}static fromJson(t){var o,s;const n=(o=P.readObject(t))!=null?o:{},i=((s=P.readArray(n.biomes,a=>{var l;return(u=>{var c;return{biome:be.parse((c=P.readString(u.biome))!=null?c:"minecraft:the_void"),parameters:vr.ParamPoint.fromJson(u.parameters)}})((l=P.readObject(a))!=null?l:{})}))!=null?s:[]).map(a=>[a.parameters,()=>a.biome]);return new Xo(new vr.Parameters(i))}}var gt;(function(e){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]);function t(i,o,s){return fn.NOISE.register(be.create(i),jn.create(o,s))}const n=new Map;function r(i,o){var c;const s=(c=o.key())==null?void 0:c.toString();if(!s)throw new Error("Cannot instantiate noise from direct holder");const a=i.seedKey(),l=n.get(s);if(l&&l[0]===a[0]&&l[1]===a[1])return l[2];const u=new Pr(i.fromHashOf(s),o.value());return n.set(s,[a[0],a[1],u]),u}e.instantiate=r})(gt||(gt={}));var Ve;(function(e){function t(s){var l,u,c,d,f;const a=(l=P.readObject(s))!=null?l:{};return{minY:(u=P.readInt(a.min_y))!=null?u:0,height:(c=P.readInt(a.height))!=null?c:256,xzSize:(d=P.readInt(a.size_horizontal))!=null?d:1,ySize:(f=P.readInt(a.size_vertical))!=null?f:1}}e.fromJson=t;function n(s){return s.ySize<<2}e.cellHeight=n;function r(s){return s.xzSize<<2}e.cellWidth=r;function i(s){return s.height/n(s)}e.cellCountY=i;function o(s){return Math.floor(s.minY/n(s))}e.minCellY=o})(Ve||(Ve={}));var Ao;(function(e){function t(r){var o,s,a,l;const i=(o=P.readObject(r))!=null?o:{};return{target:(s=P.readNumber(i.target))!=null?s:0,size:(a=P.readInt(i.size))!=null?a:0,offset:(l=P.readInt(i.offset))!=null?l:0}}e.fromJson=t;function n(r,i,o){if(r.size<=0)return i;const s=(o-r.offset)/r.size;return Bi(r.target,i,s)}e.apply=n})(Ao||(Ao={}));var Vn;(function(e){const t=a=>hn.parser(fn.DENSITY_FUNCTION,ce.fromJson)(a).value();function n(a){var u;const l=(u=P.readObject(a))!=null?u:{};return{barrier:t(l.barrier),fluidLevelFloodedness:t(l.fluid_level_floodedness),fluidLevelSpread:t(l.fluid_level_spread),lava:t(l.lava),temperature:t(l.temperature),vegetation:t(l.vegetation),continents:t(l.continents),erosion:t(l.erosion),depth:t(l.depth),ridges:t(l.ridges),initialDensityWithoutJaggedness:t(l.initial_density_without_jaggedness),finalDensity:t(l.final_density),veinToggle:t(l.vein_toggle),veinRidged:t(l.vein_ridged),veinGap:t(l.vein_gap)}}e.fromJson=n;function r(a){return Z({barrier:ce.Constant.ZERO,fluidLevelFloodedness:ce.Constant.ZERO,fluidLevelSpread:ce.Constant.ZERO,lava:ce.Constant.ZERO,temperature:ce.Constant.ZERO,vegetation:ce.Constant.ZERO,continents:ce.Constant.ZERO,erosion:ce.Constant.ZERO,depth:ce.Constant.ZERO,ridges:ce.Constant.ZERO,initialDensityWithoutJaggedness:ce.Constant.ZERO,finalDensity:ce.Constant.ZERO,veinToggle:ce.Constant.ZERO,veinRidged:ce.Constant.ZERO,veinGap:ce.Constant.ZERO},a)}e.create=r;function i(a,l,u,c=!1){const d=(c?new tt(u):Se.create(u)).forkPositional(),f=new o(d,l);return _e(Z({},f.mapAll(a)),{aquiferPositionalRandomFactory:d.fromHashOf(be.create("aquifer").toString()).forkPositional(),oreVeinsPositionalRandomFactory:d.fromHashOf(be.create("ore").toString()).forkPositional()})}e.withSettings=i;class o{constructor(l,u){this.random=l,this.settings=u,this.mapped=new Map}map(l){if(l instanceof ce.HolderHolder){const u=l.holder.key();if(u!==void 0&&this.mapped.has(u.toString()))return this.mapped.get(u.toString());{const c=l.holder.value().mapAll(this);return u!==void 0&&this.mapped.set(u.toString(),c),c}}if(l instanceof ce.Interpolated)return l.withCellSize(Ve.cellWidth(this.settings),Ve.cellHeight(this.settings));if(l instanceof ce.ShiftedNoise){const u=gt.instantiate(this.random,l.noiseData);return new ce.ShiftedNoise(l.shiftX,l.shiftY,l.shiftZ,l.xzScale,l.yScale,l.noiseData,u)}return l instanceof ce.Noise?new ce.Noise(l.xzScale,l.yScale,l.noiseData,gt.instantiate(this.random,l.noiseData)):l instanceof ce.ShiftNoise?l.withNewNoise(gt.instantiate(this.random,l.noiseData)):l instanceof ce.WeirdScaledSampler?new ce.WeirdScaledSampler(l.input,l.rarityValueMapper,l.noiseData,gt.instantiate(this.random,l.noiseData)):l instanceof ce.OldBlendedNoise?new ce.OldBlendedNoise(l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier,new Tc(this.random.fromHashOf(be.create("terrain").toString()),l.xzScale,l.yScale,l.xzFactor,l.yFactor,l.smearScaleMultiplier)):l instanceof ce.Mapped||l instanceof ce.Ap2?l.withMinMax():l}mapAll(l){return{barrier:l.barrier.mapAll(this),fluidLevelFloodedness:l.fluidLevelFloodedness.mapAll(this),fluidLevelSpread:l.fluidLevelSpread.mapAll(this),lava:l.lava.mapAll(this),temperature:l.temperature.mapAll(this),vegetation:l.vegetation.mapAll(this),continents:l.continents.mapAll(this),erosion:l.erosion.mapAll(this),depth:l.depth.mapAll(this),ridges:l.ridges.mapAll(this),initialDensityWithoutJaggedness:l.initialDensityWithoutJaggedness.mapAll(this),finalDensity:l.finalDensity.mapAll(this),veinToggle:l.veinToggle.mapAll(this),veinRidged:l.veinRidged.mapAll(this),veinGap:l.veinGap.mapAll(this)}}}e.Visitor=o;function s(a,l,u,c){const d=Ve.minCellY(a)+Ve.cellCountY(a),f=Ve.minCellY(a),p=Ve.cellHeight(a);for(let m=d;m>=f;m-=1){const v=m*p;if(mr(l.compute(ce.context(u,v,c)),-64,64)>=.390625)return v}return Number.MAX_SAFE_INTEGER}e.computePreliminarySurfaceLevelScanning=s})(Vn||(Vn={}));class Rc{constructor(t,n,r,i,o,s,a,l,u){this.cellCountXZ=t,this.cellCountY=n,this.cellNoiseMinY=r,this.router=i,this.minX=o,this.minZ=s,this.settings=a,this.preliminarySurfaceLevel=new Map,this.cellWidth=Ve.cellWidth(a),this.cellHeight=Ve.cellHeight(a),this.firstCellX=Math.floor(o/this.cellWidth),this.firstCellZ=Math.floor(s/this.cellWidth),this.firstNoiseX=o>>2,this.firstNoiseZ=s>>2,this.noiseSizeXZ=t*this.cellWidth>>2,this.aquifer=vi.createDisabled(u);const c=this.router.finalDensity;this.materialRule=wi.fromList([d=>this.aquifer.compute(d,c.compute(d))]),this.initialDensityWithoutJaggedness=this.router.initialDensityWithoutJaggedness}getFinalState(t,n,r){return this.materialRule({x:t,y:n,z:r})}getPreliminarySurfaceLevel(t,n){return Rr(this.preliminarySurfaceLevel,We.asLong(t,n),()=>Vn.computePreliminarySurfaceLevelScanning(this.settings,this.initialDensityWithoutJaggedness,t<<2,n<<2))}getAquifer(){return this.aquifer}}var wi;(function(e){function t(n){return r=>{for(const i of n){const o=i(r);if(o)return o}}}e.fromList=t})(wi||(wi={}));var Ln;(function(e){function t(o){var a,l,u,c;const s=(a=P.readObject(o))!=null?a:{};return s.absolute!==void 0?n((l=P.readNumber(s.absolute))!=null?l:0):s.above_bottom!==void 0?r((u=P.readNumber(s.above_bottom))!=null?u:0):s.below_top!==void 0?i((c=P.readNumber(s.below_top))!=null?c:0):()=>0}e.fromJson=t;function n(o){return()=>o}function r(o){return s=>s.minY+o}function i(o){return s=>s.maxY-o}})(Ln||(Ln={}));var yi;(function(e){function t(n,r){return{minY:n,height:r,maxY:n+r-1}}e.create=t})(yi||(yi={}));class Pc{constructor(t,n,r){this.rule=t,this.defaultBlock=n,this.random=Se.create(r).forkPositional(),this.surfaceNoise=gt.instantiate(this.random,gt.SURFACE),this.surfaceSecondaryNoise=gt.instantiate(this.random,gt.SURFACE_SECONDARY),this.positionalRandoms=new Map}buildSurface(t,n,r,i){const o=We.minBlockX(t.pos),s=We.minBlockZ(t.pos),a=new $c(this,t,n,r,i),l=this.rule(a);for(let u=0;u<16;u+=1){const c=o+u;for(let d=0;d<1;d+=1){const f=s+d;a.updateXZ(c,f);let p=0,m=Number.MIN_SAFE_INTEGER,v=Number.MAX_SAFE_INTEGER;for(let g=t.maxY;g>=t.minY;g-=1){const _=Ke.create(c,g,f),x=t.getBlockState(_);if(x.equals(ge.AIR)){p=0,m=Number.MIN_SAFE_INTEGER;continue}if(x.isFluid()){m===Number.MIN_SAFE_INTEGER&&(m=g+1);continue}if(v>=g){v=Number.MIN_SAFE_INTEGER;for(let A=g-1;A>=t.minY;A-=1){const S=t.getBlockState(Ke.create(c,A,f));if(S.equals(ge.AIR)||S.isFluid()){v=A+1;break}}}p+=1;const w=g-v+1;if(!x.equals(this.defaultBlock))continue;a.updateY(p,w,m,g);const b=l(c,g,f);b&&t.setBlockState(_,b)}}}}getSurfaceDepth(t,n){const r=this.surfaceNoise.sample(t,0,n),i=this.random.at(t,0,n).nextDouble()*.25;return r*2.75+3+i}getSurfaceSecondary(t,n){return this.surfaceSecondaryNoise.sample(t,0,n)}getRandom(t){return Rr(this.positionalRandoms,t,()=>this.random.fromHashOf(t))}}class $c{constructor(t,n,r,i,o){this.system=t,this.chunk=n,this.noiseChunk=r,this.context=i,this.getBiome=o,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(t,n){this.blockX=t,this.blockZ=n,this.surfaceDepth=this.system.getSurfaceDepth(t,n),this.surfaceSecondary=ar(()=>this.system.getSurfaceSecondary(t,n)),this.minSurfaceLevel=ar(()=>this.calculateMinSurfaceLevel(t,n))}updateY(t,n,r,i){this.blockY=i,this.stoneDepthAbove=t,this.stoneDepthBelow=n,this.waterHeight=r,this.biome=ar(()=>this.getBiome(Ke.create(this.blockX,this.blockY,this.blockZ)))}calculateMinSurfaceLevel(t,n){const r=t>>4,i=n>>4,o=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i<<4),s=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i<<4),a=this.noiseChunk.getPreliminarySurfaceLevel(r<<4,i+1<<4),l=this.noiseChunk.getPreliminarySurfaceLevel(r+1<<4,i+1<<4);return Math.floor(fi((t&15)/16,(n&15)/16,o,s,a,l))+this.surfaceDepth-8}}var bi;(function(e){e.NOOP=()=>()=>{};function t(o){var l,u,c;const s=(l=P.readObject(o))!=null?l:{};switch((u=P.readString(s.type))==null?void 0:u.replace(/^minecraft:/,"")){case"block":return n(ge.fromJson(s.result_state));case"sequence":return r((c=P.readArray(s.sequence,e.fromJson))!=null?c:[]);case"condition":return i(xi.fromJson(s.if_true),e.fromJson(s.then_run))}return e.NOOP}e.fromJson=t;function n(o){return()=>()=>o}e.block=n;function r(o){return s=>{const a=o.map(l=>l(s));return(l,u,c)=>{for(const d of a){const f=d(l,u,c);if(f)return f}}}}e.sequence=r;function i(o,s){return a=>(l,u,c)=>{if(o(a))return s(a)(l,u,c)}}e.condition=i})(bi||(bi={}));var xi;(function(e){e.FALSE=()=>!1,e.TRUE=()=>!0;function t(u){var f,p,m,v,g,_,x,w,b,A,S,I;const c=(f=P.readObject(u))!=null?f:{};switch((p=P.readString(c.type))==null?void 0:p.replace(/^minecraft:/,"")){case"above_preliminary_surface":return n();case"biome":return r((m=P.readArray(c.biome_is,k=>{var M;return(M=P.readString(k))!=null?M:""}))!=null?m:[]);case"not":return i(e.fromJson(c.invert));case"stone_depth":return o((v=P.readInt(c.offset))!=null?v:0,(g=P.readBoolean(c.add_surface_depth))!=null?g:!1,(_=P.readInt(c.secondary_depth_range))!=null?_:0,P.readString(c.surface_type)==="ceiling");case"vertical_gradient":return s((x=P.readString(c.random_name))!=null?x:"",Ln.fromJson(c.true_at_and_below),Ln.fromJson(c.false_at_and_above));case"water":return a((w=P.readInt(c.offset))!=null?w:0,(b=P.readInt(c.surface_depth_multiplier))!=null?b:0,(A=P.readBoolean(c.add_surface_depth))!=null?A:!1);case"y_above":return l(Ln.fromJson(c.anchor),(S=P.readInt(c.surface_depth_multiplier))!=null?S:0,(I=P.readBoolean(c.add_surface_depth))!=null?I:!1)}return e.FALSE}e.fromJson=t;function n(){return u=>u.blockY>=u.minSurfaceLevel()}e.abovePreliminarySurface=n;function r(u){const c=new Set(u);return d=>c.has(d.biome())}e.biome=r;function i(u){return c=>!u(c)}e.not=i;function o(u,c,d,f){return p=>{const m=f?p.stoneDepthBelow:p.stoneDepthAbove,v=c?p.surfaceDepth:0,g=d===0?0:gr(p.surfaceSecondary(),-1,1,0,d);return m<=1+u+v+g}}e.stoneDepth=o;function s(u,c,d){return f=>{const p=c(f.context),m=d(f.context);if(f.blockY<=p)return!0;if(f.blockY>=m)return!1;const v=f.system.getRandom(u),g=gr(f.blockY,p,m,1,0);return v.nextFloat()<g}}e.verticalGradient=s;function a(u,c,d){return f=>{if(f.waterHeight===Number.MIN_SAFE_INTEGER)return!0;const p=d?f.stoneDepthAbove:0;return f.blockY+p>=f.waterHeight+u+f.surfaceDepth*c}}e.water=a;function l(u,c,d){return f=>{const p=d?f.stoneDepthAbove:0;return f.blockY+p>=u(f.context)+f.surfaceDepth*c}}e.yAbove=l})(xi||(xi={}));class Cp{constructor(t,n,r){this.biomeSource=n,this.settings=r,this.router=Vn.withSettings(r.noiseRouter,r.noise,t,r.legacyRandomSource),this.noiseChunkCache=new Map,this.surfaceSystem=new Pc(r.surfaceRule,r.defaultBlock,t);const i=new _r(-54,ge.LAVA),o=new _r(r.seaLevel,r.defaultFluid);this.globalFluidPicker=(s,a,l)=>a<Math.min(-54,r.seaLevel)?i:o}fill(t,n=!1){var p;const r=Math.max(t.minY,this.settings.noise.minY),i=Math.min(t.maxY,this.settings.noise.minY+this.settings.noise.height),o=Ve.cellWidth(this.settings.noise),s=Ve.cellHeight(this.settings.noise),a=Math.floor(16/o),l=Math.floor(r/s),u=Math.floor((i-r)/s),c=We.minBlockX(t.pos),d=We.minBlockZ(t.pos),f=this.getNoiseChunk(t);for(let m=0;m<a;m+=1)for(let v=0;v<(n?1:a);v+=1){let g=t.getOrCreateSection(t.sectionsCount-1);for(let _=u-1;_>=0;_-=1)for(let x=s-1;x>=0;x-=1){const w=(l+_)*s+x,b=w&15,A=t.getSectionIndex(w);t.getSectionIndex(g.minBlockY)!==A&&(g=t.getOrCreateSection(A));for(let S=0;S<o;S+=1){const I=c+m*o+S,k=I&15;for(let M=0;M<(n?1:o);M+=1){const N=d+v*o+M,L=N&15,F=(p=f.getFinalState(I,w,N))!=null?p:this.settings.defaultBlock;g.setBlockState(k,b,L,F)}}}}}buildSurface(t,n="minecraft:plains"){const r=this.getNoiseChunk(t),i=yi.create(this.settings.noise.minY,this.settings.noise.height);this.surfaceSystem.buildSurface(t,r,i,()=>n)}getNoiseChunk(t){return Rr(this.noiseChunkCache,We.toLong(t.pos),()=>{const n=Math.max(t.minY,this.settings.noise.minY),r=Math.min(t.maxY,this.settings.noise.minY+this.settings.noise.height),i=Ve.cellWidth(this.settings.noise),o=Ve.cellHeight(this.settings.noise),s=Math.floor(16/i),a=Math.floor(n/o),l=Math.floor((r-n)/o),u=We.minBlockX(t.pos),c=We.minBlockZ(t.pos);return new Rc(s,l,a,this.router,u,c,this.settings.noise,this.settings.aquifersEnabled,this.globalFluidPicker)})}}var ko;(function(e){function t(n){var i,o,s,a,l,u;const r=(i=P.readObject(n))!=null?i:{};return{surfaceRule:bi.fromJson(r.surface_rule),noise:Ve.fromJson(r.noise),defaultBlock:ge.fromJson(r.default_block),defaultFluid:ge.fromJson(r.default_fluid),noiseRouter:Vn.fromJson(r.noise_router),seaLevel:(o=P.readInt(r.sea_level))!=null?o:0,disableMobGeneration:(s=P.readBoolean(r.disable_mob_generation))!=null?s:!1,aquifersEnabled:(a=P.readBoolean(r.aquifers_enabled))!=null?a:!1,oreVeinsEnabled:(l=P.readBoolean(r.ore_veins_enabled))!=null?l:!1,legacyRandomSource:(u=P.readBoolean(r.legacy_random_source))!=null?u:!1}}e.fromJson=t})(ko||(ko={}));var ra=Object.freeze(Object.defineProperty({__proto__:null,get Aquifer(){return vi},BlendedNoise:Tc,get BlockPos(){return Ke},BlockState:ge,Chunk:Ep,get ChunkPos(){return We},ChunkSection:zi,get Climate(){return vr},get CubicSpline(){return gi},get DensityFunction(){return ce},get Direction(){return ct},FixedBiome:wr,FluidStatus:_r,get Holder(){return hn},Identifier:be,ImprovedNoise:xo,get Json(){return P},LegacyPositionalRandom:Oc,LegacyRandom:tt,get MaterialRule(){return wi},get MinMaxNumberFunction(){return mi},MultiNoise:Xo,NoiseAquifer:$r,NoiseChunk:Rc,NoiseChunkGenerator:Cp,get NoiseGeneratorSettings(){return ko},get NoiseParameters(){return jn},get NoiseRouter(){return Vn},get NoiseSettings(){return Ve},get NoiseSlideSettings(){return Ao},get Noises(){return gt},NormalNoise:Pr,PerlinNoise:ye,PerlinSimplexNoise:kp,Registry:_i,SimplexNoise:Je,Structure:Zo,get SurfaceCondition(){return xi},SurfaceContext:$c,get SurfaceRule(){return bi},SurfaceSystem:Pc,get VerticalAnchor(){return Ln},get WorldgenContext(){return yi},get WorldgenRegistries(){return fn},XoroshiroPositionalRandom:Nc,XoroshiroRandom:Se,binarySearch:Mc,clamp:mr,clampedLerp:Bi,clampedMap:Fi,computeIfAbsent:Rr,getSeed:Wo,inverseLerp:Yo,isPowerOfTwo:xp,lazy:ar,lazyLerp:lr,lazyLerp2:bo,lazyLerp3:Ic,lerp:zt,lerp2:fi,lerp3:Cc,longfromBytes:pi,map:gr,smoothstep:ei,square:Tt,upperPowerOfTwo:Ap},Symbol.toStringTag,{value:"Module"}));let ia=!1;async function Ip(){ia||(await xc(ta),ia=!0,console.debug(`Loaded deepslate-rs from "${ta}"`))}const Mp={temperature:[-1,1],humidity:[-1,1],continentalness:[-1.1,1],erosion:[-1,1],weirdness:[-1,1],offset:[-1,1],factor:[0,12],jaggedness:[0,1]};let oa,sa;async function Op(e,t,n){var m,v,g;const{biomeSource:r}=await Dc(e,n),i=t.data,o=-Math.round(n.offset[0])-100+n.res/2,s=-Math.round(n.offset[1])-100+n.res/2,a=t.width*4/n.res,l=4/n.res,u=[o*n.scale,(200+o)*n.scale,n.res*n.scale],c=[s*n.scale,(200+s)*n.scale,n.res*n.scale],d=n.layers.has("biomes")?(m=r.getBiomes)==null?void 0:m.call(r,...u,64,65,1,...c):void 0,f=[...n.layers].filter(_=>_!=="biomes"),p=f.length===0||(v=r.getClimates)==null?void 0:v.call(r,...u,64,65,1,...c);for(let _=0;_<200;_+=n.res)for(let x=0;x<200;x+=n.res){const w=x*a+_*l,b=_/n.res*200/n.res+x/n.res,A=(_+o)*n.scale,S=(x+s)*n.scale;let I=[50,50,50];if(n.layers.has("biomes")){const k=(g=d==null?void 0:d[b])!=null?g:r.getBiome(A,64,S);I=Lp(k.toString(),n.biomeColors)}else if(p&&f[0]){const k=p[b][f[0]],[M,N]=Mp[f[0]],L=(k-M)/(N-M)*256;I=[L,L,L]}i[w]=I[0],i[w+1]=I[1],i[w+2]=I[2],i[w+3]=255}}async function Np(e,t,n,r){var a;const{biomeSource:i}=await Dc(e,r),[o,s]=Rp([t,n],r);return Z({biome:i.getBiome(o,64,s).toString()},(a=i.getClimate)==null?void 0:a.call(i,o,64,s))}async function Dc(e,t){const n=[e,t.octaves,`${t.seed}`,t.version];return cn(n,oa)||(oa=Ri(n),sa=await Tp(e,t)),{biomeSource:sa}}async function Tp(e,t){var n,r,i,o,s;switch((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,"")){case"fixed":return new wr(be.parse(e.biome));case"checkerboard":const a=((r=e.scale)!=null?r:2)+2,l=(o=(i=e.biomes)==null?void 0:i.length)!=null?o:0;return{getBiome(u,c,d){var p;const f=(((u>>a)+(d>>a))%l+l)%l;return be.parse((p=e.biomes)==null?void 0:p[f].node)}};case"multi_noise":switch((s=e.preset)==null?void 0:s.replace(/^minecraft:/,"")){case"nether":e=qe(t.version,"1.18")?$p:Pp;break;case"overworld":e=qe(t.version,"1.18")?await Dp():e;break}if(e=O.DataModel.unwrapLists(e),qe(t.version,"1.18")){await Ip();const u=new y0,c=L=>typeof L=="number"?[L,L]:L,[d,f,p,m,v,g,_,x,w,b,A,S,I,k]=[[],[],[],[],[],[],[],[],[],[],[],[],[],[]];for(const L of e.biomes){const{temperature:F,humidity:z,continentalness:oe,erosion:le,weirdness:T,depth:$,offset:H}=L.parameters;d.push(c(F)[0]),f.push(c(F)[1]),p.push(c(z)[0]),m.push(c(z)[1]),v.push(c(oe)[0]),g.push(c(oe)[1]),_.push(c(le)[0]),x.push(c(le)[1]),w.push(c(T)[0]),b.push(c(T)[1]),A.push(c($)[0]),S.push(c($)[1]),I.push(H),k.push(u.getOrPut(L.biome,Math.floor(Math.random()*2147483647)))}const M=gp(new Float64Array(d),new Float64Array(f),new Float64Array(p),new Float64Array(m),new Float64Array(v),new Float64Array(g),new Float64Array(_),new Float64Array(x),new Float64Array(w),new Float64Array(b),new Float64Array(A),new Float64Array(S),new Float64Array(I),new Int32Array(k)),N=_p(t.seed,t.octaves.temperature.firstOctave,new Float64Array(t.octaves.temperature.amplitudes),t.octaves.humidity.firstOctave,new Float64Array(t.octaves.humidity.amplitudes),t.octaves.continentalness.firstOctave,new Float64Array(t.octaves.continentalness.amplitudes),t.octaves.erosion.firstOctave,new Float64Array(t.octaves.erosion.amplitudes),t.octaves.weirdness.firstOctave,new Float64Array(t.octaves.weirdness.amplitudes),t.octaves.shift.firstOctave,new Float64Array(t.octaves.shift.amplitudes));return{getBiome(L,F,z){var le;const oe=Qs(M,N,L,L+1,1,F,F+1,1,z,z+1,1);return be.parse((le=u.getA(oe[0]))!=null?le:"unknown")},getBiomes(L,F,z,oe,le,T,$,H,C){return[...Qs(M,N,L,F,z,oe,le,T,$,H,C)].map(E=>{var R;return be.parse((R=u.getA(E))!=null?R:"unknown")})},getClimate(L,F,z){const oe=ea(N,L,L+1,1,F,F+1,1,z,z+1,1),[le,T,$,H,C]=oe.slice(0,5);return{temperature:le,humidity:T,continentalness:$,erosion:H,weirdness:C}},getClimates(L,F,z,oe,le,T,$,H,C){const y=ea(N,L,F,z,oe,le,T,$,H,C),E=[];for(let R=0;R<y.length;R+=7){const[V,W,he,Ue,ft]=y.slice(R,R+5);E.push({temperature:V,humidity:W,continentalness:he,erosion:Ue,weirdness:ft})}return E}}}else{const u=["altitude","temperature","humidity","weirdness"].map((c,d)=>{var p;const f=e[`${c}_noise`];return f.firstOctave=ot((p=f.firstOctave)!=null?p:-7,-100,-1),new Pr(new tt(t.seed+BigInt(d)),f)});return!Array.isArray(e.biomes)||e.biomes.length===0?new wr(be.create("unknown")):{getBiome(c,d,f){const p=u.map(g=>g.sample(c,f,0));let m=1/0,v="";for(const{biome:g,parameters:_}of e.biomes){const x=Zn(_.altitude-p[0])+Zn(_.temperature-p[1])+Zn(_.humidity-p[2])+Zn(_.weirdness-p[3])+Zn(_.offset);x<m&&(m=x,v=g)}return be.parse(v)}}}}throw new Error("Unknown biome source")}function Lp(e,t){var r;if(!e)return[128,128,128];const n=(r=t[e])!=null?r:Bc[e];return n===void 0?jo(e):n}function Rp([e,t],n){const r=(e-n.offset[0]-100+n.res/2)*n.scale,i=(t-n.offset[1]-100+n.res/2)*n.scale;return[r,i]}const Bc={"minecraft:badlands":[217,69,21],"minecraft:badlands_plateau":[202,140,101],"minecraft:bamboo_jungle":[118,142,20],"minecraft:bamboo_jungle_hills":[59,71,10],"minecraft:basalt_deltas":[64,54,54],"minecraft:beach":[250,222,85],"minecraft:birch_forest":[48,116,68],"minecraft:birch_forest_hills":[31,95,50],"minecraft:cold_ocean":[32,32,112],"minecraft:crimson_forest":[221,8,8],"minecraft:dark_forest":[64,81,26],"minecraft:dark_forest_hills":[104,121,66],"minecraft:deep_cold_ocean":[32,32,56],"minecraft:deep_frozen_ocean":[64,64,144],"minecraft:deep_lukewarm_ocean":[0,0,64],"minecraft:deep_ocean":[0,0,48],"minecraft:deep_warm_ocean":[0,0,80],"minecraft:desert":[250,148,24],"minecraft:desert_hills":[210,95,18],"minecraft:desert_lakes":[255,188,64],"minecraft:end_barrens":[128,128,255],"minecraft:end_highlands":[128,128,255],"minecraft:end_midlands":[128,128,255],"minecraft:eroded_badlands":[255,109,61],"minecraft:flower_forest":[45,142,73],"minecraft:forest":[5,102,33],"minecraft:frozen_ocean":[112,112,214],"minecraft:frozen_river":[160,160,255],"minecraft:giant_spruce_taiga":[129,142,121],"minecraft:old_growth_spruce_taiga":[129,142,121],"minecraft:giant_spruce_taiga_hills":[109,119,102],"minecraft:giant_tree_taiga":[89,102,81],"minecraft:old_growth_pine_taiga":[89,102,81],"minecraft:giant_tree_taiga_hills":[69,79,62],"minecraft:gravelly_hills":[136,136,136],"minecraft:gravelly_mountains":[136,136,136],"minecraft:windswept_gravelly_hills":[136,136,136],"minecraft:ice_spikes":[180,220,220],"minecraft:jungle":[83,123,9],"minecraft:jungle_edge":[98,139,23],"minecraft:sparse_jungle":[98,139,23],"minecraft:jungle_hills":[44,66,5],"minecraft:lukewarm_ocean":[0,0,144],"minecraft:modified_badlands_plateau":[242,180,141],"minecraft:modified_gravelly_mountains":[120,152,120],"minecraft:modified_jungle":[123,163,49],"minecraft:modified_jungle_edge":[138,179,63],"minecraft:modified_wooded_badlands_plateau":[216,191,141],"minecraft:mountain_edge":[114,120,154],"minecraft:extreme_hills":[96,96,96],"minecraft:mountains":[96,96,96],"minecraft:windswept_hills":[96,96,96],"minecraft:mushroom_field_shore":[160,0,255],"minecraft:mushroom_fields":[255,0,255],"minecraft:nether_wastes":[191,59,59],"minecraft:ocean":[0,0,112],"minecraft:plains":[141,179,96],"minecraft:river":[0,0,255],"minecraft:savanna":[189,178,95],"minecraft:savanna_plateau":[167,157,100],"minecraft:shattered_savanna":[229,218,135],"minecraft:windswept_savanna":[229,218,135],"minecraft:shattered_savanna_plateau":[207,197,140],"minecraft:small_end_islands":[128,128,255],"minecraft:snowy_beach":[250,240,192],"minecraft:snowy_mountains":[160,160,160],"minecraft:snowy_taiga":[49,85,74],"minecraft:snowy_taiga_hills":[36,63,54],"minecraft:snowy_taiga_mountains":[89,125,114],"minecraft:snowy_tundra":[255,255,255],"minecraft:snowy_plains":[255,255,255],"minecraft:soul_sand_valley":[94,56,48],"minecraft:stone_shore":[162,162,132],"minecraft:stony_shore":[162,162,132],"minecraft:sunflower_plains":[181,219,136],"minecraft:swamp":[7,249,178],"minecraft:swamp_hills":[47,255,218],"minecraft:taiga":[11,102,89],"minecraft:taiga_hills":[22,57,51],"minecraft:taiga_mountains":[51,142,129],"minecraft:tall_birch_forest":[88,156,108],"minecraft:old_growth_birch_forest":[88,156,108],"minecraft:tall_birch_hills":[71,135,90],"minecraft:the_end":[128,128,255],"minecraft:the_void":[0,0,0],"minecraft:warm_ocean":[0,0,172],"minecraft:warped_forest":[73,144,123],"minecraft:wooded_badlands_plateau":[176,151,101],"minecraft:wooded_badlands":[176,151,101],"minecraft:wooded_hills":[34,85,28],"minecraft:wooded_mountains":[80,112,80],"minecraft:windswept_forest":[80,112,80],"minecraft:snowy_slopes":[140,195,222],"minecraft:lofty_peaks":[196,168,193],"minecraft:jagged_peaks":[196,168,193],"minecraft:snowcapped_peaks":[200,198,200],"minecraft:frozen_peaks":[200,198,200],"minecraft:stony_peaks":[82,92,103],"minecraft:grove":[150,150,189],"minecraft:meadow":[169,197,80],"minecraft:lush_caves":[112,255,79],"minecraft:dripstone_caves":[140,124,0]},Pp={type:"minecraft:multi_noise",seed:0,altitude_noise:{firstOctave:-7,amplitudes:[1,1]},temperature_noise:{firstOctave:-7,amplitudes:[1,1]},humidity_noise:{firstOctave:-7,amplitudes:[1,1]},weirdness_noise:{firstOctave:-7,amplitudes:[1,1]},biomes:[{biome:"minecraft:nether_wastes",parameters:{altitude:0,temperature:0,humidity:0,weirdness:0,offset:0}},{biome:"minecraft:soul_sand_valley",parameters:{altitude:0,temperature:0,humidity:-.5,weirdness:0,offset:0}},{biome:"minecraft:crimson_forest",parameters:{altitude:0,temperature:.4,humidity:0,weirdness:0,offset:0}},{biome:"minecraft:warped_forest",parameters:{altitude:0,temperature:0,humidity:.5,weirdness:0,offset:.375}},{biome:"minecraft:basalt_deltas",parameters:{altitude:0,temperature:-.5,humidity:0,weirdness:0,offset:.175}}]},$p={type:"minecraft:multi_noise",biomes:[{biome:"minecraft:nether_wastes",parameters:{temperature:0,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:soul_sand_valley",parameters:{temperature:0,humidity:-.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:crimson_forest",parameters:{temperature:.4,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:0}},{biome:"minecraft:warped_forest",parameters:{temperature:0,humidity:.5,continentalness:0,erosion:0,depth:0,weirdness:0,offset:.375}},{biome:"minecraft:basalt_deltas",parameters:{temperature:-.5,humidity:0,continentalness:0,erosion:0,depth:0,weirdness:0,offset:.175}}]};async function Dp(){return(await rc("1.18","dimension","overworld")).generator.biome_source}const tn=[50,50,51,51,52,52,53,54,56,57,57,58,58,59,60,60,60,59,59,59,60,61,61,62,63,63,64,64,64,65,65,66,66,65,65,66,66,67,67,67,68,69,71,73,74,76,79,80,81,81,82,83,83,82,82,81,81,80,80,80,81,81,82,82],aa=[[255,77,54],[59,118,255],[91,207,25],[217,32,245],[255,209,41],[52,204,209]];function Bp(e,t,n){const r=new tt(n.seed),i={placements:[],features:[],random:r,biomeInfoNoise:new ye(r.fork(),0,[1]),seaLevel:63,version:n.version,nextFloat:()=>r.nextFloat(),nextInt:s=>r.nextInt(s),nextGaussian:()=>Math.sqrt(-2*Math.log(1-r.nextFloat()))*Math.cos(2*Math.PI*r.nextFloat()),sampleInt(s){return Fp(s,this)}};for(let s=0;s<n.size[0]/16;s+=1)for(let a=0;a<n.size[2]/16;a+=1)qe(n.version,void 0,"1.17")?kn([s*16,0,a*16],O.DataModel.unwrapLists(e),i):Hp([s*16,0,a*16],O.DataModel.unwrapLists(e.placement),i);const o=t.data;t.data.fill(255);for(const[s,a]of i.placements){if(s[0]<0||s[1]<0||s[2]<0||s[0]>=n.size[0]||s[1]>=n.size[1]||s[2]>=n.size[2])continue;const l=s[2]*(t.width*4)+s[0]*4,u=a<aa.length?aa[a]:jo(i.features[a]);o[l]=ot(50,205,u[0]),o[l+1]=ot(50,205,u[1]),o[l+2]=ot(50,205,u[2]),o[l+3]=255}for(let s=0;s<n.size[0];s+=1)for(let a=0;a<n.size[2];a+=1){if((Math.floor(s/16)+Math.floor(a/16))%2===0)continue;const l=a*(t.width*4)+s*4;for(let u=0;u<3;u+=1)o[l+u]=.85*o[l+u]}}function Hn(e){return e.startsWith("minecraft:")?e.slice(10):e}function lt(e,t){return[[e[0],t,e[2]]]}function Fp(e,t){var n,r;if(typeof e=="number")return e;if(e.base)return(r=e.base)!=null?r:1+t.nextInt(1+((n=e.spread)!=null?n:0));switch(Hn(e.type)){case"constant":return e.value;case"uniform":return e.value.min_inclusive+t.nextInt(e.value.max_inclusive-e.value.min_inclusive+1);case"biased_to_bottom":return e.value.min_inclusive+t.nextInt(t.nextInt(e.value.max_inclusive-e.value.min_inclusive+1)+1);case"clamped":return ot(t.sampleInt(e.value.source),e.value.min_inclusive,e.value.max_inclusive);case"clamped_normal":const i=e.value.mean+t.nextGaussian()*e.value.deviation;return Math.floor(ot(e.value.min_inclusive,e.value.max_inclusive,i));case"weighted_list":const o=e.distribution.reduce((a,l)=>a+l.weight,0);let s=t.nextInt(o);for(const a of e.distribution)if(s-=a.weight,s<0)return t.sampleInt(a.data);return 0}return 1}function xt(e,t){if(!Qt(e))throw new Error("Invalid vertical anchor");if(e.absolute)return e.absolute;if(e.above_bottom)return e.above_bottom;if(e.below_top)return 256-e.below_top;throw new Error("Invalid vertical anchor")}function zp(e,t){var n,r,i,o;if(!Qt(e))throw new Error("Invalid height provider");if(typeof e.type!="string")return xt(e);switch(Hn(e.type)){case"constant":return xt(e.value);case"uniform":{const s=xt(e.min_inclusive),a=xt(e.max_inclusive);return s+t.nextInt(a-s+1)}case"biased_to_bottom":{const s=xt(e.min_inclusive),a=xt(e.max_inclusive),l=t.nextInt(a-s-((n=e.inner)!=null?n:1)+1);return s+t.nextInt(l+((r=e.inner)!=null?r:1))}case"very_biased_to_bottom":{const s=xt(e.min_inclusive),a=xt(e.max_inclusive),l=(i=e.inner)!=null?i:1,u=s+l+t.nextInt(a-s-l+1),c=s+t.nextInt(u-s);return s+t.nextInt(c-s+l)}case"trapezoid":{const s=xt(e.min_inclusive),a=xt(e.max_inclusive),l=(o=e.plateau)!=null?o:0;if(l>=a-s)return s+t.nextInt(a-s+1);const u=(a-s-l)/2,c=a-s-u;return s+t.nextInt(c+1)+t.nextInt(u+1)}default:throw new Error(`Invalid height provider ${e.type}`)}}function la(e,t){const n=t.features.indexOf(e);return n!=-1?n:(t.features.push(e),t.features.length-1)}function kn(e,t,n){var o;if(typeof t=="string"){n.placements.push([e,la(t,n)]);return}const r=Hn((o=t==null?void 0:t.type)!=null?o:"no_op"),i=jp[r];i?i(t.config,e,n):n.placements.push([e,la(JSON.stringify(t),n)])}function So(e,t,n){var o;const r=Hn((o=t==null?void 0:t.type)!=null?o:"nope"),i=Vp[r];return i?i(t==null?void 0:t.config,e,n):[e]}const jp={decorated:(e,t,n)=>{So(t,e==null?void 0:e.decorator,n).forEach(i=>kn(i,e==null?void 0:e.feature,n))},random_boolean_selector:(e,t,n)=>{const r=n.nextFloat()<.5?e==null?void 0:e.feature_true:e==null?void 0:e.feature_false;kn(t,r,n)},random_selector:(e,t,n)=>{var r,i;for(const o of(r=e==null?void 0:e.features)!=null?r:[])if(n.nextFloat()<((i=o==null?void 0:o.chance)!=null?i:0)){kn(t,o.feature,n);return}kn(t,e==null?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var i,o,s;const r=(s=e==null?void 0:e.features)==null?void 0:s[n.nextInt((o=(i=e==null?void 0:e.features)==null?void 0:i.length)!=null?o:0)];kn(t,r,n)}},Vp={chance:(e,t,n)=>{var r;return n.nextFloat()<1/((r=e==null?void 0:e.chance)!=null?r:1)?[t]:[]},count:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t)},count_extra:(e,t,n)=>{var i,o;let r=(i=e==null?void 0:e.count)!=null?i:1;return n.nextFloat()<e.extra_chance&&(r+=(o=e.extra_count)!=null?o:0),new Array(r).fill(t)},count_multilayer:(e,t,n)=>{var r;return new Array(n.sampleInt((r=e==null?void 0:e.count)!=null?r:1)).fill(t).map(i=>[i[0]+n.nextInt(16),i[1],i[2]+n.nextInt(16)])},count_noise:(e,t,n)=>{const i=n.biomeInfoNoise.sample(t[0]/200,0,t[2]/200)<e.noise_level?e.below_noise:e.above_noise;return new Array(i).fill(t)},count_noise_biased:(e,t,n)=>{var s;const r=Math.max(1,e.noise_factor),i=n.biomeInfoNoise.sample(t[0]/r,0,t[2]/r),o=Math.max(0,Math.ceil((i+((s=e.noise_offset)!=null?s:0))*e.noise_to_count_ratio));return new Array(o).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map((r,i)=>{const o=Math.floor(i/4)*4+1+n.nextInt(3)+t[0],s=Math.max(n.seaLevel,tn[ot(0,63,o)]),a=Math.floor(i%4)*4+1+n.nextInt(3)+t[2];return[o,s,a]}),decorated:(e,t,n)=>So(t,e==null?void 0:e.outer,n).flatMap(r=>So(r,e==null?void 0:e.inner,n)),depth_average:(e,t,n)=>{var i,o,s,a;const r=n.nextInt((i=e==null?void 0:e.spread)!=null?i:0)+n.nextInt((o=e==null?void 0:e.spread)!=null?o:0)-((s=e.spread)!=null?s:0)+((a=e==null?void 0:e.baseline)!=null?a:0);return lt(t,r)},emerald_ore:(e,t,n)=>{const r=3+n.nextInt(6);return[...new Array(r)].map(()=>[t[0]+n.nextInt(16),4+n.nextInt(28),t[2]+n.nextInt(16)])},fire:(e,t,n)=>{const r=1+n.nextInt(n.nextInt(n.sampleInt(e==null?void 0:e.count)));return[...new Array(r)].map(()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)])},glowstone:(e,t,n)=>{const r=n.nextInt(1+n.nextInt(n.sampleInt(e==null?void 0:e.count)));return[...new Array(r)].map(()=>[t[0]+n.nextInt(16),n.nextInt(128),t[2]+n.nextInt(16)])},heightmap:(e,t,n)=>{const r=Math.max(n.seaLevel,tn[ot(0,63,t[0])]);return lt(t,r)},heightmap_spread_double:(e,t,n)=>{const r=Math.max(n.seaLevel,tn[ot(0,63,t[0])]);return lt(t,n.nextInt(r*2))},heightmap_world_surface:(e,t,n)=>{const r=Math.max(n.seaLevel,tn[ot(0,63,t[0])]);return lt(t,r)},iceberg:(e,t,n)=>[[t[0]+4+n.nextInt(8),t[1],t[2]+4+n.nextInt(8)]],lava_lake:(e,t,n)=>{var r,i;if(n.nextInt(((r=e.chance)!=null?r:1)/10)===0){const o=n.nextInt(n.nextInt(248)+8);if(o<n.seaLevel||n.nextInt(((i=e==null?void 0:e.chance)!=null?i:1)/8)==0){const s=n.nextInt(16)+t[0],a=n.nextInt(16)+t[2];return[[s,o,a]]}}return[]},nope:(e,t)=>[t],range:(e,t,n)=>{var i,o,s;const r=n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0);return lt(t,r)},range_biased:(e,t,n)=>{var i,o,s;const r=n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0));return lt(t,r)},range_very_biased:(e,t,n)=>{var i,o,s,a;const r=n.nextInt(n.nextInt(n.nextInt(((i=e==null?void 0:e.maximum)!=null?i:1)-((o=e==null?void 0:e.top_offset)!=null?o:0))+((s=e==null?void 0:e.bottom_offset)!=null?s:0))+((a=e==null?void 0:e.bottom_offset)!=null?a:0));return lt(t,r)},spread_32_above:(e,t,n)=>{const r=n.nextInt(t[1]+32);return lt(t,r)},top_solid_heightmap:(e,t)=>{const n=tn[ot(0,63,t[0])];return lt(t,n)},magma:(e,t,n)=>{const r=n.nextInt(t[1]+32);return lt(t,r)},square:(e,t,n)=>[[t[0]+n.nextInt(16),t[1],t[2]+n.nextInt(16)]],surface_relative_threshold:(e,t)=>{var o,s;const n=tn[ot(0,63,t[0])],r=n+((o=e==null?void 0:e.min_inclusive)!=null?o:-1/0),i=n+((s=e==null?void 0:e.max_inclusive)!=null?s:1/0);return t[1]<r||t[1]>i?[t]:[]},water_lake:(e,t,n)=>{var r;return n.nextInt((r=e.chance)!=null?r:1)===0?[[t[0]+n.nextInt(16),n.nextInt(256),t[2]+n.nextInt(16)]]:[]}};function Hp(e,t,n){var i;let r=[e];for(const o of t)!ca[Hn((i=o==null?void 0:o.type)!=null?i:"nope")]||(r=r.flatMap(a=>ca[Hn(o.type)](o,a,n)));for(const o of r)n.placements.push([o,0])}const ca={count:({count:e},t,n)=>new Array(n.sampleInt(e!=null?e:1)).fill(t),count_on_every_layer:({count:e},t,n)=>new Array(n.sampleInt(e!=null?e:1)).fill(t).map(r=>[r[0]+n.nextInt(16),r[1],r[2]+n.nextInt(16)]),environment_scan:({},e)=>[e],height_range:({height:e},t,n)=>lt(t,zp(e,n)),heightmap:({},e,t)=>{const n=Math.max(t.seaLevel,tn[ot(0,63,e[0])]);return lt(e,n)},in_square:({},e,t)=>[[e[0]+t.nextInt(16),e[1],e[2]+t.nextInt(16)]],noise_based_count:({noise_to_count_ratio:e,noise_factor:t,noise_offset:n},r,i)=>{const o=Math.max(1,t),s=i.biomeInfoNoise.sample(r[0]/o,0,r[2]/o),a=Math.max(0,Math.ceil((s+(n!=null?n:0))*e));return new Array(a).fill(r)},noise_threshold_count:({noise_level:e,below_noise:t,above_noise:n},r,i)=>{const s=i.biomeInfoNoise.sample(r[0]/200,0,r[2]/200)<e?t:n;return new Array(s).fill(r)},random_offset:({xz_spread:e,y_spread:t},n,r)=>[[n[0]+r.sampleInt(e),n[1]+r.sampleInt(t),n[2]+r.sampleInt(e)]],rarity_filter:({chance:e},t,n)=>n.nextFloat()<1/(e!=null?e:1)?[t]:[]};class Up{constructor(){this.d=ra,this.deepslateCache=new Map,this.Z=0,this.chunksCache=[]}async loadVersion(t){if(this.loadedVersion!==t)return(this.loadingVersion!==t||!this.loadingPromise)&&(this.loadingVersion=t,this.loadingPromise=this.doLoadVersion(t)),this.loadingPromise}async doLoadVersion(t){const n=this.deepslateCache.get(t);if(n)this.d=n;else{if(qe(t,"1.19")?this.d=ra:qe(t,"1.18.2")?this.d=await ae(()=>import("./deepslate.esm.e4500053.js"),["assets/deepslate.esm.e4500053.js","assets/vec3.7a0b0b73.js"]):this.d=await ae(()=>import("./deepslate.esm.ada8e9f6.js"),["assets/deepslate.esm.ada8e9f6.js","assets/vec3.7a0b0b73.js"]),this.d.WorldgenRegistries){const r=[["worldgen/noise","NOISE",this.d.NoiseParameters],["worldgen/density_function","DENSITY_FUNCTION",this.d.DensityFunction]];await Promise.all(r.map(async([i,o,s])=>{const a=await P0(t,i),l=new this.d.Registry(this.d.Identifier.create(i));for(const[u,c]of a.entries())l.register(this.d.Identifier.parse(u),s.fromJson(c));this.d.WorldgenRegistries[o].assign(l)}))}this.deepslateCache.set(t,this.d)}this.loadedVersion=t,this.loadingVersion=void 0}loadChunkGenerator(t,n,r="unknown"){if(!this.loadedVersion)throw new Error("No deepslate version loaded");const i=[t,`${n}`,r];if(!cn(this.cacheState,i)){const o=new this.d.FixedBiome(qe(this.loadedVersion,"1.18.2")?this.d.Identifier.parse(r):r);console.log(this.d);const s=this.d.NoiseGeneratorSettings.fromJson(O.DataModel.unwrapLists(t)),a=new this.d.NoiseChunkGenerator(n,o,s);this.settingsCache=s.noise,this.generatorCache=a,this.chunksCache=[],this.cacheState=Ri(i)}}generateChunks(t,n,r="unknown"){if(t=Math.floor(t),!this.settingsCache)throw new Error("Tried to generate chunks before settings are loaded");const i=this.settingsCache.minY,o=this.settingsCache.height;return[...Array(Math.ceil(n/16)+1)].map((s,a)=>{const l=(t>>4)+a,u=this.chunksCache.find(d=>d.pos[0]===l);if(u)return u;const c=new this.d.Chunk(i,o,this.d.ChunkPos.create(l,this.Z>>4));if(!this.generatorCache)throw new Error("Tried to generate chunks before generator is loaded");return this.generatorCache.fill(c,!0),this.generatorCache.buildSurface(c,r),this.chunksCache.push(c),c})}loadDensityFunction(t,n){const r=this.d.XoroshiroRandom.create(n).forkPositional(),i=this.d.NoiseSettings.fromJson({min_y:-64,height:384,size_horizontal:1,size_vertical:2,sampling:{xz_scale:1,y_scale:1,xz_factor:80,y_factor:160},bottom_slide:{target:.1171875,size:3,offset:0},top_slide:{target:-.078125,size:2,offset:8},terrain_shaper:{offset:.044,factor:4,jaggedness:0}});return this.settingsCache=i,this.d.DensityFunction.fromJson(t).mapAll(new this.d.NoiseRouter.Visitor(r,i))}getNoiseSettings(){if(!this.settingsCache)throw new Error("Tried to access noise settings when they are not loaded");return this.settingsCache}getBlockState(t,n){t=Math.floor(t),n=Math.floor(n);const r=this.chunksCache.find(i=>this.d.ChunkPos.minBlockX(i.pos)<=t&&this.d.ChunkPos.maxBlockX(i.pos)>=t);return r==null?void 0:r.getBlockState(this.d.BlockPos.create(t,n,this.Z))}}class Gp{constructor(t){this.settings={},this.chunkWidth=4,this.chunkHeight=4,this.chunkCountY=32,this.biomeDepth=.1,this.biomeScale=.2,this.noiseColumnCache=[],this.xOffset=0;const n=new tt(t);this.minLimitPerlinNoise=new ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.maxLimitPerlinNoise=new ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.mainPerlinNoise=new ye(n,-7,[1,1,1,1,1,1,1,1]),this.depthNoise=new ye(n,-15,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])}reset(t,n,r,i,o){this.settings=t,this.chunkWidth=t.size_horizontal*4,this.chunkHeight=t.size_vertical*4,this.chunkCountY=Math.floor(t.height/this.chunkHeight),t.amplified&&n>0&&(n=1+n*2,r=1+r*4),this.biomeDepth=.265625*(n*.5-.125),this.biomeScale=96/(r*.9+.1),this.noiseColumnCache=Array(o).fill(null),this.xOffset=i}iterateNoiseColumn(t){const n=Array(this.chunkCountY*this.chunkHeight),r=Math.floor(t/this.chunkWidth),i=Math.floor(t%this.chunkWidth)/this.chunkWidth,o=this.fillNoiseColumn(r),s=this.fillNoiseColumn(r+1);for(let a=this.chunkCountY-1;a>=0;a-=1)for(let l=this.chunkHeight;l>=0;l-=1){const u=l/this.chunkHeight,c=a*this.chunkHeight+l;n[c]=w0(u,i,o[a],o[a+1],s[a],s[a+1])}return n}fillNoiseColumn(t){const n=this.noiseColumnCache[t-this.xOffset];if(n)return n;const r=Array(this.chunkCountY+1),i=684.412*this.settings.sampling.xz_scale,o=684.412*this.settings.sampling.y_scale,s=i/this.settings.sampling.xz_factor,a=o/this.settings.sampling.y_factor,l=this.settings.random_density_offset?this.getRandomDensity(t):0;for(let u=0;u<=this.chunkCountY;u+=1){let c=this.sampleAndClampNoise(t,u,this.mainPerlinNoise.getOctaveNoise(0).zo,i,o,s,a);const p=((1-u*2/this.chunkCountY+l)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;c+=p*(p>0?4:1),this.settings.top_slide.size>0&&(c=Zi(this.settings.top_slide.target,c,(this.chunkCountY-u-this.settings.top_slide.offset)/this.settings.top_slide.size)),this.settings.bottom_slide.size>0&&(c=Zi(this.settings.bottom_slide.target,c,(u-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),r[u]=c}return this.noiseColumnCache[t-this.xOffset]=r,r}getRandomDensity(t){const n=this.depthNoise.sample(t*200,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),i=(n<0?-n*.3:n)*24.575625-2;return i<0?i*.009486607142857142:Math.min(i,1)*.006640625}sampleAndClampNoise(t,n,r,i,o,s,a){let l=0,u=0,c=0,d=1;for(let f=0;f<16;f+=1){const p=ye.wrap(t*i*d),m=ye.wrap(n*o*d),v=ye.wrap(r*i*d),g=o*d,_=this.minLimitPerlinNoise.getOctaveNoise(f);_&&(l+=_.sample(p,m,v,g,n*g)/d);const x=this.maxLimitPerlinNoise.getOctaveNoise(f);if(x&&(u+=x.sample(p,m,v,g,n*g)/d),f<8){const w=this.mainPerlinNoise.getOctaveNoise(f);w&&(c+=w.sample(ye.wrap(t*s*d),ye.wrap(n*a*d),ye.wrap(r*s*d),a*d,n*a*d)/d)}d/=2}return Zi(l/512,u/512,(c/10+1)/2)}}const Yp={"minecraft:air":[150,160,170],"minecraft:water":[20,80,170],"minecraft:lava":[200,100,0],"minecraft:stone":[55,55,55],"minecraft:deepslate":[34,34,36],"minecraft:bedrock":[10,10,10],"minecraft:grass_block":[47,120,23],"minecraft:dirt":[64,40,8],"minecraft:gravel":[70,70,70],"minecraft:sand":[196,180,77],"minecraft:sandstone":[148,135,52],"minecraft:netherrack":[100,40,40],"minecraft:crimson_nylium":[144,22,22],"minecraft:warped_nylium":[28,115,113],"minecraft:basalt":[73,74,85],"minecraft:end_stone":[200,200,140]},Bt=new Up;async function Wp(e,t,n){var s,a,l,u;if(qe(n.version,"1.18")){await Bt.loadVersion(n.version),Bt.loadChunkGenerator(e,n.seed,n.biome),Bt.generateChunks(-n.offset,n.width,n.biome);const c=Bt.getNoiseSettings(),d=t.data;for(let f=0;f<n.width;f+=1)for(let p=0;p<c.height;p+=1){const m=f*4+(c.height-p-1)*4*t.width,v=(s=Bt.getBlockState(f-n.offset,p+c.minY))!=null?s:ge.AIR,g=(a=Yp[v.getName().toString()])!=null?a:[0,0,0];d[m]=g[0],d[m+1]=g[1],d[m+2]=g[2],d[m+3]=255}return}const r=new Gp(n.seed);r.reset(e.noise,(l=n.biomeDepth)!=null?l:0,(u=n.biomeScale)!=null?u:0,n.offset,n.width);const i=t.data,o=t.width*4;for(let c=0;c<n.width;c+=1){const d=r.iterateNoiseColumn(c-n.offset).reverse();for(let f=0;f<e.noise.height;f+=1){const p=f*o+c*4,m=Xp(d,f);i[p]=m,i[p+1]=m,i[p+2]=m,i[p+3]=255}}}function qp(e,t){return Bt.getBlockState(e,t)}async function Zp(e,t,n){await Bt.loadVersion(n.version);const r=Bt.loadDensityFunction(e,n.seed),i=Bt.getNoiseSettings(),o=Array(n.width*i.height);let s=1/0,a=-1/0;for(let u=0;u<n.width;u+=1)for(let c=0;c<i.height;c+=1){const d=u+(i.height-c-1)*n.width,f=r.compute(ce.context(u-n.offset,c,0));s=Math.min(s,f),a=Math.max(a,f),o[d]=f}const l=t.data;for(let u=0;u<n.width*i.height;u+=1){const c=Math.floor(Fi(o[u],s,a,0,256));l[4*u]=c,l[4*u+1]=c,l[4*u+2]=c,l[4*u+3]=255}}function Xp(e,t){return e[t]>0?0:e[t+1]>0?150:255}function Jp(e,t,n){const r=new tt(n.seed),i=jn.fromJson(O.DataModel.unwrapLists(e)),o=new Pr(r,i),s=-n.offset[0]-100,a=-n.offset[1]-100,l=t.data;for(let u=0;u<256;u+=1)for(let c=0;c<256;c+=1){const d=u*4+c*4*256,f=(u+s)*n.scale,p=(c+a)*n.scale,m=(o.sample(f,p,0)+1)*128;l[d]=m,l[d+1]=m,l[d+2]=m,l[d+3]=255}}const Kp=["biomes","temperature","humidity","continentalness","erosion","weirdness"],Qp=({model:e,data:t,shown:n,version:r})=>{var I,k;const{locale:i}=Ee(),[o]=D(Vt()),[s,a]=D(2),[l,u]=D(void 0),[c,d]=D(new Set(["biomes"])),{biomeColors:f}=mc(),p=me([0,0]),m=me(1),v=me(),g=BigInt((I=e.get(new O.Path(["generator","seed"])))!=null?I:o),_=ke(()=>{if(!!n)return t1(e.get(new O.Path(["generator","settings"])))},[n]),x=n?e1(t,_):"",w=(k=t.type)==null?void 0:k.replace(/^minecraft:/,""),{canvas:b,redraw:A}=Tr({size(){return[200/m.current,200/m.current]},async draw(M){const N={octaves:_,biomeColors:f,layers:c,offset:p.current,scale:s,seed:g,res:m.current,version:r};await Op(t,M,N),m.current===4&&(clearTimeout(v.current),v.current=setTimeout(()=>{m.current=1,A()},150))},async onDrag(M,N){p.current[0]=p.current[0]+M*200,p.current[1]=p.current[1]+N*200,clearTimeout(v.current),m.current=w==="multi_noise"?4:1,A()},async onHover(M,N){const L={octaves:_,biomeColors:f,layers:c,offset:p.current,scale:s,seed:o,res:1,version:r},F=await Np(t,Math.floor(M*200),Math.floor(N*200),L);u(F)},onLeave(){u(void 0)}},[r,x,s,o,c,f]);Q(()=>{n&&(m.current=w==="multi_noise"?4:1,A())},[r,x,s,o,c,n,f]);const S=M=>{p.current[0]=p.current[0]*s/M,p.current[1]=p.current[1]*s/M,a(M)};return h(ne,null,h("div",{class:"controls preview-controls"},l&&h(X,{label:l.biome,class:"no-pointer"}),w==="multi_noise"&&h(et,{icon:"stack",tooltip:i("configure_layers")},Kp.map(M=>{const N=c.has(M);return h(X,{label:i(`layer.${M}`),active:N,tooltip:i(N?"enabled":"disabled"),onClick:L=>{d(new Set([M])),L.stopPropagation()}})})),(w==="multi_noise"||w==="checkerboard")&&h(ne,null,h(X,{icon:"dash",tooltip:i("zoom_out"),onClick:()=>S(s*1.5)}),h(X,{icon:"plus",tooltip:i("zoom_in"),onClick:()=>S(s/1.5)})),w==="multi_noise"&&h(X,{icon:"sync",tooltip:i("generate_new_seed"),onClick:()=>Xl(e)})),(l==null?void 0:l.temperature)!==void 0&&h("div",{class:"controls secondary-controls"},h(X,{class:"no-pointer",label:Object.entries(l).filter(([M])=>M!=="biome").map(([M,N])=>`${M[0].toUpperCase()}: ${N.toFixed(2)}`).join(" ")})),h("canvas",{ref:b,width:"200",height:"200"}))};function e1(e,t){return JSON.stringify([e,t])}function t1(e){switch(typeof e!="string"&&(e=e.legacy_random_source?"minecraft:nether":"minecraft:overworld"),e.replace(/^minecraft:/,"")){case"overworld":case"amplified":return{temperature:{firstOctave:-9,amplitudes:[1.5,0,1,0,0,0]},humidity:{firstOctave:-7,amplitudes:[1,1,0,0,0,0]},continentalness:{firstOctave:-9,amplitudes:[1,1,2,2,2,1,1,1,1]},erosion:{firstOctave:-9,amplitudes:[1,1,0,1,1]},weirdness:{firstOctave:-7,amplitudes:[1,2,1,0,0,0]},shift:{firstOctave:-3,amplitudes:[1,1,1,0]}};case"large_biomes":return{temperature:{firstOctave:-12,amplitudes:[1.5,0,1,0,0,0]},humidity:{firstOctave:-10,amplitudes:[1,1,0,0,0,0]},continentalness:{firstOctave:-11,amplitudes:[1,1,2,2,2,1,1,1,1]},erosion:{firstOctave:-11,amplitudes:[1,1,0,1,1]},weirdness:{firstOctave:-7,amplitudes:[1,2,1,0,0,0]},shift:{firstOctave:-3,amplitudes:[1,1,1,0]}};default:return{temperature:{firstOctave:-7,amplitudes:[1,1]},humidity:{firstOctave:-7,amplitudes:[1,1]},continentalness:{firstOctave:-7,amplitudes:[1,1]},erosion:{firstOctave:-7,amplitudes:[1,1]},weirdness:{firstOctave:-7,amplitudes:[1,1]},shift:{firstOctave:0,amplitudes:[0]}}}}const n1=({data:e,version:t,shown:n})=>{const{locale:r}=Ee(),[i,o]=D(4),[s,a]=D(Vt()),l=JSON.stringify(e),{canvas:u,redraw:c}=Tr({size(){return[i*16,i*16]},async draw(d){Bp(e,d,{seed:s,version:t,size:[i*16,128,i*16]})}},[t,l,s]);return Q(()=>{n&&c()},[t,l,i,s,n]),h(ne,null,h("div",{class:"controls preview-controls"},h(X,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>o(Math.min(16,i+1))}),h(X,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>o(Math.max(1,i-1))}),h(X,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>a(Vt())})),h("canvas",{ref:u,width:"64",height:"64"}))},r1=({data:e,shown:t,version:n})=>{var g,_;const{locale:r}=Ee(),[i,o]=D(Vt()),[s,a]=D(!1),[l,u]=D(void 0),c=me(0),d=me(void 0),f=JSON.stringify([e]),p=(_=(g=e==null?void 0:e.noise)==null?void 0:g.height)!=null?_:256,{canvas:m,redraw:v}=Tr({size(){return[p,p]},async draw(x){const w={offset:c.current,width:x.width,seed:i,version:n};await Zp(e,x,w)},async onDrag(x){c.current+=x*p,v()},async onHover(x,w){var S,I;const b=Math.floor(x*p-c.current),A=p-Math.max(1,Math.ceil(w*p))+((I=(S=e==null?void 0:e.noise)==null?void 0:S.min_y)!=null?I:0);u(`X=${b} Y=${A}`)},onLeave(){u(void 0)}},[n,f,i]);return Q(()=>{d.current&&clearInterval(d.current),t&&(v(),s&&(d.current=setInterval(()=>{c.current-=8,v()},100)))},[n,f,i,t,s]),h(ne,null,h("div",{class:"controls preview-controls"},l&&h(X,{label:l,class:"no-pointer"}),h(et,{icon:"gear",tooltip:r("terrain_settings")},h(X,{icon:s?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>a(!s)})),h(X,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(Vt())})),h("canvas",{ref:m,width:p,height:p}))},i1=({data:e,shown:t,version:n})=>{const{locale:r}=Ee(),[i,o]=D(Vt()),[s,a]=D(2),l=me([0,0]),u=JSON.stringify([e]),{canvas:c,redraw:d}=Tr({size(){return[256,256]},async draw(p){const m={offset:l.current,scale:s,seed:i,version:n};Jp(e,p,m)},async onDrag(p,m){l.current[0]=l.current[0]+p*256,l.current[1]=l.current[1]+m*256,d()}},[n,u,s,i]);Q(()=>{t&&d()},[n,u,s,i,t]);const f=p=>{l.current[0]=l.current[0]*s/p,l.current[1]=l.current[1]*s/p,a(p)};return h(ne,null,h("div",{class:"controls preview-controls"},h(X,{icon:"dash",tooltip:r("zoom_out"),onClick:()=>f(s*1.5)}),h(X,{icon:"plus",tooltip:r("zoom_in"),onClick:()=>f(s/1.5)}),h(X,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(Vt())})),h("canvas",{ref:c,width:"256",height:"256"}))},o1=({data:e,shown:t,version:n})=>{var I,k;const{locale:r}=Ee(),[i,o]=D(Vt()),[s,a]=D("minecraft:plains"),[l,u]=D(.2),[c,d]=D(.1),[f,p]=D(!1),[m,v]=D(void 0),g=me(0),_=me(void 0),x=JSON.stringify([e,l,c]),w=(k=(I=e==null?void 0:e.noise)==null?void 0:I.height)!=null?k:256,{canvas:b,redraw:A}=Tr({size(){return[w,w]},async draw(M){const N={biome:s,biomeDepth:c,biomeScale:l,offset:g.current,width:M.width,seed:i,version:n};await Wp(e,M,N)},async onDrag(M){g.current+=M*w,A()},async onHover(M,N){var oe,le;const L=Math.floor(M*w-g.current),F=w-Math.max(1,Math.ceil(N*w))+((le=(oe=e==null?void 0:e.noise)==null?void 0:oe.min_y)!=null?le:0),z=qp(L,F);v(z?`Y=${F} (${z.getName().path})`:`Y=${F}`)},onLeave(){v(void 0)}},[x,i]);Q(()=>{_.current&&clearInterval(_.current),t&&(async()=>{try{await A(),f&&(_.current=setInterval(()=>{g.current-=8,A()},100))}catch(M){throw M}})()},[n,x,i,t,s,l,c,f]);const S=ke(()=>{var M;return(M=or==null?void 0:or.get("worldgen/biome"))!=null?M:[]},[n]);return h(ne,null,h("div",{class:"controls preview-controls"},m&&h(X,{label:m,class:"no-pointer"}),h(et,{icon:"gear",tooltip:r("terrain_settings")},qe(n,void 0,"1.17")?h(ne,null,h(Qr,{label:r("preview.scale"),value:`${l}`,onChange:M=>u(Number(M))}),h(Qr,{label:r("preview.depth"),value:`${c}`,onChange:M=>d(Number(M))})):h(Qr,{label:r("preview.biome"),value:s,onChange:a,dataList:S,larger:!0}),h(X,{icon:f?"square_fill":"square",label:r("preview.auto_scroll"),onClick:()=>p(!f)})),h(X,{icon:"sync",tooltip:r("generate_new_seed"),onClick:()=>o(Vt())})),h("canvas",{ref:b,width:w,height:w}))},s1=["dimension","worldgen/density_function","worldgen/noise","worldgen/noise_settings","worldgen/configured_feature","worldgen/placed_feature"];function a1({model:e,version:t,id:n,shown:r}){var o;const[,i]=D(0);if(Pi(e,()=>{i(s=>s+1)}),!e)return h(ne,null);if(n==="dimension"&&((o=e.get(new O.Path(["generator","type"])))==null?void 0:o.endsWith("noise"))){const s=e.get(new O.Path(["generator","biome_source"]));if(s)return h(Qp,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/density_function"){const s=e.get(new O.Path([]));if(s)return h(r1,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/noise"){const s=e.get(new O.Path([]));if(s)return h(i1,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/noise_settings"){const s=e.get(new O.Path([]));if(s)return h(o1,{model:e,version:t,shown:r,data:s})}if(n==="worldgen/placed_feature"||n==="worldgen/configured_feature"&&qe(t,"1.16","1.17")){const s=e.get(new O.Path([]));if(s)return h(n1,{model:e,version:t,shown:r,data:s})}return h(ne,null)}function ri(e,t){return e.schema.hook(l1,new O.ModelPath(e),e.data,{blockStates:t})}const l1={base({},e,t){return t},choice({switchNode:e},t,n,r){return e.hook(this,t,n,r)},list({children:e},t,n,r){if(!Array.isArray(n))return n;const i=n.map((o,s)=>e.hook(this,t.push(s),o.node,r));for(const o of Object.getOwnPropertySymbols(n))i[o]=n[o];return i},map({children:e,config:t},n,r,i){var a,l;if(r===void 0)return;const o=((a=t.validation)==null?void 0:a.validator)==="block_state_map"?(l=i.blockStates)==null?void 0:l[O.relativePath(n,t.validation.params.id).get()]:null,s={};Object.keys(r).forEach(u=>{var c;o&&!Object.keys((c=o.properties)!=null?c:{}).includes(u)||(s[u]=e.hook(this,n.push(u),r[u],i))});for(const u of Object.getOwnPropertySymbols(r))s[u]=r[u];return s},object({getActiveFields:e},t,n,r){if(n==null||typeof n!="object")return n;const i={},o=e(t);Object.keys(o).filter(s=>o[s].enabled(t)).forEach(s=>{const a=o[s].hook(this,t.push(s),n[s],r);a!=null&&(i[s]=a)});for(const s of Object.getOwnPropertySymbols(n))i[s]=n[s];return i}},Qi={"2_spaces":2,"4_spaces":4,tabs:" ",minified:void 0};let Jn=null;const eo={json:{parse:async e=>{try{return JSON.parse(e)}catch{return Jn=await ae(()=>import("./index.8864b7c6.js").then(function(n){return n.i}),[]),Jn.parse(e)}},stringify:(e,t)=>(Jn!=null?Jn:JSON).stringify(e,null,t)+`
`},yaml:{parse:async e=>go.load(e),stringify:(e,t)=>go.dump(e,{flowLevel:t===void 0?0:-1,indent:typeof t=="string"?4:t})}};function c1({name:e,model:t,blockStates:n,doCopy:r,doDownload:i,doImport:o,copySuccess:s,onError:a}){const{locale:l}=Ee(),[u,c]=D(De.getIndent()),[d,f]=D(De.getFormat()),[p,m]=D(De.getHighlighting()),[v,g]=D(!1),_=me(null),x=me(()=>{}),w=me(async()=>{}),b=me(null),A=me(),S=Ce((N,L)=>{const F=ri(N,L);return eo[d].stringify(F,Qi[u])},[u,d]);Q(()=>{x.current=()=>{if(!!A.current&&!(!t||!n))try{const N=S(t,n);A.current.setValue(N)}catch(N){N instanceof Error?(N.message=`Error getting JSON output: ${N.message}`,a(N)):a(`Error getting JSON output: ${ut(N)}`),console.error(N),A.current.setValue("")}},w.current=async()=>{if(!A.current)return;const N=A.current.getValue();if(N.length!==0)try{const L=await eo[d].parse(N);t==null||t.reset(O.DataModel.wrapLists(L),!1)}catch(L){L instanceof Error?(L.message=`Error importing: ${L.message}`,a(L)):a(`Error importing: ${ut(L)}`),console.error(L)}}},[t,n,u,d,p]),Q(()=>{p?(g(!1),A.current={getValue(){return""},setValue(){},configure(){},select(){}},ae(()=>import("./index.8ac52a74.js").then(function(N){return N.i}),[]).then(async N=>{await Promise.all([ae(()=>import("./json.c327d69b.js").then(function(F){return F.j}),[]),ae(()=>import("./yaml.e8f3b9ab.js"),[])]);const L=N.edit("editor");L.setOptions({fontSize:14,showFoldWidgets:!1,highlightSelectedWord:!1}),L.$blockScrolling=1/0,L.on("blur",()=>w.current()),L.getSession().setMode("ace/mode/json"),A.current={getValue(){return L.getSession().getValue()},setValue(F){L.getSession().setValue(F)},configure(F,z){L.setOption("useSoftTabs",F!=="tabs"),L.setOption("tabSize",F==="tabs"?4:Qi[F]),L.getSession().setMode(`ace/mode/${z}`)},select(){L.selectAll()}},g(!0)})):A.current={getValue(){return b.current?b.current.value:""},setValue(N){!b.current||(b.current.value=N)},configure(){},select(){}}},[p]),Pi(t,()=>{!x.current||x.current()}),Q(()=>{!x.current||t&&x.current()},[t]),Q(()=>{!A.current||!x.current||(!p||v)&&(A.current.configure(u,d),x.current())},[u,d,p,v]),Q(()=>{r&&t&&n&&navigator.clipboard.writeText(S(t,n)).then(()=>{s()})},[r]),Q(()=>{if(i&&t&&n&&_.current){const N=encodeURIComponent(S(t,n));_.current.setAttribute("href",`data:text/json;charset=utf-8,${N}`),_.current.setAttribute("download",`${e}.${d}`),_.current.click()}},[i]),Q(()=>{o&&A.current&&(A.current.setValue(""),A.current.select())},[o]);const I=N=>{De.setIndent(N),c(N)},k=N=>{De.setFormat(N),f(N)},M=N=>{De.setHighlighting(N),m(N)};return h(ne,null,h("div",{class:"controls source-controls"},h(et,{icon:"gear",tooltip:l("output_settings"),"data-cy":"source-controls"},Object.entries(Qi).map(([N])=>h(X,{label:l(`indentation.${N}`),active:u===N,onClick:()=>I(N)})),h("hr",null),Object.keys(eo).map(N=>h(X,{label:l(`format.${N}`),active:d===N,onClick:()=>k(N)})),h("hr",null),h(X,{icon:p?"square_fill":"square",label:l("highlighting"),onClick:()=>M(!p)}))),p?h("pre",{id:"editor",class:"source"}):h("textarea",{ref:b,class:"source",spellcheck:!1,autocorrect:"off",onBlur:w.current}),h("a",{ref:_,style:"display: none;"}))}function Fc(e,t){for(var n in t)e[n]=t[n];return e}function Eo(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Co(e){this.props=e}function zc(e,t){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:Eo(this.props,i)}function r(i){return this.shouldComponentUpdate=n,h(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Co.prototype=new _t).isPureReactComponent=!0,Co.prototype.shouldComponentUpdate=function(e,t){return Eo(this.props,e)||Eo(this.state,t)};var ua=G.__b;G.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ua&&ua(e)};var u1=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function d1(e){function t(n,r){var i=Fc({},n);return delete i.ref,e(i,(r=n.ref||r)&&(typeof r!="object"||"current"in r)?r:null)}return t.$$typeof=u1,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var da=function(e,t){return e==null?null:vt(vt(e).map(t))},h1={map:da,forEach:da,count:function(e){return e?vt(e).length:0},only:function(e){var t=vt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:vt},f1=G.__e;G.__e=function(e,t,n){if(e.then){for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}f1(e,t,n)};var ha=G.unmount;function ii(){this.__u=0,this.t=null,this.__b=null}function jc(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function p1(e){var t,n,r;function i(o){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return h(n,o)}return i.displayName="Lazy",i.__f=!0,i}function er(){this.u=null,this.o=null}G.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),ha&&ha(e)},(ii.prototype=new _t).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=jc(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__e){var u=r.state.__e;r.__v.__k[0]=function d(f,p,m){return f&&(f.__v=null,f.__k=f.__k&&f.__k.map(function(v){return d(v,p,m)}),f.__c&&f.__c.__P===p&&(f.__e&&m.insertBefore(f.__e,f.__d),f.__c.__e=!0,f.__c.__P=m)),f}(u,u.__c.__P,u.__c.__O)}var c;for(r.setState({__e:r.__b=null});c=r.t.pop();)c.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(s,s)},ii.prototype.componentWillUnmount=function(){this.t=[]},ii.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function o(s,a,l){return s&&(s.__c&&s.__c.__H&&(s.__c.__H.__.forEach(function(u){typeof u.__c=="function"&&u.__c()}),s.__c.__H=null),(s=Fc({},s)).__c!=null&&(s.__c.__P===l&&(s.__c.__P=a),s.__c=null),s.__k=s.__k&&s.__k.map(function(u){return o(u,a,l)})),s}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__e&&h(ne,null,e.fallback);return i&&(i.__h=null),[h(ne,null,t.__e?null:e.children),i]};var fa=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function m1(e){return this.getChildContext=function(){return e.context},e.children}function g1(e){var t=this,n=e.i;t.componentWillUnmount=function(){Rn(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Rn(h(m1,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function _1(e,t){return h(g1,{__v:e,i:t})}(er.prototype=new _t).__e=function(e){var t=this,n=jc(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),fa(t,e,r)):i()};n?n(o):o()}},er.prototype.render=function(e){this.u=null,this.o=new Map;var t=vt(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},er.prototype.componentDidUpdate=er.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){fa(e,n,t)})};var Vc=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,v1=/^(?: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]/,w1=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function y1(e,t,n){return t.__k==null&&(t.textContent=""),Rn(e,t),typeof n=="function"&&n(),e?e.__c:null}function b1(e,t,n){return Ja(e,t),typeof n=="function"&&n(),e?e.__c:null}_t.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(_t.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var pa=G.event;function x1(){}function A1(){return this.cancelBubble}function k1(){return this.defaultPrevented}G.event=function(e){return pa&&(e=pa(e)),e.persist=x1,e.isPropagationStopped=A1,e.isDefaultPrevented=k1,e.nativeEvent=e};var Hc,ma={configurable:!0,get:function(){return this.class}},_a=G.vnode;G.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t=="string"){for(var i in r={},n){var o=n[i];i==="value"&&"defaultValue"in n&&o==null||(i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&o===!0?o="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!w1(n.type)?i="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():v1.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():o===null&&(o=void 0),r[i]=o)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=vt(n.children).forEach(function(s){s.props.selected=r.value.indexOf(s.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=vt(n.children).forEach(function(s){s.props.selected=r.multiple?r.defaultValue.indexOf(s.props.value)!=-1:r.defaultValue==s.props.value})),e.props=r}t&&n.class!=n.className&&(ma.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",ma)),e.$$typeof=Vc,_a&&_a(e)};var va=G.__r;G.__r=function(e){va&&va(e),Hc=e.__c};var S1={ReactCurrentDispatcher:{current:{readContext:function(e){return Hc.__n[e.__c].props.value}}}};typeof performance=="object"&&typeof performance.now=="function"&&performance.now.bind(performance);function E1(e){return h.bind(null,e)}function Uc(e){return!!e&&e.$$typeof===Vc}function C1(e){return Uc(e)?Ka.apply(null,arguments):e}function I1(e){return!!e.__k&&(Rn(null,e),!0)}function M1(e){return e&&(e.base||e.nodeType===1&&e)||null}var O1=function(e,t){return e(t)},Io={useState:D,useReducer:ol,useEffect:Q,useLayoutEffect:sl,useRef:me,useImperativeHandle:zu,useMemo:ke,useCallback:Ce,useContext:gn,useDebugValue:ju,version:"16.8.0",Children:h1,render:y1,hydrate:b1,unmountComponentAtNode:I1,createPortal:_1,createElement:h,createContext:pn,createFactory:E1,cloneElement:C1,createRef:Au,Fragment:ne,isValidElement:Uc,findDOMNode:M1,Component:_t,PureComponent:Co,memo:zc,forwardRef:d1,unstable_batchedUpdates:O1,StrictMode:ne,Suspense:ii,SuspenseList:er,lazy:p1,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:S1};class Gc extends O.DataModel{constructor(t,n,r,i){super(t),this.mapper=n,this.getter=r,this.setter=i}map(t){return this.mapper(t)}get(t){return this.getter(t)}set(t,n,r){return this.setter(t,n,r)}}const N1=["loot_table.type","loot_entry.type","function.function","condition.condition","criterion.trigger","recipe.type","dimension.generator.type","dimension.generator.biome_source.type","dimension.generator.biome_source.preset","carver.type","feature.type","decorator.type","feature.tree.minimum_size.type","block_state_provider.type","trunk_placer.type","foliage_placer.type","tree_decorator.type","int_provider.type","float_provider.type","height_provider.type","structure_feature.type","surface_builder.type","processor.processor_type","rule_test.predicate_type","pos_rule_test.predicate_type","template_element.element_type","block_placer.type","block_predicate.type","material_rule.type","material_condition.type","structure_placement.type","density_function.type","root_placer.type","entity.type_specific.cat.variant","entity.type_specific.frog.variant"],T1=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],L1=["feature.config","decorator.config","int_provider.value","float_provider.value","block_state_provider.simple_state_provider.state","block_state_provider.rotated_block_provider.state","block_state_provider.weighted_state_provider.entries.entry.data","rule_test.block_state","structure_feature.config","surface_builder.config","template_pool.elements.entry.element","decorator.block_survives_filter.state","material_rule.block.result_state"],R1=["loot_entry.type","function.function","condition.condition","criterion.trigger","dimension.generator.type","dimension.generator.biome_source.type","feature.type","decorator.type","block_state_provider.type","feature.tree.minimum_size.type","trunk_placer.type","foliage_placer.type","tree_decorator.type","block_placer.type","rule_test.predicate_type","processor.processor_type","template_element.element_type","nbt_operation.op","number_provider.value","score_provider.name","score_provider.target","nbt_provider.source","nbt_provider.target","generator_biome.biome","block_predicate.type","material_rule.type","material_condition.type","density_function.type","root_placer.type","entity.type_specific.type","immersive_weathering.area_condition.type","immersive_weathering.block_growth.growth_for_face.entry.direction","immersive_weathering.position_test.predicate_type"],P1=["function.set_nbt.tag","advancement.display.icon.nbt","text_component_object.nbt","entity.nbt","block.nbt","item.nbt"],$1=["generator_biome.parameters.temperature","generator_biome.parameters.humidity","generator_biome.parameters.continentalness","generator_biome.parameters.erosion","generator_biome.parameters.depth","generator_biome.parameters.weirdness","feature.end_spike.crystal_beam_target","feature.end_gateway.exit","decorator.block_filter.offset","block_predicate.matching_blocks.offset","block_predicate.matching_fluids.offset","model_element.from","model_element.to","model_element.rotation.origin","model_element.faces.uv","item_transform.rotation","item_transform.translation","item_transform.scale","generator_structure.random_spread.locate_offset"],wa=["noise_settings.surface_rule","noise_settings.noise.terrain_shaper"],D1=["density_function.argument","density_function.argument1","density_function.argument2","density_function.input","density_function.when_in_range","density_function.when_out_of_range"],B1='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M8.878.392a1.75 1.75 0 00-1.756 0l-5.25 3.045A1.75 1.75 0 001 4.951v6.098c0 .624.332 1.2.872 1.514l5.25 3.045a1.75 1.75 0 001.756 0l5.25-3.045c.54-.313.872-.89.872-1.514V4.951c0-.624-.332-1.2-.872-1.514L8.878.392zM7.875 1.69a.25.25 0 01.25 0l4.63 2.685L8 7.133 3.245 4.375l4.63-2.685zM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432L2.5 5.677zm6.25 8.271l4.625-2.683a.25.25 0 00.125-.216V5.677L8.75 8.432v5.516z"></path></svg>',F1=e=>de.generators.find(t=>t.id===e.replace(/^\$/,"")),z1=new O.DataModel(O.MapNode(O.StringNode(),O.StringNode()),{historyMax:0});function j1({model:e,lang:t,version:n,blockStates:r}){var l;const i=new O.ModelPath(e),[o,s,a]=e.schema.hook(Yc,i,Ri(e.data),t,n,r,{});return(l=s==null?void 0:s.props)!=null&&l.children.some(u=>u)?h("div",{class:`node ${e.schema.type(i)}-node`,"data-category":e.schema.category(i)},h("div",{class:"node-header"},o,s),h("div",{class:"node-body"},a)):a}const Yc={base(){return[null,null,null]},boolean(e,t,n,r,i,o,s){return[null,h(V1,Z({},_e(Z({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s}))),null]},choice({choices:e,config:t,switchNode:n},r,i,o,s,a,l){const u=n.activeCase(r,!0),c=t!=null&&t.context?new O.ModelPath(r.getModel(),new O.Path(r.getArray(),[t.context])):r,[d,f,p]=u.node.hook(this,c,i,o,s,a,l);if(e.length===1)return[d,f,p];const m=t!=null&&t.choiceContext?new O.Path([],[t.choiceContext]):t!=null&&t.context?new O.Path([],[t.context]):r,v=_=>{var A;const x=(A=e.find(S=>S.type===_))!=null?A:u,w=x.node.default(),b=x.change?x.change(O.DataModel.unwrapLists(i)):t.choiceContext==="feature"&&(w==null?void 0:w.type)==="minecraft:decorated"?w.config.feature:w;r.model.set(r,O.DataModel.wrapLists(b))},g=h("select",{value:u.type,onChange:_=>v(_.target.value)},e.map(_=>h("option",{value:_.type},Ai(o,m.contextPush(_.type)))));return[d,h(ne,null,g,f),p]},list({children:e,config:t},n,r,i,o,s,a){const{expand:l,collapse:u,isToggled:c}=to(),[d,f]=D(50),p=n.getContext().join(".");if($1.includes(p)){const x=h(ne,null,[...Array(t.maxLength)].map((b,A)=>h(tr,{lang:i,path:n.modelPush(A)})),h("div",{class:"fixed-list"})),w=h(ne,null,[...Array(t.maxLength)].map((b,A)=>{var I;return e.hook(this,n.modelPush(A),(I=r==null?void 0:r[A])==null?void 0:I.node,i,o,s,a)[1]}));return[x,w,null]}const m=()=>{Array.isArray(r)||(r=[]);const x=O.DataModel.wrapLists(e.default());n.model.set(n,[{node:x,id:sn()},...r])},v=()=>{Array.isArray(r)||(r=[]);const x=O.DataModel.wrapLists(e.default());n.model.set(n,[...r,{node:x,id:sn()}])},g=h("button",{class:"add tooltipped tip-se","aria-label":ue(i,"add_top"),onClick:m},te.plus_circle),_=h(ne,null,r&&Array.isArray(r)&&r.map(({node:x,id:w},b)=>{if(b===d)return h("div",{class:"node node-header"},h("label",null,ue(i,"entries_hidden",`${r.length-d}`)),h("button",{onClick:()=>f(Math.min(d+50,r.length))},ue(i,"entries_hidden.more","50")),h("button",{onClick:()=>f(r.length)},ue(i,"entries_hidden.all")));if(b>d)return null;const A=n.push(b).contextPush("entry"),S=e.type(A)==="object",I=c(w);let k;if(["loot_pool.entries.entry","loot_entry.alternatives.children.entry","loot_entry.group.children.entry","loot_entry.sequence.children.entry","function.set_contents.entries.entry"].includes(A.getContext().join("."))&&Qt(x)&&typeof x.type=="string"&&x.type.replace(/^minecraft:/,"")==="item"&&typeof x.name=="string"){const z=`item/${x.name.replace(/^minecraft:/,"")}`;or.get("texture").includes("minecraft:"+z)?k=h("img",{src:F0(o,z),alt:"",onError:oe=>oe.currentTarget.outerHTML=B1}):k=te.package}if(S&&(I===!1||I===void 0&&r.length>20))return h("div",{class:"node node-header","data-category":e.category(A)},h(tr,{lang:i,path:A,nested:!0}),h("button",{class:"toggle tooltipped tip-se","aria-label":`${ue(i,"expand")}
${ue(i,"expand_all","Ctrl")}`,onClick:l(w)},te.chevron_right),h("label",null,k!=null?k:Ai(i,A,`${b}`)),h(ya,{key:w,path:A,value:x,schema:e}));const M=()=>A.set(void 0),N=()=>{const z=[...n.get()];[z[b-1],z[b]]=[z[b],z[b-1]],n.model.set(n,z)},L=()=>{const z=[...n.get()];[z[b+1],z[b]]=[z[b],z[b+1]],n.model.set(n,z)};return h(no,{key:w,label:k,path:A,schema:e,value:x,lang:i,version:o,states:s,actions:[{icon:"duplicate",label:"duplicate",onSelect:()=>{const z=[...n.get()];z.splice(b,0,{id:sn(),node:Ri(x)}),n.model.set(n,z)}}],ctx:_e(Z({},a),{index:(b===0?1:0)+(b===r.length-1?2:0)})},S&&h("button",{class:"toggle tooltipped tip-se","aria-label":`${ue(i,"collapse")}
${ue(i,"collapse_all","Ctrl")}`,onClick:u(w)},te.chevron_down),h("button",{class:"remove tooltipped tip-se","aria-label":ue(i,"remove"),onClick:M},te.trashcan),r.length>1&&h("div",{class:"node-move"},h("button",{class:"move tooltipped tip-se","aria-label":ue(i,"move_up"),onClick:N,disabled:b===0},te.chevron_up),h("button",{class:"move tooltipped tip-se","aria-label":ue(i,"move_down"),onClick:L,disabled:b===r.length-1},te.chevron_down)))}),r&&r.length>0&&r.length<=d&&h("div",{class:"node node-header"},h("button",{class:"add tooltipped tip-se","aria-label":ue(i,"add_bottom"),onClick:v},te.plus_circle)));return[null,g,_]},map({children:e,keys:t,config:n},r,i,o,s,a,l){var x,w,b,A,S;const{expand:u,collapse:c,isToggled:d}=to(),f=new O.ModelPath(z1,new O.Path([Y1(r.toString())])),p=()=>{const I=f.get();r.model.set(r.push(I),O.DataModel.wrapLists(e.default()))},m=((x=n.validation)==null?void 0:x.validator)==="block_state_map"?a==null?void 0:a[O.relativePath(r,n.validation.params.id).get()]:null,v=m!=null&&m.properties?O.StringNode(null,{enum:Object.keys((w=m.properties)!=null?w:{})}):t;if(m&&r.last()==="Properties"){typeof i!="object"&&(i={});const I=Object.entries((b=m.properties)!=null?b:{}).map(([k,M])=>[k,O.StringNode(null,{enum:M})]);return Object.entries((A=m.properties)!=null?A:{}).forEach(([k,M])=>{typeof i[k]!="string"?r.model.errors.add(r.push(k),"error.expected_string"):M.includes(i[k])||r.model.errors.add(r.push(k),"error.invalid_enum_option",i[k])}),O.ObjectNode(Object.fromEntries(I)).hook(this,r,i,o,s,a,l)}const g=h(ne,null,v.hook(this,f,(S=f.get())!=null?S:"",o,s,a,l)[1],h("button",{class:"add tooltipped tip-se","aria-label":ue(o,"add"),onClick:p},te.plus_circle)),_=h(ne,null,typeof i=="object"&&Object.entries(i).map(([I,k])=>{var oe,le,T,$;const M=r.modelPush(I),N=e.type(M)==="object",L=d(I);if(N&&(L===!1||L===void 0&&i.length>20))return h("div",{class:"node node-header","data-category":e.category(M)},h(tr,{lang:o,path:M,nested:!0}),h("button",{class:"toggle tooltipped tip-se","aria-label":`${ue(o,"expand")}
${ue(o,"expand_all","Ctrl")}`,onClick:u(I)},te.chevron_right),h("label",null,I),h(ya,{key:I,path:M,value:k,schema:e}));const F=m?O.StringNode(null,{enum:(le=(oe=m.properties)==null?void 0:oe[I])!=null?le:[]}):e;((T=m==null?void 0:m.properties)==null?void 0:T[I])&&typeof k=="string"&&!(($=m.properties)!=null&&$[I].includes(k))&&r.model.errors.add(M,"error.invalid_enum_option",k);const z=()=>M.set(void 0);return h(no,{key:I,schema:F,path:M,value:k,lang:o,version:s,states:a,ctx:l,label:I},N&&h("button",{class:"toggle tooltipped tip-se","aria-label":`${ue(o,"collapse")}
${ue(o,"collapse_all","Ctrl")}`,onClick:c(I)},te.chevron_down),h("button",{class:"remove tooltipped tip-se","aria-label":ue(o,"remove"),onClick:z},te.trashcan))}));return[null,g,_]},number(e,t,n,r,i,o,s){return[null,h(H1,Z({},_e(Z({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s}))),null]},object({node:e,config:t,getActiveFields:n,getChildModelPath:r},i,o,s,a,l,u){var x;const{expand:c,collapse:d,isToggled:f}=to();if(i.getArray().length==0&&W1(t.context,o)){const{wrapper:w,fields:b}=q1(n(i),i,o);o=w.data,n=()=>b,r=(A,S)=>new O.ModelPath(w,new O.Path(A.getArray(),["feature"])).push(S)}let p=null,m=null;if(e.optional())if(o===void 0){const w=()=>i.set(O.DataModel.wrapLists(e.default()));m=h("button",{class:"collapse closed tooltipped tip-se","aria-label":ue(s,"expand"),onClick:w},te.plus_circle)}else{const w=()=>i.set(void 0);m=h("button",{class:"collapse open tooltipped tip-se","aria-label":ue(s,"remove"),onClick:w},te.trashcan)}const v=i.getContext().join(".");if(D1.includes(v)||wa.includes(v)){const w=f(""),b=wa.includes(v)?w:!w;if(p=h(ne,null,h("button",{class:"toggle tooltipped tip-se","aria-label":ue(s,b?"collapse":"expand"),onClick:w?d(""):c("")},b?te.chevron_down:te.chevron_right)),!b)return[p,m,null]}const g=typeof o=="object"&&o!==null&&((x=e.default())==null?void 0:x.pools)?_e(Z({},u),{loot:o==null?void 0:o.type}):u,_=h(ne,null,typeof o=="object"&&o!==null&&!(e.optional()&&o===void 0)&&Object.entries(n(i)).filter(([w,b])=>b.enabled(i)).map(([w,b])=>{const A=r(i,w),S=A.getContext().join(".");if(T1.includes(S))return null;const[I,k,M]=b.hook(this,A,o[w],s,a,l,g),N=b.type(A)==="object"&&L1.includes(S),L=R1.includes(S);return N||L?(p=h(ne,null,p,h(tr,{lang:s,path:A}),h(Wc,{lang:s,path:A}),I),m=h(ne,null,m,k),N?M:null):h(no,{key:w,schema:b,path:A,value:o[w],lang:s,version:a,states:l,ctx:g})}));return[p,m,_]},string(e,t,n,r,i,o,s){return[null,h(U1,Z({},_e(Z({},e),{path:t,value:n,lang:r,version:i,states:o,ctx:s}))),null]}};function ya({path:e,value:t}){var r,i,o,s,a;switch(e.getContext().join(".")){case"loot_table.pools.entry":return h("label",null,(i=(r=t==null?void 0:t.entries)==null?void 0:r.length)!=null?i:0," entries");case"function.set_contents.entries.entry":case"loot_pool.entries.entry":return h("label",null,(a=(o=t==null?void 0:t.name)==null?void 0:o.replace(/^minecraft:/,""))!=null?a:(s=t==null?void 0:t.type)==null?void 0:s.replace(/^minecraft:/,""))}for(const l of Object.values(t!=null?t:{}))if(typeof l=="string")return h("label",null,l.replace(/^minecraft:/,""));return null}function to(){const[e,t]=D(new Map),[n,r]=D(void 0);return{expand:a=>l=>{l.ctrlKey?(t(new Map),r(!0)):t(u=>new Map(u.set(a,!0)))},collapse:a=>l=>{l.ctrlKey?(t(new Map),r(!1)):t(u=>new Map(u.set(a,!1)))},isToggled:a=>{var l;return e instanceof Map?(l=e.get(a))!=null?l:n:!1}}}function V1({path:e,node:t,value:n,lang:r}){const i=o=>{e.model.set(e,t.optional()&&n===o?void 0:o)};return h(ne,null,h("button",{class:n===!1?"selected":"",onClick:()=>i(!1)},ue(r,"false")),h("button",{class:n===!0?"selected":"",onClick:()=>i(!0)},ue(r,"true")))}function H1({path:e,config:t,integer:n,value:r,lang:i}){var a;const o=l=>{const u=l.target.value,c=n?parseInt(u):parseFloat(u);e.model.set(e,c)},s=l=>{const u=l.target.value,c=parseInt(u.slice(1),16);e.model.set(e,c)};return h(ne,null,h("input",{type:"text",value:r!=null?r:"",onBlur:o,onKeyDown:l=>{l.key==="Enter"&&o(l)}}),(t==null?void 0:t.color)&&h("input",{type:"color",value:"#"+((a=r==null?void 0:r.toString(16).padStart(6,"0"))!=null?a:"000000"),onChange:s}),["dimension.generator.seed","dimension.generator.biome_source.seed","world_settings.seed","structure_placement.salt"].includes(e.getContext().join("."))&&h("button",{onClick:()=>Xl(e.model),class:"tooltipped tip-se","aria-label":ue(i,"generate_new_seed")},te.sync))}function U1({path:e,getValues:t,config:n,node:r,value:i,lang:o,version:s,states:a}){var f,p,m;const l=v=>{v.stopPropagation();const g=v.target.value;g!==i&&e.model.set(e,g.length===0?void 0:g)},u=t(),c=e.getContext().join("."),d=!Kn(n)&&(n==null?void 0:n.validator)==="resource"&&typeof n.params.pool=="string"?n.params.pool:void 0;if(P1.includes(c))return h("textarea",{value:i!=null?i:"",onBlur:l});if(Kn(n)&&!n.additional||N1.includes(c)){let v=new O.Path([]);return Kn(n)&&typeof n.enum=="string"?v=v.contextPush(n.enum):d?v=v.contextPush(d):Kn(n)&&(v=e),h("select",{value:i!=null?i:"",onChange:l},r.optional()&&h("option",{value:""},ue(o,"unset")),u.map(g=>h("option",{value:g},Ai(o,v.contextPush(g.replace(/^minecraft:/,""))))))}else if(!Kn(n)&&(n==null?void 0:n.validator)==="block_state_key"){const v=a==null?void 0:a[O.relativePath(e,n.params.id).get()],g=Object.keys((f=v==null?void 0:v.properties)!=null?f:{});return h("select",{value:i!=null?i:"",onChange:l},g.map(_=>h("option",null,_)))}else{const{biomeColors:v,setBiomeColor:g}=mc(),_=typeof i=="string"?i.includes(":")?i:"minecraft:"+i:"unknown",x=sn(),w=d?F1(d):void 0;return h(ne,null,h("input",{value:i!=null?i:"",onBlur:l,onKeyDown:b=>{b.key==="Enter"&&l(b)},list:u.length>0?x:""}),u.length>0&&h("datalist",{id:x},u.map(b=>h("option",{value:b}))),["generator_biome.biome"].includes(c)&&h("input",{type:"color",value:_0((m=(p=v[_])!=null?p:Bc[_])!=null?m:jo(_)),onChange:b=>g(_,v0(b.currentTarget.value))}),["attribute_modifier.id","text_component_object.hoverEvent.show_entity.contents.id"].includes(c)&&h("button",{onClick:()=>e.set(h0()),class:"tooltipped tip-se","aria-label":ue(o,"generate_new_uuid")},te.sync),w&&u.includes(i)&&i.startsWith("minecraft:")&&h("a",{href:`/${w.url}/?version=${s}&preset=${i.replace(/^minecraft:/,"")}`,class:"tooltipped tip-se","aria-label":ue(o,"follow_reference")},te.link_external))}}function G1({label:e,schema:t,path:n,value:r,lang:i,version:o,states:s,ctx:a,actions:l,children:u}){var b;const c=t.type(n),d=t.category(n),f=n.getContext().join("."),[p,m]=Vo(),v=A=>{A.preventDefault(),m()},g=_e(Z({},a),{depth:((b=a.depth)!=null?b:0)+1});delete g.index;const[_,x,w]=t.hook(Yc,n,r,i,o,s,g);return h("div",{class:`node ${c}-node`,"data-category":d},h("div",{class:"node-header",onContextMenu:v},h(tr,{lang:i,path:n}),h(Wc,{lang:i,path:n}),u,_,h("label",null,e!=null?e:Ai(i,n,`${n.last()}`),p&&h("div",{class:"node-menu"},l==null?void 0:l.map(A=>{var S;return h("div",{key:A.label,class:"menu-item"},h(X,{icon:A.icon,tooltip:ue(i,A.label),tooltipLoc:"se",onClick:()=>A.onSelect()}),h("span",null,(S=A.description)!=null?S:ue(i,A.label)))}),h("div",{class:"menu-item"},h(X,{icon:"clippy",tooltip:ue(i,"copy_context"),tooltipLoc:"se",onClick:()=>navigator.clipboard.writeText(f)}),h("span",null,f)))),x),w&&h("div",{class:"node-body"},w))}const no=zc(G1,(e,t)=>e.schema===t.schema&&e.lang===t.lang&&e.path.equals(t.path)&&cn(e.ctx,t.ctx)&&cn(e.value,t.value));function Kn(e){return!!(e!=null&&e.enum)}function Y1(e){var t=0,n,r;for(n=0;n<e.length;n++)r=e.charCodeAt(n),t=(t<<5)-t+r,t|=0;return t}function Ai(e,t,...n){const r=t.getContext();for(let i=0;i<r.length;i+=1){const o=r.slice(i).join("."),s=ue(e,o,...n);if(o!==s)return s}return r[r.length-1]}function tr({lang:e,path:t,nested:n}){var o;t.model instanceof Gc&&(t=t.model.map(t).withModel(t.model));const r=n?t.model.errors.getAll().filter(s=>s.path.startsWith(t)):t.model.errors.get(t,!0);if(r.length===0)return null;const i=ue(e,r[0].error,...(o=r[0].params)!=null?o:[]);return qc("node-error","issue_opened",i)}function Wc({lang:e,path:t}){const n=t.contextPush("help").getContext().join("."),r=ue(e,n);return r===n?null:qc("node-help","info",r)}const qc=(e,t,n)=>{const[r,i]=Vo();return h("div",{class:`node-icon ${e}${r?" show":""}`,onClick:i},te[t],h("span",{class:"icon-popup"},n))};function W1(e,t){var n;return e==="feature"&&((n=t==null?void 0:t.type)==null?void 0:n.replace(/^minecraft:/,""))==="decorated"&&Qt(t==null?void 0:t.config)}function q1(e,t,n){const r=[],i=nr(n,r),o={type:e.type,config:O.ObjectNode({decorators:O.ListNode(sc),feature:ac},{context:"feature.decorated"})},s=O.ObjectNode(o,{context:"feature"}),a=new O.Path(["config","feature"]),l=new O.Path(["config","decorators"]),u=t.getModel(),c=new Gc(s,d=>{if(d.startsWith(a))return new O.Path([...[...Array(r.length-1)].flatMap(()=>["config","feature"]),...d.modelArr]);if(d.startsWith(l)){if(d.modelArr.length===2)return new O.Path([]);const f=d.modelArr[2];if(typeof f=="number")return new O.Path([...[...Array(f)].flatMap(()=>["config","feature"]),"config","decorator",...d.modelArr.slice(3)])}return d},d=>{if(d.equals(l)){const f=[];return nr(u.data,f),f}return u.get(c.map(d))},(d,f,p)=>{if(d.startsWith(a)){const m=[];nr(u.data,m);const v=new O.Path([...[...Array(m.length-1)].flatMap(()=>["config","feature"]),...d.modelArr]);return u.set(v,f,p)}else if(d.startsWith(l)){const m=d.modelArr[2];if(d.modelArr.length===2){const v=c.get(a);return u.set(new O.Path,Mo(v,f),p)}else if(typeof m=="number")if(d.modelArr.length===3&&f===void 0){const v=c.get(a),g=[];nr(u.data,g),g.splice(m,1);const _=Mo(v,g);return u.set(new O.Path,_,p)}else{const v=new O.Path([...[...Array(m)].flatMap(()=>["config","feature"]),"config","decorator",...d.modelArr.slice(3)]);return u.set(v,f,p)}}u.set(d,f,p)});return c.data={type:u.data.type,config:{decorators:r,feature:i}},c.errors=u.errors,{fields:o,wrapper:c}}function nr(e,t){var n,r;return((n=e==null?void 0:e.type)==null?void 0:n.replace(/^minecraft:/,""))!=="decorated"||!Qt(e==null?void 0:e.config)?e:(t.push({id:t.length,node:e.config.decorator}),nr((r=e.config.feature)!=null?r:"",t))}function Mo(e,t){return t.length===0?e:{type:"minecraft:decorated",config:{decorator:t.shift().node,feature:Mo(e,t)}}}function Z1({version:e,model:t,blockStates:n,onError:r}){const{lang:i}=Ee();if(!t||!n||i==="none")return h(ne,null);const[o]=al(a=>{r(`Error rendering the tree: ${a.message}`),console.error(a)});if(o)return h(ne,null);const[,s]=D(0);return Pi(t,()=>{s(a=>a+1)}),h("div",{class:"tree","data-cy":"tree"},h(j1,{model:t,lang:i,version:e,blockStates:n}))}var X1=Object.defineProperty,J1=Object.defineProperties,K1=Object.getOwnPropertyDescriptors,ba=Object.getOwnPropertySymbols,Q1=Object.prototype.hasOwnProperty,em=Object.prototype.propertyIsEnumerable,xa=(e,t,n)=>t in e?X1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zc=(e,t)=>{for(var n in t||(t={}))Q1.call(t,n)&&xa(e,n,t[n]);if(ba)for(var n of ba(t))em.call(t,n)&&xa(e,n,t[n]);return e};const Aa="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function Gr(e){return`[giscus] An error occurred. Error message: "${e}".`}function ka(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function tm(){const e=document.getElementById("giscus-css")||document.createElement("style");e.id="giscus-css",e.textContent=`
.giscus, .giscus-frame {
width: 100%;
}
.giscus-frame {
border: none;
color-scheme: normal;
}
`,document.head.prepend(e)}function nm(e){const[t,n]=D(""),r=function({repo:s,repoId:a,category:l="",categoryId:u="",mapping:c,term:d="",theme:f="light",reactionsEnabled:p="1",emitMetadata:m="0",inputPosition:v="bottom",lang:g="en",session:_,origin:x}){const w=new URL(location.href);w.searchParams.delete("giscus");const b=w.toString(),A={origin:x=x||b,session:_,theme:f,reactionsEnabled:p,emitMetadata:m,inputPosition:v,repo:s,repoId:a,category:l,categoryId:u,description:ka("description")};switch(c){case"url":A.term=b;break;case"title":A.term=document.title;break;case"og:title":A.term=ka("title");break;case"specific":A.term=d;break;case"number":A.number=d;break;case"pathname":default:A.term=location.pathname.length<2?"index":location.pathname.substring(1).replace(/\.\w+$/,"")}return`https://giscus.app/${g}/widget?${new URLSearchParams(A)}`}((i=Zc({},e),J1(i,K1({session:t}))));var i;const o=me(null);return Q(()=>{const s=location.href,a=new URL(s),l=localStorage.getItem("giscus-session"),u=a.searchParams.get("giscus")||"";if(u)return localStorage.setItem("giscus-session",JSON.stringify(u)),n(u),a.searchParams.delete("giscus"),void history.replaceState(void 0,document.title,a.toString());if(l)try{n(JSON.parse(l||"")||"")}catch(c){n(""),localStorage.removeItem("giscus-session"),console.warn(`${Gr(c==null?void 0:c.message)} Session has been cleared.`)}},[]),Q(tm,[]),Q(()=>{const s=function(a,l=null){return function(u){if(u.origin!=="https://giscus.app")return;const{data:c}=u;if(typeof c!="object"||!c.giscus||(l&&c.giscus.resizeHeight&&(l.style.height=`${c.giscus.resizeHeight}px`),!c.giscus.error))return;const d=c.giscus.error;if(d.includes("Bad credentials")||d.includes("Invalid state value")){if(localStorage.getItem("giscus-session")!==null)return localStorage.removeItem("giscus-session"),a(),void console.warn(`${Gr(d)} Session has been cleared.`);console.error(`${Gr(d)} No session is stored initially. ${Aa}`)}d.includes("Discussion not found")?console.warn(`[giscus] ${d}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${Gr(d)} ${Aa}`)}}(()=>n(""),o.current);return window.addEventListener("message",s),()=>window.removeEventListener("message",s)},[]),Io.createElement("div",{className:"giscus"},Io.createElement("iframe",{className:"giscus-frame",title:"Comments",scrolling:"no",src:r,ref:o}))}function rm(e){const[t,n]=D(!1);return Q(()=>n(!0),[]),t?Io.createElement(nm,Zc({},e)):null}function Jo({term:e}){const{actualTheme:t}=_c(),n=t==="light"?"-burn":"",r=`${location.protocol}//${location.host}/assets/giscus${n}.css`;return h("div",{class:"giscus-container"},h(rm,{repo:"misode/misode.github.io",repoId:"MDEwOlJlcG9zaXRvcnkxOTIyNTQyMzA=",category:"Site",categoryId:"DIC_kwDOC3WRFs4COB8r",mapping:e?"specific":"pathname",term:e,reactionsEnabled:"1",emitMetadata:"0",inputPosition:"top",theme:r,lang:"en"}))}function Xc(){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}}let qn=Xc();function im(e){qn=e}const om=/[&<>"']/,sm=/[&<>"']/g,am=/[<>"']|&(?!#?\w+;)/,lm=/[<>"']|&(?!#?\w+;)/g,cm={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Sa=e=>cm[e];function $e(e,t){if(t){if(om.test(e))return e.replace(sm,Sa)}else if(am.test(e))return e.replace(lm,Sa);return e}const um=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Jc(e){return e.replace(um,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const dm=/(^|[^\[])\^/g;function xe(e,t){e=e.source||e,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(dm,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const hm=/[^\w:]/g,fm=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ea(e,t,n){if(e){let r;try{r=decodeURIComponent(Jc(n)).replace(hm,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!fm.test(n)&&(n=_m(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Yr={},pm=/^[^:]+:\/*[^/]*$/,mm=/^([^:]+:)[\s\S]*$/,gm=/^([^:]+:\/*[^/]*)[\s\S]*$/;function _m(e,t){Yr[" "+e]||(pm.test(e)?Yr[" "+e]=e+"/":Yr[" "+e]=oi(e,"/",!0)),e=Yr[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(mm,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(gm,"$1")+t:e+t}const ki={exec:function(){}};function wt(e){let t=1,n,r;for(;t<arguments.length;t++){n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}function Ca(e,t){const n=e.replace(/\|/g,(o,s,a)=>{let l=!1,u=s;for(;--u>=0&&a[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r[r.length-1].trim()||r.pop(),r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function oi(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o===t&&!n)i++;else if(o!==t&&n)i++;else break}return e.substr(0,r-i)}function vm(e,t){if(e.indexOf(t[1])===-1)return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1}function Kc(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 Ia(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function Ma(e,t,n,r){const i=t.href,o=t.title?$e(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s,[])};return r.state.inLink=!1,a}else return{type:"image",raw:n,href:i,title:o,text:$e(s)}}function wm(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
`).map(i=>{const o=i.match(/^\s+/);if(o===null)return i;const[s]=o;return s.length>=r.length?i.slice(r.length):i}).join(`
`)}class Ko{constructor(t){this.options=t||qn}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:oi(r,`
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=wm(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim():n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=oi(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}const i={type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:n[0],tokens:this.lexer.blockTokens(r,[]),text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,i,o,s,a,l,u,c,d,f,p,m,v=n[1].trim();const g=v.length>1,_={type:"list",raw:"",ordered:g,start:g?+v.slice(0,-1):"",loose:!1,items:[]};v=g?`\\d{1,9}\\${v.slice(-1)}`:`\\${v}`,this.options.pedantic&&(v=g?v:"[*+-]");const x=new RegExp(`^( {0,3}${v})((?: [^\\n]*)?(?:\\n|$))`);for(;t&&(m=!1,!(!(n=x.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),c=n[2].split(`
`,1)[0],d=t.split(`
`,1)[0],this.options.pedantic?(s=2,p=c.trimLeft()):(s=n[2].search(/[^ ]/),s=s>4?1:s,p=c.slice(s),s+=n[1].length),l=!1,!c&&/^ *$/.test(d)&&(r+=d+`
`,t=t.substring(d.length+1),m=!0),!m){const b=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(f=t.split(`
`,1)[0],c=f,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c));){if(c.search(/[^ ]/)>=s||!c.trim())p+=`
`+c.slice(s);else if(!l)p+=`
`+c;else break;!l&&!c.trim()&&(l=!0),r+=f+`
`,t=t.substring(f.length+1)}}_.loose||(u?_.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(p),i&&(o=i[0]!=="[ ] ",p=p.replace(/^\[[ xX]\] +/,""))),_.items.push({type:"list_item",raw:r,task:!!i,checked:o,loose:!1,text:p}),_.raw+=r}_.items[_.items.length-1].raw=r.trimRight(),_.items[_.items.length-1].text=p.trimRight(),_.raw=_.raw.trimRight();const w=_.items.length;for(a=0;a<w;a++){this.lexer.state.top=!1,_.items[a].tokens=this.lexer.blockTokens(_.items[a].text,[]);const b=_.items[a].tokens.filter(S=>S.type==="space"),A=b.every(S=>{const I=S.raw.split("");let k=0;for(const M of I)if(M===`
`&&(k+=1),k>1)return!0;return!1});!_.loose&&b.length&&A&&(_.loose=!0,_.items[a].loose=!0)}return _}}html(t){const n=this.rules.block.html.exec(t);if(n){const r={type:"html",raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};return this.options.sanitize&&(r.type="paragraph",r.text=this.options.sanitizer?this.options.sanitizer(n[0]):$e(n[0]),r.tokens=[],this.lexer.inline(r.text,r.tokens)),r}}def(t){const n=this.rules.block.def.exec(t);if(n){n[3]&&(n[3]=n[3].substring(1,n[3].length-1));const r=n[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:r,raw:n[0],href:n[2],title:n[3]}}}table(t){const n=this.rules.block.table.exec(t);if(n){const r={type:"table",header:Ca(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]?n[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,o,s,a,l;for(o=0;o<i;o++)/^ *-+: *$/.test(r.align[o])?r.align[o]="right":/^ *:-+: *$/.test(r.align[o])?r.align[o]="center":/^ *:-+ *$/.test(r.align[o])?r.align[o]="left":r.align[o]=null;for(i=r.rows.length,o=0;o<i;o++)r.rows[o]=Ca(r.rows[o],r.header.length).map(u=>({text:u}));for(i=r.header.length,s=0;s<i;s++)r.header[s].tokens=[],this.lexer.inlineTokens(r.header[s].text,r.header[s].tokens);for(i=r.rows.length,s=0;s<i;s++)for(l=r.rows[s],a=0;a<l.length;a++)l[a].tokens=[],this.lexer.inlineTokens(l[a].text,l[a].tokens);return r}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n){const r={type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const r={type:"paragraph",raw:n[0],text:n[1].charAt(n[1].length-1)===`
`?n[1].slice(0,-1):n[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}text(t){const n=this.rules.block.text.exec(t);if(n){const r={type:"text",raw:n[0],text:n[0],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:$e(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):$e(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const s=oi(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{const s=vm(n[2],"()");if(s>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],o="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);s&&(i=s[1],o=s[3])}else o=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),Ma(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i||!i.href){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return Ma(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const o=i[1]||i[2]||"";if(!o||o&&(r===""||this.rules.inline.punctuation.exec(r))){const s=i[0].length-1;let a,l,u=s,c=0;const d=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+s);(i=d.exec(n))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(l=a.length,i[3]||i[4]){u+=l;continue}else if((i[5]||i[6])&&s%3&&!((s+l)%3)){c+=l;continue}if(u-=l,u>0)continue;if(l=Math.min(l,l+u+c),Math.min(s,l)%2){const p=t.slice(1,s+i.index+l);return{type:"em",raw:t.slice(0,s+i.index+l+1),text:p,tokens:this.lexer.inlineTokens(p,[])}}const f=t.slice(2,s+i.index+l-1);return{type:"strong",raw:t.slice(0,s+i.index+l+1),text:f,tokens:this.lexer.inlineTokens(f,[])}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),o=/^ /.test(r)&&/ $/.test(r);return i&&o&&(r=r.substring(1,r.length-1)),r=$e(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2],[])}}autolink(t,n){const r=this.rules.inline.autolink.exec(t);if(r){let i,o;return r[2]==="@"?(i=$e(this.options.mangle?n(r[1]):r[1]),o="mailto:"+i):(i=$e(r[1]),o=i),{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,o;if(r[2]==="@")i=$e(this.options.mangle?n(r[0]):r[0]),o="mailto:"+i;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(s!==r[0]);i=$e(r[0]),r[1]==="www."?o="http://"+i:o=i}return{type:"link",raw:r[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):$e(r[0]):r[0]:i=$e(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const q={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:ki,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};q._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;q._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;q.def=xe(q.def).replace("label",q._label).replace("title",q._title).getRegex();q.bullet=/(?:[*+-]|\d{1,9}[.)])/;q.listItemStart=xe(/^( *)(bull) */).replace("bull",q.bullet).getRegex();q.list=xe(q.list).replace(/bull/g,q.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+q.def.source+")").getRegex();q._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";q._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;q.html=xe(q.html,"i").replace("comment",q._comment).replace("tag",q._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();q.paragraph=xe(q._paragraph).replace("hr",q.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",q._tag).getRegex();q.blockquote=xe(q.blockquote).replace("paragraph",q.paragraph).getRegex();q.normal=wt({},q);q.gfm=wt({},q.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});q.gfm.table=xe(q.gfm.table).replace("hr",q.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",q._tag).getRegex();q.gfm.paragraph=xe(q._paragraph).replace("hr",q.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",q.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",q._tag).getRegex();q.pedantic=wt({},q.normal,{html:xe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",q._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:ki,paragraph:xe(q.normal._paragraph).replace("hr",q.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",q.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const j={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ki,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:ki,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};j._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";j.punctuation=xe(j.punctuation).replace(/punctuation/g,j._punctuation).getRegex();j.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;j.escapedEmSt=/\\\*|\\_/g;j._comment=xe(q._comment).replace("(?:-->|$)","-->").getRegex();j.emStrong.lDelim=xe(j.emStrong.lDelim).replace(/punct/g,j._punctuation).getRegex();j.emStrong.rDelimAst=xe(j.emStrong.rDelimAst,"g").replace(/punct/g,j._punctuation).getRegex();j.emStrong.rDelimUnd=xe(j.emStrong.rDelimUnd,"g").replace(/punct/g,j._punctuation).getRegex();j._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;j._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;j._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])?)+(?![-_])/;j.autolink=xe(j.autolink).replace("scheme",j._scheme).replace("email",j._email).getRegex();j._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;j.tag=xe(j.tag).replace("comment",j._comment).replace("attribute",j._attribute).getRegex();j._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;j._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;j._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;j.link=xe(j.link).replace("label",j._label).replace("href",j._href).replace("title",j._title).getRegex();j.reflink=xe(j.reflink).replace("label",j._label).replace("ref",q._label).getRegex();j.nolink=xe(j.nolink).replace("ref",q._label).getRegex();j.reflinkSearch=xe(j.reflinkSearch,"g").replace("reflink",j.reflink).replace("nolink",j.nolink).getRegex();j.normal=wt({},j);j.pedantic=wt({},j.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:xe(/^!?\[(label)\]\((.*?)\)/).replace("label",j._label).getRegex(),reflink:xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",j._label).getRegex()});j.gfm=wt({},j.normal,{escape:xe(j.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.!#$%&'*+\/=?_`{\|}~-]+@)))/});j.gfm.url=xe(j.gfm.url,"i").replace("email",j.gfm._extended_email).getRegex();j.breaks=wt({},j.gfm,{br:xe(j.br).replace("{2,}","*").getRegex(),text:xe(j.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function ym(e){return e.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Oa(e){let t="",n,r;const i=e.length;for(n=0;n<i;n++)r=e.charCodeAt(n),Math.random()>.5&&(r="x"+r.toString(16)),t+="&#"+r+";";return t}class Ut{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||qn,this.options.tokenizer=this.options.tokenizer||new Ko,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 n={block:q.normal,inline:j.normal};this.options.pedantic?(n.block=q.pedantic,n.inline=j.pedantic):this.options.gfm&&(n.block=q.gfm,this.options.breaks?n.inline=j.breaks:n.inline=j.gfm),this.tokenizer.rules=n}static get rules(){return{block:q,inline:j}}static lex(t,n){return new Ut(n).lex(t)}static lexInline(t,n){return new Ut(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic&&(t=t.replace(/^ +$/gm,""));let r,i,o,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+r.raw,i.text+=`
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const l=t.slice(1);let u;this.options.extensions.startBlock.forEach(function(c){u=c.call({lexer:this},l),typeof u=="number"&&u>=0&&(a=Math.min(a,u))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){i=n[n.length-1],s&&i.type==="paragraph"?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),s=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
`+r.raw,i.text+=`
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n){this.inlineQueue.push({src:t,tokens:n})}inlineTokens(t,n=[]){let r,i,o,s=t,a,l,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+Ia("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+Ia("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,s,u)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t,Oa)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,Oa))){t=t.substring(r.raw.length),n.push(r);continue}if(o=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=t.slice(1);let f;this.options.extensions.startInline.forEach(function(p){f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(o=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(o,ym)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),l=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Qo{constructor(t){this.options=t||qn}code(t,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const o=this.options.highlight(t,i);o!=null&&o!==t&&(r=!0,t=o)}return t=t.replace(/\n$/,"")+`
`,i?'<pre><code class="'+this.options.langPrefix+$e(i,!0)+'">'+(r?t:$e(t,!0))+`</code></pre>
`:"<pre><code>"+(r?t:$e(t,!0))+`</code></pre>
`}blockquote(t){return`<blockquote>
`+t+`</blockquote>
`}html(t){return t}heading(t,n,r,i){return this.options.headerIds?"<h"+n+' id="'+this.options.headerPrefix+i.slug(r)+'">'+t+"</h"+n+`>
`:"<h"+n+">"+t+"</h"+n+`>
`}hr(){return this.options.xhtml?`<hr/>
`:`<hr>
`}list(t,n,r){const i=n?"ol":"ul",o=n&&r!==1?' start="'+r+'"':"";return"<"+i+o+`>
`+t+"</"+i+`>
`}listitem(t){return"<li>"+t+`</li>
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return"<p>"+t+`</p>
`}table(t,n){return n&&(n="<tbody>"+n+"</tbody>"),`<table>
<thead>
`+t+`</thead>
`+n+`</table>
`}tablerow(t){return`<tr>
`+t+`</tr>
`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?"<"+r+' align="'+n.align+'">':"<"+r+">")+t+"</"+r+`>
`}strong(t){return"<strong>"+t+"</strong>"}em(t){return"<em>"+t+"</em>"}codespan(t){return"<code>"+t+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return"<del>"+t+"</del>"}link(t,n,r){if(t=Ea(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='<a href="'+$e(t)+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){if(t=Ea(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='<img src="'+t+'" alt="'+r+'"';return n&&(i+=' title="'+n+'"'),i+=this.options.xhtml?"/>":">",i}text(t){return t}}class Qc{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class eu{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let r=t,i=0;if(this.seen.hasOwnProperty(r)){i=this.seen[t];do i++,r=t+"-"+i;while(this.seen.hasOwnProperty(r))}return n||(this.seen[t]=i,this.seen[r]=0),r}slug(t,n={}){const r=this.serialize(t);return this.getNextSafeSlug(r,n.dryrun)}}class Gt{constructor(t){this.options=t||qn,this.options.renderer=this.options.renderer||new Qo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Qc,this.slugger=new eu}static parse(t,n){return new Gt(n).parse(t)}static parseInline(t,n){return new Gt(n).parseInline(t)}parse(t,n=!0){let r="",i,o,s,a,l,u,c,d,f,p,m,v,g,_,x,w,b,A,S;const I=t.length;for(i=0;i<I;i++){if(p=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[p.type]&&(S=this.options.extensions.renderers[p.type].call({parser:this},p),S!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(p.type))){r+=S||"";continue}switch(p.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{r+=this.renderer.heading(this.parseInline(p.tokens),p.depth,Jc(this.parseInline(p.tokens,this.textRenderer)),this.slugger);continue}case"code":{r+=this.renderer.code(p.text,p.lang,p.escaped);continue}case"table":{for(d="",c="",a=p.header.length,o=0;o<a;o++)c+=this.renderer.tablecell(this.parseInline(p.header[o].tokens),{header:!0,align:p.align[o]});for(d+=this.renderer.tablerow(c),f="",a=p.rows.length,o=0;o<a;o++){for(u=p.rows[o],c="",l=u.length,s=0;s<l;s++)c+=this.renderer.tablecell(this.parseInline(u[s].tokens),{header:!1,align:p.align[s]});f+=this.renderer.tablerow(c)}r+=this.renderer.table(d,f);continue}case"blockquote":{f=this.parse(p.tokens),r+=this.renderer.blockquote(f);continue}case"list":{for(m=p.ordered,v=p.start,g=p.loose,a=p.items.length,f="",o=0;o<a;o++)x=p.items[o],w=x.checked,b=x.task,_="",x.task&&(A=this.renderer.checkbox(w),g?x.tokens.length>0&&x.tokens[0].type==="paragraph"?(x.tokens[0].text=A+" "+x.tokens[0].text,x.tokens[0].tokens&&x.tokens[0].tokens.length>0&&x.tokens[0].tokens[0].type==="text"&&(x.tokens[0].tokens[0].text=A+" "+x.tokens[0].tokens[0].text)):x.tokens.unshift({type:"text",text:A}):_+=A),_+=this.parse(x.tokens,g),f+=this.renderer.listitem(_,b,w);r+=this.renderer.list(f,m,v);continue}case"html":{r+=this.renderer.html(p.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(p.tokens));continue}case"text":{for(f=p.tokens?this.parseInline(p.tokens):p.text;i+1<I&&t[i+1].type==="text";)p=t[++i],f+=`
`+(p.tokens?this.parseInline(p.tokens):p.text);r+=n?this.renderer.paragraph(f):f;continue}default:{const k='Token with "'+p.type+'" type was not found.';if(this.options.silent){console.error(k);return}else throw new Error(k)}}}return r}parseInline(t,n){n=n||this.renderer;let r="",i,o,s;const a=t.length;for(i=0;i<a;i++){if(o=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]&&(s=this.options.extensions.renderers[o.type].call({parser:this},o),s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type))){r+=s||"";continue}switch(o.type){case"escape":{r+=n.text(o.text);break}case"html":{r+=n.html(o.text);break}case"link":{r+=n.link(o.href,o.title,this.parseInline(o.tokens,n));break}case"image":{r+=n.image(o.href,o.title,o.text);break}case"strong":{r+=n.strong(this.parseInline(o.tokens,n));break}case"em":{r+=n.em(this.parseInline(o.tokens,n));break}case"codespan":{r+=n.codespan(o.text);break}case"br":{r+=n.br();break}case"del":{r+=n.del(this.parseInline(o.tokens,n));break}case"text":{r+=n.text(o.text);break}default:{const l='Token with "'+o.type+'" type was not found.';if(this.options.silent){console.error(l);return}else throw new Error(l)}}}return r}}function re(e,t,n){if(typeof e=="undefined"||e===null)throw new Error("marked(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(typeof t=="function"&&(n=t,t=null),t=wt({},re.defaults,t||{}),Kc(t),n){const r=t.highlight;let i;try{i=Ut.lex(e,t)}catch(a){return n(a)}const o=function(a){let l;if(!a)try{t.walkTokens&&re.walkTokens(i,t.walkTokens),l=Gt.parse(i,t)}catch(u){a=u}return t.highlight=r,a?n(a):n(null,l)};if(!r||r.length<3||(delete t.highlight,!i.length))return o();let s=0;re.walkTokens(i,function(a){a.type==="code"&&(s++,setTimeout(()=>{r(a.text,a.lang,function(l,u){if(l)return o(l);u!=null&&u!==a.text&&(a.text=u,a.escaped=!0),s--,s===0&&o()})},0))}),s===0&&o();return}try{const r=Ut.lex(e,t);return t.walkTokens&&re.walkTokens(r,t.walkTokens),Gt.parse(r,t)}catch(r){if(r.message+=`
Please report this to https://github.com/markedjs/marked.`,t.silent)return"<p>An error occurred:</p><pre>"+$e(r.message+"",!0)+"</pre>";throw r}}re.options=re.setOptions=function(e){return wt(re.defaults,e),im(re.defaults),re};re.getDefaults=Xc;re.defaults=qn;re.use=function(...e){const t=wt({},...e),n=re.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach(i=>{if(i.extensions&&(r=!0,i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){const s=n.renderers?n.renderers[o.name]:null;s?n.renderers[o.name]=function(...a){let l=o.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:n.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");n[o.level]?n[o.level].unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}o.childTokens&&(n.childTokens[o.name]=o.childTokens)})),i.renderer){const o=re.defaults.renderer||new Qo;for(const s in i.renderer){const a=o[s];o[s]=(...l)=>{let u=i.renderer[s].apply(o,l);return u===!1&&(u=a.apply(o,l)),u}}t.renderer=o}if(i.tokenizer){const o=re.defaults.tokenizer||new Ko;for(const s in i.tokenizer){const a=o[s];o[s]=(...l)=>{let u=i.tokenizer[s].apply(o,l);return u===!1&&(u=a.apply(o,l)),u}}t.tokenizer=o}if(i.walkTokens){const o=re.defaults.walkTokens;t.walkTokens=function(s){i.walkTokens.call(this,s),o&&o.call(this,s)}}r&&(t.extensions=n),re.setOptions(t)})};re.walkTokens=function(e,t){for(const n of e)switch(t.call(re,n),n.type){case"table":{for(const r of n.header)re.walkTokens(r.tokens,t);for(const r of n.rows)for(const i of r)re.walkTokens(i.tokens,t);break}case"list":{re.walkTokens(n.items,t);break}default:re.defaults.extensions&&re.defaults.extensions.childTokens&&re.defaults.extensions.childTokens[n.type]?re.defaults.extensions.childTokens[n.type].forEach(function(r){re.walkTokens(n[r],t)}):n.tokens&&re.walkTokens(n.tokens,t)}};re.parseInline=function(e,t){if(typeof e=="undefined"||e===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=wt({},re.defaults,t||{}),Kc(t);try{const n=Ut.lexInline(e,t);return t.walkTokens&&re.walkTokens(n,t.walkTokens),Gt.parseInline(n,t)}catch(n){if(n.message+=`
Please report this to https://github.com/markedjs/marked.`,t.silent)return"<p>An error occurred:</p><pre>"+$e(n.message+"",!0)+"</pre>";throw n}};re.Parser=Gt;re.parser=Gt.parse;re.Renderer=Qo;re.TextRenderer=Qc;re.Lexer=Ut;re.lexer=Ut.lex;re.Tokenizer=Ko;re.Slugger=eu;re.parse=re;Gt.parse;Ut.lex;function bm({change:e,activeTags:t,toggleTag:n}){return h("div",{class:"changelog-entry"},h("div",{class:"changelog-version"},h("a",{href:`/versions/?id=${e.version}`},e.version),h("a",{href:`/versions/?id=${e.group}`},e.group)),h("div",{class:"changelog-tags"},e.tags.map(r=>h(Dr,{label:r,onClick:n?()=>n(r):void 0,active:t==null?void 0:t.includes(r)}))),h("div",{class:"changelog-content",dangerouslySetInnerHTML:{__html:re(e.content)}}))}const xm="tags",ro="|";function tu(){const[e,t]=un(xm),n=ke(()=>{var i;return(i=e==null?void 0:e.split(ro))!=null?i:[]},[e]);return[n,(i,o)=>{o===!1||n.includes(i)&&o!==!0?t(n.filter(s=>s!==i).join(ro),!0):t([...n,i].sort().join(ro),!0)}]}function Dr({label:e,active:t,onClick:n}){const r=e==="breaking"?5:Jl(e)%360;return h("div",{class:`changelog-tag${t?" active":""}${n?" clickable":""}`,style:`--tint: ${r}`,onClick:n},e==="breaking"&&te.alert,e)}const Am="search";function nu({changes:e,defaultOrder:t}){const{locale:n}=Ee(),[r,i]=un(Am),[o,s]=tu(),a=ke(()=>{const d=(r!=null?r:"").split(" ").map(f=>f.trim().toLowerCase()).filter(f=>f.length>0);return d.length===0&&o.length===0?e:e==null?void 0:e.filter(f=>{if(!o.every(m=>f.tags.includes(m)))return!1;const p=f.tags.join(" ")+" "+f.content.toLowerCase();return d.every(m=>m.startsWith("!")?m.length===1||!p.includes(m.slice(1)):p.includes(m))})},[e,r,o]),[l,u]=D(t==="desc"),c=ke(()=>a==null?void 0:a.sort((d,f)=>l?f.order-d.order:d.order-f.order),[a,l]);return h(ne,null,h("div",{class:"changelog-query"},h(dn,{class:"btn btn-input changelog-search",list:"sound-list",placeholder:n("changelog.search"),value:r,onChange:d=>i(d,!0)}),h(X,{icon:l?"sort_desc":"sort_asc",label:l?"Newest first":"Oldest first",onClick:()=>u(!l)})),o.length>0&&h("div",{class:"changelog-tags"},o.map(d=>h(Dr,{label:d,onClick:()=>s(d)}))),h("div",{class:"changelog-list"},c===void 0?h("span",{class:"note"},n("loading")):c.length===0?h("span",{class:"note"},n("changelog.no_results")):c.map(d=>h(bm,{change:d,activeTags:o,toggleTag:s}))))}function km({id:e,version:t}){var u,c;const{locale:n}=Ee(),[r,i]=D("changelog"),[o,s]=D(void 0);Q(()=>{tc().then(d=>s(d.map(f=>_e(Z({},f),{tags:f.tags.filter(p=>p!==f.group)})))).catch(d=>console.error(d))},[]);const a=ke(()=>o==null?void 0:o.filter(d=>d.version===e||d.group===e),[e,o]),l=t&&N0(t.id);return h(ne,null,h("div",{class:"version-detail"},h("h2",null,(u=t==null?void 0:t.name)!=null?u:e),h("div",{class:"version-info"},t?h(ne,null,h($t,{label:n("versions.released"),value:ru(t)}),h($t,{label:n("versions.release_target"),value:t.release_target,link:t.id!==t.release_target?`/versions/?id=${t.release_target}`:void 0}),h($t,{label:n("versions.data_version"),value:t.data_version}),h($t,{label:n("versions.protocol_version"),value:t.protocol_version}),h($t,{label:n("versions.data_pack_format"),value:t.data_pack_version}),h($t,{label:n("versions.resource_pack_format"),value:t.resource_pack_version})):((c=a==null?void 0:a.length)!=null?c:0>1)?h("p",null,"This version is not released yet."):h("p",null,"This version does not exist. Only versions since 1.14 are tracked, or it may be too recent.")),h("div",{class:"version-tabs"},h("span",{class:r==="changelog"?"selected":"",onClick:()=>i("changelog")},n("versions.technical_changes")),h("span",{class:r==="discussion"?"selected":"",onClick:()=>i("discussion")},n("versions.discussion")),l&&h("a",{href:l,target:"_blank"},n("versions.article"),te.link_external)),h("div",{class:"version-tab"},r==="changelog"&&h(nu,{changes:a,defaultOrder:"asc"}),r==="discussion"&&h(Jo,{term:`version/${e}/`}))))}function ru(e){return new Date(e.release_time).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}function Sm({version:e,link:t}){const{locale:n}=Ee();return h("a",{class:"version-entry",href:t},h("span",{class:"version-id"},e.id),h($t,{label:n("versions.released"),value:ru(e),compact:!0}),h($t,{label:n("versions.data_version"),value:e.data_version,optional:!0}),h($t,{label:n("versions.pack_format"),value:e.data_pack_version,optional:!0}))}const Em="search";function Cm({versions:e,link:t}){const{locale:n}=Ee(),[r,i]=D(!0),[o,s]=un(Em),a=ke(()=>e.filter(l=>l.type==="snapshot"&&!r?!1:l.id.includes(o!=null?o:"")),[e,r,o]);return h(ne,null,h("div",{class:"versions-controls"},h(dn,{class:"btn btn-input version-search",placeholder:n("versions.search"),value:o,onChange:s}),h(lp,{label:"Include snapshots",value:r,onChange:i})),h("div",{class:"version-list"},a.map(l=>h(Sm,{version:l,link:t==null?void 0:t(l.id)})),a.length===0&&h("span",null,n("versions.no_results"))))}function $t({label:e,value:t,link:n,compact:r,optional:i}){return h("div",{class:`version-metadata${i?" version-metadata-hide":""}`},h("span",{class:r?"version-metadata-hide":void 0},e,": "),h("span",{class:"version-metadata-value"},t),n&&h("a",{href:n,class:"version-metadata-link"},te.link_external))}function Im({title:e,link:t,versions:n,tags:r,activeTags:i,toggleTag:o}){const s=a=>l=>{o&&o(a),l.preventDefault(),l.stopImmediatePropagation()};return h("a",{class:"guide-card",href:t},h("span",{class:"guide-versions"},n.join(" \u2022 ")),h("h3",null,e),h("div",{class:"guide-tags"},r.sort().map(a=>h(Dr,{label:a,onClick:s(a),active:i==null?void 0:i.includes(a)}))))}const Na={system:"device_desktop",dark:"moon",light:"sun"};function Mm(){const{lang:e,locale:t,changeLocale:n}=Ee(),{theme:r,changeTheme:i}=_c(),{version:o}=Wn(),{title:s}=dt(),a=Kl(Pn());return h("header",null,h("div",{class:"title"},h(il,{class:"home-link",href:"/","aria-label":t("home"),"data-cy":"home-link"},iu.home),h("h1",null,s),a&&h(et,{icon:"chevron_down",tooltip:t("switch_generator"),"data-cy":"generator-switcher"},de.generators.filter(l=>l.category===(a==null?void 0:a.category)&&qe(o,l.minVersion)).map(l=>h(X,{label:t(l.partner?`partner.${l.partner}.${l.id}`:l.id),active:l.id===a.id,onClick:()=>Jt(It(l.url))})))),h("nav",null,h("ul",null,h("li",{"data-cy":"language-switcher"},h(et,{icon:"globe",tooltip:t("language")},de.languages.map(({code:l,name:u})=>h(X,{label:u,active:l===e,onClick:()=>n(l)})))),h("li",{"data-cy":"theme-switcher"},h(et,{icon:Na[r],tooltip:t("theme")},Object.entries(Na).map(([l,u])=>h(X,{icon:u,label:t(`theme.${l}`),active:l===r,onClick:()=>i(l)})))),h("li",{class:"dimmed"},h("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",class:"tooltipped tip-sw","aria-label":t("github")},te.mark_github)))))}const iu={home:h("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),h("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),h("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),h("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),h("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),h("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})),report:h("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M0 16C0 13.7909 1.79086 12 4 12V12C6.20914 12 8 13.7909 8 16V32C8 34.2091 6.20914 36 4 36V36C1.79086 36 0 34.2091 0 32V16Z",fill:"#6ACC5D"}),h("path",{d:"M11 4C11 1.79086 12.7909 0 15 0V0C17.2091 0 19 1.79086 19 4V32C19 34.2091 17.2091 36 15 36V36C12.7909 36 11 34.2091 11 32V4Z",fill:"#FF4C4C"}),h("path",{d:"M22 10C22 7.79086 23.7909 6 26 6V6C28.2091 6 30 7.79086 30 10V32C30 34.2091 28.2091 36 26 36V36C23.7909 36 22 34.2091 22 32V10Z",fill:"#E5B442"}),h("path",{d:"M0 23C0 20.7909 1.79086 19 4 19V19C6.20914 19 8 20.7909 8 23V32C8 34.2091 6.20914 36 4 36V36C1.79086 36 0 34.2091 0 32V23Z",fill:"#2BAD1D"}),h("path",{d:"M11 15C11 12.7909 12.7909 11 15 11V11C17.2091 11 19 12.7909 19 15V32C19 34.2091 17.2091 36 15 36V36C12.7909 36 11 34.2091 11 32V15Z",fill:"#C10B0B"}),h("path",{d:"M22 19C22 16.7909 23.7909 15 26 15V15C28.2091 15 30 16.7909 30 19V32C30 34.2091 28.2091 36 26 36V36C23.7909 36 22 34.2091 22 32V19Z",fill:"#CC8E00"})),sounds:h("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},h("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.5 10C3.5 8.27609 4.18482 6.62279 5.40381 5.40381C6.62279 4.18482 8.27609 3.5 10 3.5C11.7239 3.5 13.3772 4.18482 14.5962 5.40381C15.8152 6.62279 16.5 8.27609 16.5 10C16.5 11.7239 15.8152 13.3772 14.5962 14.5962C13.3772 15.8152 11.7239 16.5 10 16.5C8.27609 16.5 6.62279 15.8152 5.40381 14.5962C4.18482 13.3772 3.5 11.7239 3.5 10V10ZM10 2C7.87827 2 5.84344 2.84285 4.34315 4.34315C2.84285 5.84344 2 7.87827 2 10C2 12.1217 2.84285 14.1566 4.34315 15.6569C5.84344 17.1571 7.87827 18 10 18C12.1217 18 14.1566 17.1571 15.6569 15.6569C17.1571 14.1566 18 12.1217 18 10C18 7.87827 17.1571 5.84344 15.6569 4.34315C14.1566 2.84285 12.1217 2 10 2V2ZM8.379 7.227C8.34101 7.20412 8.29762 7.19175 8.25327 7.19117C8.20892 7.19059 8.16522 7.20181 8.12664 7.2237C8.08807 7.24558 8.05601 7.27733 8.03375 7.3157C8.0115 7.35406 7.99985 7.39765 8 7.442V12.559C8.00003 12.6033 8.0118 12.6467 8.03413 12.685C8.05646 12.7232 8.08854 12.7548 8.12708 12.7765C8.16563 12.7983 8.20926 12.8095 8.25352 12.8088C8.29778 12.8082 8.34108 12.7958 8.379 12.773L12.643 10.214C12.6798 10.1917 12.7103 10.1604 12.7315 10.1229C12.7526 10.0854 12.7638 10.043 12.7638 10C12.7638 9.95695 12.7526 9.91463 12.7315 9.87714C12.7103 9.83965 12.6798 9.80825 12.643 9.786L8.379 7.227Z",fill:"#C5A5E6"}))};function Om({howler:e,sounds:t,sound:n,delay:r,pitch:i,volume:o,onEdit:s,onDelete:a,delayedPlay:l}){const{locale:u}=Ee(),{version:c}=Wn(),[d,f]=D(!0),[p,m]=D(!1),[v,g]=D(!1),_=me([]),x=`playsound minecraft:${n} master @s ~ ~ ~ ${o} ${i}`;Q(()=>{var N,L,F;const M=t[n];g(((L=(N=M==null?void 0:M.sounds)==null?void 0:N.length)!=null?L:0)===0),_.current.forEach(z=>z.stop()),_.current=((F=M==null?void 0:M.sounds)!=null?F:[]).map(z=>{const oe=typeof z=="string"?z:z.name,le=D0(c,oe),T=e({src:[le],format:["ogg"],volume:o,rate:i});T.on("end",()=>{m(!1)});const $=()=>{d&&_.current.every(H=>H.state()==="loaded")&&f(!1)};return T.state()==="loaded"?setTimeout(()=>$()):T.on("load",()=>{$()}),T}),f(!0)},[n,t]),Q(()=>{_.current.forEach(M=>M.rate(i))},[i]),Q(()=>{_.current.forEach(M=>M.volume(o))},[o]);const w=()=>{if(d||v)return;b();const M=Math.floor(Math.random()*_.current.length);_.current[M].play(),m(!0)},b=()=>{_.current.forEach(M=>M.stop())};Q(()=>{l&&setTimeout(()=>w(),r*50)},[l]),Q(()=>()=>b(),[]);const[A,S]=D(!1),I=me(void 0),k=()=>{navigator.clipboard.writeText(x),S(!0),I.current!==void 0&&clearTimeout(I.current),I.current=setTimeout(()=>{S(!1)},2e3)};return h("div",{class:`sound-config${d?" loading":p?" playing":""}${v?" invalid":""}`},h(X,{class:"play",icon:v?"alert":d?"sync":"play",label:u("sounds.play"),onClick:w,tooltip:u(v?"sounds.unknown_sound":d?"sounds.loading_sound":"sounds.play_sound"),tooltipLoc:"se"}),h(dn,{class:"btn btn-input sound",list:"sound-list",spellcheck:!1,value:n,onChange:M=>s({sound:M})}),h("label",{class:"delay-label"},u("sounds.delay"),": "),h(cp,{class:"btn btn-input delay",min:0,value:r,onChange:M=>s({delay:M})}),h("label",{class:"pitch-label"},u("sounds.pitch"),": "),h(Js,{class:"pitch tooltipped tip-s",min:.5,max:2,step:.01,"aria-label":i.toFixed(2),style:`--x: ${(i-.5)*(100/1.5)}%`,value:i,onChange:M=>s({pitch:M})}),h("label",{class:"volume-label"},u("sounds.volume"),": "),h(Js,{class:"volume tooltipped tip-s",min:0,max:1,step:.01,"aria-label":o.toFixed(2),style:`--x: ${o*100}%`,value:o,onChange:M=>s({volume:M})}),h(X,{class:`copy${A?" active":""}`,icon:A?"check":"terminal",label:u("copy"),tooltip:u(A?"copied":"sounds.copy_command"),onClick:k}),h(X,{class:"remove",icon:"trashcan",tooltip:u("sounds.remove_sound"),onClick:()=>{a(),b()}}))}function je({title:e,desc:t,link:n,icon:r,children:i}){const o=h(ne,null,h("div",{class:"tool-head"},r&&iu[r],h("div",null,h("h3",null,e),h("p",null,t))),i&&h("div",{class:"tool-body"},i));return n?h("a",{class:"tool-card",href:n},o):h("div",{class:"tool-card"},o)}const Ta="/";function ou({entries:e,onSelect:t,indent:n}){const r=ke(()=>{var u;const l={};for(const c of e){const d=c.indexOf(Ta);if(d>=0){const f=c.slice(0,d);((u=l[f])!=null?u:l[f]=[]).push(c.slice(d+1))}}return Object.entries(l)},e),i=ke(()=>e.filter(l=>!l.includes(Ta)),e),[o,s]=D(new Set),a=l=>{o.has(l)?o.delete(l):o.add(l),s(new Set(o))};return h("div",{class:"tree-view",style:`--indent: ${n!=null?n:0};`},r.map(([l,u])=>h("div",null,h(La,{icon:o.has(l)?"chevron_right":"chevron_down",key:l,label:l,onClick:()=>a(l)}),!o.has(l)&&h(ou,{entries:u,onSelect:c=>t(`${l}/${c}`),indent:(n!=null?n:0)+1}))),i.map(l=>h(La,{icon:"file",key:l,label:l,onClick:()=>t(l)})))}function La({icon:e,label:t,onClick:n}){return h("div",{class:"entry",onClick:n},te[e],t)}function io({category:e}){const{locale:t}=Ee();return dt(t("title.generator_category",t(e))),h("main",null,h("div",{class:"category"},de.generators.filter(n=>n.category===e).map(n=>h(je,{title:t(n.id),link:It(n.url)}))),h(Wt,{donate:!1}))}function Nm({}){const{locale:e}=Ee();dt(e("title.changelog"));const{value:t,error:n}=Nr(tc,[]);return h("main",null,h(Ar,{type:"text",id:"changelog"}),n&&h(On,{error:n}),h("div",{class:"changelog"},h(nu,{changes:t,defaultOrder:"desc"})),h(Wt,null))}const oo="share";function Tm({}){var as;const{locale:e}=Ee(),{version:t,changeVersion:n,changeTargetVersion:r}=Wn(),{projects:i,project:o,file:s,updateFile:a,openFile:l,closeFile:u}=fc(),[c,d]=D(null),[f,p]=al();if(f)return f.message=`Something went wrong rendering the generator: ${f.message}`,h("main",null,h(On,{error:f,onDismiss:p}));const m=Kl(Pn());if(!m)return h("main",null,h(On,{error:`Cannot find generator "${Pn()}"`}));const v=ke(()=>de.versions.filter(Y=>qe(Y.id,m.minVersion,m.maxVersion)).map(Y=>Y.id).reverse(),[m.minVersion,m.maxVersion]);dt(e("title.generator",e(m.partner?`partner.${m.partner}.${m.id}`:m.id)),v),qe(t,m.minVersion)||d(`The minimum version for this generator is ${m.minVersion}`),qe(t,void 0,m.maxVersion)||d(`This generator is not available in versions above ${m.maxVersion}`);const[g,_]=un("preset"),[x,w]=un(oo),b=me(!1),A=ke(()=>De.getBackup(m.id),[m.id]),S=()=>{A!==void 0&&(k==null||k.reset(O.DataModel.wrapLists(A),!1))},{value:I}=Nr(async()=>{let Y;if(g&&x)return w(void 0),_o;if(g)Y=await Ge(g);else if(x){const Ze=await Z0(x);let Xe=!1;if(Ze.version&&Ze.version!==t&&(n(Ze.version,!1),Xe=!0),Ze.type&&Ze.type!==m.id){const qt=de.generators.find(_u=>_u.id===Ze.type);qt&&(Jt(`${It(qt.url)}?${oo}=${Ze.id}`),Xe=!0)}if(Xe)return _o;Ze.show_preview&&!at&&(Hi(!0),Ae(!1)),ve.openSnippet(m.id,x,t),Y=Ze.data}const[we,Nt]=await Promise.all([U0(t,m.id),Y0(t)]);return Y&&(b.current=!0,we.reset(O.DataModel.wrapLists(Y),!1)),ve.setGenerator(m.id),{model:we,blockStates:Nt}},[m.id,t,x,g]),k=I==null?void 0:I.model,M=I==null?void 0:I.blockStates,[N,L]=D(!1);Pi(k,()=>{b.current||(_(void 0,!0),w(void 0,!0)),b.current=!1,De.setBackup(m.id,O.DataModel.unwrapLists(k==null?void 0:k.data)),d(null),L(!0)},[m.id,_,w]);const[F,z]=D(""),[oe,le]=Qn(),[T,$]=Qn(),H=()=>{if(F!==(s==null?void 0:s.id)&&F&&k&&M){const Y=ri(k,M);a(m.id,s==null?void 0:s.id,{id:F,data:Y})?le():($(),s&&z(s==null?void 0:s.id))}else s&&z(s==null?void 0:s.id)},C=()=>{s&&a(m.id,s.id,{})};Q(()=>{s&&z(s.id)},[s]),Q(()=>{var Y;k&&(z((Y=s==null?void 0:s.id)!=null?Y:""),s&&m.id===s.type&&k.reset(O.DataModel.wrapLists(s.data)),L(!1))},[s,k]);const y=()=>{var Y;ve.resetGenerator(m.id,(Y=k==null?void 0:k.historyIndex)!=null?Y:1,"menu"),k==null||k.reset(O.DataModel.wrapLists(k.schema.default()),!0)},E=Y=>{var we;Y.stopPropagation(),ve.undoGenerator(m.id,(we=k==null?void 0:k.historyIndex)!=null?we:1,"menu"),k==null||k.undo()},R=Y=>{var we;Y.stopPropagation(),ve.redoGenerator(m.id,(we=k==null?void 0:k.historyIndex)!=null?we:1,"menu"),k==null||k.redo()},V=Y=>{var we,Nt;Y.ctrlKey&&Y.key==="z"?(ve.undoGenerator(m.id,(we=k==null?void 0:k.historyIndex)!=null?we:1,"hotkey"),k==null||k.undo()):Y.ctrlKey&&Y.key==="y"&&(ve.redoGenerator(m.id,(Nt=k==null?void 0:k.historyIndex)!=null?Nt:1,"hotkey"),k==null||k.redo())},W=Y=>{if(Y.ctrlKey&&Y.key==="s"&&(Y.preventDefault(),k&&M&&s)){ve.saveProjectFile(m.id,o.files.length,i.length,"hotkey");const we=ri(k,M);a(m.id,s==null?void 0:s.id,{id:s==null?void 0:s.id,data:we}),L(!1),le()}};Q(()=>(document.addEventListener("keyup",V),document.addEventListener("keydown",W),()=>{document.removeEventListener("keyup",V),document.removeEventListener("keydown",W)}),[k,M,s]);const[he,Ue]=D([]);Q(()=>{G0(t).then(Y=>{Ue(Y.get(m.id).map(we=>we.startsWith("minecraft:")?we.slice(10):we))}).catch(Y=>{console.error(Y),d(Y)})},[t,m.id]);const ft=Y=>{ve.loadPreset(m.id,Y),w(void 0,!0),r(t,!0),_(Y)},Ge=async Y=>{var we,Nt,Ze;try{const Xe=await rc(t,(we=m.path)!=null?we:m.id,Y),qt=k==null?void 0:k.get(new O.Path(["generator","seed"]));return((Nt=Xe==null?void 0:Xe.generator)==null?void 0:Nt.seed)!==void 0&&qt!==void 0&&(Xe.generator.seed=qt,((Ze=Xe.generator.biome_source)==null?void 0:Ze.seed)!==void 0&&(Xe.generator.biome_source.seed=qt)),Xe}catch{d(`Cannot load preset ${Y} in ${t}`),_(void 0,!0)}},Ye=Y=>{w(void 0,!0),n(Y)},[Re,yt]=D(void 0),[pt,st]=D(!1),[Te,en]=Qn({cooldown:3e3}),Ot=()=>{if(pt){st(!1);return}if(g)yt(`${location.origin}/${m.url}/?version=${t}&preset=${g}`),st(!0),K();else if(k&&M){const Y=ri(k,M);cn(Y,k.schema.default())?(yt(`${location.origin}/${m.url}/?version=${t}`),st(!0)):q0(m.id,t,Y,at).then(({id:we,length:Nt,compressed:Ze,rate:Xe})=>{ve.createSnippet(m.id,we,t,Nt,Ze,Xe);const qt=`${location.origin}/${m.url}/?${oo}=${we}`;yt(qt),st(!0)}).catch(we=>{we instanceof Error&&d(we)})}},K=()=>{navigator.clipboard.writeText(Re!=null?Re:""),en()};Q(()=>{Te||(yt(void 0),st(!1))},[Te]);const[Fe,Ae]=D(window.innerWidth>820),[fe,bt]=D(0),[nt,vn]=D(0),[wn,B]=D(0),U=()=>{ve.copyOutput(m.id,"menu"),bt(fe+1)},se=()=>{ve.downloadOutput(m.id,"menu"),vn(nt+1)},pe=()=>{ve.generatorEvent("import"),Ae(!0),B(wn+1)},Pe=()=>{Fe?ve.hideOutput(m.id,"menu"):ve.showOutput(m.id,"menu"),Ae(!Fe),bt(0),vn(0),B(0)},[rt,Vi]=Qn(),[at,Hi]=D(!1),Ui=s1.includes(m.id)&&!(m.id==="worldgen/configured_feature"&&qe(t,"1.18"));at&&!Ui&&Hi(!1);let Gi=2;Ui&&(Gi+=1),Fe&&(Gi+=2);const gu=()=>{Fe?ve.hidePreview(m.id,"menu"):ve.showPreview(m.id,"menu"),Hi(!at),!at&&Fe&&Ae(!1)};return h(ne,null,h("main",{class:at?"has-preview":""},!m.partner&&h(Ar,{id:"data-pack-generator",type:"text"}),h("div",{class:"controls"},h("div",{class:`project-controls ${s&&"has-file"}`},h("div",{class:"btn-row"},h(et,{icon:"repo",label:o.name,relative:!1},h(X,{icon:"arrow_left",label:e("project.go_to"),onClick:()=>Jt("/project")}),s&&h(X,{icon:"file",label:e("project.new_file"),onClick:u}),A!==void 0&&h(X,{icon:"history",label:e("restore_backup"),onClick:S}),h(Ks,{searchPlaceholder:e(o.name==="Drafts"?"project.search_drafts":"project.search"),noResults:e("project.no_files"),values:o.files.filter(Y=>Y.type===m.id).map(Y=>Y.id),onSelect:Y=>l(m.id,Y)})),h(dn,{class:"btn btn-input",placeholder:e("project.unsaved_file"),value:F,onChange:z,onEnter:H,onBlur:H}),s&&h(X,{icon:"trashcan",tooltip:e("project.delete_file"),onClick:C})),N?h("div",{class:"status-icon"},te.dot_fill):oe?h("div",{class:"status-icon active"},te.check):T&&h("div",{class:"status-icon danger"},te.x)),h("div",{class:"generator-controls"},h(X,{icon:"upload",label:e("import"),onClick:pe}),h(et,{icon:"archive",label:e("presets"),relative:!1},h(Ks,{searchPlaceholder:e("search"),noResults:e("no_presets"),values:he,onSelect:ft})),h(et,{icon:"tag",label:t,tooltip:e("switch_version"),"data-cy":"version-switcher"},v.map(Y=>h(X,{label:Y,active:Y===t,onClick:()=>Ye(Y)}))),h(et,{icon:"kebab_horizontal",tooltip:e("more")},h(X,{icon:"history",label:e("reset"),onClick:y}),h(X,{icon:"arrow_left",label:e("undo"),onClick:E}),h(X,{icon:"arrow_right",label:e("redo"),onClick:R})))),c&&h(On,{error:c,onDismiss:()=>d(null)}),h(Z1,{model:k,version:t,blockStates:M,onError:d}),h(Wt,{donate:!m.partner})),h("div",{class:"popup-actions",style:`--offset: -${8+Gi*50}px;`},h("div",{class:`popup-action action-preview${Ui?" shown":""} tooltipped tip-nw`,"aria-label":e(at?"hide_preview":"show_preview"),onClick:gu},at?te.x_circle:te.play),h("div",{class:"popup-action action-share shown tooltipped tip-nw","aria-label":e("share"),onClick:Ot},te.link),h("div",{class:`popup-action action-download${Fe?" shown":""} tooltipped tip-nw`,"aria-label":e("download"),onClick:se},te.download),h("div",{class:`popup-action action-copy${Fe?" shown":""}${rt?" active":""} tooltipped tip-nw`,"aria-label":e(rt?"copied":"copy"),onClick:U},rt?te.check:te.clippy),h("div",{class:"popup-action action-code shown tooltipped tip-nw","aria-label":e(Fe?"hide_output":"show_output"),onClick:Pe},Fe?te.chevron_right:te.code)),h("div",{class:`popup-preview${at?" shown":""}`},h(a1,{model:k,version:t,id:m.id,shown:at,onError:d})),h("div",{class:`popup-source${Fe?" shown":""}`},h(c1,{model:k,blockStates:M,doCopy:fe,doDownload:nt,doImport:wn,name:(as=m.schema)!=null?as:"data",copySuccess:Vi,onError:d})),h("div",{class:`popup-share${pt?" shown":""}`},h(dn,{value:Re,readonly:!0}),h(X,{icon:Te?"check":"clippy",onClick:K,tooltip:e(Te?"copied":"copy_share"),tooltipLoc:"nw",active:Te,showTooltip:Te})))}var es={exports:{}};function ts(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var n=e[t];typeof n=="object"&&!Object.isFrozen(n)&&ts(n)}),e}es.exports=ts;es.exports.default=ts;var Lm=es.exports;class Ra{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function su(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Zt(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const Rm="</span>",Pa=e=>!!e.kind,Pm=(e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class $m{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=su(t)}openNode(t){if(!Pa(t))return;let n=t.kind;t.sublanguage?n=`language-${n}`:n=Pm(n,{prefix:this.classPrefix}),this.span(n)}closeNode(t){!Pa(t)||(this.buffer+=Rm)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}class ns{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n={kind:t,children:[]};this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&(!t.children||(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{ns._collapse(n)})))}}class Dm extends ns{constructor(t){super(),this.options=t}addKeyword(t,n){t!==""&&(this.openNode(n),this.addText(t),this.closeNode())}addText(t){t!==""&&this.add(t)}addSublanguage(t,n){const r=t.root;r.kind=n,r.sublanguage=!0,this.add(r)}toHTML(){return new $m(this,this.options).value()}finalize(){return!0}}function yr(e){return e?typeof e=="string"?e:e.source:null}function au(e){return _n("(?=",e,")")}function Bm(e){return _n("(?:",e,")*")}function Fm(e){return _n("(?:",e,")?")}function _n(...e){return e.map(n=>yr(n)).join("")}function zm(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function rs(...e){const t=zm(e);return"("+(t.capture?"":"?:")+e.map(r=>yr(r)).join("|")+")"}function lu(e){return new RegExp(e.toString()+"|").exec("").length-1}function jm(e,t){const n=e&&e.exec(t);return n&&n.index===0}const Vm=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function is(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let o=yr(r),s="";for(;o.length>0;){const a=Vm.exec(o);if(!a){s+=o;break}s+=o.substring(0,a.index),o=o.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?s+="\\"+String(Number(a[1])+i):(s+=a[0],a[0]==="("&&n++)}return s}).map(r=>`(${r})`).join(t)}const Hm=/\b\B/,cu="[a-zA-Z]\\w*",os="[a-zA-Z_]\\w*",uu="\\b\\d+(\\.\\d+)?",du="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",hu="\\b(0b[01]+)",Um="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Gm=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=_n(t,/.*\b/,e.binary,/\b.*/)),Zt({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},br={begin:"\\\\[\\s\\S]",relevance:0},Ym={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[br]},Wm={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[br]},qm={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ji=function(e,t,n={}){const r=Zt({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=rs("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_n(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Zm=ji("//","$"),Xm=ji("/\\*","\\*/"),Jm=ji("#","$"),Km={scope:"number",begin:uu,relevance:0},Qm={scope:"number",begin:du,relevance:0},eg={scope:"number",begin:hu,relevance:0},tg={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[br,{begin:/\[/,end:/\]/,relevance:0,contains:[br]}]}]},ng={scope:"title",begin:cu,relevance:0},rg={scope:"title",begin:os,relevance:0},ig={begin:"\\.\\s*"+os,relevance:0},og=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var Wr=Object.freeze({__proto__:null,MATCH_NOTHING_RE:Hm,IDENT_RE:cu,UNDERSCORE_IDENT_RE:os,NUMBER_RE:uu,C_NUMBER_RE:du,BINARY_NUMBER_RE:hu,RE_STARTERS_RE:Um,SHEBANG:Gm,BACKSLASH_ESCAPE:br,APOS_STRING_MODE:Ym,QUOTE_STRING_MODE:Wm,PHRASAL_WORDS_MODE:qm,COMMENT:ji,C_LINE_COMMENT_MODE:Zm,C_BLOCK_COMMENT_MODE:Xm,HASH_COMMENT_MODE:Jm,NUMBER_MODE:Km,C_NUMBER_MODE:Qm,BINARY_NUMBER_MODE:eg,REGEXP_MODE:tg,TITLE_MODE:ng,UNDERSCORE_TITLE_MODE:rg,METHOD_GUARD:ig,END_SAME_AS_BEGIN:og});function sg(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function ag(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function lg(e,t){!t||!e.beginKeywords||(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=sg,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function cg(e,t){!Array.isArray(e.illegal)||(e.illegal=rs(...e.illegal))}function ug(e,t){if(!!e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function dg(e,t){e.relevance===void 0&&(e.relevance=1)}const hg=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=_n(n.beforeMatch,au(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},fg=["of","and","for","in","not","or","if","then","parent","list","value"],pg="keyword";function fu(e,t,n=pg){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(o){Object.assign(r,fu(e[o],t,o))}),r;function i(o,s){t&&(s=s.map(a=>a.toLowerCase())),s.forEach(function(a){const l=a.split("|");r[l[0]]=[o,mg(l[0],l[1])]})}}function mg(e,t){return t?Number(t):gg(e)?0:1}function gg(e){return fg.includes(e.toLowerCase())}const $a={},an=e=>{console.error(e)},Da=(e,...t)=>{console.log(`WARN: ${e}`,...t)},An=(e,t)=>{$a[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),$a[`${e}/${t}`]=!0)},Si=new Error;function pu(e,t,{key:n}){let r=0;const i=e[n],o={},s={};for(let a=1;a<=t.length;a++)s[a+r]=i[a],o[a+r]=!0,r+=lu(t[a-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function _g(e){if(!!Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw an("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Si;if(typeof e.beginScope!="object"||e.beginScope===null)throw an("beginScope must be object"),Si;pu(e,e.begin,{key:"beginScope"}),e.begin=is(e.begin,{joinWith:""})}}function vg(e){if(!!Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw an("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Si;if(typeof e.endScope!="object"||e.endScope===null)throw an("endScope must be object"),Si;pu(e,e.end,{key:"endScope"}),e.end=is(e.end,{joinWith:""})}}function wg(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function yg(e){wg(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),_g(e),vg(e)}function bg(e){function t(s,a){return new RegExp(yr(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=lu(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=t(is(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const u=l.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const l=new n;return this.rules.slice(a).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(a);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(a)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function i(s){const a=new r;return s.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),s.terminatorEnd&&a.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&a.addRule(s.illegal,{type:"illegal"}),a}function o(s,a){const l=s;if(s.isCompiled)return l;[ag,ug,yg,hg].forEach(c=>c(s,a)),e.compilerExtensions.forEach(c=>c(s,a)),s.__beforeBegin=null,[lg,cg,dg].forEach(c=>c(s,a)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=fu(s.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),a&&(s.begin||(s.begin=/\B|\b/),l.beginRe=t(l.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(l.endRe=t(l.end)),l.terminatorEnd=yr(l.end)||"",s.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(s.end?"|":"")+a.terminatorEnd)),s.illegal&&(l.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(c){return xg(c==="self"?s:c)})),s.contains.forEach(function(c){o(c,l)}),s.starts&&o(s.starts,a),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Zt(e.classNameAliases||{}),o(e)}function mu(e){return e?e.endsWithParent||mu(e.starts):!1}function xg(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Zt(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:mu(e)?Zt(e,{starts:e.starts?Zt(e.starts):null}):Object.isFrozen(e)?Zt(e):e}var Ag="11.5.1";class kg extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const so=su,Ba=Zt,Fa=Symbol("nomatch"),Sg=7,Eg=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Dm};function l(T){return a.noHighlightRe.test(T)}function u(T){let $=T.className+" ";$+=T.parentNode?T.parentNode.className:"";const H=a.languageDetectRe.exec($);if(H){const C=M(H[1]);return C||(Da(o.replace("{}",H[1])),Da("Falling back to no-highlight mode for this block.",T)),C?H[1]:"no-highlight"}return $.split(/\s+/).find(C=>l(C)||M(C))}function c(T,$,H){let C="",y="";typeof $=="object"?(C=T,H=$.ignoreIllegals,y=$.language):(An("10.7.0","highlight(lang, code, ...args) has been deprecated."),An("10.7.0",`Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`),y=T,C=$),H===void 0&&(H=!0);const E={code:C,language:y};oe("before:highlight",E);const R=E.result?E.result:d(E.language,E.code,H);return R.code=E.code,oe("after:highlight",R),R}function d(T,$,H,C){const y=Object.create(null);function E(B,U){return B.keywords[U]}function R(){if(!K.keywords){Ae.addText(fe);return}let B=0;K.keywordPatternRe.lastIndex=0;let U=K.keywordPatternRe.exec(fe),se="";for(;U;){se+=fe.substring(B,U.index);const pe=Te.case_insensitive?U[0].toLowerCase():U[0],Pe=E(K,pe);if(Pe){const[rt,Vi]=Pe;if(Ae.addText(se),se="",y[pe]=(y[pe]||0)+1,y[pe]<=Sg&&(bt+=Vi),rt.startsWith("_"))se+=U[0];else{const at=Te.classNameAliases[rt]||rt;Ae.addKeyword(U[0],at)}}else se+=U[0];B=K.keywordPatternRe.lastIndex,U=K.keywordPatternRe.exec(fe)}se+=fe.substr(B),Ae.addText(se)}function V(){if(fe==="")return;let B=null;if(typeof K.subLanguage=="string"){if(!t[K.subLanguage]){Ae.addText(fe);return}B=d(K.subLanguage,fe,!0,Fe[K.subLanguage]),Fe[K.subLanguage]=B._top}else B=p(fe,K.subLanguage.length?K.subLanguage:null);K.relevance>0&&(bt+=B.relevance),Ae.addSublanguage(B._emitter,B.language)}function W(){K.subLanguage!=null?V():R(),fe=""}function he(B,U){let se=1;const pe=U.length-1;for(;se<=pe;){if(!B._emit[se]){se++;continue}const Pe=Te.classNameAliases[B[se]]||B[se],rt=U[se];Pe?Ae.addKeyword(rt,Pe):(fe=rt,R(),fe=""),se++}}function Ue(B,U){return B.scope&&typeof B.scope=="string"&&Ae.openNode(Te.classNameAliases[B.scope]||B.scope),B.beginScope&&(B.beginScope._wrap?(Ae.addKeyword(fe,Te.classNameAliases[B.beginScope._wrap]||B.beginScope._wrap),fe=""):B.beginScope._multi&&(he(B.beginScope,U),fe="")),K=Object.create(B,{parent:{value:K}}),K}function ft(B,U,se){let pe=jm(B.endRe,se);if(pe){if(B["on:end"]){const Pe=new Ra(B);B["on:end"](U,Pe),Pe.isMatchIgnored&&(pe=!1)}if(pe){for(;B.endsParent&&B.parent;)B=B.parent;return B}}if(B.endsWithParent)return ft(B.parent,U,se)}function Ge(B){return K.matcher.regexIndex===0?(fe+=B[0],1):(wn=!0,0)}function Ye(B){const U=B[0],se=B.rule,pe=new Ra(se),Pe=[se.__beforeBegin,se["on:begin"]];for(const rt of Pe)if(!!rt&&(rt(B,pe),pe.isMatchIgnored))return Ge(U);return se.skip?fe+=U:(se.excludeBegin&&(fe+=U),W(),!se.returnBegin&&!se.excludeBegin&&(fe=U)),Ue(se,B),se.returnBegin?0:U.length}function Re(B){const U=B[0],se=$.substr(B.index),pe=ft(K,B,se);if(!pe)return Fa;const Pe=K;K.endScope&&K.endScope._wrap?(W(),Ae.addKeyword(U,K.endScope._wrap)):K.endScope&&K.endScope._multi?(W(),he(K.endScope,B)):Pe.skip?fe+=U:(Pe.returnEnd||Pe.excludeEnd||(fe+=U),W(),Pe.excludeEnd&&(fe=U));do K.scope&&Ae.closeNode(),!K.skip&&!K.subLanguage&&(bt+=K.relevance),K=K.parent;while(K!==pe.parent);return pe.starts&&Ue(pe.starts,B),Pe.returnEnd?0:U.length}function yt(){const B=[];for(let U=K;U!==Te;U=U.parent)U.scope&&B.unshift(U.scope);B.forEach(U=>Ae.openNode(U))}let pt={};function st(B,U){const se=U&&U[0];if(fe+=B,se==null)return W(),0;if(pt.type==="begin"&&U.type==="end"&&pt.index===U.index&&se===""){if(fe+=$.slice(U.index,U.index+1),!i){const pe=new Error(`0 width match regex (${T})`);throw pe.languageName=T,pe.badRule=pt.rule,pe}return 1}if(pt=U,U.type==="begin")return Ye(U);if(U.type==="illegal"&&!H){const pe=new Error('Illegal lexeme "'+se+'" for mode "'+(K.scope||"<unnamed>")+'"');throw pe.mode=K,pe}else if(U.type==="end"){const pe=Re(U);if(pe!==Fa)return pe}if(U.type==="illegal"&&se==="")return 1;if(vn>1e5&&vn>U.index*3)throw new Error("potential infinite loop, way more iterations than matches");return fe+=se,se.length}const Te=M(T);if(!Te)throw an(o.replace("{}",T)),new Error('Unknown language: "'+T+'"');const en=bg(Te);let Ot="",K=C||en;const Fe={},Ae=new a.__emitter(a);yt();let fe="",bt=0,nt=0,vn=0,wn=!1;try{for(K.matcher.considerAll();;){vn++,wn?wn=!1:K.matcher.considerAll(),K.matcher.lastIndex=nt;const B=K.matcher.exec($);if(!B)break;const U=$.substring(nt,B.index),se=st(U,B);nt=B.index+se}return st($.substr(nt)),Ae.closeAllNodes(),Ae.finalize(),Ot=Ae.toHTML(),{language:T,value:Ot,relevance:bt,illegal:!1,_emitter:Ae,_top:K}}catch(B){if(B.message&&B.message.includes("Illegal"))return{language:T,value:so($),illegal:!0,relevance:0,_illegalBy:{message:B.message,index:nt,context:$.slice(nt-100,nt+100),mode:B.mode,resultSoFar:Ot},_emitter:Ae};if(i)return{language:T,value:so($),illegal:!1,relevance:0,errorRaised:B,_emitter:Ae,_top:K};throw B}}function f(T){const $={value:so(T),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return $._emitter.addText(T),$}function p(T,$){$=$||a.languages||Object.keys(t);const H=f(T),C=$.filter(M).filter(L).map(W=>d(W,T,!1));C.unshift(H);const y=C.sort((W,he)=>{if(W.relevance!==he.relevance)return he.relevance-W.relevance;if(W.language&&he.language){if(M(W.language).supersetOf===he.language)return 1;if(M(he.language).supersetOf===W.language)return-1}return 0}),[E,R]=y,V=E;return V.secondBest=R,V}function m(T,$,H){const C=$&&n[$]||H;T.classList.add("hljs"),T.classList.add(`language-${C}`)}function v(T){let $=null;const H=u(T);if(l(H))return;if(oe("before:highlightElement",{el:T,language:H}),T.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(T)),a.throwUnescapedHTML))throw new kg("One of your code blocks includes unescaped HTML.",T.innerHTML);$=T;const C=$.textContent,y=H?c(C,{language:H,ignoreIllegals:!0}):p(C);T.innerHTML=y.value,m(T,H,y.language),T.result={language:y.language,re:y.relevance,relevance:y.relevance},y.secondBest&&(T.secondBest={language:y.secondBest.language,relevance:y.secondBest.relevance}),oe("after:highlightElement",{el:T,result:y,text:C})}function g(T){a=Ba(a,T)}const _=()=>{b(),An("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function x(){b(),An("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let w=!1;function b(){if(document.readyState==="loading"){w=!0;return}document.querySelectorAll(a.cssSelector).forEach(v)}function A(){w&&b()}typeof window!="undefined"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function S(T,$){let H=null;try{H=$(e)}catch(C){if(an("Language definition for '{}' could not be registered.".replace("{}",T)),i)an(C);else throw C;H=s}H.name||(H.name=T),t[T]=H,H.rawDefinition=$.bind(null,e),H.aliases&&N(H.aliases,{languageName:T})}function I(T){delete t[T];for(const $ of Object.keys(n))n[$]===T&&delete n[$]}function k(){return Object.keys(t)}function M(T){return T=(T||"").toLowerCase(),t[T]||t[n[T]]}function N(T,{languageName:$}){typeof T=="string"&&(T=[T]),T.forEach(H=>{n[H.toLowerCase()]=$})}function L(T){const $=M(T);return $&&!$.disableAutodetect}function F(T){T["before:highlightBlock"]&&!T["before:highlightElement"]&&(T["before:highlightElement"]=$=>{T["before:highlightBlock"](Object.assign({block:$.el},$))}),T["after:highlightBlock"]&&!T["after:highlightElement"]&&(T["after:highlightElement"]=$=>{T["after:highlightBlock"](Object.assign({block:$.el},$))})}function z(T){F(T),r.push(T)}function oe(T,$){const H=T;r.forEach(function(C){C[H]&&C[H]($)})}function le(T){return An("10.7.0","highlightBlock will be removed entirely in v12.0"),An("10.7.0","Please use highlightElement now."),v(T)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:b,highlightElement:v,highlightBlock:le,configure:g,initHighlighting:_,initHighlightingOnLoad:x,registerLanguage:S,unregisterLanguage:I,listLanguages:k,getLanguage:M,registerAliases:N,autoDetection:L,inherit:Ba,addPlugin:z}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=Ag,e.regex={concat:_n,lookahead:au,either:rs,optional:Fm,anyNumberOfTimes:Bm};for(const T in Wr)typeof Wr[T]=="object"&&Lm(Wr[T]);return Object.assign(e,Wr),e};var xr=Eg({}),Cg=xr;xr.HighlightJS=xr;xr.default=xr;var ss=Cg;function Ig(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r={beginKeywords:["true","false","null"].join(" ")};return{name:"JSON",contains:[t,n,e.QUOTE_STRING_MODE,r,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}const Mg='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M6.368 1.01a.75.75 0 01.623.859L6.57 4.5h3.98l.46-2.868a.75.75 0 011.48.237L12.07 4.5h2.18a.75.75 0 010 1.5h-2.42l-.64 4h2.56a.75.75 0 010 1.5h-2.8l-.46 2.869a.75.75 0 01-1.48-.237l.42-2.632H5.45l-.46 2.869a.75.75 0 01-1.48-.237l.42-2.632H1.75a.75.75 0 010-1.5h2.42l.64-4H2.25a.75.75 0 010-1.5h2.8l.46-2.868a.75.75 0 01.858-.622zM9.67 10l.64-4H6.33l-.64 4h3.98z"></path></svg>';ss.registerLanguage("json",Ig);re.use({highlight:(e,t)=>{if(t!=="")return ss.highlight(e,{language:t}).value}});function Og({id:e}){const{locale:t}=Ee(),{version:n,changeVersion:r}=Wn(),{changeTitle:i}=dt(),{value:o,refresh:s}=Nr(async()=>await(await fetch(`../../guides/${e}.md`)).text(),[e]),a=ke(()=>{if(!o)return;const b=p0(o);return i(b==null?void 0:b.title,b==null?void 0:b.versions),b},[o]),l=ke(()=>{var A;const b=de.versions.map(S=>S.id);return(A=a==null?void 0:a.versions)==null?void 0:A.sort((S,I)=>b.indexOf(I)-b.indexOf(S))},[a==null?void 0:a.versions]),u=ke(()=>!l||l.includes(n)?n:l[0],[n,a==null?void 0:a.versions]),c=ke(()=>{if(!o)return;const b=[];let A=!1;re.use({extensions:[{name:"styledCode",level:"inline",start(k){var M,N;return(N=(M=k.match(/\b[fsnj]`/))==null?void 0:M.index)!=null?N:-1},tokenizer(k){const M=k.match(/^([fsnj])`([^`]+)`/);if(M)return{type:"styledCode",raw:M[0],prefix:M[1],text:M[2]}},renderer(k){let M=k.text,N={f:"hljs-attr",s:"hljs-string",n:"hljs-number"}[k.prefix];return k.prefix==="j"&&(M=ss.highlight("json",k.text).value,N="language-json"),`<code${N?` class="${N}"`:""}>${M}</code>`}}],walkTokens(k){k.type==="heading"&&b.push(k)},renderer:{link(k,M,N){if(k===null)return N;const L=M?` title="${M}"`:"",F=k!=null&&k.match(/^https?:\/\//)?' target="_blank"':"";return`<a href="${k}"${L}${F}>${N}</a>`},heading(k,M,N,L){let F="";A||(F=`<ol class="guide-toc">${b.filter(le=>le.depth===2).map(le=>{var H,C;const T=L.slug((C=(H=le.raw.match(/^#+ (.*)/))==null?void 0:H[1])!=null?C:"",{dryrun:!0}),$=le.text.replaceAll("`","");return`<li><a href="#${T}">${$}</a></li>`}).join("")}</ol>`,A=!0);const z=L.slug(N),oe=`<span id="guide-${z}" href="?version=${n}#${z}">${Mg}</span>`;return`${F}<h${M}>${oe}${k}</h${M}>`}}});const S=o.substring(o.indexOf("---",3)+3),I=m0(S,u);return re(I,{version:"1.19"})},[u,o]),[d,f]=x0(),p=Ce(()=>{if(!c)return;const b=document.querySelector(`[id=guide-${d.slice(1)}]`);if(b){const A=b.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:A-68,behavior:"smooth"})}},[c,d]);Q(()=>{p()},[c===void 0,d]);const m=Ce(b=>{if(!(b.target instanceof HTMLSpanElement))return;const A="#"+b.target.id.replace(/^guide-/,"");r(n,!1,!0),f(A),A===d&&p()},[p,d,n]),[v,g]=Qn(),_=Ce(()=>{const b=`${location.origin}/guides/${e}/?version=${n}`;navigator.clipboard.writeText(b),g()},[e,n]),x=Ce(b=>{Jt(`/guides/?tags=${b}`)},[]),[w]=D(window.innerWidth>600);return h("main",null,h("div",{class:"guide"},h("div",{class:"navigation"},h("a",{class:"btn btn-link",href:"/guides/"},te.arrow_left,t("guides.all")),h(X,{icon:v?"check":"link",label:t("share"),onClick:_,active:v,tooltip:t(v?"copied":"copy_share"),class:"guide-share"}),l&&h(et,{icon:"tag",label:u,tooltip:t("switch_version")},l.map(b=>h(X,{label:b,active:b===u,onClick:()=>r(b)})))),(a==null?void 0:a.tags)&&a.tags.length>0&&h("div",{class:"guide-tags"},a.tags.map(b=>h(Dr,{label:b,active:!0,onClick:()=>x(b)}))),c&&h(ne,null,h(Ar,{id:"guide",type:w?"image":"text"}),h("div",{class:"guide-content",dangerouslySetInnerHTML:{__html:c},onClick:m}),h(Jo,null))),h(Wt,null))}function Ng({}){const{locale:e}=Ee(),{version:t,changeVersion:n}=Wn();dt(e("title.guides"));const[r,i]=D(""),[o,s]=tu(),[a,l]=D(!1),u=ke(()=>a===!1?[{id:"adding-custom-structures",title:"Adding custom structures",versions:["1.18.2","1.19"],tags:["worldgen","structures"]},{id:"density-functions",title:"Density function types and their configuration",versions:["1.18.2","1.19"],tags:["worldgen","noise","density"]},{id:"feature-order-cycle",title:"How to fix feature order cycles",versions:["1.18","1.18.2","1.19"],tags:["worldgen","biomes","features"]},{id:"noise-router",title:"How terrain is generated using the noise router",versions:["1.18.2","1.19"],tags:["worldgen","noise","density"]}]:[{id:"adding-custom-structures",title:"Adding custom structures",versions:["1.18.2","1.19"],tags:["worldgen","structures"]},{id:"density-functions",title:"Density function types and their configuration",versions:["1.18.2","1.19"],tags:["worldgen","noise","density"]},{id:"feature-order-cycle",title:"How to fix feature order cycles",versions:["1.18","1.18.2","1.19"],tags:["worldgen","biomes","features"]},{id:"noise-router",title:"How terrain is generated using the noise router",versions:["1.18.2","1.19"],tags:["worldgen","noise","density"]}].filter(d=>{var f;return(f=d.versions)==null?void 0:f.includes(t)}),[t,a]),c=ke(()=>{const d=r.split(" ").map(f=>f.trim().toLowerCase()).filter(f=>f.length>0);return u.filter(f=>{var m;if(!o.every(v=>{var g;return(g=f.tags)==null?void 0:g.includes(v)}))return!1;const p=((m=f.tags)==null?void 0:m.join(" "))+" "+f.title.toLowerCase();return d.every(v=>v.startsWith("!")?v.length===1||!p.includes(v.slice(1)):p.includes(v))})},[u,r,o]);return h("main",null,h("div",{class:"guides"},h("div",{class:"changelog-query"},h(dn,{class:"btn btn-input changelog-search",placeholder:e("guides.search"),value:r,onChange:i}),h(et,{icon:"tag",label:a?t:e("any_version"),tooltip:e("switch_version")},h(X,{label:e("any_version"),active:!a,onClick:()=>l(!a)}),de.versions.slice().reverse().map(d=>h(X,{label:d.id,active:a&&d.id===t,onClick:()=>{n(d.id),l(!0)}})))),o.length>0&&h("div",{class:"changelog-tags"},o.map(d=>h(Dr,{label:d,onClick:()=>s(d)}))),u.length===0?h(ne,null,h("span",{class:"note"},e("guides.no_results.version"))):c.length===0?h(ne,null,h("span",{class:"note"},e("guides.no_results.query"))):c.map(d=>{var f,p;return h(Im,{title:d.title,link:`/guides/${d.id}/`,tags:(f=d.tags)!=null?f:[],versions:(p=d.versions)!=null?p:[],activeTags:o,toggleTag:s})})),h(Wt,null))}function Tg({}){const{locale:e}=Ee();return dt(e("title.home")),h("main",null,h("div",{class:"home"},h(je,{title:"Data packs"},de.generators.filter(t=>!t.category).map(t=>h(je,{title:e(t.id),link:It(t.url)})),h(je,{title:e("tags"),link:"/tags/"}),h(je,{title:e("worldgen"),link:"/worldgen/"})),h(je,{title:"Resource packs"},de.generators.filter(t=>t.category==="assets").map(t=>h(je,{title:e(t.id),link:It(t.url)}))),h(je,{title:"Partners",link:"/partners/"}),h(je,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/",desc:"Analyse your performance reports"}),h(je,{title:"Minecraft Sounds",icon:"sounds",link:"/sounds/",desc:"Browse through and mix all the vanilla sounds"}),h(je,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/",desc:"Convert your data packs from 1.16 to 1.17 to 1.18"}),h(je,{title:"Technical Changelog",link:"/changelog/"}),h(je,{title:"Minecraft Versions",link:"/versions/"}),h(je,{title:"Data Pack Guides",link:"/guides/"}),h(Jo,null),h(Wt,null)))}const Lg=[...new Set(de.generators.filter(e=>e.partner!==void 0).map(e=>e.partner))];function Rg({}){const{locale:e}=Ee();return dt(e("title.partners")),h("main",null,h("div",{class:"category"},Lg.map(t=>h(je,{title:e(`partner.${t}`)},de.generators.filter(n=>n.partner===t).map(n=>h(je,{title:e(`partner.${t}.${n.id}`),link:It(n.url)}))))),h(Wt,{donate:!1}))}function Pg({}){const{locale:e}=Ee(),{project:t,openFile:n}=fc();dt(e("title.project",t.name));const r=ke(()=>t.files.flatMap(o=>{const s=tp(o);return s?[s]:[]}),t.files),i=Ce(o=>{const[,s,a,...l]=o.split("/");n(a,`${s}:${l}`)},[n]);return h("main",null,h(Ar,{id:"data-pack-project",type:"text"}),h("div",{class:"project"},h("h2",null,t.name),h("div",{class:"file-view"},h(ou,{entries:r,onSelect:i}))))}function $g({}){const{locale:e}=Ee(),{version:t,changeVersion:n}=Wn();dt(e("title.sounds"));const[r,i]=D(void 0);Q(()=>{(async()=>{const b=await ae(()=>import("./howler.f69a07ea.js").then(function(A){return A.h}),[]);i(()=>A=>new b.Howl(A))})()},[]);const{value:o,error:s}=Nr(async()=>await $0(t),[t]),a=ke(()=>Object.keys(o!=null?o:{}),[o]),[l,u]=D(""),[c,d]=D([]),f=()=>{d([{id:sn(),sound:l,delay:0,pitch:1,volume:1},...c])},p=b=>A=>{d(c.map(S=>S.id===b?Z(Z({},S),A):S))},m=b=>()=>{d(c.filter(A=>A.id!==b))},[v,g]=D(0),_=()=>{g(v+1)},x=me(null),w=()=>{if(!x.current)return;const b=c.some(S=>S.delay>0),A=c.sort((S,I)=>S.delay-I.delay).map(S=>`${b?`execute if score @s delay matches ${S.delay} run `:""}playsound minecraft:${S.sound} master @s ~ ~ ~ ${S.volume} ${S.pitch}`).join(`
`);x.current.setAttribute("href","data:text/plain;charset=utf-8,"+A+"%0A"),x.current.setAttribute("download","sounds.mcfunction"),x.current.click()};return h("main",null,s&&h(On,{error:s}),a.length>0&&h(ne,null,h("div",{class:"controls sounds-controls"},h("div",{class:"sound-search-group"},h(dn,{class:"btn btn-input sound-search",list:"sound-list",placeholder:e("sounds.search"),value:l,onChange:u,onEnter:f}),h(X,{icon:"plus",tooltip:e("sounds.add_sound"),class:"add-sound",onClick:f})),c.length>1&&h(X,{icon:"play",label:e("sounds.play_all"),class:"play-all-sounds",onClick:_}),h("div",{class:"spacer"}),h(X,{icon:"download",label:e("download"),tooltip:e("sounds.download_function"),tooltipLoc:"se",class:"download-sounds",onClick:w}),h(et,{icon:"tag",label:t,tooltip:e("switch_version")},de.versions.slice().reverse().map(b=>h(X,{label:b.id,active:b.id===t,onClick:()=>n(b.id)})))),h("div",{class:"sounds"},o&&r&&c.map(b=>h(Om,_e(Z({key:b.id},b),{howler:r,sounds:o,delayedPlay:v,onEdit:p(b.id),onDelete:m(b.id)})))),h("a",{ref:x,style:"display: none;"}),h("datalist",{id:"sound-list"},a.map(b=>h("option",{key:b,value:b})))),h(Wt,{donate:!1}))}function Dg({}){const{locale:e}=Ee();dt(e("title.versions"));const{value:t,error:n}=Nr(B0,[]),[r]=un("id"),i=(t!=null?t:[]).find(a=>a.id===r);dt(i?`Minecraft ${i.name}`:"Versions Explorer",i?[]:void 0,i?"Changes and metadata":void 0);const o=i&&za(t!=null?t:[],i,-1),s=i&&za(t!=null?t:[],i,1);return h("main",null,h(Ar,{type:"text",id:"versions"}),n&&h(On,{error:n}),h("div",{class:"versions"},r?h(ne,null,h("div",{class:"navigation"},h("a",{class:"btn btn-link",href:"/versions/"},te.three_bars,e("versions.all")),h("a",Z({class:"btn btn-link"},s?{href:`/versions/?id=${s.id}`}:{disabled:!0}),te.arrow_left,e("versions.previous")),h("a",Z({class:"btn btn-link"},o?{href:`/versions/?id=${o.id}`}:{disabled:!0}),e("versions.next"),te.arrow_right)),h(km,{id:r,version:i})):h(Cm,{versions:t!=null?t:[],link:a=>`/versions/?id=${a}`})),h(Wt,{donate:!1}))}function za(e,t,n){const i=e.findIndex(o=>o.id===t.id)+n;if(!(i<0||i>=e.length))return e[i]}function Bg(){return h(ne,null,h(Mm,null),h(jt,{onChange:t=>{window.dispatchEvent(new CustomEvent("replacestate")),setTimeout(()=>ve.pageview(It(t.url)))}},h(Tg,{path:"/"}),h(io,{path:"/worldgen",category:"worldgen"}),h(io,{path:"/tags",category:"tags"}),h(io,{path:"/assets",category:"assets"}),h(Rg,{path:"/partners"}),h($g,{path:"/sounds"}),h(Nm,{path:"/changelog"}),h(Dg,{path:"/versions"}),h(Pg,{path:"/project"}),h(Ng,{path:"/guides/"}),h(Og,{path:"/guides/:id"}),h(Tm,{default:!0})))}function Fg(){return h(np,null,h(Q0,null,h(rp,null,h(ap,null,h(op,null,h(ep,null,h(Bg,null)))))))}Rn(h(Fg,null),document.body);export{Fr as c,Ec as e,O as l};
//# sourceMappingURL=index.fbc79ff6.js.map