!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Terminal",[],e):"object"==typeof exports?exports.Terminal=e():t.Terminal=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}({"./node_modules/balanced-match/index.js":function(t,e,r){"use strict";function n(t,e,r){t instanceof RegExp&&(t=o(t,r)),e instanceof RegExp&&(e=o(e,r));var n=i(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function o(t,e){var r=e.match(t);return r?r[0]:null}function i(t,e,r){var n,o,i,u,a,s=r.indexOf(t),c=r.indexOf(e,s+1),f=s;if(s>=0&&c>0){for(n=[],i=r.length;f>=0&&!a;)f==s?(n.push(f),s=r.indexOf(t,f+1)):1==n.length?a=[n.pop(),c]:((o=n.pop())<i&&(i=o,u=c),c=r.indexOf(e,f+1)),f=s<c&&s>=0?s:c;n.length&&(a=[i,u])}return a}t.exports=n,n.range=i},"./node_modules/brace-expansion/index.js":function(t,e,r){var n=r("./node_modules/concat-map/index.js"),o=r("./node_modules/balanced-match/index.js");t.exports=function(t){if(!t)return[];"{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2));return function t(e,r){var i=[],u=o("{","}",e);if(!u||/\$$/.test(u.pre))return[e];var s,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(u.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(u.body),m=c||l,v=u.body.indexOf(",")>=0;if(!m&&!v)return u.post.match(/,.*\}/)?(e=u.pre+"{"+u.body+a+u.post,t(e)):[e];if(m)s=u.body.split(/\.\./);else{if(1===(s=function t(e){if(!e)return[""];var r=[],n=o("{","}",e);if(!n)return e.split(",");var i=n.pre,u=n.body,a=n.post,s=i.split(",");s[s.length-1]+="{"+u+"}";var c=t(a);a.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c));return r.push.apply(r,s),r}(u.body)).length)if(1===(s=t(s[0],!1).map(p)).length)return(g=u.post.length?t(u.post,!1):[""]).map((function(t){return u.pre+s[0]+t}))}var _,b=u.pre,g=u.post.length?t(u.post,!1):[""];if(m){var j=f(s[0]),O=f(s[1]),w=Math.max(s[0].length,s[1].length),S=3==s.length?Math.abs(f(s[2])):1,E=y;O<j&&(S*=-1,E=d);var P=s.some(h);_=[];for(var M=j;E(M,O);M+=S){var D;if(l)"\\"===(D=String.fromCharCode(M))&&(D="");else if(D=String(M),P){var k=w-D.length;if(k>0){var I=new Array(k+1).join("0");D=M<0?"-"+I+D.slice(1):I+D}}_.push(D)}}else _=n(s,(function(e){return t(e,!1)}));for(var T=0;T<_.length;T++)for(var A=0;A<g.length;A++){var x=b+_[T]+g[A];(!r||m||x)&&i.push(x)}return i}(function(t){return t.split("\\\\").join(i).split("\\{").join(u).split("\\}").join(a).split("\\,").join(s).split("\\.").join(c)}(t),!0).map(l)};var i="\0SLASH"+Math.random()+"\0",u="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function f(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function l(t){return t.split(i).join("\\").split(u).join("{").split(a).join("}").split(s).join(",").split(c).join(".")}function p(t){return"{"+t+"}"}function h(t){return/^-?0\d/.test(t)}function y(t,e){return t<=e}function d(t,e){return t>=e}},"./node_modules/concat-map/index.js":function(t,e){t.exports=function(t,e){for(var n=[],o=0;o<t.length;o++){var i=e(t[o],o);r(i)?n.push.apply(n,i):n.push(i)}return n};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},"./node_modules/get-options/index.js":function(t,e,r){"use strict";class n{constructor(t,e=""){this.shortNames=[],this.longNames=[],this.params=[],this.values=[],this.defineNames(t),this.defineParams(e)}defineNames(t){Array.isArray(t)||(t=String(t).split(/,/g));for(let e of t)e=e.trim(),/^-([^\s-])$/.test(e)?this.shortNames.push(RegExp.lastParen):this.longNames.push(e.replace(/^-+/,""))}defineParams(t){t=(t=Array.isArray(t)?t.filter(Boolean).join(" "):String(t).trim().split(/\s+/g)).map(t=>t.replace(/^<(.+?)>$|^\[(.+?)\]$|^\((.+?)\)$/gm,(...t)=>t.slice(1,4).filter(Boolean).join("")));for(const e of t){if(!e)continue;const[,t,r=".+"]=e.match(/^([^=]+)(?:=(.+)?)?$/);this.params.push({name:t,pattern:r}),/\.{3}$/.test(t)&&(this.variadic=!0)}}get bundlePattern(){if(this._bundlePattern)return this._bundlePattern;const t=this.params.map(t=>`(${t.pattern})?`).join(""),e=1===this.shortNames.length?this.shortNames[0]:`[${this.shortNames.join("")}]`;return this._bundlePattern=e+t}get arity(){return this.params?this.params.length:0}get names(){return this.shortNames.concat(this.longNames)}get canCollect(){return!!(this.variadic||this.values.length<this.params.length)}}function o(t){return Array.isArray(t)?t:[t]}function i(t,e){return t=t.replace(/^-+/,""),!e&&/-/.test(t)&&(t=t.toLowerCase().replace(/([a-z])-+([a-z])/g,(t,e,r)=>e+r.toUpperCase())),t}function u(t,e=[]){if(!e||0===e.length)return!1;t=String(t),e=o(e).filter(Boolean);for(const r of e)if(r===t&&"string"==typeof r||r instanceof RegExp&&r.test(t))return!0;return!1}function a(t){const e={};for(let r=0,n=t.length;r<n;++r)e[t[r]]=!0;return Object.keys(e)}void 0!==t.exports&&(t.exports=function(t,e=null,r={}){if(!t||0===t.length)return{options:{},argv:[]};if(Array.isArray(t)?t=[...t].map(String):"string"==typeof t&&(t=function(t){t=String(t||"");const e=[],{length:r}=t;let n="",o="",i=!1;for(let u=0;u<r;++u){const r=t[u];if(i)o+=r,i=!1;else if(n||!/[ \t\n]/.test(r)){if("\\"===r){i=!0;const e=t[u+1];if(n&&(n===e||"\\"===e)||!n&&/[- \t\n\\'"`]/.test(e))continue}else if((!n||r===n)&&/['"`]/.test(r)){n=n===r?"":r;continue}o+=r}else o&&e.push(o),o=""}return o&&e.push(o),e}(t)),null===e||""===e||!1===e)return function(t,e={}){const r=new Object(null),n=[];let o;if(!t)return r;const u=t.indexOf("--");-1!==u&&(o=t.slice(u+1),t=t.slice(0,u));for(let o=0,u=t.length;o<u;++o){let u=t[o];if(/^-/.test(u))if(!e.ignoreEquals&&/=/.test(u)){const t=u.split(/=/);u=i(t[0],e.noCamelCase),r[u]=t.slice(1).join("=")}else{u=i(u,e.noCamelCase);const n=t[o+1];if(null==n||/^-/.test(n))r[u]=!0;else{const e=t.findIndex((t,e)=>e>o&&/^-/.test(t));-1!==e?(r[u]=t.slice(o+1,e),e-o<3&&(r[u]=r[u][0]),o=e-1):r[u]=!0}}else n.push(u)}return o&&n.push(...o),{options:r,argv:n}}(t,r);if("[object String]"===Object.prototype.toString.call(e)){const t=e.match(/[^\s:]:?/g);e={},t.forEach(t=>{e[`-${t.replace(/:/,"")}`]=t.length>1?"<arg>":""})}const{noAliasPropagation:s,noCamelCase:c,noBundling:f,noMixedOrder:l,noUndefined:p,terminator:h,ignoreEquals:y,duplicates:d="use-last"}=r,m={},v={},_={argv:[],options:new Object(null)};for(const t in e){const r=new n(t,e[t]);for(const t of r.shortNames){if(void 0!==m[t])throw new ReferenceError(`Short option "-${t}" already defined`);m[`-${t}`]=r}for(const t of r.longNames){if(void 0!==v[t])throw new ReferenceError(`Long option "--${t}" already defined`);v[`--${t}`]=r}}let b;function g(t,e,r){switch(d){case"use-first":return _.options[e];case"use-last":default:return _.options[e]=r;case"limit-first":case"limit-last":_.argv.push(t.prevMatchedName,...o(r));break;case"error":const n=new TypeError(`Attempting to reassign option "${e}" with value(s) ${JSON.stringify(r)}`);throw n.affectedOption=t,n.affectedValue=r,n;case"append":const i=o(_.options[e]),u=o(r);_.options[e]=i.concat(u);break;case"stack":{let n=_.options[e];const i=o(r);t.stacked?_.options[e].push(o(i)):(n=o(n),_.options[e]=[n,i],t.stacked=!0);break}case"stack-values":{let n=_.options[e];if(!t.stacked){const e=[];for(const t of o(n))e.push([t]);n=e,t.stacked=!0}o(r).forEach((t,e)=>{void 0===n[e]&&(n[e]=Array(n[0].length-1)),n[e].push(t)}),_.options[e]=n;break}}}function j(t,e){if(s){let r=t.lastMatchedName;"first-only"===s&&(r=t.longNames[0]||t.shortNames[0]),r=i(r,c),_.options[r]?g(t,r,e):_.options[r]=e}else{const{names:r}=t;for(let n of r)n=i(n,c),_.options[n]&&g(t,n,e),_.options[n]=e}}function O(){let t=b.values;1!==b.arity||b.variadic||(t=t[0]),j(b,t),b.values=[],b=null}function w(t){for(let e=0,r=(t=t.reverse()).length;e<r;++e){const r=t[e],n=m[r]||v[r];if(n){const r=Math.max(0,e-n.arity),o=e+1,i=t.slice(r,o).reverse();t.splice(r,i.length,...i)}}return t}const S=Object.keys(m);let E,P,M;if(!f&&S.length&&(P=a(S.map(t=>m[t].bundlePattern)).join("|"),E=new RegExp(`^-(${P})+`,"g"),M=a(S.filter(t=>!m[t].arity).map(t=>m[t].bundlePattern)).join("|"),M=new RegExp(`^(-(?:${M})+)((?!${P})\\S+)`),P=new RegExp(P,"g")),!y||E){const e=new RegExp(`^(?:${Object.keys(v).join("|")})=`);for(let r=0,n=t.length;r<n;++r){let o=t[r];if(E&&(E.lastIndex=0,E.test(o))){const e=o.match(M);e&&(M.lastIndex=0,o=e[1],t.splice(r+1,0,e[2]),n=t.length);const i=[].concat(...o.match(P).map(t=>{const e=m[`-${t[0]}`],r=[`-${t[0]}`];return e.arity?(r.push(...t.match(new RegExp(e.bundlePattern)).slice(1).filter(t=>t)),r):r}));t.splice(r,1,...i),n=t.length,r+=i.length-1}else if(e.test(o)){const e=o.match(/^([^=]+)=(.+)$/);t.splice(r,1,e[1],e[2]),n=t.length,r+=1}}}"limit-last"===d&&(t=w(t));for(let e=0,r=t.length;e<r;++e){const r=t[e],n=m[r]||v[r];if(n)n.lastMatchedName=r,b&&O(),n.arity?b=n:j(n,!0),n.prevMatchedName=r;else{const n=u(r,h),o=()=>_.argv.push(...t.slice(e+1));if(b&&b.canCollect&&!n)b.values.push(r);else{if(b&&O(),n){o();break}if(p&&/^-./.test(r)){let t=p;switch(typeof p){case"function":t=t(r);break;case"boolean":t='Unknown option: "%s"';case"string":t=new TypeError(t.replace("%s",r))}throw t}if(_.argv.push(r),l){o();break}}}}return b&&O(),"limit-last"===d&&(_.argv=w(_.argv)),_})},"./node_modules/immutable/dist/immutable.es.js":function(t,e,r){"use strict";r.r(e),r.d(e,"version",(function(){return rn})),r.d(e,"Collection",(function(){return _})),r.d(e,"Iterable",(function(){return on})),r.d(e,"Seq",(function(){return U})),r.d(e,"Map",(function(){return ge})),r.d(e,"OrderedMap",(function(){return nr})),r.d(e,"List",(function(){return He})),r.d(e,"Stack",(function(){return sr})),r.d(e,"Set",(function(){return _r})),r.d(e,"OrderedSet",(function(){return Wr})),r.d(e,"Record",(function(){return Vr})),r.d(e,"Range",(function(){return Er})),r.d(e,"Repeat",(function(){return Zr})),r.d(e,"is",(function(){return Z})),r.d(e,"fromJS",(function(){return tn})),r.d(e,"hash",(function(){return nt})),r.d(e,"isImmutable",(function(){return S})),r.d(e,"isCollection",(function(){return y})),r.d(e,"isKeyed",(function(){return d})),r.d(e,"isIndexed",(function(){return m})),r.d(e,"isAssociative",(function(){return v})),r.d(e,"isOrdered",(function(){return P})),r.d(e,"isValueObject",(function(){return Q})),r.d(e,"get",(function(){return $t})),r.d(e,"getIn",(function(){return Pr})),r.d(e,"has",(function(){return Bt})),r.d(e,"hasIn",(function(){return Dr})),r.d(e,"merge",(function(){return ue})),r.d(e,"mergeDeep",(function(){return se})),r.d(e,"mergeWith",(function(){return ae})),r.d(e,"mergeDeepWith",(function(){return ce})),r.d(e,"remove",(function(){return Kt})),r.d(e,"removeIn",(function(){return Qt})),r.d(e,"set",(function(){return Yt})),r.d(e,"setIn",(function(){return Jt})),r.d(e,"update",(function(){return te})),r.d(e,"updateIn",(function(){return Xt}));var n={};function o(t){t&&(t.value=!0)}function i(){}function u(t){return void 0===t.size&&(t.size=t.__iterate(s)),t.size}function a(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?u(t)+e:e}function s(){return!0}function c(t,e,r){return(0===t&&!h(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function f(t,e){return p(t,e,0)}function l(t,e){return p(t,e,e)}function p(t,e,r){return void 0===t?r:h(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function h(t){return t<0||0===t&&1/t==-1/0}function y(t){return Boolean(t&&t["@@__IMMUTABLE_ITERABLE__@@"])}function d(t){return Boolean(t&&t["@@__IMMUTABLE_KEYED__@@"])}function m(t){return Boolean(t&&t["@@__IMMUTABLE_INDEXED__@@"])}function v(t){return d(t)||m(t)}var _=function(t){return y(t)?t:U(t)},b=function(t){function e(t){return d(t)?t:q(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(_),g=function(t){function e(t){return m(t)?t:N(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(_),j=function(t){function e(t){return y(t)&&!v(t)?t:W(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(_);_.Keyed=b,_.Indexed=g,_.Set=j;function O(t){return Boolean(t&&t["@@__IMMUTABLE_SEQ__@@"])}function w(t){return Boolean(t&&t["@@__IMMUTABLE_RECORD__@@"])}function S(t){return y(t)||w(t)}var E="@@__IMMUTABLE_ORDERED__@@";function P(t){return Boolean(t&&t[E])}var M="function"==typeof Symbol&&Symbol.iterator,D=M||"@@iterator",k=function(t){this.next=t};function I(t,e,r,n){var o=0===t?e:1===t?r:[e,r];return n?n.value=o:n={value:o,done:!1},n}function T(){return{value:void 0,done:!0}}function A(t){return!!z(t)}function x(t){return t&&"function"==typeof t.next}function C(t){var e=z(t);return e&&e.call(t)}function z(t){var e=t&&(M&&t[M]||t["@@iterator"]);if("function"==typeof e)return e}k.prototype.toString=function(){return"[Iterator]"},k.KEYS=0,k.VALUES=1,k.ENTRIES=2,k.prototype.inspect=k.prototype.toSource=function(){return this.toString()},k.prototype[D]=function(){return this};var R=Object.prototype.hasOwnProperty;function F(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var U=function(t){function e(t){return null==t?V():S(t)?t.toSeq():function(t){var e=X(t);if(e)return e;if("object"==typeof t)return new H(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this._cache;if(r){for(var n=r.length,o=0;o!==n;){var i=r[e?n-++o:o++];if(!1===t(i[1],i[0],this))break}return o}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var r=this._cache;if(r){var n=r.length,o=0;return new k((function(){if(o===n)return{value:void 0,done:!0};var i=r[e?n-++o:o++];return I(t,i[0],i[1])}))}return this.__iteratorUncached(t,e)},e}(_),q=function(t){function e(t){return null==t?V().toKeyedSeq():y(t)?d(t)?t.toSeq():t.fromEntrySeq():w(t)?t.toSeq():K(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(U),N=function(t){function e(t){return null==t?V():y(t)?d(t)?t.entrySeq():t.toIndexedSeq():w(t)?t.toSeq().entrySeq():Y(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(U),W=function(t){function e(t){return(y(t)&&!v(t)?t:N(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(U);U.isSeq=O,U.Keyed=q,U.Set=W,U.Indexed=N,U.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var L=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[a(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length,o=0;o!==n;){var i=e?n-++o:o++;if(!1===t(r[i],i,this))break}return o},e.prototype.__iterator=function(t,e){var r=this._array,n=r.length,o=0;return new k((function(){if(o===n)return{value:void 0,done:!0};var i=e?n-++o:o++;return I(t,i,r[i])}))},e}(N),H=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return R.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,o=n.length,i=0;i!==o;){var u=n[e?o-++i:i++];if(!1===t(r[u],u,this))break}return i},e.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,o=n.length,i=0;return new k((function(){if(i===o)return{value:void 0,done:!0};var u=n[e?o-++i:i++];return I(t,u,r[u])}))},e}(q);H.prototype[E]=!0;var B,$=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=C(this._collection),n=0;if(x(r))for(var o;!(o=r.next()).done&&!1!==t(o.value,n++,this););return n},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=C(this._collection);if(!x(r))return new k(T);var n=0;return new k((function(){var e=r.next();return e.done?e:I(t,n++,e.value)}))},e}(N);function V(){return B||(B=new L([]))}function K(t){var e=Array.isArray(t)?new L(t):A(t)?new $(t):void 0;if(e)return e.fromEntrySeq();if("object"==typeof t)return new H(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function Y(t){var e=X(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function X(t){return F(t)?new L(t):A(t)?new $(t):void 0}function J(t){return Boolean(t&&t["@@__IMMUTABLE_MAP__@@"])}function G(t){return J(t)&&P(t)}function Q(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function Z(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!(Q(t)&&Q(e)&&t.equals(e))}var tt="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function et(t){return t>>>1&1073741824|3221225471&t}var rt=Object.prototype.valueOf;function nt(t){switch(typeof t){case"boolean":return t?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var e=0|t;e!==t&&(e^=4294967295*t);for(;t>4294967295;)e^=t/=4294967295;return et(e)}(t);case"string":return t.length>lt?function(t){var e=yt[t];void 0===e&&(e=ot(t),ht===pt&&(ht=0,yt={}),ht++,yt[t]=e);return e}(t):ot(t);case"object":case"function":return null===t?1108378658:"function"==typeof t.hashCode?et(t.hashCode(t)):(t.valueOf!==rt&&"function"==typeof t.valueOf&&(t=t.valueOf(t)),function(t){var e;if(st&&void 0!==(e=at.get(t)))return e;if(void 0!==(e=t[ft]))return e;if(!ut){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[ft]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}e=++ct,1073741824&ct&&(ct=0);if(st)at.set(t,e);else{if(void 0!==it&&!1===it(t))throw new Error("Non-extensible objects are not allowed as keys.");if(ut)Object.defineProperty(t,ft,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[ft]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[ft]=e}}return e}(t));case"undefined":return 1108378659;default:if("function"==typeof t.toString)return ot(t.toString());throw new Error("Value type "+typeof t+" cannot be hashed.")}}function ot(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return et(e)}var it=Object.isExtensible,ut=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();var at,st="function"==typeof WeakMap;st&&(at=new WeakMap);var ct=0,ft="__immutablehash__";"function"==typeof Symbol&&(ft=Symbol(ft));var lt=16,pt=255,ht=0,yt={},dt=function(t){function e(t,e){this._iter=t,this._useKeys=e,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this._iter.get(t,e)},e.prototype.has=function(t){return this._iter.has(t)},e.prototype.valueSeq=function(){return this._iter.valueSeq()},e.prototype.reverse=function(){var t=this,e=jt(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},e.prototype.map=function(t,e){var r=this,n=gt(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e,n){return t(e,n,r)}),e)},e.prototype.__iterator=function(t,e){return this._iter.__iterator(t,e)},e}(q);dt.prototype[E]=!0;var mt=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.includes=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var r=this,n=0;return e&&u(this),this._iter.__iterate((function(o){return t(o,e?r.size-++n:n++,r)}),e)},e.prototype.__iterator=function(t,e){var r=this,n=this._iter.__iterator(1,e),o=0;return e&&u(this),new k((function(){var i=n.next();return i.done?i:I(t,e?r.size-++o:o++,i.value,i)}))},e}(N),vt=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.has=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e){return t(e,e,r)}),e)},e.prototype.__iterator=function(t,e){var r=this._iter.__iterator(1,e);return new k((function(){var e=r.next();return e.done?e:I(t,e.value,e.value,e)}))},e}(W),_t=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.entrySeq=function(){return this._iter.toSeq()},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e){if(e){At(e);var n=y(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}}),e)},e.prototype.__iterator=function(t,e){var r=this._iter.__iterator(1,e);return new k((function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){At(n);var o=y(n);return I(t,o?n.get(0):n[0],o?n.get(1):n[1],e)}}}))},e}(q);function bt(t){var e=Ct(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=zt,e.__iterateUncached=function(e,r){var n=this;return t.__iterate((function(t,r){return!1!==e(r,t,n)}),r)},e.__iteratorUncached=function(e,r){if(2===e){var n=t.__iterator(e,r);return new k((function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t}))}return t.__iterator(1===e?0:1,r)},e}function gt(t,e,r){var o=Ct(t);return o.size=t.size,o.has=function(e){return t.has(e)},o.get=function(o,i){var u=t.get(o,n);return u===n?i:e.call(r,u,o,t)},o.__iterateUncached=function(n,o){var i=this;return t.__iterate((function(t,o,u){return!1!==n(e.call(r,t,o,u),o,i)}),o)},o.__iteratorUncached=function(n,o){var i=t.__iterator(2,o);return new k((function(){var o=i.next();if(o.done)return o;var u=o.value,a=u[0];return I(n,a,e.call(r,u[1],a,t),o)}))},o}function jt(t,e){var r=this,n=Ct(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=bt(t);return e.reverse=function(){return t.flip()},e}),n.get=function(r,n){return t.get(e?r:-1-r,n)},n.has=function(r){return t.has(e?r:-1-r)},n.includes=function(e){return t.includes(e)},n.cacheResult=zt,n.__iterate=function(r,n){var o=this,i=0;return n&&u(t),t.__iterate((function(t,u){return r(t,e?u:n?o.size-++i:i++,o)}),!n)},n.__iterator=function(n,o){var i=0;o&&u(t);var a=t.__iterator(2,!o);return new k((function(){var t=a.next();if(t.done)return t;var u=t.value;return I(n,e?u[0]:o?r.size-++i:i++,u[1],t)}))},n}function Ot(t,e,r,o){var i=Ct(t);return o&&(i.has=function(o){var i=t.get(o,n);return i!==n&&!!e.call(r,i,o,t)},i.get=function(o,i){var u=t.get(o,n);return u!==n&&e.call(r,u,o,t)?u:i}),i.__iterateUncached=function(n,i){var u=this,a=0;return t.__iterate((function(t,i,s){if(e.call(r,t,i,s))return a++,n(t,o?i:a-1,u)}),i),a},i.__iteratorUncached=function(n,i){var u=t.__iterator(2,i),a=0;return new k((function(){for(;;){var i=u.next();if(i.done)return i;var s=i.value,c=s[0],f=s[1];if(e.call(r,f,c,t))return I(n,o?c:a++,f,i)}}))},i}function wt(t,e,r,n){var o=t.size;if(c(e,r,o))return t;var i=f(e,o),u=l(r,o);if(i!=i||u!=u)return wt(t.toSeq().cacheResult(),e,r,n);var s,p=u-i;p==p&&(s=p<0?0:p);var h=Ct(t);return h.size=0===s?s:t.size&&s||void 0,!n&&O(t)&&s>=0&&(h.get=function(e,r){return(e=a(this,e))>=0&&e<s?t.get(e+i,r):r}),h.__iterateUncached=function(e,r){var o=this;if(0===s)return 0;if(r)return this.cacheResult().__iterate(e,r);var u=0,a=!0,c=0;return t.__iterate((function(t,r){if(!a||!(a=u++<i))return c++,!1!==e(t,n?r:c-1,o)&&c!==s})),c},h.__iteratorUncached=function(e,r){if(0!==s&&r)return this.cacheResult().__iterator(e,r);if(0===s)return new k(T);var o=t.__iterator(e,r),u=0,a=0;return new k((function(){for(;u++<i;)o.next();if(++a>s)return{value:void 0,done:!0};var t=o.next();return n||1===e||t.done?t:I(e,a-1,0===e?void 0:t.value[1],t)}))},h}function St(t,e,r,n){var o=Ct(t);return o.__iterateUncached=function(o,i){var u=this;if(i)return this.cacheResult().__iterate(o,i);var a=!0,s=0;return t.__iterate((function(t,i,c){if(!a||!(a=e.call(r,t,i,c)))return s++,o(t,n?i:s-1,u)})),s},o.__iteratorUncached=function(o,i){var u=this;if(i)return this.cacheResult().__iterator(o,i);var a=t.__iterator(2,i),s=!0,c=0;return new k((function(){var t,i,f;do{if((t=a.next()).done)return n||1===o?t:I(o,c++,0===o?void 0:t.value[1],t);var l=t.value;i=l[0],f=l[1],s&&(s=e.call(r,f,i,u))}while(s);return 2===o?t:I(o,i,f,t)}))},o}function Et(t,e){var r=d(t),n=[t].concat(e).map((function(t){return y(t)?r&&(t=b(t)):t=r?K(t):Y(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===n.length)return t;if(1===n.length){var o=n[0];if(o===t||r&&d(o)||m(t)&&m(o))return o}var i=new L(n);return r?i=i.toKeyedSeq():m(t)||(i=i.toSetSeq()),(i=i.flatten(!0)).size=n.reduce((function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}}),0),i}function Pt(t,e,r){var n=Ct(t);return n.__iterateUncached=function(o,i){if(i)return this.cacheResult().__iterate(o,i);var u=0,a=!1;return function t(s,c){s.__iterate((function(i,s){return(!e||c<e)&&y(i)?t(i,c+1):(u++,!1===o(i,r?s:u-1,n)&&(a=!0)),!a}),i)}(t,0),u},n.__iteratorUncached=function(n,o){if(o)return this.cacheResult().__iterator(n,o);var i=t.__iterator(n,o),u=[],a=0;return new k((function(){for(;i;){var t=i.next();if(!1===t.done){var s=t.value;if(2===n&&(s=s[1]),e&&!(u.length<e)||!y(s))return r?t:I(n,a++,s,t);u.push(i),i=s.__iterator(n,o)}else i=u.pop()}return{value:void 0,done:!0}}))},n}function Mt(t,e,r){e||(e=Rt);var n=d(t),o=0,i=t.toSeq().map((function(e,n){return[n,e,o++,r?r(e,n,t):e]})).valueSeq().toArray();return i.sort((function(t,r){return e(t[3],r[3])||t[2]-r[2]})).forEach(n?function(t,e){i[e].length=2}:function(t,e){i[e]=t[1]}),n?q(i):m(t)?N(i):W(i)}function Dt(t,e,r){if(e||(e=Rt),r){var n=t.toSeq().map((function(e,n){return[e,r(e,n,t)]})).reduce((function(t,r){return kt(e,t[1],r[1])?r:t}));return n&&n[0]}return t.reduce((function(t,r){return kt(e,t,r)?r:t}))}function kt(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(null==r||r!=r)||n>0}function It(t,e,r,n){var o=Ct(t),i=new L(r).map((function(t){return t.size}));return o.size=n?i.max():i.min(),o.__iterate=function(t,e){for(var r,n=this.__iterator(1,e),o=0;!(r=n.next()).done&&!1!==t(r.value,o++,this););return o},o.__iteratorUncached=function(t,o){var i=r.map((function(t){return t=_(t),C(o?t.reverse():t)})),u=0,a=!1;return new k((function(){var r;return a||(r=i.map((function(t){return t.next()})),a=n?r.every((function(t){return t.done})):r.some((function(t){return t.done}))),a?{value:void 0,done:!0}:I(t,u++,e.apply(null,r.map((function(t){return t.value}))))}))},o}function Tt(t,e){return t===e?t:O(t)?e:t.constructor(e)}function At(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function xt(t){return d(t)?b:m(t)?g:j}function Ct(t){return Object.create((d(t)?q:m(t)?N:W).prototype)}function zt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):U.prototype.cacheResult.call(this)}function Rt(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t<e?-1:0}function Ft(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),o=0;o<r;o++)n[o]=t[o+e];return n}function Ut(t,e){if(!t)throw new Error(e)}function qt(t){Ut(t!==1/0,"Cannot perform this action with an infinite size.")}function Nt(t){if(F(t)&&"string"!=typeof t)return t;if(P(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}function Wt(t){return t&&("function"!=typeof t.constructor||"Object"===t.constructor.name)}function Lt(t){return"object"==typeof t&&(S(t)||Array.isArray(t)||Wt(t))}function Ht(t){try{return"string"==typeof t?JSON.stringify(t):String(t)}catch(e){return JSON.stringify(t)}}function Bt(t,e){return S(t)?t.has(e):Lt(t)&&R.call(t,e)}function $t(t,e,r){return S(t)?t.get(e,r):Bt(t,e)?"function"==typeof t.get?t.get(e):t[e]:r}function Vt(t){if(Array.isArray(t))return Ft(t);var e={};for(var r in t)R.call(t,r)&&(e[r]=t[r]);return e}function Kt(t,e){if(!Lt(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(S(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(e)}if(!R.call(t,e))return t;var r=Vt(t);return Array.isArray(r)?r.splice(e,1):delete r[e],r}function Yt(t,e,r){if(!Lt(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(S(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(e,r)}if(R.call(t,e)&&r===t[e])return t;var n=Vt(t);return n[e]=r,n}function Xt(t,e,r,o){o||(o=r,r=void 0);var i=function t(e,r,o,i,u,a){var s=r===n;if(i===o.length){var c=s?u:r,f=a(c);return f===c?r:f}if(!s&&!Lt(r))throw new TypeError("Cannot update within non-data-structure value in path ["+o.slice(0,i).map(Ht)+"]: "+r);var l=o[i],p=s?n:$t(r,l,n),h=t(p===n?e:S(p),p,o,i+1,u,a);return h===p?r:h===n?Kt(r,l):Yt(s?e?Ae():{}:r,l,h)}(S(t),t,Nt(e),0,r,o);return i===n?r:i}function Jt(t,e,r){return Xt(t,e,n,(function(){return r}))}function Gt(t,e){return Jt(this,t,e)}function Qt(t,e){return Xt(t,e,(function(){return n}))}function Zt(t){return Qt(this,t)}function te(t,e,r,n){return Xt(t,[e],r,n)}function ee(t,e,r){return 1===arguments.length?t(this):te(this,t,e,r)}function re(t,e,r){return Xt(this,t,e,r)}function ne(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return ie(this,t)}function oe(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return ie(this,e,t)}function ie(t,e,r){for(var o=[],i=0;i<e.length;i++){var u=b(e[i]);0!==u.size&&o.push(u)}return 0===o.length?t:0!==t.toSeq().size||t.__ownerID||1!==o.length?t.withMutations((function(t){for(var e=r?function(e,o){te(t,o,n,(function(t){return t===n?e:r(t,e,o)}))}:function(e,r){t.set(r,e)},i=0;i<o.length;i++)o[i].forEach(e)})):t.constructor(o[0])}function ue(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return le(t,e)}function ae(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return le(e,r,t)}function se(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return fe(t,e)}function ce(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return fe(e,r,t)}function fe(t,e,r){return le(t,e,function(t){return function e(r,n,o){return Lt(r)&&Lt(n)?le(r,[n],e):t?t(r,n,o):n}}(r))}function le(t,e,r){if(!Lt(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(S(t))return"function"==typeof r&&t.mergeWith?t.mergeWith.apply(t,[r].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var n=Array.isArray(t),o=t,i=n?g:b,u=n?function(e){o===t&&(o=Vt(o)),o.push(e)}:function(e,n){var i=R.call(o,n),u=i&&r?r(o[n],e,n):e;i&&u===o[n]||(o===t&&(o=Vt(o)),o[n]=u)},a=0;a<e.length;a++)i(e[a]).forEach(u);return o}function pe(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return fe(this,t)}function he(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return fe(this,e,t)}function ye(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Xt(this,t,Ae(),(function(t){return le(t,e)}))}function de(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Xt(this,t,Ae(),(function(t){return fe(t,e)}))}function me(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function ve(){return this.__ownerID?this:this.__ensureOwner(new i)}function _e(){return this.__ensureOwner()}function be(){return this.__altered}mt.prototype.cacheResult=dt.prototype.cacheResult=vt.prototype.cacheResult=_t.prototype.cacheResult=zt;var ge=function(t){function e(e){return null==e?Ae():J(e)&&!P(e)?e:Ae().withMutations((function(r){var n=t(e);qt(n.size),n.forEach((function(t,e){return r.set(e,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Ae().withMutations((function(e){for(var r=0;r<t.length;r+=2){if(r+1>=t.length)throw new Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}}))},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return xe(this,t,e)},e.prototype.remove=function(t){return xe(this,t,n)},e.prototype.deleteAll=function(t){var e=_(t);return 0===e.size?this:this.withMutations((function(t){e.forEach((function(e){return t.remove(e)}))}))},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ae()},e.prototype.sort=function(t){return nr(Mt(this,t))},e.prototype.sortBy=function(t,e){return nr(Mt(this,e,t))},e.prototype.map=function(t,e){return this.withMutations((function(r){r.forEach((function(n,o){r.set(o,t.call(e,n,o,r))}))}))},e.prototype.__iterator=function(t,e){return new De(this,t,e)},e.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate((function(e){return n++,t(e[1],e[0],r)}),e),n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Te(this.size,this._root,t,this.__hash):0===this.size?Ae():(this.__ownerID=t,this.__altered=!1,this)},e}(b);ge.isMap=J;var je=ge.prototype;je["@@__IMMUTABLE_MAP__@@"]=!0,je.delete=je.remove,je.removeAll=je.deleteAll,je.setIn=Gt,je.removeIn=je.deleteIn=Zt,je.update=ee,je.updateIn=re,je.merge=je.concat=ne,je.mergeWith=oe,je.mergeDeep=pe,je.mergeDeepWith=he,je.mergeIn=ye,je.mergeDeepIn=de,je.withMutations=me,je.wasAltered=be,je.asImmutable=_e,je["@@transducer/init"]=je.asMutable=ve,je["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},je["@@transducer/result"]=function(t){return t.asImmutable()};var Oe=function(t,e){this.ownerID=t,this.entries=e};Oe.prototype.get=function(t,e,r,n){for(var o=this.entries,i=0,u=o.length;i<u;i++)if(Z(r,o[i][0]))return o[i][1];return n},Oe.prototype.update=function(t,e,r,u,a,s,c){for(var f=a===n,l=this.entries,p=0,h=l.length;p<h&&!Z(u,l[p][0]);p++);var y=p<h;if(y?l[p][1]===a:f)return this;if(o(c),(f||!y)&&o(s),!f||1!==l.length){if(!y&&!f&&l.length>=qe)return function(t,e,r,n){t||(t=new i);for(var o=new Pe(t,nt(r),[r,n]),u=0;u<e.length;u++){var a=e[u];o=o.update(t,0,void 0,a[0],a[1])}return o}(t,l,u,a);var d=t&&t===this.ownerID,m=d?l:Ft(l);return y?f?p===h-1?m.pop():m[p]=m.pop():m[p]=[u,a]:m.push([u,a]),d?(this.entries=m,this):new Oe(t,m)}};var we=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r};we.prototype.get=function(t,e,r,n){void 0===e&&(e=nt(r));var o=1<<(31&(0===t?e:e>>>t)),i=this.bitmap;return 0==(i&o)?n:this.nodes[Fe(i&o-1)].get(t+5,e,r,n)},we.prototype.update=function(t,e,r,o,i,u,a){void 0===r&&(r=nt(o));var s=31&(0===e?r:r>>>e),c=1<<s,f=this.bitmap,l=0!=(f&c);if(!l&&i===n)return this;var p=Fe(f&c-1),h=this.nodes,y=l?h[p]:void 0,d=Ce(y,t,e+5,r,o,i,u,a);if(d===y)return this;if(!l&&d&&h.length>=Ne)return function(t,e,r,n,o){for(var i=0,u=new Array(32),a=0;0!==r;a++,r>>>=1)u[a]=1&r?e[i++]:void 0;return u[n]=o,new Se(t,i+1,u)}(t,h,f,s,d);if(l&&!d&&2===h.length&&ze(h[1^p]))return h[1^p];if(l&&d&&1===h.length&&ze(d))return d;var m=t&&t===this.ownerID,v=l?d?f:f^c:f|c,_=l?d?Ue(h,p,d,m):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var o=new Array(n),i=0,u=0;u<n;u++)u===e&&(i=1),o[u]=t[u+i];return o}(h,p,m):function(t,e,r,n){var o=t.length+1;if(n&&e+1===o)return t[e]=r,t;for(var i=new Array(o),u=0,a=0;a<o;a++)a===e?(i[a]=r,u=-1):i[a]=t[a+u];return i}(h,p,d,m);return m?(this.bitmap=v,this.nodes=_,this):new we(t,v,_)};var Se=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r};Se.prototype.get=function(t,e,r,n){void 0===e&&(e=nt(r));var o=31&(0===t?e:e>>>t),i=this.nodes[o];return i?i.get(t+5,e,r,n):n},Se.prototype.update=function(t,e,r,o,i,u,a){void 0===r&&(r=nt(o));var s=31&(0===e?r:r>>>e),c=i===n,f=this.nodes,l=f[s];if(c&&!l)return this;var p=Ce(l,t,e+5,r,o,i,u,a);if(p===l)return this;var h=this.count;if(l){if(!p&&--h<We)return function(t,e,r,n){for(var o=0,i=0,u=new Array(r),a=0,s=1,c=e.length;a<c;a++,s<<=1){var f=e[a];void 0!==f&&a!==n&&(o|=s,u[i++]=f)}return new we(t,o,u)}(t,f,h,s)}else h++;var y=t&&t===this.ownerID,d=Ue(f,s,p,y);return y?(this.count=h,this.nodes=d,this):new Se(t,h,d)};var Ee=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r};Ee.prototype.get=function(t,e,r,n){for(var o=this.entries,i=0,u=o.length;i<u;i++)if(Z(r,o[i][0]))return o[i][1];return n},Ee.prototype.update=function(t,e,r,i,u,a,s){void 0===r&&(r=nt(i));var c=u===n;if(r!==this.keyHash)return c?this:(o(s),o(a),Re(this,t,e,r,[i,u]));for(var f=this.entries,l=0,p=f.length;l<p&&!Z(i,f[l][0]);l++);var h=l<p;if(h?f[l][1]===u:c)return this;if(o(s),(c||!h)&&o(a),c&&2===p)return new Pe(t,this.keyHash,f[1^l]);var y=t&&t===this.ownerID,d=y?f:Ft(f);return h?c?l===p-1?d.pop():d[l]=d.pop():d[l]=[i,u]:d.push([i,u]),y?(this.entries=d,this):new Ee(t,this.keyHash,d)};var Pe=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r};Pe.prototype.get=function(t,e,r,n){return Z(r,this.entry[0])?this.entry[1]:n},Pe.prototype.update=function(t,e,r,i,u,a,s){var c=u===n,f=Z(i,this.entry[0]);return(f?u===this.entry[1]:c)?this:(o(s),c?void o(a):f?t&&t===this.ownerID?(this.entry[1]=u,this):new Pe(t,this.keyHash,[i,u]):(o(a),Re(this,t,e,nt(i),[i,u])))},Oe.prototype.iterate=Ee.prototype.iterate=function(t,e){for(var r=this.entries,n=0,o=r.length-1;n<=o;n++)if(!1===t(r[e?o-n:n]))return!1},we.prototype.iterate=Se.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,o=r.length-1;n<=o;n++){var i=r[e?o-n:n];if(i&&!1===i.iterate(t,e))return!1}},Pe.prototype.iterate=function(t,e){return t(this.entry)};var Me,De=function(t){function e(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Ie(t._root)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r=e.node,n=e.index++,o=void 0;if(r.entry){if(0===n)return ke(t,r.entry)}else if(r.entries){if(n<=(o=r.entries.length-1))return ke(t,r.entries[this._reverse?o-n:n])}else if(n<=(o=r.nodes.length-1)){var i=r.nodes[this._reverse?o-n:n];if(i){if(i.entry)return ke(t,i.entry);e=this._stack=Ie(i,e)}continue}e=this._stack=this._stack.__prev}return{value:void 0,done:!0}},e}(k);function ke(t,e){return I(t,e[0],e[1])}function Ie(t,e){return{node:t,index:0,__prev:e}}function Te(t,e,r,n){var o=Object.create(je);return o.size=t,o._root=e,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function Ae(){return Me||(Me=Te(0))}function xe(t,e,r){var o,i;if(t._root){var u={value:!1},a={value:!1};if(o=Ce(t._root,t.__ownerID,0,void 0,e,r,u,a),!a.value)return t;i=t.size+(u.value?r===n?-1:1:0)}else{if(r===n)return t;i=1,o=new Oe(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=o,t.__hash=void 0,t.__altered=!0,t):o?Te(i,o):Ae()}function Ce(t,e,r,i,u,a,s,c){return t?t.update(e,r,i,u,a,s,c):a===n?t:(o(c),o(s),new Pe(e,i,[u,a]))}function ze(t){return t.constructor===Pe||t.constructor===Ee}function Re(t,e,r,n,o){if(t.keyHash===n)return new Ee(e,n,[t.entry,o]);var i,u=31&(0===r?t.keyHash:t.keyHash>>>r),a=31&(0===r?n:n>>>r),s=u===a?[Re(t,e,r+5,n,o)]:(i=new Pe(e,n,o),u<a?[t,i]:[i,t]);return new we(e,1<<u|1<<a,s)}function Fe(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function Ue(t,e,r,n){var o=n?t:Ft(t);return o[e]=r,o}var qe=8,Ne=16,We=8;function Le(t){return Boolean(t&&t["@@__IMMUTABLE_LIST__@@"])}var He=function(t){function e(e){var r=Je();if(null==e)return r;if(Le(e))return e;var n=t(e),o=n.size;return 0===o?r:(qt(o),o>0&&o<32?Xe(0,o,5,null,new $e(n.toArray())):r.withMutations((function(t){t.setSize(o),n.forEach((function(e,r){return t.set(r,e)}))})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(t,e){if((t=a(this,t))>=0&&t<this.size){var r=Ze(this,t+=this._origin);return r&&r.array[31&t]}return e},e.prototype.set=function(t,e){return function(t,e,r){if((e=a(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations((function(t){e<0?tr(t,e).set(0,r):tr(t,0,e+1).set(e,r)}));e+=t._origin;var n=t._tail,o=t._root,i={value:!1};e>=er(t._capacity)?n=Ge(n,t.__ownerID,0,e,r,i):o=Ge(o,t.__ownerID,t._level,e,r,i);if(!i.value)return t;if(t.__ownerID)return t._root=o,t._tail=n,t.__hash=void 0,t.__altered=!0,t;return Xe(t._origin,t._capacity,t._level,o,n)}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Je()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(r){tr(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])}))},e.prototype.pop=function(){return tr(this,0,-1)},e.prototype.unshift=function(){var t=arguments;return this.withMutations((function(e){tr(e,-t.length);for(var r=0;r<t.length;r++)e.set(r,t[r])}))},e.prototype.shift=function(){return tr(this,1)},e.prototype.concat=function(){for(var e=arguments,r=[],n=0;n<arguments.length;n++){var o=e[n],i=t("string"!=typeof o&&A(o)?o:[o]);0!==i.size&&r.push(i)}return 0===r.length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations((function(t){r.forEach((function(e){return e.forEach((function(e){return t.push(e)}))}))})):this.constructor(r[0])},e.prototype.setSize=function(t){return tr(this,0,t)},e.prototype.map=function(t,e){var r=this;return this.withMutations((function(n){for(var o=0;o<r.size;o++)n.set(o,t.call(e,n.get(o),o,n))}))},e.prototype.slice=function(t,e){var r=this.size;return c(t,e,r)?this:tr(this,f(t,r),l(e,r))},e.prototype.__iterator=function(t,e){var r=e?this.size:0,n=Ye(this,e);return new k((function(){var o=n();return o===Ke?{value:void 0,done:!0}:I(t,e?--r:r++,o)}))},e.prototype.__iterate=function(t,e){for(var r,n=e?this.size:0,o=Ye(this,e);(r=o())!==Ke&&!1!==t(r,e?--n:n++,this););return n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Xe(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):0===this.size?Je():(this.__ownerID=t,this.__altered=!1,this)},e}(g);He.isList=Le;var Be=He.prototype;Be["@@__IMMUTABLE_LIST__@@"]=!0,Be.delete=Be.remove,Be.merge=Be.concat,Be.setIn=Gt,Be.deleteIn=Be.removeIn=Zt,Be.update=ee,Be.updateIn=re,Be.mergeIn=ye,Be.mergeDeepIn=de,Be.withMutations=me,Be.wasAltered=be,Be.asImmutable=_e,Be["@@transducer/init"]=Be.asMutable=ve,Be["@@transducer/step"]=function(t,e){return t.push(e)},Be["@@transducer/result"]=function(t){return t.asImmutable()};var $e=function(t,e){this.array=t,this.ownerID=e};$e.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&31;if(n>=this.array.length)return new $e([],t);var o,i=0===n;if(e>0){var u=this.array[n];if((o=u&&u.removeBefore(t,e-5,r))===u&&i)return this}if(i&&!o)return this;var a=Qe(this,t);if(!i)for(var s=0;s<n;s++)a.array[s]=void 0;return o&&(a.array[n]=o),a},$e.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n,o=r-1>>>e&31;if(o>=this.array.length)return this;if(e>0){var i=this.array[o];if((n=i&&i.removeAfter(t,e-5,r))===i&&o===this.array.length-1)return this}var u=Qe(this,t);return u.array.splice(o+1),n&&(u.array[o]=n),u};var Ve,Ke={};function Ye(t,e){var r=t._origin,n=t._capacity,o=er(n),i=t._tail;return u(t._root,t._level,0);function u(t,a,s){return 0===a?function(t,u){var a=u===o?i&&i.array:t&&t.array,s=u>r?0:r-u,c=n-u;c>32&&(c=32);return function(){if(s===c)return Ke;var t=e?--c:s++;return a&&a[t]}}(t,s):function(t,o,i){var a,s=t&&t.array,c=i>r?0:r-i>>o,f=1+(n-i>>o);f>32&&(f=32);return function(){for(;;){if(a){var t=a();if(t!==Ke)return t;a=null}if(c===f)return Ke;var r=e?--f:c++;a=u(s&&s[r],o-5,i+(r<<o))}}}(t,a,s)}}function Xe(t,e,r,n,o,i,u){var a=Object.create(Be);return a.size=e-t,a._origin=t,a._capacity=e,a._level=r,a._root=n,a._tail=o,a.__ownerID=i,a.__hash=u,a.__altered=!1,a}function Je(){return Ve||(Ve=Xe(0,0,5))}function Ge(t,e,r,n,i,u){var a,s=n>>>r&31,c=t&&s<t.array.length;if(!c&&void 0===i)return t;if(r>0){var f=t&&t.array[s],l=Ge(f,e,r-5,n,i,u);return l===f?t:((a=Qe(t,e)).array[s]=l,a)}return c&&t.array[s]===i?t:(u&&o(u),a=Qe(t,e),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function Qe(t,e){return e&&t&&e===t.ownerID?t:new $e(t?t.array.slice():[],e)}function Ze(t,e){if(e>=er(t._capacity))return t._tail;if(e<1<<t._level+5){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&31],n-=5;return r}}function tr(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new i,o=t._origin,u=t._capacity,a=o+e,s=void 0===r?u:r<0?u+r:o+r;if(a===o&&s===u)return t;if(a>=s)return t.clear();for(var c=t._level,f=t._root,l=0;a+l<0;)f=new $e(f&&f.array.length?[void 0,f]:[],n),l+=1<<(c+=5);l&&(a+=l,o+=l,s+=l,u+=l);for(var p=er(u),h=er(s);h>=1<<c+5;)f=new $e(f&&f.array.length?[f]:[],n),c+=5;var y=t._tail,d=h<p?Ze(t,s-1):h>p?new $e([],n):y;if(y&&h>p&&a<u&&y.array.length){for(var m=f=Qe(f,n),v=c;v>5;v-=5){var _=p>>>v&31;m=m.array[_]=Qe(m.array[_],n)}m.array[p>>>5&31]=y}if(s<u&&(d=d&&d.removeAfter(n,0,s)),a>=h)a-=h,s-=h,c=5,f=null,d=d&&d.removeBefore(n,0,a);else if(a>o||h<p){for(l=0;f;){var b=a>>>c&31;if(b!==h>>>c&31)break;b&&(l+=(1<<c)*b),c-=5,f=f.array[b]}f&&a>o&&(f=f.removeBefore(n,c,a-l)),f&&h<p&&(f=f.removeAfter(n,c,h-l)),l&&(a-=l,s-=l)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=c,t._root=f,t._tail=d,t.__hash=void 0,t.__altered=!0,t):Xe(a,s,c,f,d)}function er(t){return t<32?0:t-1>>>5<<5}var rr,nr=function(t){function e(t){return null==t?ir():G(t)?t:ir().withMutations((function(e){var r=b(t);qt(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):ir()},e.prototype.set=function(t,e){return ur(this,t,e)},e.prototype.remove=function(t){return ur(this,t,n)},e.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},e.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],r)}),e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?or(e,r,t,this.__hash):0===this.size?ir():(this.__ownerID=t,this._map=e,this._list=r,this)},e}(ge);function or(t,e,r,n){var o=Object.create(nr.prototype);return o.size=t?t.size:0,o._map=t,o._list=e,o.__ownerID=r,o.__hash=n,o}function ir(){return rr||(rr=or(Ae(),Je()))}function ur(t,e,r){var o,i,u=t._map,a=t._list,s=u.get(e),c=void 0!==s;if(r===n){if(!c)return t;a.size>=32&&a.size>=2*u.size?(o=(i=a.filter((function(t,e){return void 0!==t&&s!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(o.__ownerID=i.__ownerID=t.__ownerID)):(o=u.remove(e),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(c){if(r===a.get(s)[1])return t;o=u,i=a.set(s,[e,r])}else o=u.set(e,a.size),i=a.set(a.size,[e,r]);return t.__ownerID?(t.size=o.size,t._map=o,t._list=i,t.__hash=void 0,t):or(o,i)}nr.isOrderedMap=G,nr.prototype[E]=!0,nr.prototype.delete=nr.prototype.remove;function ar(t){return Boolean(t&&t["@@__IMMUTABLE_STACK__@@"])}var sr=function(t){function e(t){return null==t?pr():ar(t)?t:pr().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var r=this._head;for(t=a(this,t);r&&t--;)r=r.next;return r?r.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):lr(e,r)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&ar(e))return e;qt(e.size);var r=this.size,n=this._head;return e.__iterate((function(t){r++,n={value:t,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):lr(r,n)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):pr()},e.prototype.slice=function(e,r){if(c(e,r,this.size))return this;var n=f(e,this.size);if(l(r,this.size)!==this.size)return t.prototype.slice.call(this,e,r);for(var o=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=o,this._head=i,this.__hash=void 0,this.__altered=!0,this):lr(o,i)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?lr(this.size,this._head,t,this.__hash):0===this.size?pr():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var r=this;if(e)return new L(this.toArray()).__iterate((function(e,n){return t(e,n,r)}),e);for(var n=0,o=this._head;o&&!1!==t(o.value,n++,this);)o=o.next;return n},e.prototype.__iterator=function(t,e){if(e)return new L(this.toArray()).__iterator(t,e);var r=0,n=this._head;return new k((function(){if(n){var e=n.value;return n=n.next,I(t,r++,e)}return{value:void 0,done:!0}}))},e}(g);sr.isStack=ar;var cr,fr=sr.prototype;function lr(t,e,r,n){var o=Object.create(fr);return o.size=t,o._head=e,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function pr(){return cr||(cr=lr(0))}fr["@@__IMMUTABLE_STACK__@@"]=!0,fr.shift=fr.pop,fr.unshift=fr.push,fr.unshiftAll=fr.pushAll,fr.withMutations=me,fr.wasAltered=be,fr.asImmutable=_e,fr["@@transducer/init"]=fr.asMutable=ve,fr["@@transducer/step"]=function(t,e){return t.unshift(e)},fr["@@transducer/result"]=function(t){return t.asImmutable()};function hr(t){return Boolean(t&&t["@@__IMMUTABLE_SET__@@"])}function yr(t){return hr(t)&&P(t)}function dr(t,e){if(t===e)return!0;if(!y(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||d(t)!==d(e)||m(t)!==m(e)||P(t)!==P(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!v(t);if(P(t)){var o=t.entries();return e.every((function(t,e){var n=o.next().value;return n&&Z(n[1],t)&&(r||Z(n[0],e))}))&&o.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var u=t;t=e,e=u}var a=!0,s=e.__iterate((function(e,o){if(r?!t.has(e):i?!Z(e,t.get(o,n)):!Z(t.get(o,n),e))return a=!1,!1}));return a&&t.size===s}function mr(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function vr(t){if(!t||"object"!=typeof t)return t;if(!y(t)){if(!Lt(t))return t;t=U(t)}if(d(t)){var e={};return t.__iterate((function(t,r){e[r]=vr(t)})),e}var r=[];return t.__iterate((function(t){r.push(vr(t))})),r}var _r=function(t){function e(e){return null==e?wr():hr(e)&&!P(e)?e:wr().withMutations((function(r){var n=t(e);qt(n.size),n.forEach((function(t){return r.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(b(t).keySeq())},e.intersect=function(t){return(t=_(t).toArray()).length?gr.intersect.apply(e(t.pop()),t):wr()},e.union=function(t){return(t=_(t).toArray()).length?gr.union.apply(e(t.pop()),t):wr()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return jr(this,this._map.set(t,t))},e.prototype.remove=function(t){return jr(this,this._map.remove(t))},e.prototype.clear=function(){return jr(this,this._map.clear())},e.prototype.map=function(t,e){var r=this,n=[],o=[];return this.forEach((function(i){var u=t.call(e,i,i,r);u!==i&&(n.push(i),o.push(u))})),this.withMutations((function(t){n.forEach((function(e){return t.remove(e)})),o.forEach((function(e){return t.add(e)}))}))},e.prototype.union=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(r){for(var n=0;n<e.length;n++)t(e[n]).forEach((function(t){return r.add(t)}))})):this.constructor(e[0])},e.prototype.intersect=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(0===e.length)return this;e=e.map((function(e){return t(e)}));var n=[];return this.forEach((function(t){e.every((function(e){return e.includes(t)}))||n.push(t)})),this.withMutations((function(t){n.forEach((function(e){t.remove(e)}))}))},e.prototype.subtract=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(0===e.length)return this;e=e.map((function(e){return t(e)}));var n=[];return this.forEach((function(t){e.some((function(e){return e.includes(t)}))&&n.push(t)})),this.withMutations((function(t){n.forEach((function(e){t.remove(e)}))}))},e.prototype.sort=function(t){return Wr(Mt(this,t))},e.prototype.sortBy=function(t,e){return Wr(Mt(this,e,t))},e.prototype.wasAltered=function(){return this._map.wasAltered()},e.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate((function(e){return t(e,e,r)}),e)},e.prototype.__iterator=function(t,e){return this._map.__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):0===this.size?this.__empty():(this.__ownerID=t,this._map=e,this)},e}(j);_r.isSet=hr;var br,gr=_r.prototype;function jr(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Or(t,e){var r=Object.create(gr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function wr(){return br||(br=Or(Ae()))}gr["@@__IMMUTABLE_SET__@@"]=!0,gr.delete=gr.remove,gr.merge=gr.concat=gr.union,gr.withMutations=me,gr.asImmutable=_e,gr["@@transducer/init"]=gr.asMutable=ve,gr["@@transducer/step"]=function(t,e){return t.add(e)},gr["@@transducer/result"]=function(t){return t.asImmutable()},gr.__empty=wr,gr.__make=Or;var Sr,Er=function(t){function e(t,r,n){if(!(this instanceof e))return new e(t,r,n);if(Ut(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===r&&(r=1/0),n=void 0===n?1:Math.abs(n),r<t&&(n=-n),this._start=t,this._end=r,this._step=n,this.size=Math.max(0,Math.ceil((r-t)/n-1)+1),0===this.size){if(Sr)return Sr;Sr=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},e.prototype.get=function(t,e){return this.has(t)?this._start+a(this,t)*this._step:e},e.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},e.prototype.slice=function(t,r){return c(t,r,this.size)?this:(t=f(t,this.size),(r=l(r,this.size))<=t?new e(0,0):new e(this.get(t,this._end),this.get(r,this._end),this._step))},e.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var r=e/this._step;if(r>=0&&r<this.size)return r}return-1},e.prototype.lastIndexOf=function(t){return this.indexOf(t)},e.prototype.__iterate=function(t,e){for(var r=this.size,n=this._step,o=e?this._start+(r-1)*n:this._start,i=0;i!==r&&!1!==t(o,e?r-++i:i++,this);)o+=e?-n:n;return i},e.prototype.__iterator=function(t,e){var r=this.size,n=this._step,o=e?this._start+(r-1)*n:this._start,i=0;return new k((function(){if(i===r)return{value:void 0,done:!0};var u=o;return o+=e?-n:n,I(t,e?r-++i:i++,u)}))},e.prototype.equals=function(t){return t instanceof e?this._start===t._start&&this._end===t._end&&this._step===t._step:dr(this,t)},e}(N);function Pr(t,e,r){for(var o=Nt(e),i=0;i!==o.length;)if((t=$t(t,o[i++],n))===n)return r;return t}function Mr(t,e){return Pr(this,t,e)}function Dr(t,e){return Pr(t,e,n)!==n}function kr(){qt(this.size);var t={};return this.__iterate((function(e,r){t[r]=e})),t}_.isIterable=y,_.isKeyed=d,_.isIndexed=m,_.isAssociative=v,_.isOrdered=P,_.Iterator=k,mr(_,{toArray:function(){qt(this.size);var t=new Array(this.size||0),e=d(this),r=0;return this.__iterate((function(n,o){t[r++]=e?[o,n]:n})),t},toIndexedSeq:function(){return new mt(this)},toJS:function(){return vr(this)},toKeyedSeq:function(){return new dt(this,!0)},toMap:function(){return ge(this.toKeyedSeq())},toObject:kr,toOrderedMap:function(){return nr(this.toKeyedSeq())},toOrderedSet:function(){return Wr(d(this)?this.valueSeq():this)},toSet:function(){return _r(d(this)?this.valueSeq():this)},toSetSeq:function(){return new vt(this)},toSeq:function(){return m(this)?this.toIndexedSeq():d(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return sr(d(this)?this.valueSeq():this)},toList:function(){return He(d(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Tt(this,Et(this,t))},includes:function(t){return this.some((function(e){return Z(e,t)}))},entries:function(){return this.__iterator(2)},every:function(t,e){qt(this.size);var r=!0;return this.__iterate((function(n,o,i){if(!t.call(e,n,o,i))return r=!1,!1})),r},filter:function(t,e){return Tt(this,Ot(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},forEach:function(t,e){return qt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){qt(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate((function(n){r?r=!1:e+=t,e+=null!=n?n.toString():""})),e},keys:function(){return this.__iterator(0)},map:function(t,e){return Tt(this,gt(this,t,e))},reduce:function(t,e,r){return xr(this,t,e,r,arguments.length<2,!1)},reduceRight:function(t,e,r){return xr(this,t,e,r,arguments.length<2,!0)},reverse:function(){return Tt(this,jt(this,!0))},slice:function(t,e){return Tt(this,wt(this,t,e,!0))},some:function(t,e){return!this.every(Rr(t),e)},sort:function(t){return Tt(this,Mt(this,t))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(t,e){return u(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,r){var n=ge().asMutable();return t.__iterate((function(o,i){n.update(e.call(r,o,i,t),0,(function(t){return t+1}))})),n.asImmutable()}(this,t,e)},equals:function(t){return dr(this,t)},entrySeq:function(){var t=this;if(t._cache)return new L(t._cache);var e=t.toSeq().map(zr).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Rr(t),e)},findEntry:function(t,e,r){var n=r;return this.__iterate((function(r,o,i){if(t.call(e,r,o,i))return n=[o,r],!1})),n},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(t){return this.find(s,null,t)},flatMap:function(t,e){return Tt(this,function(t,e,r){var n=xt(t);return t.toSeq().map((function(o,i){return n(e.call(r,o,i,t))})).flatten(!0)}(this,t,e))},flatten:function(t){return Tt(this,Pt(this,t,!0))},fromEntrySeq:function(){return new _t(this)},get:function(t,e){return this.find((function(e,r){return Z(r,t)}),void 0,e)},getIn:Mr,groupBy:function(t,e){return function(t,e,r){var n=d(t),o=(P(t)?nr():ge()).asMutable();t.__iterate((function(i,u){o.update(e.call(r,i,u,t),(function(t){return(t=t||[]).push(n?[u,i]:i),t}))}));var i=xt(t);return o.map((function(e){return Tt(t,i(e))})).asImmutable()}(this,t,e)},has:function(t){return this.get(t,n)!==n},hasIn:function(t){return Dr(this,t)},isSubset:function(t){return t="function"==typeof t.includes?t:_(t),this.every((function(e){return t.includes(e)}))},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:_(t)).isSubset(this)},keyOf:function(t){return this.findKey((function(e){return Z(e,t)}))},keySeq:function(){return this.toSeq().map(Cr).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return Dt(this,t)},maxBy:function(t,e){return Dt(this,e,t)},min:function(t){return Dt(this,t?Fr(t):qr)},minBy:function(t,e){return Dt(this,e?Fr(e):qr,t)},rest:function(){return this.slice(1)},skip:function(t){return 0===t?this:this.slice(Math.max(0,t))},skipLast:function(t){return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,e){return Tt(this,St(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Rr(t),e)},sortBy:function(t,e){return Tt(this,Mt(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,e){return Tt(this,function(t,e,r){var n=Ct(t);return n.__iterateUncached=function(n,o){var i=this;if(o)return this.cacheResult().__iterate(n,o);var u=0;return t.__iterate((function(t,o,a){return e.call(r,t,o,a)&&++u&&n(t,o,i)})),u},n.__iteratorUncached=function(n,o){var i=this;if(o)return this.cacheResult().__iterator(n,o);var u=t.__iterator(2,o),a=!0;return new k((function(){if(!a)return{value:void 0,done:!0};var t=u.next();if(t.done)return t;var o=t.value,s=o[0],c=o[1];return e.call(r,c,s,i)?2===n?t:I(n,s,c,t):(a=!1,{value:void 0,done:!0})}))},n}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Rr(t),e)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=P(t),r=d(t),n=e?1:0;return function(t,e){return e=tt(e,3432918353),e=tt(e<<15|e>>>-15,461845907),e=tt(e<<13|e>>>-13,5),e=tt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=et((e=tt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+Nr(nt(t),nt(e))|0}:function(t,e){n=n+Nr(nt(t),nt(e))|0}:e?function(t){n=31*n+nt(t)|0}:function(t){n=n+nt(t)|0}),n)}(this))}});var Ir=_.prototype;Ir["@@__IMMUTABLE_ITERABLE__@@"]=!0,Ir[D]=Ir.values,Ir.toJSON=Ir.toArray,Ir.__toStringMapper=Ht,Ir.inspect=Ir.toSource=function(){return this.toString()},Ir.chain=Ir.flatMap,Ir.contains=Ir.includes,mr(b,{flip:function(){return Tt(this,bt(this))},mapEntries:function(t,e){var r=this,n=0;return Tt(this,this.toSeq().map((function(o,i){return t.call(e,[i,o],n++,r)})).fromEntrySeq())},mapKeys:function(t,e){var r=this;return Tt(this,this.toSeq().flip().map((function(n,o){return t.call(e,n,o,r)})).flip())}});var Tr=b.prototype;Tr["@@__IMMUTABLE_KEYED__@@"]=!0,Tr[D]=Ir.entries,Tr.toJSON=kr,Tr.__toStringMapper=function(t,e){return Ht(e)+": "+Ht(t)},mr(g,{toKeyedSeq:function(){return new dt(this,!1)},filter:function(t,e){return Tt(this,Ot(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Tt(this,jt(this,!1))},slice:function(t,e){return Tt(this,wt(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=f(t,t<0?this.count():this.size);var n=this.slice(0,t);return Tt(this,1===r?n:n.concat(Ft(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return Tt(this,Pt(this,t,!1))},get:function(t,e){return(t=a(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,r){return r===t}),void 0,e)},has:function(t){return(t=a(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return Tt(this,function(t,e){var r=Ct(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var o=this,i=0;return t.__iterate((function(t){return(!i||!1!==r(e,i++,o))&&!1!==r(t,i++,o)}),n),i},r.__iteratorUncached=function(r,n){var o,i=t.__iterator(1,n),u=0;return new k((function(){return(!o||u%2)&&(o=i.next()).done?o:u%2?I(r,u++,e):I(r,u++,o.value,o)}))},r}(this,t))},interleave:function(){var t=[this].concat(Ft(arguments)),e=It(this.toSeq(),N.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),Tt(this,r)},keySeq:function(){return Er(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,e){return Tt(this,St(this,t,e,!1))},zip:function(){var t=[this].concat(Ft(arguments));return Tt(this,It(this,Ur,t))},zipAll:function(){var t=[this].concat(Ft(arguments));return Tt(this,It(this,Ur,t,!0))},zipWith:function(t){var e=Ft(arguments);return e[0]=this,Tt(this,It(this,t,e))}});var Ar=g.prototype;function xr(t,e,r,n,o,i){return qt(t.size),t.__iterate((function(t,i,u){o?(o=!1,r=t):r=e.call(n,r,t,i,u)}),i),r}function Cr(t,e){return e}function zr(t,e){return[e,t]}function Rr(t){return function(){return!t.apply(this,arguments)}}function Fr(t){return function(){return-t.apply(this,arguments)}}function Ur(){return Ft(arguments)}function qr(t,e){return t<e?1:t>e?-1:0}function Nr(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Ar["@@__IMMUTABLE_INDEXED__@@"]=!0,Ar[E]=!0,mr(j,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),j.prototype.has=Ir.includes,j.prototype.contains=j.prototype.includes,mr(q,b.prototype),mr(N,g.prototype),mr(W,j.prototype);var Wr=function(t){function e(t){return null==t?$r():yr(t)?t:$r().withMutations((function(e){var r=j(t);qt(r.size),r.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(b(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(_r);Wr.isOrderedSet=yr;var Lr,Hr=Wr.prototype;function Br(t,e){var r=Object.create(Hr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function $r(){return Lr||(Lr=Br(ir()))}Hr[E]=!0,Hr.zip=Ar.zip,Hr.zipWith=Ar.zipWith,Hr.__empty=$r,Hr.__make=Br;var Vr=function(t,e){var r,n=function(i){var u=this;if(i instanceof n)return i;if(!(this instanceof n))return new n(i);if(!r){r=!0;var a=Object.keys(t),s=o._indices={};o._name=e,o._keys=a,o._defaultValues=t;for(var c=0;c<a.length;c++){var f=a[c];s[f]=c,o[f]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+Xr(this)+' with property "'+f+'" since that property name is part of the Record API.'):Gr(o,f)}}this.__ownerID=void 0,this._values=He().withMutations((function(t){t.setSize(u._keys.length),b(i).forEach((function(e,r){t.set(u._indices[r],e===u._defaultValues[r]?void 0:e)}))}))},o=n.prototype=Object.create(Kr);return o.constructor=n,e&&(n.displayName=e),n};Vr.prototype.toString=function(){for(var t,e=Xr(this)+" { ",r=this._keys,n=0,o=r.length;n!==o;n++)e+=(n?", ":"")+(t=r[n])+": "+Ht(this.get(t));return e+" }"},Vr.prototype.equals=function(t){return this===t||t&&this._keys===t._keys&&Jr(this).equals(Jr(t))},Vr.prototype.hashCode=function(){return Jr(this).hashCode()},Vr.prototype.has=function(t){return this._indices.hasOwnProperty(t)},Vr.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._indices[t],n=this._values.get(r);return void 0===n?this._defaultValues[t]:n},Vr.prototype.set=function(t,e){if(this.has(t)){var r=this._values.set(this._indices[t],e===this._defaultValues[t]?void 0:e);if(r!==this._values&&!this.__ownerID)return Yr(this,r)}return this},Vr.prototype.remove=function(t){return this.set(t)},Vr.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:Yr(this,t)},Vr.prototype.wasAltered=function(){return this._values.wasAltered()},Vr.prototype.toSeq=function(){return Jr(this)},Vr.prototype.toJS=function(){return vr(this)},Vr.prototype.entries=function(){return this.__iterator(2)},Vr.prototype.__iterator=function(t,e){return Jr(this).__iterator(t,e)},Vr.prototype.__iterate=function(t,e){return Jr(this).__iterate(t,e)},Vr.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._values.__ensureOwner(t);return t?Yr(this,e,t):(this.__ownerID=t,this._values=e,this)},Vr.isRecord=w,Vr.getDescriptiveName=Xr;var Kr=Vr.prototype;function Yr(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._values=e,n.__ownerID=r,n}function Xr(t){return t.constructor.displayName||t.constructor.name||"Record"}function Jr(t){return K(t._keys.map((function(e){return[e,t.get(e)]})))}function Gr(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){Ut(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}Kr["@@__IMMUTABLE_RECORD__@@"]=!0,Kr.delete=Kr.remove,Kr.deleteIn=Kr.removeIn=Zt,Kr.getIn=Mr,Kr.hasIn=Ir.hasIn,Kr.merge=ne,Kr.mergeWith=oe,Kr.mergeIn=ye,Kr.mergeDeep=pe,Kr.mergeDeepWith=he,Kr.mergeDeepIn=de,Kr.setIn=Gt,Kr.update=ee,Kr.updateIn=re,Kr.withMutations=me,Kr.asMutable=ve,Kr.asImmutable=_e,Kr[D]=Kr.entries,Kr.toJSON=Kr.toObject=Ir.toObject,Kr.inspect=Kr.toSource=function(){return this.toString()};var Qr,Zr=function(t){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this._value=t,this.size=void 0===r?1/0:Math.max(0,r),0===this.size){if(Qr)return Qr;Qr=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},e.prototype.get=function(t,e){return this.has(t)?this._value:e},e.prototype.includes=function(t){return Z(this._value,t)},e.prototype.slice=function(t,r){var n=this.size;return c(t,r,n)?this:new e(this._value,l(r,n)-f(t,n))},e.prototype.reverse=function(){return this},e.prototype.indexOf=function(t){return Z(this._value,t)?0:-1},e.prototype.lastIndexOf=function(t){return Z(this._value,t)?this.size:-1},e.prototype.__iterate=function(t,e){for(var r=this.size,n=0;n!==r&&!1!==t(this._value,e?r-++n:n++,this););return n},e.prototype.__iterator=function(t,e){var r=this,n=this.size,o=0;return new k((function(){return o===n?{value:void 0,done:!0}:I(t,e?n-++o:o++,r._value)}))},e.prototype.equals=function(t){return t instanceof e?Z(this._value,t._value):dr(t)},e}(N);function tn(t,e){return function t(e,r,n,o,i,u){var a=Array.isArray(n)?N:Wt(n)?q:null;if(a){if(~e.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");e.push(n),i&&""!==o&&i.push(o);var s=r.call(u,o,a(n).map((function(o,u){return t(e,r,o,u,i,n)})),i&&i.slice());return e.pop(),i&&i.pop(),s}return n}([],e||en,t,"",e&&e.length>2?[]:void 0,{"":t})}function en(t,e){return d(e)?e.toMap():e.toList()}var rn="4.0.0-rc.11",nn={version:rn,Collection:_,Iterable:_,Seq:U,Map:ge,OrderedMap:nr,List:He,Stack:sr,Set:_r,OrderedSet:Wr,Record:Vr,Range:Er,Repeat:Zr,is:Z,fromJS:tn,hash:nt,isImmutable:S,isCollection:y,isKeyed:d,isIndexed:m,isAssociative:v,isOrdered:P,isValueObject:Q,isSeq:O,isList:Le,isMap:J,isOrderedMap:G,isStack:ar,isSet:hr,isOrderedSet:yr,isRecord:w,get:$t,getIn:Pr,has:Bt,hasIn:Dr,merge:ue,mergeDeep:se,mergeWith:ae,mergeDeepWith:ce,remove:Kt,removeIn:Qt,set:Yt,setIn:Jt,update:te,updateIn:Xt},on=_;e.default=nn},"./node_modules/minimatch-capture/index.js":function(t,e,r){"use strict";const n=r("./node_modules/minimatch/minimatch.js"),o=/([!?+*@]\([^)]+\)|\*{1,2}|\?)/,i=/!\([^)]+\)$/;class u{constructor(t,e){this.pattern=t,this.options=e||{}}makeRe(){return this.regexp||!1===this.regexp||(this.regexp=c(this.pattern,this.options)),this.regexp}capture(t){let e=!1,r=t.match(this.makeRe());return r&&(r=r.filter(f),e=r[1]||r[0],this.options.notrim||"/"===e||(e=e.replace(/^\/|\/$/g,""))),e}}function a(t){const e=t.split(o);return 1===e.length?["",e[0],""]:[e[0],e.slice(1,-1).join(""),e[e.length-1]]}const s={nonegate:!0};function c(t,e){try{return function(t,e){const r=e&&e.nocase?"i":"",o=n.braceExpand(t,e).map(t=>{const r=a(t),o=r[0],u=r[1],c=r[2],f=o?Object.assign({},e,s):e;let p=n.makeRe(u,f).source.slice(4,-2);return i.test(u)&&(p=p.replace(/\)\$\)/g,"(?"+(c.startsWith("/")?"=":"!")+"/)))")),l(o)+"("+p+")"+l(c)});return new RegExp("^(?:"+o.join("|")+")$",r)}(t,e)}catch(t){return!1}}function f(t){return void 0!==t}function l(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}t.exports=function(t,e,r){return new u(e,r).capture(t)},Object.assign(t.exports,{Capture:u,split:a,makeRe:c,match:function(t,e,r){const n=new u(e,r),o=[];for(let e=0;e<t.length;e++){const r=t[e],i=n.capture(r);i&&o.push([r,i])}return o}})},"./node_modules/minimatch/minimatch.js":function(t,e,r){t.exports=f,f.Minimatch=l;var n={sep:"/"};try{n=r("./node_modules/path-browserify/index.js")}catch(t){}var o=f.GLOBSTAR=l.GLOBSTAR={},i=r("./node_modules/brace-expansion/index.js"),u={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="().*{}+?[]^$\\!".split("").reduce((function(t,e){return t[e]=!0,t}),{});var s=/\/+/;function c(t,e){t=t||{},e=e||{};var r={};return Object.keys(e).forEach((function(t){r[t]=e[t]})),Object.keys(t).forEach((function(e){r[e]=t[e]})),r}function f(t,e,r){if("string"!=typeof e)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===e.charAt(0))&&(""===e.trim()?""===t:new l(e,r).match(t))}function l(t,e){if(!(this instanceof l))return new l(t,e);if("string"!=typeof t)throw new TypeError("glob pattern string required");e||(e={}),t=t.trim(),"/"!==n.sep&&(t=t.split(n.sep).join("/")),this.options=e,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function p(t,e){if(e||(e=this instanceof l?this.options:{}),void 0===(t=void 0===t?this.pattern:t))throw new TypeError("undefined pattern");return e.nobrace||!t.match(/\{.*\}/)?[t]:i(t)}f.filter=function(t,e){return e=e||{},function(r,n,o){return f(r,t,e)}},f.defaults=function(t){if(!t||!Object.keys(t).length)return f;var e=f,r=function(r,n,o){return e.minimatch(r,n,c(t,o))};return r.Minimatch=function(r,n){return new e.Minimatch(r,c(t,n))},r},l.defaults=function(t){return t&&Object.keys(t).length?f.defaults(t).Minimatch:l},l.prototype.debug=function(){},l.prototype.make=function(){if(this._made)return;var t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();e.debug&&(this.debug=console.error);this.debug(this.pattern,r),r=this.globParts=r.map((function(t){return t.split(s)})),this.debug(this.pattern,r),r=r.map((function(t,e,r){return t.map(this.parse,this)}),this),this.debug(this.pattern,r),r=r.filter((function(t){return-1===t.indexOf(!1)})),this.debug(this.pattern,r),this.set=r},l.prototype.parseNegate=function(){var t=this.pattern,e=!1,r=this.options,n=0;if(r.nonegate)return;for(var o=0,i=t.length;o<i&&"!"===t.charAt(o);o++)e=!e,n++;n&&(this.pattern=t.substr(n));this.negate=e},f.braceExpand=function(t,e){return p(t,e)},l.prototype.braceExpand=p,l.prototype.parse=function(t,e){if(t.length>65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===t)return o;if(""===t)return"";var n,i="",s=!!r.nocase,c=!1,f=[],l=[],p=!1,y=-1,d=-1,m="."===t.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=this;function _(){if(n){switch(n){case"*":i+="[^/]*?",s=!0;break;case"?":i+="[^/]",s=!0;break;default:i+="\\"+n}v.debug("clearStateChar %j %j",n,i),n=!1}}for(var b,g=0,j=t.length;g<j&&(b=t.charAt(g));g++)if(this.debug("%s\t%s %s %j",t,g,i,b),c&&a[b])i+="\\"+b,c=!1;else switch(b){case"/":return!1;case"\\":_(),c=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",t,g,i,b),p){this.debug("  in class"),"!"===b&&g===d+1&&(b="^"),i+=b;continue}v.debug("call clearStateChar %j",n),_(),n=b,r.noext&&_();continue;case"(":if(p){i+="(";continue}if(!n){i+="\\(";continue}f.push({type:n,start:g-1,reStart:i.length,open:u[n].open,close:u[n].close}),i+="!"===n?"(?:(?!(?:":"(?:",this.debug("plType %j %j",n,i),n=!1;continue;case")":if(p||!f.length){i+="\\)";continue}_(),s=!0;var O=f.pop();i+=O.close,"!"===O.type&&l.push(O),O.reEnd=i.length;continue;case"|":if(p||!f.length||c){i+="\\|",c=!1;continue}_(),i+="|";continue;case"[":if(_(),p){i+="\\"+b;continue}p=!0,d=g,y=i.length,i+=b;continue;case"]":if(g===d+1||!p){i+="\\"+b,c=!1;continue}if(p){var w=t.substring(d+1,g);try{RegExp("["+w+"]")}catch(t){var S=this.parse(w,h);i=i.substr(0,y)+"\\["+S[0]+"\\]",s=s||S[1],p=!1;continue}}s=!0,p=!1,i+=b;continue;default:_(),c?c=!1:!a[b]||"^"===b&&p||(i+="\\"),i+=b}p&&(w=t.substr(d+1),S=this.parse(w,h),i=i.substr(0,y)+"\\["+S[0],s=s||S[1]);for(O=f.pop();O;O=f.pop()){var E=i.slice(O.reStart+O.open.length);this.debug("setting tail",i,O),E=E.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(t,e,r){return r||(r="\\"),e+e+r+"|"})),this.debug("tail=%j\n   %s",E,E,O,i);var P="*"===O.type?"[^/]*?":"?"===O.type?"[^/]":"\\"+O.type;s=!0,i=i.slice(0,O.reStart)+P+"\\("+E}_(),c&&(i+="\\\\");var M=!1;switch(i.charAt(0)){case".":case"[":case"(":M=!0}for(var D=l.length-1;D>-1;D--){var k=l[D],I=i.slice(0,k.reStart),T=i.slice(k.reStart,k.reEnd-8),A=i.slice(k.reEnd-8,k.reEnd),x=i.slice(k.reEnd);A+=x;var C=I.split("(").length-1,z=x;for(g=0;g<C;g++)z=z.replace(/\)[+*?]?/,"");var R="";""===(x=z)&&e!==h&&(R="$"),i=I+T+x+R+A}""!==i&&s&&(i="(?=.)"+i);M&&(i=m+i);if(e===h)return[i,s];if(!s)return function(t){return t.replace(/\\(.)/g,"$1")}(t);var F=r.nocase?"i":"";try{var U=new RegExp("^"+i+"$",F)}catch(t){return new RegExp("$.")}return U._glob=t,U._src=i,U};var h={};f.makeRe=function(t,e){return new l(t,e||{}).makeRe()},l.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=e.nocase?"i":"",i=t.map((function(t){return t.map((function(t){return t===o?r:"string"==typeof t?function(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(t):t._src})).join("\\/")})).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch(t){this.regexp=!1}return this.regexp},f.match=function(t,e,r){var n=new l(e,r=r||{});return t=t.filter((function(t){return n.match(t)})),n.options.nonull&&!t.length&&t.push(e),t},l.prototype.match=function(t,e){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;var r=this.options;"/"!==n.sep&&(t=t.split(n.sep).join("/"));t=t.split(s),this.debug(this.pattern,"split",t);var o,i,u=this.set;for(this.debug(this.pattern,"set",u),i=t.length-1;i>=0&&!(o=t[i]);i--);for(i=0;i<u.length;i++){var a=u[i],c=t;if(r.matchBase&&1===a.length&&(c=[o]),this.matchOne(c,a,e))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate},l.prototype.matchOne=function(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,u=0,a=t.length,s=e.length;i<a&&u<s;i++,u++){this.debug("matchOne loop");var c,f=e[u],l=t[i];if(this.debug(e,f,l),!1===f)return!1;if(f===o){this.debug("GLOBSTAR",[e,f,l]);var p=i,h=u+1;if(h===s){for(this.debug("** at the end");i<a;i++)if("."===t[i]||".."===t[i]||!n.dot&&"."===t[i].charAt(0))return!1;return!0}for(;p<a;){var y=t[p];if(this.debug("\nglobstar while",t,p,e,h,y),this.matchOne(t.slice(p),e.slice(h),r))return this.debug("globstar found match!",p,a,y),!0;if("."===y||".."===y||!n.dot&&"."===y.charAt(0)){this.debug("dot detected!",t,p,e,h);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!r||(this.debug("\n>>> no match, partial?",t,p,e,h),p!==a))}if("string"==typeof f?(c=n.nocase?l.toLowerCase()===f.toLowerCase():l===f,this.debug("string match",f,l,c)):(c=l.match(f),this.debug("pattern match",f,l,c)),!c)return!1}if(i===a&&u===s)return!0;if(i===a)return r;if(u===s)return i===a-1&&""===t[i];throw new Error("wtf?")}},"./node_modules/path-browserify/index.js":function(t,e,r){(function(t){function r(t,e){for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}e.resolve=function(){for(var e="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var u=i>=0?arguments[i]:t.cwd();if("string"!=typeof u)throw new TypeError("Arguments to path.resolve must be strings");u&&(e=u+"/"+e,o="/"===u.charAt(0))}return(o?"/":"")+(e=r(n(e.split("/"),(function(t){return!!t})),!o).join("/"))||"."},e.normalize=function(t){var i=e.isAbsolute(t),u="/"===o(t,-1);return(t=r(n(t.split("/"),(function(t){return!!t})),!i).join("/"))||i||(t="."),t&&u&&(t+="/"),(i?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(n(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,r){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=e.resolve(t).substr(1),r=e.resolve(r).substr(1);for(var o=n(t.split("/")),i=n(r.split("/")),u=Math.min(o.length,i.length),a=u,s=0;s<u;s++)if(o[s]!==i[s]){a=s;break}var c=[];for(s=a;s<o.length;s++)c.push("..");return(c=c.concat(i.slice(a))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,o=!0,i=t.length-1;i>=1;--i)if(47===(e=t.charCodeAt(i))){if(!o){n=i;break}}else o=!1;return-1===n?r?"/":".":r&&1===n?"/":t.slice(0,n)},e.basename=function(t,e){var r=function(t){"string"!=typeof t&&(t+="");var e,r=0,n=-1,o=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!o){r=e+1;break}}else-1===n&&(o=!1,n=e+1);return-1===n?"":t.slice(r,n)}(t);return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,r=0,n=-1,o=!0,i=0,u=t.length-1;u>=0;--u){var a=t.charCodeAt(u);if(47!==a)-1===n&&(o=!1,n=u+1),46===a?-1===e?e=u:1!==i&&(i=1):-1!==e&&(i=-1);else if(!o){r=u+1;break}}return-1===e||-1===n||0===i||1===i&&e===n-1&&e===r+1?"":t.slice(e,n)};var o="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,r("./node_modules/process/browser.js"))},"./node_modules/process/browser.js":function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:u}catch(t){n=u}}();var s,c=[],f=!1,l=-1;function p(){f&&s&&(f=!1,s.length?c=s.concat(c):l=-1,c.length&&h())}function h(){if(!f){var t=a(p);f=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===u||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function d(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new y(t,e)),1!==c.length||f||a(h)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},"./src/commands sync recursive ^\\.\\/.*$":function(t,e,r){var n={"./":"./src/commands/index.js","./cat":"./src/commands/cat.js","./cat.js":"./src/commands/cat.js","./cd":"./src/commands/cd.js","./cd.js":"./src/commands/cd.js","./clear":"./src/commands/clear.js","./clear.js":"./src/commands/clear.js","./cp":"./src/commands/cp.js","./cp.js":"./src/commands/cp.js","./echo":"./src/commands/echo.js","./echo.js":"./src/commands/echo.js","./head":"./src/commands/head.js","./head.js":"./src/commands/head.js","./history":"./src/commands/history.js","./history.js":"./src/commands/history.js","./index":"./src/commands/index.js","./index.js":"./src/commands/index.js","./ls":"./src/commands/ls.js","./ls.js":"./src/commands/ls.js","./mkdir":"./src/commands/mkdir.js","./mkdir.js":"./src/commands/mkdir.js","./printenv":"./src/commands/printenv.js","./printenv.js":"./src/commands/printenv.js","./pwd":"./src/commands/pwd.js","./pwd.js":"./src/commands/pwd.js","./rm":"./src/commands/rm.js","./rm.js":"./src/commands/rm.js","./rmdir":"./src/commands/rmdir.js","./rmdir.js":"./src/commands/rmdir.js","./tail":"./src/commands/tail.js","./tail.js":"./src/commands/tail.js","./touch":"./src/commands/touch.js","./touch.js":"./src/commands/touch.js","./util/_head_tail_util":"./src/commands/util/_head_tail_util.js","./util/_head_tail_util.js":"./src/commands/util/_head_tail_util.js","./whoami":"./src/commands/whoami.js","./whoami.js":"./src/commands/whoami.js"};function o(t){var e=i(t);return r(e)}function i(t){if(!r.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}o.keys=function(){return Object.keys(n)},o.resolve=i,t.exports=o,o.id="./src/commands sync recursive ^\\.\\/.*$"},"./src/commands/cat.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o,i=(o=r("./src/parser/option-parser.js"))&&o.__esModule?o:{default:o},u=f(r("./src/fs/operations-with-permissions/file-operations.js")),a=f(r("./src/emulator-output/output-factory.js")),s=r("./src/emulator-state/util.js");function c(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return c=function(){return t},t}function f(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=c();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var l={};e.optDef=l;e.default=function(t,e){var r=(0,i.default)(e,l).argv;return 0===r.length?{}:{outputs:r.map((function(e){return(0,s.resolvePath)(t,e)})).map((function(e){return r=t.getFileSystem(),n=e,o=u.readFile(r,n),i=o.err,s=o.file,i?a.makeErrorOutput(i):a.makeTextOutput(s.get("content"));var r,n,o,i,s}))}}},"./src/commands/cd.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o,i=(o=r("./src/parser/option-parser.js"))&&o.__esModule?o:{default:o},u=p(r("./src/fs/operations-with-permissions/directory-operations.js")),a=p(r("./src/emulator-state/environment-variables.js")),s=p(r("./src/emulator-output/output-factory.js")),c=r("./src/fs/fs-error.js"),f=r("./src/emulator-state/util.js");function l(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return l=function(){return t},t}function p(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=l();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var h=function(t,e){return a.setEnvironmentVariable(t.getEnvVariables(),"cwd",e)},y={};e.optDef=y;e.default=function(t,e){var r=(0,i.default)(e,y).argv,n=r[0]?(0,f.resolvePath)(t,r[0]):"/";if(!u.hasDirectory(t.getFileSystem(),n)){var o=(0,c.makeError)(c.fsErrorType.NO_SUCH_DIRECTORY);return{output:s.makeErrorOutput(o)}}return{state:t.setEnvVariables(h(t,n))}}},"./src/commands/clear.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var n=r("./src/emulator-state/outputs.js");e.optDef={};e.default=function(t,e){return{state:t.setOutputs((0,n.create)())}}},"./src/commands/cp.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o,i=(o=r("./src/parser/option-parser.js"))&&o.__esModule?o:{default:o},u=y(r("./src/fs/operations-with-permissions/file-operations.js")),a=y(r("./src/fs/operations-with-permissions/directory-operations.js")),s=y(r("./src/fs/util/path-util.js")),c=y(r("./src/emulator-output/output-factory.js")),f=y(r("./src/fs/util/file-util.js")),l=r("./src/fs/fs-error.js"),p=r("./src/emulator-state/util.js");function h(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return h=function(){return t},t}function y(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=h();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var d={"-r, --recursive":""};e.optDef=d;e.default=function(t,e){var r=(0,i.default)(e,d),n=r.argv,o=r.options;if(n.length<2)return{};var h=(0,p.resolvePath)(t,n[0]),y=(0,p.resolvePath)(t,n[1]),m=s.isTrailingPath(n[1]);return h===y?{output:c.makeTextOutput("Source and destination are the same (not copied).")}:o.recursive?function(t,e,r){if(a.hasDirectory(t.getFileSystem(),r)){var n=s.getLastPathPart(e);"/"!==n&&(r="".concat(r,"/").concat(n))}if(!a.hasDirectory(t.getFileSystem(),r)){var o=f.makeDirectory(),i=a.addDirectory(t.getFileSystem(),r,o,!1),u=i.fs,l=i.err;if(t=t.setFileSystem(u),l)return{output:c.makeErrorOutput(l)}}var p=a.copyDirectory(t.getFileSystem(),e,r),h=p.fs,y=p.err;return y?{output:c.makeErrorOutput(y)}:{state:t.setFileSystem(h)}}(t,h,y):function(t,e,r,n){var o=t.getFileSystem();if(n&&!a.hasDirectory(o,r)){var i=(0,l.makeError)(l.fsErrorType.NO_SUCH_DIRECTORY);return{output:c.makeErrorOutput(i)}}var s=u.copyFile(o,e,r),f=s.fs,p=s.err;return p?{output:c.makeErrorOutput(p)}:{state:t.setFileSystem(f)}}(t,h,y,m)}},"./src/commands/echo.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=u();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}r.default=t,e&&e.set(t,r);return r}(r("./src/emulator-output/output-factory.js")),i=r("./src/emulator-state/environment-variables.js");function u(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return u=function(){return t},t}var a=/\$(\w+)/g,s=/\s\s+/g;e.optDef={};e.default=function(t,e){var r,n=e.join(" "),u=(r=t.getEnvVariables(),n.replace(a,(function(t,e){return(0,i.getEnvironmentVariable)(r,e)||""}))).trim().replace(s," ");return{output:o.makeTextOutput(u)}}},"./src/commands/head.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o,i=(o=r("./src/parser/option-parser.js"))&&o.__esModule?o:{default:o},u=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=c();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}r.default=t,e&&e.set(t,r);return r}(r("./src/emulator-output/output-factory.js")),a=r("./src/commands/util/_head_tail_util.js"),s=r("./src/emulator-state/util.js");function c(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return c=function(){return t},t}var f={"-n, --lines":"<count>"};e.optDef=f;e.default=function(t,e){var r=(0,i.default)(e,f),n=r.argv,o=r.options;if(0===n.length)return{};var c=(0,s.resolvePath)(t,n[0]),l=(0,a.trimFileContent)(t.getFileSystem(),c,o,(function(t,e){return t.slice(0,e)})),p=l.content,h=l.err;return h?{output:u.makeErrorOutput(h)}:{output:u.makeTextOutput(p)}}},"./src/commands/history.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o,i=(o=r("./src/parser/option-parser.js"))&&o.__esModule?o:{default:o},u=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=s();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}r.default=t,e&&e.set(t,r);return r}(r("./src/emulator-output/output-factory.js")),a=r("./src/emulator-state/history.js");function s(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return s=function(){return t},t}var c=function(t){return t.setHistory((0,a.create)())},f=function(t){return t.getHistory().join("\n")},l={"-c, --clear":""};e.optDef=l;e.default=function(t,e){return(0,i.default)(e,l).options.clear?{state:c(t)}:{output:u.makeTextOutput(f(t))}}},"./src/commands/index.js":function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.commandNames=void 0;var i=["cat","cd","clear","cp","echo","head","history","ls","mkdir","printenv","pwd","rm","rmdir","tail","touch","whoami"];e.commandNames=i;var u=i.reduce((function(t,e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,o({},e,{function:r("./src/commands sync recursive ^\\.\\/.*$")("./".concat(e)).default,optDef:r("./src/commands sync recursive ^\\.\\/.*$")("./".concat(e)).optDef}))}),{});e.default=u},"./src/commands/ls.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o,i=(o=r("./src/parser/option-parser.js"))&&o.__esModule?o:{default:o},u=l(r("./src/fs/operations-with-permissions/directory-operations.js")),a=l(r("./src/emulator-state/environment-variables.js")),s=l(r("./src/fs/util/path-util.js")),c=l(r("./src/emulator-output/output-factory.js"));function f(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return f=function(){return t},t}function l(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=f();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var p=(0,r("./node_modules/immutable/dist/immutable.es.js").Seq)([".",".."]),h=function(t){var e=t.sort();return{output:c.makeTextOutput(e.join("\n"))}},y=function(t){return!t.startsWith(".")},d={"-a, --all":"","-A, --almost-all":""};e.optDef=d;e.default=function(t,e){var r=(0,i.default)(e,d),n=r.options,o=r.argv,f=function(t,e){var r=a.getEnvironmentVariable(t,"cwd");return e.length>0?s.toAbsolutePath(e[0],r):r}(t.getEnvVariables(),o),l=u.listDirectory(t.getFileSystem(),f),m=l.err,v=l.list;return m?{output:c.makeErrorOutput(m)}:n.all?h(p.concat(v)):n.almostAll?h(v):h(v.filter(y))}},"./src/commands/mkdir.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o,i=(o=r("./src/parser/option-parser.js"))&&o.__esModule?o:{default:o},u=l(r("./src/fs/operations-with-permissions/directory-operations.js")),a=l(r("./src/emulator-output/output-factory.js")),s=l(r("./src/fs/util/file-util.js")),c=r("./src/emulator-state/util.js");function f(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return f=function(){return t},t}function l(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=f();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var p=s.makeDirectory(),h={};e.optDef=h;e.default=function(t,e){var r=(0,i.default)(e,h).argv;if(0===r.length)return{};var n=(0,c.resolvePath)(t,r[0]),o=u.addDirectory(t.getFileSystem(),n,p,!1),s=o.fs,f=o.err;return f?{output:a.makeErrorOutput(f)}:{state:t.setFileSystem(s)}}},"./src/commands/printenv.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o,i=(o=r("./src/parser/option-parser.js"))&&o.__esModule?o:{default:o},u=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=s();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}r.default=t,e&&e.set(t,r);return r}(r("./src/emulator-output/output-factory.js")),a=r("./src/emulator-state/environment-variables.js");function s(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return s=function(){return t},t}function c(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var l=function(t){return t.reduce((function(t,e,r){return[].concat(c(t),["".concat(r,"=").concat(e)])}),[]).join("\n")},p={};e.optDef=p;e.default=function(t,e){var r=(0,i.default)(e,p).argv,n=t.getEnvVariables();if(0===r.length)return{output:u.makeTextOutput(l(n))};var o=(0,a.getEnvironmentVariable)(n,r[0]);return o?{output:u.makeTextOutput(o)}:{}}},"./src/commands/pwd.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=u();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}r.default=t,e&&e.set(t,r);return r}(r("./src/emulator-output/output-factory.js")),i=r("./src/emulator-state/environment-variables.js");function u(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return u=function(){return t},t}e.optDef={};e.default=function(t,e){return{output:o.makeTextOutput((0,i.getEnvironmentVariable)(t.getEnvVariables(),"cwd"))}}},"./src/commands/rm.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o,i=(o=r("./src/parser/option-parser.js"))&&o.__esModule?o:{default:o},u=p(r("./src/fs/operations-with-permissions/file-operations.js")),a=p(r("./src/fs/operations-with-permissions/directory-operations.js")),s=p(r("./src/emulator-output/output-factory.js")),c=r("./src/emulator-state/util.js"),f=r("./src/fs/fs-error.js");function l(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return l=function(){return t},t}function p(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=l();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var h={"--no-preserve-root, --noPreserveRoot":"","-r, --recursive":""};e.optDef=h;e.default=function(t,e){var r=(0,i.default)(e,h),n=r.argv,o=r.options;if(0===n.length)return{};var l,p=(0,c.resolvePath)(t,n[0]),y=t.getFileSystem();if("/"===p&&!0!==o.noPreserveRoot)return{};if(!y.has(p))return l=(0,f.makeError)(f.fsErrorType.NO_SUCH_FILE_OR_DIRECTORY),{output:s.makeErrorOutput(l)};var d=!0===o.recursive?a.deleteDirectory(y,p,!0):u.deleteFile(y,p),m=d.fs,v=d.err;return v?{output:s.makeErrorOutput(v)}:{state:t.setFileSystem(m)}}},"./src/commands/rmdir.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o,i=(o=r("./src/parser/option-parser.js"))&&o.__esModule?o:{default:o},u=f(r("./src/fs/operations-with-permissions/directory-operations.js")),a=f(r("./src/emulator-output/output-factory.js")),s=r("./src/emulator-state/util.js");function c(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return c=function(){return t},t}function f(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=c();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var l={};e.optDef=l;e.default=function(t,e){var r=(0,i.default)(e,l).argv;if(0===r.length)return{};var n=(0,s.resolvePath)(t,r[0]),o=u.deleteDirectory(t.getFileSystem(),n,!1),c=o.fs,f=o.err;return f?{output:a.makeErrorOutput(f)}:{state:t.setFileSystem(c)}}},"./src/commands/tail.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o,i=(o=r("./src/parser/option-parser.js"))&&o.__esModule?o:{default:o},u=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=c();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}r.default=t,e&&e.set(t,r);return r}(r("./src/emulator-output/output-factory.js")),a=r("./src/commands/util/_head_tail_util.js"),s=r("./src/emulator-state/util.js");function c(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return c=function(){return t},t}var f={"-n, --lines":"<count>"};e.optDef=f;e.default=function(t,e){var r=(0,i.default)(e,f),n=r.argv,o=r.options;if(0===n.length)return{};var c=(0,s.resolvePath)(t,n[0]),l=(0,a.trimFileContent)(t.getFileSystem(),c,o,(function(t,e){return t.slice(-1*e)})),p=l.content,h=l.err;return h?{output:u.makeErrorOutput(h)}:{output:u.makeTextOutput(p)}}},"./src/commands/touch.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o,i=(o=r("./src/parser/option-parser.js"))&&o.__esModule?o:{default:o},u=l(r("./src/fs/operations-with-permissions/file-operations.js")),a=l(r("./src/emulator-output/output-factory.js")),s=l(r("./src/fs/util/file-util.js")),c=r("./src/emulator-state/util.js");function f(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return f=function(){return t},t}function l(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=f();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var p=s.makeFile(),h={};e.optDef=h;e.default=function(t,e){var r=(0,i.default)(e,h).argv;if(0===r.length)return{};var n=(0,c.resolvePath)(t,r[0]);if(t.getFileSystem().has(n))return{};var o=u.writeFile(t.getFileSystem(),n,p),s=o.fs,f=o.err;return f?{output:a.makeErrorOutput(f)}:{state:t.setFileSystem(s)}}},"./src/commands/util/_head_tail_util.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.trimFileContent=void 0;var o=a(r("./src/fs/operations-with-permissions/file-operations.js")),i=a(r("./src/emulator-output/output-factory.js"));function u(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return u=function(){return t},t}function a(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=u();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}e.trimFileContent=function(t,e,r,n){var u=o.readFile(t,e),a=u.file,s=u.err;if(s)return{err:i.makeErrorOutput(s)};var c=r.lines?Number(r.lines):10;return{content:n(a.get("content").split("\n"),c).join("\n")}}},"./src/commands/whoami.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.optDef=void 0;var o=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=u();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}r.default=t,e&&e.set(t,r);return r}(r("./src/emulator-output/output-factory.js")),i=r("./src/emulator-state/environment-variables.js");function u(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return u=function(){return t},t}e.optDef={};e.default=function(t,e){return{output:o.makeTextOutput((0,i.getEnvironmentVariable)(t.getEnvVariables(),"user")||"root")}}},"./src/emulator-output/index.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}function i(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var a=i?Object.getOwnPropertyDescriptor(t,u):null;a&&(a.get||a.set)?Object.defineProperty(r,u,a):r[u]=t[u]}return r.default=t,e&&e.set(t,r),r}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u={OutputFactory:i(r("./src/emulator-output/output-factory.js")),OutputType:i(r("./src/emulator-output/output-type.js"))};e.default=u,t.exports=e.default},"./src/emulator-output/output-factory.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makeErrorOutput=e.makeTextOutput=e.makeHeaderOutput=e.OutputRecord=void 0;var n=r("./node_modules/immutable/dist/immutable.es.js"),o=r("./src/emulator-output/output-type.js"),i=(0,n.Record)({type:void 0,content:void 0});e.OutputRecord=i;e.makeHeaderOutput=function(t,e){return new i({type:o.HEADER_OUTPUT_TYPE,content:{cwd:t,command:e}})};e.makeTextOutput=function(t){return new i({type:o.TEXT_OUTPUT_TYPE,content:t})};e.makeErrorOutput=function(t){return new i({type:o.TEXT_ERROR_OUTPUT_TYPE,content:"".concat(t.source,": ").concat(t.type)})}},"./src/emulator-output/output-type.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HEADER_OUTPUT_TYPE=e.TEXT_ERROR_OUTPUT_TYPE=e.TEXT_OUTPUT_TYPE=void 0;e.TEXT_OUTPUT_TYPE="TEXT_OUTPUT";e.TEXT_ERROR_OUTPUT_TYPE="TEXT_ERROR_OUTPUT";e.HEADER_OUTPUT_TYPE="HEADER_OUTPUT_TYPE"},"./src/emulator-state/EmulatorState.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r("./node_modules/immutable/dist/immutable.es.js"),o=r("./src/emulator-state/command-mapping.js"),i=r("./src/emulator-state/environment-variables.js"),u=r("./src/emulator-state/file-system.js"),a=r("./src/emulator-state/history.js"),s=r("./src/emulator-state/outputs.js");function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var l=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!(e&&e instanceof n.Map))throw new Error("Do not use the constructor directly. Use the static create method.");this._immutable=e}var e,r,l;return e=t,l=[{key:"createEmpty",value:function(){return t.create({})}},{key:"create",value:function(e){var r,f=e.fs,l=void 0===f?(0,u.create)():f,p=e.environmentVariables,h=void 0===p?(0,i.create)():p,y=e.history,d=void 0===y?(0,a.create)():y,m=e.outputs,v=void 0===m?(0,s.create)():m,_=e.commandMapping,b=void 0===_?(0,o.create)():_;return new t(new n.Map((c(r={},"fs",l),c(r,"environmentVariables",h),c(r,"history",d),c(r,"outputs",v),c(r,"commandMapping",b),r)))}}],(r=[{key:"getFileSystem",value:function(){return this.getImmutable().get("fs")}},{key:"setFileSystem",value:function(e){return new t(this.getImmutable().set("fs",e))}},{key:"getEnvVariables",value:function(){return this.getImmutable().get("environmentVariables")}},{key:"setEnvVariables",value:function(e){return new t(this.getImmutable().set("environmentVariables",e))}},{key:"getHistory",value:function(){return this.getImmutable().get("history")}},{key:"setHistory",value:function(e){return new t(this.getImmutable().set("history",e))}},{key:"getOutputs",value:function(){return this.getImmutable().get("outputs")}},{key:"setOutputs",value:function(e){return new t(this.getImmutable().set("outputs",e))}},{key:"getCommandMapping",value:function(){return this.getImmutable().get("commandMapping")}},{key:"setCommandMapping",value:function(e){return new t(this.getImmutable().set("commandMapping",e))}},{key:"getImmutable",value:function(){return this._immutable}},{key:"toJS",value:function(){return this._immutable.toJS()}}])&&f(e.prototype,r),l&&f(e,l),t}();e.default=l,t.exports=e.default},"./src/emulator-state/command-mapping.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCommandNames=e.getCommandOptDef=e.getCommandFn=e.unsetCommand=e.setCommand=e.isCommandSet=e.create=void 0;var n,o=r("./node_modules/immutable/dist/immutable.es.js"),i=(n=r("./src/commands/index.js"))&&n.__esModule?n:{default:n};e.create=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.default,e=0,r=Object.keys(t);e<r.length;e++){var n=r[e],u=t[n];if(!u.hasOwnProperty("function"))throw new Error("Failed to create command mapping: missing command function for ".concat(n));if(!u.hasOwnProperty("optDef"))throw new Error("Failed to create command mapping: missing option definition (optDef) for ".concat(n))}return(0,o.fromJS)(t)};e.isCommandSet=function(t,e){return t.has(e)};e.setCommand=function(t,e,r,n){if(void 0===r)throw new Error("Cannot set ".concat(e," command without function"));if(void 0===n)throw new Error("Cannot set ".concat(e," command without optDef (pass in {} if the command takes no options)"));return t.set(e,(0,o.fromJS)({function:r,optDef:n}))};e.unsetCommand=function(t,e){return t.delete(e)};e.getCommandFn=function(t,e){if(t.has(e))return t.get(e).get("function")};e.getCommandOptDef=function(t,e){if(t.has(e))return t.get(e).get("optDef")};e.getCommandNames=function(t){return t.keySeq()}},"./src/emulator-state/environment-variables.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unsetEnvironmentVariable=e.setEnvironmentVariable=e.getEnvironmentVariable=e.create=void 0;var n=r("./node_modules/immutable/dist/immutable.es.js");function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){u(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function u(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}e.create=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";if(!e&&!t.hasOwnProperty("cwd"))throw new Error("Failed to create environment variables. Missing 'cwd' (current working directory).");return(0,n.Map)(i({cwd:e},t))};e.getEnvironmentVariable=function(t,e){return t.get(e)};e.setEnvironmentVariable=function(t,e,r){return t.set(e,r)};e.unsetEnvironmentVariable=function(t,e){return t.delete(e)}},"./src/emulator-state/file-system.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.create=void 0;var o=s(r("./src/fs/util/file-util.js")),i=s(r("./src/fs/operations/directory-operations.js")),u=r("./node_modules/immutable/dist/immutable.es.js");function a(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return a=function(){return t},t}function s(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=a();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var c={"/":o.makeDirectory()};e.create=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;return i.fillGaps((0,u.fromJS)(t))}},"./src/emulator-state/history.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recordCommand=e.create=void 0;var n=r("./node_modules/immutable/dist/immutable.es.js");function o(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}e.create=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return n.Stack.of.apply(n.Stack,o(t))};e.recordCommand=function(t,e){return t.push(e)}},"./src/emulator-state/index.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,i=l(r("./src/emulator-state/command-mapping.js")),u=l(r("./src/emulator-state/environment-variables.js")),a=l(r("./src/emulator-state/file-system.js")),s=l(r("./src/emulator-state/history.js")),c=l(r("./src/emulator-state/outputs.js"));function f(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return f=function(){return t},t}function l(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=f();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var p={EmulatorState:((o=r("./src/emulator-state/EmulatorState.js"))&&o.__esModule?o:{default:o}).default,CommandMapping:i,EnvironmentVariables:u,FileSystem:a,History:s,Outputs:c};e.default=p,t.exports=e.default},"./src/emulator-state/outputs.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addRecord=e.create=void 0;var n=r("./node_modules/immutable/dist/immutable.es.js");e.create=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,n.List)(t)};e.addRecord=function(t,e){if(!n.Record.isRecord(e))throw new Error("Only records of type OutputRecord can be added to outputs");if(!e.has("type"))throw new Error("Output record must include a type");if(!e.has("content"))throw new Error("Output record must include content");return t.push(e)}},"./src/emulator-state/util.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.resolvePath=void 0;var o=a(r("./src/emulator-state/environment-variables.js")),i=a(r("./src/fs/util/path-util.js"));function u(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return u=function(){return t},t}function a(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=u();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}e.resolvePath=function(t,e){var r=o.getEnvironmentVariable(t.getEnvVariables(),"cwd");return i.toAbsolutePath(e,r)}},"./src/emulator/auto-complete.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.suggestFileSystemNames=e.suggestCommandOptions=e.suggestCommands=void 0;var o=s(r("./src/fs/util/path-util.js")),i=s(r("./src/fs/util/glob-util.js")),u=r("./src/emulator-state/command-mapping.js");function a(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return a=function(){return t},t}function s(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=a();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}function c(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}e.suggestCommands=function(t,e){var r=(0,u.getCommandNames)(t);return c(i.globSeq(r,"".concat(e,"*")))};e.suggestCommandOptions=function(t,e,r){if(!(0,u.isCommandSet)(t,e))return[];var n=(0,u.getCommandOptDef)(t,e).keySeq().flatMap((function(t){return t.split(",").map((function(t){return t.trim()}))}));return c(i.globSeq(n,"".concat(r,"*")))};e.suggestFileSystemNames=function(t,e,r){var n=o.toAbsolutePath(r,e),u="".concat(n,"*"),a="/"===n?"/*":"".concat(n,"*/*"),s=r.endsWith("/")?a:u,f=i.globPaths(t,s);return o.isAbsPath(r)?c(f):c(f.map((function(t){var e=o.toPathParts(r).slice(0,-1),n=o.getLastPathPart(t);return o.toPath(e.concat(n))})))}},"./src/emulator/command-runner.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.run=e.makeRunnerErrorOutput=void 0;var o=r("./src/emulator/emulator-error.js"),i=r("./src/emulator-output/output-factory.js"),u=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=a();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}r.default=t,e&&e.set(t,r);return r}(r("./src/emulator-state/command-mapping.js"));function a(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return a=function(){return t},t}function s(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var f=function(t){return(0,i.makeErrorOutput)((0,o.makeError)(t))};e.makeRunnerErrorOutput=f;e.run=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o.emulatorErrorType.COMMAND_NOT_FOUND,i=function(){return{output:f(n)}};if(!u.isCommandSet(t,e))return i.apply(void 0,s(r));var a=u.getCommandFn(t,e);try{return a.apply(void 0,s(r))}catch(t){return{output:f(o.emulatorErrorType.UNEXPECTED_COMMAND_FAILURE)}}}},"./src/emulator/emulator-error.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makeError=e.emulatorErrorType=void 0;e.emulatorErrorType={COMMAND_NOT_FOUND:"Command not found",UNEXPECTED_COMMAND_FAILURE:"Unhandled command error"};e.makeError=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return{source:"emulator",type:t,message:e}}},"./src/emulator/index.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,i=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=p();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}r.default=t,e&&e.set(t,r);return r}(r("./src/emulator/command-runner.js")),u=(o=r("./src/parser/command-parser.js"))&&o.__esModule?o:{default:o},a=r("./src/emulator-output/output-factory.js"),s=r("./src/emulator-state/history.js"),c=r("./src/emulator-state/environment-variables.js"),f=r("./src/emulator/auto-complete.js"),l=r("./node_modules/immutable/dist/immutable.es.js");function p(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return p=function(){return t},t}function h(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=d(t))){var e=0,r=function(){};return{s:r,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,i=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return i=t.done,t},e:function(t){u=!0,o=t},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw o}}}}function y(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||d(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){if(t){if("string"==typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(t,e):void 0}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var _=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,(r=[{key:"autocomplete",value:function(t,e){var r=this.suggest(t,e);if(1!==r.length)return e;var n=new l.List(e.split(" ")),o=r[0];return n.update(-1,(function(t){return o})).join(" ")}},{key:"suggest",value:function(t,e){var r=" "===(e=this._trimLeadingSpace(e)).slice(-1),n=e.trim().split(" "),o=this._getBoundaryWords(n),i=o.start,u=o.end;if(!r&&1===n.length)return(0,f.suggestCommands)(t.getCommandMapping(),i);var a=r?"":u,s=(0,c.getEnvironmentVariable)(t.getEnvVariables(),"cwd");return[].concat(y((0,f.suggestCommandOptions)(t.getCommandMapping(),i,a)),y((0,f.suggestFileSystemNames)(t.getFileSystem(),s,a)))}},{key:"_trimLeadingSpace",value:function(t){return t.replace(/^\s+/g,"")}},{key:"_getBoundaryWords",value:function(t){return{start:t[0],end:t[t.length-1]}}},{key:"execute",value:function(t,e){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3?arguments[3]:void 0,i=h(n);try{for(i.s();!(r=i.n()).done;){var u=r.value;u.onExecuteStarted(t,e)}}catch(t){i.e(t)}finally{i.f()}t=this._addHeaderOutput(t,e),""===e.trim()?t=this._addCommandOutputs(t,[(0,a.makeTextOutput)("")]):(t=this._addCommandToHistory(t,e),t=this._updateStateByExecution(t,e,o));var s,c=h(n);try{for(c.s();!(s=c.n()).done;){var f=s.value;f.onExecuteCompleted(t)}}catch(t){c.e(t)}finally{c.f()}return t}},{key:"_updateStateByExecution",value:function(t,e,r){var n,o=h((0,u.default)(e));try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a.commandName,c=a.commandOptions,f=t.getCommandMapping(),l=[t,c],p=i.run(f,s,l,r),y=p.state,d=p.output,m=p.outputs;y&&(t=y),d?t=this._addCommandOutputs(t,[d]):m&&(t=this._addCommandOutputs(t,m))}}catch(t){o.e(t)}finally{o.f()}return t}},{key:"_addCommandToHistory",value:function(t,e){var r=t.getHistory();return t.setHistory((0,s.recordCommand)(r,e))}},{key:"_addHeaderOutput",value:function(t,e){var r=t.getEnvVariables(),n=(0,c.getEnvironmentVariable)(r,"cwd");return this._addCommandOutputs(t,[(0,a.makeHeaderOutput)(n,e)])}},{key:"_addCommandOutputs",value:function(t,e){var r,n=h(e);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=t.getOutputs();t=t.setOutputs(i.push(o))}}catch(t){n.e(t)}finally{n.f()}return t}}])&&v(e.prototype,r),n&&v(e,n),t}();e.default=_,t.exports=e.default},"./src/emulator/plugins/BoundedHistoryIterator.js":function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;n(this,t),this.historyStack=e.push(""),this.index=r}var e,r,i;return e=t,(r=[{key:"hasUp",value:function(){return this.index+1<this.historyStack.size}},{key:"up",value:function(){return this.hasUp()&&this.index++,this.historyStack.get(this.index)}},{key:"hasDown",value:function(){return this.index-1>=0}},{key:"down",value:function(){return this.hasDown()&&this.index--,this.historyStack.get(this.index)}}])&&o(e.prototype,r),i&&o(e,i),t}();e.default=i,t.exports=e.default},"./src/emulator/plugins/HistoryKeyboardPlugin.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,o=(n=r("./src/emulator/plugins/BoundedHistoryIterator.js"))&&n.__esModule?n:{default:n};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._nullableHistoryIterator=null,this.historyStack=e.getHistory()}var e,r,n;return e=t,(r=[{key:"onExecuteStarted",value:function(t,e){}},{key:"onExecuteCompleted",value:function(t){this._nullableHistoryIterator=null,this.historyStack=t.getHistory()}},{key:"completeUp",value:function(){return this.createHistoryIteratorIfNull(),this._nullableHistoryIterator.up()}},{key:"completeDown",value:function(){return this.createHistoryIteratorIfNull(),this._nullableHistoryIterator.down()}},{key:"createHistoryIteratorIfNull",value:function(){this._nullableHistoryIterator||(this._nullableHistoryIterator=new o.default(this.historyStack))}}])&&i(e.prototype,r),n&&i(e,n),t}();e.default=u,t.exports=e.default},"./src/fs/fs-error.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makeError=e.fsErrorType=void 0;e.fsErrorType={FILE_EXISTS:"File exists",DIRECTORY_EXISTS:"Directory exists",DIRECTORY_NOT_EMPTY:"Directory not empty",NO_SUCH_FILE_OR_DIRECTORY:"No such file or directory",NO_SUCH_FILE:"No such file",NO_SUCH_DIRECTORY:"No such directory",FILE_OR_DIRECTORY_EXISTS:"File or directory exists",IS_A_DIRECTORY:"Is a directory",NOT_A_DIRECTORY:"Not a directory",PERMISSION_DENIED:"Permission denied",OTHER:"Other"};e.makeError=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return{source:"fs",type:t,message:e}}},"./src/fs/index.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}function i(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var a=i?Object.getOwnPropertyDescriptor(t,u):null;a&&(a.get||a.set)?Object.defineProperty(r,u,a):r[u]=t[u]}return r.default=t,e&&e.set(t,r),r}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u={DirOp:i(r("./src/fs/operations-with-permissions/directory-operations.js")),FileOp:i(r("./src/fs/operations-with-permissions/file-operations.js"))};e.default=u,t.exports=e.default},"./src/fs/operations-with-permissions/directory-operations.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.renameDirectory=e.deleteDirectory=e.copyDirectory=e.addDirectory=e.listDirectoryFolders=e.listDirectoryFiles=e.listDirectory=e.hasDirectory=void 0;var o=s(r("./src/fs/operations/directory-operations.js")),i=s(r("./src/fs/util/permission-util.js")),u=r("./src/fs/fs-error.js");function a(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return a=function(){return t},t}function s(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=a();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Cannot modify directory";return{err:(0,u.makeError)(u.fsErrorType.PERMISSION_DENIED,t)}};e.hasDirectory=function(){return o.hasDirectory.apply(o,arguments)};e.listDirectory=function(){return o.listDirectory.apply(o,arguments)};e.listDirectoryFiles=function(){return o.listDirectoryFiles.apply(o,arguments)};e.listDirectoryFolders=function(){return o.listDirectoryFolders.apply(o,arguments)};e.addDirectory=function(t,e){if(!i.canModifyPath(t,e))return c();for(var r=arguments.length,n=new Array(r>2?r-2:0),u=2;u<r;u++)n[u-2]=arguments[u];return o.addDirectory.apply(o,[t,e].concat(n))};e.copyDirectory=function(t,e,r){if(!i.canModifyPath(t,e))return c("Cannot modify source directory");if(!i.canModifyPath(t,r))return c("Cannot modify dest directory");for(var n=arguments.length,u=new Array(n>3?n-3:0),a=3;a<n;a++)u[a-3]=arguments[a];return o.copyDirectory.apply(o,[t,e,r].concat(u))};e.deleteDirectory=function(t,e){if(!i.canModifyPath(t,e))return c();for(var r=arguments.length,n=new Array(r>2?r-2:0),u=2;u<r;u++)n[u-2]=arguments[u];return o.deleteDirectory.apply(o,[t,e].concat(n))};e.renameDirectory=function(t,e,r){return i.canModifyPath(t,e)?i.canModifyPath(t,r)?o.renameDirectory(t,e,r):c("Cannot modify renamed path"):c("Cannot modify current path")}},"./src/fs/operations-with-permissions/file-operations.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.deleteFile=e.copyFile=e.writeFile=e.readFile=e.hasFile=void 0;var o=s(r("./src/fs/util/permission-util.js")),i=s(r("./src/fs/operations/file-operations.js")),u=r("./src/fs/fs-error.js");function a(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return a=function(){return t},t}function s(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=a();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Cannot modify file";return{err:(0,u.makeError)(u.fsErrorType.PERMISSION_DENIED,t)}};e.hasFile=function(){return i.hasFile.apply(i,arguments)};e.readFile=function(){return i.readFile.apply(i,arguments)};e.writeFile=function(t,e){if(!o.canModifyPath(t,e))return c();for(var r=arguments.length,n=new Array(r>2?r-2:0),u=2;u<r;u++)n[u-2]=arguments[u];return i.writeFile.apply(i,[t,e].concat(n))};e.copyFile=function(t,e,r){return o.canModifyPath(t,e)?o.canModifyPath(t,r)?i.copyFile(t,e,r):c("Cannot modify destination file"):c("Cannot modify source file")};e.deleteFile=function(t,e){return o.canModifyPath(t,e)?i.deleteFile(t,e):c()}},"./src/fs/operations/base-operations.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.remove=e.add=void 0;var o=f(r("./src/fs/util/glob-util.js")),i=f(r("./src/fs/operations/directory-operations.js")),u=f(r("./src/fs/operations/file-operations.js")),a=f(r("./src/fs/util/path-util.js")),s=r("./src/fs/fs-error.js");function c(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return c=function(){return t},t}function f(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=c();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}function l(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(t,e)}(t))){var e=0,r=function(){};return{s:r,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,i=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return i=t.done,t},e:function(t){u=!0,o=t},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw o}}}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}e.add=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t.has(e))return{err:(0,s.makeError)(s.fsErrorType.FILE_OR_DIRECTORY_EXISTS)};var o,c=a.getPathBreadCrumbs(e).slice(0,-1),f=l(c);try{for(f.s();!(o=f.n()).done;){var p=o.value;if(u.hasFile(t,p))return{err:(0,s.makeError)(s.fsErrorType.NOT_A_DIRECTORY,"Cannot add path to a file: ".concat(p))};if(!t.has(p)&&!n)return{err:(0,s.makeError)(s.fsErrorType.NO_SUCH_DIRECTORY,"Parent directory does not exist: ".concat(p))}}}catch(t){f.e(t)}finally{f.f()}var h=t.set(e,r);return{fs:n?i.fillGaps(h):h}};e.remove=function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t.has(e))return{err:(0,s.makeError)(s.fsErrorType.NO_SUCH_FILE_OR_DIRECTORY)};var n="/"===e?"/**":"".concat(e,"/**"),i=o.globPaths(t,n);return r||i.isEmpty()?{fs:t.removeAll(i.concat(e))}:{err:(0,s.makeError)(s.fsErrorType.DIRECTORY_NOT_EMPTY)}}},"./src/fs/operations/directory-operations.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.renameDirectory=e.deleteDirectory=e.copyDirectory=e.addDirectory=e.listDirectory=e.listDirectoryFolders=e.listDirectoryFiles=e.hasDirectory=e.fillGaps=void 0;var o=l(r("./src/fs/util/file-util.js")),i=l(r("./src/fs/util/glob-util.js")),u=l(r("./src/fs/util/path-util.js")),a=l(r("./src/fs/operations/base-operations.js")),s=r("./src/fs/fs-error.js"),c=r("./src/fs/operations/file-operations.js");function f(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return f=function(){return t},t}function l(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=f();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=t[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(t,e)||y(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=y(t))){var e=0,r=function(){};return{s:r,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,i=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return i=t.done,t},e:function(t){u=!0,o=t},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw o}}}}function y(t,e){if(t){if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var m=function(t){return function(e){return o.isFile(t.get(e))}},v=function(t){return function(e){return o.isDirectory(t.get(e))}};e.fillGaps=function(t){var e=o.makeDirectory(),r=t.keySeq().flatMap((function(t){return u.getPathBreadCrumbs(t)})).filter((function(e){return!t.has(e)}));return t.withMutations((function(t){var n,o=h(r);try{for(o.s();!(n=o.n()).done;){var i=n.value;t.set(i,e)}}catch(t){o.e(t)}finally{o.f()}}))};var _=function(t,e){return t.has(e)&&o.isDirectory(t.get(e))};e.hasDirectory=_;var b=function(t,e){if((0,c.hasFile)(t,e))return{err:(0,s.makeError)(s.fsErrorType.FILE_EXISTS,"File exists at path")};if(!_(t,e))return{err:(0,s.makeError)(s.fsErrorType.NO_SUCH_DIRECTORY,"Cannot list files in non-existent directory")};var r="/"===e?"/*":"".concat(e,"/*");return{list:i.captureGlobPaths(t,r,m(t))}};e.listDirectoryFiles=b;var g=function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if((0,c.hasFile)(t,e))return{err:(0,s.makeError)(s.fsErrorType.FILE_EXISTS,"File exists at path")};if(!_(t,e))return{err:(0,s.makeError)(s.fsErrorType.NO_SUCH_DIRECTORY,"Cannot list folders in non-existent directory")};var n="/"===e?"/*":"".concat(e,"/*"),o=i.captureGlobPaths(t,n,v(t));return r?{list:o.map((function(t){return"".concat(t,"/")}))}:{list:o}};e.listDirectoryFolders=g;e.listDirectory=function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=b(t,e),o=n.err,i=n.list,u=g(t,e,r),a=u.err,s=u.list;return o||a?{err:o||a}:{list:i.concat(s)}};e.addDirectory=function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return(0,c.hasFile)(t,u.getPathParent(e))?{err:(0,s.makeError)(s.fsErrorType.FILE_EXISTS,"File exists at path")}:a.add(t,e,r,n)};var j=function(t,e){var r,n=h(e);try{for(n.s();!(r=n.n()).done;){var o=p(r.value,2),i=o[0],u=o[1];if(t.has(u)){if((0,c.hasFile)(t,i)&&_(t,u))return!1;if(_(t,i)&&(0,c.hasFile)(t,u))return!1}}}catch(t){n.e(t)}finally{n.f()}return!0},O=function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!_(t,e))return{err:(0,s.makeError)(s.fsErrorType.NO_SUCH_DIRECTORY,"Source directory does not exist")};if(!_(t,r))return{err:(0,s.makeError)(s.fsErrorType.NO_SUCH_DIRECTORY,"Destination directory does not exist")};var o="/"===e?"/**":"".concat(e,"/**"),u=i.globPaths(t,o),a=i.captureGlobPaths(t,o),c=a.map((function(t){return"/"===t?r:"".concat(r,"/").concat(t)}));return j(t,u.zip(c))?{fs:t.withMutations((function(e){var r,o=h(u.zip(c));try{for(o.s();!(r=o.n()).done;){var i=p(r.value,2),a=i[0],s=i[1];t.has(s)&&!n||e.set(s,t.get(a))}}catch(t){o.e(t)}finally{o.f()}}))}:{err:(0,s.makeError)(s.fsErrorType.OTHER,"Cannot overwrite a directory with file OR a file with directory")}};e.copyDirectory=O;var w=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,c.hasFile)(t,e)?{err:(0,s.makeError)(s.fsErrorType.FILE_EXISTS,"File exists at path")}:_(t,e)?a.remove(t,e,r):{err:(0,s.makeError)(s.fsErrorType.NO_SUCH_DIRECTORY,"No such directory: ".concat(e))}};e.deleteDirectory=w;e.renameDirectory=function(t,e,r){var n=O(t,e,r,!0),o=n.err,i=n.fs;return o?{err:o}:w(i,e,!0)}},"./src/fs/operations/file-operations.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.deleteFile=e.copyFile=e.writeFile=e.readFile=e.hasFile=void 0;var o=f(r("./src/fs/util/path-util.js")),i=f(r("./src/fs/operations/base-operations.js")),u=r("./src/fs/util/file-util.js"),a=r("./src/fs/operations/directory-operations.js"),s=r("./src/fs/fs-error.js");function c(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return c=function(){return t},t}function f(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=c();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=o?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}var l=function(t,e){if(t.has(e)){var r=t.get(e);return(0,u.isFile)(r)}return!1};e.hasFile=l;e.readFile=function(t,e){return(0,a.hasDirectory)(t,e)?{err:(0,s.makeError)(s.fsErrorType.IS_A_DIRECTORY)}:l(t,e)?{file:t.get(e)}:{err:(0,s.makeError)(s.fsErrorType.NO_SUCH_FILE)}};e.writeFile=function(t,e,r){return i.add(t,e,r)};e.copyFile=function(t,e,r){if(!l(t,e))return{err:(0,s.makeError)(s.fsErrorType.NO_SUCH_FILE,"Source file does not exist")};var n=o.getPathParent(r);if(!(0,a.hasDirectory)(t,n))return{err:(0,s.makeError)(s.fsErrorType.NO_SUCH_DIRECTORY,"Destination directory does not exist")};if((0,a.hasDirectory)(t,r)){var i=o.getLastPathPart(e);r="/"===r?"/".concat(i):"".concat(r,"/").concat(i)}return{fs:t.set(r,t.get(e))}};e.deleteFile=function(t,e){return(0,a.hasDirectory)(t,e)?{err:(0,s.makeError)(s.fsErrorType.IS_A_DIRECTORY)}:l(t,e)?i.remove(t,e):{err:(0,s.makeError)(s.fsErrorType.NO_SUCH_FILE)}}},"./src/fs/util/file-util.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makeDirectory=e.makeFile=e.isDirectory=e.isFile=void 0;var n=r("./node_modules/immutable/dist/immutable.es.js");function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){u(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function u(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}e.isFile=function(t){return t.has("content")};e.isDirectory=function(t){return!t.has("content")};e.makeFile=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.fromJS)(i({content:t},e))};e.makeDirectory=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,n.fromJS)(i({},t))}},"./src/fs/util/glob-util.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.captureGlobPaths=e.globPaths=e.globSeq=e.glob=void 0;var n=u(r("./node_modules/minimatch/minimatch.js")),o=u(r("./node_modules/minimatch-capture/index.js")),i=r("./node_modules/immutable/dist/immutable.es.js");function u(t){return t&&t.__esModule?t:{default:t}}var a={dot:!0};e.glob=function(t,e){return(0,n.default)(t,e,a)};var s=function(t,e){return t.filter((function(t){return(0,n.default)(t,e,a)}))};e.globSeq=s;e.globPaths=function(t,e){return s(t.keySeq(),e)};e.captureGlobPaths=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t){return!0};return t.keySeq().reduce((function(t,n){if(r(n)){var i=(0,o.default)(n,e,a);if(i)return t.concat(i)}return t}),(0,i.List)())}},"./src/fs/util/path-util.js":function(t,e,r){"use strict";function n(t){return function(t){if(Array.isArray(t))return u(t)}(t)||a(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t){return function(t){if(Array.isArray(t))return t}(t)||a(t)||i(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.toAbsolutePath=e.splitFilePath=e.getLastPathPart=e.getPathParent=e.getPathBreadCrumbs=e.toPath=e.toPathParts=e.isAbsPath=e.removeTrailingSeparator=e.isTrailingPath=void 0;e.isTrailingPath=function(t){return t.endsWith("/")&&"/"!==t};var s=function(t){return t.endsWith("/")&&"/"!==t?t.slice(0,-1):t};e.removeTrailingSeparator=s;var c=function(t){return t.startsWith("/")};e.isAbsPath=c;var f=function(t){if("/"===t)return["/"];var e=(t=s(t)).split("/");if(c(t)){var r=o(e).slice(1);return["/"].concat(n(r))}return e};e.toPathParts=f;var l=function(t){if("/"===t[0]){var e=o(t).slice(1);return"/".concat(e.join("/"))}return t.join("/")};e.toPath=l;e.getPathBreadCrumbs=function(t){var e=f(t);if(e.length<=1)return["/"];var r=o(e),i=r[1];return r.slice(2).reduce((function(t,e){var r=t[t.length-1];return[].concat(n(t),["".concat(r,"/").concat(e)])}),["/","/".concat(i)])};var p=function(t){if("/"===t)return"/";var e=f(t).slice(0,-1);return l(e)};e.getPathParent=p;var h=function(t){var e=f(t);return e[e.length-1]};e.getLastPathPart=h;e.splitFilePath=function(t){return{dirPath:p(t),fileName:h(t)}};e.toAbsolutePath=function(t,e){t=s(t);var r,n,o=c(t)?[]:f(e),u=function(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=i(t))){var e=0,r=function(){};return{s:r,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,u=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return u=t.done,t},e:function(t){a=!0,o=t},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw o}}}}(f(t));try{for(u.s();!(r=u.n()).done;){var a=r.value;".."===a?(1!==(n=o).length||"/"!==n[0])&&o.pop():"."!==a&&o.push(a)}}catch(t){u.e(t)}finally{u.f()}return l(o)}},"./src/fs/util/permission-util.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.canModifyPath=void 0;var o=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=i();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var a=o?Object.getOwnPropertyDescriptor(t,u):null;a&&(a.get||a.set)?Object.defineProperty(r,u,a):r[u]=t[u]}r.default=t,e&&e.set(t,r);return r}(r("./src/fs/util/path-util.js"));function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}function u(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t))){var e=0,r=function(){};return{s:r,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,i=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return i=t.done,t},e:function(t){u=!0,o=t},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var s=function(t,e){var r=t.get(e,null);if(r&&!r.get("canModify",!0))return!1;return!0};e.canModifyPath=function(t,e){var r,n=u(o.getPathBreadCrumbs(e));try{for(n.s();!(r=n.n()).done;){var i=r.value;if(!s(t,i))return!1}}catch(t){n.e(t)}finally{n.f()}return!0}},"./src/index.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Emulator",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"HistoryKeyboardPlugin",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"EmulatorState",{enumerable:!0,get:function(){return i.EmulatorState}}),Object.defineProperty(e,"CommandMapping",{enumerable:!0,get:function(){return i.CommandMapping}}),Object.defineProperty(e,"EnvironmentVariables",{enumerable:!0,get:function(){return i.EnvironmentVariables}}),Object.defineProperty(e,"FileSystem",{enumerable:!0,get:function(){return i.FileSystem}}),Object.defineProperty(e,"History",{enumerable:!0,get:function(){return i.History}}),Object.defineProperty(e,"Outputs",{enumerable:!0,get:function(){return i.Outputs}}),Object.defineProperty(e,"OutputFactory",{enumerable:!0,get:function(){return u.OutputFactory}}),Object.defineProperty(e,"OutputType",{enumerable:!0,get:function(){return u.OutputType}}),Object.defineProperty(e,"DirOp",{enumerable:!0,get:function(){return a.DirOp}}),Object.defineProperty(e,"FileOp",{enumerable:!0,get:function(){return a.FileOp}}),Object.defineProperty(e,"OptionParser",{enumerable:!0,get:function(){return s.OptionParser}}),Object.defineProperty(e,"defaultCommandMapping",{enumerable:!0,get:function(){return c.default}});var n=f(r("./src/emulator/index.js")),o=f(r("./src/emulator/plugins/HistoryKeyboardPlugin.js")),i=r("./src/emulator-state/index.js"),u=r("./src/emulator-output/index.js"),a=r("./src/fs/index.js"),s=r("./src/parser/index.js"),c=f(r("./src/commands/index.js"));function f(t){return t&&t.__esModule?t:{default:t}}},"./src/parser/command-parser.js":function(t,e,r){"use strict";function n(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.parseCommands=void 0;var i=function(t){return t.split(/&&|;/).map((function(t){return function(t){return(e=t,e.trim().replace(/\s\s+/g," ")).split(/\s/);var e}(t)})).map((function(t){var e=n(t);return{commandName:e[0],commandOptions:e.slice(1)}}))};e.parseCommands=i;var u=i;e.default=u},"./src/parser/index.js":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={OptionParser:function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var a=i?Object.getOwnPropertyDescriptor(t,u):null;a&&(a.get||a.set)?Object.defineProperty(r,u,a):r[u]=t[u]}r.default=t,e&&e.set(t,r);return r}(r("./src/parser/option-parser.js"))};e.default=i,t.exports=e.default},"./src/parser/option-parser.js":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.parseOptions=void 0;var n,o=(n=r("./node_modules/get-options/index.js"))&&n.__esModule?n:{default:n};var i=function(t,e){return(0,o.default)(t,e,{noAliasPropagation:"first-only"})};e.parseOptions=i;var u=i;e.default=u},0:function(t,e,r){t.exports=r("./src/index.js")}})}));
//# sourceMappingURL=terminal.min.js.map