diff --git a/404.html b/404.html index 4582cd5c..07656997 100644 --- a/404.html +++ b/404.html @@ -20,9 +20,9 @@ 404 - + - +
diff --git a/advancement/index.html b/advancement/index.html index b7c593d9..2327873b 100644 --- a/advancement/index.html +++ b/advancement/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.15, 1.16, 1.17 - + - +
diff --git a/assets/index.2de121cf.js b/assets/index.2de121cf.js deleted file mode 100644 index 7784432d..00000000 --- a/assets/index.2de121cf.js +++ /dev/null @@ -1,2 +0,0 @@ -var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,s=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&a(e,n,t[n]);if(o)for(var n of o(t))i.call(t,n)&&a(e,n,t[n]);return e},l=(e,o)=>t(e,n(o));import{y as c,a as d,s as u,l as h,g as m,L as g,b as p,c as f,d as v,j as _,e as w,f as y,q as b,N as k,R as C}from"./vendor.5f8b9a3f.js";var $;function x({type:e,id:t}){return c((()=>{var e;null==(e=document.getElementById("ad-placeholder"))||e.remove(),"ethicalads"in window&ðicalads.load()}),[]),d("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function V({icon:e,label:t,active:n,class:o,onClick:r}){return d("div",{class:`btn${n?" active":""}${o?` ${o}`:""}`,onClick:r},e&&Q[e],t&&d("span",null,t))}function E({icon:e,label:t,large:n,type:o,doSelect:r,value:i,onChange:a}){const s=void 0===a?()=>{}:e=>{const t=e.target.value;"number"===o&&(t.endsWith(".")||isNaN(Number(t)))||null==a||a(t)},l=u(null);return c((()=>{r&&l.current&&l.current.select()}),[r]),d("div",{class:"btn btn-input "+(n?"large-input":""),onClick:e=>e.stopPropagation()},e&&Q[e],t&&d("span",null,t),d("input",{ref:l,type:"text",value:i,onKeyUp:s}))}function z({icon:e,label:t,relative:n,children:o}){const[r,i]=h(!1),a=()=>{i(!1)};return c((()=>(r&&document.body.addEventListener("click",a),()=>{document.body.removeEventListener("click",a)})),[r]),d("div",{class:"btn-menu"+(!1===n?" no-relative":"")},d(V,{icon:e,label:t,onClick:()=>i(!0)}),r&&d("div",{class:"btn-group"},o))}function M({error:e}){return d("div",{class:"error"},d("h3",null,e),d("p",null,"You can report this as a bug ",d("a",{href:"https://github.com/misode/misode.github.io/issues/new",target:"_blank"},"on GitHub")))}!function(e){const t="Site",n="Generator";function o(e,t,n){ga("send","event",e,t,n)}function r(e,t){ga("set",`dimension${e}`,t)}e.pageview=function(e){ga("set","page",e),ga("send","pageview")},e.setLanguage=function(e){r(4,e),o(t,"set-language",e)},e.setTheme=function(e){r(1,e),o(t,"set-theme",e)},e.setVersion=function(e){r(3,e),o(n,"set-version",e)},e.setPreview=function(e){r(5,e),o(n,"set-preview",e)},e.generatorEvent=function(e,t){o(n,e,t)}}($||($={}));var A=JSON.parse('{"languages":[{"code":"de","name":"Deutsch"},{"code":"en","name":"English"},{"code":"fr","name":"Français"},{"code":"it","name":"Italiano"},{"code":"ja","name":"日本語"},{"code":"pl","name":"Polski"},{"code":"pt","name":"Português"},{"code":"ru","name":"Русский"},{"code":"sk","name":"Slovenčina","schemas":false},{"code":"zh-cn","name":"简体中文"},{"code":"zh-tw","name":"正體中文"}],"versions":[{"id":"1.15","refs":{"mcdata_master":"13355f7"}},{"id":"1.16","refs":{"mcdata_master":"1.16.4","vanilla_datapack_data":"1.16.4-data","vanilla_datapack_summary":"1.16.4-summary"}},{"id":"1.17","refs":{"mcdata_master":"master","vanilla_datapack_data":"data","vanilla_datapack_summary":"summary"},"dynamic":true}],"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":"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/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"},{"id":"worldgen/configured_surface_builder","url":"worldgen/surface-builder","category":"worldgen","schema":"configured_surface_builder","minVersion":"1.16"},{"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"}],"registries":[{"id":"advancement","dynamic":true},{"id":"attribute","minVersion":"1.16"},{"id":"block"},{"id":"dimension","dynamic":true},{"id":"dimension_type","dynamic":true},{"id":"enchantment"},{"id":"entity_type"},{"id":"fluid"},{"id":"function","dynamic":true},{"id":"float_provider_type","minVersion":"1.17"},{"id":"item"},{"id":"int_provider_type","minVersion":"1.17"},{"id":"height_provider_type","minVersion":"1.17"},{"id":"loot_condition_type","minVersion":"1.16"},{"id":"loot_condition_type","minVersion":"1.16"},{"id":"loot_function_type","minVersion":"1.16"},{"id":"loot_nbt_provider_type","minVersion":"1.17"},{"id":"loot_number_provider_type","minVersion":"1.17"},{"id":"loot_pool_entry_type","minVersion":"1.16"},{"id":"loot_score_provider_type","minVersion":"1.17"},{"id":"loot_table","dynamic":true},{"id":"mob_effect"},{"id":"pos_rule_test","minVersion":"1.16"},{"id":"potion","minVersion":"1.15"},{"id":"predicate","dynamic":true},{"id":"recipe","dynamic":true},{"id":"rule_test","minVersion":"1.16"},{"id":"sound_event"},{"id":"stat_type"},{"id":"structure","dynamic":true},{"id":"tag/block","dynamic":true},{"id":"tag/entity_type","dynamic":true},{"id":"tag/fluid","dynamic":true},{"id":"tag/function","dynamic":true},{"id":"tag/item","dynamic":true},{"id":"worldgen/biome","dynamic":true},{"id":"worldgen/block_state_provider_type","minVersion":"1.16"},{"id":"worldgen/block_placer_type","minVersion":"1.16"},{"id":"worldgen/biome_source","minVersion":"1.16"},{"id":"worldgen/carver","minVersion":"1.16"},{"id":"worldgen/chunk_generator","minVersion":"1.16"},{"id":"worldgen/configured_carver","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_decorator","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_feature","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_structure_feature","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_surface_builder","minVersion":"1.16","dynamic":true},{"id":"worldgen/decorator","minVersion":"1.16"},{"id":"worldgen/feature","minVersion":"1.16"},{"id":"worldgen/feature_size_type","minVersion":"1.16"},{"id":"worldgen/foliage_placer_type","minVersion":"1.16"},{"id":"worldgen/noise_settings","minVersion":"1.16","dynamic":true},{"id":"worldgen/processor_list","minVersion":"1.16","dynamic":true},{"id":"worldgen/structure_feature","minVersion":"1.16"},{"id":"worldgen/structure_pool_element","minVersion":"1.16"},{"id":"worldgen/structure_processor","minVersion":"1.16"},{"id":"worldgen/surface_builder","minVersion":"1.16"},{"id":"worldgen/template_pool","minVersion":"1.16","dynamic":true},{"id":"worldgen/tree_decorator_type","minVersion":"1.16"},{"id":"worldgen/trunk_placer_type","minVersion":"1.16"},{"id":"biome","maxVersion":"1.15"},{"id":"worldgen/biome","minVersion":"1.16","path":"processed/reports/biomes"}]}');let j;const L={},P=function(e,t){if(!t)return e();if(void 0===j){const e=document.createElement("link").relList;j=e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}return Promise.all(t.map((e=>{if(e in L)return;L[e]=!0;const t=e.endsWith(".css"),n=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${n}`))return;const o=document.createElement("link");return o.rel=t?"stylesheet":j,t||(o.as="script",o.crossOrigin=""),o.href=e,document.head.appendChild(o),t?new Promise(((e,t)=>{o.addEventListener("load",e),o.addEventListener("error",t)})):void 0}))).then((()=>e()))};var D=JSON.parse('{"advancement":"Advancement","button.add":"Add","button.collapse":"Collapse","button.expand":"Expand","button.remove":"Remove","copy":"Copy","dimension_type":"Dimension Type","dimension":"Dimension","download":"Download","fields":"Fields","github":"GitHub","home":"Home","import":"Import","indentation.2_spaces":"2 spaces","indentation.4_spaces":"4 spaces","indentation.tabs":"Tabs","item_modifier":"Item Modifier","language":"Language","loot_table":"Loot Table","not_found.description":"The page you were looking for does not exist.","no_presets":"No presets","predicate":"Predicate","redo":"Redo","reset":"Reset","settings":"Settings","settings.fields.description":"Customize advanced field settings","settings.fields.path":"Context","settings.fields.name":"Name","share":"Share","theme.dark":"Dark","theme.light":"Light","theme.system":"System","title.generator":"%0% Generator","title.generator_category":"%0% Generators","title.home":"Data Pack Generators","presets":"Presets","preview":"Visualize","preview.scale":"Scale","preview.depth":"Depth","preview.width":"Width","source_placeholder":"Paste JSON content here","undo":"Undo","world":"World Settings","worldgen":"Worldgen","worldgen/biome":"Biome","worldgen/configured_carver":"Carver","worldgen/configured_feature":"Feature","worldgen/noise_settings":"Noise Settings","worldgen/processor_list":"Processor List","worldgen/configured_structure_feature":"Structure Feature","worldgen/configured_surface_builder":"Surface Builder","worldgen/template_pool":"Template Pool"}'),I=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:D});const O={fallback:D};function S(e,t,...n){var o,r,i,a,s;return function(e,t){return e.replace(/%\d+%/g,(e=>{const n=parseInt(e.slice(1,-1));return void 0!==(null==t?void 0:t[n])?t[n]:e}))}(null!=(s=null!=(a=null!=(i=null==(o=O[e])?void 0:o[t])?i:null==(r=O.en)?void 0:r[t])?a:O.fallback[t])?s:t,n)}async function N(e){const t=A.languages.find((t=>t.code===e));if(!t)return;const n=await function(e){switch(e){case"../locales/de.json":return P((()=>import("./de.495918cb.js")),void 0);case"../locales/en.json":return P((()=>Promise.resolve().then((function(){return I}))),void 0);case"../locales/fr.json":return P((()=>import("./fr.cc0e1c18.js")),void 0);case"../locales/it.json":return P((()=>import("./it.fd9a8268.js")),void 0);case"../locales/ja.json":return P((()=>import("./ja.8c79487c.js")),void 0);case"../locales/pl.json":return P((()=>import("./pl.3a9fb38c.js")),void 0);case"../locales/pt.json":return P((()=>import("./pt.689bba1d.js")),void 0);case"../locales/ru.json":return P((()=>import("./ru.e53996b0.js")),void 0);case"../locales/sk.json":return P((()=>import("./sk.586a2a32.js")),void 0);case"../locales/zh-cn.json":return P((()=>import("./zh-cn.d620a7da.js")),void 0);case"../locales/zh-tw.json":return P((()=>import("./zh-tw.2a1c5616.js")),void 0);default:return Promise.reject(new Error("Unknown variable dynamic import: "+e))}}(`../locales/${e}.json`),o=!1!==t.schemas&&await function(e){switch(e){case"../../node_modules/@mcschema/locales/src/de.json":return P((()=>import("./de.ba8c635a.js")),void 0);case"../../node_modules/@mcschema/locales/src/en.json":return P((()=>import("./en.6ae73cdb.js")),void 0);case"../../node_modules/@mcschema/locales/src/fr.json":return P((()=>import("./fr.c1ebc76d.js")),void 0);case"../../node_modules/@mcschema/locales/src/it.json":return P((()=>import("./it.288ea523.js")),void 0);case"../../node_modules/@mcschema/locales/src/ja.json":return P((()=>import("./ja.d68f1cee.js")),void 0);case"../../node_modules/@mcschema/locales/src/pl.json":return P((()=>import("./pl.2f8b352f.js")),void 0);case"../../node_modules/@mcschema/locales/src/pt.json":return P((()=>import("./pt.98ad9b62.js")),void 0);case"../../node_modules/@mcschema/locales/src/ru.json":return P((()=>import("./ru.61de7e2f.js")),void 0);case"../../node_modules/@mcschema/locales/src/zh-cn.json":return P((()=>import("./zh-cn.655950f4.js")),void 0);case"../../node_modules/@mcschema/locales/src/zh-tw.json":return P((()=>import("./zh-tw.a8f28612.js")),void 0);default:return Promise.reject(new Error("Unknown variable dynamic import: "+e))}}(`../../node_modules/@mcschema/locales/src/${e}.json`);O[e]=s(s({},n.default),o.default)}const T=e=>("0"+e.toString(16)).substr(-2);function B(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,T).join("")}function R(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function H(e){return`/${e}/`.replaceAll("//","/")}function F(e){const t=e.replace(/^\//,"").replace(/\/$/,"");return A.generators.find((e=>e.url===t))}function W(e){const t=Math.abs(function(e){let t=0;for(let n=0;n>8)%256,(t>>16)%256]}function G(e,t,n){return Math.max(e,Math.min(t,n))}function q(e,t,n){return n<0?e:n>1?t:J(n,e,t)}function J(e,t,n){return t+e*(n-t)}function Y(e,t,n,o,r,i){return J(t,J(e,n,o),J(e,r,i))}function U(e){return e*e*e*(e*(6*e-15)+10)}const Z={system:"device_desktop",dark:"moon",light:"sun"};function X({lang:e,title:t,theme:n,changeTheme:o,language:r,changeLanguage:i}){var a;const s=S.bind(null,e),l=null==(a=F(m()))?void 0:a.category;return d("header",null,d("div",{class:"header-title"},d(g,{class:"home-link",href:"string"==typeof l?H(l):"/"},K.home),d("h2",null,t)),d("nav",null,d("ul",null,d("li",null,d(z,{icon:"globe"},A.languages.map((({code:e,name:t})=>d(V,{label:t,active:e===r,onClick:()=>i(e)}))))),d("li",null,d(z,{icon:Z[n]},Object.entries(Z).map((([e,t])=>d(V,{icon:t,label:s(`theme.${e}`),active:e===n,onClick:()=>o(e)}))))),d("li",{class:"dimmed"},d("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",title:s("github")},Q.mark_github)))))}const K={home:d("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),d("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),d("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),d("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),d("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),d("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})),report:d("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg"},d("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"}),d("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"}),d("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"}),d("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"}),d("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"}),d("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:d("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},d("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),d("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"}))},Q={archive:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),chevron_right:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),clippy:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),download:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),eye:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),gear:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),history:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),kebab_horizontal:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),mark_github:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),play:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),search:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),sun:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),three_bars:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),unfold:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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_circle:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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 ee(e,t){const n={invalidated(){e&&t(e)}};c((()=>(null==e||e.addListener(n),n.invalidated(),()=>{null==e||e.removeListener(n)})),[e])}function te(e,t){if(!e)return;const n=u(),o=u(),r=u([0,0]);c((()=>{const i=e=>{o.current=[e.offsetX,e.offsetY]},a=e=>{if(void 0===o.current)return;const i=e.offsetX-o.current[0],a=e.offsetY-o.current[1];0===i&&0===a||(cancelAnimationFrame(n.current),r.current=[r.current[0]+i,r.current[1]+a],n.current=requestAnimationFrame((()=>{t(...r.current),r.current=[0,0]}))),o.current=[e.offsetX,e.offsetY]},s=e=>{o.current=void 0};return e.addEventListener("mousedown",i),e.addEventListener("mousemove",a),document.body.addEventListener("mouseup",s),()=>{e.removeEventListener("mousedown",i),e.removeEventListener("mousemove",a),document.body.removeEventListener("mouseup",s)}}),[e])}const ne=class{constructor(e){this.xo=256*e(),this.yo=256*e(),this.zo=256*e(),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.int32()%(256-t),o=this.p[t];this.p[t]=this.p[t+n],this.p[t+n]=o}}noise(e,t,n,o,r){const i=e+this.xo,a=t+this.yo,s=n+this.zo,l=Math.floor(i),c=Math.floor(a),d=Math.floor(s),u=i-l,h=a-c,m=s-d,g=U(u),p=U(h),f=U(m);let v=0;return 0!==o&&(v=Math.floor(Math.min(r,h)/o)*o),this.sampleAndLerp(l,c,d,u,h-v,m,g,p,f)}gradDot(e,t,n,o){const r=ne.GRADIENT[15&e];return r[0]*t+r[1]*n+r[2]*o}P(e){return 255&this.p[255&e]}sampleAndLerp(e,t,n,o,r,i,a,s,l){const c=this.P(e)+t,d=this.P(c)+n,u=this.P(c+1)+n,h=this.P(e+1)+t,m=this.P(h)+n,g=this.P(h+1)+n;return function(e,t,n,o,r,i,a,s,l,c,d){return J(n,Y(e,t,o,r,i,a),Y(e,t,s,l,c,d))}(a,s,l,this.gradDot(this.P(d),o,r,i),this.gradDot(this.P(m),o-1,r,i),this.gradDot(this.P(u),o,r-1,i),this.gradDot(this.P(g),o-1,r-1,i),this.gradDot(this.P(d+1),o,r,i-1),this.gradDot(this.P(m+1),o-1,r,i-1),this.gradDot(this.P(u+1),o,r-1,i-1),this.gradDot(this.P(g+1),o-1,r-1,i-1))}};let oe=ne;oe.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]];class re{constructor(e,t,n){this.amplitudes=n,this.noiseLevels=Array(this.amplitudes.length);for(let o=0;o{const r=e[`${t}_noise`];return new ie(n.seed+o,r.firstOctave,r.amplitudes)})),i={};e.biomes.forEach((e=>{i[e.biome]=le(e.biome,n.biomeColors)}));const a=t.data,s=-n.offset[0]-100+n.res/2,l=-n.offset[1]-100+n.res/2,c=4*t.width/n.res,d=4/n.res;for(let u=0;u<200;u+=n.res)for(let t=0;t<200;t+=n.res){const h=t*c+u*d,m=(u+s)*n.scale,g=(t+l)*n.scale,p=ce(r,e.biomes,m,g),f=null!=(o=i[p])?o:[128,128,128];a[h]=f[0],a[h+1]=f[1],a[h+2]=f[2],a[h+3]=255}}(e,t,n);case"fixed":return function(e,t,n){const o=t.data,r=le(e.biome,n.biomeColors),i=4*t.width/n.res,a=4/n.res;for(let s=0;s<200;s+=n.res)for(let e=0;e<200;e+=n.res){const t=e*i+s*a;o[t]=r[0],o[t+1]=r[1],o[t+2]=r[2],o[t+3]=255}}(e,t,n);case"checkerboard":return function(e,t,n){var o,r,i,a,s,l;const c={};null==(o=e.biomes)||o.forEach((e=>{c[e]=le(e,n.biomeColors)}));const d=t.data,u=-n.offset[0]-100+n.res/2,h=-n.offset[1]-100+n.res/2,m=4*t.width/n.res,g=4/n.res,p=(null!=(r=e.scale)?r:2)+2,f=null!=(a=null==(i=e.biomes)?void 0:i.length)?a:0;for(let v=0;v<200;v+=n.res)for(let t=0;t<200;t+=n.res){const o=t*m+v*g,r=((((v+u)*n.scale>>p)+((t+h)*n.scale>>p))%f+f)%f,i=null==(s=e.biomes)?void 0:s[r],a=null!=(l=c[i])?l:[128,128,128];d[o]=a[0],d[o+1]=a[1],d[o+2]=a[2],d[o+3]=255}}(e,t,n)}}function le(e,t){var n;if(!e)return[128,128,128];const o=null!=(n=t[e])?n:ue[e];return void 0===o?W(e):o}function ce(e,t,n,o){if(!Array.isArray(t)||0===t.length)return"";const r=e.map((e=>e.getValue(n,o,0)));let i=1/0,a="";for(const s of t){const e=de(s.parameters,{altitude:r[0],temperature:r[1],humidity:r[2],weirdness:r[3],offset:0});e{ye(t,null==e?void 0:e.decorator,n).forEach((t=>we(t,null==e?void 0:e.feature,n)))},random_boolean_selector:(e,t,n)=>{we(t,n.random()<.5?null==e?void 0:e.feature_true:null==e?void 0:e.feature_false,n)},random_selector:(e,t,n)=>{var o,r;for(const i of null!=(o=null==e?void 0:e.features)?o:[])if(n.random()<(null!=(r=null==i?void 0:i.chance)?r:0))return void we(t,i.feature,n);we(t,null==e?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var o,r,i;we(t,null==(i=null==e?void 0:e.features)?void 0:i[fe(null!=(r=null==(o=null==e?void 0:e.features)?void 0:o.length)?r:0,n)],n)}},ke={chance:(e,t,n)=>{var o;return n.random()<1/(null!=(o=null==e?void 0:e.chance)?o:1)?[t]:[]},count:(e,t,n)=>{var o;return new Array(ve(null!=(o=null==e?void 0:e.count)?o:1,n)).fill(t)},count_extra:(e,t,n)=>{var o,r;let i=null!=(o=null==e?void 0:e.count)?o:1;return n.random(){var o;return new Array(ve(null!=(o=null==e?void 0:e.count)?o:1,n)).fill(t).map((e=>[e[0]+fe(16,n),e[1],e[2]+fe(16,n)]))},count_noise:(e,t,n)=>{const o=n.biomeInfoNoise.getValue(t[0]/200,0,t[2]/200){var o;const r=Math.max(1,e.noise_factor),i=n.biomeInfoNoise.getValue(t[0]/r,0,t[2]/r),a=Math.max(0,Math.ceil((i+(null!=(o=e.noise_offset)?o:0))*e.noise_to_count_ratio));return new Array(a).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map(((e,o)=>{const r=4*Math.floor(o/4)+1+fe(3,n)+t[0];return[r,Math.max(n.seaLevel,he[G(0,63,r)]),4*Math.floor(o%4)+1+fe(3,n)+t[2]]})),decorated:(e,t,n)=>ye(t,null==e?void 0:e.outer,n).flatMap((t=>ye(t,null==e?void 0:e.inner,n))),depth_average:(e,t,n)=>{var o,r,i,a;return pe(t,fe(null!=(o=null==e?void 0:e.spread)?o:0,n)+fe(null!=(r=null==e?void 0:e.spread)?r:0,n)-(null!=(i=e.spread)?i:0)+(null!=(a=null==e?void 0:e.baseline)?a:0))},emerald_ore:(e,t,n)=>{const o=3+fe(6,n);return[...new Array(o)].map((()=>[t[0]+fe(16,n),4+fe(28,n),t[2]+fe(16,n)]))},fire:(e,t,n)=>{const o=1+fe(fe(ve(null==e?void 0:e.count,n),n),n);return[...new Array(o)].map((()=>[t[0]+fe(16,n),fe(128,n),t[2]+fe(16,n)]))},glowstone:(e,t,n)=>{const o=fe(1+fe(ve(null==e?void 0:e.count,n),n),n);return[...new Array(o)].map((()=>[t[0]+fe(16,n),fe(128,n),t[2]+fe(16,n)]))},heightmap:(e,t,n)=>pe(t,Math.max(n.seaLevel,he[G(0,63,t[0])])),heightmap_spread_double:(e,t,n)=>pe(t,fe(2*Math.max(n.seaLevel,he[G(0,63,t[0])]),n)),heightmap_world_surface:(e,t,n)=>pe(t,Math.max(n.seaLevel,he[G(0,63,t[0])])),iceberg:(e,t,n)=>[[t[0]+4+fe(8,n),t[1],t[2]+4+fe(8,n)]],lava_lake:(e,t,n)=>{var o,r;if(0===fe((null!=(o=e.chance)?o:1)/10,n)){const o=fe(fe(248,n)+8,n);if(o[t],range:(e,t,n)=>{var o,r,i;return pe(t,fe((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0),n)+(null!=(i=null==e?void 0:e.bottom_offset)?i:0))},range_biased:(e,t,n)=>{var o,r,i;return pe(t,fe(fe((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0),n)+(null!=(i=null==e?void 0:e.bottom_offset)?i:0),n))},range_very_biased:(e,t,n)=>{var o,r,i,a;return pe(t,fe(fe(fe((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0),n)+(null!=(i=null==e?void 0:e.bottom_offset)?i:0),n)+(null!=(a=null==e?void 0:e.bottom_offset)?a:0),n))},spread_32_above:(e,t,n)=>pe(t,fe(t[1]+32,n)),top_solid_heightmap:(e,t)=>pe(t,he[G(0,63,t[0])]),magma:(e,t,n)=>pe(t,fe(t[1]+32,n)),square:(e,t,n)=>[[t[0]+fe(16,n),t[1],t[2]+fe(16,n)]],water_lake:(e,t,n)=>{var o;return 0===fe(null!=(o=e.chance)?o:1,n)?[[t[0]+fe(16,n),fe(256,n),t[2]+fe(16,n)]]:[]}};class Ce{constructor(e){this.settings={},this.chunkWidth=4,this.chunkHeight=4,this.chunkCountY=32,this.biomeDepth=.1,this.biomeScale=.2,this.noiseColumnCache=[],this.xOffset=0,this.minLimitPerlinNoise=re.fromRange(e+"djfqnqd",-15,0),this.maxLimitPerlinNoise=re.fromRange(e+"gowdnqs",-15,0),this.mainPerlinNoise=re.fromRange(e+"afiwmco",-7,0),this.depthNoise=re.fromRange(e+"qphnmeo",-15,0)}reset(e,t,n,o,r){this.settings=e,this.chunkWidth=4*e.size_horizontal,this.chunkHeight=4*e.size_vertical,this.chunkCountY=Math.floor(e.height/this.chunkHeight),e.amplified&&t>0&&(t=1+2*t,n=1+4*n),this.biomeDepth=.265625*(.5*t-.125),this.biomeScale=96/(.9*n+.1),this.noiseColumnCache=Array(r).fill(null),this.xOffset=o}iterateNoiseColumn(e){const t=Array(this.chunkCountY*this.chunkHeight),n=Math.floor(e/this.chunkWidth),o=Math.floor(e%this.chunkWidth)/this.chunkWidth,r=this.fillNoiseColumn(n),i=this.fillNoiseColumn(n+1);for(let a=this.chunkCountY-1;a>=0;a-=1)for(let e=this.chunkHeight;e>=0;e-=1){const n=e/this.chunkHeight;t[a*this.chunkHeight+e]=Y(n,o,r[a],r[a+1],i[a],i[a+1])}return t}fillNoiseColumn(e){const t=this.noiseColumnCache[e-this.xOffset];if(t)return t;const n=Array(this.chunkCountY+1),o=684.412*this.settings.sampling.xz_scale,r=684.412*this.settings.sampling.y_scale,i=o/this.settings.sampling.xz_factor,a=r/this.settings.sampling.y_factor,s=this.settings.random_density_offset?this.getRandomDensity(e):0;for(let l=0;l<=this.chunkCountY;l+=1){let t=this.sampleAndClampNoise(e,l,this.mainPerlinNoise.getOctaveNoise(0).zo,o,r,i,a);const c=((1-2*l/this.chunkCountY+s)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;t+=c*(c>0?4:1),this.settings.top_slide.size>0&&(t=q(this.settings.top_slide.target,t,(this.chunkCountY-l-this.settings.top_slide.offset)/this.settings.top_slide.size)),this.settings.bottom_slide.size>0&&(t=q(this.settings.bottom_slide.target,t,(l-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),n[l]=t}return this.noiseColumnCache[e-this.xOffset]=n,n}getRandomDensity(e){const t=this.depthNoise.getValue(200*e,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),n=24.575625*(t<0?.3*-t:t)-2;return n<0?.009486607142857142*n:.006640625*Math.min(n,1)}sampleAndClampNoise(e,t,n,o,r,i,a){let s=0,l=0,c=0,d=1;for(let u=0;u<16;u+=1){const h=re.wrap(e*o*d),m=re.wrap(t*r*d),g=re.wrap(n*o*d),p=r*d,f=this.minLimitPerlinNoise.getOctaveNoise(u);f&&(s+=f.noise(h,m,g,p,t*p)/d);const v=this.maxLimitPerlinNoise.getOctaveNoise(u);if(v&&(l+=v.noise(h,m,g,p,t*p)/d),u<8){const o=this.mainPerlinNoise.getOctaveNoise(u);o&&(c+=o.noise(re.wrap(e*i*d),re.wrap(t*a*d),re.wrap(n*i*d),a*d,t*a*d)/d)}d/=2}return q(s/512,l/512,(c/10+1)/2)}}function $e(e,t){return e[t]>0?0:e[t+1]>0?150:255}const xe=["dimension","worldgen/noise_settings","worldgen/configured_feature"],Ve=[{id:"biome-noise",generator:"dimension",path:new v.Path(["generator","biome_source"]),predicate:e=>e.get(new v.Path(["generator","type"])).endsWith("noise"),preview:({data:e,shown:t})=>{var n;const[o,r]=h(2),[i,a]=h(B()),[s,l]=h(void 0),m=null==(n=e.type)?void 0:n.replace(/^minecraft:/,""),g=u(null),p=u([0,0]),v=u(void 0),_=u(),w=u();c((()=>{_.current=(t=4)=>{"multi_noise"!==m&&(t=1);const n=g.current.getContext("2d");g.current.width=200/t,g.current.height=200/t;const r=n.createImageData(g.current.width,g.current.height);se(e,r,{biomeColors:{},offset:p.current,scale:o,seed:i,res:t}),n.putImageData(r,0,0),1!==t&&(clearTimeout(v.current),v.current=setTimeout((()=>_.current(1)),150))},w.current=(t,n)=>{const r=200*t/g.current.clientWidth,a=200*n/g.current.clientHeight,s=function(e,t,n,o){var r,i,a,s,l;const[c,d]=function([e,t],n){return[(e-n.offset[0]-100+n.res/2)*n.scale,(t-n.offset[1]-100+n.res/2)*n.scale]}([t,n],o);switch(null==(r=null==e?void 0:e.type)?void 0:r.replace(/^minecraft:/,"")){case"multi_noise":return ce(ae.map(((t,n)=>{const r=e[`${t}_noise`];return new ie(o.seed+n,r.firstOctave,r.amplitudes)})),e.biomes,c,d);case"fixed":return e.biome;case"checkerboard":const t=(null!=(i=e.scale)?i:2)+2,n=null!=(s=null==(a=e.biomes)?void 0:a.length)?s:0,r=(((c>>t)+(d>>t))%n+n)%n;return null==(l=e.biomes)?void 0:l[r]}}(e,r,a,{biomeColors:{},offset:p.current,scale:o,seed:i,res:1});l(s)}})),te(g.current,((e,t)=>{const n=200*e/g.current.clientWidth,o=200*t/g.current.clientHeight;p.current=[p.current[0]+n,p.current[1]+o],_.current()})),function(e,t){if(!e)return;const n=e=>{t(e.offsetX,e.offsetY)},o=()=>{t(void 0,void 0)};c((()=>(e.addEventListener("mousemove",n),e.addEventListener("mouseleave",o),()=>{e.removeEventListener("mousemove",n),e.removeEventListener("mouseleave",o)})),[e])}(g.current,((e,t)=>{void 0===e||void 0===t?l(void 0):w.current(e,t)}));const y=JSON.stringify(e);c((()=>{t&&_.current()}),[y,o,i,t]);const b=e=>{p.current[0]*=o/e,p.current[1]*=o/e,r(e)};return d(f,null,d("div",{class:"controls"},s&&d(V,{label:s,class:"no-pointer"}),("multi_noise"===m||"checkerboard"===m)&&d(f,null,d(V,{icon:"dash",onClick:()=>b(1.5*o)}),d(V,{icon:"plus",onClick:()=>b(o/1.5)})),"multi_noise"===m&&d(V,{icon:"sync",onClick:()=>a(B())})),d("canvas",{ref:g,width:"200",height:"200"}))}},{id:"noise-settings",generator:"worldgen/noise_settings",path:new v.Path(["noise"]),predicate:()=>!0,preview:({lang:e,data:t,shown:n})=>{const o=S.bind(null,e),[r,i]=h(B()),[a,s]=h(.1),[l,m]=h(.2),g=u(null),p=u(0),v=u();c((()=>{v.current=()=>{const e=g.current.getContext("2d"),n=t.height;g.current.width=n,g.current.height=n;const o=e.createImageData(g.current.width,g.current.height);!function(e,t,n){const o=new Ce(n.seed);o.reset(e,n.biomeDepth,n.biomeScale,n.offset,200);const r=t.data,i=4*t.width;for(let a=0;a{const t=e*g.current.width/g.current.clientWidth;p.current=p.current+t,v.current()}));const _=JSON.stringify(t);return c((()=>{n&&v.current()}),[_,a,l,r,n]),d(f,null,d("div",{class:"controls"},d(z,{icon:"gear"},d(E,{type:"number",label:o("preview.depth"),value:`${a}`,onChange:e=>s(Number(e))}),d(E,{type:"number",label:o("preview.scale"),value:`${l}`,onChange:e=>m(Number(e))})),d(V,{icon:"sync",onClick:()=>i(B())})),d("canvas",{ref:g,width:"200",height:t.height}))}},{id:"decorator",generator:"worldgen/configured_feature",path:new v.Path([]),predicate:()=>!0,preview:({data:e,version:t,shown:n})=>{const[o,r]=h(4),[i,a]=h(B()),s=u(null),l=u();c((()=>{l.current=()=>{const n=s.current.getContext("2d");s.current.width=16*o,s.current.height=16*o;const r=n.createImageData(s.current.width,s.current.height);!function(e,t,n){const o={placements:[],features:[],random:p(n.seed),biomeInfoNoise:new re(n.seed+"frwynup",0,[1]),seaLevel:63,version:n.version};for(let i=0;i=n.size[0]||i[1]>=n.size[1]||i[2]>=n.size[2])continue;const e=i[2]*(4*t.width)+4*i[0],s=a{n&&setTimeout((()=>l.current()))}),[m,o,i,n]),d(f,null,d("div",{class:"controls"},d(V,{icon:"dash",onClick:()=>r(Math.min(16,o+1))}),d(V,{icon:"plus",onClick:()=>r(Math.max(1,o-1))}),d(V,{icon:"sync",onClick:()=>a(B())})),d("canvas",{ref:s,width:"64",height:"64"}))}}];function Ee({lang:e,model:t,version:n,id:o,shown:r}){const[,i]=h(0);return ee(t,(()=>{i((e=>e+1))})),d(f,null,Ve.filter((e=>e.generator===o)).map((o=>{const i=null==t?void 0:t.get(o.path);return t&&void 0!==i&&o.predicate(t)?o.preview({lang:e,model:t,data:i,version:n,shown:r}):d(f,null)})))}const ze={base:({},e,t)=>t,choice({switchNode:e},t,n,o){return e.hook(this,t,n,o)},list({children:e},t,n,o){return Array.isArray(n)?n.map(((n,r)=>e.hook(this,t.push(r),n,o))):n},map({children:e,config:t},n,o,r){var i,a;if(void 0===o)return;const s="block_state_map"===(null==(i=t.validation)?void 0:i.validator)?null==(a=r.blockStates)?void 0:a[v.relativePath(n,t.validation.params.id).get()]:null,l={};return Object.keys(o).forEach((t=>{s&&!Object.keys(s.properties).includes(t)||(l[t]=e.hook(this,n.push(t),o[t],r))})),l},object({getActiveFields:e},t,n,o){if(null==n||"object"!=typeof n)return n;const r={},i=e(t);return Object.keys(i).filter((e=>i[e].enabled(t))).forEach((e=>{r[e]=i[e].hook(this,t.push(e),n[e],o)})),r}};["1.15","1.16","1.17"].forEach((e=>localStorage.removeItem(`cache_${e}`)));const Me="https://raw.githubusercontent.com/Arcensoth/mcdata",Ae="https://raw.githubusercontent.com/SPGoding/vanilla-datapack",je=[{id:"mcdata_master",hash:"41ed4d11a67e5f4fb97f8fdbf977f30b789658b4",url:Me},{id:"vanilla_datapack_summary",hash:"8a2f8022eb88840e6871ff6a72f63d6e64afc323",url:Ae}];async function Le(e,t,n){const o=A.versions.find((t=>t.id===e));o?(console.debug(`[fetchData] ${JSON.stringify(o)}`),o.dynamic&&await Promise.all(je.filter((e=>localStorage.getItem(`cached_${e.id}`)!==e.hash)).map((async e=>{console.debug(`[deleteMatching] ${e.id} '${localStorage.getItem(`cached_${e.id}`)}' < '${e.hash}' ${e.url}/${o.refs[e.id]}`),await async function(e){try{const t=await caches.open("misode-v1");console.debug("[deleteMatching] Opened cache misode-v1");const n=[];for(const o of await t.keys())e(o.url)&&n.push(t.delete(o));console.debug(`[deleteMatching] Removing ${n.length} cache objects...`),await Promise.all(n)}catch(t){console.warn(`[deleteMatching] Failed to open cache misode-v1: ${t.message}`)}}((t=>t.startsWith(`${e.url}/${o.refs[e.id]}`))),console.debug(`[deleteMatching] Done! ${e.id} ${e.hash} '${localStorage.getItem(`cached_${e.id}`)}'`),localStorage.setItem(`cached_${e.id}`,e.hash),console.debug(`[deleteMatching] Set! ${e.id} ${e.hash} '${localStorage.getItem(`cached_${e.id}`)}'`)}))),await Promise.all([Pe(o,t),De(o,n),Ie(o,t)])):console.error(`[fetchData] Unknown version ${o} in ${JSON.stringify(A.versions)}`)}async function Pe(e,t){console.debug(`[fetchRegistries] ${e.id}`);const n=A.registries.filter((e=>!e.dynamic)).filter((t=>He(e.id,t.minVersion,t.maxVersion)));if(He(e.id,void 0,"1.15")){const r=`${Me}/${e.refs.mcdata_master}/generated/reports/registries.json`;try{const e=await Oe(r,(e=>{const t={};return Object.keys(e).forEach((n=>{t[n.slice(10)]=Object.keys(e[n].entries)})),t}));n.forEach((n=>{var o;t.register(n.id,null!=(o=e[n.id])?o:[])}))}catch(o){console.warn("Error occurred while fetching registries:",o)}}else await Promise.all(n.map((async n=>{try{const o=n.path?`${Me}/${e.refs.mcdata_master}/${n.path}/data.min.json`:`${Me}/${e.refs.mcdata_master}/processed/reports/registries/${n.id}/data.min.json`;t.register(n.id,await Oe(o,(e=>e.values)))}catch(o){console.warn(`Error occurred while fetching registry ${n.id}:`,o)}})))}async function De(e,t){if(console.debug(`[fetchBlockStateMap] ${e.id}`),He(e.id,void 0,"1.16")){const o=He(e.id,void 0,"1.15")?`${Me}/${e.refs.mcdata_master}/generated/reports/blocks.json`:`${Me}/${e.refs.mcdata_master}/processed/reports/blocks/data.min.json`;try{const e=await Oe(o,(e=>{const t={};return Object.keys(e).forEach((n=>{t[n]={properties:e[n].properties,default:e[n].states.find((e=>e.default)).properties}})),t}));Object.assign(t,e)}catch(n){console.warn("Error occurred while fetching block state map:",n)}}else{const o=`${Me}/${e.refs.mcdata_master}/processed/reports/blocks/simplified/data.min.json`;try{const e=await Oe(o);Object.assign(t,e)}catch(n){console.warn("Error occurred while fetching block state map:",n)}}}async function Ie(e,t){console.debug(`[fetchDynamicRegistries] ${e.id}`);const n=A.registries.filter((e=>e.dynamic)).filter((t=>He(e.id,t.minVersion,t.maxVersion)));if(He(e.id,"1.16")){const r=`${Ae}/${e.refs.vanilla_datapack_summary}/summary/flattened.min.json`;try{const e=await Oe(r);n.forEach((n=>{t.register(n.id,e[n.id])}))}catch(o){console.warn("Error occurred while fetching dynamic registries:",o)}}}async function Oe(e,t=(e=>e)){try{const n=await caches.open("misode-v1");console.debug(`[getData] Opened cache misode-v1 ${e}`);const o=await n.match(e);if(o&&o.ok)return console.debug(`[getData] Retrieving cached data ${e}`),await o.json();console.debug(`[getData] fetching data ${e}`);const r=await fetch(e),i=t(await r.json());return await n.put(e,new Response(JSON.stringify(i))),i}catch(n){console.warn(`[getData] Failed to open cache misode-v1: ${n.message}`),console.debug(`[getData] fetching data ${e}`);const o=await fetch(e);return t(await o.json())}}const Se=["1.15","1.16","1.17"],Ne={},Te={},Be={1.15:_,1.16:w,1.17:y};async function Re(e){return Ne[e]||(Ne[e]=(async()=>{try{const t=Be[e].getCollections(),n={};await Le(e,t,n);const o=Be[e].getSchemas(t);return Ne[e]={collections:t,schemas:o,blockStates:n},Ne[e]}catch(t){throw new Error(`Cannot get version "${e}": ${t.message}`)}})()),Ne[e]}function He(e,t,n){const o=A.versions.findIndex((t=>t.id===e)),r=t?A.versions.findIndex((e=>e.id===t)):0,i=n?A.versions.findIndex((e=>e.id===n)):A.versions.length-1;return r<=o&&o<=i}var Fe,We;(We=Fe||(Fe={})).ID_LANGUAGE="language",We.ID_THEME="theme",We.ID_VERSION="schema_version",We.ID_INDENT="indentation",We.getLanguage=function(){var e;return null!=(e=localStorage.getItem(We.ID_LANGUAGE))?e:"en"},We.getTheme=function(){var e;return null!=(e=localStorage.getItem(We.ID_THEME))?e:"dark"},We.getVersion=function(){const e=localStorage.getItem(We.ID_VERSION);return e&&Se.includes(e)?e:"1.17"},We.getIndent=function(){var e;return null!=(e=localStorage.getItem(We.ID_INDENT))?e:"2_spaces"},We.setLanguage=function(e){e&&localStorage.setItem(We.ID_LANGUAGE,e)},We.setTheme=function(e){e&&localStorage.setItem(We.ID_THEME,e)},We.setVersion=function(e){e&&localStorage.setItem(We.ID_VERSION,e)},We.setIndent=function(e){e&&localStorage.setItem(We.ID_INDENT,e)};const Ge={"2_spaces":2,"4_spaces":4,tabs:"\t"};function qe({lang:e,name:t,model:n,blockStates:o,doCopy:r,doDownload:i,doImport:a,onError:s}){const l=S.bind(null,e),[m,g]=h(Fe.getIndent()),p=u(null),_=u(null),w=u();c((()=>{w.current=()=>{if(n&&o)try{const e={blockStates:null!=o?o:{}},t=n.schema.hook(ze,new v.ModelPath(n),n.data,e);p.current.value=JSON.stringify(t,null,Ge[m])+"\n"}catch(e){s(`Error getting JSON output: ${e.message}`),console.error(e),p.current.value=""}}})),ee(n,(()=>{w.current()})),c((()=>{w.current()}),[m]);c((()=>{r&&p.current&&(p.current.select(),document.execCommand("copy"))}),[r]),c((()=>{if(i&&p.current&&_.current){const e=encodeURIComponent(p.current.value);_.current.setAttribute("href",`data:text/json;charset=utf-8,${e}`),_.current.setAttribute("download",`${t}.json`),_.current.click()}}),[i]),c((()=>{a&&p.current&&(p.current.value="",p.current.select())}),[a]);return d(f,null,d("div",{class:"controls"},d(z,{icon:"gear"},Object.entries(Ge).map((([e])=>d(V,{label:l(`indentation.${e}`),active:m===e,onClick:()=>{return t=e,Fe.setIndent(t),void g(t);var t}}))))),d("textarea",{ref:p,class:"source",onChange:()=>{try{const e=JSON.parse(p.current.value);null==n||n.reset(e,!1)}catch(e){}},spellcheck:!1,autocorrect:"off",placeholder:l("source_placeholder")}),d("a",{ref:_,style:"display: none;"}))}function Je({title:e,link:t,icon:n,children:o}){return d("a",{class:"tool-card",href:t},n&&K[n],d("div",null,d("h3",null,e),o))}class Ye{constructor(){this.registry={}}register(e){const t=B();return this.registry[t]=e,t}on(e,t){return this.register((n=>{n.addEventListener(e,(e=>{t(n),e.stopPropagation()}))}))}onChange(e){return this.on("change",e)}onClick(e){return this.on("click",e)}mounted(e){e.querySelectorAll("[data-id]").forEach((e=>{var t,n;const o=e.getAttribute("data-id");null==(n=(t=this.registry)[o])||n.call(t,e)})),this.registry={}}}const Ue={clippy:'',info:'',issue_opened:'',plus_circle:'',trashcan:''},Ze=["loot_table.type","loot_entry.type","function.function","condition.condition","criterion.trigger","dimension.generator.type","dimension.generator.biome_source.type","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"],Xe=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],Ke=["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"],Qe=["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"],et=new v.DataModel(v.MapNode(v.StringNode(),v.StringNode()),{historyMax:0}),tt={base:()=>["","",""],boolean({node:e},t,n,o){const r=o.mounter.onClick((()=>{t.model.set(t,!(!e.optional()||!1!==n)&&void 0)})),i=o.mounter.onClick((()=>{t.model.set(t,!e.optional()||!0!==n||void 0)}));return["",`${R(o.loc("false"))}\n\t\t\t${R(o.loc("true"))}`,""]},choice({choices:e,config:t,switchNode:n},o,r,i){const a=n.activeCase(o,!0),s=(null==t?void 0:t.context)?new v.ModelPath(o.getModel(),new v.Path(o.getArray(),[t.context])):o,l=(null==t?void 0:t.choiceContext)?new v.Path([],[t.choiceContext]):(null==t?void 0:t.context)?new v.Path([],[t.context]):o,[c,d,u]=a.node.hook(this,s,r,i);if(1===e.length)return[c,d,u];return[c,``+d,u]},list({children:e},t,n,o){const r=o.mounter.onClick((()=>{Array.isArray(n)||(n=[]),t.model.set(t,[e.default(),...n])})),i=o.mounter.onClick((()=>{Array.isArray(n)||(n=[]),t.model.set(t,[...n,e.default()])})),a=``;let s="";return Array.isArray(n)&&(s=n.map(((n,r)=>{const i=o.mounter.onClick((()=>t.model.set(t.push(r),void 0))),a=t.push(r).contextPush("entry"),s=e.category(a),[l,c,d]=e.hook(this,a,n,o);return`
\n\t\t\t\t\t
\n\t\t\t\t\t\t${it(o.loc,a,o.mounter)}\n\t\t\t\t\t\t${at(o.loc,a,o.mounter)}\n\t\t\t\t\t\t\n\t\t\t\t\t\t${l}\n\t\t\t\t\t\t\n\t\t\t\t\t\t${c}\n\t\t\t\t\t
\n\t\t\t\t\t${d?`
${d}
`:""}\n\t\t\t\t\t
\n\t\t\t\t
`})).join(""),n.length>2&&(s+=`
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
`)),["",a,s]},map({children:e,keys:t,config:n},o,r,i){var a,s,l,c;const d=new v.ModelPath(et,new v.Path([ot(o.toString())])),u=i.mounter.onClick((()=>{const t=d.get();o.model.set(o.push(t),e.default())})),h="block_state_map"===(null==(a=n.validation)?void 0:a.validator)?null==(s=i.blockStates)?void 0:s[v.relativePath(o,n.validation.params.id).get()]:null,m=((null==h?void 0:h.properties)?v.StringNode(null,{enum:Object.keys(null!=(l=h.properties)?l:{})}):t).hook(this,d,null!=(c=d.get())?c:"",i)[1]+``;if(h&&"Properties"===o.last()){"object"!=typeof r&&(r={});const e=Object.entries(h.properties).map((([e,t])=>[e,v.StringNode(null,{enum:t})]));return Object.entries(h.properties).forEach((([e,t])=>{"string"!=typeof r[e]?o.model.errors.add(o.push(e),"error.expected_string"):t.includes(r[e])||o.model.errors.add(o.push(e),"error.invalid_enum_option",r[e])})),v.ObjectNode(Object.fromEntries(e)).hook(this,o,r,i)}let g="";return"object"==typeof r&&void 0!==r&&(g=Object.keys(r).map((t=>{var n;const a=i.mounter.onClick((()=>o.model.set(o.push(t),void 0))),s=o.modelPush(t),l=e.category(s),c=h?v.StringNode(null,{enum:null!=(n=h.properties[t])?n:[]}):e;(null==h?void 0:h.properties[t])&&!h.properties[t].includes(r[t])&&o.model.errors.add(s,"error.invalid_enum_option",r[t]);const[d,u,m]=c.hook(this,s,r[t],i);return`
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t${it(i.loc,s,i.mounter)}\n\t\t\t\t\t\t\t${at(i.loc,s,i.mounter)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t${d}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t${u}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t${m?`
${m}
`:""}\n\t\t\t\t\t\t
\n\t\t\t\t\t
`})).join("")),["",m,g]},number({integer:e,config:t},n,o,{mounter:r}){var i;const a=r.onChange((o=>{const r=o.value,i=(null==t?void 0:t.color)?parseInt(r.slice(1),16):e?parseInt(r):parseFloat(r);n.model.set(n,i)}));if(null==t?void 0:t.color){return["",``,""]}return["",``,""]},object({node:e,getActiveFields:t,getChildModelPath:n},o,r,i){let a="",s="";e.optional()&&(s=void 0===r?``:``);let l="";if("object"==typeof r&&void 0!==r&&(!e.optional()||void 0!==r)){const e=t(o);l=Object.keys(e).filter((t=>e[t].enabled(o))).map((t=>{const l=e[t],c=n(o,t),d=c.getContext().join(".");if(Xe.includes(d))return"";const u=l.category(c),[h,m,g]=l.hook(this,c,r[t],i);if(0===h.length&&0===m.length&&0===g.length)return"";const p="object"===l.type(c)&&Ke.includes(d),f=Qe.includes(d);return p||f?(a+=`${it(i.loc,c,i.mounter)}${at(i.loc,c,i.mounter)}${h}`,s+=m,p?g:""):`
\n\t\t\t\t\t
\n\t\t\t\t\t\t${it(i.loc,c,i.mounter)}\n\t\t\t\t\t\t${at(i.loc,c,i.mounter)}\n\t\t\t\t\t\t${h}\n\t\t\t\t\t\t\n\t\t\t\t\t\t${m}\n\t\t\t\t\t
\n\t\t\t\t\t${g?`
${g}
`:""}\n\t\t\t\t
`})).join("")}return[a,s,l]},string({node:e,getValues:t,config:n},o,r,i){var a,s;const l=i.mounter.register((e=>{e.value=null!=r?r:"",e.addEventListener("change",(t=>{const n=e.value;o.model.set(o,0===n.length?void 0:n),t.stopPropagation()}))}));let c;const d=t();if(nt(n)&&!n.additional||Ze.includes(o.getContext().join("."))){let t=new v.Path([]);nt(n)&&"string"==typeof n.enum?t=t.contextPush(n.enum):nt(n)||"resource"!==(null==n?void 0:n.validator)||"string"!=typeof n.params.pool||(t=t.contextPush(n.params.pool)),c=``}else if(nt(n)||"block_state_key"!==(null==n?void 0:n.validator)){const e=B();c=`\n\t\t\t\t${0===d.length?"":`\n\t\t\t\t\t\t\t\t${d.map((e=>``}`}else{const e=null==(a=i.blockStates)?void 0:a[v.relativePath(o,n.params.id).get()];c=``}return["",c,""]}};function nt(e){return!!(null==e?void 0:e.enum)}function ot(e){var t,n=0;for(t=0;t`
{e.getElementsByTagName("span")[0].classList.remove("show")}),{capture:!0,once:!0})}))}">\n\t\t${Ue[t]}\n\t\t${n}\n\t
`,lt=(e,t,n)=>`data-id="${n.register((n=>{const o=()=>{var o;const r=document.createElement("div");r.classList.add("node-menu");const i=e(t.contextPush("help").getContext().join("."));i.endsWith(".help")||r.insertAdjacentHTML("beforeend",`${i}`);const a=t.getContext().join(".");r.insertAdjacentHTML("beforeend",`\n\t\t\t\t`),null==(o=r.querySelector(".menu-item .btn"))||o.addEventListener("click",(()=>{const e=document.createElement("input");e.value=a,n.appendChild(e),e.select(),document.execCommand("copy"),n.removeChild(e)})),n.appendChild(r),document.body.addEventListener("click",(()=>{try{n.removeChild(r)}catch(e){}}),{capture:!0,once:!0}),document.body.addEventListener("contextmenu",(()=>{try{n.removeChild(r)}catch(e){}}),{capture:!0,once:!0})};n.addEventListener("contextmenu",(e=>{o(),e.preventDefault()}));let r=null;n.addEventListener("touchstart",(()=>{r=setTimeout((()=>{o(),r=null}),800)})),n.addEventListener("touchend",(()=>{r&&(clearTimeout(r),r=null)}))}))}"`;function ct({lang:e,model:t,version:n,blockStates:o,onError:r}){const i=u(null),a=u();return c((()=>{a.current=()=>{if(t&&o)try{const r=new Ye,a={loc:S.bind(null,e),version:n,mounter:r,blockStates:o},s=new v.ModelPath(t),l=t.schema.hook(tt,s,t.data,a),c=t.schema.category(s),d=t.schema.type(s);let u=l[2];l[1]&&(u=`
\n\t\t\t\t\t\t
${l[0]}${l[1]}
\n\t\t\t\t\t\t
${l[2]}
\n\t\t\t\t\t
`),i.current.innerHTML=u,r.mounted(i.current)}catch(a){r(`Error rendering the tree: ${a.message}`),console.error(a),i.current.innerHTML=""}}})),ee(t,(()=>{a.current()})),c((()=>{a.current()}),[e,t,o]),d("div",{ref:i,class:"tree"})}function dt({lang:e}){const t=S.bind(null,e);return d("main",null,d("div",{class:"settings"},d("p",null,t("settings.fields.description")),d("ul",{class:"field-list"})))}function ut({lang:e,changeTitle:t,version:n,onChangeVersion:o}){var r,i;const a=S.bind(null,e),[u,g]=h(""),[p]=b();if(p)return d("main",null,d(M,{error:`Something went wrong rendering the generator: ${p.message}`}));const _=F(m());if(!_)return d("main",null,d(M,{error:"Cannot find generator"}));const w=null!=(r=_.minVersion)?r:"1.15",y=A.versions.filter((e=>He(e.id,w))).map((e=>e.id));t(a("title.generator",a(_.id)),y);const[k,C]=h(null),[j,L]=h(null);c((()=>{C(null),async function(e){return(await Re(e)).blockStates}(n).then((e=>L(e))),async function(e,t){var n;if(!Te[t]||Te[t].version!==e){const r=await Re(e),i=null==(n=A.generators.find((e=>e.id===t)))?void 0:n.schema;if(!i)throw new Error(`Cannot find model ${t}`);try{const n=r.schemas.get(i),o=new v.DataModel(n);Te[t]?o.reset(Te[t].model.data,!1):(o.validate(!0),o.history=[JSON.stringify(o.data)]),Te[t]={model:o,version:e}}catch(o){throw new Error(`Cannot get generator "${t}" for version "${e}": ${o.message}`)}}return Te[t].model}(n,_.id).then((e=>C(e))).catch((e=>{console.error(e),g(e.message)}))}),[n,_.id]);const P=e=>{e.ctrlKey&&"z"===e.key?($.generatorEvent("undo","Hotkey"),null==k||k.undo()):e.ctrlKey&&"y"===e.key&&($.generatorEvent("redo","Hotkey"),null==k||k.redo())};c((()=>(document.addEventListener("keyup",P),()=>{document.removeEventListener("keyup",P)})),[k]);const[D,I]=h(""),[O,N]=h([]);c((()=>{(async function(e){return(await Re(e)).collections})(n).then((e=>{const t=(null!=D?D:"").trim().split(" "),n=e.get(_.id).map((e=>e.slice(10))).filter((e=>t.every((t=>e.includes(t)))));n&&N(n)})).catch((e=>{console.error(e),g(e.message)}))}),[n,_.id,D]);const T=e=>{var t;$.generatorEvent("load-preset",e),async function(e,t,n){console.debug(`[fetchPreset] ${n} ${t} ${n}`);const o=A.versions.find((t=>t.id===e));try{const e=await fetch(`${Ae}/${o.refs.vanilla_datapack_data}/data/minecraft/${t}/${n}.json`);return await e.json()}catch(r){console.warn(`Error occurred while fetching ${t} preset ${n}:`,r)}}(n,null!=(t=_.path)?t:_.id,e).then((e=>{null==k||k.reset(e,!1)}))},[B,R]=h(window.innerWidth>820),[H,W]=h(0),[G,q]=h(0),[J,Y]=h(0),[U,Z]=h(!1),X=xe.includes(_.id);let K=1;X&&(K+=1),B&&(K+=2);return d(f,null,d("main",{class:U?"has-preview":""},d(x,{id:"data-pack-generator",type:"text"}),d("div",{class:"controls"},d(V,{icon:"upload",label:a("import"),onClick:()=>{$.generatorEvent("import"),R(!0),Y(J+1)}}),d(z,{icon:"archive",label:a("presets"),relative:!1},d(E,{icon:"search",large:!0,value:D,onChange:I,doSelect:1}),d("div",{class:"result-list"},O.map((e=>d(V,{label:e,onClick:()=>T(e)})))),0===O.length&&d(V,{label:a("no_presets")})),d(z,{icon:"tag",label:n},y.reverse().map((e=>d(V,{label:e,active:e===n,onClick:()=>o(e)})))),d(z,{icon:"kebab_horizontal"},d(V,{icon:"history",label:a("reset"),onClick:()=>{$.generatorEvent("reset"),null==k||k.reset(k.schema.default(),!0)}}),d(V,{icon:"arrow_left",label:a("undo"),onClick:e=>{e.stopPropagation(),$.generatorEvent("undo","Menu"),null==k||k.undo()}}),d(V,{icon:"arrow_right",label:a("redo"),onClick:e=>{e.stopPropagation(),$.generatorEvent("redo","Menu"),null==k||k.redo()}}))),u&&d(M,{error:u}),d(ct,l(s({},{lang:e,model:k,version:n,blockStates:j}),{onError:g}))),d("div",{class:"popup-actions",style:`--offset: -${10+50*K}px;`},d("div",{class:"popup-action action-preview"+(X?" shown":""),onClick:()=>{$.generatorEvent("toggle-preview",U?"hidden":"visible"),Z(!U)}},U?Q.x_circle:Q.play),d("div",{class:"popup-action action-download"+(B?" shown":""),onClick:()=>{$.generatorEvent("download"),q(G+1)}},Q.download),d("div",{class:"popup-action action-copy"+(B?" shown":""),onClick:()=>{$.generatorEvent("copy"),W(H+1)}},Q.clippy),d("div",{class:"popup-action action-code shown",onClick:()=>{$.generatorEvent("toggle-output",B?"hidden":"visible"),R(!B),W(0),q(0),Y(0)}},B?Q.chevron_right:Q.code)),d("div",{class:"popup-preview"+(U?" shown":"")},d(Ee,l(s({},{lang:e,model:k,version:n,id:_.id}),{shown:U,onError:g}))),d("div",{class:"popup-source"+(B?" shown":"")},d(qe,l(s({},{lang:e,model:k,blockStates:j,doCopy:H,doDownload:G,doImport:J}),{name:null!=(i=_.schema)?i:"data",onError:g}))))}function ht({lang:e,changeTitle:t}){const n=S.bind(null,e);return t(n("title.home")),d("main",null,d("div",{class:"home"},A.generators.filter((e=>!e.category)).map((e=>d(Je,{title:n(e.id),link:H(e.url)}))),d(Je,{title:n("worldgen"),link:"/worldgen/"}),d("hr",null),d(Je,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/"},d("p",null,"Analyse your performance reports")),d(Je,{title:"Minecraft Sounds",icon:"sounds",link:"https://misode.github.io/sounds/"},d("p",null,"Browse through and mix all the vanilla sounds")),d(Je,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/"},d("p",null,"Convert your 1.16 data packs to 1.17"))))}function mt({lang:e,changeTitle:t}){const n=S.bind(null,e);return t(n("title.generator_category",n("worldgen"))),d("main",null,d("div",{class:"home"},A.generators.filter((e=>"worldgen"===e.category)).map((e=>d(Je,{title:n(e.id),link:H(e.url)})))))}function gt(){const[e,t]=h("en");c((()=>{(async()=>{const e=Fe.getLanguage();await Promise.all([N("en"),..."en"!==e?[N(e)]:[]]),t(e)})()}),[]);const[n,o]=h(Fe.getTheme());c((()=>{document.documentElement.setAttribute("data-theme",n)}),[n]);const[r,i]=h(Fe.getVersion()),[a,u]=h(S(e,"title.home")),m=(e,t=["1.15","1.16","1.17"])=>{document.title=`${e} Minecraft ${t.join(", ")}`,u(e)};return d(f,null,d(X,s({},{lang:e,title:a,theme:n,language:e,changeLanguage:async e=>{O[e]||await N(e),$.setLanguage(e),Fe.setLanguage(e),t(e)},changeTheme:e=>{$.setTheme(e),Fe.setTheme(e),o(e)}})),d(C,{onChange:e=>{setTimeout((()=>$.pageview(H(e.url))))}},d(ht,s({path:"/"},{lang:e,changeTitle:m})),d(dt,s({path:"/settings/fields"},{lang:e,changeTitle:m})),d(mt,s({path:"/worldgen"},{lang:e,changeTitle:m})),d(ut,l(s({default:!0},{lang:e,version:r,changeTitle:m}),{onChangeVersion:e=>{$.setVersion(e),Fe.setVersion(e),i(e)}}))))}k(d(gt,null),document.body); -//# sourceMappingURL=index.2de121cf.js.map diff --git a/assets/index.2de121cf.js.map b/assets/index.2de121cf.js.map deleted file mode 100644 index b6f096ca..00000000 --- a/assets/index.2de121cf.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.2de121cf.js","sources":["../../src/app/Analytics.ts","../../src/app/components/Ad.tsx","../../src/app/components/Btn.tsx","../../src/app/components/BtnInput.tsx","../../src/app/components/BtnMenu.tsx","../../src/app/components/ErrorPanel.tsx","../../vite/preload-helper","../../src/app/Locales.ts","../../src/app/Utils.ts","../../src/app/components/Header.tsx","../../src/app/components/Icons.tsx","../../src/app/components/Octicon.tsx","../../src/app/hooks/useModel.ts","../../src/app/hooks/useOnDrag.ts","../../src/app/previews/noise/ImprovedNoise.ts","../../src/app/previews/noise/PerlinNoise.ts","../../src/app/previews/noise/NormalNoise.ts","../../src/app/previews/BiomeSource.ts","../../src/app/previews/Decorator.ts","../../src/app/previews/noise/NoiseChunkGenerator.ts","../../src/app/previews/NoiseSettings.ts","../../src/app/components/PreviewPanel.tsx","../../src/app/components/previews/BiomeSourcePreview.tsx","../../src/app/hooks/useOnHover.ts","../../src/app/components/previews/NoiseSettingsPreview.tsx","../../src/app/components/previews/DecoratorPreview.tsx","../../src/app/schema/transformOutput.ts","../../src/app/DataFetcher.ts","../../src/app/Schemas.ts","../../src/app/Store.ts","../../src/app/components/SourcePanel.tsx","../../src/app/components/ToolCard.tsx","../../src/app/schema/Mounter.ts","../../src/app/schema/Octicon.ts","../../src/app/schema/renderHtml.ts","../../src/app/components/Tree.tsx","../../src/app/pages/FieldSettings.tsx","../../src/app/pages/Generator.tsx","../../src/app/pages/Home.tsx","../../src/app/pages/Worldgen.tsx","../../src/app/Main.tsx"],"sourcesContent":["export namespace Analytics {\n\tconst ID_SITE = 'Site'\n\tconst ID_GENERATOR = 'Generator'\n\n\tconst DIM_THEME = 1\n\tconst DIM_VERSION = 3\n\tconst DIM_LANGUAGE = 4\n\tconst DIM_PREVIEW = 5\n\n\tfunction event(category: string, action: string, label?: string) {\n\t\tga('send', 'event', category, action, label)\n\t}\n\n\tfunction dimension(index: number, value: string) {\n\t\tga('set', `dimension${index}`, value)\n\t}\n\n\texport function pageview(page: string) {\n\t\tga('set', 'page', page)\n\t\tga('send', 'pageview')\n\t}\n\n\texport function setLanguage(language: string) {\n\t\tdimension(DIM_LANGUAGE, language)\n\t\tevent(ID_SITE, 'set-language', language)\n\t}\n\n\texport function setTheme(theme: string) {\n\t\tdimension(DIM_THEME, theme)\n\t\tevent(ID_SITE, 'set-theme', theme)\n\t}\n\n\texport function setVersion(version: string) {\n\t\tdimension(DIM_VERSION, version)\n\t\tevent(ID_GENERATOR, 'set-version', version)\n\t}\n\n\texport function setPreview(preview: string) {\n\t\tdimension(DIM_PREVIEW, preview)\n\t\tevent(ID_GENERATOR, 'set-preview', preview)\n\t}\n\n\texport function generatorEvent(action: string, label?: string) {\n\t\tevent(ID_GENERATOR, action, label)\n\t}\n}\n","import { useEffect } from 'preact/hooks'\n\ndeclare const ethicalads: any\n\ntype AdProps = {\n\ttype: 'text' | 'image',\n\tid: string,\n}\nexport function Ad({ type, id }: AdProps) {\n\tuseEffect(() => {\n\t\tdocument.getElementById('ad-placeholder')?.remove()\n\t\tif ('ethicalads' in window) {\n\t\t\tethicalads.load()\n\t\t}\n\t}, [])\n\n\treturn
\n}\n","import { Octicon } from '.'\n\ntype BtnProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\tactive?: boolean,\n\tclass?: string,\n\tonClick?: (event: MouseEvent) => unknown,\n}\nexport function Btn({ icon, label, active, class: class_, onClick }: BtnProps) {\n\treturn
\n\t\t{icon && Octicon[icon]}\n\t\t{label && {label}}\n\t
\n}\n","import { useEffect, useRef } from 'preact/hooks'\nimport { Octicon } from '.'\n\ntype BtnInputProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\tlarge?: boolean,\n\ttype?: 'number' | 'text',\n\tdoSelect?: number,\n\tvalue?: string,\n\tonChange?: (value: string) => unknown,\n}\nexport function BtnInput({ icon, label, large, type, doSelect, value, onChange }: BtnInputProps) {\n\tconst onKeyUp = onChange === undefined ? () => {} : (e: any) => {\n\t\tconst value = (e.target as HTMLInputElement).value\n\t\tif (type !== 'number' || (!value.endsWith('.') && !isNaN(Number(value)))) {\n\t\t\tonChange?.(value)\n\t\t}\n\t}\n\n\tconst ref = useRef(null)\n\tuseEffect(() => {\n\t\tif (doSelect && ref.current) {\n\t\t\tref.current.select()\n\t\t}\n\t}, [doSelect])\n\n\treturn
e.stopPropagation()}>\n\t\t{icon && Octicon[icon]}\n\t\t{label && {label}}\n\t\t\n\t
\n}\n","import type { ComponentChildren } from 'preact'\nimport { useEffect, useState } from 'preact/hooks'\nimport type { Octicon } from '.'\nimport { Btn } from '.'\n\ntype BtnMenuProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\trelative?: boolean,\n\tchildren: ComponentChildren,\n}\nexport function BtnMenu({ icon, label, relative, children }: BtnMenuProps) {\n\tconst [active, setActive] = useState(false)\n\n\tconst hider = () => {\n\t\tsetActive(false)\n\t}\n\n\tuseEffect(() => {\n\t\tif (active) {\n\t\t\tdocument.body.addEventListener('click', hider)\n\t\t}\n\t\treturn () => {\n\t\t\tdocument.body.removeEventListener('click', hider)\n\t\t}\n\t}, [active])\n\n\treturn
\n\t\t setActive(true)} />\n\t\t{active &&
\n\t\t\t{children}\n\t\t
}\n\t
\n}\n","export function ErrorPanel({ error }: { error: string }) {\n\treturn
\n\t\t

{error}

\n\t\t

You can report this as a bug on GitHub

\n\t
\n}\n","let scriptRel;const seen = {};export const __vitePreload = function preload(baseModule, deps) {\n // @ts-ignore\n if (!__VITE_IS_MODERN__ || !deps) {\n return baseModule();\n }\n // @ts-ignore\n if (scriptRel === undefined) {\n // @ts-ignore\n const relList = document.createElement('link').relList;\n // @ts-ignore\n scriptRel =\n relList && relList.supports && relList.supports('modulepreload')\n ? 'modulepreload'\n : 'preload';\n }\n return Promise.all(deps.map((dep) => {\n // @ts-ignore\n if (dep in seen)\n return;\n // @ts-ignore\n seen[dep] = true;\n const isCss = dep.endsWith('.css');\n const cssSelector = isCss ? '[rel=\"stylesheet\"]' : '';\n // @ts-ignore check if the file is already preloaded by SSR markup\n if (document.querySelector(`link[href=\"${dep}\"]${cssSelector}`)) {\n return;\n }\n // @ts-ignore\n const link = document.createElement('link');\n // @ts-ignore\n link.rel = isCss ? 'stylesheet' : scriptRel;\n if (!isCss) {\n link.as = 'script';\n link.crossOrigin = '';\n }\n link.href = dep;\n // @ts-ignore\n document.head.appendChild(link);\n if (isCss) {\n return new Promise((res, rej) => {\n link.addEventListener('load', res);\n link.addEventListener('error', rej);\n });\n }\n })).then(() => baseModule());\n}","import config from '../config.json'\nimport English from '../locales/en.json'\n\nexport type Localize = (key: string, ...params: string[]) => string\n\ninterface Locale {\n\t[key: string]: string\n}\n\nexport const Locales: {\n\t[key: string]: Locale,\n} = {\n\tfallback: English,\n}\n\nfunction resolveLocaleParams(value: string, params?: string[]): string {\n\treturn value.replace(/%\\d+%/g, match => {\n\t\tconst index = parseInt(match.slice(1, -1))\n\t\treturn params?.[index] !== undefined ? params[index] : match\n\t})\n}\n\nexport function locale(language: string, key: string, ...params: string[]): string {\n\tconst value: string | undefined = Locales[language]?.[key]\n\t\t?? Locales.en?.[key] ?? Locales.fallback[key] ?? key\n\treturn resolveLocaleParams(value, params)\n}\n\nexport async function loadLocale(language: string) {\n\tconst langConfig = config.languages.find(lang => lang.code === language)\n\tif (!langConfig) return\n\tconst data = await import(`../locales/${language}.json`)\n\tconst schema = langConfig.schemas !== false\n\t\t&& await import(`../../node_modules/@mcschema/locales/src/${language}.json`)\n\tLocales[language] = { ...data.default, ...schema.default }\n}\n","import config from '../config.json'\n\nexport function isPromise(obj: any): obj is Promise {\n\treturn typeof (obj as any)?.then === 'function' \n}\n\nconst dec2hex = (dec: number) => ('0' + dec.toString(16)).substr(-2)\n\nexport function hexId(length = 12) {\n\tvar arr = new Uint8Array(length / 2)\n\twindow.crypto.getRandomValues(arr)\n\treturn Array.from(arr, dec2hex).join('')\n}\n\nexport function htmlEncode(str: string) {\n\treturn str.replace(/&/g, '&').replace(//g, '>')\n\t\t.replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/')\n}\n\nexport function hashString(s: string) {\n\tlet h = 0\n\tfor(let i = 0; i < s.length; i++)\n\t\th = Math.imul(31, h) + s.charCodeAt(i) | 0\n\treturn h\n}\n\nexport function cleanUrl(url: string) {\n\treturn `/${url}/`.replaceAll('//', '/')\n}\n\nexport function getGenerator(url: string) {\n\tconst trimmedUrl = url.replace(/^\\//, '').replace(/\\/$/, '')\n\treturn config.generators.find(g => g.url === trimmedUrl)\n}\n\nexport function stringToColor(str: string): [number, number, number] {\n\tconst h = Math.abs(hashString(str))\n\treturn [h % 256, (h >> 8) % 256, (h >> 16) % 256]\n}\n\nexport function clamp(a: number, b: number, c: number) {\n\treturn Math.max(a, Math.min(b, c))\n}\n\nexport function clampedLerp(a: number, b: number, c: number): number {\n\tif (c < 0) {\n\t\treturn a\n\t} else if (c > 1) {\n\t\treturn b\n\t} else {\n\t\treturn lerp(c, a, b)\n\t}\n}\n\nexport function lerp(a: number, b: number, c: number): number {\n\treturn b + a * (c - b)\n}\n\nexport function lerp2(a: number, b: number, c: number, d: number, e: number, f: number): number {\n\treturn lerp(b, lerp(a, c, d), lerp(a, e, f))\n}\n\nexport function lerp3(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) {\n\treturn lerp(c, lerp2(a, b, d, e, f, g), lerp2(a, b, h, i, j, k))\n}\n\nexport function smoothstep(x: number): number {\n\treturn x * x * x * (x * (x * 6 - 15) + 10)\n}\n","import { getCurrentUrl, Link } from 'preact-router'\nimport { Btn, BtnMenu, Icons, Octicon } from '.'\nimport config from '../../config.json'\nimport { locale } from '../Locales'\nimport { cleanUrl, getGenerator } from '../Utils'\n\nconst Themes: Record = {\n\tsystem: 'device_desktop',\n\tdark: 'moon',\n\tlight: 'sun',\n}\n\ntype HeaderProps = {\n\tlang: string,\n\ttitle: string,\n\ttheme: string,\n\tchangeTheme: (theme: string) => unknown,\n\tlanguage: string,\n\tchangeLanguage: (language: string) => unknown,\n}\nexport function Header({ lang, title, theme, changeTheme, language, changeLanguage }: HeaderProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst category = getGenerator(getCurrentUrl())?.category\n\n\treturn
\n\t\t
\n\t\t\t\n\t\t\t\t{Icons.home}\n\t\t\t\n\t\t\t

{title}

\n\t\t
\n\t\t\n\t
\n}\n","export const Icons = {\n\thome: ,\n\treport: ,\n\tsounds: ,\n}\n","export const Octicon = {\n\tarchive: ,\n\tarrow_left: ,\n\tarrow_right: ,\n\tchevron_right: ,\n\tclippy: ,\n\tcode: ,\n\tdash: ,\n\tdevice_desktop: ,\n\tdownload: ,\n\teye: ,\n\teye_closed: ,\n\tgear: ,\n\tglobe: ,\n\thistory: ,\n\tkebab_horizontal: ,\n\tlink: ,\n\tmark_github: ,\n\tmoon: ,\n\tplay: ,\n\tplus: ,\n\tsearch: ,\n\tsun: ,\n\tsync: ,\n\ttag: ,\n\tthree_bars: ,\n\tunfold: ,\n\tupload: ,\n\tx_circle: ,\n}\n","import type { DataModel } from '@mcschema/core'\nimport { useEffect } from 'preact/hooks'\n\nexport function useModel(model: DataModel | undefined | null, invalidated: (model: DataModel) => unknown) {\n\tconst listener = {\n\t\tinvalidated() {\n\t\t\tif (model) {\n\t\t\t\tinvalidated(model)\n\t\t\t}\n\t\t},\n\t}\n\n\tuseEffect(() => {\n\t\tmodel?.addListener(listener)\n\t\tlistener.invalidated()\n\t\treturn () => {\n\t\t\tmodel?.removeListener(listener)\n\t\t}\n\t}, [model])\n}\n","import { useEffect, useRef } from 'preact/hooks'\n\nexport function useOnDrag(element: HTMLElement, drag: (dx: number, dy: number) => unknown) {\n\tif (!element) return\n\n\tconst request = useRef()\n\tconst dragStart = useRef<[number, number] | undefined>()\n\tconst pending = useRef<[number, number]>([0, 0])\n\n\tuseEffect(() => {\n\t\tconst onMouseDown = (e: MouseEvent) => {\n\t\t\tdragStart.current = [e.offsetX, e.offsetY]\n\t\t}\n\t\tconst onMouseMove = (e: MouseEvent) => {\n\t\t\tif (dragStart.current === undefined) return\n\t\t\tconst dx = e.offsetX - dragStart.current[0]\n\t\t\tconst dy = e.offsetY - dragStart.current[1]\n\t\t\tif (!(dx === 0 && dy === 0)) {\n\t\t\t\tcancelAnimationFrame(request.current)\n\t\t\t\tpending.current = [pending.current[0] + dx, pending.current[1] + dy]\n\t\t\t\trequest.current = requestAnimationFrame(() => {\n\t\t\t\t\tdrag(...pending.current)\n\t\t\t\t\tpending.current = [0, 0]\n\t\t\t\t})\n\t\t\t}\n\t\t\tdragStart.current = [e.offsetX, e.offsetY]\n\t\t}\n\t\tconst onMouseUp = (_e: MouseEvent) => {\n\t\t\tdragStart.current = undefined\n\t\t}\n\n\t\telement.addEventListener('mousedown', onMouseDown)\n\t\telement.addEventListener('mousemove', onMouseMove)\n\t\tdocument.body.addEventListener('mouseup', onMouseUp)\n\t\treturn () => {\n\t\t\telement.removeEventListener('mousedown', onMouseDown)\n\t\t\telement.removeEventListener('mousemove', onMouseMove)\n\t\t\tdocument.body.removeEventListener('mouseup', onMouseUp)\n\t\t}\n\t}, [element])\n}\n","import type seedrandom from 'seedrandom'\nimport { lerp3, smoothstep } from '../../Utils'\n\nexport class ImprovedNoise {\n\tprivate static readonly 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]]\n\tprivate readonly p: number[]\n\tpublic readonly xo: number\n\tpublic readonly yo: number\n\tpublic readonly zo: number\n\n\tconstructor(random: seedrandom.prng) {\n\t\tthis.xo = random() * 256\n\t\tthis.yo = random() * 256\n\t\tthis.zo = random() * 256\n\t\tthis.p = Array(256)\n\n\t\tfor (let i = 0; i < 256; i += 1) {\n\t\t\tthis.p[i] = i\n\t\t}\n\t\tfor (let i = 0; i < 256; i += 1) {\n\t\t\tconst n = random.int32() % (256 - i)\n\t\t\tconst b = this.p[i]\n\t\t\tthis.p[i] = this.p[i + n]\n\t\t\tthis.p[i + n] = b\n\t\t}\n\t}\n\n\tpublic noise(x: number, y: number, z: number, a: number, b: number) {\n\t\tconst x2 = x + this.xo\n\t\tconst y2 = y + this.yo\n\t\tconst z2 = z + this.zo\n\t\tconst x3 = Math.floor(x2)\n\t\tconst y3 = Math.floor(y2)\n\t\tconst z3 = Math.floor(z2)\n\t\tconst x4 = x2 - x3\n\t\tconst y4 = y2 - y3\n\t\tconst z4 = z2 - z3\n\t\tconst x5 = smoothstep(x4)\n\t\tconst y5 = smoothstep(y4)\n\t\tconst z5 = smoothstep(z4)\n\n\t\tlet y6 = 0\n\t\tif (a !== 0) {\n\t\t\ty6 = Math.floor(Math.min(b, y4) / a) * a\n\t\t}\n\n\t\treturn this.sampleAndLerp(x3, y3, z3, x4, y4 - y6, z4, x5, y5, z5)\n\t}\n\n\tprivate gradDot(a: number, b: number, c: number, d: number) {\n\t\tconst grad = ImprovedNoise.GRADIENT[a & 15]\n\t\treturn grad[0] * b + grad[1] * c + grad[2] * d\n\t}\n\n\tprivate P(i: number) {\n\t\treturn this.p[i & 255] & 255\n\t}\n\n\tpublic sampleAndLerp(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) {\n\t\tconst j = this.P(a) + b\n\t\tconst k = this.P(j) + c\n\t\tconst l = this.P(j + 1) + c\n\t\tconst m = this.P(a + 1) + b\n\t\tconst n = this.P(m) + c\n\t\tconst o = this.P(m + 1) + c\n\n\t\tconst p = this.gradDot(this.P(k), d, e, f)\n\t\tconst q = this.gradDot(this.P(n), d - 1, e, f)\n\t\tconst r = this.gradDot(this.P(l), d, e - 1, f)\n\t\tconst s = this.gradDot(this.P(o), d - 1, e - 1, f)\n \n\t\tconst t = this.gradDot(this.P(k + 1), d, e, f - 1)\n\t\tconst u = this.gradDot(this.P(n + 1), d - 1, e, f - 1)\n\t\tconst v = this.gradDot(this.P(l + 1), d, e - 1, f - 1)\n\t\tconst w = this.gradDot(this.P(o + 1), d - 1, e - 1, f - 1)\n\n\t\treturn lerp3(g, h, i, p, q, r, s, t, u, v, w)\n\t}\n}\n","import seedrandom from 'seedrandom'\nimport { ImprovedNoise } from './ImprovedNoise'\n\nexport class PerlinNoise {\n\tprivate readonly noiseLevels: ImprovedNoise[]\n\tprivate readonly amplitudes: number[]\n\tprivate readonly lowestFreqValueFactor: number\n\tprivate readonly lowestFreqInputFactor: number\n\n\tconstructor(seed: string, firstOctave: number, amplitudes: number[]) {\n\t\tthis.amplitudes = amplitudes\n\n\t\tthis.noiseLevels = Array(this.amplitudes.length)\n\t\tfor (let i = 0; i < this.amplitudes.length; i += 1) {\n\t\t\tthis.noiseLevels[i] = new ImprovedNoise(seedrandom(seed))\n\t\t}\n \n\t\tthis.lowestFreqInputFactor = Math.pow(2, firstOctave)\n\t\tthis.lowestFreqValueFactor = Math.pow(2, (amplitudes.length - 1)) / (Math.pow(2, amplitudes.length) - 1)\n\t}\n\n\tpublic static fromRange(seed: string, min: number, max: number) {\n\t\treturn new PerlinNoise(seed, min, Array(max - min + 1).fill(1))\n\t}\n\n\tpublic getValue(x: number, y: number, z: number, a = 0, b = 0, fixY = false) {\n\t\tlet value = 0\n\t\tlet inputF = this.lowestFreqInputFactor\n\t\tlet valueF = this.lowestFreqValueFactor\n\t\tfor (let i = 0; i < this.noiseLevels.length; i += 1) {\n\t\t\tconst noise = this.noiseLevels[i]\n\t\t\tif (noise) {\n\t\t\t\tvalue += this.amplitudes[i] * noise.noise(\n\t\t\t\t\tPerlinNoise.wrap(x * inputF),\n\t\t\t\t\tfixY ? -noise.yo : PerlinNoise.wrap(y * inputF),\n\t\t\t\t\tPerlinNoise.wrap(z * inputF),\n\t\t\t\t\ta * inputF,\n\t\t\t\t\tb * inputF\n\t\t\t\t) * valueF\n\t\t\t}\n\t\t\tinputF *= 2\n\t\t\tvalueF /= 2\n\t\t}\n\t\treturn value\n\t}\n\n\tpublic getOctaveNoise(i: number) {\n\t\treturn this.noiseLevels[this.noiseLevels.length - 1 - i]\n\t}\n\n\tpublic static wrap(value: number) {\n\t\treturn value - Math.floor(value / 3.3554432E7 + 0.5) * 3.3554432E7\n\t}\n}\n","import { PerlinNoise } from './PerlinNoise'\n\nexport class NormalNoise {\n\tprivate readonly valueFactor: number\n\tprivate readonly first: PerlinNoise\n\tprivate readonly second: PerlinNoise\n\n\tconstructor(seed: string, firstOctave: number, amplitudes: number[]) {\n\t\tthis.first = new PerlinNoise(seed, firstOctave, amplitudes)\n\t\tthis.second = new PerlinNoise(seed + 'a', firstOctave, amplitudes)\n\n\t\tlet min = +Infinity\n\t\tlet max = -Infinity\n\t\tfor (let i = 0; i < amplitudes.length; i += 1) {\n\t\t\tif (amplitudes[i] !== 0) {\n\t\t\t\tmin = Math.min(min, i)\n\t\t\t\tmax = Math.max(max, i)\n\t\t\t}\n\t\t}\n\n\t\tconst expectedDeviation = 0.1 * (1 + 1 / (max - min + 1))\n\t\tthis.valueFactor = (1/6) / expectedDeviation\n\t}\n\n\tgetValue(x: number, y: number, z: number) {\n\t\tconst x2 = x * 1.0181268882175227\n\t\tconst y2 = y * 1.0181268882175227\n\t\tconst z2 = z * 1.0181268882175227\n\t\treturn (this.first.getValue(x, y, z) + this.second.getValue(x2, y2, z2)) * this.valueFactor\n\t}\n}\n","import { stringToColor } from '../Utils'\nimport { NormalNoise } from './noise/NormalNoise'\n\nexport type BiomeColors =Record\nexport type BiomeSourceOptions = {\n\tbiomeColors: BiomeColors,\n\toffset: [number, number],\n\tscale: number,\n\tres: number,\n\tseed: string,\n}\n\nexport const NoiseMaps = ['altitude', 'temperature', 'humidity', 'weirdness']\n\nexport function biomeSource(state: any, img: ImageData, options: BiomeSourceOptions) {\n\tswitch (state?.type?.replace(/^minecraft:/, '')) {\n\t\tcase 'multi_noise': return multiNoise(state, img, options)\n\t\tcase 'fixed': return fixed(state, img, options)\n\t\tcase 'checkerboard': return checkerboard(state, img, options)\n\t}\n}\n\nfunction fixed(state: any, img: ImageData, options: BiomeSourceOptions) {\n\tconst data = img.data\n\tconst color = getBiomeColor(state.biome, options.biomeColors)\n\tconst row = img.width * 4 / options.res\n\tconst col = 4 / options.res\n\tfor (let x = 0; x < 200; x += options.res) {\n\t\tfor (let y = 0; y < 200; y += options.res) {\n\t\t\tconst i = y * row + x * col\n\t\t\tdata[i] = color[0]\n\t\t\tdata[i + 1] = color[1]\n\t\t\tdata[i + 2] = color[2]\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nfunction checkerboard(state: any, img: ImageData, options: BiomeSourceOptions) {\n\tconst biomeColorCache: BiomeColors = {}\n\tstate.biomes?.forEach((b: string) => {\n\t\tbiomeColorCache[b] = getBiomeColor(b, options.biomeColors)\n\t})\n\n\tconst data = img.data\n\tconst ox = -options.offset[0] - 100 + options.res / 2\n\tconst oy = -options.offset[1] - 100 + options.res / 2\n\tconst row = img.width * 4 / options.res\n\tconst col = 4 / options.res\n\tconst shift = (state.scale ?? 2) + 2\n\tconst numBiomes = state.biomes?.length ?? 0\n\tfor (let x = 0; x < 200; x += options.res) {\n\t\tfor (let y = 0; y < 200; y += options.res) {\n\t\t\tconst i = y * row + x * col\n\t\t\tconst xx = (x + ox) * options.scale\n\t\t\tconst yy = (y + oy) * options.scale\n\t\t\tconst j = (((xx >> shift) + (yy >> shift)) % numBiomes + numBiomes) % numBiomes\n\t\t\tconst b = state.biomes?.[j]\n\t\t\tconst color = biomeColorCache[b] ?? [128, 128, 128]\n\t\t\tdata[i] = color[0]\n\t\t\tdata[i + 1] = color[1]\n\t\t\tdata[i + 2] = color[2]\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nfunction multiNoise(state: any, img: ImageData, options: BiomeSourceOptions) {\n\tconst noise = NoiseMaps.map((id, i) => {\n\t\tconst config = state[`${id}_noise`]\n\t\treturn new NormalNoise(options.seed + i, config.firstOctave, config.amplitudes)\n\t})\n\n\tconst biomeColorCache: BiomeColors = {}\n\tstate.biomes.forEach((b: any) => {\n\t\tbiomeColorCache[b.biome] = getBiomeColor(b.biome, options.biomeColors)\n\t})\n\n\tconst data = img.data\n\tconst ox = -options.offset[0] - 100 + options.res / 2\n\tconst oy = -options.offset[1] - 100 + options.res / 2\n\tconst row = img.width * 4 / options.res\n\tconst col = 4 / options.res\n\tfor (let x = 0; x < 200; x += options.res) {\n\t\tfor (let y = 0; y < 200; y += options.res) {\n\t\t\tconst i = y * row + x * col\n\t\t\tconst xx = (x + ox) * options.scale\n\t\t\tconst yy = (y + oy) * options.scale\n\t\t\tconst b = closestBiome(noise, state.biomes, xx, yy)\n\t\t\tconst color = biomeColorCache[b] ?? [128, 128, 128]\n\t\t\tdata[i] = color[0]\n\t\t\tdata[i + 1] = color[1]\n\t\t\tdata[i + 2] = color[2]\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nexport function getBiome(state: any, x: number, y: number, options: BiomeSourceOptions): string | undefined {\n\tconst [xx, yy] = toWorld([x, y], options)\n\tswitch (state?.type?.replace(/^minecraft:/, '')) {\n\t\tcase 'multi_noise':\n\t\t\tconst noise = NoiseMaps.map((id, i) => {\n\t\t\t\tconst config = state[`${id}_noise`]\n\t\t\t\treturn new NormalNoise(options.seed + i, config.firstOctave, config.amplitudes)\n\t\t\t})\n\t\t\treturn closestBiome(noise, state.biomes, xx, yy)\n\t\tcase 'fixed': return state.biome\n\t\tcase 'checkerboard':\n\t\t\tconst shift = (state.scale ?? 2) + 2\n\t\t\tconst numBiomes = state.biomes?.length ?? 0\n\t\t\tconst j = (((xx >> shift) + (yy >> shift)) % numBiomes + numBiomes) % numBiomes\n\t\t\treturn state.biomes?.[j]\n\t}\n\treturn undefined\n}\n\nexport function getBiomeColor(biome: string, biomeColors: BiomeColors) {\n\tif (!biome) {\n\t\treturn [128, 128, 128]\n\t}\n\tconst color = biomeColors[biome] ?? VanillaColors[biome]\n\tif (color === undefined) {\n\t\treturn stringToColor(biome)\n\t}\n\treturn color\n}\n\nfunction toWorld([x, y]: [number, number], options: BiomeSourceOptions) {\n\tconst xx = (x - options.offset[0] - 100 + options.res / 2) * options.scale\n\tconst yy = (y - options.offset[1] - 100 + options.res / 2) * options.scale\n\treturn [xx, yy]\n}\n\nfunction closestBiome(noise: NormalNoise[], biomes: any[], x: number, y: number): string {\n\tif (!Array.isArray(biomes) || biomes.length === 0) return ''\n\tconst n = noise.map(n => n.getValue(x, y, 0))\n\tlet minDist = Infinity\n\tlet minBiome = ''\n\tfor (const b of biomes) {\n\t\tconst dist = fitness(b.parameters, {altitude: n[0], temperature: n[1], humidity: n[2], weirdness: n[3], offset: 0})\n\t\tif (dist < minDist) {\n\t\t\tminDist = dist\n\t\t\tminBiome = b.biome\n\t\t}\n\t}\n\treturn minBiome\n}\n\nfunction fitness(a: any, b: any) {\n\treturn (a.altitude - b.altitude) * (a.altitude - b.altitude) + (a.temperature - b.temperature) * (a.temperature - b.temperature) + (a.humidity - b.humidity) * (a.humidity - b.humidity) + (a.weirdness - b.weirdness) * (a.weirdness - b.weirdness) + (a.offset - b.offset) * (a.offset - b.offset)\n}\n\nconst VanillaColors: Record = {\n\t'minecraft:badlands': [217,69,21],\n\t'minecraft:badlands_plateau': [202,140,101],\n\t'minecraft:bamboo_jungle': [118,142,20],\n\t'minecraft:bamboo_jungle_hills': [59,71,10],\n\t'minecraft:basalt_deltas': [64,54,54],\n\t'minecraft:beach': [250,222,85],\n\t'minecraft:birch_forest': [48,116,68],\n\t'minecraft:birch_forest_hills': [31,95,50],\n\t'minecraft:cold_ocean': [32,32,112],\n\t'minecraft:crimson_forest': [221,8,8],\n\t'minecraft:dark_forest': [64,81,26],\n\t'minecraft:dark_forest_hills': [104,121,66],\n\t'minecraft:deep_cold_ocean': [32,32,56],\n\t'minecraft:deep_frozen_ocean': [64,64,144],\n\t'minecraft:deep_lukewarm_ocean': [0,0,64],\n\t'minecraft:deep_ocean': [0,0,48],\n\t'minecraft:deep_warm_ocean': [0,0,80],\n\t'minecraft:desert': [250,148,24],\n\t'minecraft:desert_hills': [210,95,18],\n\t'minecraft:desert_lakes': [255,188,64],\n\t'minecraft:end_barrens': [128,128,255],\n\t'minecraft:end_highlands': [128,128,255],\n\t'minecraft:end_midlands': [128,128,255],\n\t'minecraft:eroded_badlands': [255,109,61],\n\t'minecraft:flower_forest': [45,142,73],\n\t'minecraft:forest': [5,102,33],\n\t'minecraft:frozen_ocean': [112,112,214],\n\t'minecraft:frozen_river': [160,160,255],\n\t'minecraft:giant_spruce_taiga': [129,142,121],\n\t'minecraft:giant_spruce_taiga_hills': [109,119,102],\n\t'minecraft:giant_tree_taiga': [89,102,81],\n\t'minecraft:giant_tree_taiga_hills': [69,79,62],\n\t'minecraft:gravelly_mountains': [136,136,136],\n\t'minecraft:ice_spikes': [180,220,220],\n\t'minecraft:jungle': [83,123,9],\n\t'minecraft:jungle_edge': [98,139,23],\n\t'minecraft:jungle_hills': [44,66,5],\n\t'minecraft:lukewarm_ocean': [0,0,144],\n\t'minecraft:modified_badlands_plateau': [242,180,141],\n\t'minecraft:modified_gravelly_mountains': [120,152,120],\n\t'minecraft:modified_jungle': [123,163,49],\n\t'minecraft:modified_jungle_edge': [138,179,63],\n\t'minecraft:modified_wooded_badlands_plateau': [216,191,141],\n\t'minecraft:mountain_edge': [114,120,154],\n\t'minecraft:mountains': [96,96,96],\n\t'minecraft:mushroom_field_shore': [160,0,255],\n\t'minecraft:mushroom_fields': [255,0,255],\n\t'minecraft:nether_wastes': [191,59,59],\n\t'minecraft:ocean': [0,0,112],\n\t'minecraft:plains': [141,179,96],\n\t'minecraft:river': [0,0,255],\n\t'minecraft:savanna': [189,178,95],\n\t'minecraft:savanna_plateau': [167,157,100],\n\t'minecraft:shattered_savanna': [229,218,135],\n\t'minecraft:shattered_savanna_plateau': [207,197,140],\n\t'minecraft:small_end_islands': [128,128,255],\n\t'minecraft:snowy_beach': [250,240,192],\n\t'minecraft:snowy_mountains': [160,160,160],\n\t'minecraft:snowy_taiga': [49,85,74],\n\t'minecraft:snowy_taiga_hills': [36,63,54],\n\t'minecraft:snowy_taiga_mountains': [89,125,114],\n\t'minecraft:snowy_tundra': [255,255,255],\n\t'minecraft:soul_sand_valley': [94,56,48],\n\t'minecraft:stone_shore': [162,162,132],\n\t'minecraft:sunflower_plains': [181,219,136],\n\t'minecraft:swamp': [7,249,178],\n\t'minecraft:swamp_hills': [47,255,218],\n\t'minecraft:taiga': [11,102,89],\n\t'minecraft:taiga_hills': [22,57,51],\n\t'minecraft:taiga_mountains': [51,142,129],\n\t'minecraft:tall_birch_forest': [88,156,108],\n\t'minecraft:tall_birch_hills': [71,135,90],\n\t'minecraft:the_end': [128,128,255],\n\t'minecraft:the_void': [0,0,0],\n\t'minecraft:warm_ocean': [0,0,172],\n\t'minecraft:warped_forest': [73,144,123],\n\t'minecraft:wooded_badlands_plateau': [176,151,101],\n\t'minecraft:wooded_hills': [34,85,28],\n\t'minecraft:wooded_mountains': [80,112,80],\n}\n","import seedrandom from 'seedrandom'\nimport type { VersionId } from '../Schemas'\nimport { clamp, stringToColor } from '../Utils'\nimport { PerlinNoise } from './noise/PerlinNoise'\n\ntype BlockPos = [number, number, number]\ntype Placement = [BlockPos, number]\n\ntype PlacementContext = {\n\tplacements: Placement[],\n\tfeatures: string[],\n\trandom: seedrandom.prng,\n\tbiomeInfoNoise: PerlinNoise,\n\tseaLevel: number,\n\tversion: VersionId,\n}\n\nconst terrain = [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] \n\nconst featureColors = [\n\t[255, 77, 54], // red\n\t[59, 118, 255], // blue\n\t[91, 207, 25], // green\n\t[217, 32, 245], // magenta\n\t[255, 209, 41], // yellow\n\t[52, 204, 209], // cyan\n]\n\nexport type DecoratorOptions = {\n\tsize: [number, number, number],\n\tseed: string,\n\tversion: VersionId,\n}\nexport function decorator(state: any, img: ImageData, options: DecoratorOptions) {\n\tconst random = seedrandom(options.seed)\n\tconst ctx: PlacementContext = {\n\t\tplacements: [],\n\t\tfeatures: [],\n\t\trandom,\n\t\tbiomeInfoNoise: new PerlinNoise(options.seed + 'frwynup', 0, [1]),\n\t\tseaLevel: 63,\n\t\tversion: options.version,\n\t}\n\n\tfor (let x = 0; x < options.size[0] / 16; x += 1) {\n\t\tfor (let z = 0; z < options.size[2] / 16; z += 1) {\n\t\t\tgetPlacements([x * 16, 0, z * 16], state, ctx)\n\t\t}\n\t}\n\n\tconst data = img.data\n\timg.data.fill(255)\n\n\tfor (const [pos, feature] of ctx.placements) {\n\t\tif (pos[0] < 0 || pos[1] < 0 || pos[2] < 0 || pos[0] >= options.size[0] || pos[1] >= options.size[1] || pos[2] >= options.size[2]) continue\n\t\tconst i = (pos[2] * (img.width * 4)) + (pos[0] * 4)\n\t\tconst color = feature < featureColors.length ? featureColors[feature] : stringToColor(ctx.features[feature])\n\t\tdata[i] = clamp(50, 205, color[0])\n\t\tdata[i + 1] = clamp(50, 205, color[1])\n\t\tdata[i + 2] = clamp(50, 205, color[2])\n\t\tdata[i + 3] = 255\n\t}\n\n\tfor (let x = 0; x < options.size[0]; x += 1) {\n\t\tfor (let y = 0; y < options.size[2]; y += 1) {\n\t\t\tif ((Math.floor(x / 16) + Math.floor(y / 16)) % 2 === 0) continue\n\t\t\tconst i = (y * (img.width * 4)) + (x * 4)\n\t\t\tfor (let j = 0; j < 3; j += 1) {\n\t\t\t\tdata[i + j] = 0.85 * data[i + j] \n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction normalize(id: string) {\n\treturn id.startsWith('minecraft:') ? id.slice(10) : id\n}\n\nfunction decorateY(pos: BlockPos, y: number): BlockPos[] {\n\treturn [[ pos[0], y, pos[2] ]]\n}\n\nfunction nextInt(max: number, ctx: PlacementContext): number {\n\treturn Math.floor(ctx.random() * max)\n}\n\nfunction sampleInt(value: any, ctx: PlacementContext): number {\n\tif (typeof value === 'number') {\n\t\treturn value\n\t} else if (value.base) {\n\t\treturn value.base ?? 1 + nextInt(1 + (value.spread ?? 0), ctx)\n\t} else {\n\t\tswitch (normalize(value.type)) {\n\t\t\tcase 'constant': return value.value\n\t\t\tcase 'uniform': return value.value.min_inclusive + nextInt(value.value.max_inclusive - value.value.min_inclusive + 1, ctx)\n\t\t\tcase 'biased_to_bottom': return value.value.min_inclusive + nextInt(nextInt(value.value.max_inclusive - value.value.min_inclusive + 1, ctx) + 1, ctx)\n\t\t\tcase 'clamped': return Math.max(value.value.min_inclusive, Math.min(value.value.max_inclusive, sampleInt(value.value.source, ctx)))\n\t\t}\n\t\treturn 1\n\t}\n}\n\nfunction useFeature(s: string, ctx: PlacementContext) {\n\tconst i = ctx.features.indexOf(s)\n\tif (i != -1) return i\n\tctx.features.push(s)\n\treturn ctx.features.length - 1\n}\n\nfunction getPlacements(pos: BlockPos, feature: any, ctx: PlacementContext): void {\n\tif (typeof feature === 'string') {\n\t\tctx.placements.push([pos, useFeature(feature, ctx)])\n\t\treturn\n\t}\n\tconst type = normalize(feature?.type ?? 'no_op')\n\tconst featureFn = Features[type]\n\tif (featureFn) {\n\t\tfeatureFn(feature.config, pos, ctx)\n\t} else {\n\t\tctx.placements.push([pos, useFeature(JSON.stringify(feature), ctx)])\n\t}\n}\n\nfunction getPositions(pos: BlockPos, decorator: any, ctx: PlacementContext): BlockPos[] {\n\tconst type = normalize(decorator?.type ?? 'nope')\n\tconst decoratorFn = Decorators[type]\n\tif (!decoratorFn) {\n\t\treturn [pos]\n\t}\n\treturn decoratorFn(decorator?.config, pos, ctx)\n}\n\nconst Features: {\n\t[key: string]: (config: any, pos: BlockPos, ctx: PlacementContext) => void,\n} = {\n\tdecorated: (config, pos, ctx) => {\n\t\tconst positions = getPositions(pos, config?.decorator, ctx)\n\t\tpositions.forEach(p => getPlacements(p, config?.feature, ctx))\n\t},\n\trandom_boolean_selector: (config, pos, ctx) => {\n\t\tconst feature = ctx.random() < 0.5 ? config?.feature_true : config?.feature_false\n\t\tgetPlacements(pos, feature, ctx)\n\t},\n\trandom_selector: (config, pos, ctx) => {\n\t\tfor (const f of config?.features ?? []) {\n\t\t\tif (ctx.random() < (f?.chance ?? 0)) {\n\t\t\t\tgetPlacements(pos, f.feature, ctx)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tgetPlacements(pos, config?.default, ctx)\n\t},\n\tsimple_random_selector: (config, pos, ctx) => {\n\t\tconst feature = config?.features?.[nextInt(config?.features?.length ?? 0, ctx)]\n\t\tgetPlacements(pos, feature, ctx)\n\t},\n}\n\nconst Decorators: {\n\t[key: string]: (config: any, pos: BlockPos, ctx: PlacementContext) => BlockPos[],\n} = {\n\tchance: (config, pos, ctx) => {\n\t\treturn ctx.random() < 1 / (config?.chance ?? 1) ? [pos] : []\n\t},\n\tcount: (config, pos, ctx) => {\n\t\treturn new Array(sampleInt(config?.count ?? 1, ctx)).fill(pos)\n\t},\n\tcount_extra: (config, pos, ctx) => {\n\t\tlet count = config?.count ?? 1\n\t\tif (ctx.random() < config.extra_chance ?? 0){\n\t\t\tcount += config.extra_count ?? 0\n\t\t}\n\t\treturn new Array(count).fill(pos)\n\t},\n\tcount_multilayer: (config, pos, ctx) => {\n\t\treturn new Array(sampleInt(config?.count ?? 1, ctx)).fill(pos)\n\t\t\t.map(p => [\n\t\t\t\tp[0] + nextInt(16, ctx),\n\t\t\t\tp[1], \n\t\t\t\tp[2] + nextInt(16, ctx),\n\t\t\t])\n\t},\n\tcount_noise: (config, pos, ctx) => {\n\t\tconst noise = ctx.biomeInfoNoise.getValue(pos[0] / 200, 0, pos[2] / 200)\n\t\tconst count = noise < config.noise_level ? config.below_noise : config.above_noise\n\t\treturn new Array(count).fill(pos)\n\t},\n\tcount_noise_biased: (config, pos, ctx) => {\n\t\tconst factor = Math.max(1, config.noise_factor)\n\t\tconst noise = ctx.biomeInfoNoise.getValue(pos[0] / factor, 0, pos[2] / factor)\n\t\tconst count = Math.max(0, Math.ceil((noise + (config.noise_offset ?? 0)) * config.noise_to_count_ratio))\n\t\treturn new Array(count).fill(pos)\n\t},\n\tdark_oak_tree: (_config, pos, ctx) => {\n\t\treturn [...new Array(16)].map((_, i) => {\n\t\t\tconst x = Math.floor(i / 4) * 4 + 1 + nextInt(3, ctx) + pos[0]\n\t\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, x)])\n\t\t\tconst z = Math.floor(i % 4) * 4 + 1 + nextInt(3, ctx) + pos[2]\n\t\t\treturn [x, y, z]\n\t\t})\n\t},\n\tdecorated: (config, pos, ctx) => {\n\t\treturn getPositions(pos, config?.outer, ctx).flatMap(p => {\n\t\t\treturn getPositions(p, config?.inner, ctx)\n\t\t})\n\t},\n\tdepth_average: (config, pos, ctx) => {\n\t\tconst y = nextInt(config?.spread ?? 0, ctx) + nextInt(config?.spread ?? 0, ctx) - (config.spread ?? 0) + (config?.baseline ?? 0)\n\t\treturn decorateY(pos, y)\n\t},\n\temerald_ore: (_config, pos, ctx) => {\n\t\tconst count = 3 + nextInt(6, ctx)\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + nextInt(16, ctx),\n\t\t\t4 + nextInt(28, ctx),\n\t\t\tpos[2] + nextInt(16, ctx),\n\t\t])\n\t},\n\tfire: (config, pos, ctx) => {\n\t\tconst count = 1 + nextInt(nextInt(sampleInt(config?.count, ctx), ctx), ctx)\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + nextInt(16, ctx),\n\t\t\tnextInt(128, ctx),\n\t\t\tpos[2] + nextInt(16, ctx),\n\t\t])\n\t},\n\tglowstone: (config, pos, ctx) => {\n\t\tconst count = nextInt(1 + nextInt(sampleInt(config?.count, ctx), ctx), ctx)\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + nextInt(16, ctx),\n\t\t\tnextInt(128, ctx),\n\t\t\tpos[2] + nextInt(16, ctx),\n\t\t])\n\t},\n\theightmap: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, y)\n\t},\n\theightmap_spread_double: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, nextInt(y * 2, ctx))\n\t},\n\theightmap_world_surface: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, y)\n\t},\n\ticeberg: (_config, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + 4 + nextInt(8, ctx),\n\t\t\tpos[1],\n\t\t\tpos[2] + 4 + nextInt(8, ctx),\n\t\t]]\n\t},\n\tlava_lake: (config, pos, ctx) => {\n\t\tif (nextInt((config.chance ?? 1) / 10, ctx) === 0) {\n\t\t\tconst y = nextInt(nextInt(256 - 8, ctx) + 8, ctx)\n\t\t\tif (y < ctx.seaLevel || nextInt((config?.chance ?? 1) / 8, ctx) == 0) {\n\t\t\t\tconst x = nextInt(16, ctx) + pos[0]\n\t\t\t\tconst z = nextInt(16, ctx) + pos[2]\n\t\t\t\treturn [[x, y, z]]\n\t\t\t}\n\t\t}\n\t\treturn []\n\t},\n\tnope: (_config, pos) => {\n\t\treturn [pos]\n\t},\n\trange: (config, pos, ctx) => {\n\t\tconst y = nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0), ctx) + (config?.bottom_offset ?? 0)\n\t\treturn decorateY(pos, y)\n\t},\n\trange_biased: (config, pos, ctx) => {\n\t\tconst y = nextInt(nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0), ctx) + (config?.bottom_offset ?? 0), ctx)\n\t\treturn decorateY(pos, y)\n\t},\n\trange_very_biased: (config, pos, ctx) => {\n\t\tconst y = nextInt(nextInt(nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0), ctx) + (config?.bottom_offset ?? 0), ctx) + (config?.bottom_offset ?? 0), ctx)\n\t\treturn decorateY(pos, y)\n\t},\n\tspread_32_above: (_config, pos, ctx) => {\n\t\tconst y = nextInt(pos[1] + 32, ctx)\n\t\treturn decorateY(pos, y)\n\t},\n\ttop_solid_heightmap: (_config, pos) => {\n\t\tconst y = terrain[clamp(0, 63, pos[0])]\n\t\treturn decorateY(pos, y)\n\t},\n\tmagma: (_config, pos, ctx) => {\n\t\tconst y = nextInt(pos[1] + 32, ctx)\n\t\treturn decorateY(pos, y)\n\t},\n\tsquare: (_config, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + nextInt(16, ctx),\n\t\t\tpos[1],\n\t\t\tpos[2] + nextInt(16, ctx),\n\t\t]]\n\t},\n\twater_lake: (config, pos, ctx) => {\n\t\tif (nextInt(config.chance ?? 1, ctx) === 0) {\n\t\t\treturn [[\n\t\t\t\tpos[0] + nextInt(16, ctx),\n\t\t\t\tnextInt(256, ctx),\n\t\t\t\tpos[2] + nextInt(16, ctx),\n\t\t\t]]\n\t\t}\n\t\treturn []\n\t},\n}\n","import { clampedLerp, lerp2 } from '../../Utils'\nimport { PerlinNoise } from './PerlinNoise'\n\nexport class NoiseChunkGenerator {\n\tprivate readonly minLimitPerlinNoise: PerlinNoise\n\tprivate readonly maxLimitPerlinNoise: PerlinNoise\n\tprivate readonly mainPerlinNoise: PerlinNoise\n\tprivate readonly depthNoise: PerlinNoise\n\n\tprivate settings: any = {}\n\tprivate chunkWidth: number = 4\n\tprivate chunkHeight: number = 4\n\tprivate chunkCountY: number = 32\n\tprivate biomeDepth: number = 0.1\n\tprivate biomeScale: number = 0.2\n\n\tprivate noiseColumnCache: (number[] | null)[] = []\n\tprivate xOffset: number = 0\n\n\tconstructor(seed: string) {\n\t\tthis.minLimitPerlinNoise = PerlinNoise.fromRange(seed + 'djfqnqd', -15, 0)\n\t\tthis.maxLimitPerlinNoise = PerlinNoise.fromRange(seed + 'gowdnqs', -15, 0)\n\t\tthis.mainPerlinNoise = PerlinNoise.fromRange(seed + 'afiwmco', -7, 0)\n\t\tthis.depthNoise = PerlinNoise.fromRange(seed + 'qphnmeo', -15, 0)\n\t}\n\n\tpublic reset(settings: any, depth: number, scale: number, xOffset: number, width: number) {\n\t\tthis.settings = settings\n\t\tthis.chunkWidth = settings.size_horizontal * 4\n\t\tthis.chunkHeight = settings.size_vertical * 4\n\t\tthis.chunkCountY = Math.floor(settings.height / this.chunkHeight)\n\n\t\tif (settings.amplified && depth > 0) {\n\t\t\tdepth = 1 + depth * 2\n\t\t\tscale = 1 + scale * 4\n\t\t}\n\t\tthis.biomeDepth = 0.265625 * (depth * 0.5 - 0.125)\n\t\tthis.biomeScale = 96.0 / (scale * 0.9 + 0.1)\n\n\t\tthis.noiseColumnCache = Array(width).fill(null)\n\t\tthis.xOffset = xOffset\n\t}\n \n\tpublic iterateNoiseColumn(x: number): number[] {\n\t\tconst data = Array(this.chunkCountY * this.chunkHeight)\n\t\tconst cx = Math.floor(x / this.chunkWidth)\n\t\tconst ox = Math.floor(x % this.chunkWidth) / this.chunkWidth\n\t\tconst noise1 = this.fillNoiseColumn(cx)\n\t\tconst noise2 = this.fillNoiseColumn(cx + 1)\n\n\t\tfor (let y = this.chunkCountY - 1; y >= 0; y -= 1) {\n\t\t\tfor (let yy = this.chunkHeight; yy >= 0; yy -= 1) {\n\t\t\t\tconst oy = yy / this.chunkHeight\n\t\t\t\tconst i = y * this.chunkHeight + yy\n\t\t\t\tdata[i] = lerp2(oy, ox, noise1[y], noise1[y+1], noise2[y], noise2[y+1])\n\t\t\t}\n\t\t}\n\t\treturn data\n\t}\n\n\tprivate fillNoiseColumn(x: number): number[] {\n\t\tconst cachedColumn = this.noiseColumnCache[x - this.xOffset]\n\t\tif (cachedColumn) return cachedColumn\n\n\t\tconst data = Array(this.chunkCountY + 1)\n\n\t\tconst xzScale = 684.412 * this.settings.sampling.xz_scale\n\t\tconst yScale = 684.412 * this.settings.sampling.y_scale\n\t\tconst xzFactor = xzScale / this.settings.sampling.xz_factor\n\t\tconst yFactor = yScale / this.settings.sampling.y_factor\n\t\tconst randomDensity = this.settings.random_density_offset ? this.getRandomDensity(x) : 0\n\n\t\tfor (let y = 0; y <= this.chunkCountY; y += 1) {\n\t\t\tlet noise = this.sampleAndClampNoise(x, y, this.mainPerlinNoise.getOctaveNoise(0).zo, xzScale, yScale, xzFactor, yFactor)\n\t\t\tconst yOffset = 1 - y * 2 / this.chunkCountY + randomDensity\n\t\t\tconst density = yOffset * this.settings.density_factor + this.settings.density_offset\n\t\t\tconst falloff = (density + this.biomeDepth) * this.biomeScale\n\t\t\tnoise += falloff * (falloff > 0 ? 4 : 1)\n\n\t\t\tif (this.settings.top_slide.size > 0) {\n\t\t\t\tnoise = clampedLerp(\n\t\t\t\t\tthis.settings.top_slide.target,\n\t\t\t\t\tnoise,\n\t\t\t\t\t(this.chunkCountY - y - (this.settings.top_slide.offset)) / (this.settings.top_slide.size)\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tif (this.settings.bottom_slide.size > 0) {\n\t\t\t\tnoise = clampedLerp(\n\t\t\t\t\tthis.settings.bottom_slide.target,\n\t\t\t\t\tnoise,\n\t\t\t\t\t(y - (this.settings.bottom_slide.offset)) / (this.settings.bottom_slide.size)\n\t\t\t\t)\n\t\t\t}\n\t\t\tdata[y] = noise\n\t\t}\n\n\t\tthis.noiseColumnCache[x - this.xOffset] = data\n\t\treturn data\n\t}\n\n\tprivate getRandomDensity(x: number): number {\n\t\tconst noise = this.depthNoise.getValue(x * 200, 10, this.depthNoise.getOctaveNoise(0).zo, 1, 0, true)\n\t\tconst a = (noise < 0) ? -noise * 0.3 : noise\n\t\tconst b = a * 24.575625 - 2\n\t\treturn (b < 0) ? b * 0.009486607142857142 : Math.min(b, 1) * 0.006640625\n\t}\n\n\tprivate sampleAndClampNoise(x: number, y: number, z: number, xzScale: number, yScale: number, xzFactor: number, yFactor: number): number {\n\t\tlet a = 0\n\t\tlet b = 0\n\t\tlet c = 0\n\t\tlet d = 1\n\n\t\tfor (let i = 0; i < 16; i += 1) {\n\t\t\tconst x2 = PerlinNoise.wrap(x * xzScale * d)\n\t\t\tconst y2 = PerlinNoise.wrap(y * yScale * d)\n\t\t\tconst z2 = PerlinNoise.wrap(z * xzScale * d)\n\t\t\tconst e = yScale * d\n\n\t\t\tconst minLimitNoise = this.minLimitPerlinNoise.getOctaveNoise(i)\n\t\t\tif (minLimitNoise) {\n\t\t\t\ta += minLimitNoise.noise(x2, y2, z2, e, y * e) / d\n\t\t\t}\n\n\t\t\tconst maxLimitNoise = this.maxLimitPerlinNoise.getOctaveNoise(i)\n\t\t\tif (maxLimitNoise) {\n\t\t\t\tb += maxLimitNoise.noise(x2, y2, z2, e, y * e) / d\n\t\t\t}\n\n\t\t\tif (i < 8) {\n\t\t\t\tconst mainNoise = this.mainPerlinNoise.getOctaveNoise(i)\n\t\t\t\tif (mainNoise) {\n\t\t\t\t\tc += mainNoise.noise(\n\t\t\t\t\t\tPerlinNoise.wrap(x * xzFactor * d),\n\t\t\t\t\t\tPerlinNoise.wrap(y * yFactor * d),\n\t\t\t\t\t\tPerlinNoise.wrap(z * xzFactor * d),\n\t\t\t\t\t\tyFactor * d,\n\t\t\t\t\t\ty * yFactor * d \n\t\t\t\t\t) / d\n\t\t\t\t}\n\t\t\t}\n\n\t\t\td /= 2\n\t\t}\n\n\t\treturn clampedLerp(a / 512, b / 512, (c / 10 + 1) / 2)\n\t}\n}\n","import { NoiseChunkGenerator } from './noise/NoiseChunkGenerator'\n\nexport type NoiseSettingsOptions = {\n\tbiomeScale: number,\n\tbiomeDepth: number,\n\toffset: number,\n\twidth: number,\n\tseed: string,\n}\n\nexport function noiseSettings(state: any, img: ImageData, options: NoiseSettingsOptions) {\n\tconst generator = new NoiseChunkGenerator(options.seed)\n\tgenerator.reset(state, options.biomeDepth, options.biomeScale, options.offset, 200)\n\tconst data = img.data\n\tconst row = img.width * 4\n\tfor (let x = 0; x < options.width; x += 1) {\n\t\tconst noise = generator.iterateNoiseColumn(x - options.offset).reverse()\n\t\tfor (let y = 0; y < state.height; y += 1) {\n\t\t\tconst i = y * row + x * 4\n\t\t\tconst color = getColor(noise, y)\n\t\t\tdata[i] = color\n\t\t\tdata[i + 1] = color\n\t\t\tdata[i + 2] = color\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nfunction getColor(noise: number[], y: number): number {\n\tif (noise[y] > 0) {\n\t\treturn 0\n\t}\n\tif (noise[y+1] > 0) {\n\t\treturn 150\n\t}\n\treturn 255\n}\n","import type { DataModel } from '@mcschema/core'\nimport { Path } from '@mcschema/core'\nimport type { FunctionalComponent } from 'preact'\nimport { useState } from 'preact/hooks'\nimport { useModel } from '../hooks'\nimport type { VersionId } from '../Schemas'\nimport { BiomeSourcePreview, DecoratorPreview, NoiseSettingsPreview } from './previews'\n\nexport const HasPreview = ['dimension', 'worldgen/noise_settings', 'worldgen/configured_feature']\n\nexport const Previews: {\n\tid: string,\n\tgenerator: string,\n\tpath: Path,\n\tpredicate: (model: DataModel) => boolean,\n\tpreview: FunctionalComponent<{\n\t\tlang: string,\n\t\tmodel: DataModel,\n\t\tdata: any,\n\t\tversion: VersionId,\n\t\tshown: boolean,\n\t}>,\n}[] = [\n\t{\n\t\tid: 'biome-noise',\n\t\tgenerator: 'dimension',\n\t\tpath: new Path(['generator', 'biome_source']),\n\t\tpredicate: model => model.get(new Path(['generator', 'type'])).endsWith('noise'),\n\t\tpreview: BiomeSourcePreview,\n\t},\n\t{\n\t\tid: 'noise-settings',\n\t\tgenerator: 'worldgen/noise_settings',\n\t\tpath: new Path(['noise']),\n\t\tpredicate: () => true,\n\t\tpreview: NoiseSettingsPreview,\n\t},\n\t{\n\t\tid: 'decorator',\n\t\tgenerator: 'worldgen/configured_feature',\n\t\tpath: new Path([]),\n\t\tpredicate: () => true,\n\t\tpreview: DecoratorPreview,\n\t},\n]\n\ntype PreviewProps = {\n\tlang: string,\n\tmodel: DataModel | null,\n\tversion: VersionId,\n\tid: string,\n\tshown: boolean,\n\tonError: (message: string) => unknown,\n}\nexport function PreviewPanel({ lang, model, version, id, shown }: PreviewProps) {\n\tconst [, setCount] = useState(0)\n\n\tuseModel(model, () => {\n\t\tsetCount(count => count + 1)\n\t})\n\n\treturn <>\n\t\t{Previews.filter(p => p.generator === id).map(p => {\n\t\t\tconst data = model?.get(p.path)\n\t\t\tif (!model || data === undefined || !p.predicate(model)) {\n\t\t\t\treturn <>\n\t\t\t}\n\t\t\treturn p.preview({ lang, model: model!, data, version, shown })\n\t\t})}\n\t\n}\n","import type { DataModel } from '@mcschema/core'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn } from '..'\nimport { useOnDrag, useOnHover } from '../../hooks'\nimport { biomeSource, getBiome } from '../../previews'\nimport { hexId } from '../../Utils'\n\ntype BiomeSourceProps = {\n\tlang: string,\n\tmodel: DataModel,\n\tdata: any,\n\tshown: boolean,\n}\nexport const BiomeSourcePreview = ({ data, shown }: BiomeSourceProps) => {\n\tconst [scale, setScale] = useState(2)\n\tconst [seed, setSeed] = useState(hexId())\n\tconst [focused, setFocused] = useState(undefined)\n\tconst type: string = data.type?.replace(/^minecraft:/, '')\n\n\tconst canvas = useRef(null)\n\tconst offset = useRef<[number, number]>([0, 0])\n\tconst redrawTimeout = useRef(undefined)\n\tconst redraw = useRef()\n\tconst refocus = useRef()\n\n\tuseEffect(() => {\n\t\tredraw.current = (res = 4) => {\n\t\t\tif (type !== 'multi_noise') res = 1\n\t\t\tconst ctx = canvas.current.getContext('2d')!\n\t\t\tcanvas.current.width = 200 / res\n\t\t\tcanvas.current.height = 200 / res\n\t\t\tconst img = ctx.createImageData(canvas.current.width, canvas.current.height)\n\t\t\tbiomeSource(data, img, { biomeColors: {}, offset: offset.current, scale, seed, res })\n\t\t\tctx.putImageData(img, 0, 0)\n\t\t\tif (res !== 1) {\n\t\t\t\tclearTimeout(redrawTimeout.current)\n\t\t\t\tredrawTimeout.current = setTimeout(() => redraw.current(1), 150) as any\n\t\t\t}\n\t\t}\n\t\trefocus.current = (x: number, y: number) => {\n\t\t\tconst x2 = x * 200 / canvas.current.clientWidth\n\t\t\tconst y2 = y * 200 / canvas.current.clientHeight\n\t\t\tconst biome = getBiome(data, x2, y2, { biomeColors: {}, offset: offset.current, scale, seed, res: 1 })\n\t\t\tsetFocused(biome)\n\t\t}\n\t})\n\n\tuseOnDrag(canvas.current, (dx, dy) => {\n\t\tconst x = dx * 200 / canvas.current.clientWidth\n\t\tconst y = dy * 200 / canvas.current.clientHeight\n\t\toffset.current = [offset.current[0] + x, offset.current[1] + y]\n\t\tredraw.current()\n\t})\n\n\tuseOnHover(canvas.current, (x, y) => {\n\t\tif (x === undefined || y === undefined) {\n\t\t\tsetFocused(undefined)\n\t\t} else {\n\t\t\trefocus.current(x, y)\n\t\t}\n\t})\n\n\tconst state = JSON.stringify(data)\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tredraw.current()\n\t\t}\n\t}, [state, scale, seed, shown])\n\n\tconst changeScale = (newScale: number) => {\n\t\toffset.current[0] *= scale / newScale\n\t\toffset.current[1] *= scale / newScale\n\t\tsetScale(newScale)\n\t}\n\n\treturn <>\n\t\t
\n\t\t\t{focused && }\n\t\t\t{(type === 'multi_noise' || type === 'checkerboard') && <>\n\t\t\t\t changeScale(scale * 1.5)} />\n\t\t\t\t changeScale(scale / 1.5)} />\n\t\t\t}\n\t\t\t{type === 'multi_noise' &&\n\t\t\t\t setSeed(hexId())} />}\n\t\t
\n\t\t\n\t\n}\n","import { useEffect } from 'preact/hooks'\n\nexport function useOnHover(element: HTMLElement, hover: (x: number | undefined, y: number | undefined) => unknown) {\n\tif (!element) return\n\n\tconst onMouseMove = (e: MouseEvent) => {\n\t\thover(e.offsetX, e.offsetY)\n\t}\n\tconst onMouseLeave = () => {\n\t\thover(undefined, undefined)\n\t}\n\n\tuseEffect(() => {\n\t\telement.addEventListener('mousemove', onMouseMove)\n\t\telement.addEventListener('mouseleave', onMouseLeave)\n\t\treturn () => {\n\t\t\telement.removeEventListener('mousemove', onMouseMove)\n\t\t\telement.removeEventListener('mouseleave', onMouseLeave)\n\t\t}\n\t}, [element])\n}\n","import type { DataModel } from '@mcschema/core'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn, BtnInput, BtnMenu } from '..'\nimport { useOnDrag } from '../../hooks'\nimport { locale } from '../../Locales'\nimport { noiseSettings } from '../../previews'\nimport { hexId } from '../../Utils'\n\ntype NoiseSettingsProps = {\n\tlang: string,\n\tmodel: DataModel,\n\tdata: any,\n\tshown: boolean,\n}\nexport const NoiseSettingsPreview = ({ lang, data, shown }: NoiseSettingsProps) => {\n\tconst loc = locale.bind(null, lang)\n\tconst [seed, setSeed] = useState(hexId())\n\tconst [biomeDepth, setBiomeDepth] = useState(0.1)\n\tconst [biomeScale, setBiomeScale] = useState(0.2)\n\n\tconst canvas = useRef(null)\n\tconst offset = useRef(0)\n\tconst redraw = useRef()\n\n\tuseEffect(() => {\n\t\tredraw.current = () => {\n\t\t\tconst ctx = canvas.current.getContext('2d')!\n\t\t\tconst size = data.height\n\t\t\tcanvas.current.width = size\n\t\t\tcanvas.current.height = size\n\t\t\tconst img = ctx.createImageData(canvas.current.width, canvas.current.height)\n\t\t\tnoiseSettings(data, img, { biomeDepth, biomeScale, offset: offset.current, width: size, seed })\n\t\t\tctx.putImageData(img, 0, 0)\n\t\t}\n\t})\n\n\tuseOnDrag(canvas.current, (dx) => {\n\t\tconst x = dx * canvas.current.width / canvas.current.clientWidth\n\t\toffset.current = offset.current + x\n\t\tredraw.current()\n\t})\n\n\tconst state = JSON.stringify(data)\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tredraw.current()\n\t\t}\n\t}, [state, biomeDepth, biomeScale, seed, shown])\n\n\treturn <>\n\t\t
\n\t\t\t\n\t\t\t\t setBiomeDepth(Number(v))} />\n\t\t\t\t setBiomeScale(Number(v))} />\n\t\t\t\n\t\t\t setSeed(hexId())} />\n\t\t
\n\t\t\n\t\n}\n","import type { DataModel } from '@mcschema/core'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn } from '..'\nimport { decorator } from '../../previews'\nimport type { VersionId } from '../../Schemas'\nimport { hexId } from '../../Utils'\n\ntype DecoratorProps = {\n\tlang: string,\n\tmodel: DataModel,\n\tdata: any,\n\tversion: VersionId,\n\tshown: boolean,\n}\nexport const DecoratorPreview = ({ data, version, shown }: DecoratorProps) => {\n\tconst [scale, setScale] = useState(4)\n\tconst [seed, setSeed] = useState(hexId())\n\n\tconst canvas = useRef(null)\n\tconst redraw = useRef()\n\n\tuseEffect(() => {\n\t\tredraw.current = () => {\n\t\t\tconst ctx = canvas.current.getContext('2d')!\n\t\t\tcanvas.current.width = scale * 16\n\t\t\tcanvas.current.height = scale * 16\n\t\t\tconst img = ctx.createImageData(canvas.current.width, canvas.current.height)\n\t\t\tdecorator(data, img, { seed, version, size: [scale * 16, 128, scale * 16] })\n\t\t\tctx.putImageData(img, 0, 0)\n\t\t}\n\t})\n\n\tconst state = JSON.stringify(data)\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tsetTimeout(() => redraw.current())\n\t\t}\n\t}, [state, scale, seed, shown])\n\n\treturn <>\n\t\t
\n\t\t\t setScale(Math.min(16, scale + 1))} />\n\t\t\t setScale(Math.max(1, scale - 1))} />\n\t\t\t setSeed(hexId())} />\n\t\t
\n\t\t\n\t\n}\n","import type { Hook } from '@mcschema/core'\nimport { relativePath } from '@mcschema/core'\nimport type { BlockStateRegistry } from '../Schemas'\n\nexport type OutputProps = {\n\tblockStates: BlockStateRegistry,\n}\nexport const transformOutput: Hook<[any, OutputProps], any> = {\n\tbase({}, _, value) {\n\t\treturn value\n\t},\n\n\tchoice({ switchNode }, path, value, props) {\n\t\treturn switchNode.hook(this, path, value, props)\n\t},\n\n\tlist({ children }, path, value, props) {\n\t\tif (!Array.isArray(value)) return value\n\t\treturn value.map((obj, index) =>\n\t\t\tchildren.hook(this, path.push(index), obj, props)\n\t\t)\n\t},\n\n\tmap({ children, config }, path, value, props) {\n\t\tif (value === undefined) return undefined\n\t\tconst blockState = config.validation?.validator === 'block_state_map'? props.blockStates?.[relativePath(path, config.validation.params.id).get()] : null\n\t\tconst res: any = {}\n\t\tObject.keys(value).forEach(f => {\n\t\t\tif (blockState) {\n\t\t\t\tif (!Object.keys(blockState.properties).includes(f)) return\n\t\t\t}\n\t\t\tres[f] = children.hook(this, path.push(f), value[f], props)\n\t\t})\n\t\treturn res\n\t},\n\n\tobject({ getActiveFields }, path, value, props) {\n\t\tif (value === undefined || value === null || typeof value !== 'object') {\n\t\t\treturn value\n\t\t}\n\t\tconst res: any = {}\n\t\tconst activeFields = getActiveFields(path)\n\t\tObject.keys(activeFields)\n\t\t\t.filter(k => activeFields[k].enabled(path))\n\t\t\t.forEach(f => {\n\t\t\t\tres[f] = activeFields[f].hook(this, path.push(f), value[f], props)\n\t\t\t})\n\t\treturn res\n\t},\n}\n","import type { CollectionRegistry } from '@mcschema/core'\nimport config from '../config.json'\nimport type { BlockStateRegistry, VersionId } from './Schemas'\nimport { checkVersion } from './Schemas'\n\n['1.15', '1.16', '1.17'].forEach(v => localStorage.removeItem(`cache_${v}`))\n\nconst CACHE_NAME = 'misode-v1'\n\ntype VersionRef = 'mcdata_master' | 'vanilla_datapack_summary' | 'vanilla_datapack_data'\n\ntype Version = {\n\tid: string,\n\trefs: Partial<{ [key in VersionRef]: string }>,\n\tdynamic?: boolean,\n}\n\ndeclare var __MCDATA_MASTER_HASH__: string\ndeclare var __VANILLA_DATAPACK_SUMMARY_HASH__: string\n\nconst mcdataUrl = 'https://raw.githubusercontent.com/Arcensoth/mcdata'\nconst vanillaDatapackUrl = 'https://raw.githubusercontent.com/SPGoding/vanilla-datapack'\n\nconst refs: {\n\tid: VersionRef,\n\thash: string,\n\turl: string,\n}[] = [\n\t{\n\t\tid: 'mcdata_master',\n\t\thash: __MCDATA_MASTER_HASH__,\n\t\turl: mcdataUrl,\n\t},\n\t{\n\t\tid: 'vanilla_datapack_summary',\n\t\thash: __VANILLA_DATAPACK_SUMMARY_HASH__,\n\t\turl: vanillaDatapackUrl,\n\t},\n]\n\nexport async function fetchData(versionId: string, collectionTarget: CollectionRegistry, blockStateTarget: BlockStateRegistry) {\n\tconst version = config.versions.find(v => v.id === versionId) as Version | undefined\n\tif (!version) {\n\t\tconsole.error(`[fetchData] Unknown version ${version} in ${JSON.stringify(config.versions)}`)\n\t\treturn\n\t}\n\tconsole.debug(`[fetchData] ${JSON.stringify(version)}`)\n\n\tif (version.dynamic) {\n\t\tawait Promise.all(refs\n\t\t\t.filter(r => localStorage.getItem(`cached_${r.id}`) !== r.hash)\n\t\t\t.map(async r => {\n\t\t\t\tconsole.debug(`[deleteMatching] ${r.id} '${localStorage.getItem(`cached_${r.id}`)}' < '${r.hash}' ${r.url}/${version.refs[r.id]}`)\n\t\t\t\tawait deleteMatching(url => url.startsWith(`${r.url}/${version.refs[r.id]}`))\n\t\t\t\tconsole.debug(`[deleteMatching] Done! ${r.id} ${r.hash} '${localStorage.getItem(`cached_${r.id}`)}'`)\n\t\t\t\tlocalStorage.setItem(`cached_${r.id}`, r.hash)\n\t\t\t\tconsole.debug(`[deleteMatching] Set! ${r.id} ${r.hash} '${localStorage.getItem(`cached_${r.id}`)}'`)\n\t\t\t}))\n\t}\n\n\tawait Promise.all([\n\t\tfetchRegistries(version, collectionTarget),\n\t\tfetchBlockStateMap(version, blockStateTarget),\n\t\tfetchDynamicRegistries(version, collectionTarget),\n\t])\n}\n\nasync function fetchRegistries(version: Version, target: CollectionRegistry) {\n\tconsole.debug(`[fetchRegistries] ${version.id}`)\n\tconst registries = config.registries\n\t\t.filter(r => !r.dynamic)\n\t\t.filter(r => checkVersion(version.id, r.minVersion, r.maxVersion))\n\n\tif (checkVersion(version.id, undefined, '1.15')) {\n\t\tconst url = `${mcdataUrl}/${version.refs.mcdata_master}/generated/reports/registries.json`\n\t\ttry {\n\t\t\tconst data = await getData(url, (data) => {\n\t\t\t\tconst res: {[id: string]: string[]} = {}\n\t\t\t\tObject.keys(data).forEach(k => {\n\t\t\t\t\tres[k.slice(10)] = Object.keys(data[k].entries)\n\t\t\t\t})\n\t\t\t\treturn res\n\t\t\t})\n\t\t\tregistries.forEach(r => {\n\t\t\t\ttarget.register(r.id, data[r.id] ?? [])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching registries:', e)\n\t\t}\n\t} else {\n\t\tawait Promise.all(registries.map(async r => {\n\t\t\ttry {\n\t\t\t\tconst url = r.path\n\t\t\t\t\t? `${mcdataUrl}/${version.refs.mcdata_master}/${r.path}/data.min.json`\n\t\t\t\t\t: `${mcdataUrl}/${version.refs.mcdata_master}/processed/reports/registries/${r.id}/data.min.json`\n\t\t\t\ttarget.register(r.id, await getData(url, v => v.values))\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(`Error occurred while fetching registry ${r.id}:`, e)\n\t\t\t}\n\t\t}))\n\t}\n}\n\nasync function fetchBlockStateMap(version: Version, target: BlockStateRegistry) {\n\tconsole.debug(`[fetchBlockStateMap] ${version.id}`)\n\tif (checkVersion(version.id, undefined, '1.16')) {\n\t\tconst url = (checkVersion(version.id, undefined, '1.15'))\n\t\t\t? `${mcdataUrl}/${version.refs.mcdata_master}/generated/reports/blocks.json`\n\t\t\t: `${mcdataUrl}/${version.refs.mcdata_master}/processed/reports/blocks/data.min.json`\n\n\t\ttry {\n\t\t\tconst data = await getData(url, (data) => {\n\t\t\t\tconst res: BlockStateRegistry = {}\n\t\t\t\tObject.keys(data).forEach(b => {\n\t\t\t\t\tres[b] = {\n\t\t\t\t\t\tproperties: data[b].properties,\n\t\t\t\t\t\tdefault: data[b].states.find((s: any) => s.default).properties,\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn res\n\t\t\t})\n\t\t\tObject.assign(target, data)\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching block state map:', e)\n\t\t}\n\t} else {\n\t\tconst url = `${mcdataUrl}/${version.refs.mcdata_master}/processed/reports/blocks/simplified/data.min.json`\n\t\ttry {\n\t\t\tconst data = await getData(url)\n\t\t\tObject.assign(target, data)\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching block state map:', e)\n\t\t}\n\t}\n}\n\nasync function fetchDynamicRegistries(version: Version, target: CollectionRegistry) {\n\tconsole.debug(`[fetchDynamicRegistries] ${version.id}`)\n\tconst registries = config.registries\n\t\t.filter(r => r.dynamic)\n\t\t.filter(r => checkVersion(version.id, r.minVersion, r.maxVersion))\n\n\tif (checkVersion(version.id, '1.16')) {\n\t\tconst url = `${vanillaDatapackUrl}/${version.refs.vanilla_datapack_summary}/summary/flattened.min.json`\n\t\ttry {\n\t\t\tconst data = await getData(url)\n\t\t\tregistries.forEach(r => {\n\t\t\t\ttarget.register(r.id, data[r.id])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching dynamic registries:', e)\n\t\t}\n\t}\n}\n\nexport async function fetchPreset(version: VersionId, registry: string, id: string) {\n\tconsole.debug(`[fetchPreset] ${id} ${registry} ${id}`)\n\tconst versionData = config.versions.find(v => v.id === version)!\n\ttry {\n\t\tconst res = await fetch(`${vanillaDatapackUrl}/${versionData.refs.vanilla_datapack_data}/data/minecraft/${registry}/${id}.json`)\n\t\treturn await res.json()\n\t} catch (e) {\n\t\tconsole.warn(`Error occurred while fetching ${registry} preset ${id}:`, e)\n\t}\n}\n\nasync function getData(url: string, fn: (v: any) => T = (v: any) => v): Promise {\n\ttry {\n\t\tconst cache = await caches.open(CACHE_NAME)\n\t\tconsole.debug(`[getData] Opened cache ${CACHE_NAME} ${url}`)\n\t\tconst cacheResponse = await cache.match(url)\n \n\t\tif (cacheResponse && cacheResponse.ok) {\n\t\t\tconsole.debug(`[getData] Retrieving cached data ${url}`)\n\t\t\treturn await cacheResponse.json()\n\t\t}\n \n\t\tconsole.debug(`[getData] fetching data ${url}`)\n\t\tconst fetchResponse = await fetch(url)\n\t\tconst responseData = fn(await fetchResponse.json())\n\t\tawait cache.put(url, new Response(JSON.stringify(responseData)))\n\t\treturn responseData\n\t} catch (e) {\n\t\tconsole.warn(`[getData] Failed to open cache ${CACHE_NAME}: ${e.message}`)\n\n\t\tconsole.debug(`[getData] fetching data ${url}`)\n\t\tconst fetchResponse = await fetch(url)\n\t\tconst responseData = fn(await fetchResponse.json())\n\t\treturn responseData\n\t}\n}\n\nasync function deleteMatching(matches: (url: string) => boolean) {\n\ttry {\n\t\tconst cache = await caches.open(CACHE_NAME)\n\t\tconsole.debug(`[deleteMatching] Opened cache ${CACHE_NAME}`)\n\t\tconst promises: Promise[] = []\n \n\t\tfor (const request of await cache.keys()) {\n\t\t\tif (matches(request.url)) {\n\t\t\t\tpromises.push(cache.delete(request))\n\t\t\t}\n\t\t}\n\t\tconsole.debug(`[deleteMatching] Removing ${promises.length} cache objects...`)\n\t\tawait Promise.all(promises)\n\t} catch (e) {\n\t\tconsole.warn(`[deleteMatching] Failed to open cache ${CACHE_NAME}: ${e.message}`)\n\t}\n}\n","import type { CollectionRegistry, SchemaRegistry } from '@mcschema/core'\nimport { DataModel } from '@mcschema/core'\nimport * as java15 from '@mcschema/java-1.15'\nimport * as java16 from '@mcschema/java-1.16'\nimport * as java17 from '@mcschema/java-1.17'\nimport config from '../config.json'\nimport { fetchData } from './DataFetcher'\n\nexport const VersionIds = ['1.15', '1.16', '1.17'] as const\nexport type VersionId = typeof VersionIds[number]\n\nexport type BlockStateRegistry = {\n\t[block: string]: {\n\t\tproperties: {\n\t\t\t[key: string]: string[],\n\t\t},\n\t\tdefault: {\n\t\t\t[key: string]: string,\n\t\t},\n\t},\n}\n\ntype VersionData = {\n\tcollections: CollectionRegistry,\n\tschemas: SchemaRegistry,\n\tblockStates: BlockStateRegistry,\n}\nconst Versions: Record> = {}\n\ntype ModelData = {\n\tmodel: DataModel,\n\tversion: VersionId,\n}\nconst Models: Record = {}\n\nconst versionGetter: {\n\t[versionId in VersionId]: {\n\t\tgetCollections: () => CollectionRegistry,\n\t\tgetSchemas: (collections: CollectionRegistry) => SchemaRegistry,\n\t}\n} = {\n\t1.15: java15,\n\t1.16: java16,\n\t1.17: java17,\n}\n\nasync function getVersion(id: VersionId): Promise {\n\tif (!Versions[id]) {\n\t\tVersions[id] = (async () => {\n\t\t\ttry {\n\t\t\t\tconst collections = versionGetter[id].getCollections()\n\t\t\t\tconst blockStates: BlockStateRegistry = {}\n\t\t\t\tawait fetchData(id, collections, blockStates)\n\t\t\t\tconst schemas = versionGetter[id].getSchemas(collections)\n\t\t\t\tVersions[id] = { collections, schemas, blockStates }\n\t\t\t\treturn Versions[id]\n\t\t\t} catch (e) {\n\t\t\t\tthrow new Error(`Cannot get version \"${id}\": ${e.message}`)\n\t\t\t}\n\t\t})()\n\t\treturn Versions[id]\n\t}\n\treturn Versions[id]\n}\n\nexport async function getModel(version: VersionId, id: string): Promise {\n\tif (!Models[id] || Models[id].version !== version) {\n\t\tconst versionData = await getVersion(version)\n\t\tconst schemaName = config.generators.find(g => g.id === id)?.schema\n\t\tif (!schemaName) {\n\t\t\tthrow new Error(`Cannot find model ${id}`)\n\t\t}\n\t\ttry {\n\t\t\tconst schema = versionData.schemas.get(schemaName)\n\t\t\tconst model = new DataModel(schema)\n\t\t\tif (Models[id]) {\n\t\t\t\tmodel.reset(Models[id].model.data, false)\n\t\t\t} else {\n\t\t\t\tmodel.validate(true)\n\t\t\t\tmodel.history = [JSON.stringify(model.data)]\n\t\t\t}\n\t\t\tModels[id] = { model, version }\n\t\t} catch (e) {\n\t\t\tthrow new Error(`Cannot get generator \"${id}\" for version \"${version}\": ${e.message}`)\n\t\t}\n\t}\n\treturn Models[id].model\n}\n\nexport async function getCollections(version: VersionId): Promise {\n\tconst versionData = await getVersion(version)\n\treturn versionData.collections\n}\n\nexport async function getBlockStates(version: VersionId): Promise {\n\tconst versionData = await getVersion(version)\n\treturn versionData.blockStates\n}\n\nexport function checkVersion(versionId: string, minVersionId: string | undefined, maxVersionId?: string) {\n\tconst version = config.versions.findIndex(v => v.id === versionId)\n\tconst minVersion = minVersionId ? config.versions.findIndex(v => v.id === minVersionId) : 0\n\tconst maxVersion = maxVersionId ? config.versions.findIndex(v => v.id === maxVersionId) : config.versions.length - 1\n\treturn minVersion <= version && version <= maxVersion\n}\n","import type { VersionId } from './Schemas'\nimport { VersionIds } from './Schemas'\n\nexport namespace Store {\n\texport const ID_LANGUAGE = 'language'\n\texport const ID_THEME = 'theme'\n\texport const ID_VERSION = 'schema_version'\n\texport const ID_INDENT = 'indentation'\n\n\texport function getLanguage() {\n\t\treturn localStorage.getItem(ID_LANGUAGE) ?? 'en'\n\t}\n\n\texport function getTheme() {\n\t\treturn localStorage.getItem(ID_THEME) ?? 'dark'\n\t}\n\n\texport function getVersion(): VersionId {\n\t\tconst version = localStorage.getItem(ID_VERSION)\n\t\tif (version && VersionIds.includes(version as VersionId)) {\n\t\t\treturn version as VersionId\n\t\t}\n\t\treturn '1.17'\n\t}\n\n\texport function getIndent() {\n\t\treturn localStorage.getItem(ID_INDENT) ?? '2_spaces'\n\t}\n\n\texport function setLanguage(language: string | undefined) {\n\t\tif (language) localStorage.setItem(ID_LANGUAGE, language)\n\t}\n\n\texport function setTheme(theme: string | undefined) {\n\t\tif (theme) localStorage.setItem(ID_THEME, theme)\n\t}\n\n\texport function setVersion(version: VersionId | undefined) {\n\t\tif (version) localStorage.setItem(ID_VERSION, version)\n\t}\n\n\texport function setIndent(indent: string) {\n\t\tif (indent) localStorage.setItem(ID_INDENT, indent)\n\t}\n}\n","import type { DataModel } from '@mcschema/core'\nimport { ModelPath } from '@mcschema/core'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn, BtnMenu } from '.'\nimport { useModel } from '../hooks'\nimport { locale } from '../Locales'\nimport { transformOutput } from '../schema/transformOutput'\nimport type { BlockStateRegistry } from '../Schemas'\nimport { Store } from '../Store'\n\nconst INDENT: Record = {\n\t'2_spaces': 2,\n\t'4_spaces': 4,\n\ttabs: '\\t',\n}\n\ntype SourcePanelProps = {\n\tlang: string,\n\tname: string,\n\tmodel: DataModel | null,\n\tblockStates: BlockStateRegistry | null,\n\tdoCopy?: number,\n\tdoDownload?: number,\n\tdoImport?: number,\n\tonError: (message: string) => unknown,\n}\nexport function SourcePanel({ lang, name, model, blockStates, doCopy, doDownload, doImport, onError }: SourcePanelProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst [indent, setIndent] = useState(Store.getIndent())\n\tconst source = useRef(null)\n\tconst download = useRef(null)\n\tconst retransform = useRef()\n\n\tuseEffect(() => {\n\t\tretransform.current = () => {\n\t\t\tif (!model || !blockStates) return\n\t\t\ttry {\n\t\t\t\tconst props = { blockStates: blockStates ?? {} }\n\t\t\t\tconst data = model.schema.hook(transformOutput, new ModelPath(model), model.data, props)\n\t\t\t\tsource.current.value = JSON.stringify(data, null, INDENT[indent]) + '\\n'\n\t\t\t} catch (e) {\n\t\t\t\tonError(`Error getting JSON output: ${e.message}`)\n\t\t\t\tconsole.error(e)\n\t\t\t\tsource.current.value = ''\n\t\t\t}\n\t\t}\n\t})\n\n\tuseModel(model, () => {\n\t\tretransform.current()\n\t})\n\n\tuseEffect(() => {\n\t\tretransform.current()\n\t}, [indent])\n\n\tconst onImport = () => {\n\t\ttry {\n\t\t\tconst data = JSON.parse(source.current.value)\n\t\t\tmodel?.reset(data, false)\n\t\t} catch (e) {\n\t\t\t// TODO\n\t\t}\n\t}\n\n\tuseEffect(() => {\n\t\tif (doCopy && source.current) {\n\t\t\tsource.current.select()\n\t\t\tdocument.execCommand('copy')\n\t\t}\n\t}, [doCopy])\n\n\tuseEffect(() => {\n\t\tif (doDownload && source.current && download.current) {\n\t\t\tconst content = encodeURIComponent(source.current.value)\n\t\t\tdownload.current.setAttribute('href', `data:text/json;charset=utf-8,${content}`)\n\t\t\tdownload.current.setAttribute('download', `${name}.json`)\n\t\t\tdownload.current.click()\n\t\t}\n\t}, [doDownload])\n\n\tuseEffect(() => {\n\t\tif (doImport && source.current) {\n\t\t\tsource.current.value = ''\n\t\t\tsource.current.select()\n\t\t}\n\t}, [doImport])\n\n\tconst changeIndent = (value: string) => {\n\t\tStore.setIndent(value)\n\t\tsetIndent(value)\n\t}\n\n\treturn <> \n\t\t
\n\t\t\t\n\t\t\t\t{Object.entries(INDENT).map(([key]) =>\n\t\t\t\t\t changeIndent(key)}/>\n\t\t\t\t)}\n\t\t\t\n\t\t
\n\t\t\n\t\t\n\t\n}\n","import type { ComponentChildren } from 'preact'\nimport { Icons } from './Icons'\n\ntype ToolCardProps = {\n\ttitle: string,\n\tlink: string,\n\ticon?: keyof typeof Icons,\n\tchildren?: ComponentChildren,\n}\nexport function ToolCard({ title, link, icon, children }: ToolCardProps) {\n\treturn \n\t\t{icon && Icons[icon]}\n\t\t
\n\t\t\t

{title}

\n\t\t\t{children}\n\t\t
\n\t
\n}\n","import { hexId } from '../Utils'\n\nexport class Mounter {\n\tprivate registry: { [id: string]: (el: Element) => void } = {}\n\n\tregister(callback: (el: Element) => void): string {\n\t\tconst id = hexId()\n\t\tthis.registry[id] = callback\n\t\treturn id\n\t}\n\n\ton(type: string, callback: (el: Element) => void): string {\n\t\treturn this.register(el => {\n\t\t\tel.addEventListener(type, evt => {\n\t\t\t\tcallback(el)\n\t\t\t\tevt.stopPropagation()\n\t\t\t})\n\t\t})\n\t}\n\n\tonChange(callback: (el: Element) => void): string {\n\t\treturn this.on('change', callback)\n\t}\n\n\tonClick(callback: (el: Element) => void): string {\n\t\treturn this.on('click', callback)\n\t}\n\n\tmounted(el: Element): void {\n\t\tel.querySelectorAll('[data-id]').forEach(el => {\n\t\t\tconst id = el.getAttribute('data-id')!\n\t\t\tthis.registry[id]?.(el)\n\t\t})\n\t\tthis.registry = {}\n\t}\n}\n","export const Octicon = {\n\tclippy: '',\n\tinfo: '',\n\tissue_opened: '',\n\tplus_circle: '',\n\ttrashcan: '',\n}\n","import type { EnumOption, Hook, ValidationOption } from '@mcschema/core'\nimport { DataModel, MapNode, ModelPath, ObjectNode, Path, relativePath, StringNode } from '@mcschema/core'\nimport type { Localize } from '../Locales'\nimport type { BlockStateRegistry, VersionId } from '../Schemas'\nimport { hexId, htmlEncode } from '../Utils'\nimport type { Mounter } from './Mounter'\nimport { Octicon } from './Octicon'\n\nexport type TreeProps = {\n\tloc: Localize,\n\tmounter: Mounter,\n\tversion: VersionId,\n\tblockStates: BlockStateRegistry,\n}\n\nconst selectRegistries = ['loot_table.type', 'loot_entry.type', 'function.function', 'condition.condition', 'criterion.trigger', 'dimension.generator.type', 'dimension.generator.biome_source.type', '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']\nconst hiddenFields = ['number_provider.type', 'score_provider.type', 'nbt_provider.type', 'int_provider.type', 'float_provider.type', 'height_provider.type']\nconst flattenedFields = ['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']\nconst inlineFields = ['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']\n\n/**\n * Secondary model used to remember the keys of a map\n */\nconst keysModel = new DataModel(MapNode(\n\tStringNode(),\n\tStringNode()\n), { historyMax: 0 })\n\n/**\n * Renders the node and handles events to update the model\n * @returns string HTML representation of this node using the given data\n */\nexport const renderHtml: Hook<[any, TreeProps], [string, string, string]> = {\n\tbase() {\n\t\treturn ['', '', '']\n\t},\n\n\tboolean({ node }, path, value, props) {\n\t\tconst onFalse = props.mounter.onClick(() => {\n\t\t\tpath.model.set(path, node.optional() && value === false ? undefined : false)\n\t\t})\n\t\tconst onTrue = props.mounter.onClick(() => {\n\t\t\tpath.model.set(path, node.optional() && value === true ? undefined : true)\n\t\t})\n\t\treturn ['', `${htmlEncode(props.loc('false'))}\n\t\t\t${htmlEncode(props.loc('true'))}`, '']\n\t},\n\n\tchoice({ choices, config, switchNode }, path, value, props) {\n\t\tconst choice = switchNode.activeCase(path, true)\n\t\tconst pathWithContext = (config?.context) ? new ModelPath(path.getModel(), new Path(path.getArray(), [config.context])) : path\n\t\tconst pathWithChoiceContext = config?.choiceContext ? new Path([], [config.choiceContext]) : config?.context ? new Path([], [config.context]) : path\n\n\t\tconst [prefix, suffix, body] = choice.node.hook(this, pathWithContext, value, props)\n\t\tif (choices.length === 1) {\n\t\t\treturn [prefix, suffix, body]\n\t\t}\n\n\t\tconst inputId = props.mounter.register(el => {\n\t\t\t(el as HTMLSelectElement).value = choice.type\n\t\t\tel.addEventListener('change', () => {\n\t\t\t\tconst c = choices.find(c => c.type === (el as HTMLSelectElement).value) ?? choice\n\t\t\t\tpath.model.set(path, c.change ? c.change(value) : c.node.default())\n\t\t\t})\n\t\t})\n\t\tconst inject = ``\n\n\t\treturn [prefix, inject + suffix, body]\n\t},\n\n\tlist({ children }, path, value, props) {\n\t\tconst onAdd = props.mounter.onClick(() => {\n\t\t\tif (!Array.isArray(value)) value = []\n\t\t\tpath.model.set(path, [children.default(), ...value])\n\t\t})\n\t\tconst onAddBottom = props.mounter.onClick(() => {\n\t\t\tif (!Array.isArray(value)) value = []\n\t\t\tpath.model.set(path, [...value, children.default()])\n\t\t})\n\t\tconst suffix = ``\n\n\t\tlet body = ''\n\t\tif (Array.isArray(value)) {\n\t\t\tbody = value.map((childValue, index) => {\n\t\t\t\tconst removeId = props.mounter.onClick(() => path.model.set(path.push(index), undefined))\n\t\t\t\tconst childPath = path.push(index).contextPush('entry')\n\t\t\t\tconst category = children.category(childPath)\n\t\t\t\tconst [cPrefix, cSuffix, cBody] = children.hook(this, childPath, childValue, props)\n\t\t\t\treturn `
\n\t\t\t\t\t
\n\t\t\t\t\t\t${error(props.loc, childPath, props.mounter)}\n\t\t\t\t\t\t${help(props.loc, childPath, props.mounter)}\n\t\t\t\t\t\t\n\t\t\t\t\t\t${cPrefix}\n\t\t\t\t\t\t\n\t\t\t\t\t\t${cSuffix}\n\t\t\t\t\t
\n\t\t\t\t\t${cBody ? `
${cBody}
` : ''}\n\t\t\t\t\t
\n\t\t\t\t
`\n\t\t\t}).join('')\n\t\t\tif (value.length > 2) {\n\t\t\t\tbody += `
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
`\n\t\t\t}\n\t\t}\n\t\treturn ['', suffix, body]\n\t},\n\n\tmap({ children, keys, config }, path, value, props) {\n\t\tconst keyPath = new ModelPath(keysModel, new Path([hashString(path.toString())]))\n\t\tconst onAdd = props.mounter.onClick(() => {\n\t\t\tconst key = keyPath.get()\n\t\t\tpath.model.set(path.push(key), children.default())\n\t\t})\n\t\tconst blockState = config.validation?.validator === 'block_state_map'? props.blockStates?.[relativePath(path, config.validation.params.id).get()] : null\n\t\tconst keysSchema = blockState?.properties\n\t\t\t? StringNode(null!, { enum: Object.keys(blockState.properties ?? {}) })\n\t\t\t: keys\n\t\tconst keyRendered = keysSchema.hook(this, keyPath, keyPath.get() ?? '', props)\n\t\tconst suffix = keyRendered[1] + ``\n\t\tif (blockState && path.last() === 'Properties') {\n\t\t\tif (typeof value !== 'object') value = {}\n\t\t\tconst properties = Object.entries(blockState.properties)\n\t\t\t\t.map(([key, values]) => [key, StringNode(null!, { enum: values })])\n\t\t\tObject.entries(blockState.properties).forEach(([key, values]) => {\n\t\t\t\tif (typeof value[key] !== 'string') {\n\t\t\t\t\tpath.model.errors.add(path.push(key), 'error.expected_string')\n\t\t\t\t} else if (!values.includes(value[key])) {\n\t\t\t\t\tpath.model.errors.add(path.push(key), 'error.invalid_enum_option', value[key])\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn ObjectNode(Object.fromEntries(properties)).hook(this, path, value, props)\n\t\t}\n\t\tlet body = ''\n\t\tif (typeof value === 'object' && value !== undefined) {\n\t\t\tbody = Object.keys(value)\n\t\t\t\t.map(key => {\n\t\t\t\t\tconst onRemove = props.mounter.onClick(() => path.model.set(path.push(key), undefined))\n\t\t\t\t\tconst childPath = path.modelPush(key)\n\t\t\t\t\tconst category = children.category(childPath)\n\t\t\t\t\tconst childrenSchema = blockState\n\t\t\t\t\t\t? StringNode(null!, { enum: blockState.properties[key] ?? [] })\n\t\t\t\t\t\t: children\n\t\t\t\t\tif (blockState?.properties[key] && !blockState.properties[key].includes(value[key])) {\n\t\t\t\t\t\tpath.model.errors.add(childPath, 'error.invalid_enum_option', value[key])\n\t\t\t\t\t}\n\t\t\t\t\tconst [cPrefix, cSuffix, cBody] = childrenSchema.hook(this, childPath, value[key], props)\n\t\t\t\t\treturn `
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t${error(props.loc, childPath, props.mounter)}\n\t\t\t\t\t\t\t${help(props.loc, childPath, props.mounter)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t${cPrefix}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t${cSuffix}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t${cBody ? `
${cBody}
` : ''}\n\t\t\t\t\t\t
\n\t\t\t\t\t
`\n\t\t\t\t})\n\t\t\t\t.join('')\n\t\t}\n\t\treturn ['', suffix, body]\n\t},\n\n\tnumber({ integer, config }, path, value, { mounter }) {\n\t\tconst onChange = mounter.onChange(el => {\n\t\t\tconst value = (el as HTMLInputElement).value\n\t\t\tconst parsed = config?.color\n\t\t\t\t? parseInt(value.slice(1), 16)\n\t\t\t\t: integer ? parseInt(value) : parseFloat(value)\n\t\t\tpath.model.set(path, parsed)\n\t\t})\n\t\tif (config?.color) {\n\t\t\tconst hex = (value?.toString(16).padStart(6, '0') ?? '000000')\n\t\t\treturn ['', ``, '']\n\t\t}\n\t\treturn ['', ``, '']\n\t},\n\n\tobject({ node, getActiveFields, getChildModelPath }, path, value, props) {\n\t\tlet prefix = ''\n\t\tlet suffix = ''\n\t\tif (node.optional()) {\n\t\t\tif (value === undefined) {\n\t\t\t\tsuffix = ``\n\t\t\t} else {\n\t\t\t\tsuffix = ``\n\t\t\t}\n\t\t}\n\t\tlet body = ''\n\t\tif (typeof value === 'object' && value !== undefined && (!(node.optional() && value === undefined))) {\n\t\t\tconst activeFields = getActiveFields(path)\n\t\t\tconst activeKeys = Object.keys(activeFields)\n\t\t\t\t.filter(k => activeFields[k].enabled(path))\n\t\t\tbody = activeKeys.map(k => {\n\t\t\t\tconst field = activeFields[k]\n\t\t\t\tconst childPath = getChildModelPath(path, k)\n\t\t\t\tconst context = childPath.getContext().join('.')\n\t\t\t\tif (hiddenFields.includes(context)) {\n\t\t\t\t\treturn ''\n\t\t\t\t}\n\n\t\t\t\tconst category = field.category(childPath)\n\t\t\t\tconst [cPrefix, cSuffix, cBody] = field.hook(this, childPath, value[k], props)\n\t\t\t\tif (cPrefix.length === 0 && cSuffix.length === 0 && cBody.length === 0) {\n\t\t\t\t\treturn ''\n\t\t\t\t}\n\n\t\t\t\tconst isFlattened = field.type(childPath) === 'object' && flattenedFields.includes(context)\n\t\t\t\tconst isInlined = inlineFields.includes(context)\n\t\t\t\tif (isFlattened || isInlined) {\n\t\t\t\t\tprefix += `${error(props.loc, childPath, props.mounter)}${help(props.loc, childPath, props.mounter)}${cPrefix}`\n\t\t\t\t\tsuffix += cSuffix\n\t\t\t\t\treturn isFlattened ? cBody : ''\n\t\t\t\t}\n\n\t\t\t\treturn `
\n\t\t\t\t\t
\n\t\t\t\t\t\t${error(props.loc, childPath, props.mounter)}\n\t\t\t\t\t\t${help(props.loc, childPath, props.mounter)}\n\t\t\t\t\t\t${cPrefix}\n\t\t\t\t\t\t\n\t\t\t\t\t\t${cSuffix}\n\t\t\t\t\t
\n\t\t\t\t\t${cBody ? `
${cBody}
` : ''}\n\t\t\t\t
`\n\t\t\t})\n\t\t\t\t.join('')\n\t\t}\n\t\treturn [prefix, suffix, body]\n\t},\n\n\tstring({ node, getValues, config }, path, value, props) {\n\t\tconst inputId = props.mounter.register(el => {\n\t\t\t(el as HTMLSelectElement).value = value ?? ''\n\t\t\tel.addEventListener('change', evt => {\n\t\t\t\tconst newValue = (el as HTMLSelectElement).value\n\t\t\t\tpath.model.set(path, newValue.length === 0 ? undefined : newValue)\n\t\t\t\tevt.stopPropagation()\n\t\t\t})\n\t\t})\n\t\tlet suffix\n\t\tconst values = getValues()\n\t\tif ((isEnum(config) && !config.additional)\n\t\t\t|| selectRegistries.includes(path.getContext().join('.'))\t) {\n\t\t\tlet context = new Path([])\n\t\t\tif (isEnum(config) && typeof config.enum === 'string') {\n\t\t\t\tcontext = context.contextPush(config.enum)\n\t\t\t} else if (!isEnum(config) && config?.validator === 'resource' && typeof config.params.pool === 'string') {\n\t\t\t\tcontext = context.contextPush(config.params.pool)\n\t\t\t}\n\t\t\tsuffix = ``\n\t\t} else if (!isEnum(config) && config?.validator === 'block_state_key') {\n\t\t\tconst blockState = props.blockStates?.[relativePath(path, config.params.id).get()]\n\t\t\tconst values = Object.keys(blockState?.properties ?? {})\n\t\t\tsuffix = ``\n\t\t} else {\n\t\t\tconst datalistId = hexId()\n\t\t\tsuffix = `\n\t\t\t\t${values.length === 0 ? '' :\n\t\t`\n\t\t\t\t\t\t\t\t${values.map(v =>\n\t\t``}`\n\t\t}\n\t\treturn ['', suffix, '']\n\t},\n}\n\nfunction isEnum(value?: ValidationOption | EnumOption): value is EnumOption {\n\treturn !!(value as any)?.enum\n}\n\nfunction hashString(str: string) {\n\tvar hash = 0, i, chr\n\tfor (i = 0; i < str.length; i++) {\n\t\tchr = str.charCodeAt(i)\n\t\thash = ((hash << 5) - hash) + chr\n\t\thash |= 0\n\t}\n\treturn hash\n}\n\nfunction pathLocale(loc: Localize, path: Path, ...params: string[]) {\n\tconst ctx = path.getContext()\n\tfor (let i = 0; i < ctx.length; i += 1) {\n\t\tconst key = ctx.slice(i).join('.')\n\t\tconst result = loc(key, ...params)\n\t\tif (key !== result) {\n\t\t\treturn result\n\t\t}\n\t}\n\treturn htmlEncode(ctx[ctx.length - 1])\n}\n\nfunction error(loc: Localize, path: ModelPath, mounter: Mounter) {\n\tconst e = path.model.errors.get(path, true)\n\tif (e.length === 0) return ''\n\tconst message = e[0].params ? loc(e[0].error, ...e[0].params) : loc(e[0].error)\n\treturn popupIcon('node-error', 'issue_opened', htmlEncode(message), mounter)\n}\n\nfunction help(loc: Localize, path: Path, mounter: Mounter) {\n\tconst key = path.contextPush('help').getContext().join('.')\n\tconst message = loc(key)\n\tif (message === key) return ''\n\treturn popupIcon('node-help', 'info', htmlEncode(message), mounter)\n}\n\nconst popupIcon = (type: string, icon: keyof typeof Octicon, popup: string, mounter: Mounter) => {\n\tconst onClick = mounter.onClick(el => {\n\t\tel.getElementsByTagName('span')[0].classList.add('show')\n\t\tdocument.body.addEventListener('click', () => {\n\t\t\tel.getElementsByTagName('span')[0].classList.remove('show')\n\t\t}, { capture: true, once: true })\n\t})\n\treturn `
\n\t\t${Octicon[icon]}\n\t\t${popup}\n\t
`\n}\n\nconst contextMenu = (loc: Localize, path: ModelPath, mounter: Mounter) => {\n\tconst id = mounter.register(el => {\n\t\tconst openMenu = () => {\n\t\t\tconst popup = document.createElement('div')\n\t\t\tpopup.classList.add('node-menu')\n\n\t\t\tconst message = loc(path.contextPush('help').getContext().join('.'))\n\t\t\tif (!message.endsWith('.help')) {\n\t\t\t\tpopup.insertAdjacentHTML('beforeend', `${message}`)\n\t\t\t}\n\n\t\t\tconst context = path.getContext().join('.')\n\t\t\tpopup.insertAdjacentHTML('beforeend', `\n\t\t\t\t
\n\t\t\t\t\t${Octicon.clippy}\n\t\t\t\t\tContext: \n\t\t\t\t\t${context}\n\t\t\t\t
`)\n\t\t\tpopup.querySelector('.menu-item .btn')?.addEventListener('click', () => {\n\t\t\t\tconst inputEl = document.createElement('input')\n\t\t\t\tinputEl.value = context\n\t\t\t\tel.appendChild(inputEl) \n\t\t\t\tinputEl.select()\n\t\t\t\tdocument.execCommand('copy')\n\t\t\t\tel.removeChild(inputEl)\n\t\t\t})\n\n\t\t\tel.appendChild(popup)\n\t\t\tdocument.body.addEventListener('click', () => {\n\t\t\t\ttry {el.removeChild(popup)} catch (e) {}\n\t\t\t}, { capture: true, once: true })\n\t\t\tdocument.body.addEventListener('contextmenu', () => {\n\t\t\t\ttry {el.removeChild(popup)} catch (e) {}\n\t\t\t}, { capture: true, once: true })\n\t\t}\n\t\tel.addEventListener('contextmenu', evt => {\n\t\t\topenMenu()\n\t\t\tevt.preventDefault()\n\t\t})\n\t\tlet timer: any = null\n\t\tel.addEventListener('touchstart', () => {\n\t\t\ttimer = setTimeout(() => {\n\t\t\t\topenMenu()\n\t\t\t\ttimer = null\n\t\t\t}, 800)\n\t\t})\n\t\tel.addEventListener('touchend', () => {\n\t\t\tif (timer) {\n\t\t\t\tclearTimeout(timer)\n\t\t\t\ttimer = null\n\t\t\t}\n\t\t})\n\t})\n\treturn `data-id=\"${id}\"`\n}\n","import type { DataModel } from '@mcschema/core'\nimport { ModelPath } from '@mcschema/core'\nimport { useEffect, useRef } from 'preact/hooks'\nimport { useModel } from '../hooks'\nimport { locale } from '../Locales'\nimport { Mounter } from '../schema/Mounter'\nimport { renderHtml } from '../schema/renderHtml'\nimport type { BlockStateRegistry, VersionId } from '../Schemas'\n\ntype TreePanelProps = {\n\tlang: string,\n\tversion: VersionId,\n\tmodel: DataModel | null,\n\tblockStates: BlockStateRegistry | null,\n\tonError: (message: string) => unknown,\n}\nexport function Tree({ lang, model, version, blockStates, onError }: TreePanelProps) {\n\tconst tree = useRef(null)\n\tconst redraw = useRef()\n\n\tuseEffect(() => {\n\t\tredraw.current = () => {\n\t\t\tif (!model || !blockStates) return\n\t\t\ttry {\n\t\t\t\tconst mounter = new Mounter()\n\t\t\t\tconst props = { loc: locale.bind(null, lang), version, mounter, blockStates }\n\t\t\t\tconst path = new ModelPath(model)\n\t\t\t\tconst rendered = model.schema.hook(renderHtml, path, model.data, props)\n\t\t\t\tconst category = model.schema.category(path)\n\t\t\t\tconst type = model.schema.type(path)\n\t\t\t\tlet html = rendered[2]\n\t\t\t\tif (rendered[1]) {\n\t\t\t\t\thtml = `
\n\t\t\t\t\t\t
${rendered[0]}${rendered[1]}
\n\t\t\t\t\t\t
${rendered[2]}
\n\t\t\t\t\t
`\n\t\t\t\t}\n\t\t\t\ttree.current.innerHTML = html\n\t\t\t\tmounter.mounted(tree.current)\n\t\t\t} catch (e) {\n\t\t\t\tonError(`Error rendering the tree: ${e.message}`)\n\t\t\t\tconsole.error(e)\n\t\t\t\ttree.current.innerHTML = ''\n\t\t\t}\n\t\t}\n\t})\n\n\tuseModel(model, () => {\n\t\tredraw.current()\n\t})\n\n\tuseEffect(() => {\n\t\tredraw.current()\n\t}, [lang, model, blockStates])\n\n\treturn
\n}\n","import { locale } from '../Locales'\n\ntype FieldSettingsProps = {\n\tlang: string,\n\tpath?: string,\n}\nexport function FieldSettings({ lang }: FieldSettingsProps) {\n\tconst loc = locale.bind(null, lang)\n\treturn
\n\t\t
\n\t\t\t

{loc('settings.fields.description')}

\n\t\t\t
    \n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n}\n","import type { DataModel } from '@mcschema/core'\nimport { getCurrentUrl } from 'preact-router'\nimport { useEffect, useErrorBoundary, useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport { Analytics } from '../Analytics'\nimport { Ad, Btn, BtnInput, BtnMenu, ErrorPanel, HasPreview, Octicon, PreviewPanel, SourcePanel, Tree } from '../components'\nimport { fetchPreset } from '../DataFetcher'\nimport { locale } from '../Locales'\nimport type { BlockStateRegistry, VersionId } from '../Schemas'\nimport { checkVersion, getBlockStates, getCollections, getModel } from '../Schemas'\nimport { getGenerator } from '../Utils'\n\ntype GeneratorProps = {\n\tlang: string,\n\tchangeTitle: (title: string, versions?: string[]) => unknown,\n\tversion: VersionId,\n\tonChangeVersion: (version: VersionId) => unknown,\n\tdefault?: true,\n}\nexport function Generator({ lang, changeTitle, version, onChangeVersion }: GeneratorProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst [error, setError] = useState('')\n\tconst [errorBoundary] = useErrorBoundary()\n\tif (errorBoundary) {\n\t\treturn
\n\t}\n\n\tconst generator = getGenerator(getCurrentUrl())\n\tif (!generator) {\n\t\treturn
\n\t}\n\n\tconst minVersion = generator.minVersion ?? '1.15'\n\tconst allowedVersions = config.versions\n\t\t.filter(v => checkVersion(v.id, minVersion))\n\t\t.map(v => v.id as VersionId)\n\n\tchangeTitle(loc('title.generator', loc(generator.id)), allowedVersions)\n\n\tconst [model, setModel] = useState(null)\n\tconst [blockStates, setBlockStates] = useState(null)\n\tuseEffect(() => {\n\t\tsetModel(null)\n\t\tgetBlockStates(version)\n\t\t\t.then(b => setBlockStates(b))\n\t\tgetModel(version, generator.id)\n\t\t\t.then(m => setModel(m))\n\t\t\t.catch(e => { console.error(e); setError(e.message) })\n\t}, [version, generator.id])\n\n\tconst reset = () => {\n\t\tAnalytics.generatorEvent('reset')\n\t\tmodel?.reset(model.schema.default(), true)\n\t}\n\tconst undo = (e: MouseEvent) => {\n\t\te.stopPropagation()\n\t\tAnalytics.generatorEvent('undo', 'Menu')\n\t\tmodel?.undo()\n\t}\n\tconst redo = (e: MouseEvent) => {\n\t\te.stopPropagation()\n\t\tAnalytics.generatorEvent('redo', 'Menu')\n\t\tmodel?.redo()\n\t}\n\n\tconst onKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.ctrlKey && e.key === 'z') {\n\t\t\tAnalytics.generatorEvent('undo', 'Hotkey')\n\t\t\tmodel?.undo()\n\t\t} else if (e.ctrlKey && e.key === 'y') {\n\t\t\tAnalytics.generatorEvent('redo', 'Hotkey')\n\t\t\tmodel?.redo()\n\t\t}\n\t}\n\tuseEffect(() => {\n\t\tdocument.addEventListener('keyup', onKeyUp)\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('keyup', onKeyUp)\n\t\t}\n\t}, [model])\n\n\tconst [presetFilter, setPresetFilter] = useState('')\n\tconst [presetResults, setPresetResults] = useState([])\n\tuseEffect(() => {\n\t\tgetCollections(version)\n\t\t\t.then(collections => {\n\t\t\t\tconst terms = (presetFilter ?? '').trim().split(' ')\n\t\t\t\tconst presets = collections.get(generator.id)\n\t\t\t\t\t.map(p => p.slice(10))\n\t\t\t\t\t.filter(p => terms.every(t => p.includes(t)))\n\t\t\t\tif (presets) {\n\t\t\t\t\tsetPresetResults(presets)\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(e => { console.error(e); setError(e.message) })\n\t}, [version, generator.id, presetFilter])\n\n\tconst loadPreset = (id: string) => {\n\t\tAnalytics.generatorEvent('load-preset', id)\n\t\tfetchPreset(version, generator.path ?? generator.id, id).then(preset => {\n\t\t\tmodel?.reset(preset, false)\n\t\t})\n\t}\n\n\tconst [sourceShown, setSourceShown] = useState(window.innerWidth > 820)\n\tconst [doCopy, setCopy] = useState(0)\n\tconst [doDownload, setDownload] = useState(0)\n\tconst [doImport, setImport] = useState(0)\n\n\tconst copySource = () => {\n\t\tAnalytics.generatorEvent('copy')\n\t\tsetCopy(doCopy + 1)\n\t}\n\tconst downloadSource = () => {\n\t\tAnalytics.generatorEvent('download')\n\t\tsetDownload(doDownload + 1)\n\t}\n\tconst importSource = () => {\n\t\tAnalytics.generatorEvent('import')\n\t\tsetSourceShown(true)\n\t\tsetImport(doImport + 1)\n\t}\n\tconst toggleSource = () => {\n\t\tAnalytics.generatorEvent('toggle-output', !sourceShown ? 'visible' : 'hidden')\n\t\tsetSourceShown(!sourceShown)\n\t\tsetCopy(0)\n\t\tsetDownload(0)\n\t\tsetImport(0)\n\t}\n\n\tconst [previewShown, setPreviewShown] = useState(false)\n\n\tconst hasPreview = HasPreview.includes(generator.id)\n\tlet actionsShown = 1\n\tif (hasPreview) actionsShown += 1\n\tif (sourceShown) actionsShown += 2\n\n\tconst togglePreview = () => {\n\t\tAnalytics.generatorEvent('toggle-preview', !previewShown ? 'visible' : 'hidden')\n\t\tsetPreviewShown(!previewShown)\n\t}\n\n\treturn <>\n\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t{presetResults.map(preset => loadPreset(preset)} />)}\n\t\t\t\t\t
\n\t\t\t\t\t{presetResults.length === 0 && }\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{allowedVersions.reverse().map(v =>\n\t\t\t\t\t\t onChangeVersion(v)} />\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t{error && }\n\t\t\t\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t{previewShown ? Octicon.x_circle : Octicon.play}\n\t\t\t
\n\t\t\t
\n\t\t\t\t{Octicon.download}\n\t\t\t
\n\t\t\t
\n\t\t\t\t{Octicon.clippy}\n\t\t\t
\n\t\t\t
\n\t\t\t\t{sourceShown ? Octicon.chevron_right : Octicon.code}\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t\n\t\t
\n\t\t
\n\t\t\t\n\t\t
\n\t\n}\n","import config from '../../config.json'\nimport { ToolCard } from '../components'\nimport { locale } from '../Locales'\nimport { cleanUrl } from '../Utils'\n\ntype HomeProps = {\n\tlang: string,\n\tchangeTitle: (title: string) => unknown,\n\tpath?: string,\n}\nexport function Home({ lang, changeTitle }: HomeProps) {\n\tconst loc = locale.bind(null, lang)\n\tchangeTitle(loc('title.home'))\n\treturn
\n\t\t
\n\t\t\t{config.generators.filter(g => !g.category).map(g => \n\t\t\t\t\n\t\t\t)}\n\t\t\t\n\t\t\t
\n\t\t\t\n\t\t\t\t

Analyse your performance reports

\n\t\t\t
\n\t\t\t\n\t\t\t\t

Browse through and mix all the vanilla sounds

\n\t\t\t
\n\t\t\t\n\t\t\t\t

Convert your 1.16 data packs to 1.17

\n\t\t\t
\n\t\t
\n\t
\n}\n","import config from '../../config.json'\nimport { ToolCard } from '../components'\nimport { locale } from '../Locales'\nimport { cleanUrl } from '../Utils'\n\ntype WorldgenProps = {\n\tlang: string,\n\tchangeTitle: (title: string) => unknown,\n\tpath?: string,\n}\nexport function Worldgen({ lang, changeTitle }: WorldgenProps) {\n\tconst loc = locale.bind(null, lang)\n\tchangeTitle(loc('title.generator_category', loc('worldgen')))\n\treturn
\n\t\t
\n\t\t\t{config.generators.filter(g => g.category === 'worldgen').map(g => \n\t\t\t\t\n\t\t\t)}\n\t\t
\n\t
\n}\n","import { render } from 'preact'\nimport type { RouterOnChangeArgs } from 'preact-router'\nimport { Router } from 'preact-router'\nimport { useEffect, useState } from 'preact/hooks'\nimport '../styles/global.css'\nimport '../styles/nodes.css'\nimport { Analytics } from './Analytics'\nimport { Header } from './components'\nimport { loadLocale, locale, Locales } from './Locales'\nimport { FieldSettings, Generator, Home, Worldgen } from './pages'\nimport type { VersionId } from './Schemas'\nimport { Store } from './Store'\nimport { cleanUrl } from './Utils'\n\nfunction Main() {\n\tconst [lang, setLanguage] = useState('en')\n\tconst changeLanguage = async (language: string) => {\n\t\tif (!Locales[language]) {\n\t\t\tawait loadLocale(language)\n\t\t}\n\t\tAnalytics.setLanguage(language)\n\t\tStore.setLanguage(language)\n\t\tsetLanguage(language)\n\t}\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\tconst target = Store.getLanguage()\n\t\t\tawait Promise.all([\n\t\t\t\tloadLocale('en'),\n\t\t\t\t...(target !== 'en' ? [loadLocale(target)] : []),\n\t\t\t])\n\t\t\tsetLanguage(target)\n\t\t})()\n\t}, [])\n\n\tconst [theme, setTheme] = useState(Store.getTheme())\n\tconst changeTheme = (theme: string) => {\n\t\tAnalytics.setTheme(theme)\n\t\tStore.setTheme(theme)\n\t\tsetTheme(theme)\n\t}\n\tuseEffect(() => {\n\t\tdocument.documentElement.setAttribute('data-theme', theme)\n\t}, [theme])\n\n\tconst [version, setVersion] = useState(Store.getVersion())\n\tconst changeVersion = (version: VersionId) => {\n\t\tAnalytics.setVersion(version)\n\t\tStore.setVersion(version)\n\t\tsetVersion(version)\n\t}\n\n\tconst [title, setTitle] = useState(locale(lang, 'title.home'))\n\tconst changeTitle = (title: string, versions = ['1.15', '1.16', '1.17']) => {\n\t\tdocument.title = `${title} Minecraft ${versions.join(', ')}`\n\t\tsetTitle(title)\n\t}\n\n\tconst changeRoute = (e: RouterOnChangeArgs) => {\n\t\t// Needs a timeout to ensure the title is set correctly\n\t\tsetTimeout(() => Analytics.pageview(cleanUrl(e.url)))\n\t}\n\n\treturn <>\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n}\n\nrender(
, document.body)\n"],"names":["Analytics","type","id","getElementById","remove","window","load","data-ea-publisher","data-ea-type","class","icon","label","active","class_","onClick","Octicon","large","doSelect","value","onChange","onKeyUp","e","value2","target","endsWith","isNaN","Number","ref","useRef","current","select","stopPropagation","relative","children","setActive","useState","hider","body","addEventListener","removeEventListener","Btn","error2","href","Analytics2","ID_SITE","ID_GENERATOR","category","action","index","pageview","page","setLanguage","language","setTheme","theme","setVersion","version","setPreview","preview","generatorEvent","scriptRel","seen","__vitePreload","baseModule","deps","relList","document","createElement","supports","Promise","all","map","dep","isCss","cssSelector","querySelector","link","rel","as","crossOrigin","head","appendChild","res","rej","then","Locales","fallback","English","key","params","replace","parseInt","match","slice","resolveLocaleParams","en","langConfig","config","languages","find","lang","code","data","__variableDynamicImportRuntime0__","schema","schemas","__variableDynamicImportRuntime1__","__spreadValues","default","dec2hex","dec","toString","substr","length","arr","Uint8Array","crypto","getRandomValues","Array","from","join","str","url","replaceAll","trimmedUrl","generators","g","h","Math","abs","s2","i","imul","charCodeAt","hashString","a2","b","c","max","min","lerp","d","f","x","Themes","system","dark","light","title","changeTheme","changeLanguage","loc","locale","bind","getCurrentUrl","Link","cleanUrl","Icons","home","BtnMenu","name","Object","entries","th","mark_github","width","height","viewBox","fill","xmlns","rx","y","report","sounds","cx","cy","r","fill-rule","clip-rule","archive","arrow_left","arrow_right","chevron_right","clippy","dash","device_desktop","download","eye","eye_closed","gear","globe","history","kebab_horizontal","moon","play","plus","search","sun","sync","tag","three_bars","unfold","upload","x_circle","model","invalidated","listener","[object Object]","addListener","removeListener","element","drag","request","dragStart","pending","onMouseDown","offsetX","offsetY","onMouseMove","dx","dy","requestAnimationFrame","onMouseUp","_e","random","xo","yo","zo","p","n","int32","this","y2","z","x2","y22","z2","x3","floor","y3","z3","x4","y4","z4","x5","smoothstep","y5","z5","y6","sampleAndLerp","grad","_ImprovedNoise","GRADIENT","j","P","k","l2","m","o","lerp2","lerp3","gradDot","ImprovedNoise","seed","firstOctave","amplitudes","noiseLevels","seedrandom","lowestFreqInputFactor","pow","lowestFreqValueFactor","PerlinNoise","fixY","inputF","valueF","noise","wrap","first","second","Infinity","expectedDeviation","valueFactor","getValue","NoiseMaps","state","img","options","config2","NormalNoise","biomeColorCache","biomes","forEach","biome","getBiomeColor","biomeColors","ox","offset","oy","row","col","xx","scale","yy","closestBiome","color","multiNoise","fixed","shift","numBiomes","checkerboard","VanillaColors","stringToColor","isArray","n2","minDist","minBiome","dist","fitness","parameters","altitude","temperature","humidity","weirdness","minecraft:badlands","minecraft:badlands_plateau","minecraft:bamboo_jungle","minecraft:bamboo_jungle_hills","minecraft:basalt_deltas","minecraft:beach","minecraft:birch_forest","minecraft:birch_forest_hills","minecraft:cold_ocean","minecraft:crimson_forest","minecraft:dark_forest","minecraft:dark_forest_hills","minecraft:deep_cold_ocean","minecraft:deep_frozen_ocean","minecraft:deep_lukewarm_ocean","minecraft:deep_ocean","minecraft:deep_warm_ocean","minecraft:desert","minecraft:desert_hills","minecraft:desert_lakes","minecraft:end_barrens","minecraft:end_highlands","minecraft:end_midlands","minecraft:eroded_badlands","minecraft:flower_forest","minecraft:forest","minecraft:frozen_ocean","minecraft:frozen_river","minecraft:giant_spruce_taiga","minecraft:giant_spruce_taiga_hills","minecraft:giant_tree_taiga","minecraft:giant_tree_taiga_hills","minecraft:gravelly_mountains","minecraft:ice_spikes","minecraft:jungle","minecraft:jungle_edge","minecraft:jungle_hills","minecraft:lukewarm_ocean","minecraft:modified_badlands_plateau","minecraft:modified_gravelly_mountains","minecraft:modified_jungle","minecraft:modified_jungle_edge","minecraft:modified_wooded_badlands_plateau","minecraft:mountain_edge","minecraft:mountains","minecraft:mushroom_field_shore","minecraft:mushroom_fields","minecraft:nether_wastes","minecraft:ocean","minecraft:plains","minecraft:river","minecraft:savanna","minecraft:savanna_plateau","minecraft:shattered_savanna","minecraft:shattered_savanna_plateau","minecraft:small_end_islands","minecraft:snowy_beach","minecraft:snowy_mountains","minecraft:snowy_taiga","minecraft:snowy_taiga_hills","minecraft:snowy_taiga_mountains","minecraft:snowy_tundra","minecraft:soul_sand_valley","minecraft:stone_shore","minecraft:sunflower_plains","minecraft:swamp","minecraft:swamp_hills","minecraft:taiga","minecraft:taiga_hills","minecraft:taiga_mountains","minecraft:tall_birch_forest","minecraft:tall_birch_hills","minecraft:the_end","minecraft:the_void","minecraft:warm_ocean","minecraft:warped_forest","minecraft:wooded_badlands_plateau","minecraft:wooded_hills","minecraft:wooded_mountains","terrain","featureColors","startsWith","pos","ctx","base","nextInt","spread","normalize","min_inclusive","max_inclusive","sampleInt","source","features","indexOf","push","feature","placements","useFeature","featureFn","Features","JSON","stringify","decorator2","decoratorFn","Decorators","decorated","getPositions","decorator","getPlacements","random_boolean_selector","feature_true","feature_false","random_selector","chance","simple_random_selector","count","count_extra","extra_chance","extra_count","count_multilayer","count_noise","biomeInfoNoise","noise_level","below_noise","above_noise","count_noise_biased","factor","noise_factor","ceil","noise_offset","noise_to_count_ratio","dark_oak_tree","_config","_","seaLevel","clamp","outer","flatMap","inner","depth_average","decorateY","baseline","emerald_ore","fire","glowstone","heightmap","heightmap_spread_double","heightmap_world_surface","iceberg","lava_lake","nope","range","maximum","top_offset","bottom_offset","range_biased","range_very_biased","spread_32_above","top_solid_heightmap","magma","square","water_lake","minLimitPerlinNoise","fromRange","maxLimitPerlinNoise","mainPerlinNoise","depthNoise","settings","depth","xOffset","chunkWidth","size_horizontal","chunkHeight","size_vertical","chunkCountY","amplified","biomeDepth","biomeScale","noiseColumnCache","noise1","fillNoiseColumn","noise2","cachedColumn","xzScale","sampling","xz_scale","yScale","y_scale","xzFactor","xz_factor","yFactor","y_factor","randomDensity","random_density_offset","getRandomDensity","sampleAndClampNoise","getOctaveNoise","falloff","density_factor","density_offset","top_slide","size","clampedLerp","bottom_slide","minLimitNoise","maxLimitNoise","mainNoise","HasPreview","Previews","generator","path","Path","predicate","get","shown","setScale","setSeed","hexId","focused","setFocused","canvas","redrawTimeout","redraw","refocus","getContext","createImageData","putImageData","setTimeout","clientWidth","clientHeight","toWorld","getBiome","hover","onMouseLeave","changeScale","newScale","setBiomeDepth","setBiomeScale","NoiseChunkGenerator","reset","iterateNoiseColumn","reverse","getColor","BtnInput","v","setCount","filter","transformOutput","switchNode","props","hook","obj","blockState","validation","validator","blockStates","relativePath","keys","properties","includes","getActiveFields","activeFields","enabled","localStorage","removeItem","mcdataUrl","vanillaDatapackUrl","refs","hash","versionId","collectionTarget","blockStateTarget","versions","debug","dynamic","getItem","async","matches","cache","caches","open","promises","delete","warn","message","deleteMatching","setItem","fetchRegistries","fetchBlockStateMap","fetchDynamicRegistries","error","registries","checkVersion","minVersion","maxVersion","mcdata_master","getData","data2","register","values","states","assign","vanilla_datapack_summary","fn","cacheResponse","ok","json","fetchResponse","fetch","responseData","put","Response","VersionIds","Versions","Models","versionGetter","1.15","java15","1.16","java16","1.17","java17","collections","getCollections","fetchData","getSchemas","Error","minVersionId","maxVersionId","findIndex","Store","Store2","getLanguage","getTheme","getVersion","getIndent","setIndent","indent","INDENT","2_spaces","4_spaces","tabs","doCopy","doDownload","doImport","onError","retransform","ModelPath","execCommand","content","encodeURIComponent","setAttribute","click","changeIndent","parse","spellcheck","autocorrect","placeholder","style","callback","registry","el","on","querySelectorAll","el2","getAttribute","info","issue_opened","plus_circle","trashcan","selectRegistries","hiddenFields","flattenedFields","inlineFields","keysModel","DataModel","MapNode","StringNode","historyMax","renderHtml","node","onFalse","mounter","set","optional","onTrue","htmlEncode","choices","choice","activeCase","pathWithContext","context","getModel","getArray","pathWithChoiceContext","choiceContext","prefix","suffix","c2","change","pathLocale","contextPush","onAdd","onAddBottom","childValue","removeId","childPath","cPrefix","cSuffix","cBody","help","contextMenu","keyPath","enum","last","errors","add","ObjectNode","fromEntries","onRemove","modelPush","childrenSchema","integer","parsed","parseFloat","padStart","getChildModelPath","field","isFlattened","isInlined","getValues","inputId","newValue","isEnum","additional","pool","datalistId","result","popupIcon","popup","getElementsByTagName","classList","capture","once","openMenu","insertAdjacentHTML","inputEl","removeChild","preventDefault","timer","tree","Mounter","rendered","html","innerHTML","mounted","changeTitle","onChangeVersion","setError","errorBoundary","useErrorBoundary","ErrorPanel","getGenerator","allowedVersions","setModel","setBlockStates","versionData","schemaName","validate","catch","ctrlKey","undo","redo","presetFilter","setPresetFilter","presetResults","setPresetResults","terms","trim","split","presets","every","t","loadPreset","vanilla_datapack_data","preset","sourceShown","setSourceShown","innerWidth","setCopy","setDownload","setImport","previewShown","setPreviewShown","hasPreview","actionsShown","Ad","Tree","__spreadProps","PreviewPanel","SourcePanel","ToolCard","loadLocale","documentElement","setTitle","title2","Header","theme2","Router","Home","FieldSettings","Worldgen","Generator","version2","render","Main"],"mappings":"4iBAAiBA,cCQEC,KAAEA,KAAMC,cAChB,6BACAC,eAAe,sBAAmBC,SACvC,eAAgBC,mBACRC,SAEV,MAEK,MAAD,CAAKC,oBAAkB,mBAAmBC,eAAcP,EAAMQ,MAAM,eAAeP,GAAAA,gBCPvEQ,KAAEA,QAAMC,SAAOC,EAAQH,MAAOI,UAAQC,aACjD,MAAD,CAAKL,MAAO,MAAMG,EAAS,UAAY,KAAKC,EAAS,IAAIA,IAAW,KAAMC,QAAAA,GAC/EJ,GAAQK,EAAQL,GAChBC,KAAU,OAAD,KAAOA,gBCAMD,KAAEA,QAAMC,QAAOK,OAAOf,WAAMgB,QAAUC,WAAOC,UAC/DC,OAAuB,IAAbD,EAAyB,OAAYE,UAC9CC,EAASD,EAAEE,OAA4BL,MAChC,WAATjB,IAAuBqB,EAAME,SAAS,MAASC,MAAMC,OAAOJ,iBACpDA,IAIPK,EAAMC,EAAyB,gBAC3B,KACLX,GAAYU,EAAIE,WACfA,QAAQC,WAEX,CAACb,MAEI,MAAD,CAAKR,MAAO,kBAAiBO,EAAQ,cAAgB,IAAMF,WAAcO,EAAEU,mBAChFrB,GAAQK,EAAQL,GAChBC,KAAU,OAAD,KAAOA,KAChB,QAAD,CAAOgB,IAAAA,EAAU1B,KAAK,OAAOiB,MAAAA,EAAcE,QAAAA,iBCnBrBV,KAAEA,QAAMC,WAAOqB,WAAUC,UACzCrB,EAAQsB,GAAaC,GAAS,GAE/BC,EAAQ,QACH,cAGD,KACLxB,YACMyB,KAAKC,iBAAiB,QAASF,GAElC,cACGC,KAAKE,oBAAoB,QAASH,MAE1C,CAACxB,MAEI,MAAD,CAAKH,MAAO,aAAwB,IAAbuB,EAAqB,eAAiB,OAClEQ,EAAD,CAAK9B,KAAAA,EAAYC,MAAAA,EA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KAClD,CAACA,UAEGE,EAASD,GAAcpB,EAAoB0mB,GAAMI,eAOjD7f,EAAOuqB,GAAYxxB,EAAiBqH,EAAOpD,EAAM,eAClDuqB,EAAc,CAACiD,EAAezO,EAAW,CAAC,OAAQ,OAAQ,oBACtD/b,MAAQ,GAAGwqB,eAAmBzO,EAAS3d,KAAK,UAC5CosB,sBASRC,EAADltB,KAAY,CAACP,KAAAA,EAAMgD,MAAAA,EAAO9F,MAAAA,EAAOF,SAAUgD,EAAMkD,eAhD3Bic,MAAOniB,IACxBiC,EAAQjC,UACNqwB,EAAWrwB,KAERD,YAAYC,MAChBD,YAAYC,KACNA,IA0CqDiG,YA5B7CyqB,MACVzwB,SAASywB,MACbzwB,SAASywB,KACNA,SA0BRC,EAAD,CAAQ5yB,SAPYE,gBAET,IAAMrB,EAAUiD,SAAS2G,EAASvI,EAAEqG,YAM7CssB,GAADrtB,GAAM0a,KAAK,KAAQ,CAACjb,KAAAA,EAAMuqB,YAAAA,OACzBsD,GAADttB,GAAe0a,KAAK,oBAAuB,CAACjb,KAAAA,EAAMuqB,YAAAA,OACjDuD,GAADvtB,GAAU0a,KAAK,aAAgB,CAACjb,KAAAA,EAAMuqB,YAAAA,OACrCwD,GAADd,KAAWzsB,SAAO,GAAK,CAACR,KAAAA,EAAM5C,QAAAA,EAASmtB,YAAAA,IAAvC,CAAqDC,gBAvBhCwD,MACZ7wB,WAAW6wB,MACf7wB,WAAW6wB,KACNA,SAyBbC,IAAQC,GAAD,MAAUpwB,SAAS7B"} \ No newline at end of file diff --git a/assets/index.76e80d3e.js b/assets/index.76e80d3e.js new file mode 100644 index 00000000..8b9a805d --- /dev/null +++ b/assets/index.76e80d3e.js @@ -0,0 +1,2 @@ +var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,s=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&a(e,n,t[n]);if(o)for(var n of o(t))i.call(t,n)&&a(e,n,t[n]);return e},l=(e,o)=>t(e,n(o));import{y as c,a as d,s as u,l as h,g as m,L as g,b as p,c as f,d as v,j as _,e as w,f as y,q as b,N as k,R as C}from"./vendor.5f8b9a3f.js";var $;function x({type:e,id:t}){return c((()=>{var e;null==(e=document.getElementById("ad-placeholder"))||e.remove(),"ethicalads"in window&ðicalads.load()}),[]),d("div",{"data-ea-publisher":"misode-github-io","data-ea-type":e,class:"ad dark flat",id:t})}function V({icon:e,label:t,active:n,class:o,onClick:r}){return d("div",{class:`btn${n?" active":""}${o?` ${o}`:""}`,onClick:r},e&&M[e],t&&d("span",null,t))}function z({icon:e,label:t,large:n,type:o,doSelect:r,value:i,onChange:a}){const s=void 0===a?()=>{}:e=>{const t=e.target.value;"number"===o&&(t.endsWith(".")||isNaN(Number(t)))||null==a||a(t)},l=u(null);return c((()=>{r&&l.current&&l.current.select()}),[r]),d("div",{class:"btn btn-input "+(n?"large-input":""),onClick:e=>e.stopPropagation()},e&&M[e],t&&d("span",null,t),d("input",{ref:l,type:"text",value:i,onKeyUp:s}))}function E({icon:e,label:t,relative:n,children:o}){const[r,i]=h(!1),a=()=>{i(!1)};return c((()=>(r&&document.body.addEventListener("click",a),()=>{document.body.removeEventListener("click",a)})),[r]),d("div",{class:"btn-menu"+(!1===n?" no-relative":"")},d(V,{icon:e,label:t,onClick:()=>i(!0)}),r&&d("div",{class:"btn-group"},o))}!function(e){const t="Site",n="Generator";function o(e,t,n){ga("send","event",e,t,n)}function r(e,t){ga("set",`dimension${e}`,t)}e.pageview=function(e){ga("set","page",e),ga("send","pageview")},e.setLanguage=function(e){r(4,e),o(t,"set-language",e)},e.setTheme=function(e){r(1,e),o(t,"set-theme",e)},e.setVersion=function(e){r(3,e),o(n,"set-version",e)},e.setPreview=function(e){r(5,e),o(n,"set-preview",e)},e.generatorEvent=function(e,t){o(n,e,t)}}($||($={}));const M={archive:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),chevron_right:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),clippy:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),download:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),eye:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),gear:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),history:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),kebab_horizontal:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),mark_github:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),play:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),search:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),sun:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),three_bars:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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"})),unfold:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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:d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"16",height:"16"},d("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 A({error:e,onDismiss:t}){return d("div",{class:"error"},t&&d("div",{class:"error-dismiss",onClick:t},M.x),d("h3",null,e),d("p",null,"You can report this as a bug ",d("a",{href:"https://github.com/misode/misode.github.io/issues/new",target:"_blank"},"on GitHub")))}var j=JSON.parse('{"languages":[{"code":"de","name":"Deutsch"},{"code":"en","name":"English"},{"code":"fr","name":"Français"},{"code":"it","name":"Italiano"},{"code":"ja","name":"日本語"},{"code":"pl","name":"Polski"},{"code":"pt","name":"Português"},{"code":"ru","name":"Русский"},{"code":"sk","name":"Slovenčina","schemas":false},{"code":"zh-cn","name":"简体中文"},{"code":"zh-tw","name":"正體中文"}],"versions":[{"id":"1.15","refs":{"mcdata_master":"13355f7"}},{"id":"1.16","refs":{"mcdata_master":"1.16.4","vanilla_datapack_data":"1.16.4-data","vanilla_datapack_summary":"1.16.4-summary"}},{"id":"1.17","refs":{"mcdata_master":"master","vanilla_datapack_data":"data","vanilla_datapack_summary":"summary"},"dynamic":true}],"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":"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/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"},{"id":"worldgen/configured_surface_builder","url":"worldgen/surface-builder","category":"worldgen","schema":"configured_surface_builder","minVersion":"1.16"},{"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"}],"registries":[{"id":"advancement","dynamic":true},{"id":"attribute","minVersion":"1.16"},{"id":"block"},{"id":"dimension","dynamic":true},{"id":"dimension_type","dynamic":true},{"id":"enchantment"},{"id":"entity_type"},{"id":"fluid"},{"id":"function","dynamic":true},{"id":"float_provider_type","minVersion":"1.17"},{"id":"item"},{"id":"int_provider_type","minVersion":"1.17"},{"id":"height_provider_type","minVersion":"1.17"},{"id":"loot_condition_type","minVersion":"1.16"},{"id":"loot_condition_type","minVersion":"1.16"},{"id":"loot_function_type","minVersion":"1.16"},{"id":"loot_nbt_provider_type","minVersion":"1.17"},{"id":"loot_number_provider_type","minVersion":"1.17"},{"id":"loot_pool_entry_type","minVersion":"1.16"},{"id":"loot_score_provider_type","minVersion":"1.17"},{"id":"loot_table","dynamic":true},{"id":"mob_effect"},{"id":"pos_rule_test","minVersion":"1.16"},{"id":"potion","minVersion":"1.15"},{"id":"predicate","dynamic":true},{"id":"recipe","dynamic":true},{"id":"rule_test","minVersion":"1.16"},{"id":"sound_event"},{"id":"stat_type"},{"id":"structure","dynamic":true},{"id":"tag/block","dynamic":true},{"id":"tag/entity_type","dynamic":true},{"id":"tag/fluid","dynamic":true},{"id":"tag/function","dynamic":true},{"id":"tag/item","dynamic":true},{"id":"worldgen/biome","dynamic":true},{"id":"worldgen/block_state_provider_type","minVersion":"1.16"},{"id":"worldgen/block_placer_type","minVersion":"1.16"},{"id":"worldgen/biome_source","minVersion":"1.16"},{"id":"worldgen/carver","minVersion":"1.16"},{"id":"worldgen/chunk_generator","minVersion":"1.16"},{"id":"worldgen/configured_carver","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_decorator","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_feature","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_structure_feature","minVersion":"1.16","dynamic":true},{"id":"worldgen/configured_surface_builder","minVersion":"1.16","dynamic":true},{"id":"worldgen/decorator","minVersion":"1.16"},{"id":"worldgen/feature","minVersion":"1.16"},{"id":"worldgen/feature_size_type","minVersion":"1.16"},{"id":"worldgen/foliage_placer_type","minVersion":"1.16"},{"id":"worldgen/noise_settings","minVersion":"1.16","dynamic":true},{"id":"worldgen/processor_list","minVersion":"1.16","dynamic":true},{"id":"worldgen/structure_feature","minVersion":"1.16"},{"id":"worldgen/structure_pool_element","minVersion":"1.16"},{"id":"worldgen/structure_processor","minVersion":"1.16"},{"id":"worldgen/surface_builder","minVersion":"1.16"},{"id":"worldgen/template_pool","minVersion":"1.16","dynamic":true},{"id":"worldgen/tree_decorator_type","minVersion":"1.16"},{"id":"worldgen/trunk_placer_type","minVersion":"1.16"},{"id":"biome","maxVersion":"1.15"},{"id":"worldgen/biome","minVersion":"1.16","path":"processed/reports/biomes"}]}');let L;const P={},D=function(e,t){if(!t)return e();if(void 0===L){const e=document.createElement("link").relList;L=e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}return Promise.all(t.map((e=>{if(e in P)return;P[e]=!0;const t=e.endsWith(".css"),n=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${n}`))return;const o=document.createElement("link");return o.rel=t?"stylesheet":L,t||(o.as="script",o.crossOrigin=""),o.href=e,document.head.appendChild(o),t?new Promise(((e,t)=>{o.addEventListener("load",e),o.addEventListener("error",t)})):void 0}))).then((()=>e()))};var I=JSON.parse('{"advancement":"Advancement","button.add":"Add","button.collapse":"Collapse","button.expand":"Expand","button.remove":"Remove","copy":"Copy","dimension_type":"Dimension Type","dimension":"Dimension","download":"Download","fields":"Fields","github":"GitHub","home":"Home","import":"Import","indentation.2_spaces":"2 spaces","indentation.4_spaces":"4 spaces","indentation.tabs":"Tabs","item_modifier":"Item Modifier","language":"Language","loot_table":"Loot Table","not_found.description":"The page you were looking for does not exist.","no_presets":"No presets","predicate":"Predicate","redo":"Redo","reset":"Reset","settings":"Settings","settings.fields.description":"Customize advanced field settings","settings.fields.path":"Context","settings.fields.name":"Name","share":"Share","theme.dark":"Dark","theme.light":"Light","theme.system":"System","title.generator":"%0% Generator","title.generator_category":"%0% Generators","title.home":"Data Pack Generators","presets":"Presets","preview":"Visualize","preview.scale":"Scale","preview.depth":"Depth","preview.width":"Width","source_placeholder":"Paste JSON content here","undo":"Undo","world":"World Settings","worldgen":"Worldgen","worldgen/biome":"Biome","worldgen/configured_carver":"Carver","worldgen/configured_feature":"Feature","worldgen/noise_settings":"Noise Settings","worldgen/processor_list":"Processor List","worldgen/configured_structure_feature":"Structure Feature","worldgen/configured_surface_builder":"Surface Builder","worldgen/template_pool":"Template Pool"}'),O=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:I});const S={fallback:I};function N(e,t,...n){var o,r,i,a,s;return function(e,t){return e.replace(/%\d+%/g,(e=>{const n=parseInt(e.slice(1,-1));return void 0!==(null==t?void 0:t[n])?t[n]:e}))}(null!=(s=null!=(a=null!=(i=null==(o=S[e])?void 0:o[t])?i:null==(r=S.en)?void 0:r[t])?a:S.fallback[t])?s:t,n)}async function T(e){const t=j.languages.find((t=>t.code===e));if(!t)return;const n=await function(e){switch(e){case"../locales/de.json":return D((()=>import("./de.495918cb.js")),void 0);case"../locales/en.json":return D((()=>Promise.resolve().then((function(){return O}))),void 0);case"../locales/fr.json":return D((()=>import("./fr.cc0e1c18.js")),void 0);case"../locales/it.json":return D((()=>import("./it.fd9a8268.js")),void 0);case"../locales/ja.json":return D((()=>import("./ja.8c79487c.js")),void 0);case"../locales/pl.json":return D((()=>import("./pl.3a9fb38c.js")),void 0);case"../locales/pt.json":return D((()=>import("./pt.689bba1d.js")),void 0);case"../locales/ru.json":return D((()=>import("./ru.e53996b0.js")),void 0);case"../locales/sk.json":return D((()=>import("./sk.586a2a32.js")),void 0);case"../locales/zh-cn.json":return D((()=>import("./zh-cn.d620a7da.js")),void 0);case"../locales/zh-tw.json":return D((()=>import("./zh-tw.2a1c5616.js")),void 0);default:return Promise.reject(new Error("Unknown variable dynamic import: "+e))}}(`../locales/${e}.json`),o=!1!==t.schemas&&await function(e){switch(e){case"../../node_modules/@mcschema/locales/src/de.json":return D((()=>import("./de.ba8c635a.js")),void 0);case"../../node_modules/@mcschema/locales/src/en.json":return D((()=>import("./en.6ae73cdb.js")),void 0);case"../../node_modules/@mcschema/locales/src/fr.json":return D((()=>import("./fr.c1ebc76d.js")),void 0);case"../../node_modules/@mcschema/locales/src/it.json":return D((()=>import("./it.288ea523.js")),void 0);case"../../node_modules/@mcschema/locales/src/ja.json":return D((()=>import("./ja.d68f1cee.js")),void 0);case"../../node_modules/@mcschema/locales/src/pl.json":return D((()=>import("./pl.2f8b352f.js")),void 0);case"../../node_modules/@mcschema/locales/src/pt.json":return D((()=>import("./pt.98ad9b62.js")),void 0);case"../../node_modules/@mcschema/locales/src/ru.json":return D((()=>import("./ru.61de7e2f.js")),void 0);case"../../node_modules/@mcschema/locales/src/zh-cn.json":return D((()=>import("./zh-cn.655950f4.js")),void 0);case"../../node_modules/@mcschema/locales/src/zh-tw.json":return D((()=>import("./zh-tw.a8f28612.js")),void 0);default:return Promise.reject(new Error("Unknown variable dynamic import: "+e))}}(`../../node_modules/@mcschema/locales/src/${e}.json`);S[e]=s(s({},n.default),o.default)}const B=e=>("0"+e.toString(16)).substr(-2);function R(e=12){var t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,B).join("")}function H(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function F(e){return`/${e}/`.replaceAll("//","/")}function W(e){const t=e.replace(/^\//,"").replace(/\/$/,"");return j.generators.find((e=>e.url===t))}function G(e){const t=Math.abs(function(e){let t=0;for(let n=0;n>8)%256,(t>>16)%256]}function q(e,t,n){return Math.max(e,Math.min(t,n))}function J(e,t,n){return n<0?e:n>1?t:Y(n,e,t)}function Y(e,t,n){return t+e*(n-t)}function U(e,t,n,o,r,i){return Y(t,Y(e,n,o),Y(e,r,i))}function Z(e){return e*e*e*(e*(6*e-15)+10)}const X={system:"device_desktop",dark:"moon",light:"sun"};function K({lang:e,title:t,theme:n,changeTheme:o,language:r,changeLanguage:i}){var a;const s=N.bind(null,e),l=null==(a=W(m()))?void 0:a.category;return d("header",null,d("div",{class:"header-title"},d(g,{class:"home-link",href:"string"==typeof l?F(l):"/"},Q.home),d("h2",null,t)),d("nav",null,d("ul",null,d("li",null,d(E,{icon:"globe"},j.languages.map((({code:e,name:t})=>d(V,{label:t,active:e===r,onClick:()=>i(e)}))))),d("li",null,d(E,{icon:X[n]},Object.entries(X).map((([e,t])=>d(V,{icon:t,label:s(`theme.${e}`),active:e===n,onClick:()=>o(e)}))))),d("li",{class:"dimmed"},d("a",{href:"https://github.com/misode/misode.github.io",target:"_blank",rel:"noreferrer",title:s("github")},M.mark_github)))))}const Q={home:d("svg",{width:"32",height:"28",viewBox:"0 0 32 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d("rect",{width:"26",height:"6",rx:"3",fill:"#7CB45C"}),d("rect",{x:"8",width:"18",height:"6",rx:"3",fill:"#4BA041"}),d("rect",{y:"11",width:"32",height:"6",rx:"3",fill:"#AAA8A8"}),d("rect",{x:"11",y:"11",width:"21",height:"6",rx:"3",fill:"#91908F"}),d("rect",{x:"11",y:"22",width:"21",height:"6",rx:"3",fill:"#70B5C3"}),d("rect",{x:"17",y:"22",width:"15",height:"6",rx:"3",fill:"#4D989B"})),report:d("svg",{width:"30",height:"36",viewBox:"0 0 30 36",xmlns:"http://www.w3.org/2000/svg"},d("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"}),d("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"}),d("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"}),d("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"}),d("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"}),d("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:d("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},d("circle",{cx:"10",cy:"10",r:"10",fill:"#451475"}),d("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 ee(e,t){const n={invalidated(){e&&t(e)}};c((()=>(null==e||e.addListener(n),n.invalidated(),()=>{null==e||e.removeListener(n)})),[e])}function te(e,t){if(!e)return;const n=u(),o=u(),r=u([0,0]);c((()=>{const i=e=>{o.current=[e.offsetX,e.offsetY]},a=e=>{if(void 0===o.current)return;const i=e.offsetX-o.current[0],a=e.offsetY-o.current[1];0===i&&0===a||(cancelAnimationFrame(n.current),r.current=[r.current[0]+i,r.current[1]+a],n.current=requestAnimationFrame((()=>{t(...r.current),r.current=[0,0]}))),o.current=[e.offsetX,e.offsetY]},s=e=>{o.current=void 0};return e.addEventListener("mousedown",i),e.addEventListener("mousemove",a),document.body.addEventListener("mouseup",s),()=>{e.removeEventListener("mousedown",i),e.removeEventListener("mousemove",a),document.body.removeEventListener("mouseup",s)}}),[e])}const ne=class{constructor(e){this.xo=256*e(),this.yo=256*e(),this.zo=256*e(),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.int32()%(256-t),o=this.p[t];this.p[t]=this.p[t+n],this.p[t+n]=o}}noise(e,t,n,o,r){const i=e+this.xo,a=t+this.yo,s=n+this.zo,l=Math.floor(i),c=Math.floor(a),d=Math.floor(s),u=i-l,h=a-c,m=s-d,g=Z(u),p=Z(h),f=Z(m);let v=0;return 0!==o&&(v=Math.floor(Math.min(r,h)/o)*o),this.sampleAndLerp(l,c,d,u,h-v,m,g,p,f)}gradDot(e,t,n,o){const r=ne.GRADIENT[15&e];return r[0]*t+r[1]*n+r[2]*o}P(e){return 255&this.p[255&e]}sampleAndLerp(e,t,n,o,r,i,a,s,l){const c=this.P(e)+t,d=this.P(c)+n,u=this.P(c+1)+n,h=this.P(e+1)+t,m=this.P(h)+n,g=this.P(h+1)+n;return function(e,t,n,o,r,i,a,s,l,c,d){return Y(n,U(e,t,o,r,i,a),U(e,t,s,l,c,d))}(a,s,l,this.gradDot(this.P(d),o,r,i),this.gradDot(this.P(m),o-1,r,i),this.gradDot(this.P(u),o,r-1,i),this.gradDot(this.P(g),o-1,r-1,i),this.gradDot(this.P(d+1),o,r,i-1),this.gradDot(this.P(m+1),o-1,r,i-1),this.gradDot(this.P(u+1),o,r-1,i-1),this.gradDot(this.P(g+1),o-1,r-1,i-1))}};let oe=ne;oe.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]];class re{constructor(e,t,n){this.amplitudes=n,this.noiseLevels=Array(this.amplitudes.length);for(let o=0;o{const r=e[`${t}_noise`];return new ie(n.seed+o,r.firstOctave,r.amplitudes)})),i={};e.biomes.forEach((e=>{i[e.biome]=le(e.biome,n.biomeColors)}));const a=t.data,s=-n.offset[0]-100+n.res/2,l=-n.offset[1]-100+n.res/2,c=4*t.width/n.res,d=4/n.res;for(let u=0;u<200;u+=n.res)for(let t=0;t<200;t+=n.res){const h=t*c+u*d,m=(u+s)*n.scale,g=(t+l)*n.scale,p=ce(r,e.biomes,m,g),f=null!=(o=i[p])?o:[128,128,128];a[h]=f[0],a[h+1]=f[1],a[h+2]=f[2],a[h+3]=255}}(e,t,n);case"fixed":return function(e,t,n){const o=t.data,r=le(e.biome,n.biomeColors),i=4*t.width/n.res,a=4/n.res;for(let s=0;s<200;s+=n.res)for(let e=0;e<200;e+=n.res){const t=e*i+s*a;o[t]=r[0],o[t+1]=r[1],o[t+2]=r[2],o[t+3]=255}}(e,t,n);case"checkerboard":return function(e,t,n){var o,r,i,a,s,l;const c={};null==(o=e.biomes)||o.forEach((e=>{c[e]=le(e,n.biomeColors)}));const d=t.data,u=-n.offset[0]-100+n.res/2,h=-n.offset[1]-100+n.res/2,m=4*t.width/n.res,g=4/n.res,p=(null!=(r=e.scale)?r:2)+2,f=null!=(a=null==(i=e.biomes)?void 0:i.length)?a:0;for(let v=0;v<200;v+=n.res)for(let t=0;t<200;t+=n.res){const o=t*m+v*g,r=((((v+u)*n.scale>>p)+((t+h)*n.scale>>p))%f+f)%f,i=null==(s=e.biomes)?void 0:s[r],a=null!=(l=c[i])?l:[128,128,128];d[o]=a[0],d[o+1]=a[1],d[o+2]=a[2],d[o+3]=255}}(e,t,n)}}function le(e,t){var n;if(!e)return[128,128,128];const o=null!=(n=t[e])?n:ue[e];return void 0===o?G(e):o}function ce(e,t,n,o){if(!Array.isArray(t)||0===t.length)return"";const r=e.map((e=>e.getValue(n,o,0)));let i=1/0,a="";for(const s of t){const e=de(s.parameters,{altitude:r[0],temperature:r[1],humidity:r[2],weirdness:r[3],offset:0});e{ye(t,null==e?void 0:e.decorator,n).forEach((t=>we(t,null==e?void 0:e.feature,n)))},random_boolean_selector:(e,t,n)=>{we(t,n.random()<.5?null==e?void 0:e.feature_true:null==e?void 0:e.feature_false,n)},random_selector:(e,t,n)=>{var o,r;for(const i of null!=(o=null==e?void 0:e.features)?o:[])if(n.random()<(null!=(r=null==i?void 0:i.chance)?r:0))return void we(t,i.feature,n);we(t,null==e?void 0:e.default,n)},simple_random_selector:(e,t,n)=>{var o,r,i;we(t,null==(i=null==e?void 0:e.features)?void 0:i[fe(null!=(r=null==(o=null==e?void 0:e.features)?void 0:o.length)?r:0,n)],n)}},ke={chance:(e,t,n)=>{var o;return n.random()<1/(null!=(o=null==e?void 0:e.chance)?o:1)?[t]:[]},count:(e,t,n)=>{var o;return new Array(ve(null!=(o=null==e?void 0:e.count)?o:1,n)).fill(t)},count_extra:(e,t,n)=>{var o,r;let i=null!=(o=null==e?void 0:e.count)?o:1;return n.random(){var o;return new Array(ve(null!=(o=null==e?void 0:e.count)?o:1,n)).fill(t).map((e=>[e[0]+fe(16,n),e[1],e[2]+fe(16,n)]))},count_noise:(e,t,n)=>{const o=n.biomeInfoNoise.getValue(t[0]/200,0,t[2]/200){var o;const r=Math.max(1,e.noise_factor),i=n.biomeInfoNoise.getValue(t[0]/r,0,t[2]/r),a=Math.max(0,Math.ceil((i+(null!=(o=e.noise_offset)?o:0))*e.noise_to_count_ratio));return new Array(a).fill(t)},dark_oak_tree:(e,t,n)=>[...new Array(16)].map(((e,o)=>{const r=4*Math.floor(o/4)+1+fe(3,n)+t[0];return[r,Math.max(n.seaLevel,he[q(0,63,r)]),4*Math.floor(o%4)+1+fe(3,n)+t[2]]})),decorated:(e,t,n)=>ye(t,null==e?void 0:e.outer,n).flatMap((t=>ye(t,null==e?void 0:e.inner,n))),depth_average:(e,t,n)=>{var o,r,i,a;return pe(t,fe(null!=(o=null==e?void 0:e.spread)?o:0,n)+fe(null!=(r=null==e?void 0:e.spread)?r:0,n)-(null!=(i=e.spread)?i:0)+(null!=(a=null==e?void 0:e.baseline)?a:0))},emerald_ore:(e,t,n)=>{const o=3+fe(6,n);return[...new Array(o)].map((()=>[t[0]+fe(16,n),4+fe(28,n),t[2]+fe(16,n)]))},fire:(e,t,n)=>{const o=1+fe(fe(ve(null==e?void 0:e.count,n),n),n);return[...new Array(o)].map((()=>[t[0]+fe(16,n),fe(128,n),t[2]+fe(16,n)]))},glowstone:(e,t,n)=>{const o=fe(1+fe(ve(null==e?void 0:e.count,n),n),n);return[...new Array(o)].map((()=>[t[0]+fe(16,n),fe(128,n),t[2]+fe(16,n)]))},heightmap:(e,t,n)=>pe(t,Math.max(n.seaLevel,he[q(0,63,t[0])])),heightmap_spread_double:(e,t,n)=>pe(t,fe(2*Math.max(n.seaLevel,he[q(0,63,t[0])]),n)),heightmap_world_surface:(e,t,n)=>pe(t,Math.max(n.seaLevel,he[q(0,63,t[0])])),iceberg:(e,t,n)=>[[t[0]+4+fe(8,n),t[1],t[2]+4+fe(8,n)]],lava_lake:(e,t,n)=>{var o,r;if(0===fe((null!=(o=e.chance)?o:1)/10,n)){const o=fe(fe(248,n)+8,n);if(o[t],range:(e,t,n)=>{var o,r,i;return pe(t,fe((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0),n)+(null!=(i=null==e?void 0:e.bottom_offset)?i:0))},range_biased:(e,t,n)=>{var o,r,i;return pe(t,fe(fe((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0),n)+(null!=(i=null==e?void 0:e.bottom_offset)?i:0),n))},range_very_biased:(e,t,n)=>{var o,r,i,a;return pe(t,fe(fe(fe((null!=(o=null==e?void 0:e.maximum)?o:1)-(null!=(r=null==e?void 0:e.top_offset)?r:0),n)+(null!=(i=null==e?void 0:e.bottom_offset)?i:0),n)+(null!=(a=null==e?void 0:e.bottom_offset)?a:0),n))},spread_32_above:(e,t,n)=>pe(t,fe(t[1]+32,n)),top_solid_heightmap:(e,t)=>pe(t,he[q(0,63,t[0])]),magma:(e,t,n)=>pe(t,fe(t[1]+32,n)),square:(e,t,n)=>[[t[0]+fe(16,n),t[1],t[2]+fe(16,n)]],water_lake:(e,t,n)=>{var o;return 0===fe(null!=(o=e.chance)?o:1,n)?[[t[0]+fe(16,n),fe(256,n),t[2]+fe(16,n)]]:[]}};class Ce{constructor(e){this.settings={},this.chunkWidth=4,this.chunkHeight=4,this.chunkCountY=32,this.biomeDepth=.1,this.biomeScale=.2,this.noiseColumnCache=[],this.xOffset=0,this.minLimitPerlinNoise=re.fromRange(e+"djfqnqd",-15,0),this.maxLimitPerlinNoise=re.fromRange(e+"gowdnqs",-15,0),this.mainPerlinNoise=re.fromRange(e+"afiwmco",-7,0),this.depthNoise=re.fromRange(e+"qphnmeo",-15,0)}reset(e,t,n,o,r){this.settings=e,this.chunkWidth=4*e.size_horizontal,this.chunkHeight=4*e.size_vertical,this.chunkCountY=Math.floor(e.height/this.chunkHeight),e.amplified&&t>0&&(t=1+2*t,n=1+4*n),this.biomeDepth=.265625*(.5*t-.125),this.biomeScale=96/(.9*n+.1),this.noiseColumnCache=Array(r).fill(null),this.xOffset=o}iterateNoiseColumn(e){const t=Array(this.chunkCountY*this.chunkHeight),n=Math.floor(e/this.chunkWidth),o=Math.floor(e%this.chunkWidth)/this.chunkWidth,r=this.fillNoiseColumn(n),i=this.fillNoiseColumn(n+1);for(let a=this.chunkCountY-1;a>=0;a-=1)for(let e=this.chunkHeight;e>=0;e-=1){const n=e/this.chunkHeight;t[a*this.chunkHeight+e]=U(n,o,r[a],r[a+1],i[a],i[a+1])}return t}fillNoiseColumn(e){const t=this.noiseColumnCache[e-this.xOffset];if(t)return t;const n=Array(this.chunkCountY+1),o=684.412*this.settings.sampling.xz_scale,r=684.412*this.settings.sampling.y_scale,i=o/this.settings.sampling.xz_factor,a=r/this.settings.sampling.y_factor,s=this.settings.random_density_offset?this.getRandomDensity(e):0;for(let l=0;l<=this.chunkCountY;l+=1){let t=this.sampleAndClampNoise(e,l,this.mainPerlinNoise.getOctaveNoise(0).zo,o,r,i,a);const c=((1-2*l/this.chunkCountY+s)*this.settings.density_factor+this.settings.density_offset+this.biomeDepth)*this.biomeScale;t+=c*(c>0?4:1),this.settings.top_slide.size>0&&(t=J(this.settings.top_slide.target,t,(this.chunkCountY-l-this.settings.top_slide.offset)/this.settings.top_slide.size)),this.settings.bottom_slide.size>0&&(t=J(this.settings.bottom_slide.target,t,(l-this.settings.bottom_slide.offset)/this.settings.bottom_slide.size)),n[l]=t}return this.noiseColumnCache[e-this.xOffset]=n,n}getRandomDensity(e){const t=this.depthNoise.getValue(200*e,10,this.depthNoise.getOctaveNoise(0).zo,1,0,!0),n=24.575625*(t<0?.3*-t:t)-2;return n<0?.009486607142857142*n:.006640625*Math.min(n,1)}sampleAndClampNoise(e,t,n,o,r,i,a){let s=0,l=0,c=0,d=1;for(let u=0;u<16;u+=1){const h=re.wrap(e*o*d),m=re.wrap(t*r*d),g=re.wrap(n*o*d),p=r*d,f=this.minLimitPerlinNoise.getOctaveNoise(u);f&&(s+=f.noise(h,m,g,p,t*p)/d);const v=this.maxLimitPerlinNoise.getOctaveNoise(u);if(v&&(l+=v.noise(h,m,g,p,t*p)/d),u<8){const o=this.mainPerlinNoise.getOctaveNoise(u);o&&(c+=o.noise(re.wrap(e*i*d),re.wrap(t*a*d),re.wrap(n*i*d),a*d,t*a*d)/d)}d/=2}return J(s/512,l/512,(c/10+1)/2)}}function $e(e,t){return e[t]>0?0:e[t+1]>0?150:255}const xe=["dimension","worldgen/noise_settings","worldgen/configured_feature"],Ve=[{id:"biome-noise",generator:"dimension",path:new v.Path(["generator","biome_source"]),predicate:e=>e.get(new v.Path(["generator","type"])).endsWith("noise"),preview:({data:e,shown:t})=>{var n;const[o,r]=h(2),[i,a]=h(R()),[s,l]=h(void 0),m=null==(n=e.type)?void 0:n.replace(/^minecraft:/,""),g=u(null),p=u([0,0]),v=u(void 0),_=u(),w=u();c((()=>{_.current=(t=4)=>{"multi_noise"!==m&&(t=1);const n=g.current.getContext("2d");g.current.width=200/t,g.current.height=200/t;const r=n.createImageData(g.current.width,g.current.height);se(e,r,{biomeColors:{},offset:p.current,scale:o,seed:i,res:t}),n.putImageData(r,0,0),1!==t&&(clearTimeout(v.current),v.current=setTimeout((()=>_.current(1)),150))},w.current=(t,n)=>{const r=200*t/g.current.clientWidth,a=200*n/g.current.clientHeight,s=function(e,t,n,o){var r,i,a,s,l;const[c,d]=function([e,t],n){return[(e-n.offset[0]-100+n.res/2)*n.scale,(t-n.offset[1]-100+n.res/2)*n.scale]}([t,n],o);switch(null==(r=null==e?void 0:e.type)?void 0:r.replace(/^minecraft:/,"")){case"multi_noise":return ce(ae.map(((t,n)=>{const r=e[`${t}_noise`];return new ie(o.seed+n,r.firstOctave,r.amplitudes)})),e.biomes,c,d);case"fixed":return e.biome;case"checkerboard":const t=(null!=(i=e.scale)?i:2)+2,n=null!=(s=null==(a=e.biomes)?void 0:a.length)?s:0,r=(((c>>t)+(d>>t))%n+n)%n;return null==(l=e.biomes)?void 0:l[r]}}(e,r,a,{biomeColors:{},offset:p.current,scale:o,seed:i,res:1});l(s)}})),te(g.current,((e,t)=>{const n=200*e/g.current.clientWidth,o=200*t/g.current.clientHeight;p.current=[p.current[0]+n,p.current[1]+o],_.current()})),function(e,t){if(!e)return;const n=e=>{t(e.offsetX,e.offsetY)},o=()=>{t(void 0,void 0)};c((()=>(e.addEventListener("mousemove",n),e.addEventListener("mouseleave",o),()=>{e.removeEventListener("mousemove",n),e.removeEventListener("mouseleave",o)})),[e])}(g.current,((e,t)=>{void 0===e||void 0===t?l(void 0):w.current(e,t)}));const y=JSON.stringify(e);c((()=>{t&&_.current()}),[y,o,i,t]);const b=e=>{p.current[0]*=o/e,p.current[1]*=o/e,r(e)};return d(f,null,d("div",{class:"controls"},s&&d(V,{label:s,class:"no-pointer"}),("multi_noise"===m||"checkerboard"===m)&&d(f,null,d(V,{icon:"dash",onClick:()=>b(1.5*o)}),d(V,{icon:"plus",onClick:()=>b(o/1.5)})),"multi_noise"===m&&d(V,{icon:"sync",onClick:()=>a(R())})),d("canvas",{ref:g,width:"200",height:"200"}))}},{id:"noise-settings",generator:"worldgen/noise_settings",path:new v.Path(["noise"]),predicate:()=>!0,preview:({lang:e,data:t,shown:n})=>{const o=N.bind(null,e),[r,i]=h(R()),[a,s]=h(.1),[l,m]=h(.2),g=u(null),p=u(0),v=u();c((()=>{v.current=()=>{const e=g.current.getContext("2d"),n=t.height;g.current.width=n,g.current.height=n;const o=e.createImageData(g.current.width,g.current.height);!function(e,t,n){const o=new Ce(n.seed);o.reset(e,n.biomeDepth,n.biomeScale,n.offset,200);const r=t.data,i=4*t.width;for(let a=0;a{const t=e*g.current.width/g.current.clientWidth;p.current=p.current+t,v.current()}));const _=JSON.stringify(t);return c((()=>{n&&v.current()}),[_,a,l,r,n]),d(f,null,d("div",{class:"controls"},d(E,{icon:"gear"},d(z,{type:"number",label:o("preview.depth"),value:`${a}`,onChange:e=>s(Number(e))}),d(z,{type:"number",label:o("preview.scale"),value:`${l}`,onChange:e=>m(Number(e))})),d(V,{icon:"sync",onClick:()=>i(R())})),d("canvas",{ref:g,width:"200",height:t.height}))}},{id:"decorator",generator:"worldgen/configured_feature",path:new v.Path([]),predicate:()=>!0,preview:({data:e,version:t,shown:n})=>{const[o,r]=h(4),[i,a]=h(R()),s=u(null),l=u();c((()=>{l.current=()=>{const n=s.current.getContext("2d");s.current.width=16*o,s.current.height=16*o;const r=n.createImageData(s.current.width,s.current.height);!function(e,t,n){const o={placements:[],features:[],random:p(n.seed),biomeInfoNoise:new re(n.seed+"frwynup",0,[1]),seaLevel:63,version:n.version};for(let i=0;i=n.size[0]||i[1]>=n.size[1]||i[2]>=n.size[2])continue;const e=i[2]*(4*t.width)+4*i[0],s=a{n&&setTimeout((()=>l.current()))}),[m,o,i,n]),d(f,null,d("div",{class:"controls"},d(V,{icon:"dash",onClick:()=>r(Math.min(16,o+1))}),d(V,{icon:"plus",onClick:()=>r(Math.max(1,o-1))}),d(V,{icon:"sync",onClick:()=>a(R())})),d("canvas",{ref:s,width:"64",height:"64"}))}}];function ze({lang:e,model:t,version:n,id:o,shown:r}){const[,i]=h(0);return ee(t,(()=>{i((e=>e+1))})),d(f,null,Ve.filter((e=>e.generator===o)).map((o=>{const i=null==t?void 0:t.get(o.path);return t&&void 0!==i&&o.predicate(t)?o.preview({lang:e,model:t,data:i,version:n,shown:r}):d(f,null)})))}const Ee={base:({},e,t)=>t,choice({switchNode:e},t,n,o){return e.hook(this,t,n,o)},list({children:e},t,n,o){return Array.isArray(n)?n.map(((n,r)=>e.hook(this,t.push(r),n,o))):n},map({children:e,config:t},n,o,r){var i,a;if(void 0===o)return;const s="block_state_map"===(null==(i=t.validation)?void 0:i.validator)?null==(a=r.blockStates)?void 0:a[v.relativePath(n,t.validation.params.id).get()]:null,l={};return Object.keys(o).forEach((t=>{s&&!Object.keys(s.properties).includes(t)||(l[t]=e.hook(this,n.push(t),o[t],r))})),l},object({getActiveFields:e},t,n,o){if(null==n||"object"!=typeof n)return n;const r={},i=e(t);return Object.keys(i).filter((e=>i[e].enabled(t))).forEach((e=>{r[e]=i[e].hook(this,t.push(e),n[e],o)})),r}};["1.15","1.16","1.17"].forEach((e=>localStorage.removeItem(`cache_${e}`)));const Me="https://raw.githubusercontent.com/Arcensoth/mcdata",Ae="https://raw.githubusercontent.com/SPGoding/vanilla-datapack",je=[{id:"mcdata_master",hash:"41ed4d11a67e5f4fb97f8fdbf977f30b789658b4",url:Me},{id:"vanilla_datapack_summary",hash:"8a2f8022eb88840e6871ff6a72f63d6e64afc323",url:Ae}];async function Le(e,t,n){const o=j.versions.find((t=>t.id===e));o?(console.debug(`[fetchData] ${JSON.stringify(o)}`),o.dynamic&&await Promise.all(je.filter((e=>localStorage.getItem(`cached_${e.id}`)!==e.hash)).map((async e=>{console.debug(`[deleteMatching] ${e.id} '${localStorage.getItem(`cached_${e.id}`)}' < '${e.hash}' ${e.url}/${o.refs[e.id]}`),await async function(e){try{const t=await caches.open("misode-v1");console.debug("[deleteMatching] Opened cache misode-v1");const n=[];for(const o of await t.keys())e(o.url)&&n.push(t.delete(o));console.debug(`[deleteMatching] Removing ${n.length} cache objects...`),await Promise.all(n)}catch(t){console.warn(`[deleteMatching] Failed to open cache misode-v1: ${t.message}`)}}((t=>t.startsWith(`${e.url}/${o.refs[e.id]}`))),console.debug(`[deleteMatching] Done! ${e.id} ${e.hash} '${localStorage.getItem(`cached_${e.id}`)}'`),localStorage.setItem(`cached_${e.id}`,e.hash),console.debug(`[deleteMatching] Set! ${e.id} ${e.hash} '${localStorage.getItem(`cached_${e.id}`)}'`)}))),await Promise.all([Pe(o,t),De(o,n),Ie(o,t)])):console.error(`[fetchData] Unknown version ${o} in ${JSON.stringify(j.versions)}`)}async function Pe(e,t){console.debug(`[fetchRegistries] ${e.id}`);const n=j.registries.filter((e=>!e.dynamic)).filter((t=>He(e.id,t.minVersion,t.maxVersion)));if(He(e.id,void 0,"1.15")){const r=`${Me}/${e.refs.mcdata_master}/generated/reports/registries.json`;try{const e=await Oe(r,(e=>{const t={};return Object.keys(e).forEach((n=>{t[n.slice(10)]=Object.keys(e[n].entries)})),t}));n.forEach((n=>{var o;t.register(n.id,null!=(o=e[n.id])?o:[])}))}catch(o){console.warn("Error occurred while fetching registries:",o)}}else await Promise.all(n.map((async n=>{try{const o=n.path?`${Me}/${e.refs.mcdata_master}/${n.path}/data.min.json`:`${Me}/${e.refs.mcdata_master}/processed/reports/registries/${n.id}/data.min.json`;t.register(n.id,await Oe(o,(e=>e.values)))}catch(o){console.warn(`Error occurred while fetching registry ${n.id}:`,o)}})))}async function De(e,t){if(console.debug(`[fetchBlockStateMap] ${e.id}`),He(e.id,void 0,"1.16")){const o=He(e.id,void 0,"1.15")?`${Me}/${e.refs.mcdata_master}/generated/reports/blocks.json`:`${Me}/${e.refs.mcdata_master}/processed/reports/blocks/data.min.json`;try{const e=await Oe(o,(e=>{const t={};return Object.keys(e).forEach((n=>{t[n]={properties:e[n].properties,default:e[n].states.find((e=>e.default)).properties}})),t}));Object.assign(t,e)}catch(n){console.warn("Error occurred while fetching block state map:",n)}}else{const o=`${Me}/${e.refs.mcdata_master}/processed/reports/blocks/simplified/data.min.json`;try{const e=await Oe(o);Object.assign(t,e)}catch(n){console.warn("Error occurred while fetching block state map:",n)}}}async function Ie(e,t){console.debug(`[fetchDynamicRegistries] ${e.id}`);const n=j.registries.filter((e=>e.dynamic)).filter((t=>He(e.id,t.minVersion,t.maxVersion)));if(He(e.id,"1.16")){const r=`${Ae}/${e.refs.vanilla_datapack_summary}/summary/flattened.min.json`;try{const e=await Oe(r);n.forEach((n=>{t.register(n.id,e[n.id])}))}catch(o){console.warn("Error occurred while fetching dynamic registries:",o)}}}async function Oe(e,t=(e=>e)){try{const n=await caches.open("misode-v1");console.debug(`[getData] Opened cache misode-v1 ${e}`);const o=await n.match(e);if(o&&o.ok)return console.debug(`[getData] Retrieving cached data ${e}`),await o.json();console.debug(`[getData] fetching data ${e}`);const r=await fetch(e),i=t(await r.json());return await n.put(e,new Response(JSON.stringify(i))),i}catch(n){console.warn(`[getData] Failed to open cache misode-v1: ${n.message}`),console.debug(`[getData] fetching data ${e}`);const o=await fetch(e);return t(await o.json())}}const Se=["1.15","1.16","1.17"],Ne={},Te={},Be={1.15:_,1.16:w,1.17:y};async function Re(e){return Ne[e]||(Ne[e]=(async()=>{try{const t=Be[e].getCollections(),n={};await Le(e,t,n);const o=Be[e].getSchemas(t);return Ne[e]={collections:t,schemas:o,blockStates:n},Ne[e]}catch(t){throw new Error(`Cannot get version "${e}": ${t.message}`)}})()),Ne[e]}function He(e,t,n){const o=j.versions.findIndex((t=>t.id===e)),r=t?j.versions.findIndex((e=>e.id===t)):0,i=n?j.versions.findIndex((e=>e.id===n)):j.versions.length-1;return r<=o&&o<=i}var Fe,We;(We=Fe||(Fe={})).ID_LANGUAGE="language",We.ID_THEME="theme",We.ID_VERSION="schema_version",We.ID_INDENT="indentation",We.getLanguage=function(){var e;return null!=(e=localStorage.getItem(We.ID_LANGUAGE))?e:"en"},We.getTheme=function(){var e;return null!=(e=localStorage.getItem(We.ID_THEME))?e:"dark"},We.getVersion=function(){const e=localStorage.getItem(We.ID_VERSION);return e&&Se.includes(e)?e:"1.17"},We.getIndent=function(){var e;return null!=(e=localStorage.getItem(We.ID_INDENT))?e:"2_spaces"},We.setLanguage=function(e){e&&localStorage.setItem(We.ID_LANGUAGE,e)},We.setTheme=function(e){e&&localStorage.setItem(We.ID_THEME,e)},We.setVersion=function(e){e&&localStorage.setItem(We.ID_VERSION,e)},We.setIndent=function(e){e&&localStorage.setItem(We.ID_INDENT,e)};const Ge={"2_spaces":2,"4_spaces":4,tabs:"\t"};function qe({lang:e,name:t,model:n,blockStates:o,doCopy:r,doDownload:i,doImport:a,onError:s}){const l=N.bind(null,e),[m,g]=h(Fe.getIndent()),p=u(null),_=u(null),w=u();c((()=>{w.current=()=>{if(n&&o)try{const e={blockStates:null!=o?o:{}},t=n.schema.hook(Ee,new v.ModelPath(n),n.data,e);p.current.value=JSON.stringify(t,null,Ge[m])+"\n"}catch(e){s(`Error getting JSON output: ${e.message}`),console.error(e),p.current.value=""}}})),ee(n,(()=>{w.current()})),c((()=>{w.current()}),[m]);c((()=>{r&&p.current&&(p.current.select(),document.execCommand("copy"))}),[r]),c((()=>{if(i&&p.current&&_.current){const e=encodeURIComponent(p.current.value);_.current.setAttribute("href",`data:text/json;charset=utf-8,${e}`),_.current.setAttribute("download",`${t}.json`),_.current.click()}}),[i]),c((()=>{a&&p.current&&(p.current.value="",p.current.select())}),[a]);return d(f,null,d("div",{class:"controls"},d(E,{icon:"gear"},Object.entries(Ge).map((([e])=>d(V,{label:l(`indentation.${e}`),active:m===e,onClick:()=>{return t=e,Fe.setIndent(t),void g(t);var t}}))))),d("textarea",{ref:p,class:"source",onChange:()=>{try{const e=JSON.parse(p.current.value);null==n||n.reset(e,!1)}catch(e){}},spellcheck:!1,autocorrect:"off",placeholder:l("source_placeholder")}),d("a",{ref:_,style:"display: none;"}))}function Je({title:e,link:t,icon:n,children:o}){return d("a",{class:"tool-card",href:t},n&&Q[n],d("div",null,d("h3",null,e),o))}class Ye{constructor(){this.registry={}}register(e){const t=R();return this.registry[t]=e,t}on(e,t){return this.register((n=>{n.addEventListener(e,(e=>{t(n),e.stopPropagation()}))}))}onChange(e){return this.on("change",e)}onClick(e){return this.on("click",e)}mounted(e){e.querySelectorAll("[data-id]").forEach((e=>{var t,n;const o=e.getAttribute("data-id");null==(n=(t=this.registry)[o])||n.call(t,e)})),this.registry={}}}const Ue={clippy:'',info:'',issue_opened:'',plus_circle:'',trashcan:''},Ze=["loot_table.type","loot_entry.type","function.function","condition.condition","criterion.trigger","dimension.generator.type","dimension.generator.biome_source.type","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"],Xe=["number_provider.type","score_provider.type","nbt_provider.type","int_provider.type","float_provider.type","height_provider.type"],Ke=["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"],Qe=["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"],et=new v.DataModel(v.MapNode(v.StringNode(),v.StringNode()),{historyMax:0}),tt={base:()=>["","",""],boolean({node:e},t,n,o){const r=o.mounter.onClick((()=>{t.model.set(t,!(!e.optional()||!1!==n)&&void 0)})),i=o.mounter.onClick((()=>{t.model.set(t,!e.optional()||!0!==n||void 0)}));return["",`${H(o.loc("false"))}\n\t\t\t${H(o.loc("true"))}`,""]},choice({choices:e,config:t,switchNode:n},o,r,i){const a=n.activeCase(o,!0),s=(null==t?void 0:t.context)?new v.ModelPath(o.getModel(),new v.Path(o.getArray(),[t.context])):o,l=(null==t?void 0:t.choiceContext)?new v.Path([],[t.choiceContext]):(null==t?void 0:t.context)?new v.Path([],[t.context]):o,[c,d,u]=a.node.hook(this,s,r,i);if(1===e.length)return[c,d,u];return[c,``+d,u]},list({children:e},t,n,o){const r=o.mounter.onClick((()=>{Array.isArray(n)||(n=[]),t.model.set(t,[e.default(),...n])})),i=o.mounter.onClick((()=>{Array.isArray(n)||(n=[]),t.model.set(t,[...n,e.default()])})),a=``;let s="";return Array.isArray(n)&&(s=n.map(((n,r)=>{const i=o.mounter.onClick((()=>t.model.set(t.push(r),void 0))),a=t.push(r).contextPush("entry"),s=e.category(a),[l,c,d]=e.hook(this,a,n,o);return`
\n\t\t\t\t\t
\n\t\t\t\t\t\t${it(o.loc,a,o.mounter)}\n\t\t\t\t\t\t${at(o.loc,a,o.mounter)}\n\t\t\t\t\t\t\n\t\t\t\t\t\t${l}\n\t\t\t\t\t\t\n\t\t\t\t\t\t${c}\n\t\t\t\t\t
\n\t\t\t\t\t${d?`
${d}
`:""}\n\t\t\t\t\t
\n\t\t\t\t
`})).join(""),n.length>2&&(s+=`
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
`)),["",a,s]},map({children:e,keys:t,config:n},o,r,i){var a,s,l,c;const d=new v.ModelPath(et,new v.Path([ot(o.toString())])),u=i.mounter.onClick((()=>{const t=d.get();o.model.set(o.push(t),e.default())})),h="block_state_map"===(null==(a=n.validation)?void 0:a.validator)?null==(s=i.blockStates)?void 0:s[v.relativePath(o,n.validation.params.id).get()]:null,m=((null==h?void 0:h.properties)?v.StringNode(null,{enum:Object.keys(null!=(l=h.properties)?l:{})}):t).hook(this,d,null!=(c=d.get())?c:"",i)[1]+``;if(h&&"Properties"===o.last()){"object"!=typeof r&&(r={});const e=Object.entries(h.properties).map((([e,t])=>[e,v.StringNode(null,{enum:t})]));return Object.entries(h.properties).forEach((([e,t])=>{"string"!=typeof r[e]?o.model.errors.add(o.push(e),"error.expected_string"):t.includes(r[e])||o.model.errors.add(o.push(e),"error.invalid_enum_option",r[e])})),v.ObjectNode(Object.fromEntries(e)).hook(this,o,r,i)}let g="";return"object"==typeof r&&void 0!==r&&(g=Object.keys(r).map((t=>{var n;const a=i.mounter.onClick((()=>o.model.set(o.push(t),void 0))),s=o.modelPush(t),l=e.category(s),c=h?v.StringNode(null,{enum:null!=(n=h.properties[t])?n:[]}):e;(null==h?void 0:h.properties[t])&&!h.properties[t].includes(r[t])&&o.model.errors.add(s,"error.invalid_enum_option",r[t]);const[d,u,m]=c.hook(this,s,r[t],i);return`
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t${it(i.loc,s,i.mounter)}\n\t\t\t\t\t\t\t${at(i.loc,s,i.mounter)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t${d}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t${u}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t${m?`
${m}
`:""}\n\t\t\t\t\t\t
\n\t\t\t\t\t
`})).join("")),["",m,g]},number({integer:e,config:t},n,o,{mounter:r}){var i;const a=r.onChange((o=>{const r=o.value,i=(null==t?void 0:t.color)?parseInt(r.slice(1),16):e?parseInt(r):parseFloat(r);n.model.set(n,i)}));if(null==t?void 0:t.color){return["",``,""]}return["",``,""]},object({node:e,getActiveFields:t,getChildModelPath:n},o,r,i){let a="",s="";e.optional()&&(s=void 0===r?``:``);let l="";if("object"==typeof r&&void 0!==r&&(!e.optional()||void 0!==r)){const e=t(o);l=Object.keys(e).filter((t=>e[t].enabled(o))).map((t=>{const l=e[t],c=n(o,t),d=c.getContext().join(".");if(Xe.includes(d))return"";const u=l.category(c),[h,m,g]=l.hook(this,c,r[t],i);if(0===h.length&&0===m.length&&0===g.length)return"";const p="object"===l.type(c)&&Ke.includes(d),f=Qe.includes(d);return p||f?(a+=`${it(i.loc,c,i.mounter)}${at(i.loc,c,i.mounter)}${h}`,s+=m,p?g:""):`
\n\t\t\t\t\t
\n\t\t\t\t\t\t${it(i.loc,c,i.mounter)}\n\t\t\t\t\t\t${at(i.loc,c,i.mounter)}\n\t\t\t\t\t\t${h}\n\t\t\t\t\t\t\n\t\t\t\t\t\t${m}\n\t\t\t\t\t
\n\t\t\t\t\t${g?`
${g}
`:""}\n\t\t\t\t
`})).join("")}return[a,s,l]},string({node:e,getValues:t,config:n},o,r,i){var a,s;const l=i.mounter.register((e=>{e.value=null!=r?r:"",e.addEventListener("change",(t=>{const n=e.value;o.model.set(o,0===n.length?void 0:n),t.stopPropagation()}))}));let c;const d=t();if(nt(n)&&!n.additional||Ze.includes(o.getContext().join("."))){let t=new v.Path([]);nt(n)&&"string"==typeof n.enum?t=t.contextPush(n.enum):nt(n)||"resource"!==(null==n?void 0:n.validator)||"string"!=typeof n.params.pool||(t=t.contextPush(n.params.pool)),c=``}else if(nt(n)||"block_state_key"!==(null==n?void 0:n.validator)){const e=R();c=`\n\t\t\t\t${0===d.length?"":`\n\t\t\t\t\t\t\t\t${d.map((e=>``}`}else{const e=null==(a=i.blockStates)?void 0:a[v.relativePath(o,n.params.id).get()];c=``}return["",c,""]}};function nt(e){return!!(null==e?void 0:e.enum)}function ot(e){var t,n=0;for(t=0;t`
{e.getElementsByTagName("span")[0].classList.remove("show")}),{capture:!0,once:!0})}))}">\n\t\t${Ue[t]}\n\t\t${n}\n\t
`,lt=(e,t,n)=>`data-id="${n.register((n=>{const o=()=>{var o;const r=document.createElement("div");r.classList.add("node-menu");const i=e(t.contextPush("help").getContext().join("."));i.endsWith(".help")||r.insertAdjacentHTML("beforeend",`${i}`);const a=t.getContext().join(".");r.insertAdjacentHTML("beforeend",`\n\t\t\t\t`),null==(o=r.querySelector(".menu-item .btn"))||o.addEventListener("click",(()=>{const e=document.createElement("input");e.value=a,n.appendChild(e),e.select(),document.execCommand("copy"),n.removeChild(e)})),n.appendChild(r),document.body.addEventListener("click",(()=>{try{n.removeChild(r)}catch(e){}}),{capture:!0,once:!0}),document.body.addEventListener("contextmenu",(()=>{try{n.removeChild(r)}catch(e){}}),{capture:!0,once:!0})};n.addEventListener("contextmenu",(e=>{o(),e.preventDefault()}));let r=null;n.addEventListener("touchstart",(()=>{r=setTimeout((()=>{o(),r=null}),800)})),n.addEventListener("touchend",(()=>{r&&(clearTimeout(r),r=null)}))}))}"`;function ct({lang:e,model:t,version:n,blockStates:o,onError:r}){const i=u(null),a=u();return c((()=>{a.current=()=>{if(t&&o)try{const r=new Ye,a={loc:N.bind(null,e),version:n,mounter:r,blockStates:o},s=new v.ModelPath(t),l=t.schema.hook(tt,s,t.data,a),c=t.schema.category(s),d=t.schema.type(s);let u=l[2];l[1]&&(u=`
\n\t\t\t\t\t\t
${l[0]}${l[1]}
\n\t\t\t\t\t\t
${l[2]}
\n\t\t\t\t\t
`),i.current.innerHTML=u,r.mounted(i.current)}catch(a){r(`Error rendering the tree: ${a.message}`),console.error(a),i.current.innerHTML=""}}})),ee(t,(()=>{a.current()})),c((()=>{a.current()}),[e,t,o]),d("div",{ref:i,class:"tree"})}function dt({lang:e}){const t=N.bind(null,e);return d("main",null,d("div",{class:"settings"},d("p",null,t("settings.fields.description")),d("ul",{class:"field-list"})))}function ut({lang:e,changeTitle:t,version:n,onChangeVersion:o}){var r,i;const a=N.bind(null,e),[u,g]=h([]),p=e=>{g([...u,e])},[_]=b();if(_)return d("main",null,d(A,{error:`Something went wrong rendering the generator: ${_.message}`}));const w=W(m());if(!w)return d("main",null,d(A,{error:"Cannot find generator"}));const y=null!=(r=w.minVersion)?r:"1.15",k=j.versions.filter((e=>He(e.id,y))).map((e=>e.id));t(a("title.generator",a(w.id)),k);const[C,L]=h(null),[P,D]=h(null);c((()=>{L(null),async function(e){return(await Re(e)).blockStates}(n).then((e=>D(e))),async function(e,t){var n;if(!Te[t]||Te[t].version!==e){const r=await Re(e),i=null==(n=j.generators.find((e=>e.id===t)))?void 0:n.schema;if(!i)throw new Error(`Cannot find model ${t}`);try{const n=r.schemas.get(i),o=new v.DataModel(n);Te[t]?o.reset(Te[t].model.data,!1):(o.validate(!0),o.history=[JSON.stringify(o.data)]),Te[t]={model:o,version:e}}catch(o){throw new Error(`Cannot get generator "${t}" for version "${e}": ${o.message}`)}}return Te[t].model}(n,w.id).then((e=>L(e))).catch((e=>{console.error(e),p(e.message)}))}),[n,w.id]);const I=e=>{e.ctrlKey&&"z"===e.key?($.generatorEvent("undo","Hotkey"),null==C||C.undo()):e.ctrlKey&&"y"===e.key&&($.generatorEvent("redo","Hotkey"),null==C||C.redo())};c((()=>(document.addEventListener("keyup",I),()=>{document.removeEventListener("keyup",I)})),[C]);const[O,S]=h(""),[T,B]=h([]);c((()=>{(async function(e){return(await Re(e)).collections})(n).then((e=>{const t=(null!=O?O:"").trim().split(" "),n=e.get(w.id).map((e=>e.slice(10))).filter((e=>t.every((t=>e.includes(t)))));n&&B(n)})).catch((e=>{console.error(e),p(e.message)}))}),[n,w.id,O]);const R=e=>{var t;$.generatorEvent("load-preset",e),async function(e,t,n){console.debug(`[fetchPreset] ${n} ${t} ${n}`);const o=j.versions.find((t=>t.id===e));try{const e=await fetch(`${Ae}/${o.refs.vanilla_datapack_data}/data/minecraft/${t}/${n}.json`);return await e.json()}catch(r){console.warn(`Error occurred while fetching ${t} preset ${n}:`,r)}}(n,null!=(t=w.path)?t:w.id,e).then((e=>{null==C||C.reset(e,!1)}))},[H,F]=h(window.innerWidth>820),[G,q]=h(0),[J,Y]=h(0),[U,Z]=h(0),[X,K]=h(!1),Q=xe.includes(w.id);let ee=1;Q&&(ee+=1),H&&(ee+=2);return d(f,null,d("main",{class:X?"has-preview":""},d(x,{id:"data-pack-generator",type:"text"}),d("div",{class:"controls"},d(V,{icon:"upload",label:a("import"),onClick:()=>{$.generatorEvent("import"),F(!0),Z(U+1)}}),d(E,{icon:"archive",label:a("presets"),relative:!1},d(z,{icon:"search",large:!0,value:O,onChange:S,doSelect:1}),d("div",{class:"result-list"},T.map((e=>d(V,{label:e,onClick:()=>R(e)})))),0===T.length&&d(V,{label:a("no_presets")})),d(E,{icon:"tag",label:n},k.reverse().map((e=>d(V,{label:e,active:e===n,onClick:()=>o(e)})))),d(E,{icon:"kebab_horizontal"},d(V,{icon:"history",label:a("reset"),onClick:()=>{$.generatorEvent("reset"),null==C||C.reset(C.schema.default(),!0)}}),d(V,{icon:"arrow_left",label:a("undo"),onClick:e=>{e.stopPropagation(),$.generatorEvent("undo","Menu"),null==C||C.undo()}}),d(V,{icon:"arrow_right",label:a("redo"),onClick:e=>{e.stopPropagation(),$.generatorEvent("redo","Menu"),null==C||C.redo()}}))),u.map((e=>d(A,{error:e,onDismiss:()=>{return t=e,void g(u.filter((e=>e!==t)));var t}}))),d(ct,l(s({},{lang:e,model:C,version:n,blockStates:P}),{onError:p}))),d("div",{class:"popup-actions",style:`--offset: -${10+50*ee}px;`},d("div",{class:"popup-action action-preview"+(Q?" shown":""),onClick:()=>{$.generatorEvent("toggle-preview",X?"hidden":"visible"),K(!X)}},X?M.x_circle:M.play),d("div",{class:"popup-action action-download"+(H?" shown":""),onClick:()=>{$.generatorEvent("download"),Y(J+1)}},M.download),d("div",{class:"popup-action action-copy"+(H?" shown":""),onClick:()=>{$.generatorEvent("copy"),q(G+1)}},M.clippy),d("div",{class:"popup-action action-code shown",onClick:()=>{$.generatorEvent("toggle-output",H?"hidden":"visible"),F(!H),q(0),Y(0),Z(0)}},H?M.chevron_right:M.code)),d("div",{class:"popup-preview"+(X?" shown":"")},d(ze,l(s({},{lang:e,model:C,version:n,id:w.id}),{shown:X,onError:p}))),d("div",{class:"popup-source"+(H?" shown":"")},d(qe,l(s({},{lang:e,model:C,blockStates:P,doCopy:G,doDownload:J,doImport:U}),{name:null!=(i=w.schema)?i:"data",onError:p}))))}function ht({lang:e,changeTitle:t}){const n=N.bind(null,e);return t(n("title.home")),d("main",null,d("div",{class:"home"},j.generators.filter((e=>!e.category)).map((e=>d(Je,{title:n(e.id),link:F(e.url)}))),d(Je,{title:n("worldgen"),link:"/worldgen/"}),d("hr",null),d(Je,{title:"Report Inspector",icon:"report",link:"https://misode.github.io/report/"},d("p",null,"Analyse your performance reports")),d(Je,{title:"Minecraft Sounds",icon:"sounds",link:"https://misode.github.io/sounds/"},d("p",null,"Browse through and mix all the vanilla sounds")),d(Je,{title:"Data Pack Upgrader",link:"https://misode.github.io/upgrader/"},d("p",null,"Convert your 1.16 data packs to 1.17"))))}function mt({lang:e,changeTitle:t}){const n=N.bind(null,e);return t(n("title.generator_category",n("worldgen"))),d("main",null,d("div",{class:"home"},j.generators.filter((e=>"worldgen"===e.category)).map((e=>d(Je,{title:n(e.id),link:F(e.url)})))))}function gt(){const[e,t]=h("en");c((()=>{(async()=>{const e=Fe.getLanguage();await Promise.all([T("en"),..."en"!==e?[T(e)]:[]]),t(e)})()}),[]);const[n,o]=h(Fe.getTheme());c((()=>{document.documentElement.setAttribute("data-theme",n)}),[n]);const[r,i]=h(Fe.getVersion()),[a,u]=h(N(e,"title.home")),m=(e,t=["1.15","1.16","1.17"])=>{document.title=`${e} Minecraft ${t.join(", ")}`,u(e)};return d(f,null,d(K,s({},{lang:e,title:a,theme:n,language:e,changeLanguage:async e=>{S[e]||await T(e),$.setLanguage(e),Fe.setLanguage(e),t(e)},changeTheme:e=>{$.setTheme(e),Fe.setTheme(e),o(e)}})),d(C,{onChange:e=>{setTimeout((()=>$.pageview(F(e.url))))}},d(ht,s({path:"/"},{lang:e,changeTitle:m})),d(dt,s({path:"/settings/fields"},{lang:e,changeTitle:m})),d(mt,s({path:"/worldgen"},{lang:e,changeTitle:m})),d(ut,l(s({default:!0},{lang:e,version:r,changeTitle:m}),{onChangeVersion:e=>{$.setVersion(e),Fe.setVersion(e),i(e)}}))))}k(d(gt,null),document.body); +//# sourceMappingURL=index.76e80d3e.js.map diff --git a/assets/index.76e80d3e.js.map b/assets/index.76e80d3e.js.map new file mode 100644 index 00000000..3316baa5 --- /dev/null +++ b/assets/index.76e80d3e.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.76e80d3e.js","sources":["../../src/app/Analytics.ts","../../src/app/components/Ad.tsx","../../src/app/components/Btn.tsx","../../src/app/components/BtnInput.tsx","../../src/app/components/BtnMenu.tsx","../../src/app/components/Octicon.tsx","../../src/app/components/ErrorPanel.tsx","../../vite/preload-helper","../../src/app/Locales.ts","../../src/app/Utils.ts","../../src/app/components/Header.tsx","../../src/app/components/Icons.tsx","../../src/app/hooks/useModel.ts","../../src/app/hooks/useOnDrag.ts","../../src/app/previews/noise/ImprovedNoise.ts","../../src/app/previews/noise/PerlinNoise.ts","../../src/app/previews/noise/NormalNoise.ts","../../src/app/previews/BiomeSource.ts","../../src/app/previews/Decorator.ts","../../src/app/previews/noise/NoiseChunkGenerator.ts","../../src/app/previews/NoiseSettings.ts","../../src/app/components/PreviewPanel.tsx","../../src/app/components/previews/BiomeSourcePreview.tsx","../../src/app/hooks/useOnHover.ts","../../src/app/components/previews/NoiseSettingsPreview.tsx","../../src/app/components/previews/DecoratorPreview.tsx","../../src/app/schema/transformOutput.ts","../../src/app/DataFetcher.ts","../../src/app/Schemas.ts","../../src/app/Store.ts","../../src/app/components/SourcePanel.tsx","../../src/app/components/ToolCard.tsx","../../src/app/schema/Mounter.ts","../../src/app/schema/Octicon.ts","../../src/app/schema/renderHtml.ts","../../src/app/components/Tree.tsx","../../src/app/pages/FieldSettings.tsx","../../src/app/pages/Generator.tsx","../../src/app/pages/Home.tsx","../../src/app/pages/Worldgen.tsx","../../src/app/Main.tsx"],"sourcesContent":["export namespace Analytics {\n\tconst ID_SITE = 'Site'\n\tconst ID_GENERATOR = 'Generator'\n\n\tconst DIM_THEME = 1\n\tconst DIM_VERSION = 3\n\tconst DIM_LANGUAGE = 4\n\tconst DIM_PREVIEW = 5\n\n\tfunction event(category: string, action: string, label?: string) {\n\t\tga('send', 'event', category, action, label)\n\t}\n\n\tfunction dimension(index: number, value: string) {\n\t\tga('set', `dimension${index}`, value)\n\t}\n\n\texport function pageview(page: string) {\n\t\tga('set', 'page', page)\n\t\tga('send', 'pageview')\n\t}\n\n\texport function setLanguage(language: string) {\n\t\tdimension(DIM_LANGUAGE, language)\n\t\tevent(ID_SITE, 'set-language', language)\n\t}\n\n\texport function setTheme(theme: string) {\n\t\tdimension(DIM_THEME, theme)\n\t\tevent(ID_SITE, 'set-theme', theme)\n\t}\n\n\texport function setVersion(version: string) {\n\t\tdimension(DIM_VERSION, version)\n\t\tevent(ID_GENERATOR, 'set-version', version)\n\t}\n\n\texport function setPreview(preview: string) {\n\t\tdimension(DIM_PREVIEW, preview)\n\t\tevent(ID_GENERATOR, 'set-preview', preview)\n\t}\n\n\texport function generatorEvent(action: string, label?: string) {\n\t\tevent(ID_GENERATOR, action, label)\n\t}\n}\n","import { useEffect } from 'preact/hooks'\n\ndeclare const ethicalads: any\n\ntype AdProps = {\n\ttype: 'text' | 'image',\n\tid: string,\n}\nexport function Ad({ type, id }: AdProps) {\n\tuseEffect(() => {\n\t\tdocument.getElementById('ad-placeholder')?.remove()\n\t\tif ('ethicalads' in window) {\n\t\t\tethicalads.load()\n\t\t}\n\t}, [])\n\n\treturn
\n}\n","import { Octicon } from '.'\n\ntype BtnProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\tactive?: boolean,\n\tclass?: string,\n\tonClick?: (event: MouseEvent) => unknown,\n}\nexport function Btn({ icon, label, active, class: class_, onClick }: BtnProps) {\n\treturn
\n\t\t{icon && Octicon[icon]}\n\t\t{label && {label}}\n\t
\n}\n","import { useEffect, useRef } from 'preact/hooks'\nimport { Octicon } from '.'\n\ntype BtnInputProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\tlarge?: boolean,\n\ttype?: 'number' | 'text',\n\tdoSelect?: number,\n\tvalue?: string,\n\tonChange?: (value: string) => unknown,\n}\nexport function BtnInput({ icon, label, large, type, doSelect, value, onChange }: BtnInputProps) {\n\tconst onKeyUp = onChange === undefined ? () => {} : (e: any) => {\n\t\tconst value = (e.target as HTMLInputElement).value\n\t\tif (type !== 'number' || (!value.endsWith('.') && !isNaN(Number(value)))) {\n\t\t\tonChange?.(value)\n\t\t}\n\t}\n\n\tconst ref = useRef(null)\n\tuseEffect(() => {\n\t\tif (doSelect && ref.current) {\n\t\t\tref.current.select()\n\t\t}\n\t}, [doSelect])\n\n\treturn
e.stopPropagation()}>\n\t\t{icon && Octicon[icon]}\n\t\t{label && {label}}\n\t\t\n\t
\n}\n","import type { ComponentChildren } from 'preact'\nimport { useEffect, useState } from 'preact/hooks'\nimport type { Octicon } from '.'\nimport { Btn } from '.'\n\ntype BtnMenuProps = {\n\ticon?: keyof typeof Octicon,\n\tlabel?: string,\n\trelative?: boolean,\n\tchildren: ComponentChildren,\n}\nexport function BtnMenu({ icon, label, relative, children }: BtnMenuProps) {\n\tconst [active, setActive] = useState(false)\n\n\tconst hider = () => {\n\t\tsetActive(false)\n\t}\n\n\tuseEffect(() => {\n\t\tif (active) {\n\t\t\tdocument.body.addEventListener('click', hider)\n\t\t}\n\t\treturn () => {\n\t\t\tdocument.body.removeEventListener('click', hider)\n\t\t}\n\t}, [active])\n\n\treturn
\n\t\t setActive(true)} />\n\t\t{active &&
\n\t\t\t{children}\n\t\t
}\n\t
\n}\n","export const Octicon = {\n\tarchive: ,\n\tarrow_left: ,\n\tarrow_right: ,\n\tchevron_right: ,\n\tclippy: ,\n\tcode: ,\n\tdash: ,\n\tdevice_desktop: ,\n\tdownload: ,\n\teye: ,\n\teye_closed: ,\n\tgear: ,\n\tglobe: ,\n\thistory: ,\n\tkebab_horizontal: ,\n\tlink: ,\n\tmark_github: ,\n\tmoon: ,\n\tplay: ,\n\tplus: ,\n\tsearch: ,\n\tsun: ,\n\tsync: ,\n\ttag: ,\n\tthree_bars: ,\n\tunfold: ,\n\tupload: ,\n\tx: ,\n\tx_circle: ,\n}\n","import { Octicon } from './Octicon'\n\ntype ErrorPanelProps = {\n\terror: string,\n\tonDismiss?: () => unknown,\n}\nexport function ErrorPanel({ error, onDismiss }: ErrorPanelProps) {\n\treturn
\n\t\t{onDismiss &&
{Octicon.x}
}\n\t\t

{error}

\n\t\t

You can report this as a bug on GitHub

\n\t
\n}\n","let scriptRel;const seen = {};export const __vitePreload = function preload(baseModule, deps) {\n // @ts-ignore\n if (!__VITE_IS_MODERN__ || !deps) {\n return baseModule();\n }\n // @ts-ignore\n if (scriptRel === undefined) {\n // @ts-ignore\n const relList = document.createElement('link').relList;\n // @ts-ignore\n scriptRel =\n relList && relList.supports && relList.supports('modulepreload')\n ? 'modulepreload'\n : 'preload';\n }\n return Promise.all(deps.map((dep) => {\n // @ts-ignore\n if (dep in seen)\n return;\n // @ts-ignore\n seen[dep] = true;\n const isCss = dep.endsWith('.css');\n const cssSelector = isCss ? '[rel=\"stylesheet\"]' : '';\n // @ts-ignore check if the file is already preloaded by SSR markup\n if (document.querySelector(`link[href=\"${dep}\"]${cssSelector}`)) {\n return;\n }\n // @ts-ignore\n const link = document.createElement('link');\n // @ts-ignore\n link.rel = isCss ? 'stylesheet' : scriptRel;\n if (!isCss) {\n link.as = 'script';\n link.crossOrigin = '';\n }\n link.href = dep;\n // @ts-ignore\n document.head.appendChild(link);\n if (isCss) {\n return new Promise((res, rej) => {\n link.addEventListener('load', res);\n link.addEventListener('error', rej);\n });\n }\n })).then(() => baseModule());\n}","import config from '../config.json'\nimport English from '../locales/en.json'\n\nexport type Localize = (key: string, ...params: string[]) => string\n\ninterface Locale {\n\t[key: string]: string\n}\n\nexport const Locales: {\n\t[key: string]: Locale,\n} = {\n\tfallback: English,\n}\n\nfunction resolveLocaleParams(value: string, params?: string[]): string {\n\treturn value.replace(/%\\d+%/g, match => {\n\t\tconst index = parseInt(match.slice(1, -1))\n\t\treturn params?.[index] !== undefined ? params[index] : match\n\t})\n}\n\nexport function locale(language: string, key: string, ...params: string[]): string {\n\tconst value: string | undefined = Locales[language]?.[key]\n\t\t?? Locales.en?.[key] ?? Locales.fallback[key] ?? key\n\treturn resolveLocaleParams(value, params)\n}\n\nexport async function loadLocale(language: string) {\n\tconst langConfig = config.languages.find(lang => lang.code === language)\n\tif (!langConfig) return\n\tconst data = await import(`../locales/${language}.json`)\n\tconst schema = langConfig.schemas !== false\n\t\t&& await import(`../../node_modules/@mcschema/locales/src/${language}.json`)\n\tLocales[language] = { ...data.default, ...schema.default }\n}\n","import config from '../config.json'\n\nexport function isPromise(obj: any): obj is Promise {\n\treturn typeof (obj as any)?.then === 'function' \n}\n\nconst dec2hex = (dec: number) => ('0' + dec.toString(16)).substr(-2)\n\nexport function hexId(length = 12) {\n\tvar arr = new Uint8Array(length / 2)\n\twindow.crypto.getRandomValues(arr)\n\treturn Array.from(arr, dec2hex).join('')\n}\n\nexport function htmlEncode(str: string) {\n\treturn str.replace(/&/g, '&').replace(//g, '>')\n\t\t.replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/')\n}\n\nexport function hashString(s: string) {\n\tlet h = 0\n\tfor(let i = 0; i < s.length; i++)\n\t\th = Math.imul(31, h) + s.charCodeAt(i) | 0\n\treturn h\n}\n\nexport function cleanUrl(url: string) {\n\treturn `/${url}/`.replaceAll('//', '/')\n}\n\nexport function getGenerator(url: string) {\n\tconst trimmedUrl = url.replace(/^\\//, '').replace(/\\/$/, '')\n\treturn config.generators.find(g => g.url === trimmedUrl)\n}\n\nexport function stringToColor(str: string): [number, number, number] {\n\tconst h = Math.abs(hashString(str))\n\treturn [h % 256, (h >> 8) % 256, (h >> 16) % 256]\n}\n\nexport function clamp(a: number, b: number, c: number) {\n\treturn Math.max(a, Math.min(b, c))\n}\n\nexport function clampedLerp(a: number, b: number, c: number): number {\n\tif (c < 0) {\n\t\treturn a\n\t} else if (c > 1) {\n\t\treturn b\n\t} else {\n\t\treturn lerp(c, a, b)\n\t}\n}\n\nexport function lerp(a: number, b: number, c: number): number {\n\treturn b + a * (c - b)\n}\n\nexport function lerp2(a: number, b: number, c: number, d: number, e: number, f: number): number {\n\treturn lerp(b, lerp(a, c, d), lerp(a, e, f))\n}\n\nexport function lerp3(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) {\n\treturn lerp(c, lerp2(a, b, d, e, f, g), lerp2(a, b, h, i, j, k))\n}\n\nexport function smoothstep(x: number): number {\n\treturn x * x * x * (x * (x * 6 - 15) + 10)\n}\n","import { getCurrentUrl, Link } from 'preact-router'\nimport { Btn, BtnMenu, Icons, Octicon } from '.'\nimport config from '../../config.json'\nimport { locale } from '../Locales'\nimport { cleanUrl, getGenerator } from '../Utils'\n\nconst Themes: Record = {\n\tsystem: 'device_desktop',\n\tdark: 'moon',\n\tlight: 'sun',\n}\n\ntype HeaderProps = {\n\tlang: string,\n\ttitle: string,\n\ttheme: string,\n\tchangeTheme: (theme: string) => unknown,\n\tlanguage: string,\n\tchangeLanguage: (language: string) => unknown,\n}\nexport function Header({ lang, title, theme, changeTheme, language, changeLanguage }: HeaderProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst category = getGenerator(getCurrentUrl())?.category\n\n\treturn
\n\t\t
\n\t\t\t\n\t\t\t\t{Icons.home}\n\t\t\t\n\t\t\t

{title}

\n\t\t
\n\t\t\n\t
\n}\n","export const Icons = {\n\thome: ,\n\treport: ,\n\tsounds: ,\n}\n","import type { DataModel } from '@mcschema/core'\nimport { useEffect } from 'preact/hooks'\n\nexport function useModel(model: DataModel | undefined | null, invalidated: (model: DataModel) => unknown) {\n\tconst listener = {\n\t\tinvalidated() {\n\t\t\tif (model) {\n\t\t\t\tinvalidated(model)\n\t\t\t}\n\t\t},\n\t}\n\n\tuseEffect(() => {\n\t\tmodel?.addListener(listener)\n\t\tlistener.invalidated()\n\t\treturn () => {\n\t\t\tmodel?.removeListener(listener)\n\t\t}\n\t}, [model])\n}\n","import { useEffect, useRef } from 'preact/hooks'\n\nexport function useOnDrag(element: HTMLElement, drag: (dx: number, dy: number) => unknown) {\n\tif (!element) return\n\n\tconst request = useRef()\n\tconst dragStart = useRef<[number, number] | undefined>()\n\tconst pending = useRef<[number, number]>([0, 0])\n\n\tuseEffect(() => {\n\t\tconst onMouseDown = (e: MouseEvent) => {\n\t\t\tdragStart.current = [e.offsetX, e.offsetY]\n\t\t}\n\t\tconst onMouseMove = (e: MouseEvent) => {\n\t\t\tif (dragStart.current === undefined) return\n\t\t\tconst dx = e.offsetX - dragStart.current[0]\n\t\t\tconst dy = e.offsetY - dragStart.current[1]\n\t\t\tif (!(dx === 0 && dy === 0)) {\n\t\t\t\tcancelAnimationFrame(request.current)\n\t\t\t\tpending.current = [pending.current[0] + dx, pending.current[1] + dy]\n\t\t\t\trequest.current = requestAnimationFrame(() => {\n\t\t\t\t\tdrag(...pending.current)\n\t\t\t\t\tpending.current = [0, 0]\n\t\t\t\t})\n\t\t\t}\n\t\t\tdragStart.current = [e.offsetX, e.offsetY]\n\t\t}\n\t\tconst onMouseUp = (_e: MouseEvent) => {\n\t\t\tdragStart.current = undefined\n\t\t}\n\n\t\telement.addEventListener('mousedown', onMouseDown)\n\t\telement.addEventListener('mousemove', onMouseMove)\n\t\tdocument.body.addEventListener('mouseup', onMouseUp)\n\t\treturn () => {\n\t\t\telement.removeEventListener('mousedown', onMouseDown)\n\t\t\telement.removeEventListener('mousemove', onMouseMove)\n\t\t\tdocument.body.removeEventListener('mouseup', onMouseUp)\n\t\t}\n\t}, [element])\n}\n","import type seedrandom from 'seedrandom'\nimport { lerp3, smoothstep } from '../../Utils'\n\nexport class ImprovedNoise {\n\tprivate static readonly 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]]\n\tprivate readonly p: number[]\n\tpublic readonly xo: number\n\tpublic readonly yo: number\n\tpublic readonly zo: number\n\n\tconstructor(random: seedrandom.prng) {\n\t\tthis.xo = random() * 256\n\t\tthis.yo = random() * 256\n\t\tthis.zo = random() * 256\n\t\tthis.p = Array(256)\n\n\t\tfor (let i = 0; i < 256; i += 1) {\n\t\t\tthis.p[i] = i\n\t\t}\n\t\tfor (let i = 0; i < 256; i += 1) {\n\t\t\tconst n = random.int32() % (256 - i)\n\t\t\tconst b = this.p[i]\n\t\t\tthis.p[i] = this.p[i + n]\n\t\t\tthis.p[i + n] = b\n\t\t}\n\t}\n\n\tpublic noise(x: number, y: number, z: number, a: number, b: number) {\n\t\tconst x2 = x + this.xo\n\t\tconst y2 = y + this.yo\n\t\tconst z2 = z + this.zo\n\t\tconst x3 = Math.floor(x2)\n\t\tconst y3 = Math.floor(y2)\n\t\tconst z3 = Math.floor(z2)\n\t\tconst x4 = x2 - x3\n\t\tconst y4 = y2 - y3\n\t\tconst z4 = z2 - z3\n\t\tconst x5 = smoothstep(x4)\n\t\tconst y5 = smoothstep(y4)\n\t\tconst z5 = smoothstep(z4)\n\n\t\tlet y6 = 0\n\t\tif (a !== 0) {\n\t\t\ty6 = Math.floor(Math.min(b, y4) / a) * a\n\t\t}\n\n\t\treturn this.sampleAndLerp(x3, y3, z3, x4, y4 - y6, z4, x5, y5, z5)\n\t}\n\n\tprivate gradDot(a: number, b: number, c: number, d: number) {\n\t\tconst grad = ImprovedNoise.GRADIENT[a & 15]\n\t\treturn grad[0] * b + grad[1] * c + grad[2] * d\n\t}\n\n\tprivate P(i: number) {\n\t\treturn this.p[i & 255] & 255\n\t}\n\n\tpublic sampleAndLerp(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) {\n\t\tconst j = this.P(a) + b\n\t\tconst k = this.P(j) + c\n\t\tconst l = this.P(j + 1) + c\n\t\tconst m = this.P(a + 1) + b\n\t\tconst n = this.P(m) + c\n\t\tconst o = this.P(m + 1) + c\n\n\t\tconst p = this.gradDot(this.P(k), d, e, f)\n\t\tconst q = this.gradDot(this.P(n), d - 1, e, f)\n\t\tconst r = this.gradDot(this.P(l), d, e - 1, f)\n\t\tconst s = this.gradDot(this.P(o), d - 1, e - 1, f)\n \n\t\tconst t = this.gradDot(this.P(k + 1), d, e, f - 1)\n\t\tconst u = this.gradDot(this.P(n + 1), d - 1, e, f - 1)\n\t\tconst v = this.gradDot(this.P(l + 1), d, e - 1, f - 1)\n\t\tconst w = this.gradDot(this.P(o + 1), d - 1, e - 1, f - 1)\n\n\t\treturn lerp3(g, h, i, p, q, r, s, t, u, v, w)\n\t}\n}\n","import seedrandom from 'seedrandom'\nimport { ImprovedNoise } from './ImprovedNoise'\n\nexport class PerlinNoise {\n\tprivate readonly noiseLevels: ImprovedNoise[]\n\tprivate readonly amplitudes: number[]\n\tprivate readonly lowestFreqValueFactor: number\n\tprivate readonly lowestFreqInputFactor: number\n\n\tconstructor(seed: string, firstOctave: number, amplitudes: number[]) {\n\t\tthis.amplitudes = amplitudes\n\n\t\tthis.noiseLevels = Array(this.amplitudes.length)\n\t\tfor (let i = 0; i < this.amplitudes.length; i += 1) {\n\t\t\tthis.noiseLevels[i] = new ImprovedNoise(seedrandom(seed))\n\t\t}\n \n\t\tthis.lowestFreqInputFactor = Math.pow(2, firstOctave)\n\t\tthis.lowestFreqValueFactor = Math.pow(2, (amplitudes.length - 1)) / (Math.pow(2, amplitudes.length) - 1)\n\t}\n\n\tpublic static fromRange(seed: string, min: number, max: number) {\n\t\treturn new PerlinNoise(seed, min, Array(max - min + 1).fill(1))\n\t}\n\n\tpublic getValue(x: number, y: number, z: number, a = 0, b = 0, fixY = false) {\n\t\tlet value = 0\n\t\tlet inputF = this.lowestFreqInputFactor\n\t\tlet valueF = this.lowestFreqValueFactor\n\t\tfor (let i = 0; i < this.noiseLevels.length; i += 1) {\n\t\t\tconst noise = this.noiseLevels[i]\n\t\t\tif (noise) {\n\t\t\t\tvalue += this.amplitudes[i] * noise.noise(\n\t\t\t\t\tPerlinNoise.wrap(x * inputF),\n\t\t\t\t\tfixY ? -noise.yo : PerlinNoise.wrap(y * inputF),\n\t\t\t\t\tPerlinNoise.wrap(z * inputF),\n\t\t\t\t\ta * inputF,\n\t\t\t\t\tb * inputF\n\t\t\t\t) * valueF\n\t\t\t}\n\t\t\tinputF *= 2\n\t\t\tvalueF /= 2\n\t\t}\n\t\treturn value\n\t}\n\n\tpublic getOctaveNoise(i: number) {\n\t\treturn this.noiseLevels[this.noiseLevels.length - 1 - i]\n\t}\n\n\tpublic static wrap(value: number) {\n\t\treturn value - Math.floor(value / 3.3554432E7 + 0.5) * 3.3554432E7\n\t}\n}\n","import { PerlinNoise } from './PerlinNoise'\n\nexport class NormalNoise {\n\tprivate readonly valueFactor: number\n\tprivate readonly first: PerlinNoise\n\tprivate readonly second: PerlinNoise\n\n\tconstructor(seed: string, firstOctave: number, amplitudes: number[]) {\n\t\tthis.first = new PerlinNoise(seed, firstOctave, amplitudes)\n\t\tthis.second = new PerlinNoise(seed + 'a', firstOctave, amplitudes)\n\n\t\tlet min = +Infinity\n\t\tlet max = -Infinity\n\t\tfor (let i = 0; i < amplitudes.length; i += 1) {\n\t\t\tif (amplitudes[i] !== 0) {\n\t\t\t\tmin = Math.min(min, i)\n\t\t\t\tmax = Math.max(max, i)\n\t\t\t}\n\t\t}\n\n\t\tconst expectedDeviation = 0.1 * (1 + 1 / (max - min + 1))\n\t\tthis.valueFactor = (1/6) / expectedDeviation\n\t}\n\n\tgetValue(x: number, y: number, z: number) {\n\t\tconst x2 = x * 1.0181268882175227\n\t\tconst y2 = y * 1.0181268882175227\n\t\tconst z2 = z * 1.0181268882175227\n\t\treturn (this.first.getValue(x, y, z) + this.second.getValue(x2, y2, z2)) * this.valueFactor\n\t}\n}\n","import { stringToColor } from '../Utils'\nimport { NormalNoise } from './noise/NormalNoise'\n\nexport type BiomeColors =Record\nexport type BiomeSourceOptions = {\n\tbiomeColors: BiomeColors,\n\toffset: [number, number],\n\tscale: number,\n\tres: number,\n\tseed: string,\n}\n\nexport const NoiseMaps = ['altitude', 'temperature', 'humidity', 'weirdness']\n\nexport function biomeSource(state: any, img: ImageData, options: BiomeSourceOptions) {\n\tswitch (state?.type?.replace(/^minecraft:/, '')) {\n\t\tcase 'multi_noise': return multiNoise(state, img, options)\n\t\tcase 'fixed': return fixed(state, img, options)\n\t\tcase 'checkerboard': return checkerboard(state, img, options)\n\t}\n}\n\nfunction fixed(state: any, img: ImageData, options: BiomeSourceOptions) {\n\tconst data = img.data\n\tconst color = getBiomeColor(state.biome, options.biomeColors)\n\tconst row = img.width * 4 / options.res\n\tconst col = 4 / options.res\n\tfor (let x = 0; x < 200; x += options.res) {\n\t\tfor (let y = 0; y < 200; y += options.res) {\n\t\t\tconst i = y * row + x * col\n\t\t\tdata[i] = color[0]\n\t\t\tdata[i + 1] = color[1]\n\t\t\tdata[i + 2] = color[2]\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nfunction checkerboard(state: any, img: ImageData, options: BiomeSourceOptions) {\n\tconst biomeColorCache: BiomeColors = {}\n\tstate.biomes?.forEach((b: string) => {\n\t\tbiomeColorCache[b] = getBiomeColor(b, options.biomeColors)\n\t})\n\n\tconst data = img.data\n\tconst ox = -options.offset[0] - 100 + options.res / 2\n\tconst oy = -options.offset[1] - 100 + options.res / 2\n\tconst row = img.width * 4 / options.res\n\tconst col = 4 / options.res\n\tconst shift = (state.scale ?? 2) + 2\n\tconst numBiomes = state.biomes?.length ?? 0\n\tfor (let x = 0; x < 200; x += options.res) {\n\t\tfor (let y = 0; y < 200; y += options.res) {\n\t\t\tconst i = y * row + x * col\n\t\t\tconst xx = (x + ox) * options.scale\n\t\t\tconst yy = (y + oy) * options.scale\n\t\t\tconst j = (((xx >> shift) + (yy >> shift)) % numBiomes + numBiomes) % numBiomes\n\t\t\tconst b = state.biomes?.[j]\n\t\t\tconst color = biomeColorCache[b] ?? [128, 128, 128]\n\t\t\tdata[i] = color[0]\n\t\t\tdata[i + 1] = color[1]\n\t\t\tdata[i + 2] = color[2]\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nfunction multiNoise(state: any, img: ImageData, options: BiomeSourceOptions) {\n\tconst noise = NoiseMaps.map((id, i) => {\n\t\tconst config = state[`${id}_noise`]\n\t\treturn new NormalNoise(options.seed + i, config.firstOctave, config.amplitudes)\n\t})\n\n\tconst biomeColorCache: BiomeColors = {}\n\tstate.biomes.forEach((b: any) => {\n\t\tbiomeColorCache[b.biome] = getBiomeColor(b.biome, options.biomeColors)\n\t})\n\n\tconst data = img.data\n\tconst ox = -options.offset[0] - 100 + options.res / 2\n\tconst oy = -options.offset[1] - 100 + options.res / 2\n\tconst row = img.width * 4 / options.res\n\tconst col = 4 / options.res\n\tfor (let x = 0; x < 200; x += options.res) {\n\t\tfor (let y = 0; y < 200; y += options.res) {\n\t\t\tconst i = y * row + x * col\n\t\t\tconst xx = (x + ox) * options.scale\n\t\t\tconst yy = (y + oy) * options.scale\n\t\t\tconst b = closestBiome(noise, state.biomes, xx, yy)\n\t\t\tconst color = biomeColorCache[b] ?? [128, 128, 128]\n\t\t\tdata[i] = color[0]\n\t\t\tdata[i + 1] = color[1]\n\t\t\tdata[i + 2] = color[2]\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nexport function getBiome(state: any, x: number, y: number, options: BiomeSourceOptions): string | undefined {\n\tconst [xx, yy] = toWorld([x, y], options)\n\tswitch (state?.type?.replace(/^minecraft:/, '')) {\n\t\tcase 'multi_noise':\n\t\t\tconst noise = NoiseMaps.map((id, i) => {\n\t\t\t\tconst config = state[`${id}_noise`]\n\t\t\t\treturn new NormalNoise(options.seed + i, config.firstOctave, config.amplitudes)\n\t\t\t})\n\t\t\treturn closestBiome(noise, state.biomes, xx, yy)\n\t\tcase 'fixed': return state.biome\n\t\tcase 'checkerboard':\n\t\t\tconst shift = (state.scale ?? 2) + 2\n\t\t\tconst numBiomes = state.biomes?.length ?? 0\n\t\t\tconst j = (((xx >> shift) + (yy >> shift)) % numBiomes + numBiomes) % numBiomes\n\t\t\treturn state.biomes?.[j]\n\t}\n\treturn undefined\n}\n\nexport function getBiomeColor(biome: string, biomeColors: BiomeColors) {\n\tif (!biome) {\n\t\treturn [128, 128, 128]\n\t}\n\tconst color = biomeColors[biome] ?? VanillaColors[biome]\n\tif (color === undefined) {\n\t\treturn stringToColor(biome)\n\t}\n\treturn color\n}\n\nfunction toWorld([x, y]: [number, number], options: BiomeSourceOptions) {\n\tconst xx = (x - options.offset[0] - 100 + options.res / 2) * options.scale\n\tconst yy = (y - options.offset[1] - 100 + options.res / 2) * options.scale\n\treturn [xx, yy]\n}\n\nfunction closestBiome(noise: NormalNoise[], biomes: any[], x: number, y: number): string {\n\tif (!Array.isArray(biomes) || biomes.length === 0) return ''\n\tconst n = noise.map(n => n.getValue(x, y, 0))\n\tlet minDist = Infinity\n\tlet minBiome = ''\n\tfor (const b of biomes) {\n\t\tconst dist = fitness(b.parameters, {altitude: n[0], temperature: n[1], humidity: n[2], weirdness: n[3], offset: 0})\n\t\tif (dist < minDist) {\n\t\t\tminDist = dist\n\t\t\tminBiome = b.biome\n\t\t}\n\t}\n\treturn minBiome\n}\n\nfunction fitness(a: any, b: any) {\n\treturn (a.altitude - b.altitude) * (a.altitude - b.altitude) + (a.temperature - b.temperature) * (a.temperature - b.temperature) + (a.humidity - b.humidity) * (a.humidity - b.humidity) + (a.weirdness - b.weirdness) * (a.weirdness - b.weirdness) + (a.offset - b.offset) * (a.offset - b.offset)\n}\n\nconst VanillaColors: Record = {\n\t'minecraft:badlands': [217,69,21],\n\t'minecraft:badlands_plateau': [202,140,101],\n\t'minecraft:bamboo_jungle': [118,142,20],\n\t'minecraft:bamboo_jungle_hills': [59,71,10],\n\t'minecraft:basalt_deltas': [64,54,54],\n\t'minecraft:beach': [250,222,85],\n\t'minecraft:birch_forest': [48,116,68],\n\t'minecraft:birch_forest_hills': [31,95,50],\n\t'minecraft:cold_ocean': [32,32,112],\n\t'minecraft:crimson_forest': [221,8,8],\n\t'minecraft:dark_forest': [64,81,26],\n\t'minecraft:dark_forest_hills': [104,121,66],\n\t'minecraft:deep_cold_ocean': [32,32,56],\n\t'minecraft:deep_frozen_ocean': [64,64,144],\n\t'minecraft:deep_lukewarm_ocean': [0,0,64],\n\t'minecraft:deep_ocean': [0,0,48],\n\t'minecraft:deep_warm_ocean': [0,0,80],\n\t'minecraft:desert': [250,148,24],\n\t'minecraft:desert_hills': [210,95,18],\n\t'minecraft:desert_lakes': [255,188,64],\n\t'minecraft:end_barrens': [128,128,255],\n\t'minecraft:end_highlands': [128,128,255],\n\t'minecraft:end_midlands': [128,128,255],\n\t'minecraft:eroded_badlands': [255,109,61],\n\t'minecraft:flower_forest': [45,142,73],\n\t'minecraft:forest': [5,102,33],\n\t'minecraft:frozen_ocean': [112,112,214],\n\t'minecraft:frozen_river': [160,160,255],\n\t'minecraft:giant_spruce_taiga': [129,142,121],\n\t'minecraft:giant_spruce_taiga_hills': [109,119,102],\n\t'minecraft:giant_tree_taiga': [89,102,81],\n\t'minecraft:giant_tree_taiga_hills': [69,79,62],\n\t'minecraft:gravelly_mountains': [136,136,136],\n\t'minecraft:ice_spikes': [180,220,220],\n\t'minecraft:jungle': [83,123,9],\n\t'minecraft:jungle_edge': [98,139,23],\n\t'minecraft:jungle_hills': [44,66,5],\n\t'minecraft:lukewarm_ocean': [0,0,144],\n\t'minecraft:modified_badlands_plateau': [242,180,141],\n\t'minecraft:modified_gravelly_mountains': [120,152,120],\n\t'minecraft:modified_jungle': [123,163,49],\n\t'minecraft:modified_jungle_edge': [138,179,63],\n\t'minecraft:modified_wooded_badlands_plateau': [216,191,141],\n\t'minecraft:mountain_edge': [114,120,154],\n\t'minecraft:mountains': [96,96,96],\n\t'minecraft:mushroom_field_shore': [160,0,255],\n\t'minecraft:mushroom_fields': [255,0,255],\n\t'minecraft:nether_wastes': [191,59,59],\n\t'minecraft:ocean': [0,0,112],\n\t'minecraft:plains': [141,179,96],\n\t'minecraft:river': [0,0,255],\n\t'minecraft:savanna': [189,178,95],\n\t'minecraft:savanna_plateau': [167,157,100],\n\t'minecraft:shattered_savanna': [229,218,135],\n\t'minecraft:shattered_savanna_plateau': [207,197,140],\n\t'minecraft:small_end_islands': [128,128,255],\n\t'minecraft:snowy_beach': [250,240,192],\n\t'minecraft:snowy_mountains': [160,160,160],\n\t'minecraft:snowy_taiga': [49,85,74],\n\t'minecraft:snowy_taiga_hills': [36,63,54],\n\t'minecraft:snowy_taiga_mountains': [89,125,114],\n\t'minecraft:snowy_tundra': [255,255,255],\n\t'minecraft:soul_sand_valley': [94,56,48],\n\t'minecraft:stone_shore': [162,162,132],\n\t'minecraft:sunflower_plains': [181,219,136],\n\t'minecraft:swamp': [7,249,178],\n\t'minecraft:swamp_hills': [47,255,218],\n\t'minecraft:taiga': [11,102,89],\n\t'minecraft:taiga_hills': [22,57,51],\n\t'minecraft:taiga_mountains': [51,142,129],\n\t'minecraft:tall_birch_forest': [88,156,108],\n\t'minecraft:tall_birch_hills': [71,135,90],\n\t'minecraft:the_end': [128,128,255],\n\t'minecraft:the_void': [0,0,0],\n\t'minecraft:warm_ocean': [0,0,172],\n\t'minecraft:warped_forest': [73,144,123],\n\t'minecraft:wooded_badlands_plateau': [176,151,101],\n\t'minecraft:wooded_hills': [34,85,28],\n\t'minecraft:wooded_mountains': [80,112,80],\n}\n","import seedrandom from 'seedrandom'\nimport type { VersionId } from '../Schemas'\nimport { clamp, stringToColor } from '../Utils'\nimport { PerlinNoise } from './noise/PerlinNoise'\n\ntype BlockPos = [number, number, number]\ntype Placement = [BlockPos, number]\n\ntype PlacementContext = {\n\tplacements: Placement[],\n\tfeatures: string[],\n\trandom: seedrandom.prng,\n\tbiomeInfoNoise: PerlinNoise,\n\tseaLevel: number,\n\tversion: VersionId,\n}\n\nconst terrain = [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] \n\nconst featureColors = [\n\t[255, 77, 54], // red\n\t[59, 118, 255], // blue\n\t[91, 207, 25], // green\n\t[217, 32, 245], // magenta\n\t[255, 209, 41], // yellow\n\t[52, 204, 209], // cyan\n]\n\nexport type DecoratorOptions = {\n\tsize: [number, number, number],\n\tseed: string,\n\tversion: VersionId,\n}\nexport function decorator(state: any, img: ImageData, options: DecoratorOptions) {\n\tconst random = seedrandom(options.seed)\n\tconst ctx: PlacementContext = {\n\t\tplacements: [],\n\t\tfeatures: [],\n\t\trandom,\n\t\tbiomeInfoNoise: new PerlinNoise(options.seed + 'frwynup', 0, [1]),\n\t\tseaLevel: 63,\n\t\tversion: options.version,\n\t}\n\n\tfor (let x = 0; x < options.size[0] / 16; x += 1) {\n\t\tfor (let z = 0; z < options.size[2] / 16; z += 1) {\n\t\t\tgetPlacements([x * 16, 0, z * 16], state, ctx)\n\t\t}\n\t}\n\n\tconst data = img.data\n\timg.data.fill(255)\n\n\tfor (const [pos, feature] of ctx.placements) {\n\t\tif (pos[0] < 0 || pos[1] < 0 || pos[2] < 0 || pos[0] >= options.size[0] || pos[1] >= options.size[1] || pos[2] >= options.size[2]) continue\n\t\tconst i = (pos[2] * (img.width * 4)) + (pos[0] * 4)\n\t\tconst color = feature < featureColors.length ? featureColors[feature] : stringToColor(ctx.features[feature])\n\t\tdata[i] = clamp(50, 205, color[0])\n\t\tdata[i + 1] = clamp(50, 205, color[1])\n\t\tdata[i + 2] = clamp(50, 205, color[2])\n\t\tdata[i + 3] = 255\n\t}\n\n\tfor (let x = 0; x < options.size[0]; x += 1) {\n\t\tfor (let y = 0; y < options.size[2]; y += 1) {\n\t\t\tif ((Math.floor(x / 16) + Math.floor(y / 16)) % 2 === 0) continue\n\t\t\tconst i = (y * (img.width * 4)) + (x * 4)\n\t\t\tfor (let j = 0; j < 3; j += 1) {\n\t\t\t\tdata[i + j] = 0.85 * data[i + j] \n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction normalize(id: string) {\n\treturn id.startsWith('minecraft:') ? id.slice(10) : id\n}\n\nfunction decorateY(pos: BlockPos, y: number): BlockPos[] {\n\treturn [[ pos[0], y, pos[2] ]]\n}\n\nfunction nextInt(max: number, ctx: PlacementContext): number {\n\treturn Math.floor(ctx.random() * max)\n}\n\nfunction sampleInt(value: any, ctx: PlacementContext): number {\n\tif (typeof value === 'number') {\n\t\treturn value\n\t} else if (value.base) {\n\t\treturn value.base ?? 1 + nextInt(1 + (value.spread ?? 0), ctx)\n\t} else {\n\t\tswitch (normalize(value.type)) {\n\t\t\tcase 'constant': return value.value\n\t\t\tcase 'uniform': return value.value.min_inclusive + nextInt(value.value.max_inclusive - value.value.min_inclusive + 1, ctx)\n\t\t\tcase 'biased_to_bottom': return value.value.min_inclusive + nextInt(nextInt(value.value.max_inclusive - value.value.min_inclusive + 1, ctx) + 1, ctx)\n\t\t\tcase 'clamped': return Math.max(value.value.min_inclusive, Math.min(value.value.max_inclusive, sampleInt(value.value.source, ctx)))\n\t\t}\n\t\treturn 1\n\t}\n}\n\nfunction useFeature(s: string, ctx: PlacementContext) {\n\tconst i = ctx.features.indexOf(s)\n\tif (i != -1) return i\n\tctx.features.push(s)\n\treturn ctx.features.length - 1\n}\n\nfunction getPlacements(pos: BlockPos, feature: any, ctx: PlacementContext): void {\n\tif (typeof feature === 'string') {\n\t\tctx.placements.push([pos, useFeature(feature, ctx)])\n\t\treturn\n\t}\n\tconst type = normalize(feature?.type ?? 'no_op')\n\tconst featureFn = Features[type]\n\tif (featureFn) {\n\t\tfeatureFn(feature.config, pos, ctx)\n\t} else {\n\t\tctx.placements.push([pos, useFeature(JSON.stringify(feature), ctx)])\n\t}\n}\n\nfunction getPositions(pos: BlockPos, decorator: any, ctx: PlacementContext): BlockPos[] {\n\tconst type = normalize(decorator?.type ?? 'nope')\n\tconst decoratorFn = Decorators[type]\n\tif (!decoratorFn) {\n\t\treturn [pos]\n\t}\n\treturn decoratorFn(decorator?.config, pos, ctx)\n}\n\nconst Features: {\n\t[key: string]: (config: any, pos: BlockPos, ctx: PlacementContext) => void,\n} = {\n\tdecorated: (config, pos, ctx) => {\n\t\tconst positions = getPositions(pos, config?.decorator, ctx)\n\t\tpositions.forEach(p => getPlacements(p, config?.feature, ctx))\n\t},\n\trandom_boolean_selector: (config, pos, ctx) => {\n\t\tconst feature = ctx.random() < 0.5 ? config?.feature_true : config?.feature_false\n\t\tgetPlacements(pos, feature, ctx)\n\t},\n\trandom_selector: (config, pos, ctx) => {\n\t\tfor (const f of config?.features ?? []) {\n\t\t\tif (ctx.random() < (f?.chance ?? 0)) {\n\t\t\t\tgetPlacements(pos, f.feature, ctx)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tgetPlacements(pos, config?.default, ctx)\n\t},\n\tsimple_random_selector: (config, pos, ctx) => {\n\t\tconst feature = config?.features?.[nextInt(config?.features?.length ?? 0, ctx)]\n\t\tgetPlacements(pos, feature, ctx)\n\t},\n}\n\nconst Decorators: {\n\t[key: string]: (config: any, pos: BlockPos, ctx: PlacementContext) => BlockPos[],\n} = {\n\tchance: (config, pos, ctx) => {\n\t\treturn ctx.random() < 1 / (config?.chance ?? 1) ? [pos] : []\n\t},\n\tcount: (config, pos, ctx) => {\n\t\treturn new Array(sampleInt(config?.count ?? 1, ctx)).fill(pos)\n\t},\n\tcount_extra: (config, pos, ctx) => {\n\t\tlet count = config?.count ?? 1\n\t\tif (ctx.random() < config.extra_chance ?? 0){\n\t\t\tcount += config.extra_count ?? 0\n\t\t}\n\t\treturn new Array(count).fill(pos)\n\t},\n\tcount_multilayer: (config, pos, ctx) => {\n\t\treturn new Array(sampleInt(config?.count ?? 1, ctx)).fill(pos)\n\t\t\t.map(p => [\n\t\t\t\tp[0] + nextInt(16, ctx),\n\t\t\t\tp[1], \n\t\t\t\tp[2] + nextInt(16, ctx),\n\t\t\t])\n\t},\n\tcount_noise: (config, pos, ctx) => {\n\t\tconst noise = ctx.biomeInfoNoise.getValue(pos[0] / 200, 0, pos[2] / 200)\n\t\tconst count = noise < config.noise_level ? config.below_noise : config.above_noise\n\t\treturn new Array(count).fill(pos)\n\t},\n\tcount_noise_biased: (config, pos, ctx) => {\n\t\tconst factor = Math.max(1, config.noise_factor)\n\t\tconst noise = ctx.biomeInfoNoise.getValue(pos[0] / factor, 0, pos[2] / factor)\n\t\tconst count = Math.max(0, Math.ceil((noise + (config.noise_offset ?? 0)) * config.noise_to_count_ratio))\n\t\treturn new Array(count).fill(pos)\n\t},\n\tdark_oak_tree: (_config, pos, ctx) => {\n\t\treturn [...new Array(16)].map((_, i) => {\n\t\t\tconst x = Math.floor(i / 4) * 4 + 1 + nextInt(3, ctx) + pos[0]\n\t\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, x)])\n\t\t\tconst z = Math.floor(i % 4) * 4 + 1 + nextInt(3, ctx) + pos[2]\n\t\t\treturn [x, y, z]\n\t\t})\n\t},\n\tdecorated: (config, pos, ctx) => {\n\t\treturn getPositions(pos, config?.outer, ctx).flatMap(p => {\n\t\t\treturn getPositions(p, config?.inner, ctx)\n\t\t})\n\t},\n\tdepth_average: (config, pos, ctx) => {\n\t\tconst y = nextInt(config?.spread ?? 0, ctx) + nextInt(config?.spread ?? 0, ctx) - (config.spread ?? 0) + (config?.baseline ?? 0)\n\t\treturn decorateY(pos, y)\n\t},\n\temerald_ore: (_config, pos, ctx) => {\n\t\tconst count = 3 + nextInt(6, ctx)\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + nextInt(16, ctx),\n\t\t\t4 + nextInt(28, ctx),\n\t\t\tpos[2] + nextInt(16, ctx),\n\t\t])\n\t},\n\tfire: (config, pos, ctx) => {\n\t\tconst count = 1 + nextInt(nextInt(sampleInt(config?.count, ctx), ctx), ctx)\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + nextInt(16, ctx),\n\t\t\tnextInt(128, ctx),\n\t\t\tpos[2] + nextInt(16, ctx),\n\t\t])\n\t},\n\tglowstone: (config, pos, ctx) => {\n\t\tconst count = nextInt(1 + nextInt(sampleInt(config?.count, ctx), ctx), ctx)\n\t\treturn [...new Array(count)].map(() => [\n\t\t\tpos[0] + nextInt(16, ctx),\n\t\t\tnextInt(128, ctx),\n\t\t\tpos[2] + nextInt(16, ctx),\n\t\t])\n\t},\n\theightmap: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, y)\n\t},\n\theightmap_spread_double: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, nextInt(y * 2, ctx))\n\t},\n\theightmap_world_surface: (_config, pos, ctx) => {\n\t\tconst y = Math.max(ctx.seaLevel, terrain[clamp(0, 63, pos[0])])\n\t\treturn decorateY(pos, y)\n\t},\n\ticeberg: (_config, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + 4 + nextInt(8, ctx),\n\t\t\tpos[1],\n\t\t\tpos[2] + 4 + nextInt(8, ctx),\n\t\t]]\n\t},\n\tlava_lake: (config, pos, ctx) => {\n\t\tif (nextInt((config.chance ?? 1) / 10, ctx) === 0) {\n\t\t\tconst y = nextInt(nextInt(256 - 8, ctx) + 8, ctx)\n\t\t\tif (y < ctx.seaLevel || nextInt((config?.chance ?? 1) / 8, ctx) == 0) {\n\t\t\t\tconst x = nextInt(16, ctx) + pos[0]\n\t\t\t\tconst z = nextInt(16, ctx) + pos[2]\n\t\t\t\treturn [[x, y, z]]\n\t\t\t}\n\t\t}\n\t\treturn []\n\t},\n\tnope: (_config, pos) => {\n\t\treturn [pos]\n\t},\n\trange: (config, pos, ctx) => {\n\t\tconst y = nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0), ctx) + (config?.bottom_offset ?? 0)\n\t\treturn decorateY(pos, y)\n\t},\n\trange_biased: (config, pos, ctx) => {\n\t\tconst y = nextInt(nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0), ctx) + (config?.bottom_offset ?? 0), ctx)\n\t\treturn decorateY(pos, y)\n\t},\n\trange_very_biased: (config, pos, ctx) => {\n\t\tconst y = nextInt(nextInt(nextInt((config?.maximum ?? 1) - (config?.top_offset ?? 0), ctx) + (config?.bottom_offset ?? 0), ctx) + (config?.bottom_offset ?? 0), ctx)\n\t\treturn decorateY(pos, y)\n\t},\n\tspread_32_above: (_config, pos, ctx) => {\n\t\tconst y = nextInt(pos[1] + 32, ctx)\n\t\treturn decorateY(pos, y)\n\t},\n\ttop_solid_heightmap: (_config, pos) => {\n\t\tconst y = terrain[clamp(0, 63, pos[0])]\n\t\treturn decorateY(pos, y)\n\t},\n\tmagma: (_config, pos, ctx) => {\n\t\tconst y = nextInt(pos[1] + 32, ctx)\n\t\treturn decorateY(pos, y)\n\t},\n\tsquare: (_config, pos, ctx) => {\n\t\treturn [[\n\t\t\tpos[0] + nextInt(16, ctx),\n\t\t\tpos[1],\n\t\t\tpos[2] + nextInt(16, ctx),\n\t\t]]\n\t},\n\twater_lake: (config, pos, ctx) => {\n\t\tif (nextInt(config.chance ?? 1, ctx) === 0) {\n\t\t\treturn [[\n\t\t\t\tpos[0] + nextInt(16, ctx),\n\t\t\t\tnextInt(256, ctx),\n\t\t\t\tpos[2] + nextInt(16, ctx),\n\t\t\t]]\n\t\t}\n\t\treturn []\n\t},\n}\n","import { clampedLerp, lerp2 } from '../../Utils'\nimport { PerlinNoise } from './PerlinNoise'\n\nexport class NoiseChunkGenerator {\n\tprivate readonly minLimitPerlinNoise: PerlinNoise\n\tprivate readonly maxLimitPerlinNoise: PerlinNoise\n\tprivate readonly mainPerlinNoise: PerlinNoise\n\tprivate readonly depthNoise: PerlinNoise\n\n\tprivate settings: any = {}\n\tprivate chunkWidth: number = 4\n\tprivate chunkHeight: number = 4\n\tprivate chunkCountY: number = 32\n\tprivate biomeDepth: number = 0.1\n\tprivate biomeScale: number = 0.2\n\n\tprivate noiseColumnCache: (number[] | null)[] = []\n\tprivate xOffset: number = 0\n\n\tconstructor(seed: string) {\n\t\tthis.minLimitPerlinNoise = PerlinNoise.fromRange(seed + 'djfqnqd', -15, 0)\n\t\tthis.maxLimitPerlinNoise = PerlinNoise.fromRange(seed + 'gowdnqs', -15, 0)\n\t\tthis.mainPerlinNoise = PerlinNoise.fromRange(seed + 'afiwmco', -7, 0)\n\t\tthis.depthNoise = PerlinNoise.fromRange(seed + 'qphnmeo', -15, 0)\n\t}\n\n\tpublic reset(settings: any, depth: number, scale: number, xOffset: number, width: number) {\n\t\tthis.settings = settings\n\t\tthis.chunkWidth = settings.size_horizontal * 4\n\t\tthis.chunkHeight = settings.size_vertical * 4\n\t\tthis.chunkCountY = Math.floor(settings.height / this.chunkHeight)\n\n\t\tif (settings.amplified && depth > 0) {\n\t\t\tdepth = 1 + depth * 2\n\t\t\tscale = 1 + scale * 4\n\t\t}\n\t\tthis.biomeDepth = 0.265625 * (depth * 0.5 - 0.125)\n\t\tthis.biomeScale = 96.0 / (scale * 0.9 + 0.1)\n\n\t\tthis.noiseColumnCache = Array(width).fill(null)\n\t\tthis.xOffset = xOffset\n\t}\n \n\tpublic iterateNoiseColumn(x: number): number[] {\n\t\tconst data = Array(this.chunkCountY * this.chunkHeight)\n\t\tconst cx = Math.floor(x / this.chunkWidth)\n\t\tconst ox = Math.floor(x % this.chunkWidth) / this.chunkWidth\n\t\tconst noise1 = this.fillNoiseColumn(cx)\n\t\tconst noise2 = this.fillNoiseColumn(cx + 1)\n\n\t\tfor (let y = this.chunkCountY - 1; y >= 0; y -= 1) {\n\t\t\tfor (let yy = this.chunkHeight; yy >= 0; yy -= 1) {\n\t\t\t\tconst oy = yy / this.chunkHeight\n\t\t\t\tconst i = y * this.chunkHeight + yy\n\t\t\t\tdata[i] = lerp2(oy, ox, noise1[y], noise1[y+1], noise2[y], noise2[y+1])\n\t\t\t}\n\t\t}\n\t\treturn data\n\t}\n\n\tprivate fillNoiseColumn(x: number): number[] {\n\t\tconst cachedColumn = this.noiseColumnCache[x - this.xOffset]\n\t\tif (cachedColumn) return cachedColumn\n\n\t\tconst data = Array(this.chunkCountY + 1)\n\n\t\tconst xzScale = 684.412 * this.settings.sampling.xz_scale\n\t\tconst yScale = 684.412 * this.settings.sampling.y_scale\n\t\tconst xzFactor = xzScale / this.settings.sampling.xz_factor\n\t\tconst yFactor = yScale / this.settings.sampling.y_factor\n\t\tconst randomDensity = this.settings.random_density_offset ? this.getRandomDensity(x) : 0\n\n\t\tfor (let y = 0; y <= this.chunkCountY; y += 1) {\n\t\t\tlet noise = this.sampleAndClampNoise(x, y, this.mainPerlinNoise.getOctaveNoise(0).zo, xzScale, yScale, xzFactor, yFactor)\n\t\t\tconst yOffset = 1 - y * 2 / this.chunkCountY + randomDensity\n\t\t\tconst density = yOffset * this.settings.density_factor + this.settings.density_offset\n\t\t\tconst falloff = (density + this.biomeDepth) * this.biomeScale\n\t\t\tnoise += falloff * (falloff > 0 ? 4 : 1)\n\n\t\t\tif (this.settings.top_slide.size > 0) {\n\t\t\t\tnoise = clampedLerp(\n\t\t\t\t\tthis.settings.top_slide.target,\n\t\t\t\t\tnoise,\n\t\t\t\t\t(this.chunkCountY - y - (this.settings.top_slide.offset)) / (this.settings.top_slide.size)\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tif (this.settings.bottom_slide.size > 0) {\n\t\t\t\tnoise = clampedLerp(\n\t\t\t\t\tthis.settings.bottom_slide.target,\n\t\t\t\t\tnoise,\n\t\t\t\t\t(y - (this.settings.bottom_slide.offset)) / (this.settings.bottom_slide.size)\n\t\t\t\t)\n\t\t\t}\n\t\t\tdata[y] = noise\n\t\t}\n\n\t\tthis.noiseColumnCache[x - this.xOffset] = data\n\t\treturn data\n\t}\n\n\tprivate getRandomDensity(x: number): number {\n\t\tconst noise = this.depthNoise.getValue(x * 200, 10, this.depthNoise.getOctaveNoise(0).zo, 1, 0, true)\n\t\tconst a = (noise < 0) ? -noise * 0.3 : noise\n\t\tconst b = a * 24.575625 - 2\n\t\treturn (b < 0) ? b * 0.009486607142857142 : Math.min(b, 1) * 0.006640625\n\t}\n\n\tprivate sampleAndClampNoise(x: number, y: number, z: number, xzScale: number, yScale: number, xzFactor: number, yFactor: number): number {\n\t\tlet a = 0\n\t\tlet b = 0\n\t\tlet c = 0\n\t\tlet d = 1\n\n\t\tfor (let i = 0; i < 16; i += 1) {\n\t\t\tconst x2 = PerlinNoise.wrap(x * xzScale * d)\n\t\t\tconst y2 = PerlinNoise.wrap(y * yScale * d)\n\t\t\tconst z2 = PerlinNoise.wrap(z * xzScale * d)\n\t\t\tconst e = yScale * d\n\n\t\t\tconst minLimitNoise = this.minLimitPerlinNoise.getOctaveNoise(i)\n\t\t\tif (minLimitNoise) {\n\t\t\t\ta += minLimitNoise.noise(x2, y2, z2, e, y * e) / d\n\t\t\t}\n\n\t\t\tconst maxLimitNoise = this.maxLimitPerlinNoise.getOctaveNoise(i)\n\t\t\tif (maxLimitNoise) {\n\t\t\t\tb += maxLimitNoise.noise(x2, y2, z2, e, y * e) / d\n\t\t\t}\n\n\t\t\tif (i < 8) {\n\t\t\t\tconst mainNoise = this.mainPerlinNoise.getOctaveNoise(i)\n\t\t\t\tif (mainNoise) {\n\t\t\t\t\tc += mainNoise.noise(\n\t\t\t\t\t\tPerlinNoise.wrap(x * xzFactor * d),\n\t\t\t\t\t\tPerlinNoise.wrap(y * yFactor * d),\n\t\t\t\t\t\tPerlinNoise.wrap(z * xzFactor * d),\n\t\t\t\t\t\tyFactor * d,\n\t\t\t\t\t\ty * yFactor * d \n\t\t\t\t\t) / d\n\t\t\t\t}\n\t\t\t}\n\n\t\t\td /= 2\n\t\t}\n\n\t\treturn clampedLerp(a / 512, b / 512, (c / 10 + 1) / 2)\n\t}\n}\n","import { NoiseChunkGenerator } from './noise/NoiseChunkGenerator'\n\nexport type NoiseSettingsOptions = {\n\tbiomeScale: number,\n\tbiomeDepth: number,\n\toffset: number,\n\twidth: number,\n\tseed: string,\n}\n\nexport function noiseSettings(state: any, img: ImageData, options: NoiseSettingsOptions) {\n\tconst generator = new NoiseChunkGenerator(options.seed)\n\tgenerator.reset(state, options.biomeDepth, options.biomeScale, options.offset, 200)\n\tconst data = img.data\n\tconst row = img.width * 4\n\tfor (let x = 0; x < options.width; x += 1) {\n\t\tconst noise = generator.iterateNoiseColumn(x - options.offset).reverse()\n\t\tfor (let y = 0; y < state.height; y += 1) {\n\t\t\tconst i = y * row + x * 4\n\t\t\tconst color = getColor(noise, y)\n\t\t\tdata[i] = color\n\t\t\tdata[i + 1] = color\n\t\t\tdata[i + 2] = color\n\t\t\tdata[i + 3] = 255\n\t\t}\n\t}\n}\n\nfunction getColor(noise: number[], y: number): number {\n\tif (noise[y] > 0) {\n\t\treturn 0\n\t}\n\tif (noise[y+1] > 0) {\n\t\treturn 150\n\t}\n\treturn 255\n}\n","import type { DataModel } from '@mcschema/core'\nimport { Path } from '@mcschema/core'\nimport type { FunctionalComponent } from 'preact'\nimport { useState } from 'preact/hooks'\nimport { useModel } from '../hooks'\nimport type { VersionId } from '../Schemas'\nimport { BiomeSourcePreview, DecoratorPreview, NoiseSettingsPreview } from './previews'\n\nexport const HasPreview = ['dimension', 'worldgen/noise_settings', 'worldgen/configured_feature']\n\nexport const Previews: {\n\tid: string,\n\tgenerator: string,\n\tpath: Path,\n\tpredicate: (model: DataModel) => boolean,\n\tpreview: FunctionalComponent<{\n\t\tlang: string,\n\t\tmodel: DataModel,\n\t\tdata: any,\n\t\tversion: VersionId,\n\t\tshown: boolean,\n\t}>,\n}[] = [\n\t{\n\t\tid: 'biome-noise',\n\t\tgenerator: 'dimension',\n\t\tpath: new Path(['generator', 'biome_source']),\n\t\tpredicate: model => model.get(new Path(['generator', 'type'])).endsWith('noise'),\n\t\tpreview: BiomeSourcePreview,\n\t},\n\t{\n\t\tid: 'noise-settings',\n\t\tgenerator: 'worldgen/noise_settings',\n\t\tpath: new Path(['noise']),\n\t\tpredicate: () => true,\n\t\tpreview: NoiseSettingsPreview,\n\t},\n\t{\n\t\tid: 'decorator',\n\t\tgenerator: 'worldgen/configured_feature',\n\t\tpath: new Path([]),\n\t\tpredicate: () => true,\n\t\tpreview: DecoratorPreview,\n\t},\n]\n\ntype PreviewPanelProps = {\n\tlang: string,\n\tmodel: DataModel | null,\n\tversion: VersionId,\n\tid: string,\n\tshown: boolean,\n\tonError: (message: string) => unknown,\n}\nexport function PreviewPanel({ lang, model, version, id, shown }: PreviewPanelProps) {\n\tconst [, setCount] = useState(0)\n\n\tuseModel(model, () => {\n\t\tsetCount(count => count + 1)\n\t})\n\n\treturn <>\n\t\t{Previews.filter(p => p.generator === id).map(p => {\n\t\t\tconst data = model?.get(p.path)\n\t\t\tif (!model || data === undefined || !p.predicate(model)) {\n\t\t\t\treturn <>\n\t\t\t}\n\t\t\treturn p.preview({ lang, model: model!, data, version, shown })\n\t\t})}\n\t\n}\n","import type { DataModel } from '@mcschema/core'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn } from '..'\nimport { useOnDrag, useOnHover } from '../../hooks'\nimport { biomeSource, getBiome } from '../../previews'\nimport { hexId } from '../../Utils'\n\ntype BiomeSourceProps = {\n\tlang: string,\n\tmodel: DataModel,\n\tdata: any,\n\tshown: boolean,\n}\nexport const BiomeSourcePreview = ({ data, shown }: BiomeSourceProps) => {\n\tconst [scale, setScale] = useState(2)\n\tconst [seed, setSeed] = useState(hexId())\n\tconst [focused, setFocused] = useState(undefined)\n\tconst type: string = data.type?.replace(/^minecraft:/, '')\n\n\tconst canvas = useRef(null)\n\tconst offset = useRef<[number, number]>([0, 0])\n\tconst redrawTimeout = useRef(undefined)\n\tconst redraw = useRef()\n\tconst refocus = useRef()\n\n\tuseEffect(() => {\n\t\tredraw.current = (res = 4) => {\n\t\t\tif (type !== 'multi_noise') res = 1\n\t\t\tconst ctx = canvas.current.getContext('2d')!\n\t\t\tcanvas.current.width = 200 / res\n\t\t\tcanvas.current.height = 200 / res\n\t\t\tconst img = ctx.createImageData(canvas.current.width, canvas.current.height)\n\t\t\tbiomeSource(data, img, { biomeColors: {}, offset: offset.current, scale, seed, res })\n\t\t\tctx.putImageData(img, 0, 0)\n\t\t\tif (res !== 1) {\n\t\t\t\tclearTimeout(redrawTimeout.current)\n\t\t\t\tredrawTimeout.current = setTimeout(() => redraw.current(1), 150) as any\n\t\t\t}\n\t\t}\n\t\trefocus.current = (x: number, y: number) => {\n\t\t\tconst x2 = x * 200 / canvas.current.clientWidth\n\t\t\tconst y2 = y * 200 / canvas.current.clientHeight\n\t\t\tconst biome = getBiome(data, x2, y2, { biomeColors: {}, offset: offset.current, scale, seed, res: 1 })\n\t\t\tsetFocused(biome)\n\t\t}\n\t})\n\n\tuseOnDrag(canvas.current, (dx, dy) => {\n\t\tconst x = dx * 200 / canvas.current.clientWidth\n\t\tconst y = dy * 200 / canvas.current.clientHeight\n\t\toffset.current = [offset.current[0] + x, offset.current[1] + y]\n\t\tredraw.current()\n\t})\n\n\tuseOnHover(canvas.current, (x, y) => {\n\t\tif (x === undefined || y === undefined) {\n\t\t\tsetFocused(undefined)\n\t\t} else {\n\t\t\trefocus.current(x, y)\n\t\t}\n\t})\n\n\tconst state = JSON.stringify(data)\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tredraw.current()\n\t\t}\n\t}, [state, scale, seed, shown])\n\n\tconst changeScale = (newScale: number) => {\n\t\toffset.current[0] *= scale / newScale\n\t\toffset.current[1] *= scale / newScale\n\t\tsetScale(newScale)\n\t}\n\n\treturn <>\n\t\t
\n\t\t\t{focused && }\n\t\t\t{(type === 'multi_noise' || type === 'checkerboard') && <>\n\t\t\t\t changeScale(scale * 1.5)} />\n\t\t\t\t changeScale(scale / 1.5)} />\n\t\t\t}\n\t\t\t{type === 'multi_noise' &&\n\t\t\t\t setSeed(hexId())} />}\n\t\t
\n\t\t\n\t\n}\n","import { useEffect } from 'preact/hooks'\n\nexport function useOnHover(element: HTMLElement, hover: (x: number | undefined, y: number | undefined) => unknown) {\n\tif (!element) return\n\n\tconst onMouseMove = (e: MouseEvent) => {\n\t\thover(e.offsetX, e.offsetY)\n\t}\n\tconst onMouseLeave = () => {\n\t\thover(undefined, undefined)\n\t}\n\n\tuseEffect(() => {\n\t\telement.addEventListener('mousemove', onMouseMove)\n\t\telement.addEventListener('mouseleave', onMouseLeave)\n\t\treturn () => {\n\t\t\telement.removeEventListener('mousemove', onMouseMove)\n\t\t\telement.removeEventListener('mouseleave', onMouseLeave)\n\t\t}\n\t}, [element])\n}\n","import type { DataModel } from '@mcschema/core'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn, BtnInput, BtnMenu } from '..'\nimport { useOnDrag } from '../../hooks'\nimport { locale } from '../../Locales'\nimport { noiseSettings } from '../../previews'\nimport { hexId } from '../../Utils'\n\ntype NoiseSettingsProps = {\n\tlang: string,\n\tmodel: DataModel,\n\tdata: any,\n\tshown: boolean,\n}\nexport const NoiseSettingsPreview = ({ lang, data, shown }: NoiseSettingsProps) => {\n\tconst loc = locale.bind(null, lang)\n\tconst [seed, setSeed] = useState(hexId())\n\tconst [biomeDepth, setBiomeDepth] = useState(0.1)\n\tconst [biomeScale, setBiomeScale] = useState(0.2)\n\n\tconst canvas = useRef(null)\n\tconst offset = useRef(0)\n\tconst redraw = useRef()\n\n\tuseEffect(() => {\n\t\tredraw.current = () => {\n\t\t\tconst ctx = canvas.current.getContext('2d')!\n\t\t\tconst size = data.height\n\t\t\tcanvas.current.width = size\n\t\t\tcanvas.current.height = size\n\t\t\tconst img = ctx.createImageData(canvas.current.width, canvas.current.height)\n\t\t\tnoiseSettings(data, img, { biomeDepth, biomeScale, offset: offset.current, width: size, seed })\n\t\t\tctx.putImageData(img, 0, 0)\n\t\t}\n\t})\n\n\tuseOnDrag(canvas.current, (dx) => {\n\t\tconst x = dx * canvas.current.width / canvas.current.clientWidth\n\t\toffset.current = offset.current + x\n\t\tredraw.current()\n\t})\n\n\tconst state = JSON.stringify(data)\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tredraw.current()\n\t\t}\n\t}, [state, biomeDepth, biomeScale, seed, shown])\n\n\treturn <>\n\t\t
\n\t\t\t\n\t\t\t\t setBiomeDepth(Number(v))} />\n\t\t\t\t setBiomeScale(Number(v))} />\n\t\t\t\n\t\t\t setSeed(hexId())} />\n\t\t
\n\t\t\n\t\n}\n","import type { DataModel } from '@mcschema/core'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn } from '..'\nimport { decorator } from '../../previews'\nimport type { VersionId } from '../../Schemas'\nimport { hexId } from '../../Utils'\n\ntype DecoratorProps = {\n\tlang: string,\n\tmodel: DataModel,\n\tdata: any,\n\tversion: VersionId,\n\tshown: boolean,\n}\nexport const DecoratorPreview = ({ data, version, shown }: DecoratorProps) => {\n\tconst [scale, setScale] = useState(4)\n\tconst [seed, setSeed] = useState(hexId())\n\n\tconst canvas = useRef(null)\n\tconst redraw = useRef()\n\n\tuseEffect(() => {\n\t\tredraw.current = () => {\n\t\t\tconst ctx = canvas.current.getContext('2d')!\n\t\t\tcanvas.current.width = scale * 16\n\t\t\tcanvas.current.height = scale * 16\n\t\t\tconst img = ctx.createImageData(canvas.current.width, canvas.current.height)\n\t\t\tdecorator(data, img, { seed, version, size: [scale * 16, 128, scale * 16] })\n\t\t\tctx.putImageData(img, 0, 0)\n\t\t}\n\t})\n\n\tconst state = JSON.stringify(data)\n\tuseEffect(() => {\n\t\tif (shown) {\n\t\t\tsetTimeout(() => redraw.current())\n\t\t}\n\t}, [state, scale, seed, shown])\n\n\treturn <>\n\t\t
\n\t\t\t setScale(Math.min(16, scale + 1))} />\n\t\t\t setScale(Math.max(1, scale - 1))} />\n\t\t\t setSeed(hexId())} />\n\t\t
\n\t\t\n\t\n}\n","import type { Hook } from '@mcschema/core'\nimport { relativePath } from '@mcschema/core'\nimport type { BlockStateRegistry } from '../Schemas'\n\nexport type OutputProps = {\n\tblockStates: BlockStateRegistry,\n}\nexport const transformOutput: Hook<[any, OutputProps], any> = {\n\tbase({}, _, value) {\n\t\treturn value\n\t},\n\n\tchoice({ switchNode }, path, value, props) {\n\t\treturn switchNode.hook(this, path, value, props)\n\t},\n\n\tlist({ children }, path, value, props) {\n\t\tif (!Array.isArray(value)) return value\n\t\treturn value.map((obj, index) =>\n\t\t\tchildren.hook(this, path.push(index), obj, props)\n\t\t)\n\t},\n\n\tmap({ children, config }, path, value, props) {\n\t\tif (value === undefined) return undefined\n\t\tconst blockState = config.validation?.validator === 'block_state_map'? props.blockStates?.[relativePath(path, config.validation.params.id).get()] : null\n\t\tconst res: any = {}\n\t\tObject.keys(value).forEach(f => {\n\t\t\tif (blockState) {\n\t\t\t\tif (!Object.keys(blockState.properties).includes(f)) return\n\t\t\t}\n\t\t\tres[f] = children.hook(this, path.push(f), value[f], props)\n\t\t})\n\t\treturn res\n\t},\n\n\tobject({ getActiveFields }, path, value, props) {\n\t\tif (value === undefined || value === null || typeof value !== 'object') {\n\t\t\treturn value\n\t\t}\n\t\tconst res: any = {}\n\t\tconst activeFields = getActiveFields(path)\n\t\tObject.keys(activeFields)\n\t\t\t.filter(k => activeFields[k].enabled(path))\n\t\t\t.forEach(f => {\n\t\t\t\tres[f] = activeFields[f].hook(this, path.push(f), value[f], props)\n\t\t\t})\n\t\treturn res\n\t},\n}\n","import type { CollectionRegistry } from '@mcschema/core'\nimport config from '../config.json'\nimport type { BlockStateRegistry, VersionId } from './Schemas'\nimport { checkVersion } from './Schemas'\n\n['1.15', '1.16', '1.17'].forEach(v => localStorage.removeItem(`cache_${v}`))\n\nconst CACHE_NAME = 'misode-v1'\n\ntype VersionRef = 'mcdata_master' | 'vanilla_datapack_summary' | 'vanilla_datapack_data'\n\ntype Version = {\n\tid: string,\n\trefs: Partial<{ [key in VersionRef]: string }>,\n\tdynamic?: boolean,\n}\n\ndeclare var __MCDATA_MASTER_HASH__: string\ndeclare var __VANILLA_DATAPACK_SUMMARY_HASH__: string\n\nconst mcdataUrl = 'https://raw.githubusercontent.com/Arcensoth/mcdata'\nconst vanillaDatapackUrl = 'https://raw.githubusercontent.com/SPGoding/vanilla-datapack'\n\nconst refs: {\n\tid: VersionRef,\n\thash: string,\n\turl: string,\n}[] = [\n\t{\n\t\tid: 'mcdata_master',\n\t\thash: __MCDATA_MASTER_HASH__,\n\t\turl: mcdataUrl,\n\t},\n\t{\n\t\tid: 'vanilla_datapack_summary',\n\t\thash: __VANILLA_DATAPACK_SUMMARY_HASH__,\n\t\turl: vanillaDatapackUrl,\n\t},\n]\n\nexport async function fetchData(versionId: string, collectionTarget: CollectionRegistry, blockStateTarget: BlockStateRegistry) {\n\tconst version = config.versions.find(v => v.id === versionId) as Version | undefined\n\tif (!version) {\n\t\tconsole.error(`[fetchData] Unknown version ${version} in ${JSON.stringify(config.versions)}`)\n\t\treturn\n\t}\n\tconsole.debug(`[fetchData] ${JSON.stringify(version)}`)\n\n\tif (version.dynamic) {\n\t\tawait Promise.all(refs\n\t\t\t.filter(r => localStorage.getItem(`cached_${r.id}`) !== r.hash)\n\t\t\t.map(async r => {\n\t\t\t\tconsole.debug(`[deleteMatching] ${r.id} '${localStorage.getItem(`cached_${r.id}`)}' < '${r.hash}' ${r.url}/${version.refs[r.id]}`)\n\t\t\t\tawait deleteMatching(url => url.startsWith(`${r.url}/${version.refs[r.id]}`))\n\t\t\t\tconsole.debug(`[deleteMatching] Done! ${r.id} ${r.hash} '${localStorage.getItem(`cached_${r.id}`)}'`)\n\t\t\t\tlocalStorage.setItem(`cached_${r.id}`, r.hash)\n\t\t\t\tconsole.debug(`[deleteMatching] Set! ${r.id} ${r.hash} '${localStorage.getItem(`cached_${r.id}`)}'`)\n\t\t\t}))\n\t}\n\n\tawait Promise.all([\n\t\tfetchRegistries(version, collectionTarget),\n\t\tfetchBlockStateMap(version, blockStateTarget),\n\t\tfetchDynamicRegistries(version, collectionTarget),\n\t])\n}\n\nasync function fetchRegistries(version: Version, target: CollectionRegistry) {\n\tconsole.debug(`[fetchRegistries] ${version.id}`)\n\tconst registries = config.registries\n\t\t.filter(r => !r.dynamic)\n\t\t.filter(r => checkVersion(version.id, r.minVersion, r.maxVersion))\n\n\tif (checkVersion(version.id, undefined, '1.15')) {\n\t\tconst url = `${mcdataUrl}/${version.refs.mcdata_master}/generated/reports/registries.json`\n\t\ttry {\n\t\t\tconst data = await getData(url, (data) => {\n\t\t\t\tconst res: {[id: string]: string[]} = {}\n\t\t\t\tObject.keys(data).forEach(k => {\n\t\t\t\t\tres[k.slice(10)] = Object.keys(data[k].entries)\n\t\t\t\t})\n\t\t\t\treturn res\n\t\t\t})\n\t\t\tregistries.forEach(r => {\n\t\t\t\ttarget.register(r.id, data[r.id] ?? [])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching registries:', e)\n\t\t}\n\t} else {\n\t\tawait Promise.all(registries.map(async r => {\n\t\t\ttry {\n\t\t\t\tconst url = r.path\n\t\t\t\t\t? `${mcdataUrl}/${version.refs.mcdata_master}/${r.path}/data.min.json`\n\t\t\t\t\t: `${mcdataUrl}/${version.refs.mcdata_master}/processed/reports/registries/${r.id}/data.min.json`\n\t\t\t\ttarget.register(r.id, await getData(url, v => v.values))\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(`Error occurred while fetching registry ${r.id}:`, e)\n\t\t\t}\n\t\t}))\n\t}\n}\n\nasync function fetchBlockStateMap(version: Version, target: BlockStateRegistry) {\n\tconsole.debug(`[fetchBlockStateMap] ${version.id}`)\n\tif (checkVersion(version.id, undefined, '1.16')) {\n\t\tconst url = (checkVersion(version.id, undefined, '1.15'))\n\t\t\t? `${mcdataUrl}/${version.refs.mcdata_master}/generated/reports/blocks.json`\n\t\t\t: `${mcdataUrl}/${version.refs.mcdata_master}/processed/reports/blocks/data.min.json`\n\n\t\ttry {\n\t\t\tconst data = await getData(url, (data) => {\n\t\t\t\tconst res: BlockStateRegistry = {}\n\t\t\t\tObject.keys(data).forEach(b => {\n\t\t\t\t\tres[b] = {\n\t\t\t\t\t\tproperties: data[b].properties,\n\t\t\t\t\t\tdefault: data[b].states.find((s: any) => s.default).properties,\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn res\n\t\t\t})\n\t\t\tObject.assign(target, data)\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching block state map:', e)\n\t\t}\n\t} else {\n\t\tconst url = `${mcdataUrl}/${version.refs.mcdata_master}/processed/reports/blocks/simplified/data.min.json`\n\t\ttry {\n\t\t\tconst data = await getData(url)\n\t\t\tObject.assign(target, data)\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching block state map:', e)\n\t\t}\n\t}\n}\n\nasync function fetchDynamicRegistries(version: Version, target: CollectionRegistry) {\n\tconsole.debug(`[fetchDynamicRegistries] ${version.id}`)\n\tconst registries = config.registries\n\t\t.filter(r => r.dynamic)\n\t\t.filter(r => checkVersion(version.id, r.minVersion, r.maxVersion))\n\n\tif (checkVersion(version.id, '1.16')) {\n\t\tconst url = `${vanillaDatapackUrl}/${version.refs.vanilla_datapack_summary}/summary/flattened.min.json`\n\t\ttry {\n\t\t\tconst data = await getData(url)\n\t\t\tregistries.forEach(r => {\n\t\t\t\ttarget.register(r.id, data[r.id])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.warn('Error occurred while fetching dynamic registries:', e)\n\t\t}\n\t}\n}\n\nexport async function fetchPreset(version: VersionId, registry: string, id: string) {\n\tconsole.debug(`[fetchPreset] ${id} ${registry} ${id}`)\n\tconst versionData = config.versions.find(v => v.id === version)!\n\ttry {\n\t\tconst res = await fetch(`${vanillaDatapackUrl}/${versionData.refs.vanilla_datapack_data}/data/minecraft/${registry}/${id}.json`)\n\t\treturn await res.json()\n\t} catch (e) {\n\t\tconsole.warn(`Error occurred while fetching ${registry} preset ${id}:`, e)\n\t}\n}\n\nasync function getData(url: string, fn: (v: any) => T = (v: any) => v): Promise {\n\ttry {\n\t\tconst cache = await caches.open(CACHE_NAME)\n\t\tconsole.debug(`[getData] Opened cache ${CACHE_NAME} ${url}`)\n\t\tconst cacheResponse = await cache.match(url)\n \n\t\tif (cacheResponse && cacheResponse.ok) {\n\t\t\tconsole.debug(`[getData] Retrieving cached data ${url}`)\n\t\t\treturn await cacheResponse.json()\n\t\t}\n \n\t\tconsole.debug(`[getData] fetching data ${url}`)\n\t\tconst fetchResponse = await fetch(url)\n\t\tconst responseData = fn(await fetchResponse.json())\n\t\tawait cache.put(url, new Response(JSON.stringify(responseData)))\n\t\treturn responseData\n\t} catch (e) {\n\t\tconsole.warn(`[getData] Failed to open cache ${CACHE_NAME}: ${e.message}`)\n\n\t\tconsole.debug(`[getData] fetching data ${url}`)\n\t\tconst fetchResponse = await fetch(url)\n\t\tconst responseData = fn(await fetchResponse.json())\n\t\treturn responseData\n\t}\n}\n\nasync function deleteMatching(matches: (url: string) => boolean) {\n\ttry {\n\t\tconst cache = await caches.open(CACHE_NAME)\n\t\tconsole.debug(`[deleteMatching] Opened cache ${CACHE_NAME}`)\n\t\tconst promises: Promise[] = []\n \n\t\tfor (const request of await cache.keys()) {\n\t\t\tif (matches(request.url)) {\n\t\t\t\tpromises.push(cache.delete(request))\n\t\t\t}\n\t\t}\n\t\tconsole.debug(`[deleteMatching] Removing ${promises.length} cache objects...`)\n\t\tawait Promise.all(promises)\n\t} catch (e) {\n\t\tconsole.warn(`[deleteMatching] Failed to open cache ${CACHE_NAME}: ${e.message}`)\n\t}\n}\n","import type { CollectionRegistry, SchemaRegistry } from '@mcschema/core'\nimport { DataModel } from '@mcschema/core'\nimport * as java15 from '@mcschema/java-1.15'\nimport * as java16 from '@mcschema/java-1.16'\nimport * as java17 from '@mcschema/java-1.17'\nimport config from '../config.json'\nimport { fetchData } from './DataFetcher'\n\nexport const VersionIds = ['1.15', '1.16', '1.17'] as const\nexport type VersionId = typeof VersionIds[number]\n\nexport type BlockStateRegistry = {\n\t[block: string]: {\n\t\tproperties: {\n\t\t\t[key: string]: string[],\n\t\t},\n\t\tdefault: {\n\t\t\t[key: string]: string,\n\t\t},\n\t},\n}\n\ntype VersionData = {\n\tcollections: CollectionRegistry,\n\tschemas: SchemaRegistry,\n\tblockStates: BlockStateRegistry,\n}\nconst Versions: Record> = {}\n\ntype ModelData = {\n\tmodel: DataModel,\n\tversion: VersionId,\n}\nconst Models: Record = {}\n\nconst versionGetter: {\n\t[versionId in VersionId]: {\n\t\tgetCollections: () => CollectionRegistry,\n\t\tgetSchemas: (collections: CollectionRegistry) => SchemaRegistry,\n\t}\n} = {\n\t1.15: java15,\n\t1.16: java16,\n\t1.17: java17,\n}\n\nasync function getVersion(id: VersionId): Promise {\n\tif (!Versions[id]) {\n\t\tVersions[id] = (async () => {\n\t\t\ttry {\n\t\t\t\tconst collections = versionGetter[id].getCollections()\n\t\t\t\tconst blockStates: BlockStateRegistry = {}\n\t\t\t\tawait fetchData(id, collections, blockStates)\n\t\t\t\tconst schemas = versionGetter[id].getSchemas(collections)\n\t\t\t\tVersions[id] = { collections, schemas, blockStates }\n\t\t\t\treturn Versions[id]\n\t\t\t} catch (e) {\n\t\t\t\tthrow new Error(`Cannot get version \"${id}\": ${e.message}`)\n\t\t\t}\n\t\t})()\n\t\treturn Versions[id]\n\t}\n\treturn Versions[id]\n}\n\nexport async function getModel(version: VersionId, id: string): Promise {\n\tif (!Models[id] || Models[id].version !== version) {\n\t\tconst versionData = await getVersion(version)\n\t\tconst schemaName = config.generators.find(g => g.id === id)?.schema\n\t\tif (!schemaName) {\n\t\t\tthrow new Error(`Cannot find model ${id}`)\n\t\t}\n\t\ttry {\n\t\t\tconst schema = versionData.schemas.get(schemaName)\n\t\t\tconst model = new DataModel(schema)\n\t\t\tif (Models[id]) {\n\t\t\t\tmodel.reset(Models[id].model.data, false)\n\t\t\t} else {\n\t\t\t\tmodel.validate(true)\n\t\t\t\tmodel.history = [JSON.stringify(model.data)]\n\t\t\t}\n\t\t\tModels[id] = { model, version }\n\t\t} catch (e) {\n\t\t\tthrow new Error(`Cannot get generator \"${id}\" for version \"${version}\": ${e.message}`)\n\t\t}\n\t}\n\treturn Models[id].model\n}\n\nexport async function getCollections(version: VersionId): Promise {\n\tconst versionData = await getVersion(version)\n\treturn versionData.collections\n}\n\nexport async function getBlockStates(version: VersionId): Promise {\n\tconst versionData = await getVersion(version)\n\treturn versionData.blockStates\n}\n\nexport function checkVersion(versionId: string, minVersionId: string | undefined, maxVersionId?: string) {\n\tconst version = config.versions.findIndex(v => v.id === versionId)\n\tconst minVersion = minVersionId ? config.versions.findIndex(v => v.id === minVersionId) : 0\n\tconst maxVersion = maxVersionId ? config.versions.findIndex(v => v.id === maxVersionId) : config.versions.length - 1\n\treturn minVersion <= version && version <= maxVersion\n}\n","import type { VersionId } from './Schemas'\nimport { VersionIds } from './Schemas'\n\nexport namespace Store {\n\texport const ID_LANGUAGE = 'language'\n\texport const ID_THEME = 'theme'\n\texport const ID_VERSION = 'schema_version'\n\texport const ID_INDENT = 'indentation'\n\n\texport function getLanguage() {\n\t\treturn localStorage.getItem(ID_LANGUAGE) ?? 'en'\n\t}\n\n\texport function getTheme() {\n\t\treturn localStorage.getItem(ID_THEME) ?? 'dark'\n\t}\n\n\texport function getVersion(): VersionId {\n\t\tconst version = localStorage.getItem(ID_VERSION)\n\t\tif (version && VersionIds.includes(version as VersionId)) {\n\t\t\treturn version as VersionId\n\t\t}\n\t\treturn '1.17'\n\t}\n\n\texport function getIndent() {\n\t\treturn localStorage.getItem(ID_INDENT) ?? '2_spaces'\n\t}\n\n\texport function setLanguage(language: string | undefined) {\n\t\tif (language) localStorage.setItem(ID_LANGUAGE, language)\n\t}\n\n\texport function setTheme(theme: string | undefined) {\n\t\tif (theme) localStorage.setItem(ID_THEME, theme)\n\t}\n\n\texport function setVersion(version: VersionId | undefined) {\n\t\tif (version) localStorage.setItem(ID_VERSION, version)\n\t}\n\n\texport function setIndent(indent: string) {\n\t\tif (indent) localStorage.setItem(ID_INDENT, indent)\n\t}\n}\n","import type { DataModel } from '@mcschema/core'\nimport { ModelPath } from '@mcschema/core'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport { Btn, BtnMenu } from '.'\nimport { useModel } from '../hooks'\nimport { locale } from '../Locales'\nimport { transformOutput } from '../schema/transformOutput'\nimport type { BlockStateRegistry } from '../Schemas'\nimport { Store } from '../Store'\n\nconst INDENT: Record = {\n\t'2_spaces': 2,\n\t'4_spaces': 4,\n\ttabs: '\\t',\n}\n\ntype SourcePanelProps = {\n\tlang: string,\n\tname: string,\n\tmodel: DataModel | null,\n\tblockStates: BlockStateRegistry | null,\n\tdoCopy?: number,\n\tdoDownload?: number,\n\tdoImport?: number,\n\tonError: (message: string) => unknown,\n}\nexport function SourcePanel({ lang, name, model, blockStates, doCopy, doDownload, doImport, onError }: SourcePanelProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst [indent, setIndent] = useState(Store.getIndent())\n\tconst source = useRef(null)\n\tconst download = useRef(null)\n\tconst retransform = useRef()\n\n\tuseEffect(() => {\n\t\tretransform.current = () => {\n\t\t\tif (!model || !blockStates) return\n\t\t\ttry {\n\t\t\t\tconst props = { blockStates: blockStates ?? {} }\n\t\t\t\tconst data = model.schema.hook(transformOutput, new ModelPath(model), model.data, props)\n\t\t\t\tsource.current.value = JSON.stringify(data, null, INDENT[indent]) + '\\n'\n\t\t\t} catch (e) {\n\t\t\t\tonError(`Error getting JSON output: ${e.message}`)\n\t\t\t\tconsole.error(e)\n\t\t\t\tsource.current.value = ''\n\t\t\t}\n\t\t}\n\t})\n\n\tuseModel(model, () => {\n\t\tretransform.current()\n\t})\n\n\tuseEffect(() => {\n\t\tretransform.current()\n\t}, [indent])\n\n\tconst onImport = () => {\n\t\ttry {\n\t\t\tconst data = JSON.parse(source.current.value)\n\t\t\tmodel?.reset(data, false)\n\t\t} catch (e) {\n\t\t\t// TODO\n\t\t}\n\t}\n\n\tuseEffect(() => {\n\t\tif (doCopy && source.current) {\n\t\t\tsource.current.select()\n\t\t\tdocument.execCommand('copy')\n\t\t}\n\t}, [doCopy])\n\n\tuseEffect(() => {\n\t\tif (doDownload && source.current && download.current) {\n\t\t\tconst content = encodeURIComponent(source.current.value)\n\t\t\tdownload.current.setAttribute('href', `data:text/json;charset=utf-8,${content}`)\n\t\t\tdownload.current.setAttribute('download', `${name}.json`)\n\t\t\tdownload.current.click()\n\t\t}\n\t}, [doDownload])\n\n\tuseEffect(() => {\n\t\tif (doImport && source.current) {\n\t\t\tsource.current.value = ''\n\t\t\tsource.current.select()\n\t\t}\n\t}, [doImport])\n\n\tconst changeIndent = (value: string) => {\n\t\tStore.setIndent(value)\n\t\tsetIndent(value)\n\t}\n\n\treturn <> \n\t\t
\n\t\t\t\n\t\t\t\t{Object.entries(INDENT).map(([key]) =>\n\t\t\t\t\t changeIndent(key)}/>\n\t\t\t\t)}\n\t\t\t\n\t\t
\n\t\t\n\t\t\n\t\n}\n","import type { ComponentChildren } from 'preact'\nimport { Icons } from './Icons'\n\ntype ToolCardProps = {\n\ttitle: string,\n\tlink: string,\n\ticon?: keyof typeof Icons,\n\tchildren?: ComponentChildren,\n}\nexport function ToolCard({ title, link, icon, children }: ToolCardProps) {\n\treturn \n\t\t{icon && Icons[icon]}\n\t\t
\n\t\t\t

{title}

\n\t\t\t{children}\n\t\t
\n\t
\n}\n","import { hexId } from '../Utils'\n\nexport class Mounter {\n\tprivate registry: { [id: string]: (el: Element) => void } = {}\n\n\tregister(callback: (el: Element) => void): string {\n\t\tconst id = hexId()\n\t\tthis.registry[id] = callback\n\t\treturn id\n\t}\n\n\ton(type: string, callback: (el: Element) => void): string {\n\t\treturn this.register(el => {\n\t\t\tel.addEventListener(type, evt => {\n\t\t\t\tcallback(el)\n\t\t\t\tevt.stopPropagation()\n\t\t\t})\n\t\t})\n\t}\n\n\tonChange(callback: (el: Element) => void): string {\n\t\treturn this.on('change', callback)\n\t}\n\n\tonClick(callback: (el: Element) => void): string {\n\t\treturn this.on('click', callback)\n\t}\n\n\tmounted(el: Element): void {\n\t\tel.querySelectorAll('[data-id]').forEach(el => {\n\t\t\tconst id = el.getAttribute('data-id')!\n\t\t\tthis.registry[id]?.(el)\n\t\t})\n\t\tthis.registry = {}\n\t}\n}\n","export const Octicon = {\n\tclippy: '',\n\tinfo: '',\n\tissue_opened: '',\n\tplus_circle: '',\n\ttrashcan: '',\n}\n","import type { EnumOption, Hook, ValidationOption } from '@mcschema/core'\nimport { DataModel, MapNode, ModelPath, ObjectNode, Path, relativePath, StringNode } from '@mcschema/core'\nimport type { Localize } from '../Locales'\nimport type { BlockStateRegistry, VersionId } from '../Schemas'\nimport { hexId, htmlEncode } from '../Utils'\nimport type { Mounter } from './Mounter'\nimport { Octicon } from './Octicon'\n\nexport type TreeProps = {\n\tloc: Localize,\n\tmounter: Mounter,\n\tversion: VersionId,\n\tblockStates: BlockStateRegistry,\n}\n\nconst selectRegistries = ['loot_table.type', 'loot_entry.type', 'function.function', 'condition.condition', 'criterion.trigger', 'dimension.generator.type', 'dimension.generator.biome_source.type', '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']\nconst hiddenFields = ['number_provider.type', 'score_provider.type', 'nbt_provider.type', 'int_provider.type', 'float_provider.type', 'height_provider.type']\nconst flattenedFields = ['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']\nconst inlineFields = ['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']\n\n/**\n * Secondary model used to remember the keys of a map\n */\nconst keysModel = new DataModel(MapNode(\n\tStringNode(),\n\tStringNode()\n), { historyMax: 0 })\n\n/**\n * Renders the node and handles events to update the model\n * @returns string HTML representation of this node using the given data\n */\nexport const renderHtml: Hook<[any, TreeProps], [string, string, string]> = {\n\tbase() {\n\t\treturn ['', '', '']\n\t},\n\n\tboolean({ node }, path, value, props) {\n\t\tconst onFalse = props.mounter.onClick(() => {\n\t\t\tpath.model.set(path, node.optional() && value === false ? undefined : false)\n\t\t})\n\t\tconst onTrue = props.mounter.onClick(() => {\n\t\t\tpath.model.set(path, node.optional() && value === true ? undefined : true)\n\t\t})\n\t\treturn ['', `${htmlEncode(props.loc('false'))}\n\t\t\t${htmlEncode(props.loc('true'))}`, '']\n\t},\n\n\tchoice({ choices, config, switchNode }, path, value, props) {\n\t\tconst choice = switchNode.activeCase(path, true)\n\t\tconst pathWithContext = (config?.context) ? new ModelPath(path.getModel(), new Path(path.getArray(), [config.context])) : path\n\t\tconst pathWithChoiceContext = config?.choiceContext ? new Path([], [config.choiceContext]) : config?.context ? new Path([], [config.context]) : path\n\n\t\tconst [prefix, suffix, body] = choice.node.hook(this, pathWithContext, value, props)\n\t\tif (choices.length === 1) {\n\t\t\treturn [prefix, suffix, body]\n\t\t}\n\n\t\tconst inputId = props.mounter.register(el => {\n\t\t\t(el as HTMLSelectElement).value = choice.type\n\t\t\tel.addEventListener('change', () => {\n\t\t\t\tconst c = choices.find(c => c.type === (el as HTMLSelectElement).value) ?? choice\n\t\t\t\tpath.model.set(path, c.change ? c.change(value) : c.node.default())\n\t\t\t})\n\t\t})\n\t\tconst inject = ``\n\n\t\treturn [prefix, inject + suffix, body]\n\t},\n\n\tlist({ children }, path, value, props) {\n\t\tconst onAdd = props.mounter.onClick(() => {\n\t\t\tif (!Array.isArray(value)) value = []\n\t\t\tpath.model.set(path, [children.default(), ...value])\n\t\t})\n\t\tconst onAddBottom = props.mounter.onClick(() => {\n\t\t\tif (!Array.isArray(value)) value = []\n\t\t\tpath.model.set(path, [...value, children.default()])\n\t\t})\n\t\tconst suffix = ``\n\n\t\tlet body = ''\n\t\tif (Array.isArray(value)) {\n\t\t\tbody = value.map((childValue, index) => {\n\t\t\t\tconst removeId = props.mounter.onClick(() => path.model.set(path.push(index), undefined))\n\t\t\t\tconst childPath = path.push(index).contextPush('entry')\n\t\t\t\tconst category = children.category(childPath)\n\t\t\t\tconst [cPrefix, cSuffix, cBody] = children.hook(this, childPath, childValue, props)\n\t\t\t\treturn `
\n\t\t\t\t\t
\n\t\t\t\t\t\t${error(props.loc, childPath, props.mounter)}\n\t\t\t\t\t\t${help(props.loc, childPath, props.mounter)}\n\t\t\t\t\t\t\n\t\t\t\t\t\t${cPrefix}\n\t\t\t\t\t\t\n\t\t\t\t\t\t${cSuffix}\n\t\t\t\t\t
\n\t\t\t\t\t${cBody ? `
${cBody}
` : ''}\n\t\t\t\t\t
\n\t\t\t\t
`\n\t\t\t}).join('')\n\t\t\tif (value.length > 2) {\n\t\t\t\tbody += `
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
`\n\t\t\t}\n\t\t}\n\t\treturn ['', suffix, body]\n\t},\n\n\tmap({ children, keys, config }, path, value, props) {\n\t\tconst keyPath = new ModelPath(keysModel, new Path([hashString(path.toString())]))\n\t\tconst onAdd = props.mounter.onClick(() => {\n\t\t\tconst key = keyPath.get()\n\t\t\tpath.model.set(path.push(key), children.default())\n\t\t})\n\t\tconst blockState = config.validation?.validator === 'block_state_map'? props.blockStates?.[relativePath(path, config.validation.params.id).get()] : null\n\t\tconst keysSchema = blockState?.properties\n\t\t\t? StringNode(null!, { enum: Object.keys(blockState.properties ?? {}) })\n\t\t\t: keys\n\t\tconst keyRendered = keysSchema.hook(this, keyPath, keyPath.get() ?? '', props)\n\t\tconst suffix = keyRendered[1] + ``\n\t\tif (blockState && path.last() === 'Properties') {\n\t\t\tif (typeof value !== 'object') value = {}\n\t\t\tconst properties = Object.entries(blockState.properties)\n\t\t\t\t.map(([key, values]) => [key, StringNode(null!, { enum: values })])\n\t\t\tObject.entries(blockState.properties).forEach(([key, values]) => {\n\t\t\t\tif (typeof value[key] !== 'string') {\n\t\t\t\t\tpath.model.errors.add(path.push(key), 'error.expected_string')\n\t\t\t\t} else if (!values.includes(value[key])) {\n\t\t\t\t\tpath.model.errors.add(path.push(key), 'error.invalid_enum_option', value[key])\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn ObjectNode(Object.fromEntries(properties)).hook(this, path, value, props)\n\t\t}\n\t\tlet body = ''\n\t\tif (typeof value === 'object' && value !== undefined) {\n\t\t\tbody = Object.keys(value)\n\t\t\t\t.map(key => {\n\t\t\t\t\tconst onRemove = props.mounter.onClick(() => path.model.set(path.push(key), undefined))\n\t\t\t\t\tconst childPath = path.modelPush(key)\n\t\t\t\t\tconst category = children.category(childPath)\n\t\t\t\t\tconst childrenSchema = blockState\n\t\t\t\t\t\t? StringNode(null!, { enum: blockState.properties[key] ?? [] })\n\t\t\t\t\t\t: children\n\t\t\t\t\tif (blockState?.properties[key] && !blockState.properties[key].includes(value[key])) {\n\t\t\t\t\t\tpath.model.errors.add(childPath, 'error.invalid_enum_option', value[key])\n\t\t\t\t\t}\n\t\t\t\t\tconst [cPrefix, cSuffix, cBody] = childrenSchema.hook(this, childPath, value[key], props)\n\t\t\t\t\treturn `
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t${error(props.loc, childPath, props.mounter)}\n\t\t\t\t\t\t\t${help(props.loc, childPath, props.mounter)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t${cPrefix}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t${cSuffix}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t${cBody ? `
${cBody}
` : ''}\n\t\t\t\t\t\t
\n\t\t\t\t\t
`\n\t\t\t\t})\n\t\t\t\t.join('')\n\t\t}\n\t\treturn ['', suffix, body]\n\t},\n\n\tnumber({ integer, config }, path, value, { mounter }) {\n\t\tconst onChange = mounter.onChange(el => {\n\t\t\tconst value = (el as HTMLInputElement).value\n\t\t\tconst parsed = config?.color\n\t\t\t\t? parseInt(value.slice(1), 16)\n\t\t\t\t: integer ? parseInt(value) : parseFloat(value)\n\t\t\tpath.model.set(path, parsed)\n\t\t})\n\t\tif (config?.color) {\n\t\t\tconst hex = (value?.toString(16).padStart(6, '0') ?? '000000')\n\t\t\treturn ['', ``, '']\n\t\t}\n\t\treturn ['', ``, '']\n\t},\n\n\tobject({ node, getActiveFields, getChildModelPath }, path, value, props) {\n\t\tlet prefix = ''\n\t\tlet suffix = ''\n\t\tif (node.optional()) {\n\t\t\tif (value === undefined) {\n\t\t\t\tsuffix = ``\n\t\t\t} else {\n\t\t\t\tsuffix = ``\n\t\t\t}\n\t\t}\n\t\tlet body = ''\n\t\tif (typeof value === 'object' && value !== undefined && (!(node.optional() && value === undefined))) {\n\t\t\tconst activeFields = getActiveFields(path)\n\t\t\tconst activeKeys = Object.keys(activeFields)\n\t\t\t\t.filter(k => activeFields[k].enabled(path))\n\t\t\tbody = activeKeys.map(k => {\n\t\t\t\tconst field = activeFields[k]\n\t\t\t\tconst childPath = getChildModelPath(path, k)\n\t\t\t\tconst context = childPath.getContext().join('.')\n\t\t\t\tif (hiddenFields.includes(context)) {\n\t\t\t\t\treturn ''\n\t\t\t\t}\n\n\t\t\t\tconst category = field.category(childPath)\n\t\t\t\tconst [cPrefix, cSuffix, cBody] = field.hook(this, childPath, value[k], props)\n\t\t\t\tif (cPrefix.length === 0 && cSuffix.length === 0 && cBody.length === 0) {\n\t\t\t\t\treturn ''\n\t\t\t\t}\n\n\t\t\t\tconst isFlattened = field.type(childPath) === 'object' && flattenedFields.includes(context)\n\t\t\t\tconst isInlined = inlineFields.includes(context)\n\t\t\t\tif (isFlattened || isInlined) {\n\t\t\t\t\tprefix += `${error(props.loc, childPath, props.mounter)}${help(props.loc, childPath, props.mounter)}${cPrefix}`\n\t\t\t\t\tsuffix += cSuffix\n\t\t\t\t\treturn isFlattened ? cBody : ''\n\t\t\t\t}\n\n\t\t\t\treturn `
\n\t\t\t\t\t
\n\t\t\t\t\t\t${error(props.loc, childPath, props.mounter)}\n\t\t\t\t\t\t${help(props.loc, childPath, props.mounter)}\n\t\t\t\t\t\t${cPrefix}\n\t\t\t\t\t\t\n\t\t\t\t\t\t${cSuffix}\n\t\t\t\t\t
\n\t\t\t\t\t${cBody ? `
${cBody}
` : ''}\n\t\t\t\t
`\n\t\t\t})\n\t\t\t\t.join('')\n\t\t}\n\t\treturn [prefix, suffix, body]\n\t},\n\n\tstring({ node, getValues, config }, path, value, props) {\n\t\tconst inputId = props.mounter.register(el => {\n\t\t\t(el as HTMLSelectElement).value = value ?? ''\n\t\t\tel.addEventListener('change', evt => {\n\t\t\t\tconst newValue = (el as HTMLSelectElement).value\n\t\t\t\tpath.model.set(path, newValue.length === 0 ? undefined : newValue)\n\t\t\t\tevt.stopPropagation()\n\t\t\t})\n\t\t})\n\t\tlet suffix\n\t\tconst values = getValues()\n\t\tif ((isEnum(config) && !config.additional)\n\t\t\t|| selectRegistries.includes(path.getContext().join('.'))\t) {\n\t\t\tlet context = new Path([])\n\t\t\tif (isEnum(config) && typeof config.enum === 'string') {\n\t\t\t\tcontext = context.contextPush(config.enum)\n\t\t\t} else if (!isEnum(config) && config?.validator === 'resource' && typeof config.params.pool === 'string') {\n\t\t\t\tcontext = context.contextPush(config.params.pool)\n\t\t\t}\n\t\t\tsuffix = ``\n\t\t} else if (!isEnum(config) && config?.validator === 'block_state_key') {\n\t\t\tconst blockState = props.blockStates?.[relativePath(path, config.params.id).get()]\n\t\t\tconst values = Object.keys(blockState?.properties ?? {})\n\t\t\tsuffix = ``\n\t\t} else {\n\t\t\tconst datalistId = hexId()\n\t\t\tsuffix = `\n\t\t\t\t${values.length === 0 ? '' :\n\t\t`\n\t\t\t\t\t\t\t\t${values.map(v =>\n\t\t``}`\n\t\t}\n\t\treturn ['', suffix, '']\n\t},\n}\n\nfunction isEnum(value?: ValidationOption | EnumOption): value is EnumOption {\n\treturn !!(value as any)?.enum\n}\n\nfunction hashString(str: string) {\n\tvar hash = 0, i, chr\n\tfor (i = 0; i < str.length; i++) {\n\t\tchr = str.charCodeAt(i)\n\t\thash = ((hash << 5) - hash) + chr\n\t\thash |= 0\n\t}\n\treturn hash\n}\n\nfunction pathLocale(loc: Localize, path: Path, ...params: string[]) {\n\tconst ctx = path.getContext()\n\tfor (let i = 0; i < ctx.length; i += 1) {\n\t\tconst key = ctx.slice(i).join('.')\n\t\tconst result = loc(key, ...params)\n\t\tif (key !== result) {\n\t\t\treturn result\n\t\t}\n\t}\n\treturn htmlEncode(ctx[ctx.length - 1])\n}\n\nfunction error(loc: Localize, path: ModelPath, mounter: Mounter) {\n\tconst e = path.model.errors.get(path, true)\n\tif (e.length === 0) return ''\n\tconst message = e[0].params ? loc(e[0].error, ...e[0].params) : loc(e[0].error)\n\treturn popupIcon('node-error', 'issue_opened', htmlEncode(message), mounter)\n}\n\nfunction help(loc: Localize, path: Path, mounter: Mounter) {\n\tconst key = path.contextPush('help').getContext().join('.')\n\tconst message = loc(key)\n\tif (message === key) return ''\n\treturn popupIcon('node-help', 'info', htmlEncode(message), mounter)\n}\n\nconst popupIcon = (type: string, icon: keyof typeof Octicon, popup: string, mounter: Mounter) => {\n\tconst onClick = mounter.onClick(el => {\n\t\tel.getElementsByTagName('span')[0].classList.add('show')\n\t\tdocument.body.addEventListener('click', () => {\n\t\t\tel.getElementsByTagName('span')[0].classList.remove('show')\n\t\t}, { capture: true, once: true })\n\t})\n\treturn `
\n\t\t${Octicon[icon]}\n\t\t${popup}\n\t
`\n}\n\nconst contextMenu = (loc: Localize, path: ModelPath, mounter: Mounter) => {\n\tconst id = mounter.register(el => {\n\t\tconst openMenu = () => {\n\t\t\tconst popup = document.createElement('div')\n\t\t\tpopup.classList.add('node-menu')\n\n\t\t\tconst message = loc(path.contextPush('help').getContext().join('.'))\n\t\t\tif (!message.endsWith('.help')) {\n\t\t\t\tpopup.insertAdjacentHTML('beforeend', `${message}`)\n\t\t\t}\n\n\t\t\tconst context = path.getContext().join('.')\n\t\t\tpopup.insertAdjacentHTML('beforeend', `\n\t\t\t\t
\n\t\t\t\t\t${Octicon.clippy}\n\t\t\t\t\tContext: \n\t\t\t\t\t${context}\n\t\t\t\t
`)\n\t\t\tpopup.querySelector('.menu-item .btn')?.addEventListener('click', () => {\n\t\t\t\tconst inputEl = document.createElement('input')\n\t\t\t\tinputEl.value = context\n\t\t\t\tel.appendChild(inputEl) \n\t\t\t\tinputEl.select()\n\t\t\t\tdocument.execCommand('copy')\n\t\t\t\tel.removeChild(inputEl)\n\t\t\t})\n\n\t\t\tel.appendChild(popup)\n\t\t\tdocument.body.addEventListener('click', () => {\n\t\t\t\ttry {el.removeChild(popup)} catch (e) {}\n\t\t\t}, { capture: true, once: true })\n\t\t\tdocument.body.addEventListener('contextmenu', () => {\n\t\t\t\ttry {el.removeChild(popup)} catch (e) {}\n\t\t\t}, { capture: true, once: true })\n\t\t}\n\t\tel.addEventListener('contextmenu', evt => {\n\t\t\topenMenu()\n\t\t\tevt.preventDefault()\n\t\t})\n\t\tlet timer: any = null\n\t\tel.addEventListener('touchstart', () => {\n\t\t\ttimer = setTimeout(() => {\n\t\t\t\topenMenu()\n\t\t\t\ttimer = null\n\t\t\t}, 800)\n\t\t})\n\t\tel.addEventListener('touchend', () => {\n\t\t\tif (timer) {\n\t\t\t\tclearTimeout(timer)\n\t\t\t\ttimer = null\n\t\t\t}\n\t\t})\n\t})\n\treturn `data-id=\"${id}\"`\n}\n","import type { DataModel } from '@mcschema/core'\nimport { ModelPath } from '@mcschema/core'\nimport { useEffect, useRef } from 'preact/hooks'\nimport { useModel } from '../hooks'\nimport { locale } from '../Locales'\nimport { Mounter } from '../schema/Mounter'\nimport { renderHtml } from '../schema/renderHtml'\nimport type { BlockStateRegistry, VersionId } from '../Schemas'\n\ntype TreePanelProps = {\n\tlang: string,\n\tversion: VersionId,\n\tmodel: DataModel | null,\n\tblockStates: BlockStateRegistry | null,\n\tonError: (message: string) => unknown,\n}\nexport function Tree({ lang, model, version, blockStates, onError }: TreePanelProps) {\n\tconst tree = useRef(null)\n\tconst redraw = useRef()\n\n\tuseEffect(() => {\n\t\tredraw.current = () => {\n\t\t\tif (!model || !blockStates) return\n\t\t\ttry {\n\t\t\t\tconst mounter = new Mounter()\n\t\t\t\tconst props = { loc: locale.bind(null, lang), version, mounter, blockStates }\n\t\t\t\tconst path = new ModelPath(model)\n\t\t\t\tconst rendered = model.schema.hook(renderHtml, path, model.data, props)\n\t\t\t\tconst category = model.schema.category(path)\n\t\t\t\tconst type = model.schema.type(path)\n\t\t\t\tlet html = rendered[2]\n\t\t\t\tif (rendered[1]) {\n\t\t\t\t\thtml = `
\n\t\t\t\t\t\t
${rendered[0]}${rendered[1]}
\n\t\t\t\t\t\t
${rendered[2]}
\n\t\t\t\t\t
`\n\t\t\t\t}\n\t\t\t\ttree.current.innerHTML = html\n\t\t\t\tmounter.mounted(tree.current)\n\t\t\t} catch (e) {\n\t\t\t\tonError(`Error rendering the tree: ${e.message}`)\n\t\t\t\tconsole.error(e)\n\t\t\t\ttree.current.innerHTML = ''\n\t\t\t}\n\t\t}\n\t})\n\n\tuseModel(model, () => {\n\t\tredraw.current()\n\t})\n\n\tuseEffect(() => {\n\t\tredraw.current()\n\t}, [lang, model, blockStates])\n\n\treturn
\n}\n","import { locale } from '../Locales'\n\ntype FieldSettingsProps = {\n\tlang: string,\n\tpath?: string,\n}\nexport function FieldSettings({ lang }: FieldSettingsProps) {\n\tconst loc = locale.bind(null, lang)\n\treturn
\n\t\t
\n\t\t\t

{loc('settings.fields.description')}

\n\t\t\t
    \n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n}\n","import type { DataModel } from '@mcschema/core'\nimport { getCurrentUrl } from 'preact-router'\nimport { useEffect, useErrorBoundary, useState } from 'preact/hooks'\nimport config from '../../config.json'\nimport { Analytics } from '../Analytics'\nimport { Ad, Btn, BtnInput, BtnMenu, ErrorPanel, HasPreview, Octicon, PreviewPanel, SourcePanel, Tree } from '../components'\nimport { fetchPreset } from '../DataFetcher'\nimport { locale } from '../Locales'\nimport type { BlockStateRegistry, VersionId } from '../Schemas'\nimport { checkVersion, getBlockStates, getCollections, getModel } from '../Schemas'\nimport { getGenerator } from '../Utils'\n\ntype GeneratorProps = {\n\tlang: string,\n\tchangeTitle: (title: string, versions?: string[]) => unknown,\n\tversion: VersionId,\n\tonChangeVersion: (version: VersionId) => unknown,\n\tdefault?: true,\n}\nexport function Generator({ lang, changeTitle, version, onChangeVersion }: GeneratorProps) {\n\tconst loc = locale.bind(null, lang)\n\tconst [errors, setErrors] = useState([])\n\tconst addError = (error: string) => {\n\t\tsetErrors([...errors, error])\n\t}\n\tconst dismissError = (error: string) => {\n\t\tsetErrors(errors.filter(e => e !== error))\n\t}\n\tconst [errorBoundary] = useErrorBoundary()\n\tif (errorBoundary) {\n\t\treturn
\n\t}\n\n\tconst generator = getGenerator(getCurrentUrl())\n\tif (!generator) {\n\t\treturn
\n\t}\n\n\tconst minVersion = generator.minVersion ?? '1.15'\n\tconst allowedVersions = config.versions\n\t\t.filter(v => checkVersion(v.id, minVersion))\n\t\t.map(v => v.id as VersionId)\n\n\tchangeTitle(loc('title.generator', loc(generator.id)), allowedVersions)\n\n\tconst [model, setModel] = useState(null)\n\tconst [blockStates, setBlockStates] = useState(null)\n\tuseEffect(() => {\n\t\tsetModel(null)\n\t\tgetBlockStates(version)\n\t\t\t.then(b => setBlockStates(b))\n\t\tgetModel(version, generator.id)\n\t\t\t.then(m => setModel(m))\n\t\t\t.catch(e => { console.error(e); addError(e.message) })\n\t}, [version, generator.id])\n\n\tconst reset = () => {\n\t\tAnalytics.generatorEvent('reset')\n\t\tmodel?.reset(model.schema.default(), true)\n\t}\n\tconst undo = (e: MouseEvent) => {\n\t\te.stopPropagation()\n\t\tAnalytics.generatorEvent('undo', 'Menu')\n\t\tmodel?.undo()\n\t}\n\tconst redo = (e: MouseEvent) => {\n\t\te.stopPropagation()\n\t\tAnalytics.generatorEvent('redo', 'Menu')\n\t\tmodel?.redo()\n\t}\n\n\tconst onKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.ctrlKey && e.key === 'z') {\n\t\t\tAnalytics.generatorEvent('undo', 'Hotkey')\n\t\t\tmodel?.undo()\n\t\t} else if (e.ctrlKey && e.key === 'y') {\n\t\t\tAnalytics.generatorEvent('redo', 'Hotkey')\n\t\t\tmodel?.redo()\n\t\t}\n\t}\n\tuseEffect(() => {\n\t\tdocument.addEventListener('keyup', onKeyUp)\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('keyup', onKeyUp)\n\t\t}\n\t}, [model])\n\n\tconst [presetFilter, setPresetFilter] = useState('')\n\tconst [presetResults, setPresetResults] = useState([])\n\tuseEffect(() => {\n\t\tgetCollections(version)\n\t\t\t.then(collections => {\n\t\t\t\tconst terms = (presetFilter ?? '').trim().split(' ')\n\t\t\t\tconst presets = collections.get(generator.id)\n\t\t\t\t\t.map(p => p.slice(10))\n\t\t\t\t\t.filter(p => terms.every(t => p.includes(t)))\n\t\t\t\tif (presets) {\n\t\t\t\t\tsetPresetResults(presets)\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(e => { console.error(e); addError(e.message) })\n\t}, [version, generator.id, presetFilter])\n\n\tconst loadPreset = (id: string) => {\n\t\tAnalytics.generatorEvent('load-preset', id)\n\t\tfetchPreset(version, generator.path ?? generator.id, id).then(preset => {\n\t\t\tmodel?.reset(preset, false)\n\t\t})\n\t}\n\n\tconst [sourceShown, setSourceShown] = useState(window.innerWidth > 820)\n\tconst [doCopy, setCopy] = useState(0)\n\tconst [doDownload, setDownload] = useState(0)\n\tconst [doImport, setImport] = useState(0)\n\n\tconst copySource = () => {\n\t\tAnalytics.generatorEvent('copy')\n\t\tsetCopy(doCopy + 1)\n\t}\n\tconst downloadSource = () => {\n\t\tAnalytics.generatorEvent('download')\n\t\tsetDownload(doDownload + 1)\n\t}\n\tconst importSource = () => {\n\t\tAnalytics.generatorEvent('import')\n\t\tsetSourceShown(true)\n\t\tsetImport(doImport + 1)\n\t}\n\tconst toggleSource = () => {\n\t\tAnalytics.generatorEvent('toggle-output', !sourceShown ? 'visible' : 'hidden')\n\t\tsetSourceShown(!sourceShown)\n\t\tsetCopy(0)\n\t\tsetDownload(0)\n\t\tsetImport(0)\n\t}\n\n\tconst [previewShown, setPreviewShown] = useState(false)\n\n\tconst hasPreview = HasPreview.includes(generator.id)\n\tlet actionsShown = 1\n\tif (hasPreview) actionsShown += 1\n\tif (sourceShown) actionsShown += 2\n\n\tconst togglePreview = () => {\n\t\tAnalytics.generatorEvent('toggle-preview', !previewShown ? 'visible' : 'hidden')\n\t\tsetPreviewShown(!previewShown)\n\t}\n\n\treturn <>\n\t\t
\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t{presetResults.map(preset => loadPreset(preset)} />)}\n\t\t\t\t\t
\n\t\t\t\t\t{presetResults.length === 0 && }\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{allowedVersions.reverse().map(v =>\n\t\t\t\t\t\t onChangeVersion(v)} />\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t{errors.map(e => dismissError(e)} />)}\n\t\t\t\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t{previewShown ? Octicon.x_circle : Octicon.play}\n\t\t\t
\n\t\t\t
\n\t\t\t\t{Octicon.download}\n\t\t\t
\n\t\t\t
\n\t\t\t\t{Octicon.clippy}\n\t\t\t
\n\t\t\t
\n\t\t\t\t{sourceShown ? Octicon.chevron_right : Octicon.code}\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t\n\t\t
\n\t\t
\n\t\t\t\n\t\t
\n\t\n}\n","import config from '../../config.json'\nimport { ToolCard } from '../components'\nimport { locale } from '../Locales'\nimport { cleanUrl } from '../Utils'\n\ntype HomeProps = {\n\tlang: string,\n\tchangeTitle: (title: string) => unknown,\n\tpath?: string,\n}\nexport function Home({ lang, changeTitle }: HomeProps) {\n\tconst loc = locale.bind(null, lang)\n\tchangeTitle(loc('title.home'))\n\treturn
\n\t\t
\n\t\t\t{config.generators.filter(g => !g.category).map(g => \n\t\t\t\t\n\t\t\t)}\n\t\t\t\n\t\t\t
\n\t\t\t\n\t\t\t\t

Analyse your performance reports

\n\t\t\t
\n\t\t\t\n\t\t\t\t

Browse through and mix all the vanilla sounds

\n\t\t\t
\n\t\t\t\n\t\t\t\t

Convert your 1.16 data packs to 1.17

\n\t\t\t
\n\t\t
\n\t
\n}\n","import config from '../../config.json'\nimport { ToolCard } from '../components'\nimport { locale } from '../Locales'\nimport { cleanUrl } from '../Utils'\n\ntype WorldgenProps = {\n\tlang: string,\n\tchangeTitle: (title: string) => unknown,\n\tpath?: string,\n}\nexport function Worldgen({ lang, changeTitle }: WorldgenProps) {\n\tconst loc = locale.bind(null, lang)\n\tchangeTitle(loc('title.generator_category', loc('worldgen')))\n\treturn
\n\t\t
\n\t\t\t{config.generators.filter(g => g.category === 'worldgen').map(g => \n\t\t\t\t\n\t\t\t)}\n\t\t
\n\t
\n}\n","import { render } from 'preact'\nimport type { RouterOnChangeArgs } from 'preact-router'\nimport { Router } from 'preact-router'\nimport { useEffect, useState } from 'preact/hooks'\nimport '../styles/global.css'\nimport '../styles/nodes.css'\nimport { Analytics } from './Analytics'\nimport { Header } from './components'\nimport { loadLocale, locale, Locales } from './Locales'\nimport { FieldSettings, Generator, Home, Worldgen } from './pages'\nimport type { VersionId } from './Schemas'\nimport { Store } from './Store'\nimport { cleanUrl } from './Utils'\n\nfunction Main() {\n\tconst [lang, setLanguage] = useState('en')\n\tconst changeLanguage = async (language: string) => {\n\t\tif (!Locales[language]) {\n\t\t\tawait loadLocale(language)\n\t\t}\n\t\tAnalytics.setLanguage(language)\n\t\tStore.setLanguage(language)\n\t\tsetLanguage(language)\n\t}\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\tconst target = Store.getLanguage()\n\t\t\tawait Promise.all([\n\t\t\t\tloadLocale('en'),\n\t\t\t\t...(target !== 'en' ? [loadLocale(target)] : []),\n\t\t\t])\n\t\t\tsetLanguage(target)\n\t\t})()\n\t}, [])\n\n\tconst [theme, setTheme] = useState(Store.getTheme())\n\tconst changeTheme = (theme: string) => {\n\t\tAnalytics.setTheme(theme)\n\t\tStore.setTheme(theme)\n\t\tsetTheme(theme)\n\t}\n\tuseEffect(() => {\n\t\tdocument.documentElement.setAttribute('data-theme', theme)\n\t}, [theme])\n\n\tconst [version, setVersion] = useState(Store.getVersion())\n\tconst changeVersion = (version: VersionId) => {\n\t\tAnalytics.setVersion(version)\n\t\tStore.setVersion(version)\n\t\tsetVersion(version)\n\t}\n\n\tconst [title, setTitle] = useState(locale(lang, 'title.home'))\n\tconst changeTitle = (title: string, versions = ['1.15', '1.16', '1.17']) => {\n\t\tdocument.title = `${title} Minecraft ${versions.join(', ')}`\n\t\tsetTitle(title)\n\t}\n\n\tconst changeRoute = (e: RouterOnChangeArgs) => {\n\t\t// Needs a timeout to ensure the title is set correctly\n\t\tsetTimeout(() => Analytics.pageview(cleanUrl(e.url)))\n\t}\n\n\treturn <>\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n}\n\nrender(
, document.body)\n"],"names":["Analytics","type","id","getElementById","remove","window","load","data-ea-publisher","data-ea-type","class","icon","label","active","class_","onClick","Octicon","large","doSelect","value","onChange","onKeyUp","e","value2","target","endsWith","isNaN","Number","ref","useRef","current","select","stopPropagation","relative","children","setActive","useState","hider","body","addEventListener","removeEventListener","Btn","Analytics2","ID_SITE","ID_GENERATOR","category","action","index","pageview","page","setLanguage","language","setTheme","theme","setVersion","version","setPreview","preview","generatorEvent","archive","xmlns","viewBox","width","height","fill-rule","d","arrow_left","arrow_right","chevron_right","clippy","code","dash","device_desktop","download","eye","eye_closed","gear","globe","history","kebab_horizontal","link","mark_github","moon","play","plus","search","sun","sync","tag","three_bars","unfold","upload","x","x_circle","error","onDismiss","error2","href","scriptRel","seen","__vitePreload","baseModule","deps","relList","document","createElement","supports","Promise","all","map","dep","isCss","cssSelector","querySelector","rel","as","crossOrigin","head","appendChild","res","rej","then","Locales","fallback","English","key","params","replace","parseInt","match","slice","resolveLocaleParams","en","langConfig","config","languages","find","lang","data","__variableDynamicImportRuntime0__","schema","schemas","__variableDynamicImportRuntime1__","__spreadValues","default","dec2hex","dec","toString","substr","length","arr","Uint8Array","crypto","getRandomValues","Array","from","join","str","url","replaceAll","trimmedUrl","generators","g","h","Math","abs","s2","i","imul","charCodeAt","hashString","a2","b","c","max","min","lerp","f","Themes","system","dark","light","title","changeTheme","changeLanguage","loc","locale","bind","getCurrentUrl","Link","cleanUrl","Icons","home","BtnMenu","name","Object","entries","th","fill","rx","y","report","sounds","cx","cy","r","clip-rule","model","invalidated","listener","[object Object]","addListener","removeListener","element","drag","request","dragStart","pending","onMouseDown","offsetX","offsetY","onMouseMove","dx","dy","requestAnimationFrame","onMouseUp","_e","random","xo","yo","zo","p","n","int32","this","y2","z","x2","y22","z2","x3","floor","y3","z3","x4","y4","z4","x5","smoothstep","y5","z5","y6","sampleAndLerp","grad","_ImprovedNoise","GRADIENT","j","P","k","l2","m","o","lerp2","lerp3","gradDot","ImprovedNoise","seed","firstOctave","amplitudes","noiseLevels","seedrandom","lowestFreqInputFactor","pow","lowestFreqValueFactor","PerlinNoise","fixY","inputF","valueF","noise","wrap","first","second","Infinity","expectedDeviation","valueFactor","getValue","NoiseMaps","state","img","options","config2","NormalNoise","biomeColorCache","biomes","forEach","biome","getBiomeColor","biomeColors","ox","offset","oy","row","col","xx","scale","yy","closestBiome","color","multiNoise","fixed","shift","numBiomes","checkerboard","VanillaColors","stringToColor","isArray","n2","minDist","minBiome","dist","fitness","parameters","altitude","temperature","humidity","weirdness","minecraft:badlands","minecraft:badlands_plateau","minecraft:bamboo_jungle","minecraft:bamboo_jungle_hills","minecraft:basalt_deltas","minecraft:beach","minecraft:birch_forest","minecraft:birch_forest_hills","minecraft:cold_ocean","minecraft:crimson_forest","minecraft:dark_forest","minecraft:dark_forest_hills","minecraft:deep_cold_ocean","minecraft:deep_frozen_ocean","minecraft:deep_lukewarm_ocean","minecraft:deep_ocean","minecraft:deep_warm_ocean","minecraft:desert","minecraft:desert_hills","minecraft:desert_lakes","minecraft:end_barrens","minecraft:end_highlands","minecraft:end_midlands","minecraft:eroded_badlands","minecraft:flower_forest","minecraft:forest","minecraft:frozen_ocean","minecraft:frozen_river","minecraft:giant_spruce_taiga","minecraft:giant_spruce_taiga_hills","minecraft:giant_tree_taiga","minecraft:giant_tree_taiga_hills","minecraft:gravelly_mountains","minecraft:ice_spikes","minecraft:jungle","minecraft:jungle_edge","minecraft:jungle_hills","minecraft:lukewarm_ocean","minecraft:modified_badlands_plateau","minecraft:modified_gravelly_mountains","minecraft:modified_jungle","minecraft:modified_jungle_edge","minecraft:modified_wooded_badlands_plateau","minecraft:mountain_edge","minecraft:mountains","minecraft:mushroom_field_shore","minecraft:mushroom_fields","minecraft:nether_wastes","minecraft:ocean","minecraft:plains","minecraft:river","minecraft:savanna","minecraft:savanna_plateau","minecraft:shattered_savanna","minecraft:shattered_savanna_plateau","minecraft:small_end_islands","minecraft:snowy_beach","minecraft:snowy_mountains","minecraft:snowy_taiga","minecraft:snowy_taiga_hills","minecraft:snowy_taiga_mountains","minecraft:snowy_tundra","minecraft:soul_sand_valley","minecraft:stone_shore","minecraft:sunflower_plains","minecraft:swamp","minecraft:swamp_hills","minecraft:taiga","minecraft:taiga_hills","minecraft:taiga_mountains","minecraft:tall_birch_forest","minecraft:tall_birch_hills","minecraft:the_end","minecraft:the_void","minecraft:warm_ocean","minecraft:warped_forest","minecraft:wooded_badlands_plateau","minecraft:wooded_hills","minecraft:wooded_mountains","terrain","featureColors","startsWith","pos","ctx","base","nextInt","spread","normalize","min_inclusive","max_inclusive","sampleInt","source","features","indexOf","push","feature","placements","useFeature","featureFn","Features","JSON","stringify","decorator2","decoratorFn","Decorators","decorated","getPositions","decorator","getPlacements","random_boolean_selector","feature_true","feature_false","random_selector","chance","simple_random_selector","count","count_extra","extra_chance","extra_count","count_multilayer","count_noise","biomeInfoNoise","noise_level","below_noise","above_noise","count_noise_biased","factor","noise_factor","ceil","noise_offset","noise_to_count_ratio","dark_oak_tree","_config","_","seaLevel","clamp","outer","flatMap","inner","depth_average","decorateY","baseline","emerald_ore","fire","glowstone","heightmap","heightmap_spread_double","heightmap_world_surface","iceberg","lava_lake","nope","range","maximum","top_offset","bottom_offset","range_biased","range_very_biased","spread_32_above","top_solid_heightmap","magma","square","water_lake","minLimitPerlinNoise","fromRange","maxLimitPerlinNoise","mainPerlinNoise","depthNoise","settings","depth","xOffset","chunkWidth","size_horizontal","chunkHeight","size_vertical","chunkCountY","amplified","biomeDepth","biomeScale","noiseColumnCache","noise1","fillNoiseColumn","noise2","cachedColumn","xzScale","sampling","xz_scale","yScale","y_scale","xzFactor","xz_factor","yFactor","y_factor","randomDensity","random_density_offset","getRandomDensity","sampleAndClampNoise","getOctaveNoise","falloff","density_factor","density_offset","top_slide","size","clampedLerp","bottom_slide","minLimitNoise","maxLimitNoise","mainNoise","HasPreview","Previews","generator","path","Path","predicate","get","shown","setScale","setSeed","hexId","focused","setFocused","canvas","redrawTimeout","redraw","refocus","getContext","createImageData","putImageData","setTimeout","clientWidth","clientHeight","toWorld","getBiome","hover","onMouseLeave","changeScale","newScale","setBiomeDepth","setBiomeScale","NoiseChunkGenerator","reset","iterateNoiseColumn","reverse","getColor","BtnInput","v","setCount","filter","transformOutput","switchNode","props","hook","obj","blockState","validation","validator","blockStates","relativePath","keys","properties","includes","getActiveFields","activeFields","enabled","localStorage","removeItem","mcdataUrl","vanillaDatapackUrl","refs","hash","versionId","collectionTarget","blockStateTarget","versions","debug","dynamic","getItem","async","matches","cache","caches","open","promises","delete","warn","message","deleteMatching","setItem","fetchRegistries","fetchBlockStateMap","fetchDynamicRegistries","registries","checkVersion","minVersion","maxVersion","mcdata_master","getData","data2","register","values","states","assign","vanilla_datapack_summary","fn","cacheResponse","ok","json","fetchResponse","fetch","responseData","put","Response","VersionIds","Versions","Models","versionGetter","1.15","java15","1.16","java16","1.17","java17","collections","getCollections","fetchData","getSchemas","Error","minVersionId","maxVersionId","findIndex","Store","Store2","getLanguage","getTheme","getVersion","getIndent","setIndent","indent","INDENT","2_spaces","4_spaces","tabs","doCopy","doDownload","doImport","onError","retransform","ModelPath","execCommand","content","encodeURIComponent","setAttribute","click","changeIndent","parse","spellcheck","autocorrect","placeholder","style","callback","registry","el","on","querySelectorAll","el2","getAttribute","info","issue_opened","plus_circle","trashcan","selectRegistries","hiddenFields","flattenedFields","inlineFields","keysModel","DataModel","MapNode","StringNode","historyMax","renderHtml","node","onFalse","mounter","set","optional","onTrue","htmlEncode","choices","choice","activeCase","pathWithContext","context","getModel","getArray","pathWithChoiceContext","choiceContext","prefix","suffix","c2","change","pathLocale","contextPush","onAdd","onAddBottom","childValue","removeId","childPath","cPrefix","cSuffix","cBody","help","contextMenu","keyPath","enum","last","errors","add","ObjectNode","fromEntries","onRemove","modelPush","childrenSchema","integer","parsed","parseFloat","padStart","getChildModelPath","field","isFlattened","isInlined","getValues","inputId","newValue","isEnum","additional","pool","datalistId","result","popupIcon","popup","getElementsByTagName","classList","capture","once","openMenu","insertAdjacentHTML","inputEl","removeChild","preventDefault","timer","tree","Mounter","rendered","html","innerHTML","mounted","changeTitle","onChangeVersion","setErrors","addError","errorBoundary","useErrorBoundary","ErrorPanel","getGenerator","allowedVersions","setModel","setBlockStates","versionData","schemaName","validate","catch","ctrlKey","undo","redo","presetFilter","setPresetFilter","presetResults","setPresetResults","terms","trim","split","presets","every","t","loadPreset","vanilla_datapack_data","preset","sourceShown","setSourceShown","innerWidth","setCopy","setDownload","setImport","previewShown","setPreviewShown","hasPreview","actionsShown","Ad","dismissError","Tree","__spreadProps","PreviewPanel","SourcePanel","ToolCard","loadLocale","documentElement","setTitle","title2","Header","theme2","Router","Home","FieldSettings","Worldgen","Generator","version2","render","Main"],"mappings":"4iBAAiBA,cCQEC,KAAEA,KAAMC,cAChB,6BACAC,eAAe,sBAAmBC,SACvC,eAAgBC,mBACRC,SAEV,MAEK,MAAD,CAAKC,oBAAkB,mBAAmBC,eAAcP,EAAMQ,MAAM,eAAeP,GAAAA,gBCPvEQ,KAAEA,QAAMC,SAAOC,EAAQH,MAAOI,UAAQC,aACjD,MAAD,CAAKL,MAAO,MAAMG,EAAS,UAAY,KAAKC,EAAS,IAAIA,IAAW,KAAMC,QAAAA,GAC/EJ,GAAQK,EAAQL,GAChBC,KAAU,OAAD,KAAOA,gBCAMD,KAAEA,QAAMC,QAAOK,OAAOf,WAAMgB,QAAUC,WAAOC,UAC/DC,OAAuB,IAAbD,EAAyB,OAAYE,UAC9CC,EAASD,EAAEE,OAA4BL,MAChC,WAATjB,IAAuBqB,EAAME,SAAS,MAASC,MAAMC,OAAOJ,iBACpDA,IAIPK,EAAMC,EAAyB,gBAC3B,KACLX,GAAYU,EAAIE,WACfA,QAAQC,WAEX,CAACb,MAEI,MAAD,CAAKR,MAAO,kBAAiBO,EAAQ,cAAgB,IAAMF,WAAcO,EAAEU,mBAChFrB,GAAQK,EAAQL,GAChBC,KAAU,OAAD,KAAOA,KAChB,QAAD,CAAOgB,IAAAA,EAAU1B,KAAK,OAAOiB,MAAAA,EAAcE,QAAAA,iBCnBrBV,KAAEA,QAAMC,WAAOqB,WAAUC,UACzCrB,EAAQsB,GAAaC,GAAS,GAE/BC,EAAQ,QACH,cAGD,KACLxB,YACMyB,K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,KAAQ,CAAC/Y,KAAAA,EAAMooB,YAAAA,OACzBwD,GAADtrB,GAAeyY,KAAK,oBAAuB,CAAC/Y,KAAAA,EAAMooB,YAAAA,OACjDyD,GAADvrB,GAAUyY,KAAK,aAAgB,CAAC/Y,KAAAA,EAAMooB,YAAAA,OACrC0D,GAADd,KAAWzqB,SAAO,GAAK,CAACP,KAAAA,EAAMlF,QAAAA,EAASstB,YAAAA,IAAvC,CAAqDC,gBAvBhC0D,MACZlxB,WAAWkxB,MACflxB,WAAWkxB,KACNA,SAyBbC,IAAQC,GAAD,MAAUluB,SAASlE"} \ No newline at end of file diff --git a/assets/index.89e7a3fc.css b/assets/index.89e7a3fc.css deleted file mode 100644 index d5d1f726..00000000 --- a/assets/index.89e7a3fc.css +++ /dev/null @@ -1 +0,0 @@ -:root{--background-1:#1b1b1b;--background-2:#252525;--background-3:#2f2f2f;--background-4:#3d3d3d;--background-5:#464646;--text-1:#ffffff;--text-2:#dcdcdc;--text-3:#c3c3c3;--accent-blue:#50baf9;--accent-red:#f1453f;--nav:#91908f;--nav-hover:#b4b3b0;--nav-faded:#4d4c4c;--nav-faded-hover:#6e6e6e;--selection:#6786dd99;--errors-background:#62190f;--errors-text:#ffffffcc}:root[data-theme=light]{--background-1:#fafafa;--background-2:#e2e2e2;--background-3:#d4d3d3;--background-4:#cccccc;--background-5:#d6d6d6;--text-1:#000000;--text-2:#505050;--text-3:#6a6a6a;--accent-blue:#088cdb;--accent-red:#cc312c;--nav:#343a40;--nav-hover:#565d64;--nav-faded:#9fa2a7;--nav-faded-hover:#bcbfc3;--selection:#6786dd99;--errors-background:#f66653;--errors-text:#000000cc}@media (prefers-color-scheme:light){:root[data-theme=system]{--background-1:#fafafa;--background-2:#e2e2e2;--background-3:#d4d3d3;--background-4:#cccccc;--background-5:#d6d6d6;--text-1:#000000;--text-2:#505050;--text-3:#6a6a6a;--accent-blue:#088cdb;--accent-red:#cc312c;--nav:#343a40;--nav-hover:#565d64;--nav-faded:#9fa2a7;--nav-faded-hover:#bcbfc3;--selection:#6786dd99;--errors-background:#f66653;--errors-text:#000000cc}}*{box-sizing:border-box;margin:0;padding:0}::selection{background-color:var(--selection)}a svg{pointer-events:none}body{font-size:18px;font-family:Arial,Helvetica,sans-serif;overflow-x:hidden;background-color:var(--background-1)}header{display:flex;justify-content:space-between;align-items:center;padding:10px;width:100%;height:56px;z-index:5;position:fixed;box-shadow:0 0 9px -3px #000;background-color:var(--background-2)}body[data-panel=home] header,body[data-panel=settings] header{position:fixed}.header-title{display:flex;align-items:center}.header-title h2{color:var(--nav)}.home-link{margin:0 8px 0 0}.home-link svg{display:block;width:32px;height:32px;padding:2px}.home-link svg rect:nth-child(2n){transition:transform .2s}.home-link:hover rect:nth-child(2){transform:translateX(-8px)}.home-link:hover rect:nth-child(4){transform:translateX(-11px)}.home-link:hover rect:nth-child(6){transform:translateX(-6px)}nav ul{display:flex;align-items:center}nav li{display:flex;align-items:center;cursor:pointer;margin:0 16px;fill:var(--nav);user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.home-link:hover svg{fill:var(--nav-hover)}nav li.dimmed svg{fill:var(--nav-faded)}nav li.dimmed:hover svg{fill:var(--nav-faded-hover)}nav li svg,nav li>*{width:24px;height:24px}nav li .btn-menu>.btn{background:0 0!important;padding:0;box-shadow:none;fill:var(--nav)}nav li .btn-menu>.btn:hover{fill:var(--nav-hover)}main{padding-top:68px;color:var(--text-1);fill:var(--text-1);transition:padding .3s}.controls{display:flex;justify-content:flex-end;position:fixed;top:12px;right:16px;z-index:1;pointer-events:none}main>.controls{position:sticky;margin-right:16px;right:16px;top:68px}.controls>*{pointer-events:all}.controls>:not(:last-child){margin-right:8px}.tree{margin-top:-36px;overflow-x:auto;padding:4px 16px 50vh}.popup-source{position:fixed;display:flex;flex-direction:column;width:40vw;left:100%;bottom:0;z-index:1;transition:transform .3s;border-radius:6px 0 0 0}.popup-source.shown{transform:translateX(-100%)}.source{width:100%;height:40vh;max-height:50vh;padding:12px;border:none;font-family:Consolas,monospace;font-size:14px;white-space:pre;overflow-wrap:normal;overflow-x:auto;tab-size:4;-moz-tab-size:4;-o-tab-size:4;-webkit-tab-size:4;outline:0;resize:none;position:static;background-color:var(--background-2);border-top-left-radius:6px;color:var(--text-1);box-shadow:0 0 7px -3px #000}.popup-preview{position:fixed;display:flex;flex-direction:column;height:calc(100% - 56px);width:40vw;left:100%;bottom:0;z-index:1;background-color:var(--background-2);box-shadow:0 0 7px -3px #000;transition:transform .3s}main.has-preview{padding-right:40vw}.popup-preview.shown{transform:translateX(-100%)}.popup-preview canvas{width:100%;background-color:var(--nav-faded);display:block;cursor:crosshair;image-rendering:-moz-crisp-edges;image-rendering:-webkit-crisp-edges;image-rendering:crisp-edges;image-rendering:pixelated;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.btn{display:flex;align-items:center;border:none;height:32px;border-radius:6px;padding:7px 11px;cursor:pointer;outline:0;font-size:1rem;white-space:nowrap;background-color:var(--background-4);box-shadow:0 1px 7px -2px #000;color:var(--text-2);fill:var(--text-2);user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.btn.active{color:var(--accent-blue);fill:var(--accent-blue)}.btn:not(.btn-input):hover{background-color:var(--background-5)}.btn.no-pointer{pointer-events:none}.btn svg:not(:last-child){margin-right:5px}.btn-menu:not(.no-relative){position:relative}.btn-menu>.btn{height:100%}.btn-menu .btn-group{display:flex;flex-direction:column;position:absolute;right:0;top:100%;margin-top:8px}.btn-group{border-radius:6px;box-shadow:0 0 7px -2px #000}.btn-group .btn{box-shadow:none}.btn-group .btn:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group .btn:not(:first-child),.btn-menu .result-list .btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-input{cursor:initial;padding-right:7px}.btn-input input{background:var(--background-1);color:var(--text-1);font-size:17px;border:none;padding:0 3px;margin-left:5px;width:100px}.btn-input.large-input{padding:5px;padding-left:11px}.btn-input.large-input input{width:100%;height:100%}.btn-menu .result-list{display:block;width:380px;height:unset;overflow-y:auto;overflow-x:hidden;max-height:240px;border-bottom-left-radius:6px;border-bottom-right-radius:6px}.popup-actions{display:flex;position:fixed;bottom:8px;left:100%;z-index:5;padding:0 8px;border-top-left-radius:24px;border-bottom-left-radius:24px;background-color:var(--background-4);box-shadow:0 0 7px -3px #000;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;transform:translateX(var(--offset));transition:padding .1s,transform .3s}.popup-actions:hover{background-color:var(--background-5)}.popup-action{padding:12px;fill:var(--text-2);cursor:pointer}.popup-action:not(.shown){pointer-events:none;order:1;visibility:hidden}.popup-action>svg{display:block;width:24px;height:24px}.popup-action.action-preview{fill:var(--accent-blue)}.error{padding:5px 14px;margin:12px 16px;color:var(--text-1);background-color:var(--errors-background);border-radius:3px}.error>*{margin:10px 0}.error a{color:var(--text-1)}.home{padding:16px}.generator-picker{display:flex}.home.center{flex-direction:column;align-items:center;color:var(--nav)}.home.center p{padding-bottom:20px;text-align:center;font-size:20px}.home{max-width:960px;margin:0 auto}.tool-card{display:flex;padding:10px;margin-bottom:8px;color:var(--text-2);background-color:var(--background-2);box-shadow:1px 1px 7px -3px #000;border-radius:6px;text-decoration:none}.tool-card:hover{background-color:var(--background-3)}.tool-card svg{width:32px;height:32px;flex-shrink:0;margin-right:8px}.tool-card h3{font-weight:unset}.tool-card p{color:var(--text-3)}hr{margin:12px 0;border:none}.settings{padding:20px}.settings p{color:var(--nav);padding:8px;border-bottom:2px solid var(--background-4)}.field-list{width:100%;border-collapse:collapse;list-style-type:none}.field-list li{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid var(--background-4)}.field-prop{display:inline-flex;align-items:center;max-width:100%;margin:4px}.field-prop>input,.field-prop>label{height:34px;color:var(--text-1);margin-right:-1px;border:1px solid;border-color:var(--nav-faded-hover)}.field-prop label{padding:0 9px;line-height:1.94rem;background-color:var(--node-background-label);white-space:nowrap;border-top-left-radius:3px;border-bottom-left-radius:3px}.field-prop input{width:100%;line-height:1.6rem;background-color:var(--node-background-input);color:var(--text-1);padding-left:9px;font-size:18px;border-top-right-radius:3px;border-bottom-right-radius:3px}.field-prop svg{padding:4px;margin:0 4px;height:28px;width:28px;fill:var(--nav);cursor:pointer}.field-prop .hidden svg{fill:#be4b2e}.field-prop .dimmed svg{fill:var(--nav-faded)}.very-large{font-size:80px;font-weight:100}[data-ea-publisher]{margin:0 16px 8px}.ea-content{margin:0!important;background:var(--background-2)!important}.ea-content span{color:var(--text-2)!important}.ea-content strong{color:var(--accent-blue)!important}.ea-callout{margin:.25rem 0!important;padding:0!important}.ea-callout a{color:var(--text-3)!important}@keyframes spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes fadein{from{opacity:0}to{opacity:1}}@media screen and (max-width:1300px){main.has-preview .tree{margin-top:8px}}@media screen and (max-width:800px){main .tree{margin-top:4px!important}}@media screen and (max-width:580px){.header-title h2{font-size:22px}body nav li{margin:0 8px}main.has-preview{padding-right:0}main .controls{top:64px}.tree{padding-left:8px;padding-right:8px}.popup-source{width:100vw}.source{border-radius:0}.popup-preview{width:100vw;height:unset;bottom:0;background-color:transparent;box-shadow:none}.popup-preview canvas{margin-top:8px}.btn-menu .result-list,.btn.btn.large-input{width:calc(100vw - 10px)}.generator-picker{justify-content:center}.field-list li{flex-direction:column}.field-prop{width:100%}.field-prop input{width:100%}}:root{--node-border:#4e4e4e;--node-background-label:#1b1b1b;--node-background-input:#272727;--node-text:#dadada;--node-selected:#ad9715;--node-selected-border:#8d7a0d;--node-add:#487c13;--node-add-border:#3b6e0c;--node-remove:#9b341b;--node-remove-border:#7e1d05;--node-indent-border:#454749;--node-popup-background:#0a0a0ae6;--node-popup-text:#dadada;--node-popup-text-dimmed:#b4b4b4;--category-predicate:#306163;--category-predicate-border:#224849;--category-predicate-background:#1d3333;--category-function:#838383;--category-function-border:#6b6b6b;--category-function-background:#414141;--category-pool:#386330;--category-pool-border:#2e4922;--category-pool-background:#21331d}:root[data-theme=light]{--node-border:#bcbfc3;--node-background-label:#e4e4e4;--node-background-input:#ffffff;--node-text:#000000;--node-selected:#f0e65e;--node-selected-border:#b9a327;--node-add:#9bd464;--node-add-border:#498d09;--node-remove:#e76f51;--node-remove-border:#be4b2e;--node-indent-border:#b9b9b9;--node-popup-background:#1f2020e6;--node-popup-text:#dadada;--node-popup-text-dimmed:#b4b4b4;--category-predicate:#65b5b8;--category-predicate-border:#187e81;--category-predicate-background:#95c5c7;--category-function:#979fa7;--category-function-border:#788086;--category-function-background:#dce0e4;--category-pool:#76b865;--category-pool-border:#398118;--category-pool-background:#b1d6a6}@media (prefers-color-scheme:light){:root[data-theme=system]{--node-border:#bcbfc3;--node-background-label:#e4e4e4;--node-background-input:#ffffff;--node-text:#000000;--node-selected:#f0e65e;--node-selected-border:#b9a327;--node-add:#9bd464;--node-add-border:#498d09;--node-remove:#e76f51;--node-remove-border:#be4b2e;--node-indent-border:#b9b9b9;--node-popup-background:#1f2020e6;--node-popup-text:#dadada;--node-popup-text-dimmed:#b4b4b4;--category-predicate:#65b5b8;--category-predicate-border:#187e81;--category-predicate-background:#95c5c7;--category-function:#979fa7;--category-function-border:#788086;--category-function-background:#dce0e4;--category-pool:#76b865;--category-pool-border:#398118;--category-pool-background:#b1d6a6}}.node-header{display:inline-flex;position:relative;align-items:center;width:100%}.node-header>*{height:34px;border:1px solid;color:var(--node-text);border-color:var(--node-border)}.node-header>label{padding:0 9px;line-height:1.94rem;white-space:nowrap;user-select:none;background-color:var(--node-background-label)}.node-header>input{font-size:18px;padding-left:9px;background-color:var(--node-background-input)}.node-header>input[type=color]{padding:0 2px}.node-header>datalist,.node-header>select{font-size:18px;padding-left:6px;background-color:var(--node-background-input)}.node-header>button{font-size:18px;padding:0 9px;line-height:1.94rem;white-space:nowrap;user-select:none;cursor:pointer;background-color:var(--node-background-input)}.object-node>.node-header>.collapse{cursor:pointer}.node-error~input:last-child,.node-error~input[list]:nth-last-child(2),.node-error~select:last-child{border-color:var(--node-remove)!important}.node-header>.node-icon{order:1}.node-header>.node-icon+*,.node-header>:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px}.node-header>:last-child,.node-header>input[list]:nth-last-child(2){border-top-right-radius:3px;border-bottom-right-radius:3px}.node-header>*{margin-right:-1px}.list-node>.node-header>:first-child,.map-node>.node-header>:first-child,.object-node:not(.no-body)>.node-header>:first-child{border-top-left-radius:8px;border-bottom-left-radius:0}button.selected{background-color:var(--node-selected);border-color:var(--node-selected-border)}.collapse svg{fill:var(--node-text)}.collapse.closed,button.add{background-color:var(--node-add);border-color:var(--node-add-border)}.collapse.open,button.remove{background-color:var(--node-remove);border-color:var(--node-remove-border)}.node-header>button svg{display:inline-block;position:relative;top:2px;fill:var(--node-text)}.node-header>button.add:last-child,.node-header>button.collapse:last-child{border-top-right-radius:6px;border-bottom-right-radius:6px}.node-icon{border:none;position:relative;display:inline-block}.node-icon .icon-popup{visibility:hidden;width:240px;background-color:var(--node-popup-background);color:var(--node-popup-text);text-align:center;border-radius:6px;padding:8px 4px;position:absolute;z-index:2;top:125%;left:50%;margin-left:-120px}.node-icon .icon-popup::after{content:"";position:absolute;bottom:100%;left:50%;margin-left:-3px;border-width:5px;border-style:solid;border-color:transparent transparent var(--node-popup-background) transparent}.node-icon .icon-popup.show,.node-icon svg:hover+.icon-popup{visibility:visible}.node-icon svg{height:34px;width:34px;min-width:34px;margin-left:6px;cursor:pointer}.node-icon.node-help svg{fill:var(--node-border)}.node-icon.node-error svg{fill:var(--node-remove)}.node-menu{position:absolute;left:0;top:100%;width:min-content;margin-top:4px;margin-left:4px;z-index:1;color:var(--node-popup-text);font-size:16px;border-radius:3px;background-color:var(--node-popup-background)}.node-menu::after{content:"";position:absolute;bottom:100%;left:0;margin-left:6px;border-width:5px;border-style:solid;border-color:transparent transparent var(--node-popup-background) transparent}.menu-item{padding:4px;display:flex;align-items:center;white-space:normal}.menu-item>*{margin-right:4px}.menu-item .btn{padding:8px}span.menu-item{padding:4px 8px}.menu-item-context{color:var(--node-popup-text-dimmed)}.node{margin-bottom:4px}.node-body>.node:first-child{margin-top:4px}.node:last-child{margin-bottom:0}.node-body{border-left:3px solid var(--node-indent-border)}.node-body{display:flex;flex-direction:column;padding-left:18px}.node-entry>.object-node>.node-body{padding-left:0}.node-entry>.object-node>.node-body>.node>.node-body{border-left:none}.node-entry>.object-node>.node-body>.node>.node-header>.node-icon+*,.node-entry>.object-node>.node-body>.node>.node-header>:first-child{border-top-left-radius:0;border-bottom-left-radius:0;border-left:none}.node-entry{display:flex;flex-direction:column;margin-top:4px}.node-entry>.list-node[data-category],.node-entry>.map-node[data-category],.node-entry>.object-node[data-category]{width:100%;min-width:max-content;padding:5px;padding-left:0;margin-top:8px;border:2px solid var(--node-border);border-radius:3px}.node-entry:first-child>.list-node[data-category],.node-entry:first-child>.map-node[data-category],.node-entry:first-child>.object-node[data-category]{margin-top:4px}.node-entry>.object-node[data-category]>.node-header>.node-icon+*,.node-entry>.object-node[data-category]>.node-header>:first-child{border-top-left-radius:0;border-bottom-left-radius:0;border-left:none}.node-entry>.list-node[data-category]>.node-body,.node-entry>.map-node[data-category]>.node-body,.node-entry>.object-node[data-category]>.node-body{border:none}.range-node select{width:25px}.number-node input,.range-node input{width:100px}[data-category=predicate]>.node-body>.node>.node-header>label,[data-category=predicate]>.node-header>label{background-color:var(--category-predicate)}[data-category=predicate]>.node-body,[data-category=predicate]>.node-body>.node>.node-header>:not(.selected),[data-category=predicate]>.node-header>:not(.selected),[data-category=predicate]>.node-header>label{border-color:var(--category-predicate-border)}.node-entry>.node.list-node[data-category=predicate],.node-entry>.node.map-node[data-category=predicate],.node-entry>.node.object-node[data-category=predicate]{background-color:var(--category-predicate-background);border-color:var(--category-predicate-border)}[data-category=function]>.node-body>.node>.node-header>label,[data-category=function]>.node-header>label{background-color:var(--category-function)}[data-category=function]>.node-body,[data-category=function]>.node-body>.node>.node-header>:not(.selected),[data-category=function]>.node-header>:not(.selected),[data-category=function]>.node-header>label{border-color:var(--category-function-border)}.node-entry>.node.list-node[data-category=function],.node-entry>.node.map-node[data-category=function],.node-entry>.node.object-node[data-category=function]{background-color:var(--category-function-background);border-color:var(--category-function-border)}[data-category=pool]>.node-body>.node>.node-header>label,[data-category=pool]>.node-header>label{background-color:var(--category-pool)}[data-category=pool]>.node-body,[data-category=pool]>.node-body>.node>.node-header>:not(.selected),[data-category=pool]>.node-header>:not(.selected),[data-category=pool]>.node-header>label{border-color:var(--category-pool-border)}.node-entry>.node.list-node[data-category=pool],.node-entry>.node.map-node[data-category=pool],.node-entry>.node.object-node[data-category=pool]{background-color:var(--category-pool-background);border-color:var(--category-pool-border)} \ No newline at end of file diff --git a/assets/index.9d577366.css b/assets/index.9d577366.css new file mode 100644 index 00000000..e89f70df --- /dev/null +++ b/assets/index.9d577366.css @@ -0,0 +1 @@ +:root{--background-1:#1b1b1b;--background-2:#252525;--background-3:#2f2f2f;--background-4:#3d3d3d;--background-5:#464646;--text-1:#ffffff;--text-2:#dcdcdc;--text-3:#c3c3c3;--accent-blue:#50baf9;--accent-red:#f1453f;--nav:#91908f;--nav-hover:#b4b3b0;--nav-faded:#4d4c4c;--nav-faded-hover:#6e6e6e;--selection:#6786dd99;--errors-background:#62190f;--errors-text:#ffffffcc}:root[data-theme=light]{--background-1:#fafafa;--background-2:#e2e2e2;--background-3:#d4d3d3;--background-4:#cccccc;--background-5:#d6d6d6;--text-1:#000000;--text-2:#505050;--text-3:#6a6a6a;--accent-blue:#088cdb;--accent-red:#cc312c;--nav:#343a40;--nav-hover:#565d64;--nav-faded:#9fa2a7;--nav-faded-hover:#bcbfc3;--selection:#6786dd99;--errors-background:#f66653;--errors-text:#000000cc}@media (prefers-color-scheme:light){:root[data-theme=system]{--background-1:#fafafa;--background-2:#e2e2e2;--background-3:#d4d3d3;--background-4:#cccccc;--background-5:#d6d6d6;--text-1:#000000;--text-2:#505050;--text-3:#6a6a6a;--accent-blue:#088cdb;--accent-red:#cc312c;--nav:#343a40;--nav-hover:#565d64;--nav-faded:#9fa2a7;--nav-faded-hover:#bcbfc3;--selection:#6786dd99;--errors-background:#f66653;--errors-text:#000000cc}}*{box-sizing:border-box;margin:0;padding:0}::selection{background-color:var(--selection)}a svg{pointer-events:none}body{font-size:18px;font-family:Arial,Helvetica,sans-serif;overflow-x:hidden;background-color:var(--background-1)}header{display:flex;justify-content:space-between;align-items:center;padding:10px;width:100%;height:56px;z-index:5;position:fixed;box-shadow:0 0 9px -3px #000;background-color:var(--background-2)}body[data-panel=home] header,body[data-panel=settings] header{position:fixed}.header-title{display:flex;align-items:center}.header-title h2{color:var(--nav)}.home-link{margin:0 8px 0 0}.home-link svg{display:block;width:32px;height:32px;padding:2px}.home-link svg rect:nth-child(2n){transition:transform .2s}.home-link:hover rect:nth-child(2){transform:translateX(-8px)}.home-link:hover rect:nth-child(4){transform:translateX(-11px)}.home-link:hover rect:nth-child(6){transform:translateX(-6px)}nav ul{display:flex;align-items:center}nav li{display:flex;align-items:center;cursor:pointer;margin:0 16px;fill:var(--nav);user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.home-link:hover svg{fill:var(--nav-hover)}nav li.dimmed svg{fill:var(--nav-faded)}nav li.dimmed:hover svg{fill:var(--nav-faded-hover)}nav li svg,nav li>*{width:24px;height:24px}nav li .btn-menu>.btn{background:0 0!important;padding:0;box-shadow:none;fill:var(--nav)}nav li .btn-menu>.btn:hover{fill:var(--nav-hover)}main{padding-top:68px;color:var(--text-1);fill:var(--text-1);transition:padding .3s}.controls{display:flex;justify-content:flex-end;position:fixed;top:12px;right:16px;z-index:1;pointer-events:none}main>.controls{position:sticky;margin-right:16px;right:16px;top:68px}.controls>*{pointer-events:all}.controls>:not(:last-child){margin-right:8px}.tree{margin-top:-36px;overflow-x:auto;padding:4px 16px 50vh}.error+.tree{margin-top:0}.popup-source{position:fixed;display:flex;flex-direction:column;width:40vw;left:100%;bottom:0;z-index:1;transition:transform .3s;border-radius:6px 0 0 0}.popup-source.shown{transform:translateX(-100%)}.source{width:100%;height:40vh;max-height:50vh;padding:12px;border:none;font-family:Consolas,monospace;font-size:14px;white-space:pre;overflow-wrap:normal;overflow-x:auto;tab-size:4;-moz-tab-size:4;-o-tab-size:4;-webkit-tab-size:4;outline:0;resize:none;position:static;background-color:var(--background-2);border-top-left-radius:6px;color:var(--text-1);box-shadow:0 0 7px -3px #000}.popup-preview{position:fixed;display:flex;flex-direction:column;height:calc(100% - 56px);width:40vw;left:100%;bottom:0;z-index:1;background-color:var(--background-2);box-shadow:0 0 7px -3px #000;transition:transform .3s}main.has-preview{padding-right:40vw}.popup-preview.shown{transform:translateX(-100%)}.popup-preview canvas{width:100%;background-color:var(--nav-faded);display:block;cursor:crosshair;image-rendering:-moz-crisp-edges;image-rendering:-webkit-crisp-edges;image-rendering:crisp-edges;image-rendering:pixelated;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.btn{display:flex;align-items:center;border:none;height:32px;border-radius:6px;padding:7px 11px;cursor:pointer;outline:0;font-size:1rem;white-space:nowrap;background-color:var(--background-4);box-shadow:0 1px 7px -2px #000;color:var(--text-2);fill:var(--text-2);user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.btn.active{color:var(--accent-blue);fill:var(--accent-blue)}.btn:not(.btn-input):hover{background-color:var(--background-5)}.btn.no-pointer{pointer-events:none}.btn svg:not(:last-child){margin-right:5px}.btn-menu:not(.no-relative){position:relative}.btn-menu>.btn{height:100%}.btn-menu .btn-group{display:flex;flex-direction:column;position:absolute;right:0;top:100%;margin-top:8px}.btn-group{border-radius:6px;box-shadow:0 0 7px -2px #000}.btn-group .btn{box-shadow:none}.btn-group .btn:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group .btn:not(:first-child),.btn-menu .result-list .btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-input{cursor:initial;padding-right:7px}.btn-input input{background:var(--background-1);color:var(--text-1);font-size:17px;border:none;padding:0 3px;margin-left:5px;width:100px}.btn-input.large-input{padding:5px;padding-left:11px}.btn-input.large-input input{width:100%;height:100%}.btn-menu .result-list{display:block;width:380px;height:unset;overflow-y:auto;overflow-x:hidden;max-height:240px;border-bottom-left-radius:6px;border-bottom-right-radius:6px}.popup-actions{display:flex;position:fixed;bottom:8px;left:100%;z-index:5;padding:0 8px;border-top-left-radius:24px;border-bottom-left-radius:24px;background-color:var(--background-4);box-shadow:0 0 7px -3px #000;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;transform:translateX(var(--offset));transition:padding .1s,transform .3s}.popup-actions:hover{background-color:var(--background-5)}.popup-action{padding:12px;fill:var(--text-2);cursor:pointer}.popup-action:not(.shown){pointer-events:none;order:1;visibility:hidden}.popup-action>svg{display:block;width:24px;height:24px}.popup-action.action-preview{fill:var(--accent-blue)}.error{padding:5px 14px;margin:12px 16px;color:var(--text-1);background-color:var(--errors-background);border-radius:3px}.error>*{margin:10px 0}.error .error-dismiss{float:right;cursor:pointer;margin-left:10px}.error-dismiss svg{display:block;width:24px;height:24px}.error a{color:var(--text-1)}.home{padding:16px}.generator-picker{display:flex}.home.center{flex-direction:column;align-items:center;color:var(--nav)}.home.center p{padding-bottom:20px;text-align:center;font-size:20px}.home{max-width:960px;margin:0 auto}.tool-card{display:flex;padding:10px;margin-bottom:8px;color:var(--text-2);background-color:var(--background-2);box-shadow:1px 1px 7px -3px #000;border-radius:6px;text-decoration:none}.tool-card:hover{background-color:var(--background-3)}.tool-card svg{width:32px;height:32px;flex-shrink:0;margin-right:8px}.tool-card h3{font-weight:unset}.tool-card p{color:var(--text-3)}hr{margin:12px 0;border:none}.settings{padding:20px}.settings p{color:var(--nav);padding:8px;border-bottom:2px solid var(--background-4)}.field-list{width:100%;border-collapse:collapse;list-style-type:none}.field-list li{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid var(--background-4)}.field-prop{display:inline-flex;align-items:center;max-width:100%;margin:4px}.field-prop>input,.field-prop>label{height:34px;color:var(--text-1);margin-right:-1px;border:1px solid;border-color:var(--nav-faded-hover)}.field-prop label{padding:0 9px;line-height:1.94rem;background-color:var(--node-background-label);white-space:nowrap;border-top-left-radius:3px;border-bottom-left-radius:3px}.field-prop input{width:100%;line-height:1.6rem;background-color:var(--node-background-input);color:var(--text-1);padding-left:9px;font-size:18px;border-top-right-radius:3px;border-bottom-right-radius:3px}.field-prop svg{padding:4px;margin:0 4px;height:28px;width:28px;fill:var(--nav);cursor:pointer}.field-prop .hidden svg{fill:#be4b2e}.field-prop .dimmed svg{fill:var(--nav-faded)}.very-large{font-size:80px;font-weight:100}[data-ea-publisher]{margin:0 16px 8px}.ea-content{margin:0!important;background:var(--background-2)!important}.ea-content span{color:var(--text-2)!important}.ea-content strong{color:var(--accent-blue)!important}.ea-callout{margin:.25rem 0!important;padding:0!important}.ea-callout a{color:var(--text-3)!important}@keyframes spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes fadein{from{opacity:0}to{opacity:1}}@media screen and (max-width:1300px){main.has-preview .tree{margin-top:8px}}@media screen and (max-width:800px){main .tree{margin-top:4px!important}}@media screen and (max-width:580px){.header-title h2{font-size:22px}body nav li{margin:0 8px}main.has-preview{padding-right:0}main .controls{top:64px}.tree{padding-left:8px;padding-right:8px}.popup-source{width:100vw}.source{border-radius:0}.popup-preview{width:100vw;height:unset;bottom:0;background-color:transparent;box-shadow:none}.popup-preview canvas{margin-top:8px}.btn-menu .result-list,.btn.btn.large-input{width:calc(100vw - 10px)}.generator-picker{justify-content:center}.field-list li{flex-direction:column}.field-prop{width:100%}.field-prop input{width:100%}}:root{--node-border:#4e4e4e;--node-background-label:#1b1b1b;--node-background-input:#272727;--node-text:#dadada;--node-selected:#ad9715;--node-selected-border:#8d7a0d;--node-add:#487c13;--node-add-border:#3b6e0c;--node-remove:#9b341b;--node-remove-border:#7e1d05;--node-indent-border:#454749;--node-popup-background:#0a0a0ae6;--node-popup-text:#dadada;--node-popup-text-dimmed:#b4b4b4;--category-predicate:#306163;--category-predicate-border:#224849;--category-predicate-background:#1d3333;--category-function:#838383;--category-function-border:#6b6b6b;--category-function-background:#414141;--category-pool:#386330;--category-pool-border:#2e4922;--category-pool-background:#21331d}:root[data-theme=light]{--node-border:#bcbfc3;--node-background-label:#e4e4e4;--node-background-input:#ffffff;--node-text:#000000;--node-selected:#f0e65e;--node-selected-border:#b9a327;--node-add:#9bd464;--node-add-border:#498d09;--node-remove:#e76f51;--node-remove-border:#be4b2e;--node-indent-border:#b9b9b9;--node-popup-background:#1f2020e6;--node-popup-text:#dadada;--node-popup-text-dimmed:#b4b4b4;--category-predicate:#65b5b8;--category-predicate-border:#187e81;--category-predicate-background:#95c5c7;--category-function:#979fa7;--category-function-border:#788086;--category-function-background:#dce0e4;--category-pool:#76b865;--category-pool-border:#398118;--category-pool-background:#b1d6a6}@media (prefers-color-scheme:light){:root[data-theme=system]{--node-border:#bcbfc3;--node-background-label:#e4e4e4;--node-background-input:#ffffff;--node-text:#000000;--node-selected:#f0e65e;--node-selected-border:#b9a327;--node-add:#9bd464;--node-add-border:#498d09;--node-remove:#e76f51;--node-remove-border:#be4b2e;--node-indent-border:#b9b9b9;--node-popup-background:#1f2020e6;--node-popup-text:#dadada;--node-popup-text-dimmed:#b4b4b4;--category-predicate:#65b5b8;--category-predicate-border:#187e81;--category-predicate-background:#95c5c7;--category-function:#979fa7;--category-function-border:#788086;--category-function-background:#dce0e4;--category-pool:#76b865;--category-pool-border:#398118;--category-pool-background:#b1d6a6}}.node-header{display:inline-flex;position:relative;align-items:center;width:100%}.node-header>*{height:34px;border:1px solid;color:var(--node-text);border-color:var(--node-border)}.node-header>label{padding:0 9px;line-height:1.94rem;white-space:nowrap;user-select:none;background-color:var(--node-background-label)}.node-header>input{font-size:18px;padding-left:9px;background-color:var(--node-background-input)}.node-header>input[type=color]{padding:0 2px}.node-header>datalist,.node-header>select{font-size:18px;padding-left:6px;background-color:var(--node-background-input)}.node-header>button{font-size:18px;padding:0 9px;line-height:1.94rem;white-space:nowrap;user-select:none;cursor:pointer;background-color:var(--node-background-input)}.object-node>.node-header>.collapse{cursor:pointer}.node-error~input:last-child,.node-error~input[list]:nth-last-child(2),.node-error~select:last-child{border-color:var(--node-remove)!important}.node-header>.node-icon{order:1}.node-header>.node-icon+*,.node-header>:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px}.node-header>:last-child,.node-header>input[list]:nth-last-child(2){border-top-right-radius:3px;border-bottom-right-radius:3px}.node-header>*{margin-right:-1px}.list-node>.node-header>:first-child,.map-node>.node-header>:first-child,.object-node:not(.no-body)>.node-header>:first-child{border-top-left-radius:8px;border-bottom-left-radius:0}button.selected{background-color:var(--node-selected);border-color:var(--node-selected-border)}.collapse svg{fill:var(--node-text)}.collapse.closed,button.add{background-color:var(--node-add);border-color:var(--node-add-border)}.collapse.open,button.remove{background-color:var(--node-remove);border-color:var(--node-remove-border)}.node-header>button svg{display:inline-block;position:relative;top:2px;fill:var(--node-text)}.node-header>button.add:last-child,.node-header>button.collapse:last-child{border-top-right-radius:6px;border-bottom-right-radius:6px}.node-icon{border:none;position:relative;display:inline-block}.node-icon .icon-popup{visibility:hidden;width:240px;background-color:var(--node-popup-background);color:var(--node-popup-text);text-align:center;border-radius:6px;padding:8px 4px;position:absolute;z-index:2;top:125%;left:50%;margin-left:-120px}.node-icon .icon-popup::after{content:"";position:absolute;bottom:100%;left:50%;margin-left:-3px;border-width:5px;border-style:solid;border-color:transparent transparent var(--node-popup-background) transparent}.node-icon .icon-popup.show,.node-icon svg:hover+.icon-popup{visibility:visible}.node-icon svg{height:34px;width:34px;min-width:34px;margin-left:6px;cursor:pointer}.node-icon.node-help svg{fill:var(--node-border)}.node-icon.node-error svg{fill:var(--node-remove)}.node-menu{position:absolute;left:0;top:100%;width:min-content;margin-top:4px;margin-left:4px;z-index:1;color:var(--node-popup-text);font-size:16px;border-radius:3px;background-color:var(--node-popup-background)}.node-menu::after{content:"";position:absolute;bottom:100%;left:0;margin-left:6px;border-width:5px;border-style:solid;border-color:transparent transparent var(--node-popup-background) transparent}.menu-item{padding:4px;display:flex;align-items:center;white-space:normal}.menu-item>*{margin-right:4px}.menu-item .btn{padding:8px}span.menu-item{padding:4px 8px}.menu-item-context{color:var(--node-popup-text-dimmed)}.node{margin-bottom:4px}.node-body>.node:first-child{margin-top:4px}.node:last-child{margin-bottom:0}.node-body{border-left:3px solid var(--node-indent-border)}.node-body{display:flex;flex-direction:column;padding-left:18px}.node-entry>.object-node>.node-body{padding-left:0}.node-entry>.object-node>.node-body>.node>.node-body{border-left:none}.node-entry>.object-node>.node-body>.node>.node-header>.node-icon+*,.node-entry>.object-node>.node-body>.node>.node-header>:first-child{border-top-left-radius:0;border-bottom-left-radius:0;border-left:none}.node-entry{display:flex;flex-direction:column;margin-top:4px}.node-entry>.list-node[data-category],.node-entry>.map-node[data-category],.node-entry>.object-node[data-category]{width:100%;min-width:max-content;padding:5px;padding-left:0;margin-top:8px;border:2px solid var(--node-border);border-radius:3px}.node-entry:first-child>.list-node[data-category],.node-entry:first-child>.map-node[data-category],.node-entry:first-child>.object-node[data-category]{margin-top:4px}.node-entry>.object-node[data-category]>.node-header>.node-icon+*,.node-entry>.object-node[data-category]>.node-header>:first-child{border-top-left-radius:0;border-bottom-left-radius:0;border-left:none}.node-entry>.list-node[data-category]>.node-body,.node-entry>.map-node[data-category]>.node-body,.node-entry>.object-node[data-category]>.node-body{border:none}.range-node select{width:25px}.number-node input,.range-node input{width:100px}[data-category=predicate]>.node-body>.node>.node-header>label,[data-category=predicate]>.node-header>label{background-color:var(--category-predicate)}[data-category=predicate]>.node-body,[data-category=predicate]>.node-body>.node>.node-header>:not(.selected),[data-category=predicate]>.node-header>:not(.selected),[data-category=predicate]>.node-header>label{border-color:var(--category-predicate-border)}.node-entry>.node.list-node[data-category=predicate],.node-entry>.node.map-node[data-category=predicate],.node-entry>.node.object-node[data-category=predicate]{background-color:var(--category-predicate-background);border-color:var(--category-predicate-border)}[data-category=function]>.node-body>.node>.node-header>label,[data-category=function]>.node-header>label{background-color:var(--category-function)}[data-category=function]>.node-body,[data-category=function]>.node-body>.node>.node-header>:not(.selected),[data-category=function]>.node-header>:not(.selected),[data-category=function]>.node-header>label{border-color:var(--category-function-border)}.node-entry>.node.list-node[data-category=function],.node-entry>.node.map-node[data-category=function],.node-entry>.node.object-node[data-category=function]{background-color:var(--category-function-background);border-color:var(--category-function-border)}[data-category=pool]>.node-body>.node>.node-header>label,[data-category=pool]>.node-header>label{background-color:var(--category-pool)}[data-category=pool]>.node-body,[data-category=pool]>.node-body>.node>.node-header>:not(.selected),[data-category=pool]>.node-header>:not(.selected),[data-category=pool]>.node-header>label{border-color:var(--category-pool-border)}.node-entry>.node.list-node[data-category=pool],.node-entry>.node.map-node[data-category=pool],.node-entry>.node.object-node[data-category=pool]{background-color:var(--category-pool-background);border-color:var(--category-pool-border)} \ No newline at end of file diff --git a/dimension/index.html b/dimension/index.html index d861b645..fdeecab1 100644 --- a/dimension/index.html +++ b/dimension/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.16, 1.17 - + - +
diff --git a/dimension_type/index.html b/dimension_type/index.html index d861b645..fdeecab1 100644 --- a/dimension_type/index.html +++ b/dimension_type/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.16, 1.17 - + - +
diff --git a/index.html b/index.html index c90554e9..291179b6 100644 --- a/index.html +++ b/index.html @@ -20,9 +20,9 @@ Data Pack Generators Minecraft 1.15, 1.16, 1.17 - + - +
diff --git a/item_modifier/index.html b/item_modifier/index.html index d3474785..8a8228a2 100644 --- a/item_modifier/index.html +++ b/item_modifier/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.17 - + - +
diff --git a/loot_table/index.html b/loot_table/index.html index b7c593d9..2327873b 100644 --- a/loot_table/index.html +++ b/loot_table/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.15, 1.16, 1.17 - + - +
diff --git a/predicate/index.html b/predicate/index.html index b7c593d9..2327873b 100644 --- a/predicate/index.html +++ b/predicate/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.15, 1.16, 1.17 - + - +
diff --git a/world/index.html b/world/index.html index d861b645..fdeecab1 100644 --- a/world/index.html +++ b/world/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.16, 1.17 - + - +
diff --git a/worldgen/biome/index.html b/worldgen/biome/index.html index d861b645..fdeecab1 100644 --- a/worldgen/biome/index.html +++ b/worldgen/biome/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.16, 1.17 - + - +
diff --git a/worldgen/configured_carver/index.html b/worldgen/configured_carver/index.html index d861b645..fdeecab1 100644 --- a/worldgen/configured_carver/index.html +++ b/worldgen/configured_carver/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.16, 1.17 - + - +
diff --git a/worldgen/configured_feature/index.html b/worldgen/configured_feature/index.html index d861b645..fdeecab1 100644 --- a/worldgen/configured_feature/index.html +++ b/worldgen/configured_feature/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.16, 1.17 - + - +
diff --git a/worldgen/configured_structure_feature/index.html b/worldgen/configured_structure_feature/index.html index d861b645..fdeecab1 100644 --- a/worldgen/configured_structure_feature/index.html +++ b/worldgen/configured_structure_feature/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.16, 1.17 - + - +
diff --git a/worldgen/configured_surface_builder/index.html b/worldgen/configured_surface_builder/index.html index d861b645..fdeecab1 100644 --- a/worldgen/configured_surface_builder/index.html +++ b/worldgen/configured_surface_builder/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.16, 1.17 - + - +
diff --git a/worldgen/noise_settings/index.html b/worldgen/noise_settings/index.html index d861b645..fdeecab1 100644 --- a/worldgen/noise_settings/index.html +++ b/worldgen/noise_settings/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.16, 1.17 - + - +
diff --git a/worldgen/processor_list/index.html b/worldgen/processor_list/index.html index d861b645..fdeecab1 100644 --- a/worldgen/processor_list/index.html +++ b/worldgen/processor_list/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.16, 1.17 - + - +
diff --git a/worldgen/template_pool/index.html b/worldgen/template_pool/index.html index d861b645..fdeecab1 100644 --- a/worldgen/template_pool/index.html +++ b/worldgen/template_pool/index.html @@ -20,9 +20,9 @@ undefined Generator Minecraft 1.16, 1.17 - + - +