vendor/jot.js in jot-ruby-js-0.1.3 vs vendor/jot.js in jot-ruby-js-0.1.4

- old
+ new

@@ -1,93 +2 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=24)}([function(e,t,n){n(1),n(4);t.BaseOperation=function(){},t.add_op=function(e,t,n){e.prototype.type=[t.module_name,n],"op_map"in t||(t.op_map={}),t.op_map[n]=e};var r=n(3),o=n(15),i=n(6),a=n(5),s=n(14);t.NO_OP=r.NO_OP,t.SET=r.SET,t.MATH=r.MATH,t.PATCH=o.PATCH,t.SPLICE=o.SPLICE,t.ATINDEX=o.ATINDEX,t.MAP=o.MAP,t.PUT=i.PUT,t.REM=i.REM,t.APPLY=i.APPLY,t.LIST=a.LIST,t.COPY=s.COPY,t.diff=n(12).diff,t.BaseOperation.prototype.isNoOp=function(){return this instanceof r.NO_OP},t.BaseOperation.prototype.visit=function(e){return e(this)||this},t.BaseOperation.prototype.toJSON=function(e,t){var n={};if(void 0===t)t=1,n._ver=t;else if(1!==t)throw new Error("Invalid protocol version: "+t);return n._type=this.type[0]+"."+this.type[1],this.internalToJSON(n,t),n},t.opFromJSON=function(e,t,n){if("object"!=typeof e)throw new Error("Not an operation.");if(void 0===t){if(1!==(t=e._ver))throw new Error("JOT serialized data structure is missing protocol version and one wasn't provided as an argument.")}else{if(1!==t)throw new Error("Invalid protocol version provided: "+t);if("_ver"in e)throw new Error("JOT serialized data structure should not have protocol version because it was provided as an argument.")}if(!n){function u(e){for(var t in n[e.module_name]={},e.op_map)n[e.module_name][t]=e.op_map[t]}n={},u(r),u(o),u(i),u(a),u(s)}if("string"!=typeof e._type)throw new Error("Not an operation.");var f=e._type.split(/\./g,2);if(2!=f.length)throw new Error("Not an operation.");return n[f[0]][f[1]].internalFromJSON(e,t,n)},t.BaseOperation.prototype.serialize=function(){return JSON.stringify(this)},t.deserialize=function(e){return t.opFromJSON(JSON.parse(e))},t.BaseOperation.prototype.compose=function(e){if(!(e instanceof t.BaseOperation))throw new Error("Argument must be an operation.");if(this instanceof r.NO_OP)return e;if(e instanceof r.NO_OP)return this;if(e instanceof r.SET)return e;if(this.atomic_compose){var n=this.atomic_compose(e);if(null!=n)return n}return new a.LIST([this,e]).simplify()},t.BaseOperation.prototype.rebase=function(e,t,n){for(var o=0;o<(null!=this.rebase_functions?this.rebase_functions.length:0);o++){if(e instanceof this.rebase_functions[o][0])if(null!=(i=this.rebase_functions[o][1].call(this,e,t))&&null!=i[0])return n&&n("rebase",this,"on",e,t?"conflictless":"","document"in t?JSON.stringify(t.document):"","=>",i[0]),i[0]}for(o=0;o<(null!=e.rebase_functions?e.rebase_functions.length:0);o++){var i;if(this instanceof e.rebase_functions[o][0])if(null!=(i=e.rebase_functions[o][1].call(e,this,t))&&null!=i[1])return n&&n("rebase",this,"on",e,t?"conflictless":"","document"in t?JSON.stringify(t.document):"","=>",i[0]),i[1]}if(this instanceof a.LIST||e instanceof a.LIST){var u=a.rebase(e,this,t,n);return n&&n("rebase",this,"on",e,"=>",u),u}if(t){if(e instanceof s.COPY&&void 0!==t.document)return e.clone_operation(this,t.document);if(this instanceof r.SET)return n&&n("rebase",this,"on",e,"=>",this),this;if(e instanceof r.SET)return n&&n("rebase",this,"on",e,"=>",new r.NO_OP),new r.NO_OP;throw new Error("Rebase failed between "+this.inspect()+" and "+e.inspect()+".")}return null},t.createRandomValue=function(e){var n=[];if(n.push(null),n.push(!1),n.push(!0),n.push(1e3*Math.floor(Math.random()-.5)),n.push(Math.random()-.5),n.push(1e3*(Math.random()-.5)),n.push(Math.random().toString(36).substring(7)),Math.random()<Math.exp(-(e||0))){for(var r=Math.floor(Math.exp(3*Math.random()))-1,o=[];o.length<r;)o.push(t.createRandomValue((e||0)+1));n.push(o)}if(Math.random()<Math.exp(-(e||0))){r=Math.floor(Math.exp(2.5*Math.random()))-1;for(var i={};Object.keys(i).length<r;)i[Math.random().toString(36).substring(7)]=t.createRandomValue((e||0)+1);n.push(i)}return n[Math.floor(Math.random()*n.length)]},t.createRandomOp=function(e,t){var n=[];return n.push(r),"string"==typeof e||Array.isArray(e)?(n.push(o),n.push(s)):"object"==typeof e&&null!==e&&(n.push(i),n.push(s)),n[Math.floor(Math.random()*n.length)].createRandomOp(e,t)},t.createRandomOpSequence=function(e,n){for(var r=[];r.length<n;){var o=t.createRandomOp(e);try{e=o.apply(e)}catch(e){continue}r.push(o)}return new a.LIST(r)},t.type_name=function(e){return"object"==typeof e?Array.isArray(e)?"array":"object":typeof e},t.cmp=function(e,n){if(e===n)return 0;if(e===i.MISSING)return-1;if(n===i.MISSING)return 1;if(t.type_name(e)!=t.type_name(n))return t.cmp(t.type_name(e),t.type_name(n));if("number"==typeof e)return e<n?-1:e>n?1:0;if("string"==typeof e)return e.localeCompare(n);if(Array.isArray(e)){var r=t.cmp(e.length,n.length);if(0!=r)return r;for(var o=0;o<e.length;o++)if(0!=(r=t.cmp(e[o],n[o])))return r;return 0}return JSON.stringify(e).localeCompare(JSON.stringify(n))}},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,a=String(e).replace(o,function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),u=r[n];n<i;u=r[++n])g(u)||!O(u)?a+=" "+u:a+=" "+s(u);return a},t.deprecate=function(n,o){if(v(e.process))return function(){return t.deprecate(n,o).apply(this,arguments)};if(!0===r.noDeprecation)return n;var i=!1;return function(){if(!i){if(r.throwDeprecation)throw new Error(o);r.traceDeprecation?console.trace(o):console.error(o),i=!0}return n.apply(this,arguments)}};var i,a={};function s(e,n){var r={seen:[],stylize:f};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&t._extend(r,n),v(r.showHidden)&&(r.showHidden=!1),v(r.depth)&&(r.depth=2),v(r.colors)&&(r.colors=!1),v(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),p(r,e,r.depth)}function u(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function f(e,t){return e}function p(e,n,r){if(e.customInspect&&n&&_(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return m(o)||(o=p(e,o,r)),o}var i=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(m(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(y(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(i)return i;var a=Object.keys(n),s=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),P(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(n);if(0===a.length){if(_(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(w(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(b(n))return e.stylize(Date.prototype.toString.call(n),"date");if(P(n))return l(n)}var f,O="",A=!1,T=["{","}"];(h(n)&&(A=!0,T=["[","]"]),_(n))&&(O=" [Function"+(n.name?": "+n.name:"")+"]");return w(n)&&(O=" "+RegExp.prototype.toString.call(n)),b(n)&&(O=" "+Date.prototype.toUTCString.call(n)),P(n)&&(O=" "+l(n)),0!==a.length||A&&0!=n.length?r<0?w(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),f=A?function(e,t,n,r,o){for(var i=[],a=0,s=t.length;a<s;++a)M(t,String(a))?i.push(c(e,t,n,r,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(c(e,t,n,r,o,!0))}),i}(e,n,r,s,a):a.map(function(t){return c(e,n,r,s,t,A)}),e.seen.pop(),function(e,t,n){if(e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(f,O,T)):T[0]+O+T[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function c(e,t,n,r,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),M(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(u.value)<0?(s=g(n)?p(e,u.value,null):p(e,u.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),v(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function h(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return"number"==typeof e}function m(e){return"string"==typeof e}function v(e){return void 0===e}function w(e){return O(e)&&"[object RegExp]"===A(e)}function O(e){return"object"==typeof e&&null!==e}function b(e){return O(e)&&"[object Date]"===A(e)}function P(e){return O(e)&&("[object Error]"===A(e)||e instanceof Error)}function _(e){return"function"==typeof e}function A(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(v(i)&&(i=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var n=r.pid;a[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else a[e]=function(){};return a[e]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=w,t.isObject=O,t.isDate=b,t.isError=P,t.isFunction=_,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(22);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",function(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),S[e.getMonth()],t].join(" ")}(),t.format.apply(t,arguments))},t.inherits=n(21),t._extend=function(e,t){if(!t||!O(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(8),n(23))},function(e,t,n){var r=Array.prototype.slice,o=n(17),i=n(16),a=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:function(e,t,n){var f,p;if(s(e)||s(t))return!1;if(e.prototype!==t.prototype)return!1;if(i(e))return!!i(t)&&(e=r.call(e),t=r.call(t),a(e,t,n));if(u(e)){if(!u(t))return!1;if(e.length!==t.length)return!1;for(f=0;f<e.length;f++)if(e[f]!==t[f])return!1;return!0}try{var l=o(e),c=o(t)}catch(e){return!1}if(l.length!=c.length)return!1;for(l.sort(),c.sort(),f=l.length-1;f>=0;f--)if(l[f]!=c[f])return!1;for(f=l.length-1;f>=0;f--)if(p=l[f],!a(e[p],t[p],n))return!1;return typeof e==typeof t}(e,t,n))};function s(e){return null===e||void 0===e}function u(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(e.length>0&&"number"!=typeof e[0]))}},function(e,t,n){var r=n(1),o=n(2),i=n(0),a=n(6).MISSING;t.module_name="values",t.NO_OP=function(){Object.freeze(this)},t.NO_OP.prototype=Object.create(i.BaseOperation.prototype),i.add_op(t.NO_OP,t,"NO_OP"),t.SET=function(e){this.value=e,Object.freeze(this)},t.SET.prototype=Object.create(i.BaseOperation.prototype),i.add_op(t.SET,t,"SET"),t.MATH=function(e,t){if(this.operator=e,this.operand=t,("add"==this.operator||"mult"==this.operator)&&"number"!=typeof this.operand)throw new Error("MATH[add] and MATH[mult]'s operand must be a number.");if(("and"==this.operator||"or"==this.operator||"xor"==this.operator)&&!Number.isInteger(this.operand)&&"boolean"!=typeof this.operand)throw new Error("MATH[and] and MATH[or] and MATH[xor]'s operand must be a boolean or integer.");if("not"==this.operator&&null!==this.operand)throw new Error("MATH[not]'s operand must be null --- it is not used.");if("rot"==this.operator){if(!Array.isArray(this.operand)||2!=this.operand.length||!Number.isInteger(this.operand[0])||!Number.isInteger(this.operand[1]))throw new Error("MATH[rot] operand must be an array with two integer elements.");if(this.operand[1]<=1)throw new Error("MATH[rot]'s second operand, the modulus, must be greater than one.");if(this.operand[0]>=Math.abs(this.operand[1]))throw new Error("MATH[rot]'s first operand, the increment, must be less than its second operand, the modulus.")}Object.freeze(this)},t.MATH.prototype=Object.create(i.BaseOperation.prototype),i.add_op(t.MATH,t,"MATH"),t.NO_OP.prototype.inspect=function(e){return"<NO_OP>"},t.NO_OP.prototype.internalToJSON=function(e,t){},t.NO_OP.internalFromJSON=function(e,n,r){return new t.NO_OP},t.NO_OP.prototype.apply=function(e){return e},t.NO_OP.prototype.simplify=function(){return this},t.NO_OP.prototype.drilldown=function(e){return new values.NO_OP},t.NO_OP.prototype.inverse=function(e){return this},t.NO_OP.prototype.atomic_compose=function(e){return e},t.NO_OP.prototype.rebase_functions=[[i.BaseOperation,function(e,t){return[this,e]}]],t.NO_OP.prototype.get_length_change=function(e){return 0},t.NO_OP.prototype.decompose=function(e,t){return[this,this]},t.SET.prototype.inspect=function(e){return r.format("<SET %s>",function(e){return e===a?"~":r.format("%j",e)}(this.value))},t.SET.prototype.internalToJSON=function(e,t){this.value===a?e.value_missing=!0:e.value=this.value},t.SET.internalFromJSON=function(e,n,r){return e.value_missing?new t.SET(a):new t.SET(e.value)},t.SET.prototype.apply=function(e){return this.value},t.SET.prototype.simplify=function(){return this},t.SET.prototype.drilldown=function(e){if("object"==typeof this.value&&Array.isArray(this.value)){if(!Number.isInteger(e)||e<0)throw new Error("Cannot drilldown() on array with non-negative-integer ("+typeof e+").");return e>=this.value.length?new t.SET(a):new t.SET(this.value[e])}if("object"==typeof this.value&&!Array.isArray(this.value)){if("string"!=typeof e)throw new Error("Cannot drilldown() on object with non-string ("+typeof e+").");return e in this.value?new t.SET(this.value[e]):new t.SET(a)}throw new Error("Cannot drilldown() because document data type changed to "+typeof this.value+".")},t.SET.prototype.inverse=function(e){return new t.SET(e)},t.SET.prototype.atomic_compose=function(e){return new t.SET(e.apply(this.value)).simplify()},t.SET.prototype.rebase_functions=[[t.SET,function(e,n){return o(this.value,e.value,{strict:!0})?[new t.NO_OP,new t.NO_OP]:n&&i.cmp(this.value,e.value)<0?[new t.NO_OP,new t.SET(e.value)]:null}],[t.MATH,function(e,n){return[this,new t.NO_OP]}]],t.SET.prototype.get_length_change=function(e){if("string"==typeof this.value||Array.isArray(this.value))return this.value.length-e;throw new Error("not applicable: new value is of type "+typeof this.value)},t.SET.prototype.decompose=function(e,n){if("string"!=typeof this.value&&!Array.isArray(this.value))throw new Error("invalid value type for call");return e?[new t.SET(this.value.slice(0,n)),new t.SET(this.value.slice(n))]:[new t.SET(this.value.slice(0,0)),this]},t.MATH.prototype.inspect=function(e){return r.format("<MATH %s:%s>",this.operator,"number"!=typeof this.operand||"and"!=this.operator&&"or"!=this.operator&&"xor"!=this.operator?r.format("%j",this.operand):"0x"+this.operand.toString(16))},t.MATH.prototype.internalToJSON=function(e,t){e.operator=this.operator,e.operand=this.operand},t.MATH.internalFromJSON=function(e,n,r){return new t.MATH(e.operator,e.operand)},t.MATH.prototype.apply=function(e){if("number"==typeof e){if("add"==this.operator)return e+this.operand;if("mult"==this.operator)return e*this.operand;if(Number.isInteger(e)){if("rot"==this.operator)return(e+this.operand[0])%this.operand[1];if("and"==this.operator)return e&this.operand;if("or"==this.operator)return e|this.operand;if("xor"==this.operator)return e^this.operand;if("not"==this.operator)return~e}throw new Error("MATH operator "+this.operator+" cannot apply to "+e+".")}if("boolean"==typeof e){if("and"==this.operator)return e&&this.operand;if("or"==this.operator)return e||this.operand;if("xor"==this.operator)return!!(e^this.operand);if("not"==this.operator)return!e;throw new Error("MATH operator "+this.operator+" does not apply to boolean values.")}throw new Error("MATH operations only apply to number and boolean values, not "+i.type_name(e)+".")},t.MATH.prototype.simplify=function(){return"add"==this.operator&&0==this.operand?new t.NO_OP:"rot"==this.operator&&0==this.operand[0]?new t.NO_OP:"mult"==this.operator&&1==this.operand?new t.NO_OP:"and"==this.operator&&0===this.operand?new t.SET(0):"and"==this.operator&&!1===this.operand?new t.SET(!1):"or"==this.operator&&0===this.operand?new t.NO_OP:"or"==this.operator&&!1===this.operand?new t.NO_OP:"xor"==this.operator&&0==this.operand?new t.NO_OP:this},t.MATH.prototype.drilldown=function(e){throw new Error("Cannot drilldown() because document data type changed (MATH operation implies the wrong data type).")},t.MATH.prototype.inverse=function(e){return"add"==this.operator?new t.MATH("add",-this.operand):"rot"==this.operator?new t.MATH("rot",[-this.operand[0],this.operand[1]]):"mult"==this.operator?new t.MATH("mult",1/this.operand):"and"==this.operator?new t.MATH("or",e&~this.operand):"or"==this.operator?new t.MATH("xor",~e&this.operand):"xor"==this.operator?this:"not"==this.operator?this:void 0},t.MATH.prototype.atomic_compose=function(e){if(e instanceof t.MATH){if(this.operator==e.operator&&"add"==this.operator)return new t.MATH("add",this.operand+e.operand).simplify();if(this.operator==e.operator&&"rot"==this.operator&&this.operand[1]==e.operand[1])return new t.MATH("rot",[this.operand[0]+e.operand[0],this.operand[1]]).simplify();if(this.operator==e.operator&&"mult"==this.operator)return new t.MATH("mult",this.operand*e.operand).simplify();if(this.operator==e.operator&&"and"==this.operator&&typeof this.operand==typeof e.operand&&"number"==typeof this.operand)return new t.MATH("and",this.operand&e.operand).simplify();if(this.operator==e.operator&&"and"==this.operator&&typeof this.operand==typeof e.operand&&"boolean"==typeof this.operand)return new t.MATH("and",this.operand&&e.operand).simplify();if(this.operator==e.operator&&"or"==this.operator&&typeof this.operand==typeof e.operand&&"number"==typeof this.operand)return new t.MATH("or",this.operand|e.operand).simplify();if(this.operator==e.operator&&"or"==this.operator&&typeof this.operand==typeof e.operand&&"boolean"==typeof this.operand)return new t.MATH("or",this.operand||e.operand).simplify();if(this.operator==e.operator&&"xor"==this.operator&&typeof this.operand==typeof e.operand&&"number"==typeof this.operand)return new t.MATH("xor",this.operand^e.operand).simplify();if(this.operator==e.operator&&"xor"==this.operator&&typeof this.operand==typeof e.operand&&"boolean"==typeof this.operand)return new t.MATH("xor",!!(this.operand^e.operand)).simplify();if(this.operator==e.operator&&"not"==this.operator)return new t.NO_OP;if("and"==this.operator&&"or"==e.operator&&this.operand===e.operand)return new t.SET(this.operand);if("or"==this.operator&&"xor"==e.operator&&this.operand===e.operand&&"number"==typeof this.operand)return new t.MATH("and",~this.operand);if("or"==this.operator&&"xor"==e.operator&&this.operand===e.operand&&"boolean"==typeof this.operand)return new t.MATH("and",!this.operand)}return null},t.MATH.prototype.rebase_functions=[[t.MATH,function(e,n){return this.operator!=e.operator||"rot"==this.operator&&this.operand[1]!=e.operand[1]?n&&"document"in n&&i.cmp([this.operator,this.operand],[e.operator,e.operand])<0?[new t.SET(this.compose(e).apply(n.document)),e]:null:[this,e]}]],t.createRandomOp=function(e,n){var r=[];if(r.push(function(){return new t.NO_OP}),r.push(function(){return new t.SET(e)}),"string-elem"!=n&&"string"!=n&&r.push(function(){return new t.SET(i.createRandomValue())}),"object"==n&&r.push(function(){return new t.SET(a)}),"boolean"==typeof e&&r.push(function(){return new t.SET(!e)}),"number"==typeof e&&(Number.isInteger(e)?r.push(function(){return new t.SET(e+Math.floor(100*(Math.random()+.5)))}):r.push(function(){return new t.SET(e*(Math.random()+.5))})),("string"==typeof e||Array.isArray(e))&&"string-elem"!=n){if(e.length>0&&r.push(function(){return new t.SET(e.slice(0,0))}),e.length>=1&&(r.push(function(){return new t.SET(e.slice(Math.floor(Math.random()*(e.length-1)),e.length))}),r.push(function(){return new t.SET(e.slice(0,Math.floor(Math.random()*(e.length-1))))})),e.length>=2){var o=Math.floor(Math.random()*e.length-1),s=Math.floor(Math.random()*(e.length-o));r.push(function(){return new t.SET(e.slice(o,o+s))})}if(e.length>0){function u(e,t){return e instanceof String?e+t:e.concat(t)}r.push(function(){return new t.SET(u(e.slice(0,1+Math.floor(Math.random()*(e.length-1))),e))}),r.push(function(){return new t.SET(u(e,e.slice(0,1+Math.floor(Math.random()*(e.length-1)))))}),r.push(function(){return new t.SET(function(e,t,n){return e instanceof String?e+t+n:e.concat(t).concat(n)}(e.slice(0,1+Math.floor(Math.random()*(e.length-1))),e,e.slice(0,1+Math.floor(Math.random()*(e.length-1)))))})}else"string"==typeof e?r.push(function(){return new t.SET((Math.random()+"").slice(2))}):Array.isArray(e)&&r.push(function(){return new t.SET([null,null,null].map(function(){return Math.random()}))})}if("string"==typeof e&&(e!=e.split("").reverse().join("")&&r.push(function(){return new t.SET(e.split("").reverse().join(""))}),e.length>0)){for(var f="",p=0;p<e.length;p++)f+=(Math.random()+"").slice(2,3);r.push(function(){return new t.SET(f)})}return"number"==typeof e&&(Number.isInteger(e)?(r.push(function(){return new t.MATH("add",Math.floor(100*(Math.random()-.25)))}),r.push(function(){return new t.MATH("mult",Math.floor(Math.exp(Math.random()+.5)))}),e>1&&r.push(function(){return new t.MATH("rot",[1,Math.min(13,e)])}),r.push(function(){return new t.MATH("and",241)}),r.push(function(){return new t.MATH("or",241)}),r.push(function(){return new t.MATH("xor",241)}),r.push(function(){return new t.MATH("not",null)})):(r.push(function(){return new t.MATH("add",100*(Math.random()-.25))}),r.push(function(){return new t.MATH("mult",Math.exp(Math.random()+.5))}))),"boolean"==typeof e&&(r.push(function(){return new t.MATH("and",!0)}),r.push(function(){return new t.MATH("and",!1)}),r.push(function(){return new t.MATH("or",!0)}),r.push(function(){return new t.MATH("or",!1)}),r.push(function(){return new t.MATH("xor",!0)}),r.push(function(){return new t.MATH("xor",!1)}),r.push(function(){return new t.MATH("not",null)})),r[Math.floor(Math.random()*r.length)]()}},function(e,t,n){"use strict"; -/*! - * shallow-clone <https://github.com/jonschlinkert/shallow-clone> - * - * Copyright (c) 2015-2017, Jon Schlinkert. - * Released under the MIT License. - */var r=n(7),o=n(20),i=n(18);function a(e){var t=i(e);return a.hasOwnProperty(t)?a[t](e):e}a.array=function(e){return e.slice()},a.date=function(e){return new Date(+e)},a.object=function(e){return r(e)?o({},e):e},a.regexp=function(e){var t="";return t+=e.multiline?"m":"",t+=e.global?"g":"",t+=e.ignorecase?"i":"",new RegExp(e.source,t)},e.exports=a},function(e,t,n){var r=n(1),o=n(4),i=n(0),a=n(3);t.module_name="lists",t.LIST=function(e){if(!Array.isArray(e))throw new Error("Argument must be an array.");e.forEach(function(e){if(!(e instanceof i.BaseOperation))throw new Error("Argument must be an array containing operations (found "+e+").")}),this.ops=e,Object.freeze(this)},t.LIST.prototype=Object.create(i.BaseOperation.prototype),i.add_op(t.LIST,t,"LIST"),t.LIST.prototype.inspect=function(e){return r.format("<LIST [%s]>",this.ops.map(function(t){return t.inspect(e-1)}).join(", "))},t.LIST.prototype.visit=function(e){var n=new t.LIST(this.ops.map(function(t){return t.visit(e)}));return e(n)||n},t.LIST.prototype.internalToJSON=function(e,t){e.ops=this.ops.map(function(e){return e.toJSON(void 0,t)})},t.LIST.internalFromJSON=function(e,n,r){var o=e.ops.map(function(e){return i.opFromJSON(e,n,r)});return new t.LIST(o)},t.LIST.prototype.apply=function(e){for(var t=0;t<this.ops.length;t++)e=this.ops[t].apply(e);return e},t.LIST.prototype.simplify=function(e){for(var n=[],r=0;r<this.ops.length;r++){var o=this.ops[r];for(o=o.simplify();n.length>0&&!o.isNoOp();){var i=n[n.length-1].atomic_compose(o);if(!i)break;n.pop(),o=i}o.isNoOp()||n.push(o)}return 0==n.length?new a.NO_OP:1==n.length?n[0]:new t.LIST(n)},t.LIST.prototype.inverse=function(e){var n=[];return this.ops.forEach(function(t){n.push(t.inverse(e)),e=t.apply(e)}),n.reverse(),new t.LIST(n)},t.LIST.prototype.atomic_compose=function(e){if(0==this.ops.length)return e;if(e instanceof t.LIST)return 0==e.ops.length?this:new t.LIST(this.ops.concat(e.ops));var n=this.ops.slice();return n.push(e),new t.LIST(n)},t.rebase=function(e,n,r,s){e=e.simplify(),n=n.simplify();var u=function e(t,n,r,s){if(0==n.length||0==t.length)return n;if(1==n.length&&1==t.length){var u=n[0].rebase(t[0],r,s);return u?u instanceof i.NO_OP?[]:u instanceof i.LIST?u.ops:[u]:null}if(s){s("rebasing",n,"on",t,r?"conflictless":"","document"in r?JSON.stringify(r.document):"","...");var f=s;s=function(){var e=[">"].concat(Array.from(arguments));f.apply(null,e)}}if(1==t.length){if(t[0]instanceof a.NO_OP)return n;var p=n.slice(0,1),l=n.slice(1),c=e(t,p,r,s);if(null==c)return null;var h=e(p,t,r,s);if(null==h)return null;var d=null;r&&"document"in(d=o(r))&&(d.document=p[0].apply(d.document));var g=e(h,l,d,s);return null==g?null:c.concat(g)}r=r?o(r):null;for(var y=0;y<t.length;y++){if(null==(n=e([t[y]],n,r,s)))return null;r&&"document"in r&&(r.document=t[y].apply(r.document))}return n}(e=e instanceof t.LIST?e.ops:[e],n=n instanceof t.LIST?n.ops:[n],r,s);return null==u?null:0==u.length?new a.NO_OP:1==u.length?u[0]:new t.LIST(u).simplify()},t.LIST.prototype.drilldown=function(e){return new t.LIST(this.ops.map(function(t){return t.drilldown(e)})).simplify()},t.createRandomOp=function(e,n){for(var r=[];0==r.length||Math.random()<.75;)r.push(i.createRandomOp(e,n)),e=r[r.length-1].apply(e);return new t.LIST(r)}},function(e,t,n){var r=n(1),o=(n(2),n(4)),i=n(0),a=n(3);n(5).LIST;t.module_name="objects",t.APPLY=function(){if(1==arguments.length&&"object"==typeof arguments[0])this.ops=arguments[0];else{if(2!=arguments.length||"string"!=typeof arguments[0])throw new Error("invalid arguments");this.ops={},this.ops[arguments[0]]=arguments[1]}Object.freeze(this),Object.freeze(this.ops)},t.APPLY.prototype=Object.create(i.BaseOperation.prototype),i.add_op(t.APPLY,t,"APPLY"),t.MISSING=new Object,Object.freeze(t.MISSING),t.PUT=function(e,n){t.APPLY.apply(this,[e,new a.SET(n)])},t.PUT.prototype=Object.create(t.APPLY.prototype),t.REM=function(e){t.APPLY.apply(this,[e,new a.SET(t.MISSING)])},t.REM.prototype=Object.create(t.APPLY.prototype),t.APPLY.prototype.inspect=function(e){var t=[],n=this.ops;return Object.keys(n).forEach(function(o){t.push(r.format("%j:%s",o,n[o].inspect(e-1)))}),r.format("<APPLY %s>",t.join(", "))},t.APPLY.prototype.visit=function(e){var n={};for(var r in this.ops)n[r]=this.ops[r].visit(e);var o=new t.APPLY(n);return e(o)||o},t.APPLY.prototype.internalToJSON=function(e,t){for(var n in e.ops={},this.ops)e.ops[n]=this.ops[n].toJSON(void 0,t)},t.APPLY.internalFromJSON=function(e,n,r){var o={};for(var a in e.ops)o[a]=i.opFromJSON(e.ops[a],n,r);return new t.APPLY(o)},t.APPLY.prototype.apply=function(e){var n={};for(var r in e)n[r]=e[r];for(var o in this.ops){var i=this.ops[o].apply(n[o],[n,o]);i===t.MISSING?delete n[o]:n[o]=i}return n},t.APPLY.prototype.simplify=function(){var e={},n=!1;for(var r in this.ops)e[r]=this.ops[r].simplify(),e[r]instanceof a.NO_OP?delete e[r]:n=!0;return n?new t.APPLY(e):new a.NO_OP},t.APPLY.prototype.inverse=function(e){var n={};for(var r in this.ops)n[r]=this.ops[r].inverse(r in e?e[r]:t.MISSING);return new t.APPLY(n)},t.APPLY.prototype.atomic_compose=function(e){if(e instanceof t.APPLY){var n=o(this.ops);for(var r in e.ops)if(r in n){var i=n[r].compose(e.ops[r]);i instanceof a.NO_OP?delete n[r]:n[r]=i}else n[r]=e.ops[r];return new t.APPLY(n).simplify()}return null},t.APPLY.prototype.rebase_functions=[[t.APPLY,function(e,n){function r(e){if(!(n&&"document"in n))return n;var r=o(n);return e in n.document?r.document=n.document[e]:r.document=t.MISSING,r}var i={};for(var a in this.ops)if(i[a]=this.ops[a],a in e.ops&&(i[a]=i[a].rebase(e.ops[a],r(a))),null===i[a])return null;var s={};for(var a in e.ops)if(s[a]=e.ops[a],a in this.ops&&(s[a]=s[a].rebase(this.ops[a],r(a))),null===s[a])return null;return[new t.APPLY(i).simplify(),new t.APPLY(s).simplify()]}]],t.APPLY.prototype.drilldown=function(e){if("string"!=typeof e)throw new Error("Cannot drilldown() on object with non-string ("+typeof e+").");return e in this.ops?this.ops[e]:new a.NO_OP},t.createRandomOp=function(e,n){var r=[];return r.push(function(){return new t.PUT("k"+Math.floor(1e3*Math.random()),i.createRandomValue())}),Object.keys(e).forEach(function(t){r.push(function(){return i.createRandomOp(e[t],"object")})}),r[Math.floor(Math.random()*r.length)]()}},function(e,t,n){"use strict"; -/*! - * is-extendable <https://github.com/jonschlinkert/is-extendable> - * - * Copyright (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */e.exports=function(e){return void 0!==e&&null!==e&&("object"==typeof e||"function"==typeof e)}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";e.exports=Object.assign||function(e,t){for(var n,r,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){n=arguments[i],r=Object.keys(Object(n));for(var a=0;a<r.length;a++)o[r[a]]=n[r[a]]}return o}},function(e,t,n){"use strict";e.exports=function(e,t,n){n=n||o;var a=e.length,s=t.length,u=a+s,f={},p=[];f[1]=0;for(var l=0;l<=u;l+=1){for(var c=-l;c<=l;c+=2){var h,d;for(h=c===-l||c!==l&&f[c-1]<f[c+1]?f[c+1]:f[c-1]+1,d=h-c;h<a&&d<s&&n(e[h],t[d]);)h+=1,d+=1;if(f[c]=h,h>=a&&d>=s)return p[l]=r({},f),i(p,e,t)}p[l]=r({},f)}throw Error("Unreachable diff path reached")};var r=n(9);function o(e,t){return e===t}function i(e,t,n){for(var r=[],o={x:t.length,y:n.length},i=e.length-1;o.x>0||o.y>0;i-=1){for(var s=e[i],u=o.x-o.y,f=s[u],p=u===-i||u!==i&&s[u-1]<s[u+1],l=p?u+1:u-1,c=s[l],h=c-l,d=p?c:c+1;f>d;)a(r,t[f-1],!1,!1),f-=1;if(h<0)break;p?a(r,n[h],!0,!1):a(r,t[c],!1,!0),o.x=c,o.y=h}return r.reverse()}function a(e,t,n,r){var o=e[e.length-1];o&&o.added===n&&o.removed===r?o.items.unshift(t):e.push({items:[t],added:n,removed:r})}},function(e,t,n){ -/*! - - diff v3.5.0 - -Software License Agreement (BSD License) - -Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com> - -All rights reserved. - -Redistribution and use of this software in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -* Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - -* Neither the name of Kevin Decker nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@license -*/ -!function(t,n){e.exports=n()}(0,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";t.__esModule=!0,t.canonicalize=t.convertChangesToXML=t.convertChangesToDMP=t.merge=t.parsePatch=t.applyPatches=t.applyPatch=t.createPatch=t.createTwoFilesPatch=t.structuredPatch=t.diffArrays=t.diffJson=t.diffCss=t.diffSentences=t.diffTrimmedLines=t.diffLines=t.diffWordsWithSpace=t.diffWords=t.diffChars=t.Diff=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=n(2),i=n(3),a=n(5),s=n(6),u=n(7),f=n(8),p=n(9),l=n(10),c=n(11),h=n(13),d=n(14),g=n(16),y=n(17);t.Diff=r.default,t.diffChars=o.diffChars,t.diffWords=i.diffWords,t.diffWordsWithSpace=i.diffWordsWithSpace,t.diffLines=a.diffLines,t.diffTrimmedLines=a.diffTrimmedLines,t.diffSentences=s.diffSentences,t.diffCss=u.diffCss,t.diffJson=f.diffJson,t.diffArrays=p.diffArrays,t.structuredPatch=d.structuredPatch,t.createTwoFilesPatch=d.createTwoFilesPatch,t.createPatch=d.createPatch,t.applyPatch=l.applyPatch,t.applyPatches=l.applyPatches,t.parsePatch=c.parsePatch,t.merge=h.merge,t.convertChangesToDMP=g.convertChangesToDMP,t.convertChangesToXML=y.convertChangesToXML,t.canonicalize=f.canonicalize},function(e,t){"use strict";function n(){}function r(e,t,n,r,o){for(var i=0,a=t.length,s=0,u=0;i<a;i++){var f=t[i];if(f.removed){if(f.value=e.join(r.slice(u,u+f.count)),u+=f.count,i&&t[i-1].added){var p=t[i-1];t[i-1]=t[i],t[i]=p}}else{if(!f.added&&o){var l=n.slice(s,s+f.count);l=l.map(function(e,t){var n=r[u+t];return n.length>e.length?n:e}),f.value=e.join(l)}else f.value=e.join(n.slice(s,s+f.count));s+=f.count,f.added||(u+=f.count)}}var c=t[a-1];return a>1&&"string"==typeof c.value&&(c.added||c.removed)&&e.equals("",c.value)&&(t[a-2].value+=c.value,t.pop()),t}function o(e){return{newPos:e.newPos,components:e.components.slice(0)}}t.__esModule=!0,t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.callback;"function"==typeof n&&(i=n,n={}),this.options=n;var a=this;function s(e){return i?(setTimeout(function(){i(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var u=(t=this.removeEmpty(this.tokenize(t))).length,f=e.length,p=1,l=u+f,c=[{newPos:-1,components:[]}],h=this.extractCommon(c[0],t,e,0);if(c[0].newPos+1>=u&&h+1>=f)return s([{value:this.join(t),count:t.length}]);function d(){for(var n=-1*p;n<=p;n+=2){var i=void 0,l=c[n-1],h=c[n+1],d=(h?h.newPos:0)-n;l&&(c[n-1]=void 0);var g=l&&l.newPos+1<u,y=h&&0<=d&&d<f;if(g||y){if(!g||y&&l.newPos<h.newPos?(i=o(h),a.pushComponent(i.components,void 0,!0)):((i=l).newPos++,a.pushComponent(i.components,!0,void 0)),d=a.extractCommon(i,t,e,n),i.newPos+1>=u&&d+1>=f)return s(r(a,i.components,t,e,a.useLongestToken));c[n]=i}else c[n]=void 0}p++}if(i)!function e(){setTimeout(function(){if(p>l)return i();d()||e()},0)}();else for(;p<=l;){var g=d();if(g)return g}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,i=n.length,a=e.newPos,s=a-r,u=0;a+1<o&&s+1<i&&this.equals(t[a+1],n[s+1]);)a++,s++,u++;return u&&e.components.push({count:u}),e.newPos=a,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},function(e,t,n){"use strict";t.__esModule=!0,t.characterDiff=void 0,t.diffChars=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1));var o=t.characterDiff=new r.default},function(e,t,n){"use strict";t.__esModule=!0,t.wordDiff=void 0,t.diffWords=function(e,t,n){return n=(0,o.generateOptions)(n,{ignoreWhitespace:!0}),s.diff(e,t,n)},t.diffWordsWithSpace=function(e,t,n){return s.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=n(4);var i=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,a=/\S/,s=t.wordDiff=new r.default;s.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!a.test(e)&&!a.test(t)},s.tokenize=function(e){for(var t=e.split(/(\s+|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&i.test(t[n])&&i.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t}},function(e,t){"use strict";t.__esModule=!0,t.generateOptions=function(e,t){if("function"==typeof e)t.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}},function(e,t,n){"use strict";t.__esModule=!0,t.lineDiff=void 0,t.diffLines=function(e,t,n){return i.diff(e,t,n)},t.diffTrimmedLines=function(e,t,n){var r=(0,o.generateOptions)(n,{ignoreWhitespace:!0});return i.diff(e,t,r)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=n(4);var i=t.lineDiff=new r.default;i.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t}},function(e,t,n){"use strict";t.__esModule=!0,t.sentenceDiff=void 0,t.diffSentences=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1));var o=t.sentenceDiff=new r.default;o.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)}},function(e,t,n){"use strict";t.__esModule=!0,t.cssDiff=void 0,t.diffCss=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1));var o=t.cssDiff=new r.default;o.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)}},function(e,t,n){"use strict";t.__esModule=!0,t.jsonDiff=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.diffJson=function(e,t,n){return s.diff(e,t,n)},t.canonicalize=u;var o=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),i=n(5);var a=Object.prototype.toString,s=t.jsonDiff=new o.default;function u(e,t,n,o,i){t=t||[],n=n||[],o&&(e=o(i,e));var s=void 0;for(s=0;s<t.length;s+=1)if(t[s]===e)return n[s];var f=void 0;if("[object Array]"===a.call(e)){for(t.push(e),f=new Array(e.length),n.push(f),s=0;s<e.length;s+=1)f[s]=u(e[s],t,n,o,i);return t.pop(),n.pop(),f}if(e&&e.toJSON&&(e=e.toJSON()),"object"===(void 0===e?"undefined":r(e))&&null!==e){t.push(e),f={},n.push(f);var p=[],l=void 0;for(l in e)e.hasOwnProperty(l)&&p.push(l);for(p.sort(),s=0;s<p.length;s+=1)f[l=p[s]]=u(e[l],t,n,o,l);t.pop(),n.pop()}else f=e;return f}s.useLongestToken=!0,s.tokenize=i.lineDiff.tokenize,s.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=void 0===r?function(e,t){return void 0===t?n:t}:r;return"string"==typeof e?e:JSON.stringify(u(e,null,null,o),o," ")},s.equals=function(e,t){return o.default.prototype.equals.call(s,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))}},function(e,t,n){"use strict";t.__esModule=!0,t.arrayDiff=void 0,t.diffArrays=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1));var o=t.arrayDiff=new r.default;o.tokenize=function(e){return e.slice()},o.join=o.removeEmpty=function(e){return e}},function(e,t,n){"use strict";t.__esModule=!0,t.applyPatch=i,t.applyPatches=function(e,t){"string"==typeof e&&(e=(0,r.parsePatch)(e));var n=0;!function r(){var o=e[n++];if(!o)return t.complete();t.loadFile(o,function(e,n){if(e)return t.complete(e);var a=i(n,o,t);t.patched(o,a,function(e){if(e)return t.complete(e);r()})})}()};var r=n(11),o=function(e){return e&&e.__esModule?e:{default:e}}(n(12));function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t&&(t=(0,r.parsePatch)(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}var i=e.split(/\r\n|[\n\v\f\r\x85]/),a=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],s=t.hunks,u=n.compareLine||function(e,t,n,r){return t===r},f=0,p=n.fuzzFactor||0,l=0,c=0,h=void 0,d=void 0;function g(e,t){for(var n=0;n<e.lines.length;n++){var r=e.lines[n],o=r.length>0?r[0]:" ",a=r.length>0?r.substr(1):r;if(" "===o||"-"===o){if(!u(t+1,i[t],o,a)&&++f>p)return!1;t++}}return!0}for(var y=0;y<s.length;y++){for(var m=s[y],v=i.length-m.oldLines,w=0,O=c+m.oldStart-1,b=(0,o.default)(O,l,v);void 0!==w;w=b())if(g(m,O+w)){m.offset=c+=w;break}if(void 0===w)return!1;l=m.offset+m.oldStart+m.oldLines}for(var P=0,_=0;_<s.length;_++){var A=s[_],T=A.oldStart+A.offset+P-1;P+=A.newLines-A.oldLines,T<0&&(T=0);for(var S=0;S<A.lines.length;S++){var M=A.lines[S],E=M.length>0?M[0]:" ",N=M.length>0?M.substr(1):M,k=A.linedelimiters[S];if(" "===E)T++;else if("-"===E)i.splice(T,1),a.splice(T,1);else if("+"===E)i.splice(T,0,N),a.splice(T,0,k),T++;else if("\\"===E){var j=A.lines[S-1]?A.lines[S-1][0]:null;"+"===j?h=!0:"-"===j&&(d=!0)}}}if(h)for(;!i[i.length-1];)i.pop(),a.pop();else d&&(i.push(""),a.push("\n"));for(var x=0;x<i.length-1;x++)i[x]=i[x]+a[x];return i.join("")}},function(e,t){"use strict";t.__esModule=!0,t.parsePatch=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),r=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],o=[],i=0;function a(){var e={};for(o.push(e);i<n.length;){var r=n[i];if(/^(\-\-\-|\+\+\+|@@)\s/.test(r))break;var a=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(r);a&&(e.index=a[1]),i++}for(s(e),s(e),e.hunks=[];i<n.length;){var f=n[i];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(f))break;if(/^@@/.test(f))e.hunks.push(u());else{if(f&&t.strict)throw new Error("Unknown line "+(i+1)+" "+JSON.stringify(f));i++}}}function s(e){var t=/^(---|\+\+\+)\s+(.*)$/.exec(n[i]);if(t){var r="---"===t[1]?"old":"new",o=t[2].split("\t",2),a=o[0].replace(/\\\\/g,"\\");/^".*"$/.test(a)&&(a=a.substr(1,a.length-2)),e[r+"FileName"]=a,e[r+"Header"]=(o[1]||"").trim(),i++}}function u(){for(var e=i,o=n[i++],a=o.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),s={oldStart:+a[1],oldLines:+a[2]||1,newStart:+a[3],newLines:+a[4]||1,lines:[],linedelimiters:[]},u=0,f=0;i<n.length&&!(0===n[i].indexOf("--- ")&&i+2<n.length&&0===n[i+1].indexOf("+++ ")&&0===n[i+2].indexOf("@@"));i++){var p=0==n[i].length&&i!=n.length-1?" ":n[i][0];if("+"!==p&&"-"!==p&&" "!==p&&"\\"!==p)break;s.lines.push(n[i]),s.linedelimiters.push(r[i]||"\n"),"+"===p?u++:"-"===p?f++:" "===p&&(u++,f++)}if(u||1!==s.newLines||(s.newLines=0),f||1!==s.oldLines||(s.oldLines=0),t.strict){if(u!==s.newLines)throw new Error("Added line count did not match for hunk at line "+(e+1));if(f!==s.oldLines)throw new Error("Removed line count did not match for hunk at line "+(e+1))}return s}for(;i<n.length;)a();return o}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t,n){var r=!0,o=!1,i=!1,a=1;return function s(){if(r&&!i){if(o?a++:r=!1,e+a<=n)return a;i=!0}if(!o)return i||(r=!0),t<=e-a?-a++:(o=!0,s())}}},function(e,t,n){"use strict";t.__esModule=!0,t.calcLineCount=s,t.merge=function(e,t,n){e=u(e,n),t=u(t,n);var r={};(e.index||t.index)&&(r.index=e.index||t.index);(e.newFileName||t.newFileName)&&(f(e)?f(t)?(r.oldFileName=p(r,e.oldFileName,t.oldFileName),r.newFileName=p(r,e.newFileName,t.newFileName),r.oldHeader=p(r,e.oldHeader,t.oldHeader),r.newHeader=p(r,e.newHeader,t.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=t.oldFileName||e.oldFileName,r.newFileName=t.newFileName||e.newFileName,r.oldHeader=t.oldHeader||e.oldHeader,r.newHeader=t.newHeader||e.newHeader));r.hunks=[];var o=0,i=0,a=0,s=0;for(;o<e.hunks.length||i<t.hunks.length;){var d=e.hunks[o]||{oldStart:1/0},g=t.hunks[i]||{oldStart:1/0};if(l(d,g))r.hunks.push(c(d,a)),o++,s+=d.newLines-d.oldLines;else if(l(g,d))r.hunks.push(c(g,s)),i++,a+=g.newLines-g.oldLines;else{var y={oldStart:Math.min(d.oldStart,g.oldStart),oldLines:0,newStart:Math.min(d.newStart+a,g.oldStart+s),newLines:0,lines:[]};h(y,d.oldStart,d.lines,g.oldStart,g.lines),i++,o++,r.hunks.push(y)}}return r};var r=n(14),o=n(11),i=n(15);function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function s(e){var t=function e(t){var n=0;var r=0;t.forEach(function(t){if("string"!=typeof t){var o=e(t.mine),i=e(t.theirs);void 0!==n&&(o.oldLines===i.oldLines?n+=o.oldLines:n=void 0),void 0!==r&&(o.newLines===i.newLines?r+=o.newLines:r=void 0)}else void 0===r||"+"!==t[0]&&" "!==t[0]||r++,void 0===n||"-"!==t[0]&&" "!==t[0]||n++});return{oldLines:n,newLines:r}}(e.lines),n=t.oldLines,r=t.newLines;void 0!==n?e.oldLines=n:delete e.oldLines,void 0!==r?e.newLines=r:delete e.newLines}function u(e,t){if("string"==typeof e){if(/^@@/m.test(e)||/^Index:/m.test(e))return(0,o.parsePatch)(e)[0];if(!t)throw new Error("Must provide a base reference or pass in a patch");return(0,r.structuredPatch)(void 0,void 0,t,e)}return e}function f(e){return e.newFileName&&e.newFileName!==e.oldFileName}function p(e,t,n){return t===n?t:(e.conflict=!0,{mine:t,theirs:n})}function l(e,t){return e.oldStart<t.oldStart&&e.oldStart+e.oldLines<t.oldStart}function c(e,t){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+t,newLines:e.newLines,lines:e.lines}}function h(e,t,n,r,o){var i={offset:t,lines:n,index:0},u={offset:r,lines:o,index:0};for(m(e,i,u),m(e,u,i);i.index<i.lines.length&&u.index<u.lines.length;){var f=i.lines[i.index],p=u.lines[u.index];if("-"!==f[0]&&"+"!==f[0]||"-"!==p[0]&&"+"!==p[0])if("+"===f[0]&&" "===p[0]){var l;(l=e.lines).push.apply(l,a(w(i)))}else if("+"===p[0]&&" "===f[0]){var c;(c=e.lines).push.apply(c,a(w(u)))}else"-"===f[0]&&" "===p[0]?g(e,i,u):"-"===p[0]&&" "===f[0]?g(e,u,i,!0):f===p?(e.lines.push(f),i.index++,u.index++):y(e,w(i),w(u));else d(e,i,u)}v(e,i),v(e,u),s(e)}function d(e,t,n){var r=w(t),o=w(n);if(O(r)&&O(o)){var s,u;if((0,i.arrayStartsWith)(r,o)&&b(n,r,r.length-o.length))return void(s=e.lines).push.apply(s,a(r));if((0,i.arrayStartsWith)(o,r)&&b(t,o,o.length-r.length))return void(u=e.lines).push.apply(u,a(o))}else if((0,i.arrayEqual)(r,o)){var f;return void(f=e.lines).push.apply(f,a(r))}y(e,r,o)}function g(e,t,n,r){var o,i=w(t),s=function(e,t){var n=[],r=[],o=0,i=!1,a=!1;for(;o<t.length&&e.index<e.lines.length;){var s=e.lines[e.index],u=t[o];if("+"===u[0])break;if(i=i||" "!==s[0],r.push(u),o++,"+"===s[0])for(a=!0;"+"===s[0];)n.push(s),s=e.lines[++e.index];u.substr(1)===s.substr(1)?(n.push(s),e.index++):a=!0}"+"===(t[o]||"")[0]&&i&&(a=!0);if(a)return n;for(;o<t.length;)r.push(t[o++]);return{merged:r,changes:n}}(n,i);s.merged?(o=e.lines).push.apply(o,a(s.merged)):y(e,r?s:i,r?i:s)}function y(e,t,n){e.conflict=!0,e.lines.push({conflict:!0,mine:t,theirs:n})}function m(e,t,n){for(;t.offset<n.offset&&t.index<t.lines.length;){var r=t.lines[t.index++];e.lines.push(r),t.offset++}}function v(e,t){for(;t.index<t.lines.length;){var n=t.lines[t.index++];e.lines.push(n)}}function w(e){for(var t=[],n=e.lines[e.index][0];e.index<e.lines.length;){var r=e.lines[e.index];if("-"===n&&"+"===r[0]&&(n="+"),n!==r[0])break;t.push(r),e.index++}return t}function O(e){return e.reduce(function(e,t){return e&&"-"===t[0]},!0)}function b(e,t,n){for(var r=0;r<n;r++){var o=t[t.length-n+r].substr(1);if(e.lines[e.index+r]!==" "+o)return!1}return e.index+=n,!0}},function(e,t,n){"use strict";t.__esModule=!0,t.structuredPatch=i,t.createTwoFilesPatch=a,t.createPatch=function(e,t,n,r,o,i){return a(e,e,t,n,r,o,i)};var r=n(5);function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t,n,i,a,s,u){u||(u={}),void 0===u.context&&(u.context=4);var f=(0,r.diffLines)(n,i,u);function p(e){return e.map(function(e){return" "+e})}f.push({value:"",lines:[]});for(var l=[],c=0,h=0,d=[],g=1,y=1,m=function(e){var t=f[e],r=t.lines||t.value.replace(/\n$/,"").split("\n");if(t.lines=r,t.added||t.removed){var a;if(!c){var s=f[e-1];c=g,h=y,s&&(d=u.context>0?p(s.lines.slice(-u.context)):[],c-=d.length,h-=d.length)}(a=d).push.apply(a,o(r.map(function(e){return(t.added?"+":"-")+e}))),t.added?y+=r.length:g+=r.length}else{if(c)if(r.length<=2*u.context&&e<f.length-2){var m;(m=d).push.apply(m,o(p(r)))}else{var v,w=Math.min(r.length,u.context);(v=d).push.apply(v,o(p(r.slice(0,w))));var O={oldStart:c,oldLines:g-c+w,newStart:h,newLines:y-h+w,lines:d};if(e>=f.length-2&&r.length<=u.context){var b=/\n$/.test(n),P=/\n$/.test(i);0!=r.length||b?b&&P||d.push("\\ No newline at end of file"):d.splice(O.oldLines,0,"\\ No newline at end of file")}l.push(O),c=0,h=0,d=[]}g+=r.length,y+=r.length}},v=0;v<f.length;v++)m(v);return{oldFileName:e,newFileName:t,oldHeader:a,newHeader:s,hunks:l}}function a(e,t,n,r,o,a,s){var u=i(e,t,n,r,o,a,s),f=[];e==t&&f.push("Index: "+e),f.push("==================================================================="),f.push("--- "+u.oldFileName+(void 0===u.oldHeader?"":"\t"+u.oldHeader)),f.push("+++ "+u.newFileName+(void 0===u.newHeader?"":"\t"+u.newHeader));for(var p=0;p<u.hunks.length;p++){var l=u.hunks[p];f.push("@@ -"+l.oldStart+","+l.oldLines+" +"+l.newStart+","+l.newLines+" @@"),f.push.apply(f,l.lines)}return f.join("\n")+"\n"}},function(e,t){"use strict";function n(e,t){if(t.length>e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}t.__esModule=!0,t.arrayEqual=function(e,t){if(e.length!==t.length)return!1;return n(e,t)},t.arrayStartsWith=n},function(e,t){"use strict";t.__esModule=!0,t.convertChangesToDMP=function(e){for(var t=[],n=void 0,r=void 0,o=0;o<e.length;o++)n=e[o],r=n.added?1:n.removed?-1:0,t.push([r,n.value]);return t}},function(e,t){"use strict";function n(e){var t=e;return t=(t=(t=(t=t.replace(/&/g,"&amp;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;")).replace(/"/g,"&quot;")}t.__esModule=!0,t.convertChangesToXML=function(e){for(var t=[],r=0;r<e.length;r++){var o=e[r];o.added?t.push("<ins>"):o.removed&&t.push("<del>"),t.push(n(o.value)),o.added?t.push("</ins>"):o.removed&&t.push("</del>")}return t.join("")}}])})},function(e,t,n){var r=n(2),o=n(0);function i(e,t,a){function s(e){if(void 0===e)throw new Error("Illegal argument: undefined passed to diff");if(null===e)return"null";if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return typeof e;if(Array.isArray(e))return"array";if("object"!=typeof e)throw new Error("Illegal argument: "+typeof e+" passed to diff");return"object"}var u=s(e),f=s(t);return r(e,t,{strict:!0})?{op:new o.NO_OP,pct:0,size:JSON.stringify(e).length}:"string"==u&&"string"==f?function(e,t,r){var i=n(11),a="Chars";r.words&&(a="Words");r.lines&&(a="Lines");r.sentences&&(a="Sentences");var s=0,u=0,f=0,p=i["diff"+a](e,t).map(function(e){if(s+=e.value.length,e.added||e.removed){u+=e.value.length;var t=0,n="";e.removed&&(t=e.value.length),e.added&&(n=e.value);var r={offset:f,length:t,op:new o.SET(n)};return f=0,r}return f+=e.value.length,null}).filter(function(e){return null!=e});return{op:new o.PATCH(p).simplify(),pct:(u+1)/(s+1),size:s}}(e,t,a):"array"==u&&"array"==f?function(e,t,r){var a=n(10),s=e.map(function(e,t){return t}),u=t.map(function(e,t){return t}),f=[],p=0,l=0,c=0;return function n(s,u,h){var d=[],g=0,y=0;a(s,u,function(n,o){return i(e[n],t[o],r).pct<=h}).forEach(function(e){if(e.removed||e.added)0!=d.length&&"equal"!=d[d.length-1].type||d.push({type:"unequal",ai:[],bi:[]}),e.added?(d[d.length-1].bi=d[d.length-1].bi.concat(e.items),y+=e.items.length):e.removed&&(d[d.length-1].ai=d[d.length-1].ai.concat(e.items),g+=e.items.length);else{if(g+e.items.length>s.length)throw new Error("out of range");if(y+e.items.length>u.length)throw new Error("out of range");d.push({type:"equal",ai:s.slice(g,g+e.items.length),bi:u.slice(y,y+e.items.length)}),g+=e.items.length,y+=e.items.length}}),d.forEach(function(a){if(h<1&&a.ai.length>0&&a.bi.length>0&&(h>0||"unequal"==a.type))n(a.ai,a.bi,(h+1.1)/2);else{if(a.ai.length!=a.bi.length){var s=new o.SPLICE(c,a.ai.length,a.bi.map(function(e){return t[e]}));f.push(s);var u=JSON.stringify(a.ai.map(function(t){return e[t]}))+JSON.stringify(a.bi.map(function(e){return t[e]}));u=u.length/2,p+=u,l+=u}else for(var d=0;d<a.ai.length;d++){var g=i(e[a.ai[d]],t[a.bi[d]],r);g.op.isNoOp()||f.push(new o.ATINDEX(a.bi[d],g.op)),p+=g.size,l+=g.size*g.pct}c+=a.bi.length}})}(s,u,0),{op:new o.LIST(f).simplify(),pct:(l+1)/(p+1),size:p}}(e,t,a):"object"==u&&"object"==f?function(e,t,n){var r=[],a=0,s=0;for(var u in e)u in t&&(d=i(e[u],t[u],n),d.op.isNoOp()||r.push(new o.APPLY(u,d.op)),a+=d.size,s+=d.size*d.pct);var f=[],p={},l={};for(var u in f.sort(function(e,t){return e.diff.pct*e.diff.size-t.diff.pct*t.diff.size}),f.forEach(function(e){e.a_key in p||e.b_key in l||(p[e.a_key]=1,l[e.b_key]=1,r.push(new o.REN(e.a_key,e.b_key)),e.diff.op.isNoOp()||r.push(new o.APPLY(e.b_key,e.diff.op)),a+=e.diff.size,s+=e.diff.size*e.diff.pct)}),e)u in t||u in p||r.push(new o.REM(u));for(var u in t)u in e||u in l||r.push(new o.PUT(u,t[u]));return{op:new o.LIST(r).simplify(),pct:(s+1)/(a+1),size:a}}(e,t,a):{op:new o.SET(t),pct:1,size:(JSON.stringify(e)+JSON.stringify(t)).length/2}}t.diff=function(e,t,n){return i(e,t,n=n||{}).op}},function(e,t,n){ -/* @preserve - * JSONPatch.js - * - * A Dharmafly project written by Thomas Parslow - * <tom@almostobsolete.net> and released with the kind permission of - * NetDev. - * - * Copyright 2011-2013 Thomas Parslow. All rights reserved. - * Permission is hereby granted,y free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - * - * Implements the JSON Patch IETF RFC 6902 as specified at: - * - * http://tools.ietf.org/html/rfc6902 - * - * Also implements the JSON Pointer IETF RFC 6901 as specified at: - * - * http://tools.ietf.org/html/rfc6901 - * - */ -!function(e){var t,n,r,o;function i(e){Error.call(this,e),this.message=e}function a(e){Error.call(this,e),this.message=e}function s(e,t){!function(e){var t,n;if(!e.op)throw new i("Operation missing!");if(!r.hasOwnProperty(e.op))throw new i("Invalid operation!");if(!("path"in e))throw new i("Path missing!");for(n=r[e.op],t=0;t<n.length;t++)if(!(n[t]in e))throw new i(e.op+" must have key "+n[t])}(e);var s=e.op,u=new n(e.path),f=e.value,p=e.from?new n(e.from):null;switch(s){case"add":return function(e){return u.add(e,f,t)};case"remove":return function(e){return u.remove(e,t)};case"replace":return function(e){return u.replace(e,f,t)};case"move":if(u.subsetOf(p))throw new i("destination must not be a child of source");return function(e){var n=p.get(e),r=p.remove(e,t);return u.add(r,n,t)};case"copy":return function(e){var n=p.get(e);return u.add(e,n,t)};case"test":return function(e){if(!function e(t,n){var r;if(t===n)return!0;if(typeof t!=typeof n)return!1;if("object"!=typeof t)return!1;var i=o(t),a=o(n);if(i!==a)return!1;if(!i){for(r in t)if(Object.hasOwnProperty(t,r)&&(!Object.hasOwnProperty(n,r)||!e(t[r],n[r])))return!1;for(r in n)if(Object.hasOwnProperty(n,r)&&!Object.hasOwnProperty(t,r))return!1;return!0}if(t.length!=n.length)return!1;for(var s=0;s<t.length;s++)return e(t[s],n[s])}(u.get(e),f))throw new a("Test operation failed. Value did not match.");return e}}}o=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)},e.apply_patch=function(e,n){return new t(n).apply(e)},e.InvalidPatch=i,i.prototype=new Error,e.PatchApplyError=a,a.prototype=new Error,e.JSONPointer=n=function(e){var t,n,r=[];if(""!==(n=e.split("/"))[0])throw new i("JSONPointer must start with a slash (or be an empty string)!");for(t=1;t<n.length;t++)r[t-1]=n[t].replace(/~1/g,"/").replace(/~0/g,"~");this.path=r,this.length=r.length},n.prototype._get_segment=function(e,t){var n=this.path[e];if(o(t))if("-"===n)n=t.length;else{if(!n.match(/^[0-9]*$/))throw new a("Expected a number to segment an array");n=parseInt(n,10)}return n},n.prototype._action=function(e,t,n){var r=this;return function e(i,s){var u,f;if(n||(i=function(e){var t,n;if(o(e))return e.slice();if(null===e)return e;if("object"==typeof e){for(n in t={},e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return e}(i)),u=r._get_segment(s,i),s==r.path.length-1)i=t(i,u);else{if(o(i)){if(i.length<=u)throw new a("Path not found in document")}else{if("object"!=typeof i)throw new a("Path not found in document");if(!Object.hasOwnProperty.call(i,u))throw new a("Path not found in document")}f=e(i[u],s+1),n||(i[u]=f)}return i}(e,0)},n.prototype.add=function(e,t,n){return 0===this.length?t:this._action(e,function(e,n){if(o(e)){if(n>e.length)throw new a("Add operation must not attempt to create a sparse array!");e.splice(n,0,t)}else e[n]=t;return e},n)},n.prototype.remove=function(e,t){if(0!==this.length)return this._action(e,function(e,t){if(!Object.hasOwnProperty.call(e,t))throw new a("Remove operation must point to an existing value!");return o(e)?e.splice(t,1):delete e[t],e},t)},n.prototype.replace=function(e,t,n){return 0===this.length?t:this._action(e,function(e,n){if(!Object.hasOwnProperty.call(e,n))throw new a("Replace operation must point to an existing value!");return o(e)?e.splice(n,1,t):e[n]=t,e},n)},n.prototype.get=function(e){var t;return 0===this.length?e:(this._action(e,function(e,n){if(!Object.hasOwnProperty.call(e,n))throw new a("Path not found in document");return t=e[n],e},!0),t)},n.prototype.subsetOf=function(e){if(this.length<=e.length)return!1;for(var t=0;t<e.length;t++)if(e.path[t]!==this.path[t])return!1;return!0},r={add:["value"],replace:["value"],test:["value"],remove:[],move:["from"],copy:["from"]},e.JSONPatch=t=function(e,t){this._compile(e,t)},t.prototype._compile=function(e,t){var n;if(this.compiledOps=[],"string"==typeof e&&(e=JSON.parse(e)),!o(e))throw new i("Patch must be an array of operations");for(n=0;n<e.length;n++){var r=s(e[n],t);this.compiledOps.push(r)}},e.JSONPatch.prototype.apply=function(e){var t;for(t=0;t<this.compiledOps.length;t++)e=this.compiledOps[t](e);return e}}(e.exports)},function(e,t,n){var r=n(1),o=n(0),i=n(13).JSONPointer;function a(e){return e.path.map(function(e){return"/"+e.replace(/~/g,"~0").replace(/\//g,"~1")}).join("")}function s(e,t){for(var n=[],r=0;r<e.length;r++){var o=e.path[r];Array.isArray(t)&&(o=parseInt(o)),n.push(o),t=t[o]}return n}function u(e,t,n){for(var r=s(e,t),i=r.length-1;i>=0;)n="string"==typeof r[i]?new o.APPLY(r[i],n):new o.ATINDEX(r[i],n),i--;return n}function f(e){var t=[];if("string"==typeof e||Array.isArray(e)){if(0==e.length)return t;var n=Math.floor(Math.random()*e.length);t.push(""+n);try{Math.random()<.5&&"string"!=typeof e&&(t=t.concat(f(e[n])))}catch(e){}}else{if("object"!=typeof e||null===e)throw new Error("COPY cannot apply to this document type: "+e);var r=Object.keys(e);if(0==r.length)return t;var o=r[Math.floor(Math.random()*r.length)];t.push(o);try{Math.random()<.5&&(t=t.concat(f(e[o])))}catch(e){}}return t}t.module_name="copies",t.COPY=function(e){if(console.log(e),!Array.isArray(e))throw new Error("argument must be a list");this.pathpairs=e.map(function(e){if(!Array.isArray(e)||2!=e.length)throw new Error("each element in pathpairs must be an array of two string elements");if(e[0]instanceof i&&e[1]instanceof i)return e;if("string"!=typeof e[0]||"string"!=typeof e[1])throw new Error("each element in pathpairs must be an array of two strings");if(e[0]==e[1])throw new Error("can't copy a path to itself");return[new i(e[0]),new i(e[1])]}),Object.freeze(this)},t.COPY.prototype=Object.create(o.BaseOperation.prototype),o.add_op(t.COPY,t,"COPY"),t.COPY.prototype.inspect=function(e){return r.format("<COPY %s>",this.pathpairs.map(function(e){return a(e[0])+" => "+a(e[1])}).join(", "))},t.COPY.prototype.visit=function(e){return e(this)||this},t.COPY.prototype.internalToJSON=function(e,t){e.pathpairs=this.pathpairs.map(function(e){return[a(e[0]),a(e[1])]})},t.COPY.internalFromJSON=function(e,n,r){return new t.COPY(e.pathpairs)},t.COPY.prototype.apply=function(e){return this.pathpairs.forEach(function(t){var n=t[0].get(e);e=t[1].replace(e,n)}),e},t.COPY.prototype.simplify=function(e){return this},t.COPY.prototype.inverse=function(e){return new o.LIST(this.pathpairs.map(function(t){return u(t[1],e,new o.SET(t[1].get(e)))}))},t.COPY.prototype.atomic_compose=function(e){if(e instanceof t.COPY)return new t.COPY(this.pathpairs.concat(e.pathpairs)).simplify()},t.rebase=function(e,t,n,r){},t.COPY.prototype.clone_operation=function(e,t){var n=[e];return this.pathpairs.forEach(function(r){var o=function(e,t,n){for(var r=s(e,t),o=0;o<r.length;o++)n=n.drilldown(r[o]);return n}(r[0],t,e);o.isNoOp()||n.push(u(r[1],t,o))}),new o.LIST(n).simplify()},t.COPY.prototype.drilldown=function(e){throw"hmm"},t.createRandomOp=function(e,n){for(var r=[];;){var o=[a({path:f(e)}),a({path:f(e)})];if(o[0]!=o[1]&&r.push(o),Math.random()<.5)break}return new t.COPY(r)}},function(e,t,n){var r=n(1),o=n(2),i=n(4),a=n(0),s=n(3);n(5).LIST;function u(e,t){return"string"==typeof e?e.charAt(t):e[t]}function f(e,t){return e instanceof String?e+t:e.concat(t)}function p(e,n,r){function o(e){return{old_index:0,old_hunks:e.hunks.slice(),dx_index:0,new_hunks:[],empty:function(){return 0==this.old_hunks.length},take:function(e,t){var n=this.old_hunks.shift();this.new_hunks.push({offset:n.offset+this.dx_index,length:n.length+(n.dlength||0),op:n.op}),this.dx_index=0,this.old_index+=n.offset+n.length,t||(e.dx_index+=n.op.get_length_change(n.length))},skip:function(){this.old_index=this.end(),this.old_hunks.shift()},start:function(){return this.old_index+this.old_hunks[0].offset},end:function(){var e=this.old_hunks[0];return this.old_index+e.offset+e.length}}}for(var s=o(e),u=o(n);!s.empty()||!u.empty();)if(u.empty())s.take(u);else if(s.empty())u.take(s);else if(s.start()!=u.start()||0!=s.old_hunks[0].length||0!=u.old_hunks[0].length)if(s.end()<=u.start())s.take(u);else if(u.end()<=s.start())u.take(s);else{var f=u.start()-s.start(),p=u.end()-s.end();if(0!=f||0!=p){if(!r)return null;if(f>0){var l=(c=s.old_hunks.shift()).op.decompose(!1,f);s.old_hunks.unshift({offset:0,length:c.length-f,op:l[1]}),s.old_hunks.unshift({offset:c.offset,length:f,op:l[0]}),s.take(u)}else if(f<0){l=(c=u.old_hunks.shift()).op.decompose(!1,-f);u.old_hunks.unshift({offset:0,length:c.length+f,op:l[1]}),u.old_hunks.unshift({offset:c.offset,length:-f,op:l[0]}),u.take(s)}else if(p<0){l=(c=s.old_hunks.shift()).op.decompose(!1,c.length+p);s.old_hunks.unshift({offset:0,length:-p,op:l[1]}),s.old_hunks.unshift({offset:c.offset,length:c.length+p,op:l[0]})}else{if(!(p>0))throw new Error("We thought this line was not reachable.");var c;l=(c=u.old_hunks.shift()).op.decompose(!1,c.length-p);u.old_hunks.unshift({offset:0,length:p,op:l[1]}),u.old_hunks.unshift({offset:c.offset,length:c.length-p,op:l[0]})}}else{var h=r?i(r):null;h&&"document"in h&&(h.document=h.document.slice(s.start(),s.end()));var d=s.old_hunks[0].op.rebase(u.old_hunks[0].op,h),g=u.old_hunks[0].op.rebase(s.old_hunks[0].op,h);if(null==d||null==g)return null;s.old_hunks[0]={offset:s.old_hunks[0].offset,length:s.old_hunks[0].length,dlength:u.old_hunks[0].op.get_length_change(u.old_hunks[0].length),op:d},u.old_hunks[0]={offset:u.old_hunks[0].offset,length:u.old_hunks[0].length,dlength:s.old_hunks[0].op.get_length_change(s.old_hunks[0].length),op:g},s.take(u,!0),u.take(s,!0)}}else{if(!r)return null;a.cmp(s.old_hunks[0].op,u.old_hunks[0].op)<0?s.take(u):u.take(s)}return[new t.PATCH(s.new_hunks).simplify(),new t.PATCH(u.new_hunks).simplify()]}t.module_name="sequences",t.PATCH=function(){if("__hmm__"!==arguments[0]){if(1!=arguments.length)throw new Error("Invaid Argument");if(this.hunks=arguments[0],!Array.isArray(this.hunks))throw new Error("Invaid Argument");this.hunks.forEach(function(e){if("number"!=typeof e.offset)throw new Error("Invalid Argument (hunk offset not a number)");if(e.offset<0)throw new Error("Invalid Argument (hunk offset is negative)");if("number"!=typeof e.length)throw new Error("Invalid Argument (hunk length is not a number)");if(e.length<0)throw new Error("Invalid Argument (hunk length is negative)");if(!(e.op instanceof a.BaseOperation))throw new Error("Invalid Argument (hunk operation is not an operation)");if("function"!=typeof e.op.get_length_change)throw new Error("Invalid Argument (hunk operation "+e.op.inspect()+" does not support get_length_change)");if("function"!=typeof e.op.decompose)throw new Error("Invalid Argument (hunk operation "+e.op.inspect()+" does not support decompose)");Object.freeze(e)}),Object.freeze(this)}},t.PATCH.prototype=Object.create(a.BaseOperation.prototype),a.add_op(t.PATCH,t,"PATCH"),t.SPLICE=function(e,n,r){t.PATCH.apply(this,[[{offset:e,length:n,op:new s.SET(r)}]])},t.SPLICE.prototype=new t.PATCH("__hmm__"),t.ATINDEX=function(){var e,n;if(1==arguments.length)n=arguments[0],e=[],Object.keys(n).forEach(function(t){e.push(parseInt(t))}),e.sort();else{if(2!=arguments.length)throw new Error("Invalid Argument");e=[arguments[0]],(n={})[arguments[0]]=arguments[1]}var r=[],o=0;e.forEach(function(e){r.push({offset:e-o,length:1,op:new t.MAP(n[e])}),o=e+1}),t.PATCH.apply(this,[r])},t.ATINDEX.prototype=new t.PATCH("__hmm__"),t.MAP=function(e){if(null==e)throw new Error("Invalid Argument");this.op=e,Object.freeze(this)},t.MAP.prototype=Object.create(a.BaseOperation.prototype),a.add_op(t.MAP,t,"MAP"),t.PATCH.prototype.inspect=function(e){return r.format("<PATCH%s>",this.hunks.map(function(n){return 1==n.length&&n.op instanceof t.MAP?r.format(" +%d %s",n.offset,n.op.op.inspect(e-1)):r.format(" +%dx%d %s",n.offset,n.length,n.op instanceof s.SET?r.format("%j",n.op.value):n.op.inspect(e-1))}).join(","))},t.PATCH.prototype.visit=function(e){var n=new t.PATCH(this.hunks.map(function(t){var n=i(t);return n.op=n.op.visit(e),n}));return e(n)||n},t.PATCH.prototype.internalToJSON=function(e,t){e.hunks=this.hunks.map(function(e){var n=i(e);return n.op=n.op.toJSON(void 0,t),n})},t.PATCH.internalFromJSON=function(e,n,r){var o=e.hunks.map(function(e){var t=i(e);return t.op=a.opFromJSON(e.op,n,r),t});return new t.PATCH(o)},t.PATCH.prototype.apply=function(e){var t=0,n=e.slice(0,0);return this.hunks.forEach(function(r){if(t+r.offset+r.length>e.length)throw new Error("offset past end of document");n=f(n,e.slice(t,t+r.offset)),t+=r.offset;var o=r.op.apply(e.slice(t,t+r.length));if("string"==typeof e&&"string"!=typeof o)throw new Error("operation yielded invalid substring");if(Array.isArray(e)&&!Array.isArray(o))throw new Error("operation yielded invalid subarray");n=f(n,o),t+=r.length}),n=f(n,e.slice(t))},t.PATCH.prototype.simplify=function(){var e=null;this.hunks.forEach(function(t){t.op instanceof s.SET&&("string"==typeof t.op.value?e="string":Array.isArray(t.op.value)&&(e="array"))});var n=[],r=0;return this.hunks.forEach(function(o){var i=o.op.simplify();if(i.isNoOp())r+=o.offset+o.length;else if(0!=o.length||0!=o.op.get_length_change(o.length))if(n.length>0&&0==o.offset&&0==r&&(n[n.length-1].op instanceof s.SET||n[n.length-1].op instanceof t.MAP&&n[n.length-1].op.op instanceof s.SET)&&(o.op instanceof s.SET||o.op instanceof t.MAP&&o.op.op instanceof s.SET)&&null!=e){function a(t){if(t.op instanceof s.SET)return t.op.value;for(var n=[],r=0;r<t.length;r++)n.push(t.op.op.value);return"string"==e&&(n=n.join("")),n}n[n.length-1]={offset:n[n.length-1].offset,length:n[n.length-1].length+o.length,op:new s.SET(f(a(n[n.length-1]),a(o)))}}else n.push({offset:o.offset+r,length:o.length,op:i}),r=0;else r+=o.offset}),0==n.length?new s.NO_OP:new t.PATCH(n)},t.PATCH.prototype.drilldown=function(e){if(!Number.isInteger(e)||e<0)throw new Error("Cannot drilldown() on sequence with non-negative-integer ("+typeof e+").");var t=0,n=null;return this.hunks.forEach(function(r){(t+=r.offset)<=e&&e<t+r.length&&(n=r.op.drilldown(e-t)),t+=r.length}),n||new s.NO_OP},t.PATCH.prototype.inverse=function(e){var n=0;return new t.PATCH(this.hunks.map(function(t){var r={offset:t.offset,length:t.length+t.op.get_length_change(t.length),op:t.op.inverse(e.slice(n+t.offset,n+t.offset+t.length))};return n+=t.offset+t.length,r}))},t.PATCH.prototype.atomic_compose=function(e){return e instanceof t.PATCH?function(e,n){var r=[],o=0;function i(e,t){return{index:0,hunks:e.hunks.slice(),empty:function(){return 0==this.hunks.length},take:function(){var e=this.end(),t=this.hunks.shift();r.push({offset:this.index+t.offset-o,length:t.length,op:t.op}),this.index=e,o=this.index},skip:function(){this.index=this.end(),this.hunks.shift()},start:function(){return this.index+this.hunks[0].offset},end:function(){var e=this.hunks[0],n=this.index+e.offset+e.length;return 0==t&&(n+=e.op.get_length_change(e.length)),n}}}for(var a=i(e,0),s=i(n,1);!a.empty()||!s.empty();)if(s.empty())a.take();else if(a.empty())s.take();else if(a.end()<=s.start())a.take();else if(s.end()<=a.start())s.take();else{var u=s.start()-a.start(),f=s.end()-a.end();if(u>=0&&f<=0){var p=s.hunks[0].op,l=p.get_length_change(s.hunks[0].length);0==u&&0==f||(p=new t.PATCH([{offset:u,length:s.hunks[0].length,op:p}]));var c=a.hunks[0].op.atomic_compose(p);if(c){a.hunks[0]={offset:a.hunks[0].offset,length:a.hunks[0].length,op:c},s.index+=l,s.skip();continue}}if(u>0){var h;if(0!=(d=a.hunks[0].op.decompose(!0,u))[0].get_length_change(u))throw new Error("Not sure what to do in this case.");h=u,r.push({offset:a.index+a.hunks[0].offset-o,length:h,op:d[0]}),a.index=a.start()+u,o=a.index,a.hunks[0]={offset:0,length:a.hunks[0].length-h,op:d[1]}}else{if(!(u<0))return null;var d=s.hunks[0].op.decompose(!1,-u);r.push({offset:s.index+s.hunks[0].offset-o,length:-u,op:d[0]}),s.index=s.start()+-u,o=s.index,s.hunks[0]={offset:0,length:s.hunks[0].length- -u,op:d[1]}}}return new t.PATCH(r).simplify()}(this,e):null},t.PATCH.prototype.rebase_functions=[[t.PATCH,function(e,t){return p(this,e,t)}]],t.PATCH.prototype.get_length_change=function(e){var t=0;return this.hunks.forEach(function(e){t+=e.op.get_length_change(e.length)}),t},t.MAP.prototype.inspect=function(e){return r.format("<MAP %s>",this.op.inspect(e-1))},t.MAP.prototype.visit=function(e){var n=new t.MAP(this.op.visit(e));return e(n)||n},t.MAP.prototype.internalToJSON=function(e,t){e.op=this.op.toJSON(void 0,t)},t.MAP.internalFromJSON=function(e,n,r){return new t.MAP(a.opFromJSON(e.op,n,r))},t.MAP.prototype.apply=function(e){var t;t="string"==typeof e?e.split(/.{0}/):e.slice();for(var n=0;n<t.length;n++)if(t[n]=this.op.apply(t[n]),"string"==typeof e&&("string"!=typeof t[n]||1!=t[n].length))throw new Error("Invalid operation: String type or length changed.");return"string"==typeof e?t.join(""):t},t.MAP.prototype.simplify=function(){return this.op.simplify()instanceof s.NO_OP?new s.NO_OP:this},t.MAP.prototype.drilldown=function(e){if(!Number.isInteger(e)||e<0)throw new Error("Cannot drilldown() on sequence with non-negative-integer ("+typeof e+").");return this.op},t.MAP.prototype.inverse=function(e){if(0==e.length)return new t.NO_OP;if(1==e.length)return new t.MAP(this.op.inverse(e[0]));var n=[];return"string"==typeof e&&(e=e.split(/.{0}/)),e.forEach(function(e){n.append({offset:0,length:1,op:this.op.inverse(e)})}),new t.PATCH(n)},t.MAP.prototype.atomic_compose=function(e){if(e instanceof t.MAP){var n=this.op.atomic_compose(e.op);if(n)return new t.MAP(n)}return null},t.MAP.prototype.rebase_functions=[[t.MAP,function(e,n){var r,u;if(n&&"document"in n)if(1==n.document.length){(c=i(n)).document=c.document[0],r=this.op.rebase(e.op,c),u=e.op.rebase(this.op,c)}else{if(0==n.document.length)return[new a.NO_OP,new a.NO_OP];for(var f=!0,l=0;l<n.document.length;l++){var c;(c=i(n)).document=n.document[l];var h=this.op.rebase(e.op,c),d=e.op.rebase(this.op,c);0==l?(r=h,u=d):(o(r,h,{strict:!0})||(f=!1),o(u,d,{strict:!0})||(f=!1))}if(!f){var g=this;return p(r=new t.PATCH(n.document.map(function(e){return{offset:0,length:1,op:g}})),u=new t.PATCH(n.document.map(function(t){return{offset:0,length:1,op:e}})),n)}}else r=this.op.rebase(e.op,n),u=e.op.rebase(this.op,n);if(r&&u)return[r instanceof s.NO_OP?new s.NO_OP:new t.MAP(r),u instanceof s.NO_OP?new s.NO_OP:new t.MAP(u)]}],[t.PATCH,function(e,n){if(0==e.hunks.length)return[this,e];var r,a=this;return e.hunks.forEach(function(e){if(e.op instanceof t.MAP){var n=a.rebase_functions[0][1].call(a,e.op);n?void 0!==r?o(r[0],n[0],{strict:!0})&&o(r[1],n[1],{strict:!0})||(r=null):r=n:r=null}else r=null}),null!=r&&o(r[0],this,{strict:!0})?[r[0],new t.PATCH(e.hunks.map(function(e){return(e=i(e)).op=r[1],e}))]:n&&"document"in n?p(new t.PATCH([{offset:0,length:n.document.length,op:this}]),e,n):void 0}]],t.MAP.prototype.get_length_change=function(e){return 0},t.MAP.prototype.decompose=function(e,t){return[this,this]},t.createRandomOp=function(e,n){n="string"==typeof e?"string":"array";var r=[];return r.push(function(){for(var r=[],o=0;o<e.length;){var i=o+Math.floor(Math.random()*(e.length+1-o)),a=i<e.length?Math.floor(Math.random()*(e.length-i+1)):0,u=e.slice(i,i+a),f=s.createRandomOp(u,n);if(r.push({offset:i-o,length:a,op:f}),o=i+a,Math.random()<.25)break}return new t.PATCH(r)}),r.push(function(){for(;;){var r;0==e.length?"string"==typeof e?r="?":Array.isArray(e)&&(r=null):r=u(e,Math.floor(Math.random()*e.length));var o=s.createRandomOp(r,n+"-elem");try{return"string"==typeof e&&(e=e.split("")),e.forEach(function(e){o.apply(e)}),new t.MAP(o)}catch(e){}}}),r[Math.floor(Math.random()*r.length)]()}},function(e,t){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function o(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=n?r:o).supported=r,t.unsupported=o},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}(e.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(e,t){var n=Object.prototype.toString;e.exports=function(e){var t=typeof e;return"undefined"===t?"undefined":null===e?"null":!0===e||!1===e||e instanceof Boolean?"boolean":"string"===t||e instanceof String?"string":"number"===t||e instanceof Number?"number":"function"===t||e instanceof Function?void 0!==e.constructor.name&&"Generator"===e.constructor.name.slice(0,9)?"generatorfunction":"function":void 0!==Array.isArray&&Array.isArray(e)?"array":e instanceof RegExp?"regexp":e instanceof Date?"date":"[object RegExp]"===(t=n.call(e))?"regexp":"[object Date]"===t?"date":"[object Arguments]"===t?"arguments":"[object Error]"===t?"error":"[object Promise]"===t?"promise":function(e){return e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}(e)?"buffer":"[object Set]"===t?"set":"[object WeakSet]"===t?"weakset":"[object Map]"===t?"map":"[object WeakMap]"===t?"weakmap":"[object Symbol]"===t?"symbol":"[object Map Iterator]"===t?"mapiterator":"[object Set Iterator]"===t?"setiterator":"[object String Iterator]"===t?"stringiterator":"[object Array Iterator]"===t?"arrayiterator":"[object Int8Array]"===t?"int8array":"[object Uint8Array]"===t?"uint8array":"[object Uint8ClampedArray]"===t?"uint8clampedarray":"[object Int16Array]"===t?"int16array":"[object Uint16Array]"===t?"uint16array":"[object Int32Array]"===t?"int32array":"[object Uint32Array]"===t?"uint32array":"[object Float32Array]"===t?"float32array":"[object Float64Array]"===t?"float64array":"object"}},function(e,t,n){"use strict"; -/*! - * for-in <https://github.com/jonschlinkert/for-in> - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */e.exports=function(e,t,n){for(var r in e)if(!1===t.call(n,e[r],r,e))break}},function(e,t,n){"use strict";var r=n(7),o=n(19);function i(e,t){this[t]=e}e.exports=function(e,t){if(!r(e))throw new TypeError("mixin-object expects the first argument to be an object.");for(var n=arguments.length,a=0;++a<n;){var s=arguments[a];r(s)&&o(s,i,e)}return e}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,f=[],p=!1,l=-1;function c(){p&&u&&(p=!1,u.length?f=u.concat(f):l=-1,f.length&&h())}function h(){if(!p){var e=s(c);p=!0;for(var t=f.length;t;){for(u=f,f=[];++l<t;)u&&u[l].run();l=-1,t=f.length}u=null,p=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];f.push(new d(e,t)),1!==f.length||p||s(h)},d.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=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){(function(e){e.jot=n(0)}).call(this,n(8))}]); +!function(n){var r={};function o(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}o.m=n,o.c=r,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=12)}([function(t,i,e){e(2),e(3);i.BaseOperation=function(){},i.add_op=function(t,e,n){t.prototype.type=[e.module_name,n],"op_map"in e||(e.op_map={}),e.op_map[n]=t};var a=e(4),s=e(22),u=e(9),f=e(6),p=e(23);i.NO_OP=a.NO_OP,i.SET=a.SET,i.MATH=a.MATH,i.PATCH=s.PATCH,i.SPLICE=s.SPLICE,i.ATINDEX=s.ATINDEX,i.MAP=s.MAP,i.PUT=u.PUT,i.REM=u.REM,i.APPLY=u.APPLY,i.LIST=f.LIST,i.COPY=p.COPY,i.diff=e(25).diff,i.BaseOperation.prototype.isNoOp=function(){return this instanceof a.NO_OP},i.BaseOperation.prototype.visit=function(t){return t(this)||this},i.BaseOperation.prototype.toJSON=function(t,e){var n={};if(void 0===e)e=1,n._ver=e;else if(1!==e)throw new Error("Invalid protocol version: "+e);return n._type=this.type[0]+"."+this.type[1],this.internalToJSON(n,e),n},i.opFromJSON=function(t,e,n){if("object"!=typeof t)throw new Error("Not an operation.");if(void 0===e){if(1!==(e=t._ver))throw new Error("JOT serialized data structure is missing protocol version and one wasn't provided as an argument.")}else{if(1!==e)throw new Error("Invalid protocol version provided: "+e);if("_ver"in t)throw new Error("JOT serialized data structure should not have protocol version because it was provided as an argument.")}if(!n){function r(t){for(var e in n[t.module_name]={},t.op_map)n[t.module_name][e]=t.op_map[e]}n={},r(a),r(s),r(u),r(f),r(p)}if("string"!=typeof t._type)throw new Error("Not an operation.");var o=t._type.split(/\./g,2);if(2!=o.length)throw new Error("Not an operation.");return n[o[0]][o[1]].internalFromJSON(t,e,n)},i.BaseOperation.prototype.serialize=function(){return JSON.stringify(this)},i.deserialize=function(t){return i.opFromJSON(JSON.parse(t))},i.BaseOperation.prototype.compose=function(t,e){if(!(t instanceof i.BaseOperation))throw new Error("Argument must be an operation.");if(this instanceof a.NO_OP)return t;if(t instanceof a.NO_OP)return this;if(t instanceof a.SET)return t;if(this.atomic_compose){var n=this.atomic_compose(t);if(null!=n)return n}return e?null:new f.LIST([this,t]).simplify()},i.BaseOperation.prototype.rebase=function(t,e,n){for(var r=0;r<(null!=this.rebase_functions?this.rebase_functions.length:0);r++){if(t instanceof this.rebase_functions[r][0])if(null!=(o=this.rebase_functions[r][1].call(this,t,e))&&null!=o[0])return n&&n("rebase",this,"on",t,e?"conflictless":"","document"in e?JSON.stringify(e.document):"","=>",o[0]),o[0]}for(r=0;r<(null!=t.rebase_functions?t.rebase_functions.length:0);r++){var o;if(this instanceof t.rebase_functions[r][0])if(null!=(o=t.rebase_functions[r][1].call(t,this,e))&&null!=o[1])return n&&n("rebase",this,"on",t,e?"conflictless":"","document"in e?JSON.stringify(e.document):"","=>",o[0]),o[1]}if(this instanceof f.LIST||t instanceof f.LIST){var i=f.rebase(t,this,e,n);return n&&n("rebase",this,"on",t,"=>",i),i}if(e){if(t instanceof p.COPY&&void 0!==e.document)return t.clone_operation(this,e.document);if(this instanceof a.SET)return n&&n("rebase",this,"on",t,"=>",this),this;if(t instanceof a.SET)return n&&n("rebase",this,"on",t,"=>",new a.NO_OP),new a.NO_OP;throw new Error("Rebase failed between "+this.inspect()+" and "+t.inspect()+".")}return null},i.createRandomValue=function(t){var e=[];if(e.push(null),e.push(!1),e.push(!0),e.push(1e3*Math.floor(Math.random()-.5)),e.push(Math.random()-.5),e.push(1e3*(Math.random()-.5)),e.push(Math.random().toString(36).substring(7)),Math.random()<Math.exp(-(t||0))){for(var n=Math.floor(Math.exp(3*Math.random()))-1,r=[];r.length<n;)r.push(i.createRandomValue((t||0)+1));e.push(r)}if(Math.random()<Math.exp(-(t||0))){n=Math.floor(Math.exp(2.5*Math.random()))-1;for(var o={};Object.keys(o).length<n;)o[Math.random().toString(36).substring(7)]=i.createRandomValue((t||0)+1);e.push(o)}return e[Math.floor(Math.random()*e.length)]},i.createRandomOp=function(t,e){var n=[];return n.push(a),"string"==typeof t||Array.isArray(t)?n.push(s):"object"==typeof t&&null!==t&&n.push(u),n[Math.floor(Math.random()*n.length)].createRandomOp(t,e)},i.createRandomOpSequence=function(t,e){for(var n=[];n.length<e;){var r=i.createRandomOp(t);try{t=r.apply(t)}catch(t){continue}n.push(r)}return new f.LIST(n)},i.type_name=function(t){return"object"==typeof t?Array.isArray(t)?"array":"object":typeof t},i.cmp=function(t,e){if(t===e)return 0;if(t===u.MISSING)return-1;if(e===u.MISSING)return 1;if(i.type_name(t)!=i.type_name(e))return i.cmp(i.type_name(t),i.type_name(e));if("number"==typeof t)return t<e?-1:e<t?1:0;if("string"==typeof t)return t.localeCompare(e);if(Array.isArray(t)){var n=i.cmp(t.length,e.length);if(0!=n)return n;for(var r=0;r<t.length;r++)if(0!=(n=i.cmp(t[r],e[r])))return n;return 0}return JSON.stringify(t).localeCompare(JSON.stringify(e))}},function(t,e,n){"use strict";function r(){}function g(t,e,n,r,o){for(var i=0,a=e.length,s=0,u=0;i<a;i++){var f=e[i];if(f.removed){if(f.value=r.slice(u,u+f.count).join(""),u+=f.count,i&&e[i-1].added){var p=e[i-1];e[i-1]=e[i],e[i]=p}}else{if(!f.added&&o){var c=n.slice(s,s+f.count);c=c.map(function(t,e){var n=r[u+e];return n.length>t.length?n:t}),f.value=c.join("")}else f.value=n.slice(s,s+f.count).join("");s+=f.count,f.added||(u+=f.count)}}var l=e[a-1];return 1<a&&(l.added||l.removed)&&t.equals("",l.value)&&(e[a-2].value+=l.value,e.pop()),e}e.__esModule=!0,(e.default=r).prototype={diff:function(u,f){var t=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],e=t.callback;"function"==typeof t&&(e=t,t={}),this.options=t;var p=this;function c(t){return e?(setTimeout(function(){e(void 0,t)},0),!0):t}u=this.castInput(u),f=this.castInput(f),u=this.removeEmpty(this.tokenize(u));var l=(f=this.removeEmpty(this.tokenize(f))).length,h=u.length,d=1,n=l+h,y=[{newPos:-1,components:[]}],r=this.extractCommon(y[0],f,u,0);if(y[0].newPos+1>=l&&h<=r+1)return c([{value:f.join(""),count:f.length}]);function o(){for(var t=-1*d;t<=d;t+=2){var e=void 0,n=y[t-1],r=y[t+1],o=(r?r.newPos:0)-t;n&&(y[t-1]=void 0);var i=n&&n.newPos+1<l,a=r&&0<=o&&o<h;if(i||a){if(!i||a&&n.newPos<r.newPos?(e={newPos:(s=r).newPos,components:s.components.slice(0)},p.pushComponent(e.components,void 0,!0)):((e=n).newPos++,p.pushComponent(e.components,!0,void 0)),o=p.extractCommon(e,f,u,t),e.newPos+1>=l&&h<=o+1)return c(g(p,e.components,f,u,p.useLongestToken));y[t]=e}else y[t]=void 0}var s;d++}if(e)!function t(){setTimeout(function(){if(n<d)return e();o()||t()},0)}();else for(;d<=n;){var i=o();if(i)return i}},pushComponent:function(t,e,n){var r=t[t.length-1];r&&r.added===e&&r.removed===n?t[t.length-1]={count:r.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,r){for(var o=e.length,i=n.length,a=t.newPos,s=a-r,u=0;a+1<o&&s+1<i&&this.equals(e[a+1],n[s+1]);)a++,s++,u++;return u&&t.components.push({count:u}),t.newPos=a,s},equals:function(t,e){return t===e},removeEmpty:function(t){for(var e=[],n=0;n<t.length;n++)t[n]&&e.push(t[n]);return e},castInput:function(t){return t},tokenize:function(t){return t.split("")}}},function(t,E,k){(function(a){var e=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},s=/%[sdj%]/g;E.format=function(t){if(!O(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(u(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,o=r.length,i=String(t).replace(s,function(t){if("%%"===t)return"%";if(o<=n)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),a=r[n];n<o;a=r[++n])v(a)||!f(a)?i+=" "+a:i+=" "+u(a);return i},E.deprecate=function(t,e){if(void 0!==a&&!0===a.noDeprecation)return t;if(void 0===a)return function(){return E.deprecate(t,e).apply(this,arguments)};var n=!1;return function(){if(!n){if(a.throwDeprecation)throw new Error(e);a.traceDeprecation?console.trace(e):console.error(e),n=!0}return t.apply(this,arguments)}};var t,r={};function u(t,e){var n={seen:[],stylize:i};return 3<=arguments.length&&(n.depth=arguments[2]),4<=arguments.length&&(n.colors=arguments[3]),m(e)?n.showHidden=e:e&&E._extend(n,e),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),h(n,t,n.depth)}function o(t,e){var n=u.styles[e];return n?"["+u.colors[n][0]+"m"+t+"["+u.colors[n][1]+"m":t}function i(t,e){return t}function h(e,n,r){if(e.customInspect&&n&&A(n.inspect)&&n.inspect!==E.inspect&&(!n.constructor||n.constructor.prototype!==n)){var t=n.inspect(r,e);return O(t)||(t=h(e,t,r)),t}var o=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(O(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(w(e))return t.stylize(""+e,"number");if(m(e))return t.stylize(""+e,"boolean");if(v(e))return t.stylize("null","null")}(e,n);if(o)return o;var i,a=Object.keys(n),s=(i={},a.forEach(function(t,e){i[t]=!0}),i);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),T(n)&&(0<=a.indexOf("message")||0<=a.indexOf("description")))return d(n);if(0===a.length){if(A(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(P(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(_(n))return e.stylize(Date.prototype.toString.call(n),"date");if(T(n))return d(n)}var f,p="",c=!1,l=["{","}"];(g(n)&&(c=!0,l=["[","]"]),A(n))&&(p=" [Function"+(n.name?": "+n.name:"")+"]");return P(n)&&(p=" "+RegExp.prototype.toString.call(n)),_(n)&&(p=" "+Date.prototype.toUTCString.call(n)),T(n)&&(p=" "+d(n)),0!==a.length||c&&0!=n.length?r<0?P(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),f=c?function(e,n,r,o,t){for(var i=[],a=0,s=n.length;a<s;++a)S(n,String(a))?i.push(y(e,n,r,o,String(a),!0)):i.push("");return t.forEach(function(t){t.match(/^\d+$/)||i.push(y(e,n,r,o,t,!0))}),i}(e,n,r,s,a):a.map(function(t){return y(e,n,r,s,t,c)}),e.seen.pop(),function(t,e,n){if(60<t.reduce(function(t,e){return 0,0<=e.indexOf("\n")&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0))return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(f,p,l)):l[0]+p+l[1]}function d(t){return"["+Error.prototype.toString.call(t)+"]"}function y(t,e,n,r,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),S(r,o)||(a="["+o+"]"),s||(t.seen.indexOf(u.value)<0?-1<(s=v(n)?h(t,u.value,null):h(t,u.value,n-1)).indexOf("\n")&&(s=i?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),b(a)){if(i&&o.match(/^\d+$/))return s;a=(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),t.stylize(a,"string"))}return a+": "+s}function g(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function v(t){return null===t}function w(t){return"number"==typeof t}function O(t){return"string"==typeof t}function b(t){return void 0===t}function P(t){return f(t)&&"[object RegExp]"===n(t)}function f(t){return"object"==typeof t&&null!==t}function _(t){return f(t)&&"[object Date]"===n(t)}function T(t){return f(t)&&("[object Error]"===n(t)||t instanceof Error)}function A(t){return"function"==typeof t}function n(t){return Object.prototype.toString.call(t)}function p(t){return t<10?"0"+t.toString(10):t.toString(10)}E.debuglog=function(e){if(b(t)&&(t=a.env.NODE_DEBUG||""),e=e.toUpperCase(),!r[e])if(new RegExp("\\b"+e+"\\b","i").test(t)){var n=a.pid;r[e]=function(){var t=E.format.apply(E,arguments);console.error("%s %d: %s",e,n,t)}}else r[e]=function(){};return r[e]},(E.inspect=u).colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},E.isArray=g,E.isBoolean=m,E.isNull=v,E.isNullOrUndefined=function(t){return null==t},E.isNumber=w,E.isString=O,E.isSymbol=function(t){return"symbol"==typeof t},E.isUndefined=b,E.isRegExp=P,E.isObject=f,E.isDate=_,E.isError=T,E.isFunction=A,E.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},E.isBuffer=k(15);var c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}E.log=function(){var t,e;console.log("%s - %s",(t=new Date,e=[p(t.getHours()),p(t.getMinutes()),p(t.getSeconds())].join(":"),[t.getDate(),c[t.getMonth()],e].join(" ")),E.format.apply(E,arguments))},E.inherits=k(16),E._extend=function(t,e){if(!e||!f(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var l="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function M(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}E.promisify=function(i){if("function"!=typeof i)throw new TypeError('The "original" argument must be of type Function');if(l&&i[l]){var t;if("function"!=typeof(t=i[l]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,l,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var n,r,t=new Promise(function(t,e){n=t,r=e}),e=[],o=0;o<arguments.length;o++)e.push(arguments[o]);e.push(function(t,e){t?r(t):n(e)});try{i.apply(this,e)}catch(t){r(t)}return t}return Object.setPrototypeOf(t,Object.getPrototypeOf(i)),l&&Object.defineProperty(t,l,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,e(i))},E.promisify.custom=l,E.callbackify=function(i){if("function"!=typeof i)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);var n=t.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var r=this,o=function(){return n.apply(r,arguments)};i.apply(this,t).then(function(t){a.nextTick(o,null,t)},function(t){a.nextTick(M,t,o)})}return Object.setPrototypeOf(t,Object.getPrototypeOf(i)),Object.defineProperties(t,e(i)),t}}).call(this,k(14))},function(t,e,n){"use strict";var r=n(8),o=n(17),i=n(19);function a(t){var e=i(t);return a.hasOwnProperty(e)?a[e](t):t}a.array=function(t){return t.slice()},a.date=function(t){return new Date(+t)},a.object=function(t){return r(t)?o({},t):t},a.regexp=function(t){var e="";return e+=t.multiline?"m":"",e+=t.global?"g":"",e+=t.ignorecase?"i":"",new RegExp(t.source,e)},t.exports=a},function(t,u,e){var n=e(2),r=e(5),f=e(0),p=e(9).MISSING;u.module_name="values",u.NO_OP=function(){Object.freeze(this)},u.NO_OP.prototype=Object.create(f.BaseOperation.prototype),f.add_op(u.NO_OP,u,"NO_OP"),u.SET=function(t){this.value=t,Object.freeze(this)},u.SET.prototype=Object.create(f.BaseOperation.prototype),f.add_op(u.SET,u,"SET"),u.MATH=function(t,e){if(this.operator=t,this.operand=e,("add"==this.operator||"mult"==this.operator)&&"number"!=typeof this.operand)throw new Error("MATH[add] and MATH[mult]'s operand must be a number.");if(("and"==this.operator||"or"==this.operator||"xor"==this.operator)&&!Number.isInteger(this.operand)&&"boolean"!=typeof this.operand)throw new Error("MATH[and] and MATH[or] and MATH[xor]'s operand must be a boolean or integer.");if("not"==this.operator&&null!==this.operand)throw new Error("MATH[not]'s operand must be null --- it is not used.");if("rot"==this.operator){if(!Array.isArray(this.operand)||2!=this.operand.length||!Number.isInteger(this.operand[0])||!Number.isInteger(this.operand[1]))throw new Error("MATH[rot] operand must be an array with two integer elements.");if(this.operand[1]<=1)throw new Error("MATH[rot]'s second operand, the modulus, must be greater than one.");if(this.operand[0]>=Math.abs(this.operand[1]))throw new Error("MATH[rot]'s first operand, the increment, must be less than its second operand, the modulus.")}Object.freeze(this)},u.MATH.prototype=Object.create(f.BaseOperation.prototype),f.add_op(u.MATH,u,"MATH"),u.NO_OP.prototype.inspect=function(t){return"<NO_OP>"},u.NO_OP.prototype.internalToJSON=function(t,e){},u.NO_OP.internalFromJSON=function(t,e,n){return new u.NO_OP},u.NO_OP.prototype.apply=function(t){return t},u.NO_OP.prototype.simplify=function(){return this},u.NO_OP.prototype.drilldown=function(t){return new values.NO_OP},u.NO_OP.prototype.inverse=function(t){return this},u.NO_OP.prototype.atomic_compose=function(t){return t},u.NO_OP.prototype.rebase_functions=[[f.BaseOperation,function(t,e){return[this,t]}]],u.NO_OP.prototype.get_length_change=function(t){return 0},u.NO_OP.prototype.decompose=function(t,e){return[this,this]},u.SET.prototype.inspect=function(t){return n.format("<SET %s>",(e=this.value)===p?"~":n.format("%j",e));var e},u.SET.prototype.internalToJSON=function(t,e){this.value===p?t.value_missing=!0:t.value=this.value},u.SET.internalFromJSON=function(t,e,n){return t.value_missing?new u.SET(p):new u.SET(t.value)},u.SET.prototype.apply=function(t){return this.value},u.SET.prototype.simplify=function(){return this},u.SET.prototype.drilldown=function(t){return"object"==typeof this.value&&Array.isArray(this.value)&&Number.isInteger(t)&&t<this.value.length?new u.SET(this.value[t]):"object"==typeof this.value&&!Array.isArray(this.value)&&null!==this.value&&"string"==typeof t&&t in this.value?new u.SET(this.value[t]):new u.SET(p)},u.SET.prototype.inverse=function(t){return new u.SET(t)},u.SET.prototype.atomic_compose=function(t){return new u.SET(t.apply(this.value)).simplify()},u.SET.prototype.rebase_functions=[[u.SET,function(t,e){return r(this.value,t.value,{strict:!0})?[new u.NO_OP,new u.NO_OP]:e&&f.cmp(this.value,t.value)<0?[new u.NO_OP,new u.SET(t.value)]:null}],[u.MATH,function(t,e){return[this,new u.NO_OP]}]],u.SET.prototype.get_length_change=function(t){if("string"==typeof this.value||Array.isArray(this.value))return this.value.length-t;throw new Error("not applicable: new value is of type "+typeof this.value)},u.SET.prototype.decompose=function(t,e){if("string"!=typeof this.value&&!Array.isArray(this.value))throw new Error("invalid value type for call");return t?[new u.SET(this.value.slice(0,e)),new u.SET(this.value.slice(e))]:[new u.SET(this.value.slice(0,0)),this]},u.MATH.prototype.inspect=function(t){return n.format("<MATH %s:%s>",this.operator,"number"!=typeof this.operand||"and"!=this.operator&&"or"!=this.operator&&"xor"!=this.operator?n.format("%j",this.operand):"0x"+this.operand.toString(16))},u.MATH.prototype.internalToJSON=function(t,e){t.operator=this.operator,t.operand=this.operand},u.MATH.internalFromJSON=function(t,e,n){return new u.MATH(t.operator,t.operand)},u.MATH.prototype.apply=function(t){if("number"==typeof t){if("add"==this.operator)return t+this.operand;if("mult"==this.operator)return t*this.operand;if(Number.isInteger(t)){if("rot"==this.operator)return(t+this.operand[0])%this.operand[1];if("and"==this.operator)return t&this.operand;if("or"==this.operator)return t|this.operand;if("xor"==this.operator)return t^this.operand;if("not"==this.operator)return~t}throw new Error("MATH operator "+this.operator+" cannot apply to "+t+".")}if("boolean"!=typeof t)throw new Error("MATH operations only apply to number and boolean values, not "+f.type_name(t)+".");if("and"==this.operator)return t&&this.operand;if("or"==this.operator)return t||this.operand;if("xor"==this.operator)return!!(t^this.operand);if("not"==this.operator)return!t;throw new Error("MATH operator "+this.operator+" does not apply to boolean values.")},u.MATH.prototype.simplify=function(){return"add"==this.operator&&0==this.operand?new u.NO_OP:"rot"==this.operator&&0==this.operand[0]?new u.NO_OP:"mult"==this.operator&&1==this.operand?new u.NO_OP:"and"==this.operator&&0===this.operand?new u.SET(0):"and"==this.operator&&!1===this.operand?new u.SET(!1):"or"==this.operator&&0===this.operand?new u.NO_OP:"or"==this.operator&&!1===this.operand?new u.NO_OP:"xor"==this.operator&&0==this.operand?new u.NO_OP:this},u.MATH.prototype.drilldown=function(t){return new u.NO_OP},u.MATH.prototype.inverse=function(t){return"add"==this.operator?new u.MATH("add",-this.operand):"rot"==this.operator?new u.MATH("rot",[-this.operand[0],this.operand[1]]):"mult"==this.operator?new u.MATH("mult",1/this.operand):"and"==this.operator?new u.MATH("or",t&~this.operand):"or"==this.operator?new u.MATH("xor",~t&this.operand):"xor"==this.operator?this:"not"==this.operator?this:void 0},u.MATH.prototype.atomic_compose=function(t){if(t instanceof u.MATH){if(this.operator==t.operator&&"add"==this.operator)return new u.MATH("add",this.operand+t.operand).simplify();if(this.operator==t.operator&&"rot"==this.operator&&this.operand[1]==t.operand[1])return new u.MATH("rot",[this.operand[0]+t.operand[0],this.operand[1]]).simplify();if(this.operator==t.operator&&"mult"==this.operator)return new u.MATH("mult",this.operand*t.operand).simplify();if(this.operator==t.operator&&"and"==this.operator&&typeof this.operand==typeof t.operand&&"number"==typeof this.operand)return new u.MATH("and",this.operand&t.operand).simplify();if(this.operator==t.operator&&"and"==this.operator&&typeof this.operand==typeof t.operand&&"boolean"==typeof this.operand)return new u.MATH("and",this.operand&&t.operand).simplify();if(this.operator==t.operator&&"or"==this.operator&&typeof this.operand==typeof t.operand&&"number"==typeof this.operand)return new u.MATH("or",this.operand|t.operand).simplify();if(this.operator==t.operator&&"or"==this.operator&&typeof this.operand==typeof t.operand&&"boolean"==typeof this.operand)return new u.MATH("or",this.operand||t.operand).simplify();if(this.operator==t.operator&&"xor"==this.operator&&typeof this.operand==typeof t.operand&&"number"==typeof this.operand)return new u.MATH("xor",this.operand^t.operand).simplify();if(this.operator==t.operator&&"xor"==this.operator&&typeof this.operand==typeof t.operand&&"boolean"==typeof this.operand)return new u.MATH("xor",!!(this.operand^t.operand)).simplify();if(this.operator==t.operator&&"not"==this.operator)return new u.NO_OP;if("and"==this.operator&&"or"==t.operator&&this.operand===t.operand)return new u.SET(this.operand);if("or"==this.operator&&"xor"==t.operator&&this.operand===t.operand&&"number"==typeof this.operand)return new u.MATH("and",~this.operand);if("or"==this.operator&&"xor"==t.operator&&this.operand===t.operand&&"boolean"==typeof this.operand)return new u.MATH("and",!this.operand)}return null},u.MATH.prototype.rebase_functions=[[u.MATH,function(t,e){return this.operator!=t.operator||"rot"==this.operator&&this.operand[1]!=t.operand[1]?e&&"document"in e&&f.cmp([this.operator,this.operand],[t.operator,t.operand])<0?[new u.SET(this.compose(t).apply(e.document)),t]:null:[this,t]}]],u.createRandomOp=function(r,t){var e=[];if(e.push(function(){return new u.NO_OP}),e.push(function(){return new u.SET(r)}),"string-elem"!=t&&"string"!=t&&e.push(function(){return new u.SET(f.createRandomValue())}),"object"==t&&e.push(function(){return new u.SET(p)}),"boolean"==typeof r&&e.push(function(){return new u.SET(!r)}),"number"==typeof r&&(Number.isInteger(r)?e.push(function(){return new u.SET(r+Math.floor(100*(Math.random()+.5)))}):e.push(function(){return new u.SET(r*(Math.random()+.5))})),("string"==typeof r||Array.isArray(r))&&"string-elem"!=t){if(0<r.length&&e.push(function(){return new u.SET(r.slice(0,0))}),1<=r.length&&(e.push(function(){return new u.SET(r.slice(Math.floor(Math.random()*(r.length-1)),r.length))}),e.push(function(){return new u.SET(r.slice(0,Math.floor(Math.random()*(r.length-1))))})),2<=r.length){var n=Math.floor(Math.random()*r.length-1),o=Math.floor(Math.random()*(r.length-n));e.push(function(){return new u.SET(r.slice(n,n+o))})}if(0<r.length){function i(t,e){return t instanceof String?t+e:t.concat(e)}e.push(function(){return new u.SET(i(r.slice(0,1+Math.floor(Math.random()*(r.length-1))),r))}),e.push(function(){return new u.SET(i(r,r.slice(0,1+Math.floor(Math.random()*(r.length-1)))))}),e.push(function(){return new u.SET((t=r.slice(0,1+Math.floor(Math.random()*(r.length-1))),n=(e=r).slice(0,1+Math.floor(Math.random()*(r.length-1))),t instanceof String?t+e+n:t.concat(e).concat(n)));var t,e,n})}else"string"==typeof r?e.push(function(){return new u.SET((Math.random()+"").slice(2))}):Array.isArray(r)&&e.push(function(){return new u.SET([null,null,null].map(function(){return Math.random()}))})}if("string"==typeof r&&(r!=r.split("").reverse().join("")&&e.push(function(){return new u.SET(r.split("").reverse().join(""))}),0<r.length)){for(var a="",s=0;s<r.length;s++)a+=(Math.random()+"").slice(2,3);e.push(function(){return new u.SET(a)})}return"number"==typeof r&&(Number.isInteger(r)?(e.push(function(){return new u.MATH("add",Math.floor(100*(Math.random()-.25)))}),e.push(function(){return new u.MATH("mult",Math.floor(Math.exp(Math.random()+.5)))}),1<r&&e.push(function(){return new u.MATH("rot",[1,Math.min(13,r)])}),e.push(function(){return new u.MATH("and",241)}),e.push(function(){return new u.MATH("or",241)}),e.push(function(){return new u.MATH("xor",241)}),e.push(function(){return new u.MATH("not",null)})):(e.push(function(){return new u.MATH("add",100*(Math.random()-.25))}),e.push(function(){return new u.MATH("mult",Math.exp(Math.random()+.5))}))),"boolean"==typeof r&&(e.push(function(){return new u.MATH("and",!0)}),e.push(function(){return new u.MATH("and",!1)}),e.push(function(){return new u.MATH("or",!0)}),e.push(function(){return new u.MATH("or",!1)}),e.push(function(){return new u.MATH("xor",!0)}),e.push(function(){return new u.MATH("xor",!1)}),e.push(function(){return new u.MATH("not",null)})),e[Math.floor(Math.random()*e.length)]()}},function(t,e,n){var s=Array.prototype.slice,u=n(20),f=n(21),p=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:function(t,e,n){var r,o;if(c(t)||c(e))return!1;if(t.prototype!==e.prototype)return!1;if(f(t))return!!f(e)&&(t=s.call(t),e=s.call(e),p(t,e,n));if(l(t)){if(!l(e))return!1;if(t.length!==e.length)return!1;for(r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}try{var i=u(t),a=u(e)}catch(t){return!1}if(i.length!=a.length)return!1;for(i.sort(),a.sort(),r=i.length-1;0<=r;r--)if(i[r]!=a[r])return!1;for(r=i.length-1;0<=r;r--)if(o=i[r],!p(t[o],e[o],n))return!1;return typeof t==typeof e}(t,e,n))};function c(t){return null==t}function l(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(0<t.length&&"number"!=typeof t[0]))}},function(t,i,e){var n=e(2),d=e(3),y=e(0),g=e(4);i.module_name="lists",i.LIST=function(t){if(!Array.isArray(t))throw new Error("Argument must be an array.");t.forEach(function(t){if(!(t instanceof y.BaseOperation))throw new Error("Argument must be an array containing operations (found "+t+").")}),this.ops=t,Object.freeze(this)},i.LIST.prototype=Object.create(y.BaseOperation.prototype),y.add_op(i.LIST,i,"LIST"),i.LIST.prototype.inspect=function(e){return n.format("<LIST [%s]>",this.ops.map(function(t){return t.inspect(e-1)}).join(", "))},i.LIST.prototype.visit=function(e){var t=new i.LIST(this.ops.map(function(t){return t.visit(e)}));return e(t)||t},i.LIST.prototype.internalToJSON=function(t,e){t.ops=this.ops.map(function(t){return t.toJSON(void 0,e)})},i.LIST.internalFromJSON=function(t,e,n){var r=t.ops.map(function(t){return y.opFromJSON(t,e,n)});return new i.LIST(r)},i.LIST.prototype.apply=function(t){for(var e=0;e<this.ops.length;e++)t=this.ops[e].apply(t);return t},i.LIST.prototype.simplify=function(t){for(var e=[],n=0;n<this.ops.length;n++){var r=this.ops[n];for(r=r.simplify();0<e.length&&!r.isNoOp();){var o=e[e.length-1].compose(r,!0);if(!o)break;e.pop(),r=o}r.isNoOp()||e.push(r)}return 0==e.length?new g.NO_OP:1==e.length?e[0]:new i.LIST(e)},i.LIST.prototype.inverse=function(e){var n=[];return this.ops.forEach(function(t){n.push(t.inverse(e)),e=t.apply(e)}),n.reverse(),new i.LIST(n)},i.LIST.prototype.atomic_compose=function(t){if(0==this.ops.length)return t;if(t instanceof i.LIST)return 0==t.ops.length?this:new i.LIST(this.ops.concat(t.ops));var e=this.ops.slice();return e.push(t),new i.LIST(e)},i.rebase=function(t,e,n,r){t=t.simplify(),e=e.simplify();var o=function t(e,n,r,o){if(0==n.length||0==e.length)return n;if(1==n.length&&1==e.length){var i=n[0].rebase(e[0],r,o);return i?i instanceof y.NO_OP?[]:i instanceof y.LIST?i.ops:[i]:null}if(o){o("rebasing",n,"on",e,r?"conflictless":"","document"in r?JSON.stringify(r.document):"","...");var a=o;o=function(){var t=[">"].concat(Array.from(arguments));a.apply(null,t)}}{if(1==e.length){if(e[0]instanceof g.NO_OP)return n;var s=n.slice(0,1),u=n.slice(1),f=t(e,s,r,o);if(null==f)return null;var p=t(s,e,r,o);if(null==p)return null;var c=null;r&&"document"in(c=d(r))&&(c.document=s[0].apply(c.document));var l=t(p,u,c,o);return null==l?null:f.concat(l)}r=r?d(r):null;for(var h=0;h<e.length;h++){if(null==(n=t([e[h]],n,r,o)))return null;r&&"document"in r&&(r.document=e[h].apply(r.document))}return n}}(t=t instanceof i.LIST?t.ops:[t],e=e instanceof i.LIST?e.ops:[e],n,r);return null==o?null:0==o.length?new g.NO_OP:1==o.length?o[0]:new i.LIST(o).simplify()},i.LIST.prototype.drilldown=function(e){return new i.LIST(this.ops.map(function(t){return t.drilldown(e)})).simplify()},i.createRandomOp=function(t,e){for(var n=[];0==n.length||Math.random()<.75;)n.push(y.createRandomOp(t,e)),t=n[n.length-1].apply(t);return new i.LIST(n)}},function(t,e,n){"use strict";e.__esModule=!0,e.lineDiff=void 0,e.diffLines=function(t,e,n){return s.diff(t,e,n)},e.diffTrimmedLines=function(t,e,n){var r=(0,a.generateOptions)(n,{ignoreWhitespace:!0});return s.diff(t,e,r)};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r},a=n(10);var s=e.lineDiff=new i.default;s.tokenize=function(t){var e=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?e[e.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),e.push(o))}return e}},function(t,e,n){"use strict";t.exports=function(t){return null!=t&&("object"==typeof t||"function"==typeof t)}},function(t,a,e){var o=e(2),s=(e(5),e(3)),i=e(0),u=e(4);e(6).LIST;a.module_name="objects",a.APPLY=function(){if(1==arguments.length&&"object"==typeof arguments[0])this.ops=arguments[0];else{if(2!=arguments.length||"string"!=typeof arguments[0])throw new Error("invalid arguments");this.ops={},this.ops[arguments[0]]=arguments[1]}Object.freeze(this),Object.freeze(this.ops)},a.APPLY.prototype=Object.create(i.BaseOperation.prototype),i.add_op(a.APPLY,a,"APPLY"),a.MISSING=new Object,Object.freeze(a.MISSING),a.PUT=function(t,e){a.APPLY.apply(this,[t,new u.SET(e)])},a.PUT.prototype=Object.create(a.APPLY.prototype),a.REM=function(t){a.APPLY.apply(this,[t,new u.SET(a.MISSING)])},a.REM.prototype=Object.create(a.APPLY.prototype),a.APPLY.prototype.inspect=function(e){var n=[],r=this.ops;return Object.keys(r).forEach(function(t){n.push(o.format("%j:%s",t,r[t].inspect(e-1)))}),o.format("<APPLY %s>",n.join(", "))},a.APPLY.prototype.visit=function(t){var e={};for(var n in this.ops)e[n]=this.ops[n].visit(t);var r=new a.APPLY(e);return t(r)||r},a.APPLY.prototype.internalToJSON=function(t,e){for(var n in t.ops={},this.ops)t.ops[n]=this.ops[n].toJSON(void 0,e)},a.APPLY.internalFromJSON=function(t,e,n){var r={};for(var o in t.ops)r[o]=i.opFromJSON(t.ops[o],e,n);return new a.APPLY(r)},a.APPLY.prototype.apply=function(t){var e={};for(var n in t)e[n]=t[n];for(var r in this.ops){var o=this.ops[r].apply(e[r],[e,r]);o===a.MISSING?delete e[r]:e[r]=o}return e},a.APPLY.prototype.simplify=function(){var t={},e=!1;for(var n in this.ops)t[n]=this.ops[n].simplify(),t[n]instanceof u.NO_OP?delete t[n]:e=!0;return e?new a.APPLY(t):new u.NO_OP},a.APPLY.prototype.inverse=function(t){var e={};for(var n in this.ops)e[n]=this.ops[n].inverse(n in t?t[n]:a.MISSING);return new a.APPLY(e)},a.APPLY.prototype.atomic_compose=function(t){if(t instanceof a.APPLY){var e=s(this.ops);for(var n in t.ops)if(n in e){var r=e[n].compose(t.ops[n]);r instanceof u.NO_OP?delete e[n]:e[n]=r}else e[n]=t.ops[n];return new a.APPLY(e).simplify()}return null},a.APPLY.prototype.rebase_functions=[[a.APPLY,function(t,n){function e(t){if(!(n&&"document"in n))return n;var e=s(n);return t in n.document?e.document=n.document[t]:e.document=a.MISSING,e}var r={};for(var o in this.ops)if(r[o]=this.ops[o],o in t.ops&&(r[o]=r[o].rebase(t.ops[o],e(o))),null===r[o])return null;var i={};for(var o in t.ops)if(i[o]=t.ops[o],o in this.ops&&(i[o]=i[o].rebase(this.ops[o],e(o))),null===i[o])return null;return[new a.APPLY(r).simplify(),new a.APPLY(i).simplify()]}]],a.APPLY.prototype.drilldown=function(t){return"string"==typeof t&&t in this.ops?this.ops[t]:new u.NO_OP},a.createRandomOp=function(e,t){var n=[];return n.push(function(){return new a.PUT("k"+Math.floor(1e3*Math.random()),i.createRandomValue())}),Object.keys(e).forEach(function(t){n.push(function(){return i.createRandomOp(e[t],"object")})}),n[Math.floor(Math.random()*n.length)]()}},function(t,e,n){"use strict";e.__esModule=!0,e.generateOptions=function(t,e){if("function"==typeof t)e.callback=t;else if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}},function(t,e,n){"use strict";e.__esModule=!0,e.parsePatch=function(t){var s=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=t.split("\n"),o=[],f=0;function e(){var t={};for(o.push(t);f<u.length;){var e=u[f];if(/^(\-\-\-|\+\+\+|@@)\s/.test(e))break;var n=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(e);n&&(t.index=n[1]),f++}for(i(t),i(t),t.hunks=[];f<u.length;){var r=u[f];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(r))break;if(/^@@/.test(r))t.hunks.push(a());else{if(r&&s.strict)throw new Error("Unknown line "+(f+1)+" "+JSON.stringify(r));f++}}}function i(t){var e=/^(---|\+\+\+)\s+([\S ]*)(?:\t(.*?)\s*)?$/.exec(u[f]);if(e){var n="---"===e[1]?"old":"new";t[n+"FileName"]=e[2],t[n+"Header"]=e[3],f++}}function a(){for(var t=f,e=u[f++],n=e.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),r={oldStart:+n[1],oldLines:+n[2]||1,newStart:+n[3],newLines:+n[4]||1,lines:[]},o=0,i=0;f<u.length&&!(0===u[f].indexOf("--- ")&&f+2<u.length&&0===u[f+1].indexOf("+++ ")&&0===u[f+2].indexOf("@@"));f++){var a=u[f][0];if("+"!==a&&"-"!==a&&" "!==a&&"\\"!==a)break;r.lines.push(u[f]),"+"===a?o++:"-"===a?i++:" "===a&&(o++,i++)}if(o||1!==r.newLines||(r.newLines=0),i||1!==r.oldLines||(r.oldLines=0),s.strict){if(o!==r.newLines)throw new Error("Added line count did not match for hunk at line "+(t+1));if(i!==r.oldLines)throw new Error("Removed line count did not match for hunk at line "+(t+1))}return r}for(;f<u.length;)e();return o}},function(t,e,n){(function(t){t.jot=n(0)}).call(this,n(13))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,f=[],p=!1,c=-1;function l(){p&&u&&(p=!1,u.length?f=u.concat(f):c=-1,f.length&&h())}function h(){if(!p){var t=s(l);p=!0;for(var e=f.length;e;){for(u=f,f=[];++c<e;)u&&u[c].run();c=-1,e=f.length}u=null,p=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];f.push(new d(t,e)),1!==f.length||p||s(h)},d.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=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,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}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){"use strict";var i=n(8),a=n(18);function s(t,e){this[e]=t}t.exports=function(t,e){if(!i(t))throw new TypeError("mixin-object expects the first argument to be an object.");for(var n=arguments.length,r=0;++r<n;){var o=arguments[r];i(o)&&a(o,s,t)}return t}},function(t,e,n){"use strict";t.exports=function(t,e,n){for(var r in t)if(!1===e.call(n,t[r],r,t))break}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){var e,n=typeof t;return"undefined"===n?"undefined":null===t?"null":!0===t||!1===t||t instanceof Boolean?"boolean":"string"===n||t instanceof String?"string":"number"===n||t instanceof Number?"number":"function"===n||t instanceof Function?void 0!==t.constructor.name&&"Generator"===t.constructor.name.slice(0,9)?"generatorfunction":"function":void 0!==Array.isArray&&Array.isArray(t)?"array":t instanceof RegExp?"regexp":t instanceof Date?"date":"[object RegExp]"===(n=r.call(t))?"regexp":"[object Date]"===n?"date":"[object Arguments]"===n?"arguments":"[object Error]"===n?"error":"[object Promise]"===n?"promise":(e=t).constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)?"buffer":"[object Set]"===n?"set":"[object WeakSet]"===n?"weakset":"[object Map]"===n?"map":"[object WeakMap]"===n?"weakmap":"[object Symbol]"===n?"symbol":"[object Map Iterator]"===n?"mapiterator":"[object Set Iterator]"===n?"setiterator":"[object String Iterator]"===n?"stringiterator":"[object Array Iterator]"===n?"arrayiterator":"[object Int8Array]"===n?"int8array":"[object Uint8Array]"===n?"uint8array":"[object Uint8ClampedArray]"===n?"uint8clampedarray":"[object Int16Array]"===n?"int16array":"[object Uint16Array]"===n?"uint16array":"[object Int32Array]"===n?"int32array":"[object Uint32Array]"===n?"uint32array":"[object Float32Array]"===n?"float32array":"[object Float64Array]"===n?"float64array":"object"}},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(t,e){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function o(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=n?r:o).supported=r,e.unsupported=o},function(t,d,e){var n=e(2),p=e(5),h=e(3),y=e(0),g=e(4);e(6).LIST;function a(t,e){return t instanceof String?t+e:t.concat(e)}function c(t,e,n){function r(t){return{old_index:0,old_hunks:t.hunks.slice(),dx_index:0,new_hunks:[],empty:function(){return 0==this.old_hunks.length},take:function(t,e){var n=this.old_hunks.shift();this.new_hunks.push({offset:n.offset+this.dx_index,length:n.length+(n.dlength||0),op:n.op}),this.dx_index=0,this.old_index+=n.offset+n.length,e||(t.dx_index+=n.op.get_length_change(n.length))},skip:function(){this.old_index=this.end(),this.old_hunks.shift()},start:function(){return this.old_index+this.old_hunks[0].offset},end:function(){var t=this.old_hunks[0];return this.old_index+t.offset+t.length}}}for(var o=r(t),i=r(e);!o.empty()||!i.empty();)if(i.empty())o.take(i);else if(o.empty())i.take(o);else if(o.start()!=i.start()||0!=o.old_hunks[0].length||0!=i.old_hunks[0].length)if(o.end()<=i.start())o.take(i);else if(i.end()<=o.start())i.take(o);else{var a=i.start()-o.start(),s=i.end()-o.end();if(0!=a||0!=s){if(!n)return null;if(0<a){var u=(f=o.old_hunks.shift()).op.decompose(!1,a);o.old_hunks.unshift({offset:0,length:f.length-a,op:u[1]}),o.old_hunks.unshift({offset:f.offset,length:a,op:u[0]}),o.take(i)}else if(a<0){u=(f=i.old_hunks.shift()).op.decompose(!1,-a);i.old_hunks.unshift({offset:0,length:f.length+a,op:u[1]}),i.old_hunks.unshift({offset:f.offset,length:-a,op:u[0]}),i.take(o)}else if(s<0){u=(f=o.old_hunks.shift()).op.decompose(!1,f.length+s);o.old_hunks.unshift({offset:0,length:-s,op:u[1]}),o.old_hunks.unshift({offset:f.offset,length:f.length+s,op:u[0]})}else{if(!(0<s))throw new Error("We thought this line was not reachable.");var f;u=(f=i.old_hunks.shift()).op.decompose(!1,f.length-s);i.old_hunks.unshift({offset:0,length:s,op:u[1]}),i.old_hunks.unshift({offset:f.offset,length:f.length-s,op:u[0]})}}else{var p=n?h(n):null;p&&"document"in p&&(p.document=p.document.slice(o.start(),o.end()));var c=o.old_hunks[0].op.rebase(i.old_hunks[0].op,p),l=i.old_hunks[0].op.rebase(o.old_hunks[0].op,p);if(null==c||null==l)return null;o.old_hunks[0]={offset:o.old_hunks[0].offset,length:o.old_hunks[0].length,dlength:i.old_hunks[0].op.get_length_change(i.old_hunks[0].length),op:c},i.old_hunks[0]={offset:i.old_hunks[0].offset,length:i.old_hunks[0].length,dlength:o.old_hunks[0].op.get_length_change(o.old_hunks[0].length),op:l},o.take(i,!0),i.take(o,!0)}}else{if(!n)return null;y.cmp(o.old_hunks[0].op,i.old_hunks[0].op)<0?o.take(i):i.take(o)}return[new d.PATCH(o.new_hunks).simplify(),new d.PATCH(i.new_hunks).simplify()]}d.module_name="sequences",d.PATCH=function(){if("__hmm__"!==arguments[0]){if(1!=arguments.length)throw new Error("Invaid Argument");if(this.hunks=arguments[0],!Array.isArray(this.hunks))throw new Error("Invaid Argument");this.hunks.forEach(function(t){if("number"!=typeof t.offset)throw new Error("Invalid Argument (hunk offset not a number)");if(t.offset<0)throw new Error("Invalid Argument (hunk offset is negative)");if("number"!=typeof t.length)throw new Error("Invalid Argument (hunk length is not a number)");if(t.length<0)throw new Error("Invalid Argument (hunk length is negative)");if(!(t.op instanceof y.BaseOperation))throw new Error("Invalid Argument (hunk operation is not an operation)");if("function"!=typeof t.op.get_length_change)throw new Error("Invalid Argument (hunk operation "+t.op.inspect()+" does not support get_length_change)");if("function"!=typeof t.op.decompose)throw new Error("Invalid Argument (hunk operation "+t.op.inspect()+" does not support decompose)");Object.freeze(t)}),Object.freeze(this)}},d.PATCH.prototype=Object.create(y.BaseOperation.prototype),y.add_op(d.PATCH,d,"PATCH"),d.SPLICE=function(t,e,n){d.PATCH.apply(this,[[{offset:t,length:e,op:new g.SET(n)}]])},d.SPLICE.prototype=new d.PATCH("__hmm__"),d.ATINDEX=function(){var e,n;if(1==arguments.length)n=arguments[0],e=[],Object.keys(n).forEach(function(t){e.push(parseInt(t))}),e.sort();else{if(2!=arguments.length)throw new Error("Invalid Argument");e=[arguments[0]],(n={})[arguments[0]]=arguments[1]}var r=[],o=0;e.forEach(function(t){r.push({offset:t-o,length:1,op:new d.MAP(n[t])}),o=t+1}),d.PATCH.apply(this,[r])},d.ATINDEX.prototype=new d.PATCH("__hmm__"),d.MAP=function(t){if(null==t)throw new Error("Invalid Argument");this.op=t,Object.freeze(this)},d.MAP.prototype=Object.create(y.BaseOperation.prototype),y.add_op(d.MAP,d,"MAP"),d.PATCH.prototype.inspect=function(e){return n.format("<PATCH%s>",this.hunks.map(function(t){return 1==t.length&&t.op instanceof d.MAP?n.format(" +%d %s",t.offset,t.op.op.inspect(e-1)):n.format(" +%dx%d %s",t.offset,t.length,t.op instanceof g.SET?n.format("%j",t.op.value):t.op.inspect(e-1))}).join(","))},d.PATCH.prototype.visit=function(n){var t=new d.PATCH(this.hunks.map(function(t){var e=h(t);return e.op=e.op.visit(n),e}));return n(t)||t},d.PATCH.prototype.internalToJSON=function(t,n){t.hunks=this.hunks.map(function(t){var e=h(t);return e.op=e.op.toJSON(void 0,n),e})},d.PATCH.internalFromJSON=function(t,n,r){var e=t.hunks.map(function(t){var e=h(t);return e.op=y.opFromJSON(t.op,n,r),e});return new d.PATCH(e)},d.PATCH.prototype.apply=function(n){var r=0,o=n.slice(0,0);return this.hunks.forEach(function(t){if(r+t.offset+t.length>n.length)throw new Error("offset past end of document");o=a(o,n.slice(r,r+t.offset)),r+=t.offset;var e=t.op.apply(n.slice(r,r+t.length));if("string"==typeof n&&"string"!=typeof e)throw new Error("operation yielded invalid substring");if(Array.isArray(n)&&!Array.isArray(e))throw new Error("operation yielded invalid subarray");o=a(o,e),r+=t.length}),o=a(o,n.slice(r))},d.PATCH.prototype.simplify=function(){var r=null;this.hunks.forEach(function(t){t.op instanceof g.SET&&("string"==typeof t.op.value?r="string":Array.isArray(t.op.value)&&(r="array"))});var o=[],i=0;return this.hunks.forEach(function(t){var e=t.op.simplify();if(e.isNoOp())i+=t.offset+t.length;else if(0!=t.length||0!=t.op.get_length_change(t.length))if(0<o.length&&0==t.offset&&0==i&&(o[o.length-1].op instanceof g.SET||o[o.length-1].op instanceof d.MAP&&o[o.length-1].op.op instanceof g.SET)&&(t.op instanceof g.SET||t.op instanceof d.MAP&&t.op.op instanceof g.SET)&&null!=r){function n(t){if(t.op instanceof g.SET)return t.op.value;for(var e=[],n=0;n<t.length;n++)e.push(t.op.op.value);return"string"==r&&(e=e.join("")),e}o[o.length-1]={offset:o[o.length-1].offset,length:o[o.length-1].length+t.length,op:new g.SET(a(n(o[o.length-1]),n(t)))}}else o.push({offset:t.offset+i,length:t.length,op:e}),i=0;else i+=t.offset}),0==o.length?new g.NO_OP:new d.PATCH(o)},d.PATCH.prototype.drilldown=function(e){if(!Number.isInteger(e)||e<0)return new g.NO_OP;var n=0,r=null;return this.hunks.forEach(function(t){(n+=t.offset)<=e&&e<n+t.length&&(r=t.op.drilldown(e-n)),n+=t.length}),r||new g.NO_OP},d.PATCH.prototype.inverse=function(n){var r=0;return new d.PATCH(this.hunks.map(function(t){var e={offset:t.offset,length:t.length+t.op.get_length_change(t.length),op:t.op.inverse(n.slice(r+t.offset,r+t.offset+t.length))};return r+=t.offset+t.length,e}))},d.PATCH.prototype.atomic_compose=function(t){return t instanceof d.PATCH?function(t,e){var r=[],o=0;function n(t,n){return{index:0,hunks:t.hunks.slice(),empty:function(){return 0==this.hunks.length},take:function(){var t=this.end(),e=this.hunks.shift();r.push({offset:this.index+e.offset-o,length:e.length,op:e.op}),this.index=t,o=this.index},skip:function(){this.index=this.end(),this.hunks.shift()},start:function(){return this.index+this.hunks[0].offset},end:function(){var t=this.hunks[0],e=this.index+t.offset+t.length;return 0==n&&(e+=t.op.get_length_change(t.length)),e}}}for(var i=n(t,0),a=n(e,1);!i.empty()||!a.empty();)if(a.empty())i.take();else if(i.empty())a.take();else if(i.end()<=a.start())i.take();else if(a.end()<=i.start())a.take();else{var s=a.start()-i.start(),u=a.end()-i.end();if(0<=s&&u<=0){var f=a.hunks[0].op,p=f.get_length_change(a.hunks[0].length);0==s&&0==u||(f=new d.PATCH([{offset:s,length:a.hunks[0].length,op:f}]));var c=i.hunks[0].op.atomic_compose(f);if(!c&&0==s&&0==u&&f instanceof d.MAP&&f.op instanceof g.SET&&(c=f),c){i.hunks[0]={offset:i.hunks[0].offset,length:i.hunks[0].length,op:c},a.index+=p,a.skip();continue}}if(0<s){var l,h=i.hunks[0].op.decompose(!0,s);if(0!=i.hunks[0].op.get_length_change(i.hunks[0].length))return null;l=s,r.push({offset:i.index+i.hunks[0].offset-o,length:l,op:h[0]}),i.index=i.start()+s,o=i.index,i.hunks[0]={offset:0,length:i.hunks[0].length-l,op:h[1]}}else if(s<0)h=a.hunks[0].op.decompose(!1,-s),r.push({offset:a.index+a.hunks[0].offset-o,length:-s,op:h[0]}),a.index=a.start()+-s,o=a.index,a.hunks[0]={offset:0,length:a.hunks[0].length- -s,op:h[1]};else{if(!(0<u&&a.hunks[0].op instanceof g.SET))return null;p=i.hunks[0].op.get_length_change(i.hunks[0].length),a.hunks[0]={offset:a.hunks[0].offset,length:a.hunks[0].length-p,op:a.hunks[0].op},i.skip(),i.index-=p}}return new d.PATCH(r).simplify()}(this,t):null},d.PATCH.prototype.rebase_functions=[[d.PATCH,function(t,e){return c(this,t,e)}]],d.PATCH.prototype.get_length_change=function(t){var e=0;return this.hunks.forEach(function(t){e+=t.op.get_length_change(t.length)}),e},d.MAP.prototype.inspect=function(t){return n.format("<MAP %s>",this.op.inspect(t-1))},d.MAP.prototype.visit=function(t){var e=new d.MAP(this.op.visit(t));return t(e)||e},d.MAP.prototype.internalToJSON=function(t,e){t.op=this.op.toJSON(void 0,e)},d.MAP.internalFromJSON=function(t,e,n){return new d.MAP(y.opFromJSON(t.op,e,n))},d.MAP.prototype.apply=function(t){var e;e="string"==typeof t?t.split(/.{0}/):t.slice();for(var n=0;n<e.length;n++)if(e[n]=this.op.apply(e[n]),"string"==typeof t&&("string"!=typeof e[n]||1!=e[n].length))throw new Error("Invalid operation: String type or length changed.");return"string"==typeof t?e.join(""):e},d.MAP.prototype.simplify=function(){return this.op.simplify()instanceof g.NO_OP?new g.NO_OP:this},d.MAP.prototype.drilldown=function(t){return(!Number.isInteger(t)||t<0)&&new g.NO_OP,this.op},d.MAP.prototype.inverse=function(t){if(0==t.length)return new d.NO_OP;if(1==t.length)return new d.MAP(this.op.inverse(t[0]));var e=[];return"string"==typeof t&&(t=t.split(/.{0}/)),t.forEach(function(t){e.append({offset:0,length:1,op:this.op.inverse(t)})}),new d.PATCH(e)},d.MAP.prototype.atomic_compose=function(t){if(t instanceof d.MAP){var e=this.op.atomic_compose(t.op);if(e)return new d.MAP(e)}return null},d.MAP.prototype.rebase_functions=[[d.MAP,function(e,t){var n,r;if(t&&"document"in t)if(1==t.document.length){(a=h(t)).document=a.document[0],n=this.op.rebase(e.op,a),r=e.op.rebase(this.op,a)}else{if(0==t.document.length)return[new y.NO_OP,new y.NO_OP];for(var o=!0,i=0;i<t.document.length;i++){var a;(a=h(t)).document=t.document[i];var s=this.op.rebase(e.op,a),u=e.op.rebase(this.op,a);0==i?(n=s,r=u):(p(n,s,{strict:!0})||(o=!1),p(r,u,{strict:!0})||(o=!1))}if(!o){var f=this;return c(n=new d.PATCH(t.document.map(function(t){return{offset:0,length:1,op:f}})),r=new d.PATCH(t.document.map(function(t){return{offset:0,length:1,op:e}})),t)}}else n=this.op.rebase(e.op,t),r=e.op.rebase(this.op,t);if(n&&r)return[n instanceof g.NO_OP?new g.NO_OP:new d.MAP(n),r instanceof g.NO_OP?new g.NO_OP:new d.MAP(r)]}],[d.PATCH,function(t,e){if(0==t.hunks.length)return[this,t];var n,r=this;return t.hunks.forEach(function(t){if(t.op instanceof d.MAP){var e=r.rebase_functions[0][1].call(r,t.op);e?void 0!==n?p(n[0],e[0],{strict:!0})&&p(n[1],e[1],{strict:!0})||(n=null):n=e:n=null}else n=null}),null!=n&&p(n[0],this,{strict:!0})?[n[0],new d.PATCH(t.hunks.map(function(t){return(t=h(t)).op=n[1],t}))]:e&&"document"in e?c(new d.PATCH([{offset:0,length:e.document.length,op:this}]),t,e):void 0}]],d.MAP.prototype.get_length_change=function(t){return 0},d.MAP.prototype.decompose=function(t,e){return[this,this]},d.createRandomOp=function(a,s){s="string"==typeof a?"string":"array";var t=[];return t.push(function(){for(var t=[],e=0;e<a.length;){var n=e+Math.floor(Math.random()*(a.length+1-e)),r=n<a.length?Math.floor(Math.random()*(a.length-n+1)):0,o=a.slice(n,n+r),i=g.createRandomOp(o,s);if(t.push({offset:n-e,length:r,op:i}),e=n+r,Math.random()<.25)break}return new d.PATCH(t)}),t.push(function(){for(;;){var t;0==a.length?"string"==typeof a?t="?":Array.isArray(a)&&(t=null):(n=a,r=Math.floor(Math.random()*a.length),t="string"==typeof n?n.charAt(r):n[r]);var e=g.createRandomOp(t,s+"-elem");try{return"string"==typeof a&&(a=a.split("")),a.forEach(function(t){e.apply(t)}),new d.MAP(e)}catch(t){}}var n,r}),t[Math.floor(Math.random()*t.length)]()}},function(t,o,e){var n=e(2),i=e(0),r=e(24).JSONPointer;function a(t){return t.path.map(function(t){return"/"+t.replace(/~/g,"~0").replace(/\//g,"~1")}).join("")}function s(t,e){for(var n=[],r=0;r<t.length;r++){var o=t.path[r];Array.isArray(e)&&(o=parseInt(o)),n.push(o),e=e[o]}return n}function u(t,e,n){for(var r=s(t,e),o=r.length-1;0<=o;)n="string"==typeof r[o]?new i.APPLY(r[o],n):new i.ATINDEX(r[o],n),o--;return n}function f(t){var e=[];if("string"==typeof t||Array.isArray(t)){if(0==t.length)return e;var n=Math.floor(Math.random()*t.length);e.push(""+n);try{Math.random()<.5&&"string"!=typeof t&&(e=e.concat(f(t[n])))}catch(t){}}else{if("object"!=typeof t||null===t)throw new Error("COPY cannot apply to this document type: "+t);var r=Object.keys(t);if(0==r.length)return e;var o=r[Math.floor(Math.random()*r.length)];e.push(o);try{Math.random()<.5&&(e=e.concat(f(t[o])))}catch(t){}}return e}o.module_name="copies",o.COPY=function(t){if(!Array.isArray(t))throw new Error("argument must be a list");this.pathpairs=t.map(function(t){if(!Array.isArray(t)||2!=t.length)throw new Error("each element in pathpairs must be an array of two string elements");if(t[0]instanceof r&&t[1]instanceof r)return t;if("string"!=typeof t[0]||"string"!=typeof t[1])throw new Error("each element in pathpairs must be an array of two strings");if(t[0]==t[1])throw new Error("can't copy a path to itself");return[new r(t[0]),new r(t[1])]}),Object.freeze(this)},o.COPY.prototype=Object.create(i.BaseOperation.prototype),i.add_op(o.COPY,o,"COPY"),o.COPY.prototype.inspect=function(t){return n.format("<COPY %s>",this.pathpairs.map(function(t){return a(t[0])+" => "+a(t[1])}).join(", "))},o.COPY.prototype.visit=function(t){return t(this)||this},o.COPY.prototype.internalToJSON=function(t,e){t.pathpairs=this.pathpairs.map(function(t){return[a(t[0]),a(t[1])]})},o.COPY.internalFromJSON=function(t,e,n){return new o.COPY(t.pathpairs)},o.COPY.prototype.apply=function(n){return this.pathpairs.forEach(function(t){var e=t[0].get(n);n=t[1].replace(n,e)}),n},o.COPY.prototype.simplify=function(t){return this},o.COPY.prototype.inverse=function(e){return new i.LIST(this.pathpairs.map(function(t){return u(t[1],e,new i.SET(t[1].get(e)))}))},o.COPY.prototype.atomic_compose=function(t){if(t instanceof o.COPY)return new o.COPY(this.pathpairs.concat(t.pathpairs)).simplify()},o.rebase=function(t,e,n,r){},o.COPY.prototype.clone_operation=function(n,r){var o=[n];return this.pathpairs.forEach(function(t){var e=function(t,e,n){for(var r=s(t,e),o=0;o<r.length;o++)n=n.drilldown(r[o]);return n}(t[0],r,n);e.isNoOp()||o.push(u(t[1],r,e))}),new i.LIST(o).simplify()},o.COPY.prototype.drilldown=function(t){throw"hmm"},o.createRandomOp=function(t,e){for(var n=[];;){var r=[a({path:f(t)}),a({path:f(t)})];if(r[0]!=r[1]&&n.push(r),Math.random()<.5)break}return new o.COPY(n)}},function(t,e,n){!function(t){var n,a,s,u;function f(t){Error.call(this,t),this.message=t}function p(t){Error.call(this,t),this.message=t}function c(t){var e,n;if(u(t))return t.slice();if(null===t)return t;if("object"!=typeof t)return t;for(n in e={},t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function o(t,r){!function(t){var e,n;if(!t.op)throw new f("Operation missing!");if(!s.hasOwnProperty(t.op))throw new f("Invalid operation!");if(!("path"in t))throw new f("Path missing!");for(n=s[t.op],e=0;e<n.length;e++)if(!(n[e]in t))throw new f(t.op+" must have key "+n[e])}(t);var e=t.op,o=new a(t.path),n=t.value,i=t.from?new a(t.from):null;switch(e){case"add":return function(t){return o.add(t,n,r)};case"remove":return function(t){return o.remove(t,r)};case"replace":return function(t){return o.replace(t,n,r)};case"move":if(o.subsetOf(i))throw new f("destination must not be a child of source");return function(t){var e=i.get(t),n=i.remove(t,r);return o.add(n,e,r)};case"copy":return function(t){var e=i.get(t);return o.add(t,e,r)};case"test":return function(t){if(!function t(e,n){var r;if(e===n)return!0;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;var o=u(e),i=u(n);if(o!==i)return!1;if(!o){for(r in e)if(Object.hasOwnProperty(e,r)&&(!Object.hasOwnProperty(n,r)||!t(e[r],n[r])))return!1;for(r in n)if(Object.hasOwnProperty(n,r)&&!Object.hasOwnProperty(e,r))return!1;return!0}if(e.length!=n.length)return!1;for(var a=0;a<e.length;a++)return t(e[a],n[a])}(o.get(t),n))throw new p("Test operation failed. Value did not match.");return t}}}u=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},t.apply_patch=function(t,e){return new n(e).apply(t)},(t.InvalidPatch=f).prototype=new Error,(t.PatchApplyError=p).prototype=new Error,t.JSONPointer=a=function(t){var e,n,r=[];if(""!==(n=t.split("/"))[0])throw new f("JSONPointer must start with a slash (or be an empty string)!");for(e=1;e<n.length;e++)r[e-1]=n[e].replace(/~1/g,"/").replace(/~0/g,"~");this.path=r,this.length=r.length},a.prototype._get_segment=function(t,e){var n=this.path[t];if(u(e))if("-"===n)n=e.length;else{if(!n.match(/^[0-9]*$/))throw new p("Expected a number to segment an array");n=parseInt(n,10)}return n},a.prototype._action=function(t,i,a){var s=this;return function t(e,n){var r,o;if(a||(e=c(e)),r=s._get_segment(n,e),n==s.path.length-1)e=i(e,r);else{if(u(e)){if(e.length<=r)throw new p("Path not found in document")}else{if("object"!=typeof e)throw new p("Path not found in document");if(!Object.hasOwnProperty.call(e,r))throw new p("Path not found in document")}o=t(e[r],n+1),a||(e[r]=o)}return e}(t,0)},a.prototype.add=function(t,n,e){return 0===this.length?n:this._action(t,function(t,e){if(u(t)){if(e>t.length)throw new p("Add operation must not attempt to create a sparse array!");t.splice(e,0,n)}else t[e]=n;return t},e)},a.prototype.remove=function(t,e){if(0!==this.length)return this._action(t,function(t,e){if(!Object.hasOwnProperty.call(t,e))throw new p("Remove operation must point to an existing value!");return u(t)?t.splice(e,1):delete t[e],t},e)},a.prototype.replace=function(t,n,e){return 0===this.length?n:this._action(t,function(t,e){if(!Object.hasOwnProperty.call(t,e))throw new p("Replace operation must point to an existing value!");return u(t)?t.splice(e,1,n):t[e]=n,t},e)},a.prototype.get=function(t){var n;return 0===this.length?t:(this._action(t,function(t,e){if(!Object.hasOwnProperty.call(t,e))throw new p("Path not found in document");return n=t[e],t},!0),n)},a.prototype.subsetOf=function(t){if(this.length<=t.length)return!1;for(var e=0;e<t.length;e++)if(t.path[e]!==this.path[e])return!1;return!0},s={add:["value"],replace:["value"],test:["value"],remove:[],move:["from"],copy:["from"]},t.JSONPatch=n=function(t,e){this._compile(t,e)},n.prototype._compile=function(t,e){var n;if(this.compiledOps=[],"string"==typeof t&&(t=JSON.parse(t)),!u(t))throw new f("Patch must be an array of operations");for(n=0;n<t.length;n++){var r=o(t[n],e);this.compiledOps.push(r)}},t.JSONPatch.prototype.apply=function(t){var e;for(e=0;e<this.compiledOps.length;e++)t=this.compiledOps[e](t);return t}}(t.exports)},function(t,e,m){var v=m(5),w=m(0);function O(t,e,n){function r(t){if(void 0===t)throw new Error("Illegal argument: undefined passed to diff");if(null===t)return"null";if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)return typeof t;if(Array.isArray(t))return"array";if("object"!=typeof t)throw new Error("Illegal argument: "+typeof t+" passed to diff");return"object"}var u,f,p,c,o,i,l,h,y,g,a=r(t),s=r(e);return v(t,e,{strict:!0})?{op:new w.NO_OP,pct:0,size:JSON.stringify(t).length}:"string"==a&&"string"==s?function(t,e,n){var r=m(26),o="Chars";n.words&&(o="Words");n.lines&&(o="Lines");n.sentences&&(o="Sentences");var i=0,a=0,s=0,u=r["diff"+o](t,e).map(function(t){if(i+=t.value.length,t.added||t.removed){a+=t.value.length;var e=0,n="";t.removed&&(e=t.value.length),t.added&&(n=t.value);var r={offset:s,length:e,op:new w.SET(n)};return s=0,r}return s+=t.value.length,null}).filter(function(t){return null!=t});return{op:new w.PATCH(u).simplify(),pct:(a+1)/(i+1),size:i}}(t,e,n):"array"==a&&"array"==s?(u=t,f=e,p=n,c=m(37),o=u.map(function(t,e){return e}),i=f.map(function(t,e){return e}),l=[],function i(e,n,a){var r=[],o=0,s=0;c(e,n,function(t,e){return O(u[t],f[e],p).pct<=a}).forEach(function(t){if(t.removed||t.added)0!=r.length&&"equal"!=r[r.length-1].type||r.push({type:"unequal",ai:[],bi:[]}),t.added?(r[r.length-1].bi=r[r.length-1].bi.concat(t.items),s+=t.items.length):t.removed&&(r[r.length-1].ai=r[r.length-1].ai.concat(t.items),o+=t.items.length);else{if(o+t.items.length>e.length)throw new Error("out of range");if(s+t.items.length>n.length)throw new Error("out of range");r.push({type:"equal",ai:e.slice(o,o+t.items.length),bi:n.slice(s,s+t.items.length)}),o+=t.items.length,s+=t.items.length}}),r.forEach(function(t){if(a<1&&0<t.ai.length&&0<t.bi.length&&(0<a||"unequal"==t.type))i(t.ai,t.bi,(a+1.1)/2);else{if(t.ai.length!=t.bi.length){var e=new w.SPLICE(g,t.ai.length,t.bi.map(function(t){return f[t]}));l.push(e);var n=JSON.stringify(t.ai.map(function(t){return u[t]}))+JSON.stringify(t.bi.map(function(t){return f[t]}));n=n.length/2,h+=n,y+=n}else for(var r=0;r<t.ai.length;r++){var o=O(u[t.ai[r]],f[t.bi[r]],p);o.op.isNoOp()||l.push(new w.ATINDEX(t.bi[r],o.op)),h+=o.size,y+=o.size*o.pct}g+=t.bi.length}})}(o,i,g=y=h=0),{op:new w.LIST(l).simplify(),pct:(y+1)/(h+1),size:h}):"object"==a&&"object"==s?function(t,e,n){var r=[],o=0,i=0;for(var a in t)a in e&&(d=O(t[a],e[a],n),d.op.isNoOp()||r.push(new w.APPLY(a,d.op)),o+=d.size,i+=d.size*d.pct);var s=[],u={},f={};for(var a in s.sort(function(t,e){return t.diff.pct*t.diff.size-e.diff.pct*e.diff.size}),s.forEach(function(t){t.a_key in u||t.b_key in f||(u[t.a_key]=1,f[t.b_key]=1,r.push(new w.REN(t.a_key,t.b_key)),t.diff.op.isNoOp()||r.push(new w.APPLY(t.b_key,t.diff.op)),o+=t.diff.size,i+=t.diff.size*t.diff.pct)}),t)a in e||a in u||r.push(new w.REM(a));for(var a in e)a in t||a in f||r.push(new w.PUT(a,e[a]));return{op:new w.LIST(r).simplify(),pct:(i+1)/(o+1),size:o}}(t,e,n):{op:new w.SET(e),pct:1,size:(JSON.stringify(t)+JSON.stringify(e)).length/2}}e.diff=function(t,e,n){return O(t,e,n=n||{}).op}},function(t,e,n){"use strict";e.__esModule=!0,e.canonicalize=e.convertChangesToXML=e.convertChangesToDMP=e.parsePatch=e.applyPatches=e.applyPatch=e.createPatch=e.createTwoFilesPatch=e.structuredPatch=e.diffJson=e.diffCss=e.diffSentences=e.diffTrimmedLines=e.diffLines=e.diffWordsWithSpace=e.diffWords=e.diffChars=e.Diff=void 0;var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r},a=n(27),s=n(28),u=n(7),f=n(29),p=n(30),c=n(31),l=n(32),h=n(11),d=n(34),y=n(35),g=n(36);e.Diff=i.default,e.diffChars=a.diffChars,e.diffWords=s.diffWords,e.diffWordsWithSpace=s.diffWordsWithSpace,e.diffLines=u.diffLines,e.diffTrimmedLines=u.diffTrimmedLines,e.diffSentences=f.diffSentences,e.diffCss=p.diffCss,e.diffJson=c.diffJson,e.structuredPatch=d.structuredPatch,e.createTwoFilesPatch=d.createTwoFilesPatch,e.createPatch=d.createPatch,e.applyPatch=l.applyPatch,e.applyPatches=l.applyPatches,e.parsePatch=h.parsePatch,e.convertChangesToDMP=y.convertChangesToDMP,e.convertChangesToXML=g.convertChangesToXML,e.canonicalize=c.canonicalize},function(t,e,n){"use strict";e.__esModule=!0,e.characterDiff=void 0,e.diffChars=function(t,e,n){return a.diff(t,e,n)};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r};var a=e.characterDiff=new i.default},function(t,e,n){"use strict";e.__esModule=!0,e.wordDiff=void 0,e.diffWords=function(t,e,n){var r=(0,a.generateOptions)(n,{ignoreWhitespace:!0});return f.diff(t,e,r)},e.diffWordsWithSpace=function(t,e,n){return f.diff(t,e,n)};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r},a=n(10);var s=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,u=/\S/,f=e.wordDiff=new i.default;f.equals=function(t,e){return t===e||this.options.ignoreWhitespace&&!u.test(t)&&!u.test(e)},f.tokenize=function(t){for(var e=t.split(/(\s+|\b)/),n=0;n<e.length-1;n++)!e[n+1]&&e[n+2]&&s.test(e[n])&&s.test(e[n+2])&&(e[n]+=e[n+2],e.splice(n+1,2),n--);return e}},function(t,e,n){"use strict";e.__esModule=!0,e.sentenceDiff=void 0,e.diffSentences=function(t,e,n){return a.diff(t,e,n)};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r};var a=e.sentenceDiff=new i.default;a.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)}},function(t,e,n){"use strict";e.__esModule=!0,e.cssDiff=void 0,e.diffCss=function(t,e,n){return a.diff(t,e,n)};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r};var a=e.cssDiff=new i.default;a.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)}},function(t,e,n){"use strict";e.__esModule=!0,e.jsonDiff=void 0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};e.diffJson=function(t,e,n){return f.diff(t,e,n)},e.canonicalize=p;var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r},a=n(7);var u=Object.prototype.toString,f=e.jsonDiff=new i.default;function p(t,e,n){e=e||[],n=n||[];var r=void 0;for(r=0;r<e.length;r+=1)if(e[r]===t)return n[r];var o=void 0;if("[object Array]"===u.call(t)){for(e.push(t),o=new Array(t.length),n.push(o),r=0;r<t.length;r+=1)o[r]=p(t[r],e,n);return e.pop(),n.pop(),o}if(t&&t.toJSON&&(t=t.toJSON()),"object"===(void 0===t?"undefined":s(t))&&null!==t){e.push(t),o={},n.push(o);var i=[],a=void 0;for(a in t)t.hasOwnProperty(a)&&i.push(a);for(i.sort(),r=0;r<i.length;r+=1)o[a=i[r]]=p(t[a],e,n);e.pop(),n.pop()}else o=t;return o}f.useLongestToken=!0,f.tokenize=a.lineDiff.tokenize,f.castInput=function(t){return"string"==typeof t?t:JSON.stringify(p(t),void 0," ")},f.equals=function(t,e){return i.default.prototype.equals(t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))}},function(t,e,n){"use strict";e.__esModule=!0,e.applyPatch=a,e.applyPatches=function(t,i){"string"==typeof t&&(t=(0,M.parsePatch)(t));var e=0;!function r(){var o=t[e++];if(!o)return i.complete();i.loadFile(o,function(t,e){if(t)return i.complete(t);var n=a(e,o,i);i.patched(o,n,function(t){if(t)return i.complete(t);r()})})}()};var r,M=n(11),o=n(33),E=(r=o)&&r.__esModule?r:{default:r};function a(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if("string"==typeof e&&(e=(0,M.parsePatch)(e)),Array.isArray(e)){if(1<e.length)throw new Error("applyPatch only works with a single input.");e=e[0]}var a=t.split("\n"),r=e.hunks,s=n.compareLine||function(t,e,n,r){return e===r},u=0,f=n.fuzzFactor||0,o=0,i=0,p=void 0,c=void 0;function l(t,e){for(var n=0;n<t.lines.length;n++){var r=t.lines[n],o=r[0],i=r.substr(1);if(" "===o||"-"===o){if(!s(e+1,a[e],o,i)&&f<++u)return!1;e++}}return!0}for(var h=0;h<r.length;h++){for(var d=r[h],y=a.length-d.oldLines,g=0,m=i+d.oldStart-1,v=(0,E.default)(m,o,y);void 0!==g;g=v())if(l(d,m+g)){d.offset=i+=g;break}if(void 0===g)return!1;o=d.offset+d.oldStart+d.oldLines}for(var w=0;w<r.length;w++){var O=r[w],b=O.offset+O.newStart-1;0==O.newLines&&b++;for(var P=0;P<O.lines.length;P++){var _=O.lines[P],T=_[0],A=_.substr(1);if(" "===T)b++;else if("-"===T)a.splice(b,1);else if("+"===T)a.splice(b,0,A),b++;else if("\\"===T){var S=O.lines[P-1]?O.lines[P-1][0]:null;"+"===S?p=!0:"-"===S&&(c=!0)}}}if(p)for(;!a[a.length-1];)a.pop();else c&&a.push("");return a.join("\n")}},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(e,n,r){var o=!0,i=!1,a=!1,s=1;return function t(){if(o&&!a){if(i?s++:o=!1,e+s<=r)return s;a=!0}if(!i)return a||(o=!0),n<=e-s?-s++:(i=!0,t())}}},function(t,e,n){"use strict";e.__esModule=!0,e.structuredPatch=c,e.createTwoFilesPatch=s,e.createPatch=function(t,e,n,r,o,i){return s(t,t,e,n,r,o,i)};var a=n(7);function P(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function c(t,e,c,l,n,r,h){h||(h={context:4});var d=(0,a.diffLines)(c,l);function y(t){return t.map(function(t){return" "+t})}d.push({value:"",lines:[]});for(var g=[],m=0,v=0,w=[],O=1,b=1,o=function(t){var e=d[t],n=e.lines||e.value.replace(/\n$/,"").split("\n");if(e.lines=n,e.added||e.removed){var r;if(!m){var o=d[t-1];m=O,v=b,o&&(w=0<h.context?y(o.lines.slice(-h.context)):[],m-=w.length,v-=w.length)}(r=w).push.apply(r,P(n.map(function(t){return(e.added?"+":"-")+t}))),e.added?b+=n.length:O+=n.length}else{if(m)if(n.length<=2*h.context&&t<d.length-2){var i;(i=w).push.apply(i,P(y(n)))}else{var a,s=Math.min(n.length,h.context);(a=w).push.apply(a,P(y(n.slice(0,s))));var u={oldStart:m,oldLines:O-m+s,newStart:v,newLines:b-v+s,lines:w};if(t>=d.length-2&&n.length<=h.context){var f=/\n$/.test(c),p=/\n$/.test(l);0!=n.length||f?f&&p||w.push("\\ No newline at end of file"):w.splice(u.oldLines,0,"\\ No newline at end of file")}g.push(u),v=m=0,w=[]}O+=n.length,b+=n.length}},i=0;i<d.length;i++)o(i);return{oldFileName:t,newFileName:e,oldHeader:n,newHeader:r,hunks:g}}function s(t,e,n,r,o,i,a){var s=c(t,e,n,r,o,i,a),u=[];t==e&&u.push("Index: "+t),u.push("==================================================================="),u.push("--- "+s.oldFileName+(void 0===s.oldHeader?"":"\t"+s.oldHeader)),u.push("+++ "+s.newFileName+(void 0===s.newHeader?"":"\t"+s.newHeader));for(var f=0;f<s.hunks.length;f++){var p=s.hunks[f];u.push("@@ -"+p.oldStart+","+p.oldLines+" +"+p.newStart+","+p.newLines+" @@"),u.push.apply(u,p.lines)}return u.join("\n")+"\n"}},function(t,e,n){"use strict";e.__esModule=!0,e.convertChangesToDMP=function(t){for(var e=[],n=void 0,r=void 0,o=0;o<t.length;o++)n=t[o],r=n.added?1:n.removed?-1:0,e.push([r,n.value]);return e}},function(t,e,n){"use strict";function o(t){var e=t;return e=(e=(e=(e=e.replace(/&/g,"&amp;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;")).replace(/"/g,"&quot;")}e.__esModule=!0,e.convertChangesToXML=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];r.added?e.push("<ins>"):r.removed&&e.push("<del>"),e.push(o(r.value)),r.added?e.push("</ins>"):r.removed&&e.push("</del>")}return e.join("")}},function(t,e,n){"use strict";t.exports=function(t,e,n){n=n||h;for(var r=t.length,o=e.length,i=r+o,a={},s=[],u=a[1]=0;u<=i;u+=1){for(var f=-u;f<=u;f+=2){var p,c;for(p=f===-u||f!==u&&a[f-1]<a[f+1]?a[f+1]:a[f-1]+1,c=p-f;p<r&&c<o&&n(t[p],e[c]);)p+=1,c+=1;if(a[f]=p,r<=p&&o<=c)return s[u]=l({},a),d(s,t,e)}s[u]=l({},a)}throw Error("Unreachable diff path reached")};var l=n(38);function h(t,e){return t===e}function d(t,e,n){for(var r=[],o={x:e.length,y:n.length},i=t.length-1;0<o.x||0<o.y;i-=1){for(var a=t[i],s=o.x-o.y,u=a[s],f=s===-i||s!==i&&a[s-1]<a[s+1],p=f?s+1:s-1,c=a[p],l=c-p,h=f?c:c+1;h<u;)y(r,e[u-1],!1,!1),u-=1;if(l<0)break;f?y(r,n[l],!0,!1):y(r,e[c],!1,!0),o.x=c,o.y=l}return r.reverse()}function y(t,e,n,r){var o=t[t.length-1];o&&o.added===n&&o.removed===r?o.items.unshift(e):t.push({items:[e],added:n,removed:r})}},function(t,e,n){"use strict";t.exports=Object.assign||function(t,e){for(var n,r,o=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),i=1;i<arguments.length;i++){n=arguments[i],r=Object.keys(Object(n));for(var a=0;a<r.length;a++)o[r[a]]=n[r[a]]}return o}}]); \ No newline at end of file