-(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{1:function(e,n,t){"use strict";t.r(n);var i=t(2),o=t(4),r=t.n(o),a={backupBlocks_:function(e){if("localStorage"in window){var n=r.a.Xml.workspaceToDom(e),t=window.location.href.split("#")[0];window.localStorage.setItem(t,r.a.Xml.domToText(n))}},backupOnUnload:function(e){var n=e||r.a.getMainWorkspace();window.addEventListener("unload",(function(){a.backupBlocks_(n)}),!1)},restoreBlocks:function(e){var n=window.location.href.split("#")[0];if("localStorage"in window&&window.localStorage[n]){var t=e||r.a.getMainWorkspace(),i=r.a.Xml.textToDom(window.localStorage[n]);r.a.Xml.domToWorkspace(i,t)}},link:function(e){var n=e||r.a.getMainWorkspace(),t=r.a.Xml.workspaceToDom(n,!0);if(1==n.getTopBlocks(!1).length&&t.querySelector){var i=t.querySelector("block");i&&(i.removeAttribute("x"),i.removeAttribute("y"))}var o=r.a.Xml.domToText(t);a.makeRequest_("/storage","xml",o,n)},retrieveXml:function(e,n){var t=n||r.a.getMainWorkspace();a.makeRequest_("/storage","key",e,t)},httpRequest_:null,makeRequest_:function(e,n,t,i){a.httpRequest_&&a.httpRequest_.abort(),a.httpRequest_=new XMLHttpRequest,a.httpRequest_.name=n,a.httpRequest_.onreadystatechange=a.handleRequest_,a.httpRequest_.open("POST",e),a.httpRequest_.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.httpRequest_.send(n+"="+encodeURIComponent(t)),a.httpRequest_.workspace=i},handleRequest_:function(){if(4==a.httpRequest_.readyState){if(200!=a.httpRequest_.status)a.alert(a.HTTPREQUEST_ERROR+"\nhttpRequest_.status: "+a.httpRequest_.status);else{var e=a.httpRequest_.responseText.trim();"xml"==a.httpRequest_.name?(window.location.hash=e,a.alert(a.LINK_ALERT.replace("%1",window.location.href))):"key"==a.httpRequest_.name&&(e.length?a.loadXml_(e,a.httpRequest_.workspace):a.alert(a.HASH_ERROR.replace("%1",window.location.hash))),a.monitorChanges_(a.httpRequest_.workspace)}a.httpRequest_=null}},monitorChanges_:function(e){var n=r.a.Xml.workspaceToDom(e),t=r.a.Xml.domToText(n);e.addChangeListener((function n(){var i=r.a.Xml.workspaceToDom(e),o=r.a.Xml.domToText(i);t!=o&&(window.location.hash="",e.removeChangeListener(n))}))},loadXml_:function(e,n){try{e=r.a.Xml.textToDom(e)}catch(n){return void a.alert(a.XML_ERROR+"\nXML: "+e)}n.clear(),r.a.Xml.domToWorkspace(e,n)},alert:function(e){window.alert(e)}},l=a;!async function(){Object(i.qb)(),function(e,n){console.log("Blockly starting");const t=document.getElementById(n);r.a.JavaScript.INDENT="";var i={toolbox:'<xml xmlns="https://developers.google.com/blockly/xml">\n <category name="Miniscript" colour="#5ba55b">\n <block type="and"></block>\n <block type="or">\n <field name="A_weight">1</field>\n <field name="B_weight">1</field>\n </block>\n <block type="thresh">\n <field name="Threshold">1</field>\n </block>\n <block type="after">\n <field name="NAME">1</field>\n </block>\n <block type="pk"></block>\n <block type="adapter"></block>\n <block type="older">\n <field name="NAME">1</field>\n </block>\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">name</field>\n </block>\n <block type="existing_key">\n <field name="NAME">Existing Key</field>\n <field name="key">tpub, WIF, hex...</field>\n </block>\n </category>\n <category name="Examples" colour="#5b67a5">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Alice</field>\n </block>\n </value>\n </block>\n <block type="or">\n <field name="A_weight">1</field>\n <field name="B_weight">1</field>\n <statement name="A">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Alice</field>\n </block>\n </value>\n </block>\n </statement>\n <statement name="B">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Bob</field>\n </block>\n </value>\n </block>\n </statement>\n </block>\n <block type="or">\n <field name="A_weight">99</field>\n <field name="B_weight">1</field>\n <statement name="A">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">KeyLikely</field>\n </block>\n </value>\n </block>\n </statement>\n <statement name="B">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Likely</field>\n </block>\n </value>\n </block>\n </statement>\n </block>\n <block type="and">\n <statement name="A">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">User</field>\n </block>\n </value>\n </block>\n </statement>\n <statement name="B">\n <block type="or">\n <field name="A_weight">99</field>\n <field name="B_weight">1</field>\n <statement name="A">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Service</field>\n </block>\n </value>\n </block>\n </statement>\n <statement name="B">\n <block type="older">\n <field name="NAME">12960</field>\n </block>\n </statement>\n </block>\n </statement>\n </block>\n <block type="thresh">\n <field name="Threshold">3</field>\n <statement name="A">\n <block type="adapter">\n <statement name="NAME">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Alice</field>\n </block>\n </value>\n </block>\n </statement>\n <next>\n <block type="adapter">\n <statement name="NAME">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Bob</field>\n </block>\n </value>\n </block>\n </statement>\n <next>\n <block type="adapter">\n <statement name="NAME">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Carol</field>\n </block>\n </value>\n </block>\n </statement>\n <next>\n <block type="adapter">\n <statement name="NAME">\n <block type="older">\n <field name="NAME">12960</field>\n </block>\n </statement>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n </category>\n</xml>',collapse:!0,comments:!0,disable:!0,maxBlocks:1/0,trashcan:!0,horizontalLayout:!0,toolboxPosition:"start",css:!0,media:"https://blockly-demo.appspot.com/static/media/",rtl:!1,scrollbars:!0,sounds:!0,oneBasedIndex:!0,grid:{spacing:20,length:1,colour:"#888",snap:!0}};r.a.Blocks.pk={init:function(){this.appendValueInput("pk").setCheck("key").appendField("Key"),this.setPreviousStatement(!0,"policy"),this.setColour(260),this.setTooltip("Requires a signature with a given public key"),this.setHelpUrl("")}},r.a.Blocks.begin={init:function(){this.appendDummyInput().appendField("Begin"),this.setNextStatement(!0,"policy"),this.setColour(160),this.setTooltip("Sets the beginning of the policy"),this.setHelpUrl("")}},r.a.Blocks.existing_key={init:function(){this.appendDummyInput().appendField(new r.a.FieldLabelSerializable("Existing Key"),"NAME").appendField(new r.a.FieldTextInput("tpub, WIF, hex..."),"key"),this.setOutput(!0,"key"),this.setColour(120),this.setTooltip("Sets the value of a key to an existing WIF key, xpub or hex public key"),this.setHelpUrl("")}},r.a.Blocks.alias_key={init:function(){this.appendDummyInput().appendField(new r.a.FieldLabelSerializable("Alias"),"label").appendField(new r.a.FieldTextInput("name"),"name"),this.setOutput(!0,"key"),this.setColour(120),this.setTooltip("Sets the value of a key to an alias"),this.setHelpUrl("")}},r.a.Blocks.thresh={init:function(){this.appendDummyInput().appendField("Threshold").appendField(new r.a.FieldNumber(1,1,1/0,1),"Threshold"),this.appendStatementInput("A").setCheck("thresh").appendField("Policies"),this.setPreviousStatement(!0,"policy"),this.setColour(230),this.setTooltip("Creates a threshold element (m-of-n), where the 'm' field is manually set and 'n' is implied by the number of sub-policies added. Requies all of its children to be wrapped in the 'Entry' block"),this.setHelpUrl("")}},r.a.Blocks.older={init:function(){this.appendDummyInput().appendField("Older").appendField(new r.a.FieldNumber(1,1,1/0,1),"NAME"),this.setPreviousStatement(!0,"policy"),this.setColour(20),this.setTooltip("Requires waiting a number of blocks from the confirmation height of a UTXO before it becomes spendable"),this.setHelpUrl("")}},r.a.Blocks.after={init:function(){this.appendDummyInput().appendField("After").appendField(new r.a.FieldNumber(1,1,1/0,1),"NAME"),this.setPreviousStatement(!0,"policy"),this.setColour(20),this.setTooltip("Requires the blockchain to reach a specific block height before the UTXO becomes spendable"),this.setHelpUrl("")}},r.a.Blocks.adapter={init:function(){this.appendStatementInput("NAME").setCheck("policy").appendField("Entry"),this.setPreviousStatement(!0,"thresh"),this.setNextStatement(!0,"thresh"),this.setColour(290),this.setTooltip("Adapter used to stack policies into 'Threshold' blocks"),this.setHelpUrl("")}},r.a.Blocks.and={init:function(){this.appendStatementInput("A").setCheck("policy"),this.appendDummyInput().appendField("AND"),this.appendStatementInput("B").setCheck("policy"),this.setPreviousStatement(!0,"policy"),this.setColour(230),this.setTooltip("Requires both sub-policies to be satisfied"),this.setHelpUrl("")}},r.a.Blocks.or={init:function(){this.appendStatementInput("A").setCheck("policy").appendField("Weight").appendField(new r.a.FieldNumber(1,1),"A_weight"),this.appendDummyInput().appendField("OR"),this.appendStatementInput("B").setCheck("policy").appendField("Weight").appendField(new r.a.FieldNumber(1,1),"B_weight"),this.setPreviousStatement(!0,"policy"),this.setColour(230),this.setTooltip("Requires either one of the two sub-policies to be satisfied. Weights can be used to indicate the relative probability of each sub-policy"),this.setHelpUrl("")}},r.a.JavaScript.begin=function(e){return""},r.a.JavaScript.pk=function(e){if(!e.getParent())return"";var n=r.a.JavaScript.valueToCode(e,"pk",r.a.JavaScript.ORDER_ATOMIC);return""==n&&(n="()"),"pk"+n},r.a.JavaScript.existing_key=function(e){return e.getParent()?[e.getFieldValue("key"),r.a.JavaScript.ORDER_NONE]:["",r.a.JavaScript.ORDER_NONE]},r.a.JavaScript.alias_key=function(e){return e.getParent()?[e.getFieldValue("name"),r.a.JavaScript.ORDER_NONE]:["",r.a.JavaScript.ORDER_NONE]},r.a.JavaScript.thresh=function(e){return"thresh("+e.getFieldValue("Threshold")+","+r.a.JavaScript.statementToCode(e,"A")+")"},r.a.JavaScript.older=function(e){return e.getParent()?"older("+e.getFieldValue("NAME")+")":""},r.a.JavaScript.after=function(e){return e.getParent()?"after("+e.getFieldValue("NAME")+")":""},r.a.JavaScript.adapter=function(e){return e.getParent()?r.a.JavaScript.statementToCode(e,"NAME")+(e.getNextBlock()?",":""):""},r.a.JavaScript.and=function(e){return e.getParent()?"and("+r.a.JavaScript.statementToCode(e,"A")+","+r.a.JavaScript.statementToCode(e,"B")+")":""},r.a.JavaScript.or=function(e){if(!e.getParent())return"";var n=e.getFieldValue("A_weight");"1"==n?n="":n+="@";var t=r.a.JavaScript.statementToCode(e,"A"),i=e.getFieldValue("B_weight");return"1"==i?i="":i+="@","or("+n+t+","+i+r.a.JavaScript.statementToCode(e,"B")+")"};var o=r.a.inject(e,i);o.addChangeListener((function(e){t.value=r.a.JavaScript.workspaceToCode(o)})),o.addChangeListener(r.a.Events.disableOrphans),setTimeout(()=>{if(l.restoreBlocks(),0==o.getTopBlocks().length){var e=o.newBlock("begin");e.setDeletable(!1),e.setEditable(!1),e.moveBy(20,20),e.initSvg(),e.render()}},0),l.backupOnUnload()}("blocklyDiv","policy");let e=null;document.getElementById("stdin").disabled=!0;const n=document.getElementById("start_button"),t=document.getElementById("stop_button"),o=document.getElementById("start_message");n.disabled=!1,t.disabled=!0;const a=document.getElementById("descriptor"),u=document.getElementById("change_descriptor");n.onclick=r=>{0!=a.value.length&&(r.preventDefault(),async function(e,n){const t=document.getElementById("stdout"),o=document.getElementById("stdin");o.disabled=!1;const r=[];let a=0;const l=await new i.a("testnet",e,n,"https://blockstream.info/testnet/"),u=e=>{if("clear"!=e)return o.disabled=!0,t.innerHTML.length>0&&(t.innerHTML+="\n"),t.innerHTML+=`<span class="command">> ${e}</span>\n`,a=r.push(e),l.run(e).then(e=>{e&&(t.innerHTML+=`<span class="success">${e}</span>\n`)}).catch(e=>t.innerHTML+=`<span class="error">${e}</span>\n`).finally(()=>{o.disabled=!1,t.scrollTop=t.scrollHeight-t.clientHeight});t.innerHTML=""};return o.onkeydown=e=>{if("Enter"==e.key){if(0==o.value.length)return;u(o.value),o.value="",e.preventDefault()}else"ArrowUp"==e.key?a>0&&(o.value=r[--a]):"ArrowDown"==e.key&&a<r.length&&(o.value=r[++a]||"")},{run:u}}(a.value,u.value.length>0?u.value:null).then(i=>{n.disabled=!0,a.disabled=!0,u.disabled=!0,o.innerHTML="Wallet created, running `sync`...",i.run("sync").then(()=>o.innerHTML="Ready!"),e=i,t.disabled=!1}).catch(e=>o.innerHTML=`<span class="error">${e}</span>`))},t.onclick=i=>{null!=e&&(i.preventDefault(),e.free(),o.innerHTML="Wallet instance destroyed",n.disabled=!1,t.disabled=!0,a.disabled=!1,u.disabled=!1)};const c=document.getElementById("policy"),s=document.getElementById("compiler_script_type"),d=document.getElementById("compiler_output");document.getElementById("compile_button").onclick=e=>{if(0==c.value.length)return;e.preventDefault();const n=!e.target.form.elements.namedItem("alias").length;let t=e.target.form.elements.namedItem("alias"),o=e.target.form.elements.namedItem("type"),r=e.target.form.elements.namedItem("extra");n?(t=[t],o=[o],r=[r]):(t=Array.from(t),o=Array.from(o),r=Array.from(r));const a={};t.forEach(e=>{const n=o.filter(n=>n.attributes["data-index"].value==e.attributes["data-index"].value)[0].value,t=r.filter(n=>n.attributes["data-index"].value==e.attributes["data-index"].value)[0].value,i=e.value;a[i]={type:n,extra:t}}),Object(i.pb)(c.value,JSON.stringify(a),s.value).then(e=>d.innerHTML=e).catch(e=>d.innerHTML=`<span class="error">${e}</span>`)}}()},12:function(e,n,t){"use strict";var i=t.w[e.i];e.exports=i;t(2);i.n()},13:function(e,n){function t(e){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}t.keys=function(){return[]},t.resolve=t,e.exports=t,t.id=13},2:function(e,n,t){"use strict";(function(e,i){t.d(n,"qb",(function(){return _})),t.d(n,"pb",(function(){return T})),t.d(n,"a",(function(){return E})),t.d(n,"nb",(function(){return R})),t.d(n,"Y",(function(){return x})),t.d(n,"lb",(function(){return B})),t.d(n,"C",(function(){return I})),t.d(n,"R",(function(){return F})),t.d(n,"l",(function(){return N})),t.d(n,"hb",(function(){return q})),t.d(n,"u",(function(){return M})),t.d(n,"W",(function(){return C})),t.d(n,"S",(function(){return O})),t.d(n,"s",(function(){return D})),t.d(n,"c",(function(){return H})),t.d(n,"T",(function(){return J})),t.d(n,"v",(function(){return L})),t.d(n,"m",(function(){return U})),t.d(n,"H",(function(){return P})),t.d(n,"E",(function(){return X})),t.d(n,"b",(function(){return j})),t.d(n,"kb",(function(){return W})),t.d(n,"i",(function(){return V})),t.d(n,"k",(function(){return $})),t.d(n,"t",(function(){return K})),t.d(n,"y",(function(){return z})),t.d(n,"Z",(function(){return Q})),t.d(n,"A",(function(){return G})),t.d(n,"g",(function(){return Y})),t.d(n,"ib",(function(){return Z})),t.d(n,"N",(function(){return ee})),t.d(n,"h",(function(){return ne})),t.d(n,"gb",(function(){return te})),t.d(n,"n",(function(){return ie})),t.d(n,"L",(function(){return oe})),t.d(n,"o",(function(){return re})),t.d(n,"K",(function(){return ae})),t.d(n,"bb",(function(){return le})),t.d(n,"eb",(function(){return ue})),t.d(n,"fb",(function(){return ce})),t.d(n,"I",(function(){return se})),t.d(n,"j",(function(){return de})),t.d(n,"X",(function(){return fe})),t.d(n,"w",(function(){return pe})),t.d(n,"F",(function(){return me})),t.d(n,"f",(function(){return be})),t.d(n,"e",(function(){return he})),t.d(n,"J",(function(){return ke})),t.d(n,"D",(function(){return ye})),t.d(n,"z",(function(){return ge})),t.d(n,"M",(function(){return ve})),t.d(n,"V",(function(){return we})),t.d(n,"U",(function(){return _e})),t.d(n,"O",(function(){return Te})),t.d(n,"ab",(function(){return Ae})),t.d(n,"q",(function(){return Se})),t.d(n,"r",(function(){return Ee})),t.d(n,"d",(function(){return Re})),t.d(n,"G",(function(){return xe})),t.d(n,"B",(function(){return Be})),t.d(n,"Q",(function(){return Ie})),t.d(n,"x",(function(){return Fe})),t.d(n,"p",(function(){return Ne})),t.d(n,"P",(function(){return qe})),t.d(n,"mb",(function(){return Me})),t.d(n,"db",(function(){return Ce})),t.d(n,"ob",(function(){return Oe})),t.d(n,"jb",(function(){return De})),t.d(n,"cb",(function(){return He}));var o=t(12);let r=new("undefined"==typeof TextDecoder?(0,e.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});r.decode();let a=null;function l(){return null!==a&&a.buffer===o.j.buffer||(a=new Uint8Array(o.j.buffer)),a}function u(e,n){return r.decode(l().subarray(e,e+n))}const c=new Array(32).fill(void 0);c.push(void 0,null,!0,!1);let s=c.length;function d(e){s===c.length&&c.push(c.length+1);const n=s;return s=c[n],c[n]=e,n}function f(e){return c[e]}function p(e){const n=f(e);return function(e){e<36||(c[e]=s,s=e)}(e),n}let m=0;let b=new("undefined"==typeof TextEncoder?(0,e.require)("util").TextEncoder:TextEncoder)("utf-8");const h="function"==typeof b.encodeInto?function(e,n){return b.encodeInto(e,n)}:function(e,n){const t=b.encode(e);return n.set(t),{read:e.length,written:t.length}};function k(e,n,t){if(void 0===t){const t=b.encode(e),i=n(t.length);return l().subarray(i,i+t.length).set(t),m=t.length,i}let i=e.length,o=n(i);const r=l();let a=0;for(;a<i;a++){const n=e.charCodeAt(a);if(n>127)break;r[o+a]=n}if(a!==i){0!==a&&(e=e.slice(a)),o=t(o,i,i=a+3*e.length);const n=l().subarray(o+a,o+i);a+=h(e,n).written}return m=a,o}let y=null;function g(){return null!==y&&y.buffer===o.j.buffer||(y=new Int32Array(o.j.buffer)),y}function v(e){return null==e}function w(e,n,t){o.g(e,n,d(t))}function _(){o.i()}function T(e,n,t){var i=k(e,o.e,o.f),r=m,a=k(n,o.e,o.f),l=m,u=k(t,o.e,o.f),c=m;return p(o.h(i,r,a,l,u,c))}function A(e){return function(){try{return e.apply(this,arguments)}catch(e){o.b(d(e))}}}function S(e,n){return l().subarray(e/1,e/1+n)}class E{static __wrap(e){const n=Object.create(E.prototype);return n.ptr=e,n}free(){const e=this.ptr;this.ptr=0,o.a(e)}constructor(e,n,t,i){var r=k(e,o.e,o.f),a=m,l=k(n,o.e,o.f),u=m,c=v(t)?0:k(t,o.e,o.f),s=m,d=k(i,o.e,o.f),f=m;return p(o.k(r,a,l,u,c,s,d,f))}run(e){var n=k(e,o.e,o.f),t=m;return p(o.l(this.ptr,n,t))}}const R=function(e,n){return d(u(e,n))},x=function(e){return d(E.__wrap(e))},B=function(e){p(e)},I=function(){return d(new Error)},F=function(e,n){var t=k(f(n).stack,o.e,o.f),i=m;g()[e/4+1]=i,g()[e/4+0]=t},N=function(e,n){try{console.error(u(e,n))}finally{o.d(e,n)}},q=function(e,n){const t=f(n);var i=k(JSON.stringify(void 0===t?null:t),o.e,o.f),r=m;g()[e/4+1]=r,g()[e/4+0]=i},M=function(e){return f(e)instanceof Response},C=function(e,n){var t=k(f(n).url,o.e,o.f),i=m;g()[e/4+1]=i,g()[e/4+0]=t},O=function(e){return f(e).status},D=function(e){return d(f(e).headers)},H=A((function(e){return d(f(e).arrayBuffer())})),J=A((function(e){return d(f(e).text())})),L=function(e){return f(e)instanceof Window},U=function(e,n){return d(f(e).fetch(f(n)))},P=A((function(e,n,t){return d(new Request(u(e,n),f(t)))})),X=A((function(){return d(new Headers)})),j=A((function(e,n,t,i,o){f(e).append(u(n,t),u(i,o))})),W=function(e){return d(f(e))},V=function(e){console.debug(f(e))},$=function(e){console.error(f(e))},K=function(e){console.info(f(e))},z=function(e){console.log(f(e))},Q=function(e){console.warn(f(e))},G=function(e,n){return d(new Function(u(e,n)))},Y=function(e,n){return d(f(e).call(f(n)))},Z=function(e,n){return f(e)===f(n)},ee=function(e){return d(f(e).self)},ne=function(e){return d(f(e).crypto)},te=function(e){return void 0===f(e)},ie=function(e){return d(f(e).getRandomValues)},oe=function(e,n){return d(t(13)(u(e,n)))},re=function(e,n,t){f(e).getRandomValues(S(n,t))},ae=function(e,n,t){f(e).randomFillSync(S(n,t))},le=function(e){const n=p(e).original;if(1==n.cnt--)return n.a=0,!0;return!1},ue=function(e){return"function"==typeof f(e)},ce=function(e){const n=f(e);return"object"==typeof n&&null!==n},se=function(e){return d(f(e).next)},de=function(e){return f(e).done},fe=function(e){return d(f(e).value)},pe=function(){return d(Symbol.iterator)},me=function(e,n){return d(new Function(u(e,n)))},be=A((function(e,n){return d(f(e).call(f(n)))})),he=A((function(e,n,t){return d(f(e).call(f(n),f(t)))})),ke=A((function(e){return d(f(e).next())})),ye=function(){return d(new Object)},ge=function(e,n){try{var t={a:e,b:n},i=new Promise((e,n)=>{const i=t.a;t.a=0;try{return function(e,n,t,i){o.m(e,n,d(t),d(i))}(i,t.b,e,n)}finally{t.a=i}});return d(i)}finally{t.a=t.b=0}},ve=function(e){return d(Promise.resolve(f(e)))},we=function(e,n){return d(f(e).then(f(n)))},_e=function(e,n,t){return d(f(e).then(f(n),f(t)))},Te=A((function(){return d(self.self)})),Ae=A((function(){return d(window.window)})),Se=A((function(){return d(globalThis.globalThis)})),Ee=A((function(){return d(i.global)})),Re=function(e){return d(f(e).buffer)},xe=function(e,n,t){return d(new Uint8Array(f(e),n>>>0,t>>>0))},Be=function(e){return d(new Uint8Array(f(e)))},Ie=function(e,n,t){f(e).set(f(n),t>>>0)},Fe=function(e){return f(e).length},Ne=A((function(e,n){return d(Reflect.get(f(e),f(n)))})),qe=A((function(e,n,t){return Reflect.set(f(e),f(n),f(t))})),Me=function(e,n){const t=f(n);var i="string"==typeof t?t:void 0,r=v(i)?0:k(i,o.e,o.f),a=m;g()[e/4+1]=a,g()[e/4+0]=r},Ce=function(e,n){var t=k(function e(n){const t=typeof n;if("number"==t||"boolean"==t||null==n)return""+n;if("string"==t)return`"${n}"`;if("symbol"==t){const e=n.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==t){const e=n.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(n)){const t=n.length;let i="[";t>0&&(i+=e(n[0]));for(let o=1;o<t;o++)i+=", "+e(n[o]);return i+="]",i}const i=/\[object ([^\]]+)\]/.exec(toString.call(n));let o;if(!(i.length>1))return toString.call(n);if(o=i[1],"Object"==o)try{return"Object("+JSON.stringify(n)+")"}catch(e){return"Object"}return n instanceof Error?`${n.name}: ${n.message}\n${n.stack}`:o}(f(n)),o.e,o.f),i=m;g()[e/4+1]=i,g()[e/4+0]=t},Oe=function(e,n){throw new Error(u(e,n))},De=function(){return d(o.j)},He=function(e,n,t){return d(function(e,n,t,i){const r={a:e,b:n,cnt:1},a=(...e)=>{r.cnt++;const n=r.a;r.a=0;try{return i(n,r.b,...e)}finally{0==--r.cnt?o.c.get(t)(n,r.b):r.a=n}};return a.original=r,a}(e,n,1037,w))}}).call(this,t(11)(e),t(5))}}]);
\ No newline at end of file
+(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{1:function(e,n,t){"use strict";t.r(n);var i=t(2),o=t(4),r=t.n(o),a={backupBlocks_:function(e){if("localStorage"in window){var n=r.a.Xml.workspaceToDom(e),t=window.location.href.split("#")[0];window.localStorage.setItem(t,r.a.Xml.domToText(n))}},backupOnUnload:function(e){var n=e||r.a.getMainWorkspace();window.addEventListener("unload",(function(){a.backupBlocks_(n)}),!1)},restoreBlocks:function(e){var n=window.location.href.split("#")[0];if("localStorage"in window&&window.localStorage[n]){var t=e||r.a.getMainWorkspace(),i=r.a.Xml.textToDom(window.localStorage[n]);r.a.Xml.domToWorkspace(i,t)}},link:function(e){var n=e||r.a.getMainWorkspace(),t=r.a.Xml.workspaceToDom(n,!0);if(1==n.getTopBlocks(!1).length&&t.querySelector){var i=t.querySelector("block");i&&(i.removeAttribute("x"),i.removeAttribute("y"))}var o=r.a.Xml.domToText(t);a.makeRequest_("/storage","xml",o,n)},retrieveXml:function(e,n){var t=n||r.a.getMainWorkspace();a.makeRequest_("/storage","key",e,t)},httpRequest_:null,makeRequest_:function(e,n,t,i){a.httpRequest_&&a.httpRequest_.abort(),a.httpRequest_=new XMLHttpRequest,a.httpRequest_.name=n,a.httpRequest_.onreadystatechange=a.handleRequest_,a.httpRequest_.open("POST",e),a.httpRequest_.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.httpRequest_.send(n+"="+encodeURIComponent(t)),a.httpRequest_.workspace=i},handleRequest_:function(){if(4==a.httpRequest_.readyState){if(200!=a.httpRequest_.status)a.alert(a.HTTPREQUEST_ERROR+"\nhttpRequest_.status: "+a.httpRequest_.status);else{var e=a.httpRequest_.responseText.trim();"xml"==a.httpRequest_.name?(window.location.hash=e,a.alert(a.LINK_ALERT.replace("%1",window.location.href))):"key"==a.httpRequest_.name&&(e.length?a.loadXml_(e,a.httpRequest_.workspace):a.alert(a.HASH_ERROR.replace("%1",window.location.hash))),a.monitorChanges_(a.httpRequest_.workspace)}a.httpRequest_=null}},monitorChanges_:function(e){var n=r.a.Xml.workspaceToDom(e),t=r.a.Xml.domToText(n);e.addChangeListener((function n(){var i=r.a.Xml.workspaceToDom(e),o=r.a.Xml.domToText(i);t!=o&&(window.location.hash="",e.removeChangeListener(n))}))},loadXml_:function(e,n){try{e=r.a.Xml.textToDom(e)}catch(n){return void a.alert(a.XML_ERROR+"\nXML: "+e)}n.clear(),r.a.Xml.domToWorkspace(e,n)},alert:function(e){window.alert(e)}},l=a;!async function(){Object(i.qb)(),function(e,n){console.log("Blockly starting");const t=document.getElementById(n);r.a.JavaScript.INDENT="";var i={toolbox:'<xml xmlns="https://developers.google.com/blockly/xml">\n <category name="Miniscript" colour="#5ba55b">\n <block type="and"></block>\n <block type="or">\n <field name="A_weight">1</field>\n <field name="B_weight">1</field>\n </block>\n <block type="thresh">\n <field name="Threshold">1</field>\n </block>\n <block type="after">\n <field name="NAME">1</field>\n </block>\n <block type="pk"></block>\n <block type="adapter"></block>\n <block type="older">\n <field name="NAME">1</field>\n </block>\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">name</field>\n </block>\n <block type="existing_key">\n <field name="NAME">Existing Key</field>\n <field name="key">tpub, WIF, hex...</field>\n </block>\n </category>\n <category name="Examples" colour="#5b67a5">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Alice</field>\n </block>\n </value>\n </block>\n <block type="or">\n <field name="A_weight">1</field>\n <field name="B_weight">1</field>\n <statement name="A">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Alice</field>\n </block>\n </value>\n </block>\n </statement>\n <statement name="B">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Bob</field>\n </block>\n </value>\n </block>\n </statement>\n </block>\n <block type="or">\n <field name="A_weight">99</field>\n <field name="B_weight">1</field>\n <statement name="A">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">KeyLikely</field>\n </block>\n </value>\n </block>\n </statement>\n <statement name="B">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Likely</field>\n </block>\n </value>\n </block>\n </statement>\n </block>\n <block type="and">\n <statement name="A">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">User</field>\n </block>\n </value>\n </block>\n </statement>\n <statement name="B">\n <block type="or">\n <field name="A_weight">99</field>\n <field name="B_weight">1</field>\n <statement name="A">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Service</field>\n </block>\n </value>\n </block>\n </statement>\n <statement name="B">\n <block type="older">\n <field name="NAME">12960</field>\n </block>\n </statement>\n </block>\n </statement>\n </block>\n <block type="thresh">\n <field name="Threshold">3</field>\n <statement name="A">\n <block type="adapter">\n <statement name="NAME">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Alice</field>\n </block>\n </value>\n </block>\n </statement>\n <next>\n <block type="adapter">\n <statement name="NAME">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Bob</field>\n </block>\n </value>\n </block>\n </statement>\n <next>\n <block type="adapter">\n <statement name="NAME">\n <block type="pk">\n <value name="pk">\n <block type="alias_key">\n <field name="label">Alias</field>\n <field name="name">Carol</field>\n </block>\n </value>\n </block>\n </statement>\n <next>\n <block type="adapter">\n <statement name="NAME">\n <block type="older">\n <field name="NAME">12960</field>\n </block>\n </statement>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n </category>\n</xml>',collapse:!0,comments:!0,disable:!0,maxBlocks:1/0,trashcan:!0,horizontalLayout:!0,toolboxPosition:"start",css:!0,media:"https://blockly-demo.appspot.com/static/media/",rtl:!1,scrollbars:!0,sounds:!0,oneBasedIndex:!0,grid:{spacing:20,length:1,colour:"#888",snap:!0}};r.a.Blocks.pk={init:function(){this.appendValueInput("pk").setCheck("key").appendField("Key"),this.setPreviousStatement(!0,"policy"),this.setColour(260),this.setTooltip("Requires a signature with a given public key"),this.setHelpUrl("")}},r.a.Blocks.begin={init:function(){this.appendDummyInput().appendField("Begin"),this.setNextStatement(!0,"policy"),this.setColour(160),this.setTooltip("Sets the beginning of the policy"),this.setHelpUrl("")}},r.a.Blocks.existing_key={init:function(){this.appendDummyInput().appendField(new r.a.FieldLabelSerializable("Existing Key"),"NAME").appendField(new r.a.FieldTextInput("tpub, WIF, hex..."),"key"),this.setOutput(!0,"key"),this.setColour(120),this.setTooltip("Sets the value of a key to an existing WIF key, xpub or hex public key"),this.setHelpUrl("")}},r.a.Blocks.alias_key={init:function(){this.appendDummyInput().appendField(new r.a.FieldLabelSerializable("Alias"),"label").appendField(new r.a.FieldTextInput("name"),"name"),this.setOutput(!0,"key"),this.setColour(120),this.setTooltip("Sets the value of a key to an alias"),this.setHelpUrl("")}},r.a.Blocks.thresh={init:function(){this.appendDummyInput().appendField("Threshold").appendField(new r.a.FieldNumber(1,1,1/0,1),"Threshold"),this.appendStatementInput("A").setCheck("thresh").appendField("Policies"),this.setPreviousStatement(!0,"policy"),this.setColour(230),this.setTooltip("Creates a threshold element (m-of-n), where the 'm' field is manually set and 'n' is implied by the number of sub-policies added. Requies all of its children to be wrapped in the 'Entry' block"),this.setHelpUrl("")}},r.a.Blocks.older={init:function(){this.appendDummyInput().appendField("Older").appendField(new r.a.FieldNumber(1,1,1/0,1),"NAME"),this.setPreviousStatement(!0,"policy"),this.setColour(20),this.setTooltip("Requires waiting a number of blocks from the confirmation height of a UTXO before it becomes spendable"),this.setHelpUrl("")}},r.a.Blocks.after={init:function(){this.appendDummyInput().appendField("After").appendField(new r.a.FieldNumber(1,1,1/0,1),"NAME"),this.setPreviousStatement(!0,"policy"),this.setColour(20),this.setTooltip("Requires the blockchain to reach a specific block height before the UTXO becomes spendable"),this.setHelpUrl("")}},r.a.Blocks.adapter={init:function(){this.appendStatementInput("NAME").setCheck("policy").appendField("Entry"),this.setPreviousStatement(!0,"thresh"),this.setNextStatement(!0,"thresh"),this.setColour(290),this.setTooltip("Adapter used to stack policies into 'Threshold' blocks"),this.setHelpUrl("")}},r.a.Blocks.and={init:function(){this.appendStatementInput("A").setCheck("policy"),this.appendDummyInput().appendField("AND"),this.appendStatementInput("B").setCheck("policy"),this.setPreviousStatement(!0,"policy"),this.setColour(230),this.setTooltip("Requires both sub-policies to be satisfied"),this.setHelpUrl("")}},r.a.Blocks.or={init:function(){this.appendStatementInput("A").setCheck("policy").appendField("Weight").appendField(new r.a.FieldNumber(1,1),"A_weight"),this.appendDummyInput().appendField("OR"),this.appendStatementInput("B").setCheck("policy").appendField("Weight").appendField(new r.a.FieldNumber(1,1),"B_weight"),this.setPreviousStatement(!0,"policy"),this.setColour(230),this.setTooltip("Requires either one of the two sub-policies to be satisfied. Weights can be used to indicate the relative probability of each sub-policy"),this.setHelpUrl("")}},r.a.JavaScript.begin=function(e){return""},r.a.JavaScript.pk=function(e){if(!e.getParent())return"";var n=r.a.JavaScript.valueToCode(e,"pk",r.a.JavaScript.ORDER_ATOMIC);return""==n&&(n="()"),"pk"+n},r.a.JavaScript.existing_key=function(e){return e.getParent()?[e.getFieldValue("key"),r.a.JavaScript.ORDER_NONE]:["",r.a.JavaScript.ORDER_NONE]},r.a.JavaScript.alias_key=function(e){return e.getParent()?[e.getFieldValue("name"),r.a.JavaScript.ORDER_NONE]:["",r.a.JavaScript.ORDER_NONE]},r.a.JavaScript.thresh=function(e){return"thresh("+e.getFieldValue("Threshold")+","+r.a.JavaScript.statementToCode(e,"A")+")"},r.a.JavaScript.older=function(e){return e.getParent()?"older("+e.getFieldValue("NAME")+")":""},r.a.JavaScript.after=function(e){return e.getParent()?"after("+e.getFieldValue("NAME")+")":""},r.a.JavaScript.adapter=function(e){return e.getParent()?r.a.JavaScript.statementToCode(e,"NAME")+(e.getNextBlock()?",":""):""},r.a.JavaScript.and=function(e){return e.getParent()?"and("+r.a.JavaScript.statementToCode(e,"A")+","+r.a.JavaScript.statementToCode(e,"B")+")":""},r.a.JavaScript.or=function(e){if(!e.getParent())return"";var n=e.getFieldValue("A_weight");"1"==n?n="":n+="@";var t=r.a.JavaScript.statementToCode(e,"A"),i=e.getFieldValue("B_weight");return"1"==i?i="":i+="@","or("+n+t+","+i+r.a.JavaScript.statementToCode(e,"B")+")"};var o=r.a.inject(e,i);o.addChangeListener((function(e){t.value=r.a.JavaScript.workspaceToCode(o)})),o.addChangeListener(r.a.Events.disableOrphans),setTimeout(()=>{if(l.restoreBlocks(),0==o.getTopBlocks().length){var e=o.newBlock("begin");e.setDeletable(!1),e.setEditable(!1),e.moveBy(20,20),e.initSvg(),e.render()}const n=document.createElement("span");n.innerHTML='<i class="fas fa-expand"></i>',n.style.float="right",n.style["margin-right"]="10px";let t=!1;n.onclick=function(){t?document.exitFullscreen():document.getElementById("blocklyDiv").requestFullscreen(),t=!t},document.getElementsByClassName("blocklyToolboxDiv")[0].appendChild(n)},0),l.backupOnUnload()}("blocklyDiv","policy");let e=null;document.getElementById("stdin").disabled=!0;const n=document.getElementById("start_button"),t=document.getElementById("stop_button"),o=document.getElementById("start_message");n.disabled=!1,t.disabled=!0;const a=document.getElementById("descriptor"),u=document.getElementById("change_descriptor");n.onclick=r=>{0!=a.value.length&&(r.preventDefault(),async function(e,n){const t=document.getElementById("stdout"),o=document.getElementById("stdin");o.disabled=!1;const r=[];let a=0;const l=await new i.a("testnet",e,n,"https://blockstream.info/testnet/"),u=e=>{if("clear"!=e)return o.disabled=!0,t.innerHTML.length>0&&(t.innerHTML+="\n"),t.innerHTML+=`<span class="command">> ${e}</span>\n`,a=r.push(e),l.run(e).then(e=>{e&&(t.innerHTML+=`<span class="success">${e}</span>\n`)}).catch(e=>t.innerHTML+=`<span class="error">${e}</span>\n`).finally(()=>{o.disabled=!1,t.scrollTop=t.scrollHeight-t.clientHeight});t.innerHTML=""};return o.onkeydown=e=>{if("Enter"==e.key){if(0==o.value.length)return;u(o.value),o.value="",e.preventDefault()}else"ArrowUp"==e.key?a>0&&(o.value=r[--a]):"ArrowDown"==e.key&&a<r.length&&(o.value=r[++a]||"")},{run:u}}(a.value,u.value.length>0?u.value:null).then(i=>{n.disabled=!0,a.disabled=!0,u.disabled=!0,o.innerHTML="Wallet created, running `sync`...",i.run("sync").then(()=>o.innerHTML="Ready!"),e=i,t.disabled=!1}).catch(e=>o.innerHTML=`<span class="error">${e}</span>`))},t.onclick=i=>{null!=e&&(i.preventDefault(),e.free(),o.innerHTML="Wallet instance destroyed",n.disabled=!1,t.disabled=!0,a.disabled=!1,u.disabled=!1)};const c=document.getElementById("policy"),s=document.getElementById("compiler_script_type"),d=document.getElementById("compiler_output");document.getElementById("compile_button").onclick=e=>{if(0==c.value.length)return;e.preventDefault();const n=!e.target.form.elements.namedItem("alias").length;let t=e.target.form.elements.namedItem("alias"),o=e.target.form.elements.namedItem("type"),r=e.target.form.elements.namedItem("extra");n?(t=[t],o=[o],r=[r]):(t=Array.from(t),o=Array.from(o),r=Array.from(r));const a={};t.forEach(e=>{const n=o.filter(n=>n.attributes["data-index"].value==e.attributes["data-index"].value)[0].value,t=r.filter(n=>n.attributes["data-index"].value==e.attributes["data-index"].value)[0].value,i=e.value;a[i]={type:n,extra:t}}),Object(i.pb)(c.value,JSON.stringify(a),s.value).then(e=>d.innerHTML=e).catch(e=>d.innerHTML=`<span class="error">${e}</span>`)}}()},12:function(e,n,t){"use strict";var i=t.w[e.i];e.exports=i;t(2);i.n()},13:function(e,n){function t(e){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}t.keys=function(){return[]},t.resolve=t,e.exports=t,t.id=13},2:function(e,n,t){"use strict";(function(e,i){t.d(n,"qb",(function(){return _})),t.d(n,"pb",(function(){return T})),t.d(n,"a",(function(){return S})),t.d(n,"nb",(function(){return x})),t.d(n,"Y",(function(){return R})),t.d(n,"lb",(function(){return B})),t.d(n,"C",(function(){return F})),t.d(n,"R",(function(){return I})),t.d(n,"l",(function(){return N})),t.d(n,"hb",(function(){return q})),t.d(n,"u",(function(){return C})),t.d(n,"W",(function(){return M})),t.d(n,"S",(function(){return O})),t.d(n,"s",(function(){return D})),t.d(n,"c",(function(){return H})),t.d(n,"T",(function(){return J})),t.d(n,"v",(function(){return L})),t.d(n,"m",(function(){return U})),t.d(n,"H",(function(){return P})),t.d(n,"E",(function(){return X})),t.d(n,"b",(function(){return j})),t.d(n,"kb",(function(){return W})),t.d(n,"i",(function(){return V})),t.d(n,"k",(function(){return $})),t.d(n,"t",(function(){return K})),t.d(n,"y",(function(){return z})),t.d(n,"Z",(function(){return Q})),t.d(n,"A",(function(){return G})),t.d(n,"g",(function(){return Y})),t.d(n,"ib",(function(){return Z})),t.d(n,"N",(function(){return ee})),t.d(n,"h",(function(){return ne})),t.d(n,"gb",(function(){return te})),t.d(n,"n",(function(){return ie})),t.d(n,"L",(function(){return oe})),t.d(n,"o",(function(){return re})),t.d(n,"K",(function(){return ae})),t.d(n,"bb",(function(){return le})),t.d(n,"eb",(function(){return ue})),t.d(n,"fb",(function(){return ce})),t.d(n,"I",(function(){return se})),t.d(n,"j",(function(){return de})),t.d(n,"X",(function(){return fe})),t.d(n,"w",(function(){return pe})),t.d(n,"F",(function(){return me})),t.d(n,"f",(function(){return be})),t.d(n,"e",(function(){return he})),t.d(n,"J",(function(){return ke})),t.d(n,"D",(function(){return ye})),t.d(n,"z",(function(){return ge})),t.d(n,"M",(function(){return ve})),t.d(n,"V",(function(){return we})),t.d(n,"U",(function(){return _e})),t.d(n,"O",(function(){return Te})),t.d(n,"ab",(function(){return Ae})),t.d(n,"q",(function(){return Ee})),t.d(n,"r",(function(){return Se})),t.d(n,"d",(function(){return xe})),t.d(n,"G",(function(){return Re})),t.d(n,"B",(function(){return Be})),t.d(n,"Q",(function(){return Fe})),t.d(n,"x",(function(){return Ie})),t.d(n,"p",(function(){return Ne})),t.d(n,"P",(function(){return qe})),t.d(n,"mb",(function(){return Ce})),t.d(n,"db",(function(){return Me})),t.d(n,"ob",(function(){return Oe})),t.d(n,"jb",(function(){return De})),t.d(n,"cb",(function(){return He}));var o=t(12);let r=new("undefined"==typeof TextDecoder?(0,e.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});r.decode();let a=null;function l(){return null!==a&&a.buffer===o.j.buffer||(a=new Uint8Array(o.j.buffer)),a}function u(e,n){return r.decode(l().subarray(e,e+n))}const c=new Array(32).fill(void 0);c.push(void 0,null,!0,!1);let s=c.length;function d(e){s===c.length&&c.push(c.length+1);const n=s;return s=c[n],c[n]=e,n}function f(e){return c[e]}function p(e){const n=f(e);return function(e){e<36||(c[e]=s,s=e)}(e),n}let m=0;let b=new("undefined"==typeof TextEncoder?(0,e.require)("util").TextEncoder:TextEncoder)("utf-8");const h="function"==typeof b.encodeInto?function(e,n){return b.encodeInto(e,n)}:function(e,n){const t=b.encode(e);return n.set(t),{read:e.length,written:t.length}};function k(e,n,t){if(void 0===t){const t=b.encode(e),i=n(t.length);return l().subarray(i,i+t.length).set(t),m=t.length,i}let i=e.length,o=n(i);const r=l();let a=0;for(;a<i;a++){const n=e.charCodeAt(a);if(n>127)break;r[o+a]=n}if(a!==i){0!==a&&(e=e.slice(a)),o=t(o,i,i=a+3*e.length);const n=l().subarray(o+a,o+i);a+=h(e,n).written}return m=a,o}let y=null;function g(){return null!==y&&y.buffer===o.j.buffer||(y=new Int32Array(o.j.buffer)),y}function v(e){return null==e}function w(e,n,t){o.g(e,n,d(t))}function _(){o.i()}function T(e,n,t){var i=k(e,o.e,o.f),r=m,a=k(n,o.e,o.f),l=m,u=k(t,o.e,o.f),c=m;return p(o.h(i,r,a,l,u,c))}function A(e){return function(){try{return e.apply(this,arguments)}catch(e){o.b(d(e))}}}function E(e,n){return l().subarray(e/1,e/1+n)}class S{static __wrap(e){const n=Object.create(S.prototype);return n.ptr=e,n}free(){const e=this.ptr;this.ptr=0,o.a(e)}constructor(e,n,t,i){var r=k(e,o.e,o.f),a=m,l=k(n,o.e,o.f),u=m,c=v(t)?0:k(t,o.e,o.f),s=m,d=k(i,o.e,o.f),f=m;return p(o.k(r,a,l,u,c,s,d,f))}run(e){var n=k(e,o.e,o.f),t=m;return p(o.l(this.ptr,n,t))}}const x=function(e,n){return d(u(e,n))},R=function(e){return d(S.__wrap(e))},B=function(e){p(e)},F=function(){return d(new Error)},I=function(e,n){var t=k(f(n).stack,o.e,o.f),i=m;g()[e/4+1]=i,g()[e/4+0]=t},N=function(e,n){try{console.error(u(e,n))}finally{o.d(e,n)}},q=function(e,n){const t=f(n);var i=k(JSON.stringify(void 0===t?null:t),o.e,o.f),r=m;g()[e/4+1]=r,g()[e/4+0]=i},C=function(e){return f(e)instanceof Response},M=function(e,n){var t=k(f(n).url,o.e,o.f),i=m;g()[e/4+1]=i,g()[e/4+0]=t},O=function(e){return f(e).status},D=function(e){return d(f(e).headers)},H=A((function(e){return d(f(e).arrayBuffer())})),J=A((function(e){return d(f(e).text())})),L=function(e){return f(e)instanceof Window},U=function(e,n){return d(f(e).fetch(f(n)))},P=A((function(e,n,t){return d(new Request(u(e,n),f(t)))})),X=A((function(){return d(new Headers)})),j=A((function(e,n,t,i,o){f(e).append(u(n,t),u(i,o))})),W=function(e){return d(f(e))},V=function(e){console.debug(f(e))},$=function(e){console.error(f(e))},K=function(e){console.info(f(e))},z=function(e){console.log(f(e))},Q=function(e){console.warn(f(e))},G=function(e,n){return d(new Function(u(e,n)))},Y=function(e,n){return d(f(e).call(f(n)))},Z=function(e,n){return f(e)===f(n)},ee=function(e){return d(f(e).self)},ne=function(e){return d(f(e).crypto)},te=function(e){return void 0===f(e)},ie=function(e){return d(f(e).getRandomValues)},oe=function(e,n){return d(t(13)(u(e,n)))},re=function(e,n,t){f(e).getRandomValues(E(n,t))},ae=function(e,n,t){f(e).randomFillSync(E(n,t))},le=function(e){const n=p(e).original;if(1==n.cnt--)return n.a=0,!0;return!1},ue=function(e){return"function"==typeof f(e)},ce=function(e){const n=f(e);return"object"==typeof n&&null!==n},se=function(e){return d(f(e).next)},de=function(e){return f(e).done},fe=function(e){return d(f(e).value)},pe=function(){return d(Symbol.iterator)},me=function(e,n){return d(new Function(u(e,n)))},be=A((function(e,n){return d(f(e).call(f(n)))})),he=A((function(e,n,t){return d(f(e).call(f(n),f(t)))})),ke=A((function(e){return d(f(e).next())})),ye=function(){return d(new Object)},ge=function(e,n){try{var t={a:e,b:n},i=new Promise((e,n)=>{const i=t.a;t.a=0;try{return function(e,n,t,i){o.m(e,n,d(t),d(i))}(i,t.b,e,n)}finally{t.a=i}});return d(i)}finally{t.a=t.b=0}},ve=function(e){return d(Promise.resolve(f(e)))},we=function(e,n){return d(f(e).then(f(n)))},_e=function(e,n,t){return d(f(e).then(f(n),f(t)))},Te=A((function(){return d(self.self)})),Ae=A((function(){return d(window.window)})),Ee=A((function(){return d(globalThis.globalThis)})),Se=A((function(){return d(i.global)})),xe=function(e){return d(f(e).buffer)},Re=function(e,n,t){return d(new Uint8Array(f(e),n>>>0,t>>>0))},Be=function(e){return d(new Uint8Array(f(e)))},Fe=function(e,n,t){f(e).set(f(n),t>>>0)},Ie=function(e){return f(e).length},Ne=A((function(e,n){return d(Reflect.get(f(e),f(n)))})),qe=A((function(e,n,t){return Reflect.set(f(e),f(n),f(t))})),Ce=function(e,n){const t=f(n);var i="string"==typeof t?t:void 0,r=v(i)?0:k(i,o.e,o.f),a=m;g()[e/4+1]=a,g()[e/4+0]=r},Me=function(e,n){var t=k(function e(n){const t=typeof n;if("number"==t||"boolean"==t||null==n)return""+n;if("string"==t)return`"${n}"`;if("symbol"==t){const e=n.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==t){const e=n.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(n)){const t=n.length;let i="[";t>0&&(i+=e(n[0]));for(let o=1;o<t;o++)i+=", "+e(n[o]);return i+="]",i}const i=/\[object ([^\]]+)\]/.exec(toString.call(n));let o;if(!(i.length>1))return toString.call(n);if(o=i[1],"Object"==o)try{return"Object("+JSON.stringify(n)+")"}catch(e){return"Object"}return n instanceof Error?`${n.name}: ${n.message}\n${n.stack}`:o}(f(n)),o.e,o.f),i=m;g()[e/4+1]=i,g()[e/4+0]=t},Oe=function(e,n){throw new Error(u(e,n))},De=function(){return d(o.j)},He=function(e,n,t){return d(function(e,n,t,i){const r={a:e,b:n,cnt:1},a=(...e)=>{r.cnt++;const n=r.a;r.a=0;try{return i(n,r.b,...e)}finally{0==--r.cnt?o.c.get(t)(n,r.b):r.a=n}};return a.original=r,a}(e,n,1037,w))}}).call(this,t(11)(e),t(5))}}]);
\ No newline at end of file