From 8f912d12358ec5c91454ac974a5a04d0a7cdda52 Mon Sep 17 00:00:00 2001 From: Spaaaacccee Date: Wed, 25 Oct 2023 21:34:25 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20path-vis?= =?UTF-8?q?ualiser/app@8b592724a25f0afa7944009b740ad80b902783ef=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/{index-60b1781c.js => index-277164fe.js} | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename assets/{index-60b1781c.js => index-277164fe.js} (99%) diff --git a/assets/index-60b1781c.js b/assets/index-277164fe.js similarity index 99% rename from assets/index-60b1781c.js rename to assets/index-277164fe.js index 85803454..7755c235 100644 --- a/assets/index-60b1781c.js +++ b/assets/index-277164fe.js @@ -660,7 +660,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\ `)||null}function wm(e){if(e instanceof eo)return!0;throw new Error("Expected a YAML collection as document contents")}var lU=function(){function e(t){xn(this,e),this.anchors=new uFe(t.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=t,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}return Yn(e,[{key:"add",value:function(n){return wm(this.contents),this.contents.add(n)}},{key:"addIn",value:function(n,r){wm(this.contents),this.contents.addIn(n,r)}},{key:"delete",value:function(n){return wm(this.contents),this.contents.delete(n)}},{key:"deleteIn",value:function(n){return dx(n)?this.contents==null?!1:(this.contents=null,!0):(wm(this.contents),this.contents.deleteIn(n))}},{key:"getDefaults",value:function(){return e.defaults[this.version]||e.defaults[this.options.version]||{}}},{key:"get",value:function(n,r){return this.contents instanceof eo?this.contents.get(n,r):void 0}},{key:"getIn",value:function(n,r){return dx(n)?!r&&this.contents instanceof Un?this.contents.value:this.contents:this.contents instanceof eo?this.contents.getIn(n,r):void 0}},{key:"has",value:function(n){return this.contents instanceof eo?this.contents.has(n):!1}},{key:"hasIn",value:function(n){return dx(n)?this.contents!==void 0:this.contents instanceof eo?this.contents.hasIn(n):!1}},{key:"set",value:function(n,r){wm(this.contents),this.contents.set(n,r)}},{key:"setIn",value:function(n,r){dx(n)?this.contents=r:(wm(this.contents),this.contents.setIn(n,r))}},{key:"setSchema",value:function(n,r){if(!(!n&&!r&&this.schema)){typeof n=="number"&&(n=n.toFixed(1)),n==="1.0"||n==="1.1"||n==="1.2"?(this.version?this.version=n:this.options.version=n,delete this.options.schema):n&&typeof n=="string"&&(this.options.schema=n),Array.isArray(r)&&(this.options.customTags=r);var i=Object.assign({},this.getDefaults(),this.options);this.schema=new K1(i)}}},{key:"parse",value:function(n,r){this.options.keepCstNodes&&(this.cstNode=n),this.options.keepNodeTypes&&(this.type="DOCUMENT");var i=n.directives,o=i===void 0?[]:i,s=n.contents,a=s===void 0?[]:s,c=n.directivesEndMarker,u=n.error,f=n.valueRange;if(u&&(u.source||(u.source=this),this.errors.push(u)),gFe(this,o,r),c&&(this.directivesEndMarker=!0),this.range=f?[f.start,f.end]:null,this.setSchema(),this.anchors._cstAliases=[],hFe(this,a),this.anchors.resolveNodes(),this.options.prettyErrors){var h=ir(this.errors),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g instanceof ov&&g.makePretty()}}catch(w){h.e(w)}finally{h.f()}var v=ir(this.warnings),y;try{for(v.s();!(y=v.n()).done;){var S=y.value;S instanceof ov&&S.makePretty()}}catch(w){v.e(w)}finally{v.f()}}return this}},{key:"listNonDefaultTags",value:function(){return fFe(this.contents).filter(function(n){return n.indexOf(K1.defaultPrefix)!==0})}},{key:"setTagPrefix",value:function(n,r){if(n[0]!=="!"||n[n.length-1]!=="!")throw new Error("Handle must start and end with !");if(r){var i=this.tagPrefixes.find(function(o){return o.handle===n});i?i.prefix=r:this.tagPrefixes.push({handle:n,prefix:r})}else this.tagPrefixes=this.tagPrefixes.filter(function(o){return o.handle!==n})}},{key:"toJSON",value:function(n,r){var i=this,o=this.options,s=o.keepBlobsInJSON,a=o.mapAsMap,c=o.maxAliasCount,u=s&&(typeof n!="string"||!(this.contents instanceof Un)),f={doc:this,indentStep:" ",keep:u,mapAsMap:u&&!!a,maxAliasCount:c,stringify:cS},h=Object.keys(this.anchors.map);h.length>0&&(f.anchors=new Map(h.map(function(b){return[i.anchors.map[b],{alias:[],aliasCount:0,count:1}]})));var p=_l(this.contents,n,f);if(typeof r=="function"&&f.anchors){var g=ir(f.anchors.values()),v;try{for(g.s();!(v=g.n()).done;){var y=v.value,S=y.count,w=y.res;r(w,S)}}catch(b){g.e(b)}finally{g.f()}}return p}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var n=this.options.indent;if(!Number.isInteger(n)||n<=0){var r=JSON.stringify(n);throw new Error('"indent" option must be a positive integer, not '.concat(r))}this.setSchema();var i=[],o=!1;if(this.version){var s="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?s="%YAML:1.0":this.version==="1.1"&&(s="%YAML 1.1")),i.push(s),o=!0}var a=this.listNonDefaultTags();this.tagPrefixes.forEach(function(g){var v=g.handle,y=g.prefix;a.some(function(S){return S.indexOf(y)===0})&&(i.push("%TAG ".concat(v," ").concat(y)),o=!0)}),(o||this.directivesEndMarker)&&i.push("---"),this.commentBefore&&((o||!this.directivesEndMarker)&&i.unshift(""),i.unshift(this.commentBefore.replace(/^/gm,"#")));var c={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(n),stringify:cS},u=!1,f=null;if(this.contents){this.contents instanceof Qo&&(this.contents.spaceBefore&&(o||this.directivesEndMarker)&&i.push(""),this.contents.commentBefore&&i.push(this.contents.commentBefore.replace(/^/gm,"#")),c.forceBlockIndent=!!this.comment,f=this.contents.comment);var h=f?null:function(){return u=!0},p=cS(this.contents,c,function(){return f=null},h);i.push(lg(p,"",f))}else this.contents!==void 0&&i.push(cS(this.contents,c));return this.comment&&((!u||f)&&i[i.length-1]!==""&&i.push(""),i.push(this.comment.replace(/^/gm,"#"))),i.join(` `)+` `}}]),e}();ho(lU,"defaults",vne);function vFe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=arguments.length>2?arguments[2]:void 0;n===void 0&&typeof t=="string"&&(n=t,t=!0);var r=Object.assign({},lU.defaults[qC.version],qC),i=new K1(r);return i.createNode(e,t,n)}var CA=function(e){sr(n,e);var t=ar(n);function n(r){return xn(this,n),t.call(this,Object.assign({},qC,r))}return n}(lU);function yFe(e,t){var n=[],r,i=ir(tU(e)),o;try{for(i.s();!(o=i.n()).done;){var s=o.value,a=new CA(t);a.parse(s,r),n.push(a),r=a}}catch(c){i.e(c)}finally{i.f()}return n}function yne(e,t){var n=tU(e),r=new CA(t).parse(n[0]);if(n.length>1){var i="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new Jt(n[1],i))}return r}function bFe(e,t){var n=yne(e,t);if(n.warnings.forEach(function(r){return sne(r)}),n.errors.length>0)throw n.errors[0];return n.toJSON()}function xFe(e,t){var n=new CA(t);return n.contents=e,String(n)}var wFe={createNode:vFe,defaultOptions:qC,Document:CA,parse:bFe,parseAllDocuments:yFe,parseCST:tU,parseDocument:yne,scalarOptions:aFe,stringify:xFe};const _Fe=Object.freeze(Object.defineProperty({__proto__:null,YAML:wFe},Symbol.toStringTag,{value:"Module"})),SFe=o4(_Fe);var EFe=SFe.YAML;const CFe=ds(EFe);function i7(e){switch(typeof e){case"number":case"string":return`${e}`;case"undefined":return"null";default:return C.jsx("code",{children:te.truncate(CFe.stringify(e).replace(` -`,", "),{length:30})})}}function o7({label:e,value:t,type:n}){return C.jsxs(En,{width:"auto",mr:3,mt:.5,children:[C.jsx(jt,{component:"div",variant:"body2",...n,sx:{opacity:.54,...n==null?void 0:n.sx},children:e}),C.jsx(ai,{}),C.jsx(jt,{component:"div",variant:"body2",...n,children:i7(t)??"none"})]},`${e}::${i7(t)}`)}function Q3({event:e,variant:t="body2",max:n=10,...r}){const i=te.filter(te.entries(e),([,o])=>o!==void 0);return C.jsxs(En,{...r,children:[te.map(te.slice(i,0,n),([o,s])=>C.jsx(o7,{label:o,value:s,type:{variant:t}})),i.length>n&&C.jsx(o7,{label:`${i.length-n} more`,type:{sx:{pt:1}},value:""})]})}var bne={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xt,function(){return function(n){function r(o){if(i[o])return i[o].exports;var s=i[o]={i:o,l:!1,exports:{}};return n[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}var i={};return r.m=n,r.c=i,r.d=function(o,s,a){r.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:a})},r.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(s,"a",s),s},r.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},r.p="",r(r.s=1)}([function(n,r,i){function o(a){var c=a===void 0?{}:a,u=c.ESCAPE,f=u===void 0?/^\\/:u,h=c.VARIABLE_START,p=h===void 0?/^\${\s*/:h,g=c.VARIABLE_END,v=g===void 0?/^\s*}/:g,y=c.PIPE_START,S=y===void 0?/^\s*\|\s*/:y,w=c.PIPE_PARAMETER_START,b=w===void 0?/^\s*:\s*/:w,x=c.QUOTED_STRING,E=x===void 0?r.DEFAULT_QUOTED_STRING_REGEX:x,I=c.QUOTED_STRING_TEST,A=I===void 0?null:I,k=c.QUOTED_STRING_GET_AND_ADVANCE,O=k===void 0?null:k,D=c.QUOTED_STRING_IN_PARAMETER_TEST,N=D===void 0?null:D,H=c.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,G=H===void 0?null:H,z=A||function(V){return E.test(V)},L=O||s(E),F=N||function(V){return E.test(V)},j=G||s(E);return function(V){function W(Pe){Pe===void 0&&(Pe=1),pe=pe.substr(Pe)}function K(Pe){Pe===void 0&&(Pe=/^/),W(pe.match(Pe)[0].length)}function X(){var Pe;return K(f),Pe=pe.length>0?pe[0]:"",W(),Pe}function Q(Pe){var ze=(Pe===void 0?{}:Pe).isNull,st=ze!==void 0&&ze;me={name:"",pipes:[]},Xe=!st}function ie(){ve.variables.push(me),Q({isNull:!0})}function ce(Pe){var ze=(Pe===void 0?{}:Pe).isNull,st=ze!==void 0&&ze;be={name:"",parameters:[]},ct=!st}function ue(){me.pipes.push(be),ce({isNull:!0})}function se(Pe){var ze=(Pe===void 0?{}:Pe).isNull,st=ze!==void 0&&ze;Ze="",Bt=!st}function J(){be.parameters.push(Ze),se({isNull:!0})}function ae(){return!!v.test(pe)&&(K(v),ye>=3&&J(),ye>=2&&ue(),ye>=1&&ie(),ye=0,!0)}function le(){return!!S.test(pe)&&(K(S),ye>=3&&J(),ye>=2&&ue(),ye>=1&&ce(),ye=2,!0)}function he(){return!!b.test(pe)&&(K(b),ye>=3&&J(),ye>=2&&se(),ye=3,!0)}for(var pe=V,ve={literals:[],variables:[]},ye=0,xe="",me={name:"",pipes:[]},be={name:"",parameters:[]},Ze="",Xe=!1,ct=!1,Bt=!1;pe&&pe.length>0;)switch(ye){case 0:if(f.test(pe)){xe+=X();continue}if(p.test(pe)){ye=1,Q(),ve.literals.push(xe),xe="",K(p);continue}xe+=pe[0],W();break;case 1:if(f.test(pe)){me.name+=X();continue}if(ae()||le())continue;if(z(pe)){me.name+=L(pe,W);continue}me.name+=pe[0],W();break;case 2:if(f.test(pe)){be.name+=X();continue}if(ae()||he()||le())continue;if(z(pe)){be.name+=L(pe,W);continue}be.name+=pe[0],W();break;case 3:if(f.test(pe)){Ze+=X();continue}if(ae()||he()||le())continue;if(F(pe)){Ze+=j(pe,W);continue}Ze+=pe[0],W()}return Bt&&be.parameters.push(Ze),ct&&me.pipes.push(be),Xe&&ve.variables.push(me),ve.literals.push(xe),ve}}function s(a){return function(c,u){var f=c.match(a);return u(f[0].length),f.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,r.parseStringTemplateGenerator=o,r.parseStringTemplate=o(),r.getQuotedStringAndAdvanceForRegex=s},function(n,r,i){n.exports=i(2)},function(n,r,i){function o(s){for(var a in s)r.hasOwnProperty(a)||(r[a]=s[a])}Object.defineProperty(r,"__esModule",{value:!0}),o(i(0)),o(i(3))},function(n,r,i){function o(f){return function(h){return f.hasOwnProperty(h)?f[h]:h.split(".").reduce(function(p,g){return p.hasOwnProperty(g)?p[g]:""},f)}}function s(f,h,p,g){g===void 0&&(g=o(h));var v=g(f.name);return f.pipes.reduce(function(y,S){return p.hasOwnProperty(S.name)?p[S.name](y,S.parameters):y},v??"")}function a(f,h,p,g){return g===void 0&&(g=o(h)),f.literals.length===0?"":f.literals.slice(1).reduce(function(v,y,S){return""+v+s(f.variables[S],h,p,g)+y},f.literals[0])}function c(f,h,p){return a(u.parseStringTemplate(f),h,p)}Object.defineProperty(r,"__esModule",{value:!0});var u=i(0);r.evaluateParsedString=a,r.evaluateStringTemplate=c}])})})(bne);var s7=bne.exports;function TFe(e={},t){const{$:n,...r}=e;return{...te.mapValues(r,t),$:n}}function J3(e){switch(e==null?void 0:e.constructor){case Array:{const t=te.map(e,J3);return n=>te.map(t,r=>r(n))}case Object:{const t=te.mapValues(e,J3);return n=>te.mapValues(t,r=>r(n))}case String:return Z3(e);default:return te.constant(e)}}function kFe(e={}){return TFe(e,t=>te.isFunction(t)?t:J3(t))}const a7=_f(e=>{const t=Function("$",`return ${e};`);return n=>t(new Proxy(kFe(n),{get(r,i){var o;return(o=r[i])==null?void 0:o.call(r,{})}}))},{primitive:!0}),AFe=/^\{\{\s*/,IFe=/^\s*\}\}/,IB=/\b\B/,Z3=_f(e=>{const n=s7.parseStringTemplateGenerator({VARIABLE_START:AFe,VARIABLE_END:IFe,PIPE_START:IB,PIPE_PARAMETER_START:IB,QUOTED_STRING:IB})(e);return te.join(n.literals,"")?r=>s7.evaluateParsedString(n,{},{},i=>a7(i)(r)):a7(n.variables[0].name)},{primitive:!0});function RFe(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var xne={exports:{}};(function(e,t){(function(n,r){typeof RFe=="function"?e.exports=r():n.pluralize=r()})(Xt,function(){var n=[],r=[],i={},o={},s={};function a(y){return typeof y=="string"?new RegExp("^"+y+"$","i"):y}function c(y,S){return y===S?S:y===y.toLowerCase()?S.toLowerCase():y===y.toUpperCase()?S.toUpperCase():y[0]===y[0].toUpperCase()?S.charAt(0).toUpperCase()+S.substr(1).toLowerCase():S.toLowerCase()}function u(y,S){return y.replace(/\$(\d{1,2})/g,function(w,b){return S[b]||""})}function f(y,S){return y.replace(S[0],function(w,b){var x=u(S[1],arguments);return c(w===""?y[b-1]:w,x)})}function h(y,S,w){if(!y.length||i.hasOwnProperty(y))return S;for(var b=w.length;b--;){var x=w[b];if(x[0].test(S))return f(S,x)}return S}function p(y,S,w){return function(b){var x=b.toLowerCase();return S.hasOwnProperty(x)?c(b,x):y.hasOwnProperty(x)?c(b,y[x]):h(x,b,w)}}function g(y,S,w,b){return function(x){var E=x.toLowerCase();return S.hasOwnProperty(E)?!0:y.hasOwnProperty(E)?!1:h(E,E,w)===E}}function v(y,S,w){var b=S===1?v.singular(y):v.plural(y);return(w?S+" ":"")+b}return v.plural=p(s,o,n),v.isPlural=g(s,o,n),v.singular=p(o,s,r),v.isSingular=g(o,s,r),v.addPluralRule=function(y,S){n.push([a(y),S])},v.addSingularRule=function(y,S){r.push([a(y),S])},v.addUncountableRule=function(y){if(typeof y=="string"){i[y.toLowerCase()]=!0;return}v.addPluralRule(y,"$0"),v.addSingularRule(y,"$0")},v.addIrregularRule=function(y,S){S=S.toLowerCase(),y=y.toLowerCase(),s[y]=S,o[S]=y},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(y){return v.addIrregularRule(y[0],y[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(y){return v.addPluralRule(y[0],y[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(y){return v.addSingularRule(y[0],y[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(v.addUncountableRule),v})})(xne);var PFe=xne.exports;const OFe=ds(PFe),MFe=""+new URL("parseTrace.worker-c4cde251.js",import.meta.url).href;class LFe extends Worker{constructor(){super(MFe,{type:"module"})}}const DFe=Rv(LFe);function NFe(e){const t=gc(),n=om("specimen");return R.useCallback(()=>n(async()=>{var r;if(e!=null&&e.trace){t("Processing trace...");try{const i=await DFe(e);return t("Trace loaded",OFe("step",((r=i==null?void 0:i.stepsPersistent)==null?void 0:r.length)??0,!0)),i}catch(i){t("Error parsing",`${i}`)}}}),[e])}function cg({label:e,icon:t,...n}){return C.jsx(vf,{title:te.startCase(e),children:C.jsx("span",{children:C.jsx(Fp,{...n,children:t})})},e)}function BFe(){return R.useCallback(e=>({result:"",error:void 0,offset:0}),[])}function cU(e){const t=gc(),{layer:n,setLayer:r}=Vp(e),{playback:i,playbackTo:o,step:s=0}=(n==null?void 0:n.source)??{},a=te.min([o,s])??0,c=!!o,u=i==="playing",[f,h]=[0,(o??1)-1];return R.useMemo(()=>{function p(S){r(Ta(n,w=>te.set(w,"source",{...w==null?void 0:w.source,...S})))}const g={start:f,end:h,step:a,canPlay:c&&!u&&a0},v=S=>te.clamp(a+S,f,h);return{playing:i==="playing",...g,...{play:()=>{t("Playback started"),p({playback:"playing",step:v(1)})},pause:(S=0)=>{t("Playback paused"),p({playback:"paused",step:v(S)})},stepTo:(S=0)=>p({step:S}),stop:()=>p({step:f,playback:"paused"}),stepForward:()=>p({step:v(1)}),stepBackward:()=>p({step:v(-1)}),tick:(S=1)=>p({playback:"playing",step:v(S)})}}},[h,i,u,c,f,a,r])}function $Fe(e,t){let n=!1;return requestAnimationFrame(async()=>{const r=await e();n||t(r)}),()=>{n=!0}}function FFe({children:e,value:t}){const{step:n,tick:r,end:i,playing:o,pause:s}=cU(t==null?void 0:t.key);qQ();const a=gc(),[{playbackRate:c=1}]=Ju(),u=BFe(),f=R.useCallback((h,p)=>C.jsx(zz,{primary:h,secondary:`Step ${n+p}`}),[n]);return R.useEffect(()=>{if(o)return n{for(const h of te.range(c)){const p=u(n+h);if(p.result||p.error)return{...p,offset:h}}return{result:"",offset:0,error:void 0}},({result:h,offset:p,error:g})=>{g?(a(`${te.trimEnd(g,".")}.`,`${p}`),s()):h?(a(`Breakpoint hit: ${h}.`,`${p}`),s(p)):r(c)}):s()},[f,o,i,n,s,r,a,u,c]),C.jsx(C.Fragment,{children:e})}function zFe({layer:e}){const{playing:t,canPause:n,canPlay:r,canStepBackward:i,canStepForward:o,canStop:s,pause:a,play:c,stepBackward:u,stepForward:f,stop:h}=cU(e==null?void 0:e.key);return qQ(),C.jsxs(C.Fragment,{children:[C.jsx(cg,{label:"step-backward",icon:C.jsx(H1e,{}),onClick:u,disabled:!i}),C.jsx(cg,{...t?{label:"pause",icon:C.jsx(B1e,{}),onClick:()=>a(),disabled:!n}:{label:"play",icon:C.jsx(F1e,{}),onClick:()=>c(),disabled:!r,color:"primary"}}),C.jsx(cg,{label:"step-forward",icon:C.jsx(U1e,{}),onClick:f,disabled:!o}),C.jsx(cg,{label:"stop",icon:C.jsx(W1e,{}),onClick:h,disabled:!s})]})}const jFe=e=>e==null;function UFe(e){const t=[],n={},r={},i=te.chain(e==null?void 0:e.events).map((a,c)=>({step:c,id:a.id,pId:a.pId})).groupBy("id").value();te.forEach(e==null?void 0:e.events,({id:a,pId:c},u)=>{!jFe(c)&&n[a]!==c&&(t.push({id:a,pId:c,step:u,prev:te.last(t)}),n[a]=c),r[u]=te.last(t)});const o=(a,c=(u=>(u=e==null?void 0:e.events)==null?void 0:u.length)()??0)=>{let f=r[c];for(;f;){if(f.id===a)return f.pId;f=f.prev}};return{getParent:o,getPath:a=>{const c=[a];let u={...(e.events??[])[a],step:a};for(;u;){const f=o(u.id,u.step);if(f){const h=te.findLast(i[f],p=>p.step<=u.step);if(h)c.push(h.step),u=h;else break}else break}return c}}}const Xx={key:"trace",inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Trace"},editor:Jg(({value:e,produce:t})=>{var n,r,i,o;return C.jsxs(C.Fragment,{children:[C.jsx(G1,{label:"Trace",content:C.jsx(aOe,{onChange:s=>t(a=>te.set(a,"source.trace",{...s,key:qo()})),value:(n=e==null?void 0:e.source)==null?void 0:n.trace})}),C.jsx(G1,{label:"Onion Skinning",content:C.jsx(Gs,{disabled:!0,showArrow:!0,value:((r=e==null?void 0:e.source)==null?void 0:r.onion)??"off",items:["off","transparent","solid"].map(s=>({id:s,name:te.startCase(s)})),onChange:s=>t(a=>te.set(a,"source.onion",s))})}),C.jsx(Rte,{label:"Preview"}),C.jsx(ht,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(Pte,{trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content})})]})}),service:Jg(({value:e,produce:t})=>{var i,o,s,a,c,u,f,h;const{palette:n}=Dn(),r=NFe({trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content,context:{color:Nj,themeAccent:n.primary.main,themeTextPrimary:n.text.primary,themeBackground:n.background.paper},view:"main"});return R.useEffect(()=>{t(p=>{var g,v,y,S;return te.set(p,"source.playbackTo",((S=(y=(v=(g=e==null?void 0:e.source)==null?void 0:g.trace)==null?void 0:v.content)==null?void 0:y.events)==null?void 0:S.length)??0)})},[(u=(c=(a=(s=e==null?void 0:e.source)==null?void 0:s.trace)==null?void 0:a.content)==null?void 0:c.events)==null?void 0:u.length]),Ite(async()=>{const p=await r();t(g=>te.set(g,"source.parsedTrace",p))},[r],[(h=(f=e==null?void 0:e.source)==null?void 0:f.trace)==null?void 0:h.key]),C.jsx(C.Fragment,{children:C.jsx(FFe,{value:e})})}),renderer:({layer:e})=>{var a,c;const t=(a=e==null?void 0:e.source)==null?void 0:a.parsedTrace,n=XQ(((c=e==null?void 0:e.source)==null?void 0:c.step)??0,1e3/60),r=HFe(e,n),i=R.useMemo(()=>te.map(t==null?void 0:t.stepsPersistent,u=>te.map(u,f=>te.merge(f,{meta:{sourceLayer:e==null?void 0:e.key}}))),[t==null?void 0:t.stepsPersistent,e==null?void 0:e.key]),o=R.useMemo(()=>te.map(t==null?void 0:t.stepsTransient,u=>te.map(u,f=>te.merge(f,{meta:{sourceLayer:e==null?void 0:e.key}}))),[t==null?void 0:t.stepsTransient,e==null?void 0:e.key]),s=R.useMemo(()=>[o[n]??[]],[o,n]);return C.jsxs(C.Fragment,{children:[C.jsx(RBe,{step:n,nodes:i}),C.jsx(W1,{nodes:s}),r]})},steps:({layer:e,children:t})=>{var n,r,i;return C.jsx(C.Fragment,{children:t==null?void 0:t(((i=(r=(n=e==null?void 0:e.source)==null?void 0:n.trace)==null?void 0:r.content)==null?void 0:i.events)??[])})},getSelectionInfo:({layer:e,event:t,children:n})=>{const{layer:r,setLayer:i}=Vp(e),o=R.useMemo(()=>{var c,u,f,h;const s=((f=(u=(c=r==null?void 0:r.source)==null?void 0:c.trace)==null?void 0:u.content)==null?void 0:f.events)??[],a=te.chain((h=t==null?void 0:t.info)==null?void 0:h.components).filter(p=>{var g;return((g=p.meta)==null?void 0:g.sourceLayer)===(r==null?void 0:r.key)}).map(p=>{var g;return(g=p.meta)==null?void 0:g.step}).filter(te.negate(te.isUndefined)).sort((p,g)=>p-g).value();if(a.length&&r){const p=te.last(a),g=s[p];if(g)return{[r.key]:{primary:ga(r),items:{properties:{index:-1,primary:C.jsx(Q3,{event:g,vertical:!0})},[`${g}`]:{primary:`Go to Step ${p}`,secondary:`${te.startCase(g.type)}`,action:()=>i(Ta(r,v=>{te.set(v,"source.step",p)})),icon:C.jsx(x1e,{})}}}}}return{}},[r,t]);return C.jsx(C.Fragment,{children:n==null?void 0:n(o)})}};function HFe(e,t=0){var o,s;const{palette:n}=Dn(),{getPath:r}=R.useMemo(()=>{var a,c;return(c=(a=e==null?void 0:e.source)==null?void 0:a.trace)!=null&&c.content?UFe(e.source.trace.content):{getParent:te.constant(void 0),getPath:te.constant([])}},[(s=(o=e==null?void 0:e.source)==null?void 0:o.trace)==null?void 0:s.content]);return R.useMemo(()=>{var a,c,u,f;if((f=(u=(c=(a=e==null?void 0:e.source)==null?void 0:a.trace)==null?void 0:c.content)==null?void 0:u.render)!=null&&f.path){const{pivot:h={},scale:p=1}=e.source.trace.content.render.path,{x:g,y:v}=h,y=g?Z3(g):b=>b.x,S=v?Z3(v):b=>b.y,w=te.map(r(t),b=>{var x,E,I,A;return(A=(I=(E=(x=e==null?void 0:e.source)==null?void 0:x.trace)==null?void 0:E.content)==null?void 0:I.events)==null?void 0:A[b]});if(w.length){const b=[{$:"rect",x:y({x:0,y:0,...te.head(w)})-2*p/2,y:S({x:0,y:0,...te.head(w)})-2*p/2,fill:B1("destination"),width:2*p,height:2*p},{$:"rect",x:y({x:0,y:0,...te.last(w)})-2*p/2,y:S({x:0,y:0,...te.last(w)})-2*p/2,fill:B1("source"),width:2*p,height:2*p},{$:"path",points:w.map(x=>({x:y({x:0,y:0,...x}),y:S({x:0,y:0,...x})})),fill:n.primary.main,alpha:1,lineWidth:1*p}];return C.jsx(W1,{nodes:[te.map(b,x=>({component:x,meta:{source:"path"}}))]})}}return C.jsx(C.Fragment,{})},[e,t,n,r])}const WFe=Xx.getSelectionInfo;async function GFe(e,t,n){for(const r of e){const i=await r.call("features/algorithms"),o=await r.call("features/formats");if(te.find(i,{id:t})&&te.find(o,{id:n}))return r}}const VFe={key:"query",editor:Jg(({value:e,produce:t})=>{var c,u;const{algorithm:n}=(e==null?void 0:e.source)??{},{layers:r,layer:i,key:o}=Vp(void 0,f=>{var h;return((h=f.source)==null?void 0:h.type)==="map"}),[{algorithms:s}]=$C(),[a]=nv();return C.jsxs(C.Fragment,{children:[C.jsx(G1,{label:"Algorithm",content:C.jsx(Gs,{showArrow:!0,icon:C.jsx(k1e,{}),label:"Choose Algorithm",value:n,items:s.map(f=>{var h;return{...f,description:(h=te.find(a,{url:f.source}))==null?void 0:h.name}}),onChange:async f=>t(h=>te.set(h,"source.algorithm",f))})}),!(s!=null&&s.length)&&C.jsx(jt,{variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),C.jsx(G1,{label:"Map",content:C.jsx(Gs,{showArrow:!0,icon:C.jsx(Cw,{}),label:"Choose Layer",value:o,items:r.map(f=>({id:f.key,name:ga(f)})),onChange:async f=>t(h=>te.set(h,"source.mapLayerKey",f))})}),i&&C.jsxs(jt,{variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:["Define source and destination nodes by clicking on valid regions on"," ",ga(i)]}),C.jsx(Rte,{label:"Preview"}),C.jsx(ht,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(Pte,{trace:(u=(c=e==null?void 0:e.source)==null?void 0:c.trace)==null?void 0:u.content})})]})}),service:Jg(({value:e,produce:t})=>{const n=gc(),{algorithm:r,mapLayerKey:i,start:o,end:s}=(e==null?void 0:e.source)??{},[{layers:a}]=im(),[c]=nv(),[{algorithms:u}]=$C(),f=R.useMemo(()=>{if(i&&r)return te.find(a,{key:i})},[i,r,a]);return n$e(async h=>{var p;if(f&&r){const{format:g,content:v}=((p=f==null?void 0:f.source)==null?void 0:p.map)??{};if(g&&v){const y=await GFe(c,r,g),S=te.find(u,{id:r});if(y){n(`Executing ${ga(e)} using ${y.name}...`);const w=await y.call("solve/pathfinding",{format:g,instances:[{start:o??0,end:s??0}],mapURI:`map:${encodeURIComponent(v)}`,algorithm:r});h.aborted?n("Canceled."):t(b=>te.set(b,"source.trace",{name:`${S==null?void 0:S.name}`,content:w,key:qo()}))}}}},[f,c,r,o,s,t,n,e,u],[f,c,r,o,s]),C.jsx(C.Fragment,{children:Xx.service})}),inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Query"},renderer:Xx.renderer,steps:Xx.steps,getSelectionInfo:({children:e,event:t,layer:n})=>{const{layer:r,setLayer:i,layers:o}=Vp(n),s=R.useMemo(()=>{const c=te.filter(o,{source:{type:"map"}});return te.filter(te.map(c,u=>{var h,p,g,v;const{parsedMap:f}=(u==null?void 0:u.source)??{};if(f&&t){const y=(v=(g=Qj((p=(h=u==null?void 0:u.source)==null?void 0:h.map)==null?void 0:p.format))==null?void 0:g.hydrate)==null?void 0:v.call(g,f);if(y){const S=(t==null?void 0:t.world)&&y.snap(t.world);if(S){const w=(t==null?void 0:t.world)&&y.nodeAt(S);return{point:S,node:w,key:u.key,name:ga(u)}}}}}))},[o]),a=R.useMemo(()=>!!r&&!!s.length&&{[r.key]:{primary:ga(r),items:{...te.reduce(s,(c,u)=>({...c,[`${n}-${u==null?void 0:u.key}-source`]:{primary:"Set as source",secondary:u==null?void 0:u.name,action:()=>i(Ta(r,f=>{te.set(f,"source.start",u==null?void 0:u.node),te.set(f,"source.query",void 0),te.set(f,"source.mapLayerKey",u==null?void 0:u.key),te.set(f,"source.trace",void 0)})),icon:C.jsx(G1e,{sx:{transform:"scale(0.5)"}})},[`${n}-${u==null?void 0:u.key}-destination`]:{primary:"Set as destination",secondary:u==null?void 0:u.name,action:()=>i(Ta(r,f=>{te.set(f,"source.end",u==null?void 0:u.node),te.set(f,"source.query",void 0),te.set(f,"source.mapLayerKey",u==null?void 0:u.key),te.set(f,"source.trace",void 0)})),icon:C.jsx($1e,{})}}),{})}}},[s,r,o,i]);return C.jsx(WFe,{event:t,layer:n,children:c=>e==null?void 0:e(te.merge(c,a))})}};function qFe({layer:e}){var t,n;return C.jsx(C.Fragment,{children:e&&R.createElement((n=qw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""])==null?void 0:n.renderer,{layer:e})})}function ga(e){var t,n;return e!=null&&e.name?e==null?void 0:e.name:(t=e==null?void 0:e.source)!=null&&t.type?qw[(n=e.source)==null?void 0:n.type].inferName(e):"Untitled Layer"}function wne(e){var t;return qw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""]}const qw={map:a$e,trace:Xx,query:VFe};function XFe(e,t,n=600){const[r,i]=R.useState(e);R.useEffect(()=>void i(e),[i,e]);const o=R.useMemo(()=>te.debounce(s=>t==null?void 0:t(s),n),[t,n]);return[r,s=>{i(s),o(s)}]}function YFe({value:e,onValueChange:t},n){var f,h,p;const[r,i]=XFe(e,t),o=g=>C.jsx(jt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:g}),s=g=>C.jsx(jt,{variant:"body1",children:g}),a=(g,v)=>C.jsxs(En,{alignItems:"center",children:[s(g),C.jsx(ai,{flex:1}),v]}),c=g=>g.map(v=>({id:v,name:te.startCase(v)})),u=r.name||ga(e);return C.jsx(C.Fragment,{children:C.jsxs(Up,{alignItems:"center",direction:"row",gap:2,children:[C.jsxs(ht,{py:1,ml:-1,children:[C.jsx(jt,{children:u}),C.jsx(jt,{variant:"body2",color:"text.secondary",children:te.startCase((f=r.source)==null?void 0:f.type)})]}),C.jsx(ai,{flex:1}),C.jsx(Up,{alignItems:"center",direction:"row",children:C.jsx(Ij,{appBar:{children:C.jsx(Aj,{children:"Edit Layer"})},trigger:g=>C.jsx(Fp,{size:"small",onClick:g,children:C.jsx(jk,{})}),children:C.jsxs(ht,{p:2,children:[C.jsx(ht,{pb:2,children:C.jsx(Ew,{fullWidth:!0,variant:"filled",label:"Layer Name",value:r.name??"",onChange:g=>i==null?void 0:i(Ta(r,v=>te.set(v,"name",g.target.value)))})}),o("Layer Options"),a("Transparency",C.jsx(Gs,{label:"Transparency",items:["25","50","75","100"].map(g=>({id:g,name:`${g}%`})),value:"100",showArrow:!0})),a("Display Mode",C.jsx(Gs,{label:"Display Mode",value:"normal",items:c(["normal","difference"]),showArrow:!0})),o("Source Options"),a("Type",C.jsx(Gs,{label:"Type",value:(h=r.source)==null?void 0:h.type,items:["map","trace","query"].map(g=>({id:g,name:te.startCase(g)})),onChange:g=>i==null?void 0:i(Ta(r,v=>{te.set(v,"source",{type:g})})),showArrow:!0})),((p=r.source)==null?void 0:p.type)&&R.createElement(qw[r.source.type].editor,{onChange:g=>i(g(r)),value:r})]})})})]})})}const KFe=R.forwardRef(YFe);function QFe(){const[{layers:e=[]},t]=im();return C.jsx(ht,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(ht,{sx:{mb:2},children:C.jsx(lA,{sortable:!0,icon:null,value:e,useDelete:!0,useReorder:!0,editor:n=>C.jsx(KFe,{value:n}),create:()=>({source:{type:"trace",trace:{}}}),onChange:n=>t(()=>({layers:n})),addItemLabel:"Layer",placeholderText:C.jsx(ht,{pt:2,children:"Click the button below to add a layer."})})})})}function JFe(){const{controls:e,onChange:t,state:n}=bf();return C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Content,{children:C.jsx(ht,{p:2,pr:1,pt:6,children:C.jsx(QFe,{})})}),C.jsx(zn.Extras,{children:e})]})}function _ne(e){return C.jsx(R1e,{...e,sx:{fontSize:12,transform:"translateY(1.75px) translateX(-2px)",...e.sx}})}function ZFe({children:e}){return C.jsx(jt,{variant:"overline",sx:{my:-.75,display:"block"},children:e})}var XC={exports:{}};/** +`,", "),{length:30})})}}function o7({label:e,value:t,type:n}){return C.jsxs(En,{width:"auto",mr:3,mt:.5,children:[C.jsx(jt,{component:"div",variant:"body2",...n,sx:{opacity:.54,...n==null?void 0:n.sx},children:e}),C.jsx(ai,{}),C.jsx(jt,{component:"div",variant:"body2",...n,children:i7(t)??"none"})]},`${e}::${i7(t)}`)}function Q3({event:e,variant:t="body2",max:n=10,...r}){const i=te.filter(te.entries(e),([,o])=>o!==void 0);return C.jsxs(En,{...r,children:[te.map(te.slice(i,0,n),([o,s])=>C.jsx(o7,{label:o,value:s,type:{variant:t}})),i.length>n&&C.jsx(o7,{label:`${i.length-n} more`,type:{sx:{pt:1}},value:""})]})}var bne={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Xt,function(){return function(n){function r(o){if(i[o])return i[o].exports;var s=i[o]={i:o,l:!1,exports:{}};return n[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}var i={};return r.m=n,r.c=i,r.d=function(o,s,a){r.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:a})},r.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(s,"a",s),s},r.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},r.p="",r(r.s=1)}([function(n,r,i){function o(a){var c=a===void 0?{}:a,u=c.ESCAPE,f=u===void 0?/^\\/:u,h=c.VARIABLE_START,p=h===void 0?/^\${\s*/:h,g=c.VARIABLE_END,v=g===void 0?/^\s*}/:g,y=c.PIPE_START,S=y===void 0?/^\s*\|\s*/:y,w=c.PIPE_PARAMETER_START,b=w===void 0?/^\s*:\s*/:w,x=c.QUOTED_STRING,E=x===void 0?r.DEFAULT_QUOTED_STRING_REGEX:x,I=c.QUOTED_STRING_TEST,A=I===void 0?null:I,k=c.QUOTED_STRING_GET_AND_ADVANCE,O=k===void 0?null:k,D=c.QUOTED_STRING_IN_PARAMETER_TEST,N=D===void 0?null:D,H=c.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,G=H===void 0?null:H,z=A||function(V){return E.test(V)},L=O||s(E),F=N||function(V){return E.test(V)},j=G||s(E);return function(V){function W(Pe){Pe===void 0&&(Pe=1),pe=pe.substr(Pe)}function K(Pe){Pe===void 0&&(Pe=/^/),W(pe.match(Pe)[0].length)}function X(){var Pe;return K(f),Pe=pe.length>0?pe[0]:"",W(),Pe}function Q(Pe){var ze=(Pe===void 0?{}:Pe).isNull,st=ze!==void 0&&ze;me={name:"",pipes:[]},Xe=!st}function ie(){ve.variables.push(me),Q({isNull:!0})}function ce(Pe){var ze=(Pe===void 0?{}:Pe).isNull,st=ze!==void 0&&ze;be={name:"",parameters:[]},ct=!st}function ue(){me.pipes.push(be),ce({isNull:!0})}function se(Pe){var ze=(Pe===void 0?{}:Pe).isNull,st=ze!==void 0&&ze;Ze="",Bt=!st}function J(){be.parameters.push(Ze),se({isNull:!0})}function ae(){return!!v.test(pe)&&(K(v),ye>=3&&J(),ye>=2&&ue(),ye>=1&&ie(),ye=0,!0)}function le(){return!!S.test(pe)&&(K(S),ye>=3&&J(),ye>=2&&ue(),ye>=1&&ce(),ye=2,!0)}function he(){return!!b.test(pe)&&(K(b),ye>=3&&J(),ye>=2&&se(),ye=3,!0)}for(var pe=V,ve={literals:[],variables:[]},ye=0,xe="",me={name:"",pipes:[]},be={name:"",parameters:[]},Ze="",Xe=!1,ct=!1,Bt=!1;pe&&pe.length>0;)switch(ye){case 0:if(f.test(pe)){xe+=X();continue}if(p.test(pe)){ye=1,Q(),ve.literals.push(xe),xe="",K(p);continue}xe+=pe[0],W();break;case 1:if(f.test(pe)){me.name+=X();continue}if(ae()||le())continue;if(z(pe)){me.name+=L(pe,W);continue}me.name+=pe[0],W();break;case 2:if(f.test(pe)){be.name+=X();continue}if(ae()||he()||le())continue;if(z(pe)){be.name+=L(pe,W);continue}be.name+=pe[0],W();break;case 3:if(f.test(pe)){Ze+=X();continue}if(ae()||he()||le())continue;if(F(pe)){Ze+=j(pe,W);continue}Ze+=pe[0],W()}return Bt&&be.parameters.push(Ze),ct&&me.pipes.push(be),Xe&&ve.variables.push(me),ve.literals.push(xe),ve}}function s(a){return function(c,u){var f=c.match(a);return u(f[0].length),f.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,r.parseStringTemplateGenerator=o,r.parseStringTemplate=o(),r.getQuotedStringAndAdvanceForRegex=s},function(n,r,i){n.exports=i(2)},function(n,r,i){function o(s){for(var a in s)r.hasOwnProperty(a)||(r[a]=s[a])}Object.defineProperty(r,"__esModule",{value:!0}),o(i(0)),o(i(3))},function(n,r,i){function o(f){return function(h){return f.hasOwnProperty(h)?f[h]:h.split(".").reduce(function(p,g){return p.hasOwnProperty(g)?p[g]:""},f)}}function s(f,h,p,g){g===void 0&&(g=o(h));var v=g(f.name);return f.pipes.reduce(function(y,S){return p.hasOwnProperty(S.name)?p[S.name](y,S.parameters):y},v??"")}function a(f,h,p,g){return g===void 0&&(g=o(h)),f.literals.length===0?"":f.literals.slice(1).reduce(function(v,y,S){return""+v+s(f.variables[S],h,p,g)+y},f.literals[0])}function c(f,h,p){return a(u.parseStringTemplate(f),h,p)}Object.defineProperty(r,"__esModule",{value:!0});var u=i(0);r.evaluateParsedString=a,r.evaluateStringTemplate=c}])})})(bne);var s7=bne.exports;function TFe(e={},t){const{$:n,...r}=e;return{...te.mapValues(r,t),$:n}}function J3(e){switch(e==null?void 0:e.constructor){case Array:{const t=te.map(e,J3);return n=>te.map(t,r=>r(n))}case Object:{const t=te.mapValues(e,J3);return n=>te.mapValues(t,r=>r(n))}case String:return Z3(e);default:return te.constant(e)}}function kFe(e={}){return TFe(e,t=>te.isFunction(t)?t:J3(t))}const a7=_f(e=>{const t=Function("$",`return ${e};`);return n=>t(new Proxy(kFe(n),{get(r,i){var o;return(o=r[i])==null?void 0:o.call(r,{})}}))},{primitive:!0}),AFe=/^\{\{\s*/,IFe=/^\s*\}\}/,IB=/\b\B/,Z3=_f(e=>{const n=s7.parseStringTemplateGenerator({VARIABLE_START:AFe,VARIABLE_END:IFe,PIPE_START:IB,PIPE_PARAMETER_START:IB,QUOTED_STRING:IB})(e);return te.join(n.literals,"")?r=>s7.evaluateParsedString(n,{},{},i=>a7(i)(r)):a7(n.variables[0].name)},{primitive:!0});function RFe(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var xne={exports:{}};(function(e,t){(function(n,r){typeof RFe=="function"?e.exports=r():n.pluralize=r()})(Xt,function(){var n=[],r=[],i={},o={},s={};function a(y){return typeof y=="string"?new RegExp("^"+y+"$","i"):y}function c(y,S){return y===S?S:y===y.toLowerCase()?S.toLowerCase():y===y.toUpperCase()?S.toUpperCase():y[0]===y[0].toUpperCase()?S.charAt(0).toUpperCase()+S.substr(1).toLowerCase():S.toLowerCase()}function u(y,S){return y.replace(/\$(\d{1,2})/g,function(w,b){return S[b]||""})}function f(y,S){return y.replace(S[0],function(w,b){var x=u(S[1],arguments);return c(w===""?y[b-1]:w,x)})}function h(y,S,w){if(!y.length||i.hasOwnProperty(y))return S;for(var b=w.length;b--;){var x=w[b];if(x[0].test(S))return f(S,x)}return S}function p(y,S,w){return function(b){var x=b.toLowerCase();return S.hasOwnProperty(x)?c(b,x):y.hasOwnProperty(x)?c(b,y[x]):h(x,b,w)}}function g(y,S,w,b){return function(x){var E=x.toLowerCase();return S.hasOwnProperty(E)?!0:y.hasOwnProperty(E)?!1:h(E,E,w)===E}}function v(y,S,w){var b=S===1?v.singular(y):v.plural(y);return(w?S+" ":"")+b}return v.plural=p(s,o,n),v.isPlural=g(s,o,n),v.singular=p(o,s,r),v.isSingular=g(o,s,r),v.addPluralRule=function(y,S){n.push([a(y),S])},v.addSingularRule=function(y,S){r.push([a(y),S])},v.addUncountableRule=function(y){if(typeof y=="string"){i[y.toLowerCase()]=!0;return}v.addPluralRule(y,"$0"),v.addSingularRule(y,"$0")},v.addIrregularRule=function(y,S){S=S.toLowerCase(),y=y.toLowerCase(),s[y]=S,o[S]=y},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(y){return v.addIrregularRule(y[0],y[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(y){return v.addPluralRule(y[0],y[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(y){return v.addSingularRule(y[0],y[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(v.addUncountableRule),v})})(xne);var PFe=xne.exports;const OFe=ds(PFe),MFe=""+new URL("parseTrace.worker-c4cde251.js",import.meta.url).href;class LFe extends Worker{constructor(){super(MFe,{type:"module"})}}const DFe=Rv(LFe);function NFe(e){const t=gc(),n=om("specimen");return R.useCallback(()=>n(async()=>{var r;if(e!=null&&e.trace){t("Processing trace...");try{const i=await DFe(e);return t("Trace loaded",OFe("step",((r=i==null?void 0:i.stepsPersistent)==null?void 0:r.length)??0,!0)),i}catch(i){t("Error parsing",`${i}`)}}}),[e])}function cg({label:e,icon:t,...n}){return C.jsx(vf,{title:te.startCase(e),children:C.jsx("span",{children:C.jsx(Fp,{...n,children:t})})},e)}function BFe(){return R.useCallback(e=>({result:"",error:void 0,offset:0}),[])}function cU(e){const t=gc(),{layer:n,setLayer:r}=Vp(e),{playback:i,playbackTo:o,step:s=0}=(n==null?void 0:n.source)??{},a=te.min([o,s])??0,c=!!o,u=i==="playing",[f,h]=[0,(o??1)-1];return R.useMemo(()=>{function p(S){r(Ta(n,w=>te.set(w,"source",{...w==null?void 0:w.source,...S})))}const g={start:f,end:h,step:a,canPlay:c&&!u&&a0},v=S=>te.clamp(a+S,f,h);return{playing:i==="playing",...g,...{play:()=>{t("Playback started"),p({playback:"playing",step:v(1)})},pause:(S=0)=>{t("Playback paused"),p({playback:"paused",step:v(S)})},stepTo:(S=0)=>p({step:S}),stop:()=>p({step:f,playback:"paused"}),stepForward:()=>p({step:v(1)}),stepBackward:()=>p({step:v(-1)}),tick:(S=1)=>p({playback:"playing",step:v(S)})}}},[h,i,u,c,f,a,r])}function $Fe(e,t){let n=!1;return requestAnimationFrame(async()=>{const r=await e();n||t(r)}),()=>{n=!0}}function FFe({children:e,value:t}){const{step:n,tick:r,end:i,playing:o,pause:s}=cU(t==null?void 0:t.key);qQ();const a=gc(),[{playbackRate:c=1}]=Ju(),u=BFe(),f=R.useCallback((h,p)=>C.jsx(zz,{primary:h,secondary:`Step ${n+p}`}),[n]);return R.useEffect(()=>{if(o)return n{for(const h of te.range(c)){const p=u(n+h);if(p.result||p.error)return{...p,offset:h}}return{result:"",offset:0,error:void 0}},({result:h,offset:p,error:g})=>{g?(a(`${te.trimEnd(g,".")}.`,`${p}`),s()):h?(a(`Breakpoint hit: ${h}.`,`${p}`),s(p)):r(c)}):s()},[f,o,i,n,s,r,a,u,c]),C.jsx(C.Fragment,{children:e})}function zFe({layer:e}){const{playing:t,canPause:n,canPlay:r,canStepBackward:i,canStepForward:o,canStop:s,pause:a,play:c,stepBackward:u,stepForward:f,stop:h}=cU(e==null?void 0:e.key);return qQ(),C.jsxs(C.Fragment,{children:[C.jsx(cg,{label:"step-backward",icon:C.jsx(H1e,{}),onClick:u,disabled:!i}),C.jsx(cg,{...t?{label:"pause",icon:C.jsx(B1e,{}),onClick:()=>a(),disabled:!n}:{label:"play",icon:C.jsx(F1e,{}),onClick:()=>c(),disabled:!r,color:"primary"}}),C.jsx(cg,{label:"step-forward",icon:C.jsx(U1e,{}),onClick:f,disabled:!o}),C.jsx(cg,{label:"stop",icon:C.jsx(W1e,{}),onClick:h,disabled:!s})]})}const jFe=e=>e==null;function UFe(e){const t=[],n={},r={},i=te.chain(e==null?void 0:e.events).map((a,c)=>({step:c,id:a.id,pId:a.pId})).groupBy("id").value();te.forEach(e==null?void 0:e.events,({id:a,pId:c},u)=>{!jFe(c)&&n[a]!==c&&(t.push({id:a,pId:c,step:u,prev:te.last(t)}),n[a]=c),r[u]=te.last(t)});const o=(a,c=(u=>(u=e==null?void 0:e.events)==null?void 0:u.length)()??0)=>{let f=r[c];for(;f;){if(f.id===a)return f.pId;f=f.prev}};return{getParent:o,getPath:a=>{const c=[a];let u={...(e.events??[])[a],step:a};for(;u;){const f=o(u.id,u.step);if(f){const h=te.findLast(i[f],p=>p.step<=u.step);if(h)c.push(h.step),u=h;else break}else break}return c}}}const Xx={key:"trace",inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Trace"},editor:Jg(({value:e,produce:t})=>{var n,r,i,o;return C.jsxs(C.Fragment,{children:[C.jsx(G1,{label:"Trace",content:C.jsx(aOe,{onChange:s=>t(a=>te.set(a,"source.trace",{...s,key:qo()})),value:(n=e==null?void 0:e.source)==null?void 0:n.trace})}),C.jsx(G1,{label:"Onion Skinning",content:C.jsx(Gs,{disabled:!0,showArrow:!0,value:((r=e==null?void 0:e.source)==null?void 0:r.onion)??"off",items:["off","transparent","solid"].map(s=>({id:s,name:te.startCase(s)})),onChange:s=>t(a=>te.set(a,"source.onion",s))})}),C.jsx(Rte,{label:"Preview"}),C.jsx(ht,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(Pte,{trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content})})]})}),service:Jg(({value:e,produce:t})=>{var i,o,s,a,c,u,f,h;const{palette:n}=Dn(),r=NFe({trace:(o=(i=e==null?void 0:e.source)==null?void 0:i.trace)==null?void 0:o.content,context:{color:Nj,themeAccent:n.primary.main,themeTextPrimary:n.text.primary,themeBackground:n.background.paper},view:"main"});return R.useEffect(()=>{t(p=>{var g,v,y,S;return te.set(p,"source.playbackTo",((S=(y=(v=(g=e==null?void 0:e.source)==null?void 0:g.trace)==null?void 0:v.content)==null?void 0:y.events)==null?void 0:S.length)??0)})},[(u=(c=(a=(s=e==null?void 0:e.source)==null?void 0:s.trace)==null?void 0:a.content)==null?void 0:c.events)==null?void 0:u.length]),Ite(async()=>{const p=await r();t(g=>te.set(g,"source.parsedTrace",p))},[r],[(h=(f=e==null?void 0:e.source)==null?void 0:f.trace)==null?void 0:h.key]),C.jsx(C.Fragment,{children:C.jsx(FFe,{value:e})})}),renderer:({layer:e})=>{var a,c;const t=(a=e==null?void 0:e.source)==null?void 0:a.parsedTrace,n=XQ(((c=e==null?void 0:e.source)==null?void 0:c.step)??0,1e3/60),r=HFe(e,n),i=R.useMemo(()=>te.map(t==null?void 0:t.stepsPersistent,u=>te.map(u,f=>te.merge(f,{meta:{sourceLayer:e==null?void 0:e.key}}))),[t==null?void 0:t.stepsPersistent,e==null?void 0:e.key]),o=R.useMemo(()=>te.map(t==null?void 0:t.stepsTransient,u=>te.map(u,f=>te.merge(f,{meta:{sourceLayer:e==null?void 0:e.key}}))),[t==null?void 0:t.stepsTransient,e==null?void 0:e.key]),s=R.useMemo(()=>[o[n]??[]],[o,n]);return C.jsxs(C.Fragment,{children:[C.jsx(RBe,{step:n,nodes:i}),C.jsx(W1,{nodes:s}),r]})},steps:({layer:e,children:t})=>{var n,r,i;return C.jsx(C.Fragment,{children:t==null?void 0:t(((i=(r=(n=e==null?void 0:e.source)==null?void 0:n.trace)==null?void 0:r.content)==null?void 0:i.events)??[])})},getSelectionInfo:({layer:e,event:t,children:n})=>{const{layer:r,setLayer:i}=Vp(e),o=R.useMemo(()=>{var c,u,f,h;const s=((f=(u=(c=r==null?void 0:r.source)==null?void 0:c.trace)==null?void 0:u.content)==null?void 0:f.events)??[],a=te.chain((h=t==null?void 0:t.info)==null?void 0:h.components).filter(p=>{var g;return((g=p.meta)==null?void 0:g.sourceLayer)===(r==null?void 0:r.key)}).map(p=>{var g;return(g=p.meta)==null?void 0:g.step}).filter(te.negate(te.isUndefined)).sort((p,g)=>p-g).value();if(a.length&&r){const p=te.last(a),g=s[p];if(g)return{[r.key]:{primary:ga(r),items:{properties:{index:-1,primary:C.jsx(Q3,{event:g,vertical:!0})},[`${g}`]:{primary:`Go to Step ${p}`,secondary:`${te.startCase(g.type)}`,action:()=>i(Ta(r,v=>{te.set(v,"source.step",p)})),icon:C.jsx(x1e,{})}}}}}return{}},[r,t]);return C.jsx(C.Fragment,{children:n==null?void 0:n(o)})}};function HFe(e,t=0){var o,s;const{palette:n}=Dn(),{getPath:r}=R.useMemo(()=>{var a,c;return(c=(a=e==null?void 0:e.source)==null?void 0:a.trace)!=null&&c.content?UFe(e.source.trace.content):{getParent:te.constant(void 0),getPath:te.constant([])}},[(s=(o=e==null?void 0:e.source)==null?void 0:o.trace)==null?void 0:s.content]);return R.useMemo(()=>{var a,c,u,f;if((f=(u=(c=(a=e==null?void 0:e.source)==null?void 0:a.trace)==null?void 0:c.content)==null?void 0:u.render)!=null&&f.path){const{pivot:h={},scale:p=1}=e.source.trace.content.render.path,{x:g,y:v}=h,y=g?Z3(g):b=>b.event.x,S=v?Z3(v):b=>b.event.y,w=te.map(r(t),b=>{var x,E,I,A;return(A=(I=(E=(x=e==null?void 0:e.source)==null?void 0:x.trace)==null?void 0:E.content)==null?void 0:I.events)==null?void 0:A[b]});if(w.length){const b=[{$:"rect",x:y({event:{x:0,y:0,...te.head(w)}})-2*p/2,y:S({event:{x:0,y:0,...te.head(w)}})-2*p/2,fill:B1("destination"),width:2*p,height:2*p},{$:"rect",x:y({event:{x:0,y:0,...te.last(w)}})-2*p/2,y:S({event:{x:0,y:0,...te.last(w)}})-2*p/2,fill:B1("source"),width:2*p,height:2*p},{$:"path",points:w.map(x=>({x:y({event:{x:0,y:0,...x}}),y:S({event:{x:0,y:0,...x}})})),fill:n.primary.main,alpha:1,lineWidth:1*p}];return C.jsx(W1,{nodes:[te.map(b,x=>({component:x,meta:{source:"path"}}))]})}}return C.jsx(C.Fragment,{})},[e,t,n,r])}const WFe=Xx.getSelectionInfo;async function GFe(e,t,n){for(const r of e){const i=await r.call("features/algorithms"),o=await r.call("features/formats");if(te.find(i,{id:t})&&te.find(o,{id:n}))return r}}const VFe={key:"query",editor:Jg(({value:e,produce:t})=>{var c,u;const{algorithm:n}=(e==null?void 0:e.source)??{},{layers:r,layer:i,key:o}=Vp(void 0,f=>{var h;return((h=f.source)==null?void 0:h.type)==="map"}),[{algorithms:s}]=$C(),[a]=nv();return C.jsxs(C.Fragment,{children:[C.jsx(G1,{label:"Algorithm",content:C.jsx(Gs,{showArrow:!0,icon:C.jsx(k1e,{}),label:"Choose Algorithm",value:n,items:s.map(f=>{var h;return{...f,description:(h=te.find(a,{url:f.source}))==null?void 0:h.name}}),onChange:async f=>t(h=>te.set(h,"source.algorithm",f))})}),!(s!=null&&s.length)&&C.jsx(jt,{variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),C.jsx(G1,{label:"Map",content:C.jsx(Gs,{showArrow:!0,icon:C.jsx(Cw,{}),label:"Choose Layer",value:o,items:r.map(f=>({id:f.key,name:ga(f)})),onChange:async f=>t(h=>te.set(h,"source.mapLayerKey",f))})}),i&&C.jsxs(jt,{variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:["Define source and destination nodes by clicking on valid regions on"," ",ga(i)]}),C.jsx(Rte,{label:"Preview"}),C.jsx(ht,{sx:{height:240,mx:-2,mb:-2},children:C.jsx(Pte,{trace:(u=(c=e==null?void 0:e.source)==null?void 0:c.trace)==null?void 0:u.content})})]})}),service:Jg(({value:e,produce:t})=>{const n=gc(),{algorithm:r,mapLayerKey:i,start:o,end:s}=(e==null?void 0:e.source)??{},[{layers:a}]=im(),[c]=nv(),[{algorithms:u}]=$C(),f=R.useMemo(()=>{if(i&&r)return te.find(a,{key:i})},[i,r,a]);return n$e(async h=>{var p;if(f&&r){const{format:g,content:v}=((p=f==null?void 0:f.source)==null?void 0:p.map)??{};if(g&&v){const y=await GFe(c,r,g),S=te.find(u,{id:r});if(y){n(`Executing ${ga(e)} using ${y.name}...`);const w=await y.call("solve/pathfinding",{format:g,instances:[{start:o??0,end:s??0}],mapURI:`map:${encodeURIComponent(v)}`,algorithm:r});h.aborted?n("Canceled."):t(b=>te.set(b,"source.trace",{name:`${S==null?void 0:S.name}`,content:w,key:qo()}))}}}},[f,c,r,o,s,t,n,e,u],[f,c,r,o,s]),C.jsx(C.Fragment,{children:Xx.service})}),inferName:e=>{var t,n;return((n=(t=e.source)==null?void 0:t.trace)==null?void 0:n.name)??"Untitled Query"},renderer:Xx.renderer,steps:Xx.steps,getSelectionInfo:({children:e,event:t,layer:n})=>{const{layer:r,setLayer:i,layers:o}=Vp(n),s=R.useMemo(()=>{const c=te.filter(o,{source:{type:"map"}});return te.filter(te.map(c,u=>{var h,p,g,v;const{parsedMap:f}=(u==null?void 0:u.source)??{};if(f&&t){const y=(v=(g=Qj((p=(h=u==null?void 0:u.source)==null?void 0:h.map)==null?void 0:p.format))==null?void 0:g.hydrate)==null?void 0:v.call(g,f);if(y){const S=(t==null?void 0:t.world)&&y.snap(t.world);if(S){const w=(t==null?void 0:t.world)&&y.nodeAt(S);return{point:S,node:w,key:u.key,name:ga(u)}}}}}))},[o]),a=R.useMemo(()=>!!r&&!!s.length&&{[r.key]:{primary:ga(r),items:{...te.reduce(s,(c,u)=>({...c,[`${n}-${u==null?void 0:u.key}-source`]:{primary:"Set as source",secondary:u==null?void 0:u.name,action:()=>i(Ta(r,f=>{te.set(f,"source.start",u==null?void 0:u.node),te.set(f,"source.query",void 0),te.set(f,"source.mapLayerKey",u==null?void 0:u.key),te.set(f,"source.trace",void 0)})),icon:C.jsx(G1e,{sx:{transform:"scale(0.5)"}})},[`${n}-${u==null?void 0:u.key}-destination`]:{primary:"Set as destination",secondary:u==null?void 0:u.name,action:()=>i(Ta(r,f=>{te.set(f,"source.end",u==null?void 0:u.node),te.set(f,"source.query",void 0),te.set(f,"source.mapLayerKey",u==null?void 0:u.key),te.set(f,"source.trace",void 0)})),icon:C.jsx($1e,{})}}),{})}}},[s,r,o,i]);return C.jsx(WFe,{event:t,layer:n,children:c=>e==null?void 0:e(te.merge(c,a))})}};function qFe({layer:e}){var t,n;return C.jsx(C.Fragment,{children:e&&R.createElement((n=qw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""])==null?void 0:n.renderer,{layer:e})})}function ga(e){var t,n;return e!=null&&e.name?e==null?void 0:e.name:(t=e==null?void 0:e.source)!=null&&t.type?qw[(n=e.source)==null?void 0:n.type].inferName(e):"Untitled Layer"}function wne(e){var t;return qw[((t=e==null?void 0:e.source)==null?void 0:t.type)??""]}const qw={map:a$e,trace:Xx,query:VFe};function XFe(e,t,n=600){const[r,i]=R.useState(e);R.useEffect(()=>void i(e),[i,e]);const o=R.useMemo(()=>te.debounce(s=>t==null?void 0:t(s),n),[t,n]);return[r,s=>{i(s),o(s)}]}function YFe({value:e,onValueChange:t},n){var f,h,p;const[r,i]=XFe(e,t),o=g=>C.jsx(jt,{variant:"overline",color:"text.secondary",sx:{pt:1},component:"p",children:g}),s=g=>C.jsx(jt,{variant:"body1",children:g}),a=(g,v)=>C.jsxs(En,{alignItems:"center",children:[s(g),C.jsx(ai,{flex:1}),v]}),c=g=>g.map(v=>({id:v,name:te.startCase(v)})),u=r.name||ga(e);return C.jsx(C.Fragment,{children:C.jsxs(Up,{alignItems:"center",direction:"row",gap:2,children:[C.jsxs(ht,{py:1,ml:-1,children:[C.jsx(jt,{children:u}),C.jsx(jt,{variant:"body2",color:"text.secondary",children:te.startCase((f=r.source)==null?void 0:f.type)})]}),C.jsx(ai,{flex:1}),C.jsx(Up,{alignItems:"center",direction:"row",children:C.jsx(Ij,{appBar:{children:C.jsx(Aj,{children:"Edit Layer"})},trigger:g=>C.jsx(Fp,{size:"small",onClick:g,children:C.jsx(jk,{})}),children:C.jsxs(ht,{p:2,children:[C.jsx(ht,{pb:2,children:C.jsx(Ew,{fullWidth:!0,variant:"filled",label:"Layer Name",value:r.name??"",onChange:g=>i==null?void 0:i(Ta(r,v=>te.set(v,"name",g.target.value)))})}),o("Layer Options"),a("Transparency",C.jsx(Gs,{label:"Transparency",items:["25","50","75","100"].map(g=>({id:g,name:`${g}%`})),value:"100",showArrow:!0})),a("Display Mode",C.jsx(Gs,{label:"Display Mode",value:"normal",items:c(["normal","difference"]),showArrow:!0})),o("Source Options"),a("Type",C.jsx(Gs,{label:"Type",value:(h=r.source)==null?void 0:h.type,items:["map","trace","query"].map(g=>({id:g,name:te.startCase(g)})),onChange:g=>i==null?void 0:i(Ta(r,v=>{te.set(v,"source",{type:g})})),showArrow:!0})),((p=r.source)==null?void 0:p.type)&&R.createElement(qw[r.source.type].editor,{onChange:g=>i(g(r)),value:r})]})})})]})})}const KFe=R.forwardRef(YFe);function QFe(){const[{layers:e=[]},t]=im();return C.jsx(ht,{sx:{overflow:"auto hidden",width:"100%"},children:C.jsx(ht,{sx:{mb:2},children:C.jsx(lA,{sortable:!0,icon:null,value:e,useDelete:!0,useReorder:!0,editor:n=>C.jsx(KFe,{value:n}),create:()=>({source:{type:"trace",trace:{}}}),onChange:n=>t(()=>({layers:n})),addItemLabel:"Layer",placeholderText:C.jsx(ht,{pt:2,children:"Click the button below to add a layer."})})})})}function JFe(){const{controls:e,onChange:t,state:n}=bf();return C.jsxs(zn,{onChange:t,stack:n,children:[C.jsx(zn.Content,{children:C.jsx(ht,{p:2,pr:1,pt:6,children:C.jsx(QFe,{})})}),C.jsx(zn.Extras,{children:e})]})}function _ne(e){return C.jsx(R1e,{...e,sx:{fontSize:12,transform:"translateY(1.75px) translateX(-2px)",...e.sx}})}function ZFe({children:e}){return C.jsx(jt,{variant:"overline",sx:{my:-.75,display:"block"},children:e})}var XC={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors diff --git a/index.html b/index.html index d98f1c74..523ab670 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ - +