UNPKG

emcellent-toolkit

Version:

A toolkit for performing neat functions with M/MUMPS data.

3 lines 71.3 kB
/*! eMcellent-toolkit - v0.0.1 - 2015-06-03 */ !function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.mTools=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a){var b=j.map(a,function(a){var b=h.markupCommand(a);return b});return b}function e(a){var b="";return j.each(a,function(c,d){var e="";e=g.renderLabel(c,e),e=g.renderIndentation(c,e),e=g.renderRoutines(c,e),e=g.renderComment(c,e),d===a.length-1?b+=e:b=b+e+"<br>"}),b}function f(a,b){var c="";if(j.isNull(a))return null;if(!j.isString(a))throw new Error("input must be a string");if(j.isUndefined(b))c=a;else{if(!j.isPlainObject(b))throw new Error("options must be an object");var f=i.parse(a);b.verbose&&(f=d(f)),c=b.HTML?e(f):i.render(f)}return c}var g=a("./lib/html.js"),h=a("./lib/markup.js"),i=a("emcellent"),j=a("lodash");b.exports.markup=f},{"./lib/html.js":2,"./lib/markup.js":4,emcellent:5,lodash:8}],2:[function(a,b,c){"use strict";function d(a,b){var c='<a class="mLabel" data-toggle="tooltip" data-placement="top" title="Line Label">',d="</a>";return a.lineLabel&&(b=b+c+a.lineLabel+d),a.lineLeadSpace&&(b+=a.lineLeadSpace),b}function e(a,b){var c='<a class="mIndentation" data-toggle="tooltip" data-placement="top" title="Line Level">',d="</a>",e="";if(a.lineIndentationArray&&a.lineIndentationArray.length>0){for(var f in a.lineIndentationArray)e=e+c+"."+d+a.lineIndentationArray[f];b+=e}return b}function f(a,b){var c='<a class="mRoutine" data-toggle="tooltip" data-placement="top" title="Routine">',d='<a class="mPostConditional" data-toggle="tooltip" data-placement="top" title="Post Conditional">',e='<a class="mArguments" data-toggle="tooltip" data-placement="top" title="Arguments">',f="</a>";if(a.lineRoutines)for(var g in a.lineRoutines)if(a.lineRoutines[g].mRoutine||""===a.lineRoutines[g].mRoutine){if(a.lineRoutines[g].mRoutineMarkup){var h=a.lineRoutines[g].mRoutineMarkup;c='<a class="mRoutine" data-toggle="popover" data-placement="top" data-html="true" data-trigger="hover" title="'+h.routineName+'" data-content="<pre>'+h.routineSyntax+"</pre>"+h.routineDesc+'">'}b="0"===g?b+c+a.lineRoutines[g].mRoutine+f:b+" "+c+a.lineRoutines[g].mRoutine+f,a.lineRoutines[g].mPostConditional&&(b=b+":"+d+a.lineRoutines[g].mPostConditional+f),a.lineRoutines[g].hasOwnProperty("mArguments")&&(b=b+" "+e+a.lineRoutines[g].mArguments+f)}return b}function g(a,b){var c='<a class="mComment" data-toggle="tooltip" data-placement="top" title="Comments">',d="</a>";return a.hasOwnProperty("lineComment")&&(b=b+c+";"+a.lineComment+d),b}b.exports.renderLabel=d,b.exports.renderIndentation=e,b.exports.renderRoutines=f,b.exports.renderComment=g},{}],3:[function(a,b,c){b.exports=[{routineName:"BREAK",routineSyntax:"BREAK:Postconditional",routineDesc:"Stops execution of current process for debugging until signaled."},{routineName:"CLOSE",routineSyntax:"CLOSE:Postconditional Device:Parameters",routineDesc:"Releases ownership of an i/o device. Close can also use device parameters to manipulate the device as it is released. If the current device is closed, the special variable $io will be empty or reset to a default value."},{routineName:"DO",routineSyntax:"DO:Postconditional Argument:Postconditional",routineDesc:"Executes a subroutine, then returns control to the next command after the do; for multiple arguments, each subroutine in turn is executed. The line referenced in each argument must have a line level of one, or the do will cause error m14. Argumentless do executes the following block of code, with a line level one greater than the do’s line level, then returns."},{routineName:"ELSE",routineSyntax:"ELSE",routineDesc:"Lets rest of the line execute only if $test evaluates to false."},{routineName:"FOR",routineSyntax:"FOR Variable=Parameters",routineDesc:"Repeats execution of the rest of the line, and sets the value of a variable each time. Argumentless for repeats execution of the rest of the line without setting a variable. A quit or goto command terminates a for loop on the current line; quit terminates only the most recent in a series of nested for loops on the line, whereas goto terminates all active for loops on the line. Argument indirection not allowed. Each for parameter defines a series of one or more values for the variable to accept, and executes the rest of the line once for each value in that series. Each for parameter can be either a single evaluated expression, or a range of numeric values. Ranges include a starting value, an increment with which to calculate subsequent values, and an optional maximum value. A for loop that runs out of values stops without needing a quit or goto."},{routineName:"GOTO",routineSyntax:"GOTO:Postconditional Reference:Postconditional",routineDesc:"Transfers execution to a different line of code, without returning when that block of code completes. Trying to goto a line at a different line level, or trying to cross block boundaries when the goto’s line level is greater than one, causes error m45."},{routineName:"HALT",routineSyntax:"HALT:Postconditional",routineDesc:"Ends the process. Releases all locked names, closes all opened devices, and aborts all active transactions. Halt never takes an argument."},{routineName:"HANG",routineSyntax:"HANG:Postconditional Expression",routineDesc:"Suspends execution of the process for approximately the specified number of seconds. Negative numbers or zero do not stop execution. Hang always takes an argument."},{routineName:"IF",routineSyntax:"IF Expression",routineDesc:"Lets the rest of the line execute only if all arguments evaluate to true; sets $test to whether the if succeeded. Argumentless if lets the rest of the line execute only if $test = 1. Note that because if with multiple arguments is identical to multiple, independent if commands, later arguments are evaluated only if earlier ones succeed."},{routineName:"JOB",routineSyntax:"JOB:Postconditional Argument:Parameters:Timeout",routineDesc:"Makes an independent process that begins execution at the specified line of code. Timed job sets $test to whether the job command succeeded in the time specified. Note that the job command can only pass parameters by value; trying to pass by reference causes error m40."},{routineName:"KILL",routineSyntax:"KILL:Postconditional Argument",routineDesc:"Removes specified variables, and all their array descendants. Argumentless kill removes all local variables, and their array descendants. An exclusive kill, a kill argument in the form of a parenthesized list of local variables, removes all local variables and their descendants, except those listed within the parentheses and their descendants."},{routineName:"LOCK",routineSyntax:"LOCK:Postconditional Argument:Timeout",routineDesc:"Gets and/or releases ownership of names. Argumentless lock releases ownership of all names held by current process. Names, like devices, can only be owned by one process at a time. Ownership of a name includes all array descendants of that name. Locked names are logical names that look like local and global names for convenience only. A name used as an argument of a lock command does not change the naked reference, nor can it be referred to by the naked reference. Unlike devices, names can be used when not owned; locking is a voluntary signaling mechanism, not a method for preventing access. Locking a name does not prevent other processes from accessing or manipulating variables with the same names, only from successfully locking those names. Mumps code should voluntarily lock names, especially global names, whose simultaneous use by multiple processes would lead to problems, such as loss of database integrity. Each non-incremental lock argument (those without + or -) first releases all names owned by this process, and then gets ownership of the name specified. Incremental and decremental lock arguments get (+) or release (-) ownership of the specified names without releasing any other names. A name incrementally locked multiple times must be decrementally locked an equal number of times to release it. A lock of a list of names enclosed by parentheses will not succeed until all names listed are simultaneously available. A nonincremental lock of a list of names will not release the names owned by the process until it can simultaneously get ownership of all the names in its list. Timed lock sets $test to whether it got ownership of the name in the time requested; network latency and other extraneous delays are not counted in the timeout period. For arguments without a timeout, lock waits indefinitely until the name is released by whatever process owns it. Improperly coded, this can result in a deadly embrace, in which two processes stop execution at lock commands because each owns names for which the other is waiting."},{routineName:"MERGE",routineSyntax:"MERGE:Postconditional Variable=Variable",routineDesc:"Copies the value and all array descendants from one variable to another variable. If either variable is an array descendant of the other, it causes error m19."},{routineName:"NEW",routineSyntax:"NEW:Postconditional Argument",routineDesc:"Saves and temporarily removes locals and their array descendants, and restores them when this block of code ends. Argumentless new saves and temporarily removes all locals and their array descendants, and restores them when this block of code ends. Only unsubscripted local variables or the intrinsic special variables $estack and $etrap may be used in the argument of the new command. An exclusive new, a new argument consisting of a list of names within parentheses, saves and temporarily removes all locals, except those listed and their descendants."},{routineName:"OPEN",routineSyntax:"OPEN:Postconditional Device:Parameters",routineDesc:"Gets ownership of an i/o device, selects the list of available mnemonic spaces for that device, and sets the current mnemonic space to the first in the list selected. Open can also use device parameters to manipulate the device as it is acquired. Trying to open a device with a mnemonic space it doesn’t support causes error m35; trying to open it with incompatible mnemonic spaces causes error m36. Timed open sets $test to whether it got ownership in the specified time."},{routineName:"QUIT",routineSyntax:"QUIT:Postconditional Expression",routineDesc:"Ends the current process level and returns a value; doing so when an argument is not expected causes error m16. Argumentless quit ends the current process level without returning a value, but if one is expected it causes error m17. Quit can also be used to end a for loop on the same line."},{routineName:"READ",routineSyntax:"READ:Postconditional Argument",routineDesc:'Gets input from the current i/o device and puts the response in the specified variables. Any text and format control characters in the argument of the read command are output on the current device. Timed read sets $test to whether read got a response in the specified time. When the argument contains an asterisk preceding a variable name, a code representing a single character is obtained. When the argument contains a variable followed by a "#" and a numeric expression, this expression specifies the maximum number of characters to accept. A number less than zero causes error m18.'},{routineName:"SET",routineSyntax:"SET:Postconditional Destination=Expression",routineDesc:"Puts values into variables. When the set destination is a list of destinations within parentheses, each destination is given the value following the assignment symbol. The $extract and $piece destinations change the specified part of their first arguments. Trying to set $x or $y to a negative or non-integer value causes error m43."},{routineName:"TCOMMIT",routineSyntax:"TCOMMIT:Postconditional",routineDesc:"Commits and ends the current transaction: makes its global changes visible. A tcommit when there is no current transaction causes error m44."},{routineName:"TRESTART",routineSyntax:"TRESTART:Postconditional",routineDesc:"Rolls back the current transaction (see trollback), optionally restores some or all of the symbol table (as dictated by the tstart command, see below), and starts the current transaction again. Attempting to restart a non-restartable transaction rolls back the transaction, ends it, and causes error m27. A trestart when there is no current transaction causes error m44."},{routineName:"TROLLBACK",routineSyntax:"TROLLBACK:Postconditional",routineDesc:"Rolls back a transaction; that is, undoes its global changes and releases any locks acquired within the transaction. A trollback when there is no current transaction causes error m44."},{routineName:"TSTART",routineSyntax:"TSTART:Postconditional Variables:Parameters",routineDesc:"Starts a restartable transaction. Argumentless tstart starts a nonrestartable transaction. When variables are specified, they are restored to their previous values if the transaction is restarted."},{routineName:"USE",routineSyntax:"USE:Postconditional Device:Parameters:MnemSpace",routineDesc:"Picks the current device from the list of i/o devices owned by the current process, and the device’s mnemonic space from the list currently available for that device. Use can also use device parameters to manipulate the current device as it is selected."},{routineName:"VIEW",routineSyntax:"VIEW:Postconditional Argument",routineDesc:"Returns or changes implementation-dependent information."},{routineName:"WRITE",routineSyntax:"WRITE:Postconditional Argument",routineDesc:"Formats and outputs values to the current i/o device. When an argument includes an asterisk followed by an integer value, one character whose code (not necessarily ascii) is the number represented by the integer is sent to the current device; the effect this code has on the device is implementation-specific."},{routineName:"XECUTE",routineSyntax:"XECUTE:Postconditional Expression:Postcondition",routineDesc:"Interprets and executes a value as mumps text. Xecute provides a means of interpreting a data value created during program execution as if it were mumps code. Each argument of the xecute command is interpreted as if it were the text part of a line of mumps code (without label, line start indicator, or line level indicator)."}]},{}],4:[function(a,b,c){"use strict";function d(a){return a?a.lineRoutines?(f.each(a.lineRoutines,function(a){if(a.mRoutine){var b=a.mRoutine.trim().toUpperCase(),c=f.find(e,function(c){var d=c.routineName.substring(0,b.length);if(d===b){if("H"!==b.substring(0,1))return!0;if(f.isUndefined(a.mArguments)&&"HALT"===c.routineName)return!0;if(!f.isUndefined(a.mArguments)&&"HANG"===c.routineName)return!0}});c&&(a.mRoutine=c.routineName,a.mRoutineMarkup=c)}}),a):a:null}var e=a("./json/commands.json"),f=a("lodash");b.exports.markupCommand=d},{"./json/commands.json":3,lodash:8}],5:[function(a,b,c){"use strict";function d(a){var b={};return b=h.extractLabel(a,b),b=h.extractComment(b.lineExpression,b),b=h.extractIndentation(b.lineExpression,b),b=h.extractRoutines(b.lineExpression,b),delete b.lineExpression,b}function e(a){var b="";return b=i.appendLabel(a,b),b=i.appendIndentation(a,b),b=i.appendRoutines(a,b),b=i.appendComment(a,b)}function f(a){a=a.replace("\r","");for(var b=a.split("\n"),c=[],e=0;e<b.length;e++){var f=d(b[e]);f.lineNumber=e+1,c.push(f)}return c}function g(a){var b="",c=[];Array.isArray(a)?c=a:c.push(a);for(var d=0;d<c.length;d++){var f=e(c[d]);d===c.length-1?b+=f:b=b+f+"\n"}return b}var h=a("./lib/parse.js"),i=a("./lib/render.js");b.exports.parse=f,b.exports.render=g},{"./lib/parse.js":6,"./lib/render.js":7}],6:[function(a,b,c){"use strict";function d(a,b){for(var c=0;c<=a.length;c++){if(" "!==a[c]&&" "!==a[c]){if(0===c){b.lineLabel=a.split(/[ \t]/,1)[0];for(var d=b.lineLabel.length;d<=a.length;d++){if(" "!==a[d]&&" "!==a[d]){b.lineLeadSpace=a.substring(b.lineLabel.length,d),b.lineExpression=a.substring(d);break}if(d===a.length-1){b.lineLeadSpace=a.substring(b.lineLabel.length),b.lineExpression="";break}}break}b.lineLeadSpace=a.substring(0,c),b.lineExpression=a.substring(c);break}if(c===a.length-1){b.lineLeadSpace=a,b.lineExpression="";break}}return b}function e(a,b){if(a.search(";")>=0){for(var c=0;c<a.length;c++)if(";"===a[c]){if(a.substring(0,c).split('"').length%2!==0&&a.substring(c).split('"').length%2!==0){b.lineExpression=a.substring(0,c),b.lineComment=a.substring(c).substring(1);break}if(a.substring(0,c).replace("").split('"').length%2!==0&&a.substring(c).split('"').length%2===0){b.lineExpression=a.substring(0,c),b.lineComment=a.substring(c).substring(1);break}b.lineExpression=a}return b}return b.lineExpression=a,b}function f(a,b){for(var c=[],d=0,e=0,f=0,g=0;g<=a.length;g++)if("."===a[g])0!==d&&(f=g,c.push(a.substring(e,f))),e=g+1,d++;else{if("."!==a[g]&&" "!==a[g]&&" "!==a[g]){0!==d&&(f=g,c.push(a.substring(e,f)),b.lineExpression=a.substring(g));break}if(g===a.length-1){f=g+1,c.push(a.substring(e,f)),b.lineExpression=a.substring(g+1);break}}return c.length>0?b.lineIndentationArray=c:b.lineExpression=a,b}function g(a){for(var b=[],c=0,d=0;d<=a.length;d++)" "===a[d]||" "===a[d]?a.substring(0,d).split('"').length%2!==0&&a.substring(d).split('"').length%2!==0&&(a.substring(c,d).length>0?b.push(a.substring(c,d)):0!==a.substring(c,d).length||" "!==a.substring(c-1,c)&&" "!==a.substring(c-1,c)||b.push(a.substring(c,d)),c=d+1):d===a.length&&(a.substring(c,d).length>0?b.push(a.substring(c,d)):d!==c||" "!==a.substring(d-1,d)&&"/t"!==a.substring(d-1,d)||b.push(""));return b}function h(a){for(var b=a,c=0;c<b.length;c++)if(b[c].mRoutine){var d=b[c].mRoutine.indexOf(":");d>-1&&(b[c].mPostConditional=b[c].mRoutine.substring(d+1),b[c].mRoutine=b[c].mRoutine.substring(0,d))}return b}function i(a,b){for(var c={},d=[],e=g(a),f=0;f<e.length;f++)f%2===0?c.mRoutine=e[f]:(c.mArguments=e[f],d.push(c),c={}),e.length%2!==0&&e.length>0&&f===e.length-1&&(c.mRoutine=e[f],d.push(c),c={});var i=h(d);return i.length>0&&(b.lineRoutines=i),b}b.exports.extractLabel=d,b.exports.extractComment=e,b.exports.extractIndentation=f,b.exports.splitRoutinesAndArguments=g,b.exports.extractPostConditional=h,b.exports.extractRoutines=i},{}],7:[function(a,b,c){"use strict";function d(a,b){return a.lineLabel&&(b+=a.lineLabel),a.lineLeadSpace&&(b+=a.lineLeadSpace),b}function e(a,b){var c="";if(a.lineIndentationArray&&a.lineIndentationArray.length>0){for(var d in a.lineIndentationArray)c=c+"."+a.lineIndentationArray[d];b+=c}return b}function f(a,b){if(a.lineRoutines)for(var c in a.lineRoutines)(a.lineRoutines[c].mRoutine||""===a.lineRoutines[c].mRoutine)&&("0"===c?b+=a.lineRoutines[c].mRoutine:b=b+" "+a.lineRoutines[c].mRoutine,a.lineRoutines[c].mPostConditional&&(b=b+":"+a.lineRoutines[c].mPostConditional),a.lineRoutines[c].hasOwnProperty("mArguments")&&(b=b+" "+a.lineRoutines[c].mArguments));return b}function g(a,b){return a.hasOwnProperty("lineComment")&&(b=b+";"+a.lineComment),b}b.exports.appendLabel=d,b.exports.appendIndentation=e,b.exports.appendRoutines=f,b.exports.appendComment=g},{}],8:[function(b,c,d){(function(b){(function(){function e(a,b){if(a!==b){var c=a===a,d=b===b;if(a>b||!c||a===A&&d)return 1;if(b>a||!d||b===A&&c)return-1}return 0}function f(a,b,c){for(var d=a.length,e=c?d:-1;c?e--:++e<d;)if(b(a[e],e,a))return e;return-1}function g(a,b,c){if(b!==b)return r(a,c);for(var d=c-1,e=a.length;++d<e;)if(a[d]===b)return d;return-1}function h(a){return"function"==typeof a||!1}function i(a){return"string"==typeof a?a:null==a?"":a+""}function j(a){return a.charCodeAt(0)}function k(a,b){for(var c=-1,d=a.length;++c<d&&b.indexOf(a.charAt(c))>-1;);return c}function l(a,b){for(var c=a.length;c--&&b.indexOf(a.charAt(c))>-1;);return c}function m(a,b){return e(a.criteria,b.criteria)||a.index-b.index}function n(a,b,c){for(var d=-1,f=a.criteria,g=b.criteria,h=f.length,i=c.length;++d<h;){var j=e(f[d],g[d]);if(j)return d>=i?j:j*(c[d]?1:-1)}return a.index-b.index}function o(a){return Ua[a]}function p(a){return Va[a]}function q(a){return"\\"+Ya[a]}function r(a,b,c){for(var d=a.length,e=b+(c?0:-1);c?e--:++e<d;){var f=a[e];if(f!==f)return e}return-1}function s(a){return!!a&&"object"==typeof a}function t(a){return 160>=a&&a>=9&&13>=a||32==a||160==a||5760==a||6158==a||a>=8192&&(8202>=a||8232==a||8233==a||8239==a||8287==a||12288==a||65279==a)}function u(a,b){for(var c=-1,d=a.length,e=-1,f=[];++c<d;)a[c]===b&&(a[c]=T,f[++e]=c);return f}function v(a,b){for(var c,d=-1,e=a.length,f=-1,g=[];++d<e;){var h=a[d],i=b?b(h,d,a):h;d&&c===i||(c=i,g[++f]=h)}return g}function w(a){for(var b=-1,c=a.length;++b<c&&t(a.charCodeAt(b)););return b}function x(a){for(var b=a.length;b--&&t(a.charCodeAt(b)););return b}function y(a){return Wa[a]}function z(a){function b(a){if(s(a)&&!zh(a)&&!(a instanceof t)){if(a instanceof d)return a;if(Qf.call(a,"__chain__")&&Qf.call(a,"__wrapped__"))return fd(a)}return new d(a)}function c(){}function d(a,b,c){this.__wrapped__=a,this.__actions__=c||[],this.__chain__=!!b}function t(a){this.__wrapped__=a,this.__actions__=null,this.__dir__=1,this.__dropCount__=0,this.__filtered__=!1,this.__iteratees__=null,this.__takeCount__=vg,this.__views__=null}function $(){var a=this.__actions__,b=this.__iteratees__,c=this.__views__,d=new t(this.__wrapped__);return d.__actions__=a?ab(a):null,d.__dir__=this.__dir__,d.__filtered__=this.__filtered__,d.__iteratees__=b?ab(b):null,d.__takeCount__=this.__takeCount__,d.__views__=c?ab(c):null,d}function ca(){if(this.__filtered__){var a=new t(this);a.__dir__=-1,a.__filtered__=!0}else a=this.clone(),a.__dir__*=-1;return a}function ea(){var a=this.__wrapped__.value();if(!zh(a))return ac(a,this.__actions__);var b=this.__dir__,c=0>b,d=Mc(0,a.length,this.__views__),e=d.start,f=d.end,g=f-e,h=c?f:e-1,i=pg(g,this.__takeCount__),j=this.__iteratees__,k=j?j.length:0,l=0,m=[];a:for(;g--&&i>l;){h+=b;for(var n=-1,o=a[h];++n<k;){var p=j[n],q=p.iteratee,r=p.type;if(r==P){if(p.done&&(c?h>p.index:h<p.index)&&(p.count=0,p.done=!1),p.index=h,!p.done){var s=p.limit;if(!(p.done=s>-1?p.count++>=s:!q(o)))continue a}}else{var t=q(o);if(r==R)o=t;else if(!t){if(r==Q)continue a;break a}}}m[l++]=o}return m}function Ua(){this.__data__={}}function Va(a){return this.has(a)&&delete this.__data__[a]}function Wa(a){return"__proto__"==a?A:this.__data__[a]}function Xa(a){return"__proto__"!=a&&Qf.call(this.__data__,a)}function Ya(a,b){return"__proto__"!=a&&(this.__data__[a]=b),this}function Za(a){var b=a?a.length:0;for(this.data={hash:lg(null),set:new dg};b--;)this.push(a[b])}function $a(a,b){var c=a.data,d="string"==typeof b||xe(b)?c.set.has(b):c.hash[b];return d?0:-1}function _a(a){var b=this.data;"string"==typeof a||xe(a)?b.set.add(a):b.hash[a]=!0}function ab(a,b){var c=-1,d=a.length;for(b||(b=Bf(d));++c<d;)b[c]=a[c];return b}function bb(a,b){for(var c=-1,d=a.length;++c<d&&b(a[c],c,a)!==!1;);return a}function cb(a,b){for(var c=a.length;c--&&b(a[c],c,a)!==!1;);return a}function fb(a,b){for(var c=-1,d=a.length;++c<d;)if(!b(a[c],c,a))return!1;return!0}function gb(a,b){for(var c=-1,d=a.length,e=-1,f=[];++c<d;){var g=a[c];b(g,c,a)&&(f[++e]=g)}return f}function hb(a,b){for(var c=-1,d=a.length,e=Bf(d);++c<d;)e[c]=b(a[c],c,a);return e}function ib(a){for(var b=-1,c=a.length,d=ug;++b<c;){var e=a[b];e>d&&(d=e)}return d}function jb(a){for(var b=-1,c=a.length,d=vg;++b<c;){var e=a[b];d>e&&(d=e)}return d}function kb(a,b,c,d){var e=-1,f=a.length;for(d&&f&&(c=a[++e]);++e<f;)c=b(c,a[e],e,a);return c}function lb(a,b,c,d){var e=a.length;for(d&&e&&(c=a[--e]);e--;)c=b(c,a[e],e,a);return c}function mb(a,b){for(var c=-1,d=a.length;++c<d;)if(b(a[c],c,a))return!0;return!1}function nb(a){for(var b=a.length,c=0;b--;)c+=+a[b]||0;return c}function ob(a,b){return a===A?b:a}function pb(a,b,c,d){return a!==A&&Qf.call(d,c)?a:b}function qb(a,b,c){var d=Lh(b);ag.apply(d,Pg(b));for(var e=-1,f=d.length;++e<f;){var g=d[e],h=a[g],i=c(h,b[g],g,a,b);(i===i?i===h:h!==h)&&(h!==A||g in a)||(a[g]=i)}return a}function rb(a,b){for(var c=-1,d=null==a,e=!d&&Rc(a),f=e&&a.length,g=b.length,h=Bf(g);++c<g;){var i=b[c];e?h[c]=Sc(i,f)?a[i]:A:h[c]=d?A:a[i]}return h}function sb(a,b,c){c||(c={});for(var d=-1,e=b.length;++d<e;){var f=b[d];c[f]=a[f]}return c}function tb(a,b,c){var d=typeof a;return"function"==d?b===A?a:dc(a,b,c):null==a?of:"object"==d?Lb(a):b===A?uf(a):Mb(a,b)}function ub(a,b,c,d,e,f,g){var h;if(c&&(h=e?c(a,d,e):c(a)),h!==A)return h;if(!xe(a))return a;var i=zh(a);if(i){if(h=Nc(a),!b)return ab(a,h)}else{var j=Sf.call(a),k=j==Z;if(j!=aa&&j!=U&&(!k||e))return Sa[j]?Pc(a,j,b):e?a:{};if(h=Oc(k?{}:a),!b)return Eg(h,a)}f||(f=[]),g||(g=[]);for(var l=f.length;l--;)if(f[l]==a)return g[l];return f.push(a),g.push(h),(i?bb:Db)(a,function(d,e){h[e]=ub(d,b,c,e,a,f,g)}),h}function vb(a,b,c){if("function"!=typeof a)throw new Kf(S);return eg(function(){a.apply(A,c)},b)}function wb(a,b){var c=a?a.length:0,d=[];if(!c)return d;var e=-1,f=Lc(),h=f==g,i=h&&b.length>=200?Lg(b):null,j=b.length;i&&(f=$a,h=!1,b=i);a:for(;++e<c;){var k=a[e];if(h&&k===k){for(var l=j;l--;)if(b[l]===k)continue a;d.push(k)}else f(b,k,0)<0&&d.push(k)}return d}function xb(a,b){var c=!0;return Gg(a,function(a,d,e){return c=!!b(a,d,e)}),c}function yb(a,b,c,d){var e=a.length;for(c=null==c?0:+c||0,0>c&&(c=-c>e?0:e+c),d=d===A||d>e?e:+d||0,0>d&&(d+=e),e=c>d?0:d>>>0,c>>>=0;e>c;)a[c++]=b;return a}function zb(a,b){var c=[];return Gg(a,function(a,d,e){b(a,d,e)&&c.push(a)}),c}function Ab(a,b,c,d){var e;return c(a,function(a,c,f){return b(a,c,f)?(e=d?c:a,!1):void 0}),e}function Bb(a,b,c){for(var d=-1,e=a.length,f=-1,g=[];++d<e;){var h=a[d];if(s(h)&&Rc(h)&&(c||zh(h)||qe(h))){b&&(h=Bb(h,b,c));for(var i=-1,j=h.length;++i<j;)g[++f]=h[i]}else c||(g[++f]=h)}return g}function Cb(a,b){return Ig(a,b,Oe)}function Db(a,b){return Ig(a,b,Lh)}function Eb(a,b){return Jg(a,b,Lh)}function Fb(a,b){for(var c=-1,d=b.length,e=-1,f=[];++c<d;){var g=b[c];Bh(a[g])&&(f[++e]=g)}return f}function Gb(a,b,c){if(null!=a){c!==A&&c in dd(a)&&(b=[c]);for(var d=-1,e=b.length;null!=a&&++d<e;)a=a[b[d]];return d&&d==e?a:A}}function Hb(a,b,c,d,e,f){if(a===b)return!0;var g=typeof a,h=typeof b;return"function"!=g&&"object"!=g&&"function"!=h&&"object"!=h||null==a||null==b?a!==a&&b!==b:Ib(a,b,Hb,c,d,e,f)}function Ib(a,b,c,d,e,f,g){var h=zh(a),i=zh(b),j=V,k=V;h||(j=Sf.call(a),j==U?j=aa:j!=aa&&(h=Fe(a))),i||(k=Sf.call(b),k==U?k=aa:k!=aa&&(i=Fe(b)));var l=j==aa,m=k==aa,n=j==k;if(n&&!h&&!l)return Hc(a,b,j);if(!e){var o=l&&Qf.call(a,"__wrapped__"),p=m&&Qf.call(b,"__wrapped__");if(o||p)return c(o?a.value():a,p?b.value():b,d,e,f,g)}if(!n)return!1;f||(f=[]),g||(g=[]);for(var q=f.length;q--;)if(f[q]==a)return g[q]==b;f.push(a),g.push(b);var r=(h?Gc:Ic)(a,b,c,d,e,f,g);return f.pop(),g.pop(),r}function Jb(a,b,c,d,e){for(var f=-1,g=b.length,h=!e;++f<g;)if(h&&d[f]?c[f]!==a[b[f]]:!(b[f]in a))return!1;for(f=-1;++f<g;){var i=b[f],j=a[i],k=c[f];if(h&&d[f])var l=j!==A||i in a;else l=e?e(j,k,i):A,l===A&&(l=Hb(k,j,e,!0));if(!l)return!1}return!0}function Kb(a,b){var c=-1,d=Rc(a)?Bf(a.length):[];return Gg(a,function(a,e,f){d[++c]=b(a,e,f)}),d}function Lb(a){var b=Lh(a),c=b.length;if(!c)return nf(!0);if(1==c){var d=b[0],e=a[d];if(Xc(e))return function(a){return null==a?!1:a[d]===e&&(e!==A||d in dd(a))}}for(var f=Bf(c),g=Bf(c);c--;)e=a[b[c]],f[c]=e,g[c]=Xc(e);return function(a){return null!=a&&Jb(dd(a),b,f,g)}}function Mb(a,b){var c=zh(a),d=Uc(a)&&Xc(b),e=a+"";return a=ed(a),function(f){if(null==f)return!1;var g=e;if(f=dd(f),!(!c&&d||g in f)){if(f=1==a.length?f:Gb(f,Ub(a,0,-1)),null==f)return!1;g=td(a),f=dd(f)}return f[g]===b?b!==A||g in f:Hb(b,f[g],null,!0)}}function Nb(a,b,c,d,e){if(!xe(a))return a;var f=Rc(b)&&(zh(b)||Fe(b));if(!f){var g=Lh(b);ag.apply(g,Pg(b))}return bb(g||b,function(h,i){if(g&&(i=h,h=b[i]),s(h))d||(d=[]),e||(e=[]),Ob(a,b,i,Nb,c,d,e);else{var j=a[i],k=c?c(j,h,i,a,b):A,l=k===A;l&&(k=h),!f&&k===A||!l&&(k===k?k===j:j!==j)||(a[i]=k)}}),a}function Ob(a,b,c,d,e,f,g){for(var h=f.length,i=b[c];h--;)if(f[h]==i)return void(a[c]=g[h]);var j=a[c],k=e?e(j,i,c,a,b):A,l=k===A;l&&(k=i,Rc(i)&&(zh(i)||Fe(i))?k=zh(j)?j:Rc(j)?ab(j):[]:Ch(i)||qe(i)?k=qe(j)?Ie(j):Ch(j)?j:{}:l=!1),f.push(i),g.push(k),l?a[c]=d(k,i,e,f,g):(k===k?k!==j:j===j)&&(a[c]=k)}function Pb(a){return function(b){return null==b?A:b[a]}}function Qb(a){var b=a+"";return a=ed(a),function(c){return Gb(c,a,b)}}function Rb(a,b){for(var c=a?b.length:0;c--;){var d=parseFloat(b[c]);if(d!=e&&Sc(d)){var e=d;fg.call(a,d,1)}}return a}function Sb(a,b){return a+Zf(tg()*(b-a+1))}function Tb(a,b,c,d,e){return e(a,function(a,e,f){c=d?(d=!1,a):b(c,a,e,f)}),c}function Ub(a,b,c){var d=-1,e=a.length;b=null==b?0:+b||0,0>b&&(b=-b>e?0:e+b),c=c===A||c>e?e:+c||0,0>c&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Bf(e);++d<e;)f[d]=a[d+b];return f}function Vb(a,b){var c;return Gg(a,function(a,d,e){return c=b(a,d,e),!c}),!!c}function Wb(a,b){var c=a.length;for(a.sort(b);c--;)a[c]=a[c].value;return a}function Xb(a,b,c){var d=Kc(),e=-1;b=hb(b,function(a){return d(a)});var f=Kb(a,function(a){var c=hb(b,function(b){return b(a)});return{criteria:c,index:++e,value:a}});return Wb(f,function(a,b){return n(a,b,c)})}function Yb(a,b){var c=0;return Gg(a,function(a,d,e){c+=+b(a,d,e)||0}),c}function Zb(a,b){var c=-1,d=Lc(),e=a.length,f=d==g,h=f&&e>=200,i=h?Lg():null,j=[];i?(d=$a,f=!1):(h=!1,i=b?[]:j);a:for(;++c<e;){var k=a[c],l=b?b(k,c,a):k;if(f&&k===k){for(var m=i.length;m--;)if(i[m]===l)continue a;b&&i.push(l),j.push(k)}else d(i,l,0)<0&&((b||h)&&i.push(l),j.push(k))}return j}function $b(a,b){for(var c=-1,d=b.length,e=Bf(d);++c<d;)e[c]=a[b[c]];return e}function _b(a,b,c,d){for(var e=a.length,f=d?e:-1;(d?f--:++f<e)&&b(a[f],f,a););return c?Ub(a,d?0:f,d?f+1:e):Ub(a,d?f+1:0,d?e:f)}function ac(a,b){var c=a;c instanceof t&&(c=c.value());for(var d=-1,e=b.length;++d<e;){var f=[c],g=b[d];ag.apply(f,g.args),c=g.func.apply(g.thisArg,f)}return c}function bc(a,b,c){var d=0,e=a?a.length:d;if("number"==typeof b&&b===b&&yg>=e){for(;e>d;){var f=d+e>>>1,g=a[f];(c?b>=g:b>g)?d=f+1:e=f}return e}return cc(a,b,of,c)}function cc(a,b,c,d){b=c(b);for(var e=0,f=a?a.length:0,g=b!==b,h=b===A;f>e;){var i=Zf((e+f)/2),j=c(a[i]),k=j===j;if(g)var l=k||d;else l=h?k&&(d||j!==A):d?b>=j:b>j;l?e=i+1:f=i}return pg(f,xg)}function dc(a,b,c){if("function"!=typeof a)return of;if(b===A)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)};case 5:return function(c,d,e,f,g){return a.call(b,c,d,e,f,g)}}return function(){return a.apply(b,arguments)}}function ec(a){return Wf.call(a,0)}function fc(a,b,c){for(var d=c.length,e=-1,f=og(a.length-d,0),g=-1,h=b.length,i=Bf(f+h);++g<h;)i[g]=b[g];for(;++e<d;)i[c[e]]=a[e];for(;f--;)i[g++]=a[e++];return i}function gc(a,b,c){for(var d=-1,e=c.length,f=-1,g=og(a.length-e,0),h=-1,i=b.length,j=Bf(g+i);++f<g;)j[f]=a[f];for(var k=f;++h<i;)j[k+h]=b[h];for(;++d<e;)j[k+c[d]]=a[f++];return j}function hc(a,b){return function(c,d,e){var f=b?b():{};if(d=Kc(d,e,3),zh(c))for(var g=-1,h=c.length;++g<h;){var i=c[g];a(f,i,d(i,g,c),c)}else Gg(c,function(b,c,e){a(f,b,d(b,c,e),e)});return f}}function ic(a){return ke(function(b,c){var d=-1,e=null==b?0:c.length,f=e>2&&c[e-2],g=e>2&&c[2],h=e>1&&c[e-1];for("function"==typeof f?(f=dc(f,h,5),e-=2):(f="function"==typeof h?h:null,e-=f?1:0),g&&Tc(c[0],c[1],g)&&(f=3>e?null:f,e=1);++d<e;){var i=c[d];i&&a(b,i,f)}return b})}function jc(a,b){return function(c,d){var e=c?Og(c):0;if(!Wc(e))return a(c,d);for(var f=b?e:-1,g=dd(c);(b?f--:++f<e)&&d(g[f],f,g)!==!1;);return c}}function kc(a){return function(b,c,d){for(var e=dd(b),f=d(b),g=f.length,h=a?g:-1;a?h--:++h<g;){ var i=f[h];if(c(e[i],i,e)===!1)break}return b}}function lc(a,b){function c(){var e=this&&this!==db&&this instanceof c?d:a;return e.apply(b,arguments)}var d=nc(a);return c}function mc(a){return function(b){for(var c=-1,d=lf(Ye(b)),e=d.length,f="";++c<e;)f=a(f,d[c],c);return f}}function nc(a){return function(){var b=Fg(a.prototype),c=a.apply(b,arguments);return xe(c)?c:b}}function oc(a){function b(c,d,e){e&&Tc(c,d,e)&&(d=null);var f=Fc(c,a,null,null,null,null,null,d);return f.placeholder=b.placeholder,f}return b}function pc(a,b){return function(c,d,e){e&&Tc(c,d,e)&&(d=null);var f=Kc(),g=null==d;if(f===tb&&g||(g=!1,d=f(d,e,3)),g){var h=zh(c);if(h||!Ee(c))return a(h?c:cd(c));d=j}return Jc(c,d,b)}}function qc(a,b){return function(c,d,e){if(d=Kc(d,e,3),zh(c)){var g=f(c,d,b);return g>-1?c[g]:A}return Ab(c,d,a)}}function rc(a){return function(b,c,d){return b&&b.length?(c=Kc(c,d,3),f(b,c,a)):-1}}function sc(a){return function(b,c,d){return c=Kc(c,d,3),Ab(b,c,a,!0)}}function tc(a){return function(){var b=arguments.length;if(!b)return function(){return arguments[0]};for(var c,e=a?b:-1,f=0,g=Bf(b);a?e--:++e<b;){var h=g[f++]=arguments[e];if("function"!=typeof h)throw new Kf(S);var i=c?"":Ng(h);c="wrapper"==i?new d([]):c}for(e=c?-1:b;++e<b;){h=g[e],i=Ng(h);var j="wrapper"==i?Mg(h):null;c=j&&Vc(j[0])&&j[1]==(J|F|H|K)&&!j[4].length&&1==j[9]?c[Ng(j[0])].apply(c,j[3]):1==h.length&&Vc(h)?c[i]():c.thru(h)}return function(){var a=arguments;if(c&&1==a.length&&zh(a[0]))return c.plant(a[0]).value();for(var d=0,e=g[d].apply(this,a);++d<b;)e=g[d].call(this,e);return e}}}function uc(a,b){return function(c,d,e){return"function"==typeof d&&e===A&&zh(c)?a(c,d):b(c,dc(d,e,3))}}function vc(a){return function(b,c,d){return("function"!=typeof c||d!==A)&&(c=dc(c,d,3)),a(b,c,Oe)}}function wc(a){return function(b,c,d){return("function"!=typeof c||d!==A)&&(c=dc(c,d,3)),a(b,c)}}function xc(a){return function(b,c,d){var e={};return c=Kc(c,d,3),Db(b,function(b,d,f){var g=c(b,d,f);d=a?g:d,b=a?b:g,e[d]=b}),e}}function yc(a){return function(b,c,d){return b=i(b),(a?b:"")+Cc(b,c,d)+(a?"":b)}}function zc(a){var b=ke(function(c,d){var e=u(d,b.placeholder);return Fc(c,a,null,d,e)});return b}function Ac(a,b){return function(c,d,e,f){var g=arguments.length<3;return"function"==typeof d&&f===A&&zh(c)?a(c,d,e,g):Tb(c,Kc(d,f,4),e,g,b)}}function Bc(a,b,c,d,e,f,g,h,i,j){function k(){for(var t=arguments.length,v=t,w=Bf(t);v--;)w[v]=arguments[v];if(d&&(w=fc(w,d,e)),f&&(w=gc(w,f,g)),o||q){var x=k.placeholder,y=u(w,x);if(t-=y.length,j>t){var z=h?ab(h):null,B=og(j-t,0),E=o?y:null,F=o?null:y,G=o?w:null,J=o?null:w;b|=o?H:I,b&=~(o?I:H),p||(b&=~(C|D));var K=[a,b,c,G,E,J,F,z,i,B],L=Bc.apply(A,K);return Vc(a)&&Qg(L,K),L.placeholder=x,L}}var M=m?c:this;n&&(a=M[s]),h&&(w=_c(w,h)),l&&i<w.length&&(w.length=i);var N=this&&this!==db&&this instanceof k?r||nc(a):a;return N.apply(M,w)}var l=b&J,m=b&C,n=b&D,o=b&F,p=b&E,q=b&G,r=!n&&nc(a),s=a;return k}function Cc(a,b,c){var d=a.length;if(b=+b,d>=b||!mg(b))return"";var e=b-d;return c=null==c?" ":c+"",cf(c,Xf(e/c.length)).slice(0,e)}function Dc(a,b,c,d){function e(){for(var b=-1,h=arguments.length,i=-1,j=d.length,k=Bf(h+j);++i<j;)k[i]=d[i];for(;h--;)k[i++]=arguments[++b];var l=this&&this!==db&&this instanceof e?g:a;return l.apply(f?c:this,k)}var f=b&C,g=nc(a);return e}function Ec(a){return function(b,c,d,e){var f=Kc(d);return f===tb&&null==d?bc(b,c,a):cc(b,c,f(d,e,1),a)}}function Fc(a,b,c,d,e,f,g,h){var i=b&D;if(!i&&"function"!=typeof a)throw new Kf(S);var j=d?d.length:0;if(j||(b&=~(H|I),d=e=null),j-=e?e.length:0,b&I){var k=d,l=e;d=e=null}var m=i?null:Mg(a),n=[a,b,c,d,e,k,l,f,g,h];if(m&&(Yc(n,m),b=n[1],h=n[9]),n[9]=null==h?i?0:a.length:og(h-j,0)||0,b==C)var o=lc(n[0],n[2]);else o=b!=H&&b!=(C|H)||n[4].length?Bc.apply(A,n):Dc.apply(A,n);var p=m?Kg:Qg;return p(o,n)}function Gc(a,b,c,d,e,f,g){var h=-1,i=a.length,j=b.length,k=!0;if(i!=j&&!(e&&j>i))return!1;for(;k&&++h<i;){var l=a[h],m=b[h];if(k=A,d&&(k=e?d(m,l,h):d(l,m,h)),k===A)if(e)for(var n=j;n--&&(m=b[n],!(k=l&&l===m||c(l,m,d,e,f,g))););else k=l&&l===m||c(l,m,d,e,f,g)}return!!k}function Hc(a,b,c){switch(c){case W:case X:return+a==+b;case Y:return a.name==b.name&&a.message==b.message;case _:return a!=+a?b!=+b:a==+b;case ba:case da:return a==b+""}return!1}function Ic(a,b,c,d,e,f,g){var h=Lh(a),i=h.length,j=Lh(b),k=j.length;if(i!=k&&!e)return!1;for(var l=e,m=-1;++m<i;){var n=h[m],o=e?n in b:Qf.call(b,n);if(o){var p=a[n],q=b[n];o=A,d&&(o=e?d(q,p,n):d(p,q,n)),o===A&&(o=p&&p===q||c(p,q,d,e,f,g))}if(!o)return!1;l||(l="constructor"==n)}if(!l){var r=a.constructor,s=b.constructor;if(r!=s&&"constructor"in a&&"constructor"in b&&!("function"==typeof r&&r instanceof r&&"function"==typeof s&&s instanceof s))return!1}return!0}function Jc(a,b,c){var d=c?vg:ug,e=d,f=e;return Gg(a,function(a,g,h){var i=b(a,g,h);((c?e>i:i>e)||i===d&&i===f)&&(e=i,f=a)}),f}function Kc(a,c,d){var e=b.callback||mf;return e=e===mf?tb:e,d?e(a,c,d):e}function Lc(a,c,d){var e=b.indexOf||qd;return e=e===qd?g:e,a?e(a,c,d):e}function Mc(a,b,c){for(var d=-1,e=c?c.length:0;++d<e;){var f=c[d],g=f.size;switch(f.type){case"drop":a+=g;break;case"dropRight":b-=g;break;case"take":b=pg(b,a+g);break;case"takeRight":a=og(a,b-g)}}return{start:a,end:b}}function Nc(a){var b=a.length,c=new a.constructor(b);return b&&"string"==typeof a[0]&&Qf.call(a,"index")&&(c.index=a.index,c.input=a.input),c}function Oc(a){var b=a.constructor;return"function"==typeof b&&b instanceof b||(b=Hf),new b}function Pc(a,b,c){var d=a.constructor;switch(b){case fa:return ec(a);case W:case X:return new d(+a);case ga:case ha:case ia:case ja:case ka:case la:case ma:case na:case oa:var e=a.buffer;return new d(c?ec(e):e,a.byteOffset,a.length);case _:case da:return new d(a);case ba:var f=new d(a.source,Ha.exec(a));f.lastIndex=a.lastIndex}return f}function Qc(a,b,c){null==a||Uc(b,a)||(b=ed(b),a=1==b.length?a:Gb(a,Ub(b,0,-1)),b=td(b));var d=null==a?a:a[b];return null==d?A:d.apply(a,c)}function Rc(a){return null!=a&&Wc(Og(a))}function Sc(a,b){return a=+a,b=null==b?Ag:b,a>-1&&a%1==0&&b>a}function Tc(a,b,c){if(!xe(c))return!1;var d=typeof b;if("number"==d?Rc(c)&&Sc(b,c.length):"string"==d&&b in c){var e=c[b];return a===a?a===e:e!==e}return!1}function Uc(a,b){var c=typeof a;if("string"==c&&Aa.test(a)||"number"==c)return!0;if(zh(a))return!1;var d=!za.test(a);return d||null!=b&&a in dd(b)}function Vc(a){var c=Ng(a);return!!c&&a===b[c]&&c in t.prototype}function Wc(a){return"number"==typeof a&&a>-1&&a%1==0&&Ag>=a}function Xc(a){return a===a&&!xe(a)}function Yc(a,b){var c=a[1],d=b[1],e=c|d,f=J>e,g=d==J&&c==F||d==J&&c==K&&a[7].length<=b[8]||d==(J|K)&&c==F;if(!f&&!g)return a;d&C&&(a[2]=b[2],e|=c&C?0:E);var h=b[3];if(h){var i=a[3];a[3]=i?fc(i,h,b[4]):ab(h),a[4]=i?u(a[3],T):ab(b[4])}return h=b[5],h&&(i=a[5],a[5]=i?gc(i,h,b[6]):ab(h),a[6]=i?u(a[5],T):ab(b[6])),h=b[7],h&&(a[7]=ab(h)),d&J&&(a[8]=null==a[8]?b[8]:pg(a[8],b[8])),null==a[9]&&(a[9]=b[9]),a[0]=b[0],a[1]=e,a}function Zc(a,b){a=dd(a);for(var c=-1,d=b.length,e={};++c<d;){var f=b[c];f in a&&(e[f]=a[f])}return e}function $c(a,b){var c={};return Cb(a,function(a,d,e){b(a,d,e)&&(c[d]=a)}),c}function _c(a,b){for(var c=a.length,d=pg(b.length,c),e=ab(a);d--;){var f=b[d];a[d]=Sc(f,c)?e[f]:A}return a}function ad(a){var c;b.support;if(!s(a)||Sf.call(a)!=aa||!Qf.call(a,"constructor")&&(c=a.constructor,"function"==typeof c&&!(c instanceof c)))return!1;var d;return Cb(a,function(a,b){d=b}),d===A||Qf.call(a,d)}function bd(a){for(var c=Oe(a),d=c.length,e=d&&a.length,f=b.support,g=e&&Wc(e)&&(zh(a)||f.nonEnumArgs&&qe(a)),h=-1,i=[];++h<d;){var j=c[h];(g&&Sc(j,e)||Qf.call(a,j))&&i.push(j)}return i}function cd(a){return null==a?[]:Rc(a)?xe(a)?a:Hf(a):Te(a)}function dd(a){return xe(a)?a:Hf(a)}function ed(a){if(zh(a))return a;var b=[];return i(a).replace(Ba,function(a,c,d,e){b.push(d?e.replace(Fa,"$1"):c||a)}),b}function fd(a){return a instanceof t?a.clone():new d(a.__wrapped__,a.__chain__,ab(a.__actions__))}function gd(a,b,c){b=(c?Tc(a,b,c):null==b)?1:og(+b||1,1);for(var d=0,e=a?a.length:0,f=-1,g=Bf(Xf(e/b));e>d;)g[++f]=Ub(a,d,d+=b);return g}function hd(a){for(var b=-1,c=a?a.length:0,d=-1,e=[];++b<c;){var f=a[b];f&&(e[++d]=f)}return e}function id(a,b,c){var d=a?a.length:0;return d?((c?Tc(a,b,c):null==b)&&(b=1),Ub(a,0>b?0:b)):[]}function jd(a,b,c){var d=a?a.length:0;return d?((c?Tc(a,b,c):null==b)&&(b=1),b=d-(+b||0),Ub(a,0,0>b?0:b)):[]}function kd(a,b,c){return a&&a.length?_b(a,Kc(b,c,3),!0,!0):[]}function ld(a,b,c){return a&&a.length?_b(a,Kc(b,c,3),!0):[]}function md(a,b,c,d){var e=a?a.length:0;return e?(c&&"number"!=typeof c&&Tc(a,b,c)&&(c=0,d=e),yb(a,b,c,d)):[]}function nd(a){return a?a[0]:A}function od(a,b,c){var d=a?a.length:0;return c&&Tc(a,b,c)&&(b=!1),d?Bb(a,b):[]}function pd(a){var b=a?a.length:0;return b?Bb(a,!0):[]}function qd(a,b,c){var d=a?a.length:0;if(!d)return-1;if("number"==typeof c)c=0>c?og(d+c,0):c;else if(c){var e=bc(a,b),f=a[e];return(b===b?b===f:f!==f)?e:-1}return g(a,b,c||0)}function rd(a){return jd(a,1)}function sd(){for(var a=[],b=-1,c=arguments.length,d=[],e=Lc(),f=e==g,h=[];++b<c;){var i=arguments[b];Rc(i)&&(a.push(i),d.push(f&&i.length>=120?Lg(b&&i):null))}if(c=a.length,2>c)return h;var j=a[0],k=-1,l=j?j.length:0,m=d[0];a:for(;++k<l;)if(i=j[k],(m?$a(m,i):e(h,i,0))<0){for(b=c;--b;){var n=d[b];if((n?$a(n,i):e(a[b],i,0))<0)continue a}m&&m.push(i),h.push(i)}return h}function td(a){var b=a?a.length:0;return b?a[b-1]:A}function ud(a,b,c){var d=a?a.length:0;if(!d)return-1;var e=d;if("number"==typeof c)e=(0>c?og(d+c,0):pg(c||0,d-1))+1;else if(c){e=bc(a,b,!0)-1;var f=a[e];return(b===b?b===f:f!==f)?e:-1}if(b!==b)return r(a,e,!0);for(;e--;)if(a[e]===b)return e;return-1}function vd(){var a=arguments,b=a[0];if(!b||!b.length)return b;for(var c=0,d=Lc(),e=a.length;++c<e;)for(var f=0,g=a[c];(f=d(b,g,f))>-1;)fg.call(b,f,1);return b}function wd(a,b,c){var d=[];if(!a||!a.length)return d;var e=-1,f=[],g=a.length;for(b=Kc(b,c,3);++e<g;){var h=a[e];b(h,e,a)&&(d.push(h),f.push(e))}return Rb(a,f),d}function xd(a){return id(a,1)}function yd(a,b,c){var d=a?a.length:0;return d?(c&&"number"!=typeof c&&Tc(a,b,c)&&(b=0,c=d),Ub(a,b,c)):[]}function zd(a,b,c){var d=a?a.length:0;return d?((c?Tc(a,b,c):null==b)&&(b=1),Ub(a,0,0>b?0:b)):[]}function Ad(a,b,c){var d=a?a.length:0;return d?((c?Tc(a,b,c):null==b)&&(b=1),b=d-(+b||0),Ub(a,0>b?0:b)):[]}function Bd(a,b,c){return a&&a.length?_b(a,Kc(b,c,3),!1,!0):[]}function Cd(a,b,c){return a&&a.length?_b(a,Kc(b,c,3)):[]}function Dd(a,b,c,d){var e=a?a.length:0;if(!e)return[];null!=b&&"boolean"!=typeof b&&(d=c,c=Tc(a,b,d)?null:b,b=!1);var f=Kc();return(f!==tb||null!=c)&&(c=f(c,d,3)),b&&Lc()==g?v(a,c):Zb(a,c)}function Ed(a){if(!a||!a.length)return[];var b=-1,c=0;a=gb(a,function(a){return Rc(a)?(c=og(a.length,c),!0):void 0});for(var d=Bf(c);++b<c;)d[b]=hb(a,Pb(b));return d}function Fd(a,b,c){var d=a?a.length:0;if(!d)return[];var e=Ed(a);return null==b?e:(b=dc(b,c,4),hb(e,function(a){return kb(a,b,A,!0)}))}function Gd(){for(var a=-1,b=arguments.length;++a<b;){var c=arguments[a];if(Rc(c))var d=d?wb(d,c).concat(wb(c,d)):c}return d?Zb(d):[]}function Hd(a,b){var c=-1,d=a?a.length:0,e={};for(!d||b||zh(a[0])||(b=[]);++c<d;){var f=a[c];b?e[f]=b[c]:f&&(e[f[0]]=f[1])}return e}function Id(a){var c=b(a);return c.__chain__=!0,c}function Jd(a,b,c){return b.call(c,a),a}function Kd(a,b,c){return b.call(c,a)}function Ld(){return Id(this)}function Md(){return new d(this.value(),this.__chain__)}function Nd(a){for(var b,d=this;d instanceof c;){var e=fd(d);b?f.__wrapped__=e:b=e;var f=e;d=d.__wrapped__}return f.__wrapped__=a,b}function Od(){var a=this.__wrapped__;return a instanceof t?(this.__actions__.length&&(a=new t(this)),new d(a.reverse(),this.__chain__)):this.thru(function(a){return a.reverse()})}function Pd(){return this.value()+""}function Qd(){return ac(this.__wrapped__,this.__actions__)}function Rd(a,b,c){var d=zh(a)?fb:xb;return c&&Tc(a,b,c)&&(b=null),("function"!=typeof b||c!==A)&&(b=Kc(b,c,3)),d(a,b)}function Sd(a,b,c){var d=zh(a)?gb:zb;return b=Kc(b,c,3),d(a,b)}function Td(a,b){return bh(a,Lb(b))}function Ud(a,b,c,d){var e=a?Og(a):0;return Wc(e)||(a=Te(a),e=a.length),e?(c="number"!=typeof c||d&&Tc(b,c,d)?0:0>c?og(e+c,0):c||0,"string"==typeof a||!zh(a)&&Ee(a)?e>c&&a.indexOf(b,c)>-1:Lc(a,b,c)>-1):!1}function Vd(a,b,c){var d=zh(a)?hb:Kb;return b=Kc(b,c,3),d(a,b)}function Wd(a,b){return Vd(a,uf(b))}function Xd(a,b,c){var d=zh(a)?gb:zb;return b=Kc(b,c,3),d(a,function(a,c,d){return!b(a,c,d)})}function Yd(a,b,c){if(c?Tc(a,b,c):null==b){a=cd(a);var d=a.length;return d>0?a[Sb(0,d-1)]:A}var e=Zd(a);return e.length=pg(0>b?0:+b||0,e.length),e}function Zd(a){a=cd(a);for(var b=-1,c=a.length,d=Bf(c);++b<c;){var e=Sb(0,b);b!=e&&(d[b]=d[e]),d[e]=a[b]}return d}function $d(a){var b=a?Og(a):0;return Wc(b)?b:Lh(a).length}function _d(a,b,c){var d=zh(a)?mb:Vb;return c&&Tc(a,b,c)&&(b=null),("function"!=typeof b||c!==A)&&(b=Kc(b,c,3)),d(a,b)}function ae(a,b,c){if(null==a)return[];c&&Tc(a,b,c)&&(b=null);var d=-1;b=Kc(b,c,3);var e=Kb(a,function(a,c,e){return{criteria:b(a,c,e),index:++d,value:a}});return Wb(e,m)}function be(a,b,c,d){return null==a?[]:(d&&Tc(b,c,d)&&(c=null),zh(b)||(b=null==b?[]:[b]),zh(c)||(c=null==c?[]:[c]),Xb(a,b,c))}function ce(a,b){return Sd(a,Lb(b))}function de(a,b){if("function"!=typeof b){if("function"!=typeof a)throw new Kf(S);var c=a;a=b,b=c}return a=mg(a=+a)?a:0,function(){return--a<1?b.apply(this,arguments):void 0}}function ee(a,b,c){return c&&Tc(a,b,c)&&(b=null),b=a&&null==b?a.length:og(+b||0,0),Fc(a,J,null,null,null,null,b)}function fe(a,b){var c;if("function"!=typeof b){if("function"!=typeof a)throw new Kf(S);var d=a;a=b,b=d}return function(){return--a>0&&(c=b.apply(this,arguments)),1>=a&&(b=null),c}}function ge(a,b,c){function d(){m&&Yf(m),i&&Yf(i),i=m=n=A}function e(){var c=b-(mh()-k);if(0>=c||c>b){i&&Yf(i);var d=n;i=m=n=A,d&&(o=mh(),j=a.apply(l,h),m||i||(h=l=null))}else m=eg(e,c)}function f(){m&&Yf(m),i=m=n=A,(q||p!==b)&&(o=mh(),j=a.apply(l,h),m||i||(h=l=null))}function g(){if(h=arguments,k=mh(),l=this,n=q&&(m||!r),p===!1)var c=r&&!m;else{i||r||(o=k);var d=p-(k-o),g=0>=d||d>p;g?(i&&(i=Yf(i)),o=k,j=a.apply(l,h)):i||(i=eg(f,d))}return g&&m?m=Yf(m):m||b===p||(m=eg(e,b)),c&&(g=!0,j=a.apply(l,h)),!g||m||i||(h=l=null),j}var h,i,j,k,l,m,n,o=0,p=!1,q=!0;if("function"!=typeof a)throw new Kf(S);if(b=0>b?0:+b||0,c===!0){var r=!0;q=!1}else xe(c)&&(r=c.leading,p="maxWait"in c&&og(+c.maxWait||0,b),q="trailing"in c?c.trailing:q);return g.cancel=d,g}function he(a,b){if("function"!=typeof a||b&&"function"!=typeof b)throw new Kf(S);var c=function(){var d=arguments,e=c.cache,f=b?b.apply(this,d):d[0];if(e.has(f))return e.get(f);var g=a.apply(this,d);return e.set(f,g),g};return c.cache=new he.Cache,c}function ie(a){if("function"!=typeof a)throw new Kf(S);return function(){return!a.apply(this,arguments)}}function je(a){return fe(2,a)}function ke(a,b){if("function"!=typeof a)throw new Kf(S);return b=og(b===A?a.length-1:+b||0,0),function(){for(var c=arguments,d=-1,e=og(c.length-b,0),f=Bf(e);++d<e;)f[d]=c[b+d];switch(b){case 0:return a.call(this,f);case 1:return a.call(this,c[0],f);case 2:return a.call(this,c[0],c[1],f)}var g=Bf(b+1);for(d=-1;++d<b;)g[d]=c[d];return g[b]=f,a.apply(this,g)}}function le(a){if("function"!=typeof a)throw new Kf(S);return function(b){return a.apply(this,b)}}function me(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new Kf(S);return c===!1?d=!1:xe(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Ta.leading=d,Ta.maxWait=+b,Ta.trailing=e,ge(a,b,Ta)}function ne(a,b){return b=null==b?of:b,Fc(b,H,null,[a],[])}function oe(a,b,c,d){return b&&"boolean"!=typeof b&&Tc(a,b,c)?b=!1:"function"==typeof b&&(d=c,c=b,b=!1),c="function"==typeof c&&dc(c,d,1),ub(a,b,c)}function pe(a,b,c){return b="function"==typeof b&&dc(b,c,1),ub(a,!0,b)}function qe(a){return s(a)&&Rc(a)&&Sf.call(a)==U}function re(a){return a===!0||a===!1||s(a)&&Sf.call(a)==W}function se(a){return s(a)&&Sf.call(a)==X}function te(a){return!!a&&1===a.nodeType&&s(a)&&Sf.call(a).indexOf("Element")>-1}function ue(a){return null==a?!0:Rc(a)&&(zh(a)||Ee(a)||qe(a)||s(a)&&Bh(a.splice))?!a.length:!Lh(a).length}function ve(a,b,c,d){if(c="function"==typeof c&&dc(c,d,3),!c&&Xc(a)&&Xc(b))return a===b;var e=c?c(a,b):A;return e===A?Hb(a,b,c):!!e}function we(a){return s(a)&&"string"==typeof a.message&&Sf.call(a)==Y}function xe(a){var b=typeof a;return"function"==b||!!a&&"object"==b}function ye(a,b,c,d){var e=Lh(b),f=e.length;if(!f)return!0;if(null==a)return!1;if(c="function"==typeof c&&dc(c,d,3),a=dd(a),!c&&1==f){var g=e[0],h=b[g];if(Xc(h))return h===a[g]&&(h!==A||g in a)}for(var i=Bf(f),j=Bf(f);f--;)h=i[f]=b[e[f]],j[f]=Xc(h);return Jb(a,e,i,j,c)}function ze(a){return Ce(a)&&a!=+a}function Ae(a){return null==a?!1:Sf.call(a)==Z?Uf.test(Pf.call(a)):s(a)&&Ja.test(a)}function Be(a){return null===a}function Ce(a){return"number"==typeof a||s(a)&&Sf.call(a)==_}function De(a){return s(a)&&Sf.call(a)==ba}function Ee(a){return"string"==typeof a||s(a)&&Sf.call(a)==da}function Fe(a){return s(a)&&Wc(a.length)&&!!Ra[Sf.call(a)]}function Ge(a){return a===A}function He(a){var b=a?Og(a):0;return Wc(b)?b?ab(a):[]:Te(a)}function Ie(a){return sb(a,Oe(a))}function Je(a,b,c){var d=Fg(a);return c&&Tc(a,b,c)&&(b=null),b?Eg(d,b):d}function Ke(a){return Fb(a,Oe(a))}function Le(a,b,c){var d=null==a?A:Gb(a,ed(b),b+"");return d===A?c:d}function Me(a,b){if(null==a)return!1;var c=Qf.call(a,b);return c||Uc(b)||(b=ed(b),a=1==b.length?a:Gb(a,Ub(b,0,-1)),b=td(b),c=null!=a&&Qf.call(a,b)),c}function Ne(a,b,c){c&&Tc(a,b,c)&&(b=null);for(var d=-1,e=Lh(a),f=e.length,g={};++d<f;){var h=e[d],i=a[h];b?Qf.call(g,i)?g[i].push(h):g[i]=[h]:g[i]=h}return g}function Oe(a){if(null==a)return[];xe(a)||(a=Hf(a));var b=a.length;b=b&&Wc(b)&&(zh(a)||Dg.nonEnumArgs&&qe(a))&&b||0;for(var c=a.constructor,d=-1,e="function"==typeof c&&c.prototype===a,f=Bf(b),g=b>0;++d<b;)f[d]=d+"";for(var h in a)g&&Sc(h,b)||"constructor"==h&&(e||!Qf.call(a,h))||f.push(h);return f}function Pe(a){for(v