@jonahsnider/util
Advanced tools
Comparing version 4.4.0 to 4.5.0
@@ -217,2 +217,42 @@ import { DirectionFn } from './types'; | ||
export declare function mapFill<T>(length: number, valueFn: (index: number) => T): T[]; | ||
/** | ||
* Pads an array with a given value so that the array reaches a given length. | ||
* The padding is applied from the start (left) of the array. | ||
* | ||
* @example | ||
* ```js | ||
* const array = [1, 2, 3]; | ||
* | ||
* padStart(array, 4, 0); | ||
* | ||
* console.log(array); // [0, 1, 2, 3] | ||
* ``` | ||
* | ||
* @param array - The array to pad | ||
* @param maxLength - The length of `array` once it has been padded. If this parameter is smaller than the current string's length, `array` will not be modified | ||
* @param fillValue - The value to pad the array with | ||
* | ||
* @see {@link padEnd} to pad the end of an array | ||
*/ | ||
export declare function padStart<T>(array: T[], maxLength: number, fillValue: T): void; | ||
/** | ||
* Pads an array with a given value so that the array reaches a given length. | ||
* The padding is applied from the end (right) of the array. | ||
* | ||
* @example | ||
* ```js | ||
* const array = [0, 1, 2]; | ||
* | ||
* padEnd(array, 4, 4); | ||
* | ||
* console.log(array); // [0, 1, 2, 4] | ||
* ``` | ||
* | ||
* @param array - The array to pad | ||
* @param maxLength - The length of `array` once it has been padded. If this parameter is smaller than the current string's length, `array` will not be modified | ||
* @param fillValue - The value to pad the array with | ||
* | ||
* @see {@link padStart} to pad the start of an array | ||
*/ | ||
export declare function padEnd<T>(array: T[], maxLength: number, value: T): void; | ||
export {}; |
@@ -18,3 +18,2 @@ export * from './array'; | ||
export * from './sort'; | ||
export * as Sort from './sort-compare'; | ||
export * from './stopwatch'; | ||
@@ -21,0 +20,0 @@ export * from './to-digits'; |
@@ -9,3 +9,3 @@ /** | ||
* | ||
* @params iterables - The iterables to combine | ||
* @param iterables - The iterables to combine | ||
* | ||
@@ -124,2 +124,4 @@ * @returns A single iterable containing all the elements of all the iterables | ||
* @returns A frequency table represented as a `Map` where keys are the elements and values are the frequency | ||
* | ||
* @see {@link count} to count the occurrences of one value in an iterable | ||
*/ | ||
@@ -211,1 +213,31 @@ export declare function frequencyTable<T>(iterable: Iterable<T>): Map<T, number>; | ||
export declare function duplicates<T>(iterable: Iterable<T>): Set<T>; | ||
/** | ||
* Count the number of occurrences of a value in an iterable. | ||
* | ||
* @example | ||
* ```js | ||
* count([1, 2, 2, 2, 3], 2); // 2 | ||
* ``` | ||
* | ||
* @param iterable - The iterable to count occurrences from | ||
* @param value - The value to count occurrences of | ||
* | ||
* @returns The number of occurrences of `value` in `iterable` | ||
* | ||
* @see {@link frequencyTable} to count the occurrences of all elements in an iterable | ||
*/ | ||
export declare function count<T>(iterable: Iterable<T>, value: T): number; | ||
/** | ||
* Returns an array with the elements of the iterable repeated a provided number of times. | ||
* | ||
* @example | ||
* ```js | ||
* cycle(['a', 'b'], 2); // ['a', 'b', 'a', 'b'] | ||
* ``` | ||
* | ||
* @param iterable - The iterable to cycle | ||
* @param times - The number of times to repeat the elements of `iterable` | ||
* | ||
* @returns An array with the elements of `iterable` repeated `times` number of times | ||
*/ | ||
export declare function cycle<T>(array: Iterable<T>, times: number): T[]; |
@@ -1,2 +0,2 @@ | ||
"use strict";function t(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function e(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,s,"next",e)}function s(e){t(a,o,i,u,s,"throw",e)}u(void 0)}))}}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function a(t,e,r){return(a=i()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&o(i,r.prototype),i}).apply(null,arguments)}function u(t){var e="function"==typeof Map?new Map:void 0;return(u=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return a(t,arguments,n(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,t)})(t)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return s(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}function p(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}function f(t,e){var r=void 0;if("size"in t?r="size":"length"in t&&(r="length"),!r)throw new RangeError;return t[r]<e[r]?[e,t]:[t,e]}function l(t,e){return Array.from({length:t},(function(t,r){return e(r)}))}var d,h;Object.defineProperty(exports,"__esModule",{value:!0}),(d=exports.Rank||(exports.Rank={}))[d.Ace=1]="Ace",d[d.Two=2]="Two",d[d.Three=3]="Three",d[d.Four=4]="Four",d[d.Five=5]="Five",d[d.Six=6]="Six",d[d.Seven=7]="Seven",d[d.Eight=8]="Eight",d[d.Nine=9]="Nine",d[d.Ten=10]="Ten",d[d.Jack=11]="Jack",d[d.Queen=12]="Queen",d[d.King=13]="King",(h=exports.Suit||(exports.Suit={}))[h.Clubs=0]="Clubs",h[h.Diamonds=1]="Diamonds",h[h.Hearts=2]="Hearts",h[h.Spades=3]="Spades";var v,x,y=[{rank:exports.Rank.Ace,suit:exports.Suit.Clubs},{rank:exports.Rank.Two,suit:exports.Suit.Clubs},{rank:exports.Rank.Three,suit:exports.Suit.Clubs},{rank:exports.Rank.Four,suit:exports.Suit.Clubs},{rank:exports.Rank.Five,suit:exports.Suit.Clubs},{rank:exports.Rank.Six,suit:exports.Suit.Clubs},{rank:exports.Rank.Seven,suit:exports.Suit.Clubs},{rank:exports.Rank.Eight,suit:exports.Suit.Clubs},{rank:exports.Rank.Nine,suit:exports.Suit.Clubs},{rank:exports.Rank.Ten,suit:exports.Suit.Clubs},{rank:exports.Rank.Jack,suit:exports.Suit.Clubs},{rank:exports.Rank.Queen,suit:exports.Suit.Clubs},{rank:exports.Rank.King,suit:exports.Suit.Clubs},{rank:exports.Rank.Ace,suit:exports.Suit.Diamonds},{rank:exports.Rank.Two,suit:exports.Suit.Diamonds},{rank:exports.Rank.Three,suit:exports.Suit.Diamonds},{rank:exports.Rank.Four,suit:exports.Suit.Diamonds},{rank:exports.Rank.Five,suit:exports.Suit.Diamonds},{rank:exports.Rank.Six,suit:exports.Suit.Diamonds},{rank:exports.Rank.Seven,suit:exports.Suit.Diamonds},{rank:exports.Rank.Eight,suit:exports.Suit.Diamonds},{rank:exports.Rank.Nine,suit:exports.Suit.Diamonds},{rank:exports.Rank.Ten,suit:exports.Suit.Diamonds},{rank:exports.Rank.Jack,suit:exports.Suit.Diamonds},{rank:exports.Rank.Queen,suit:exports.Suit.Diamonds},{rank:exports.Rank.King,suit:exports.Suit.Diamonds},{rank:exports.Rank.Ace,suit:exports.Suit.Hearts},{rank:exports.Rank.Two,suit:exports.Suit.Hearts},{rank:exports.Rank.Three,suit:exports.Suit.Hearts},{rank:exports.Rank.Four,suit:exports.Suit.Hearts},{rank:exports.Rank.Five,suit:exports.Suit.Hearts},{rank:exports.Rank.Six,suit:exports.Suit.Hearts},{rank:exports.Rank.Seven,suit:exports.Suit.Hearts},{rank:exports.Rank.Eight,suit:exports.Suit.Hearts},{rank:exports.Rank.Nine,suit:exports.Suit.Hearts},{rank:exports.Rank.Ten,suit:exports.Suit.Hearts},{rank:exports.Rank.Jack,suit:exports.Suit.Hearts},{rank:exports.Rank.Queen,suit:exports.Suit.Hearts},{rank:exports.Rank.King,suit:exports.Suit.Hearts},{rank:exports.Rank.Ace,suit:exports.Suit.Spades},{rank:exports.Rank.Two,suit:exports.Suit.Spades},{rank:exports.Rank.Three,suit:exports.Suit.Spades},{rank:exports.Rank.Four,suit:exports.Suit.Spades},{rank:exports.Rank.Five,suit:exports.Suit.Spades},{rank:exports.Rank.Six,suit:exports.Suit.Spades},{rank:exports.Rank.Seven,suit:exports.Suit.Spades},{rank:exports.Rank.Eight,suit:exports.Suit.Spades},{rank:exports.Rank.Nine,suit:exports.Suit.Spades},{rank:exports.Rank.Ten,suit:exports.Suit.Spades},{rank:exports.Rank.Jack,suit:exports.Suit.Spades},{rank:exports.Rank.Queen,suit:exports.Suit.Spades},{rank:exports.Rank.King,suit:exports.Suit.Spades}],g=function(t){var e,r;function n(e,r){var n;return(n=t.call(this,r)||this).defaultValueOrDefaultValueFn=e,n.defaultValueIsFunction="function"==typeof n.defaultValueOrDefaultValueFn,n}return r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,n.prototype.get=function(e){return this.has(e)?t.prototype.get.call(this,e):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(e):this.defaultValueOrDefaultValueFn},n}(u(Map));function m(t){for(var e,r=t[0].map((function(t){return t.length})),n=c(t);!(e=n()).done;)for(var o=e.value,i=0;i<o.length;i++){var a=o[i].length;r[i]<a&&(r[i]=a)}return r}!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(v||(v={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(x||(x={}));var S,k={__proto__:null,get Status(){return v},get Method(){return x}},b=(function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof f?e:f).prototype),i=new w(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var p={};function f(){}function l(){}function d(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,x=v&&v(v(R([])));x&&x!==e&&r.call(x,o)&&(h=x);var y=d.prototype=f.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,u){var s=c(t[o],t,i);if("throw"!==s.type){var p=s.arg,f=p.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){p.value=t,a(p)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function S(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function R(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return l.prototype=y.constructor=d,d.constructor=l,l.displayName=u(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(m.prototype),m.prototype[i]=function(){return this},t.AsyncIterator=m,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new m(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(y),u(y,a,"Generator"),y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=R,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:R(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}(S={exports:{}}),S.exports),w=b.mark(R);function R(){var t,e,r,n,o,i=arguments;return b.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:for(t=i.length,e=new Array(t),r=0;r<t;r++)e[r]=i[r];n=0,o=e;case 2:if(!(n<o.length)){a.next=8;break}return a.delegateYield(o[n],"t0",5);case 5:n++,a.next=2;break;case 8:case"end":return a.stop()}}),w)}function T(t,e){return t+e}function E(t){var e=N(t);return t.map((function(t){return Math.pow(t-e,2)})).reduce(T)/(t.length-1)}function O(t,e,r){return 1/(e*Math.sqrt(2*Math.PI))*Math.pow(Math.E,-.5*Math.pow(t-r/e,2))}function N(t){var e=t.reduce(T);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function P(t,e){return Math.random()*(e-t)+t}function A(){return(A=e(b.mark((function t(e){return b.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:return t.t0=t.sent,t.t1=void 0,t.abrupt("return",[t.t0,t.t1]);case 8:return t.prev=8,t.t2=t.catch(0),t.abrupt("return",[void 0,t.t2]);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))).apply(this,arguments)}var L=function(){function t(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}return t.from=function(e){return new t(e[0],e[1])},t.prototype.has=function(t){return t>=this.lower&&t<=this.upper},t}();function M(t,e){return t<e?-1:t>e?1:0}function F(t,e){return t<e?1:t>e?-1:0}var C={__proto__:null,ascending:function(t,e){return void 0===e&&"function"==typeof t?function(e,r){return M(t(e),t(r))}:M(t,e)},descending:function(t,e){return void 0===e&&"function"==typeof t?function(e,r){return F(t(e),t(r))}:F(t,e)}},_=function(){function t(){}t.start=function(){var t=new this;return t.start(),t};var e,r=t.prototype;return r.start=function(){this.startTime=process.hrtime.bigint()},r.end=function(){return Number(process.hrtime.bigint()-this.startTime)/1e6},(e=[{key:"started",get:function(){return void 0!==this.startTime}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}();exports.DefaultMap=g,exports.Http=k,exports.Range=L,exports.Sort=C,exports.Stopwatch=_,exports.allDuplicates=function(t){for(var e,r=new Set,n=[],o=c(t);!(e=o()).done;){var i=e.value;r.has(i)&&n.push(i),r.add(i)}return n},exports.binarySearch=function(t,e){for(var r=0,n=t.length-1;r<=n;){var o=Math.trunc((r+n)/2),i=e(t[o]);if(i<0)r=o+1;else{if(!(i>0))return t[o];n=o-1}}},exports.capitalize=function(t){var e=t.charAt(0).toUpperCase();return""+e+t.slice(e.length)},exports.chunk=function(t,e){return t.length===e?t.map((function(t){return[t]})):l(Math.ceil(t.length/e),(function(r){return t.slice(r*e,r*e+e)}))},exports.clamp=function(t,e,r){return t<e?e:t>r?r:t},exports.combineIterables=R,exports.difference=function(t,e){for(var r,n=new Set(t),o=c(e);!(r=o()).done;)n.delete(r.value);return n},exports.duplicates=function(t){for(var e,r=new Set,n=new Set,o=c(t);!(e=o()).done;){var i=e.value;r.has(i)&&n.add(i),r.add(i)}return n},exports.every=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(!e(r.value))return!1;return!0},exports.fill=function(t,e){return Array.from({length:t},(function(){return e}))},exports.find=function(t,e){for(var r,n=c(t);!(r=n()).done;){var o=r.value;if(e(o))return o}},exports.first=function(t,e){var r=t[Symbol.iterator]();if(void 0===e)return r.next().value;for(var n=[],o=0;o<e;o++){var i=r.next();if(i.done)break;n.push(i.value)}return n},exports.formatTable=function(t,e){void 0===e&&(e=" ");var r=m(t);return t.map((function(t){return t.map((function(t,e){return t.padEnd(r[e])})).join(e)})).join("\n")},exports.frequencyTable=function(t){for(var e,r=new Map,n=c(t);!(e=n()).done;){var o=e.value,i=r.get(o);r.set(o,i?i+1:1)}return r},exports.holes=function(t){for(var e=[],r=0;r<t.length;r++)r in t||e.push(r);return e},exports.identical=function(t,e){if(t===e)return!0;if(Array.isArray(t))return t.length===e.length&&t.every((function(t,r){return t===e[r]}));if(t.size!==e.size)return!1;if(t instanceof Set){for(var r,n=c(t);!(r=n()).done;)if(!e.has(r.value))return!1}else if(t instanceof Map)for(var o,i=c(t.entries());!(o=i()).done;){var a=o.value,u=a[0],s=a[1];if(e.get(u)!==s||!e.has(u))return!1}return!0},exports.includes=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(r.value===e)return!0;return!1},exports.intersection=function(t,e){for(var r,n=new Set,o=f(t,e),i=o[1],a=c(o[0]);!(r=a()).done;){var u=r.value;i.has(u)&&n.add(u)}return n},exports.invert=function(t){return function(){return-t.apply(void 0,arguments)}},exports.isDisjoint=function(t,e){for(var r,n=new Set(t),o=c(e);!(r=o()).done;)if(n.has(r.value))return!1;return!0},exports.isSubset=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(!e.has(r.value))return!1;return!0},exports.isSuperset=function(t,e){for(var r,n=c(e);!(r=n()).done;)if(!t.has(r.value))return!1;return!0},exports.join=function(t,e){void 0===e&&(e=",");for(var r="",n=t[Symbol.iterator](),o=n.next();;){var i=o;if(o=n.next(),r+=i.value,o.done)return r;r+=e}},exports.largeToSmall=f,exports.mapFill=l,exports.max=function(t,e){return Math.max(t,e)},exports.maxColumnLength=m,exports.mean=N,exports.median=function(t){var e=t.length/2;return t.length%2==0?(t[e-1]+t[e])/("bigint"==typeof t[0]?2n:2):t[Math.floor(e)]},exports.min=function(t,e){return Math.min(t,e)},exports.mode=function(t){for(var e,r=new Map,n=0,o=[],i=c(t);!(e=i()).done;){var a=e.value,u=r.get(a),s=void 0===u?1:u+1;r.set(a,s),s>n?(n=s,o=[a]):s===n&&o.push(a)}return o},exports.multiReplace=function(t,e){for(var r=Object.entries(e),n="",o=0;o<t.length;)t:do{for(var i,a=c(r);!(i=a()).done;){var u=i.value,s=u[0],p=u[1];if(t.slice(o).startsWith(s)){n+=p,o+=s.length;break t}}n+=t[o++]}while(0);return n},exports.newDeck=function(){return[].concat(y)},exports.normaldist=O,exports.not=function(t){return function(){return!t.apply(void 0,arguments)}},exports.nullish=function(t){return null==t},exports.partition=function(t,e){for(var r,n=[],o=[],i=0,a=c(t);!(r=a()).done;){var u=r.value;(e(u,i++)?n:o).push(u)}return[n,o]},exports.pull=function(t,e){var r=t.indexOf(e);return-1===r?[]:t.splice(r,1)},exports.random=P,exports.randomInt=function(t,e){return Math.floor(P(Math.ceil(t),Math.floor(e)))},exports.regExpUnion=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return new RegExp(e.map((function(t){return"("+t.source+")"})).join("|"))},exports.rename=function(t,e,n){var o;return e===n?r({},t):function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)e.indexOf(r=i[n])>=0||(o[r]=t[r]);return o}(r({},t,((o={})[n]=t[e],o)),[e].map(p))},exports.reverse=function(t){if(Array.isArray(t))return l(t.length,(function(e){return t[t.length-(e+1)]}));for(var e,r=[],n=c(t);!(e=n()).done;)r.unshift(e.value);return r},exports.same=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=e.map((function(t){return t[Symbol.iterator]()})),o=function(){for(var t,e=n.map((function(t){return t.next()})),r=e[0],o=r.done,i=r.value,a=c(e);!(t=a()).done;){var u=t.value;if(u.done)return{v:e.every((function(t){return t.done===o}))};if(u.value!==i)return{v:!1}}};;){var i=o();if("object"==typeof i)return i.v}},exports.sample=function(t){return t[Math.floor(Math.random()*t.length)]},exports.settled=function(t){return A.apply(this,arguments)},exports.shuffle=function(t,e){void 0===e&&(e=!0);for(var r=e?t:[].concat(t),n=r.length-1;n>0;n--){var o=Math.floor(Math.random()*(n+1)),i=[r[o],r[n]];r[n]=i[0],r[o]=i[1]}if(!e)return r},exports.some=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(e(r.value))return!0;return!1},exports.sortObject=function(t,e){return Object.entries(t).sort((function(t,r){return e(t[1],r[1])}))},exports.standardNormaldist=function(t){return O(t,1,0)},exports.stddev=function(t){return Math.sqrt(E(t))},exports.sum=T,exports.symmetricDifference=function(t,e){for(var r,n=new Set(t),o=c(e);!(r=o()).done;){var i=r.value;n.has(i)?n.delete(i):n.add(i)}return n},exports.toDigits=function(t,e){var r=Math.pow(10,e);return Math.round(t*r*(1+Number.EPSILON))/r},exports.truncate=function(t,e,r){return void 0===r&&(r=""),t.length>e?""+t.slice(0,e)+r:t},exports.uncapitalize=function(t){var e=t.charAt(0).toLowerCase();return""+e+t.slice(e.length)},exports.union=function(t,e){for(var r,n=new Set(t),o=c(e);!(r=o()).done;)n.add(r.value);return n},exports.variance=E; | ||
"use strict";function t(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function e(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,s,"next",e)}function s(e){t(a,o,i,u,s,"throw",e)}u(void 0)}))}}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function a(t,e,r){return(a=i()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&o(i,r.prototype),i}).apply(null,arguments)}function u(t){var e="function"==typeof Map?new Map:void 0;return(u=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return a(t,arguments,n(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,t)})(t)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return s(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}function p(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}function f(t,e){var r=void 0;if("size"in t?r="size":"length"in t&&(r="length"),!r)throw new RangeError;return t[r]<e[r]?[e,t]:[t,e]}function l(t,e){return Array.from({length:t},(function(){return e}))}function d(t,e){return Array.from({length:t},(function(t,r){return e(r)}))}var h,v;Object.defineProperty(exports,"__esModule",{value:!0}),(h=exports.Rank||(exports.Rank={}))[h.Ace=1]="Ace",h[h.Two=2]="Two",h[h.Three=3]="Three",h[h.Four=4]="Four",h[h.Five=5]="Five",h[h.Six=6]="Six",h[h.Seven=7]="Seven",h[h.Eight=8]="Eight",h[h.Nine=9]="Nine",h[h.Ten=10]="Ten",h[h.Jack=11]="Jack",h[h.Queen=12]="Queen",h[h.King=13]="King",(v=exports.Suit||(exports.Suit={}))[v.Clubs=0]="Clubs",v[v.Diamonds=1]="Diamonds",v[v.Hearts=2]="Hearts",v[v.Spades=3]="Spades";var x,y,g=[{rank:exports.Rank.Ace,suit:exports.Suit.Clubs},{rank:exports.Rank.Two,suit:exports.Suit.Clubs},{rank:exports.Rank.Three,suit:exports.Suit.Clubs},{rank:exports.Rank.Four,suit:exports.Suit.Clubs},{rank:exports.Rank.Five,suit:exports.Suit.Clubs},{rank:exports.Rank.Six,suit:exports.Suit.Clubs},{rank:exports.Rank.Seven,suit:exports.Suit.Clubs},{rank:exports.Rank.Eight,suit:exports.Suit.Clubs},{rank:exports.Rank.Nine,suit:exports.Suit.Clubs},{rank:exports.Rank.Ten,suit:exports.Suit.Clubs},{rank:exports.Rank.Jack,suit:exports.Suit.Clubs},{rank:exports.Rank.Queen,suit:exports.Suit.Clubs},{rank:exports.Rank.King,suit:exports.Suit.Clubs},{rank:exports.Rank.Ace,suit:exports.Suit.Diamonds},{rank:exports.Rank.Two,suit:exports.Suit.Diamonds},{rank:exports.Rank.Three,suit:exports.Suit.Diamonds},{rank:exports.Rank.Four,suit:exports.Suit.Diamonds},{rank:exports.Rank.Five,suit:exports.Suit.Diamonds},{rank:exports.Rank.Six,suit:exports.Suit.Diamonds},{rank:exports.Rank.Seven,suit:exports.Suit.Diamonds},{rank:exports.Rank.Eight,suit:exports.Suit.Diamonds},{rank:exports.Rank.Nine,suit:exports.Suit.Diamonds},{rank:exports.Rank.Ten,suit:exports.Suit.Diamonds},{rank:exports.Rank.Jack,suit:exports.Suit.Diamonds},{rank:exports.Rank.Queen,suit:exports.Suit.Diamonds},{rank:exports.Rank.King,suit:exports.Suit.Diamonds},{rank:exports.Rank.Ace,suit:exports.Suit.Hearts},{rank:exports.Rank.Two,suit:exports.Suit.Hearts},{rank:exports.Rank.Three,suit:exports.Suit.Hearts},{rank:exports.Rank.Four,suit:exports.Suit.Hearts},{rank:exports.Rank.Five,suit:exports.Suit.Hearts},{rank:exports.Rank.Six,suit:exports.Suit.Hearts},{rank:exports.Rank.Seven,suit:exports.Suit.Hearts},{rank:exports.Rank.Eight,suit:exports.Suit.Hearts},{rank:exports.Rank.Nine,suit:exports.Suit.Hearts},{rank:exports.Rank.Ten,suit:exports.Suit.Hearts},{rank:exports.Rank.Jack,suit:exports.Suit.Hearts},{rank:exports.Rank.Queen,suit:exports.Suit.Hearts},{rank:exports.Rank.King,suit:exports.Suit.Hearts},{rank:exports.Rank.Ace,suit:exports.Suit.Spades},{rank:exports.Rank.Two,suit:exports.Suit.Spades},{rank:exports.Rank.Three,suit:exports.Suit.Spades},{rank:exports.Rank.Four,suit:exports.Suit.Spades},{rank:exports.Rank.Five,suit:exports.Suit.Spades},{rank:exports.Rank.Six,suit:exports.Suit.Spades},{rank:exports.Rank.Seven,suit:exports.Suit.Spades},{rank:exports.Rank.Eight,suit:exports.Suit.Spades},{rank:exports.Rank.Nine,suit:exports.Suit.Spades},{rank:exports.Rank.Ten,suit:exports.Suit.Spades},{rank:exports.Rank.Jack,suit:exports.Suit.Spades},{rank:exports.Rank.Queen,suit:exports.Suit.Spades},{rank:exports.Rank.King,suit:exports.Suit.Spades}],m=function(t){var e,r;function n(e,r){var n;return(n=t.call(this,r)||this).defaultValueOrDefaultValueFn=e,n.defaultValueIsFunction="function"==typeof n.defaultValueOrDefaultValueFn,n}return r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,n.prototype.get=function(e){return this.has(e)?t.prototype.get.call(this,e):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(e):this.defaultValueOrDefaultValueFn},n}(u(Map));function S(t){for(var e,r=t[0].map((function(t){return t.length})),n=c(t);!(e=n()).done;)for(var o=e.value,i=0;i<o.length;i++){var a=o[i].length;r[i]<a&&(r[i]=a)}return r}!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(x||(x={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(y||(y={}));var k,b={__proto__:null,get Status(){return x},get Method(){return y}},w=(function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof f?e:f).prototype),i=new w(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var p={};function f(){}function l(){}function d(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,x=v&&v(v(R([])));x&&x!==e&&r.call(x,o)&&(h=x);var y=d.prototype=f.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,u){var s=c(t[o],t,i);if("throw"!==s.type){var p=s.arg,f=p.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){p.value=t,a(p)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function S(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function R(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return l.prototype=y.constructor=d,d.constructor=l,l.displayName=u(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},g(m.prototype),m.prototype[i]=function(){return this},t.AsyncIterator=m,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new m(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(y),u(y,a,"Generator"),y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=R,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:R(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}(k={exports:{}}),k.exports),R=w.mark(T);function T(){var t,e,r,n,o,i=arguments;return w.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:for(t=i.length,e=new Array(t),r=0;r<t;r++)e[r]=i[r];n=0,o=e;case 2:if(!(n<o.length)){a.next=8;break}return a.delegateYield(o[n],"t0",5);case 5:n++,a.next=2;break;case 8:case"end":return a.stop()}}),R)}function E(t,e){return t+e}function O(t){var e=P(t);return t.map((function(t){return Math.pow(t-e,2)})).reduce(E)/(t.length-1)}function N(t,e,r){return 1/(e*Math.sqrt(2*Math.PI))*Math.pow(Math.E,-.5*Math.pow(t-r/e,2))}function P(t){var e=t.reduce(E);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function A(t,e){return Math.random()*(e-t)+t}function L(){return(L=e(w.mark((function t(e){return w.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:return t.t0=t.sent,t.t1=void 0,t.abrupt("return",[t.t0,t.t1]);case 8:return t.prev=8,t.t2=t.catch(0),t.abrupt("return",[void 0,t.t2]);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))).apply(this,arguments)}var M=function(){function t(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}return t.from=function(e){return new t(e[0],e[1])},t.prototype.has=function(t){return t>=this.lower&&t<=this.upper},t}();function F(t,e){return t<e?-1:t>e?1:0}function _(t,e){return t<e?1:t>e?-1:0}var C={__proto__:null,ascending:function(t,e){return void 0===e&&"function"==typeof t?function(e,r){return F(t(e),t(r))}:F(t,e)},descending:function(t,e){return void 0===e&&"function"==typeof t?function(e,r){return _(t(e),t(r))}:_(t,e)}},j=function(){function t(){}t.start=function(){var t=new this;return t.start(),t};var e,r=t.prototype;return r.start=function(){this.startTime=process.hrtime.bigint()},r.end=function(){return Number(process.hrtime.bigint()-this.startTime)/1e6},(e=[{key:"started",get:function(){return void 0!==this.startTime}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}();exports.Bitwise={__proto__:null,and:function(t,e){return t&e},or:function(t,e){return t|e},xor:function(t,e){return t^e}},exports.DefaultMap=m,exports.Http=b,exports.Range=M,exports.Sort=C,exports.Stopwatch=j,exports.allDuplicates=function(t){for(var e,r=new Set,n=[],o=c(t);!(e=o()).done;){var i=e.value;r.has(i)&&n.push(i),r.add(i)}return n},exports.binarySearch=function(t,e){for(var r=0,n=t.length-1;r<=n;){var o=Math.trunc((r+n)/2),i=e(t[o]);if(i<0)r=o+1;else{if(!(i>0))return t[o];n=o-1}}},exports.capitalize=function(t){var e=t.charAt(0).toUpperCase();return""+e+t.slice(e.length)},exports.chunk=function(t,e){return t.length===e?t.map((function(t){return[t]})):d(Math.ceil(t.length/e),(function(r){return t.slice(r*e,r*e+e)}))},exports.clamp=function(t,e,r){return t<e?e:t>r?r:t},exports.combineIterables=T,exports.count=function(t,e){for(var r,n=0,o=c(t);!(r=o()).done;)r.value===e&&n++;return n},exports.cycle=function(t,e){for(var r=[],n=0;n<e;n++)r.push.apply(r,t);return r},exports.difference=function(t,e){for(var r,n=new Set(t),o=c(e);!(r=o()).done;)n.delete(r.value);return n},exports.duplicates=function(t){for(var e,r=new Set,n=new Set,o=c(t);!(e=o()).done;){var i=e.value;r.has(i)&&n.add(i),r.add(i)}return n},exports.every=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(!e(r.value))return!1;return!0},exports.fill=l,exports.find=function(t,e){for(var r,n=c(t);!(r=n()).done;){var o=r.value;if(e(o))return o}},exports.first=function(t,e){var r=t[Symbol.iterator]();if(void 0===e)return r.next().value;for(var n=[],o=0;o<e;o++){var i=r.next();if(i.done)break;n.push(i.value)}return n},exports.formatTable=function(t,e){void 0===e&&(e=" ");var r=S(t);return t.map((function(t){return t.map((function(t,e){return t.padEnd(r[e])})).join(e)})).join("\n")},exports.frequencyTable=function(t){for(var e,r=new Map,n=c(t);!(e=n()).done;){var o=e.value,i=r.get(o);r.set(o,i?i+1:1)}return r},exports.holes=function(t){for(var e=[],r=0;r<t.length;r++)r in t||e.push(r);return e},exports.identical=function(t,e){if(t===e)return!0;if(Array.isArray(t))return t.length===e.length&&t.every((function(t,r){return t===e[r]}));if(t.size!==e.size)return!1;if(t instanceof Set){for(var r,n=c(t);!(r=n()).done;)if(!e.has(r.value))return!1}else if(t instanceof Map)for(var o,i=c(t.entries());!(o=i()).done;){var a=o.value,u=a[0],s=a[1];if(e.get(u)!==s||!e.has(u))return!1}return!0},exports.includes=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(r.value===e)return!0;return!1},exports.intersection=function(t,e){for(var r,n=new Set,o=f(t,e),i=o[1],a=c(o[0]);!(r=a()).done;){var u=r.value;i.has(u)&&n.add(u)}return n},exports.invert=function(t){return function(){return-t.apply(void 0,arguments)}},exports.isDisjoint=function(t,e){for(var r,n=new Set(t),o=c(e);!(r=o()).done;)if(n.has(r.value))return!1;return!0},exports.isSubset=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(!e.has(r.value))return!1;return!0},exports.isSuperset=function(t,e){for(var r,n=c(e);!(r=n()).done;)if(!t.has(r.value))return!1;return!0},exports.join=function(t,e){void 0===e&&(e=",");for(var r="",n=t[Symbol.iterator](),o=n.next();;){var i=o;if(o=n.next(),r+=i.value,o.done)return r;r+=e}},exports.largeToSmall=f,exports.mapFill=d,exports.max=function(t,e){return e>t?e:t},exports.maxColumnLength=S,exports.mean=P,exports.median=function(t){var e=t.length/2;return t.length%2==0?(t[e-1]+t[e])/("bigint"==typeof t[0]?2n:2):t[Math.floor(e)]},exports.min=function(t,e){return e<t?e:t},exports.mode=function(t){for(var e,r=new Map,n=0,o=[],i=c(t);!(e=i()).done;){var a=e.value,u=r.get(a),s=void 0===u?1:u+1;r.set(a,s),s>n?(n=s,o=[a]):s===n&&o.push(a)}return o},exports.multiReplace=function(t,e){for(var r=Object.entries(e),n="",o=0;o<t.length;)t:do{for(var i,a=c(r);!(i=a()).done;){var u=i.value,s=u[0],p=u[1];if(t.slice(o).startsWith(s)){n+=p,o+=s.length;break t}}n+=t[o++]}while(0);return n},exports.newDeck=function(){return[].concat(g)},exports.normaldist=N,exports.not=function(t){return function(){return!t.apply(void 0,arguments)}},exports.nullish=function(t){return null==t},exports.padEnd=function(t,e,r){t.push.apply(t,l(e-t.length,r))},exports.padStart=function(t,e,r){t.unshift.apply(t,l(e-t.length,r))},exports.partition=function(t,e){for(var r,n=[],o=[],i=0,a=c(t);!(r=a()).done;){var u=r.value;(e(u,i++)?n:o).push(u)}return[n,o]},exports.product=function(t,e){return t*e},exports.pull=function(t,e){var r=t.indexOf(e);return-1===r?[]:t.splice(r,1)},exports.random=A,exports.randomInt=function(t,e){return Math.floor(A(Math.ceil(t),Math.floor(e)))},exports.regExpUnion=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return new RegExp(e.map((function(t){return"("+t.source+")"})).join("|"))},exports.rename=function(t,e,n){var o;return e===n?r({},t):function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)e.indexOf(r=i[n])>=0||(o[r]=t[r]);return o}(r({},t,((o={})[n]=t[e],o)),[e].map(p))},exports.reverse=function(t){if(Array.isArray(t))return d(t.length,(function(e){return t[t.length-(e+1)]}));for(var e,r=[],n=c(t);!(e=n()).done;)r.unshift(e.value);return r},exports.same=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=e.map((function(t){return t[Symbol.iterator]()})),o=function(){for(var t,e=n.map((function(t){return t.next()})),r=e[0],o=r.done,i=r.value,a=c(e);!(t=a()).done;){var u=t.value;if(u.done)return{v:e.every((function(t){return t.done===o}))};if(u.value!==i)return{v:!1}}};;){var i=o();if("object"==typeof i)return i.v}},exports.sample=function(t){return t[Math.floor(Math.random()*t.length)]},exports.settled=function(t){return L.apply(this,arguments)},exports.shuffle=function(t,e){void 0===e&&(e=!0);for(var r=e?t:[].concat(t),n=r.length-1;n>0;n--){var o=Math.floor(Math.random()*(n+1)),i=[r[o],r[n]];r[n]=i[0],r[o]=i[1]}if(!e)return r},exports.some=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(e(r.value))return!0;return!1},exports.sortObject=function(t,e){return Object.entries(t).sort((function(t,r){return e(t[1],r[1])}))},exports.standardNormaldist=function(t){return N(t,1,0)},exports.stddev=function(t){return Math.sqrt(O(t))},exports.sum=E,exports.symmetricDifference=function(t,e){for(var r,n=new Set(t),o=c(e);!(r=o()).done;){var i=r.value;n.has(i)?n.delete(i):n.add(i)}return n},exports.toDigits=function(t,e){var r=Math.pow(10,e);return Math.round(t*r*(1+Number.EPSILON))/r},exports.truncate=function(t,e,r){return void 0===r&&(r=""),t.length>e?""+t.slice(0,e)+r:t},exports.uncapitalize=function(t){var e=t.charAt(0).toLowerCase();return""+e+t.slice(e.length)},exports.union=function(t,e){for(var r,n=new Set(t),o=c(e);!(r=o()).done;)n.add(r.value);return n},exports.variance=O; | ||
//# sourceMappingURL=util.cjs.production.min.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self)["@jonahsnider/util"]={})}(this,(function(t){"use strict";function e(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function n(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=t.apply(n,r);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)}))}}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function u(t,e,n){return(u=a()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function c(t){var e="function"==typeof Map?new Map:void 0;return(c=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return u(t,arguments,o(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),i(n,t)})(t)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return s(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=t[Symbol.iterator]()).next.bind(n)}function l(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}function d(t,e){var n=void 0;if("size"in t?n="size":"length"in t&&(n="length"),!n)throw new RangeError;return t[n]<e[n]?[e,t]:[t,e]}function h(t,e){return Array.from({length:t},(function(t,n){return e(n)}))}var p,v;(p=t.Rank||(t.Rank={}))[p.Ace=1]="Ace",p[p.Two=2]="Two",p[p.Three=3]="Three",p[p.Four=4]="Four",p[p.Five=5]="Five",p[p.Six=6]="Six",p[p.Seven=7]="Seven",p[p.Eight=8]="Eight",p[p.Nine=9]="Nine",p[p.Ten=10]="Ten",p[p.Jack=11]="Jack",p[p.Queen=12]="Queen",p[p.King=13]="King",(v=t.Suit||(t.Suit={}))[v.Clubs=0]="Clubs",v[v.Diamonds=1]="Diamonds",v[v.Hearts=2]="Hearts",v[v.Spades=3]="Spades";var y,g,m=[{rank:t.Rank.Ace,suit:t.Suit.Clubs},{rank:t.Rank.Two,suit:t.Suit.Clubs},{rank:t.Rank.Three,suit:t.Suit.Clubs},{rank:t.Rank.Four,suit:t.Suit.Clubs},{rank:t.Rank.Five,suit:t.Suit.Clubs},{rank:t.Rank.Six,suit:t.Suit.Clubs},{rank:t.Rank.Seven,suit:t.Suit.Clubs},{rank:t.Rank.Eight,suit:t.Suit.Clubs},{rank:t.Rank.Nine,suit:t.Suit.Clubs},{rank:t.Rank.Ten,suit:t.Suit.Clubs},{rank:t.Rank.Jack,suit:t.Suit.Clubs},{rank:t.Rank.Queen,suit:t.Suit.Clubs},{rank:t.Rank.King,suit:t.Suit.Clubs},{rank:t.Rank.Ace,suit:t.Suit.Diamonds},{rank:t.Rank.Two,suit:t.Suit.Diamonds},{rank:t.Rank.Three,suit:t.Suit.Diamonds},{rank:t.Rank.Four,suit:t.Suit.Diamonds},{rank:t.Rank.Five,suit:t.Suit.Diamonds},{rank:t.Rank.Six,suit:t.Suit.Diamonds},{rank:t.Rank.Seven,suit:t.Suit.Diamonds},{rank:t.Rank.Eight,suit:t.Suit.Diamonds},{rank:t.Rank.Nine,suit:t.Suit.Diamonds},{rank:t.Rank.Ten,suit:t.Suit.Diamonds},{rank:t.Rank.Jack,suit:t.Suit.Diamonds},{rank:t.Rank.Queen,suit:t.Suit.Diamonds},{rank:t.Rank.King,suit:t.Suit.Diamonds},{rank:t.Rank.Ace,suit:t.Suit.Hearts},{rank:t.Rank.Two,suit:t.Suit.Hearts},{rank:t.Rank.Three,suit:t.Suit.Hearts},{rank:t.Rank.Four,suit:t.Suit.Hearts},{rank:t.Rank.Five,suit:t.Suit.Hearts},{rank:t.Rank.Six,suit:t.Suit.Hearts},{rank:t.Rank.Seven,suit:t.Suit.Hearts},{rank:t.Rank.Eight,suit:t.Suit.Hearts},{rank:t.Rank.Nine,suit:t.Suit.Hearts},{rank:t.Rank.Ten,suit:t.Suit.Hearts},{rank:t.Rank.Jack,suit:t.Suit.Hearts},{rank:t.Rank.Queen,suit:t.Suit.Hearts},{rank:t.Rank.King,suit:t.Suit.Hearts},{rank:t.Rank.Ace,suit:t.Suit.Spades},{rank:t.Rank.Two,suit:t.Suit.Spades},{rank:t.Rank.Three,suit:t.Suit.Spades},{rank:t.Rank.Four,suit:t.Suit.Spades},{rank:t.Rank.Five,suit:t.Suit.Spades},{rank:t.Rank.Six,suit:t.Suit.Spades},{rank:t.Rank.Seven,suit:t.Suit.Spades},{rank:t.Rank.Eight,suit:t.Suit.Spades},{rank:t.Rank.Nine,suit:t.Suit.Spades},{rank:t.Rank.Ten,suit:t.Suit.Spades},{rank:t.Rank.Jack,suit:t.Suit.Spades},{rank:t.Rank.Queen,suit:t.Suit.Spades},{rank:t.Rank.King,suit:t.Suit.Spades}],S=function(t){var e,n;function r(e,n){var r;return(r=t.call(this,n)||this).defaultValueOrDefaultValueFn=e,r.defaultValueIsFunction="function"==typeof r.defaultValueOrDefaultValueFn,r}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.prototype.get=function(e){return this.has(e)?t.prototype.get.call(this,e):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(e):this.defaultValueOrDefaultValueFn},r}(c(Map));function k(t){for(var e,n=t[0].map((function(t){return t.length})),r=f(t);!(e=r()).done;)for(var o=e.value,i=0;i<o.length;i++){var a=o[i].length;n[i]<a&&(n[i]=a)}return n}!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(y||(y={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(g||(g={}));var b={__proto__:null,get Status(){return y},get Method(){return g}},w=function(t,e){return function(t){var e=function(t){var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new R(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=k(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,i),o}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function d(){}function h(){}var p={};p[o]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(x([])));y&&y!==e&&n.call(y,o)&&(p=y);var g=h.prototype=l.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function k(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function x(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=g.constructor=h,h.constructor=d,d.displayName=u(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(S.prototype),S.prototype[i]=function(){return this},t.AsyncIterator=S,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new S(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),u(g,a,"Generator"),g[o]=function(){return this},g.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=x,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:x(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}(e={exports:{}}),e.exports}(),R=w.mark(x);function x(){var t,e,n,r,o,i=arguments;return w.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:for(t=i.length,e=new Array(t),n=0;n<t;n++)e[n]=i[n];r=0,o=e;case 2:if(!(r<o.length)){a.next=8;break}return a.delegateYield(o[r],"t0",5);case 5:r++,a.next=2;break;case 8:case"end":return a.stop()}}),R)}function T(t,e){return t+e}function E(t){var e=N(t);return t.map((function(t){return Math.pow(t-e,2)})).reduce(T)/(t.length-1)}function O(t,e,n){return 1/(e*Math.sqrt(2*Math.PI))*Math.pow(Math.E,-.5*Math.pow(t-n/e,2))}function N(t){var e=t.reduce(T);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function P(t,e){return Math.random()*(e-t)+t}function A(){return(A=n(w.mark((function t(e){return w.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:return t.t0=t.sent,t.t1=void 0,t.abrupt("return",[t.t0,t.t1]);case 8:return t.prev=8,t.t2=t.catch(0),t.abrupt("return",[void 0,t.t2]);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))).apply(this,arguments)}var L=function(){function t(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}return t.from=function(e){return new t(e[0],e[1])},t.prototype.has=function(t){return t>=this.lower&&t<=this.upper},t}();function M(t,e){return t<e?-1:t>e?1:0}function F(t,e){return t<e?1:t>e?-1:0}var j={__proto__:null,ascending:function(t,e){return void 0===e&&"function"==typeof t?function(e,n){return M(t(e),t(n))}:M(t,e)},descending:function(t,e){return void 0===e&&"function"==typeof t?function(e,n){return F(t(e),t(n))}:F(t,e)}},C=function(){function t(){}t.start=function(){var t=new this;return t.start(),t};var e,n=t.prototype;return n.start=function(){this.startTime=process.hrtime.bigint()},n.end=function(){return Number(process.hrtime.bigint()-this.startTime)/1e6},(e=[{key:"started",get:function(){return void 0!==this.startTime}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t.prototype,e),t}();t.DefaultMap=S,t.Http=b,t.Range=L,t.Sort=j,t.Stopwatch=C,t.allDuplicates=function(t){for(var e,n=new Set,r=[],o=f(t);!(e=o()).done;){var i=e.value;n.has(i)&&r.push(i),n.add(i)}return r},t.binarySearch=function(t,e){for(var n=0,r=t.length-1;n<=r;){var o=Math.trunc((n+r)/2),i=e(t[o]);if(i<0)n=o+1;else{if(!(i>0))return t[o];r=o-1}}},t.capitalize=function(t){var e=t.charAt(0).toUpperCase();return""+e+t.slice(e.length)},t.chunk=function(t,e){return t.length===e?t.map((function(t){return[t]})):h(Math.ceil(t.length/e),(function(n){return t.slice(n*e,n*e+e)}))},t.clamp=function(t,e,n){return t<e?e:t>n?n:t},t.combineIterables=x,t.difference=function(t,e){for(var n,r=new Set(t),o=f(e);!(n=o()).done;)r.delete(n.value);return r},t.duplicates=function(t){for(var e,n=new Set,r=new Set,o=f(t);!(e=o()).done;){var i=e.value;n.has(i)&&r.add(i),n.add(i)}return r},t.every=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(!e(n.value))return!1;return!0},t.fill=function(t,e){return Array.from({length:t},(function(){return e}))},t.find=function(t,e){for(var n,r=f(t);!(n=r()).done;){var o=n.value;if(e(o))return o}},t.first=function(t,e){var n=t[Symbol.iterator]();if(void 0===e)return n.next().value;for(var r=[],o=0;o<e;o++){var i=n.next();if(i.done)break;r.push(i.value)}return r},t.formatTable=function(t,e){void 0===e&&(e=" ");var n=k(t);return t.map((function(t){return t.map((function(t,e){return t.padEnd(n[e])})).join(e)})).join("\n")},t.frequencyTable=function(t){for(var e,n=new Map,r=f(t);!(e=r()).done;){var o=e.value,i=n.get(o);n.set(o,i?i+1:1)}return n},t.holes=function(t){for(var e=[],n=0;n<t.length;n++)n in t||e.push(n);return e},t.identical=function(t,e){if(t===e)return!0;if(Array.isArray(t))return t.length===e.length&&t.every((function(t,n){return t===e[n]}));if(t.size!==e.size)return!1;if(t instanceof Set){for(var n,r=f(t);!(n=r()).done;)if(!e.has(n.value))return!1}else if(t instanceof Map)for(var o,i=f(t.entries());!(o=i()).done;){var a=o.value,u=a[0],c=a[1];if(e.get(u)!==c||!e.has(u))return!1}return!0},t.includes=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(n.value===e)return!0;return!1},t.intersection=function(t,e){for(var n,r=new Set,o=d(t,e),i=o[1],a=f(o[0]);!(n=a()).done;){var u=n.value;i.has(u)&&r.add(u)}return r},t.invert=function(t){return function(){return-t.apply(void 0,arguments)}},t.isDisjoint=function(t,e){for(var n,r=new Set(t),o=f(e);!(n=o()).done;)if(r.has(n.value))return!1;return!0},t.isSubset=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(!e.has(n.value))return!1;return!0},t.isSuperset=function(t,e){for(var n,r=f(e);!(n=r()).done;)if(!t.has(n.value))return!1;return!0},t.join=function(t,e){void 0===e&&(e=",");for(var n="",r=t[Symbol.iterator](),o=r.next();;){var i=o;if(o=r.next(),n+=i.value,o.done)return n;n+=e}},t.largeToSmall=d,t.mapFill=h,t.max=function(t,e){return Math.max(t,e)},t.maxColumnLength=k,t.mean=N,t.median=function(t){var e=t.length/2;return t.length%2==0?(t[e-1]+t[e])/("bigint"==typeof t[0]?2n:2):t[Math.floor(e)]},t.min=function(t,e){return Math.min(t,e)},t.mode=function(t){for(var e,n=new Map,r=0,o=[],i=f(t);!(e=i()).done;){var a=e.value,u=n.get(a),c=void 0===u?1:u+1;n.set(a,c),c>r?(r=c,o=[a]):c===r&&o.push(a)}return o},t.multiReplace=function(t,e){for(var n=Object.entries(e),r="",o=0;o<t.length;)t:do{for(var i,a=f(n);!(i=a()).done;){var u=i.value,c=u[0],s=u[1];if(t.slice(o).startsWith(c)){r+=s,o+=c.length;break t}}r+=t[o++]}while(0);return r},t.newDeck=function(){return[].concat(m)},t.normaldist=O,t.not=function(t){return function(){return!t.apply(void 0,arguments)}},t.nullish=function(t){return null==t},t.partition=function(t,e){for(var n,r=[],o=[],i=0,a=f(t);!(n=a()).done;){var u=n.value;(e(u,i++)?r:o).push(u)}return[r,o]},t.pull=function(t,e){var n=t.indexOf(e);return-1===n?[]:t.splice(n,1)},t.random=P,t.randomInt=function(t,e){return Math.floor(P(Math.ceil(t),Math.floor(e)))},t.regExpUnion=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new RegExp(e.map((function(t){return"("+t.source+")"})).join("|"))},t.rename=function(t,e,n){var o;return e===n?r({},t):function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)e.indexOf(n=i[r])>=0||(o[n]=t[n]);return o}(r({},t,((o={})[n]=t[e],o)),[e].map(l))},t.reverse=function(t){if(Array.isArray(t))return h(t.length,(function(e){return t[t.length-(e+1)]}));for(var e,n=[],r=f(t);!(e=r()).done;)n.unshift(e.value);return n},t.same=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=e.map((function(t){return t[Symbol.iterator]()})),o=function(){for(var t,e=r.map((function(t){return t.next()})),n=e[0],o=n.done,i=n.value,a=f(e);!(t=a()).done;){var u=t.value;if(u.done)return{v:e.every((function(t){return t.done===o}))};if(u.value!==i)return{v:!1}}};;){var i=o();if("object"==typeof i)return i.v}},t.sample=function(t){return t[Math.floor(Math.random()*t.length)]},t.settled=function(t){return A.apply(this,arguments)},t.shuffle=function(t,e){void 0===e&&(e=!0);for(var n=e?t:[].concat(t),r=n.length-1;r>0;r--){var o=Math.floor(Math.random()*(r+1)),i=[n[o],n[r]];n[r]=i[0],n[o]=i[1]}if(!e)return n},t.some=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(e(n.value))return!0;return!1},t.sortObject=function(t,e){return Object.entries(t).sort((function(t,n){return e(t[1],n[1])}))},t.standardNormaldist=function(t){return O(t,1,0)},t.stddev=function(t){return Math.sqrt(E(t))},t.sum=T,t.symmetricDifference=function(t,e){for(var n,r=new Set(t),o=f(e);!(n=o()).done;){var i=n.value;r.has(i)?r.delete(i):r.add(i)}return r},t.toDigits=function(t,e){var n=Math.pow(10,e);return Math.round(t*n*(1+Number.EPSILON))/n},t.truncate=function(t,e,n){return void 0===n&&(n=""),t.length>e?""+t.slice(0,e)+n:t},t.uncapitalize=function(t){var e=t.charAt(0).toLowerCase();return""+e+t.slice(e.length)},t.union=function(t,e){for(var n,r=new Set(t),o=f(e);!(n=o()).done;)r.add(n.value);return r},t.variance=E,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self)["@jonahsnider/util"]={})}(this,(function(t){"use strict";function e(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function n(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=t.apply(n,r);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)}))}}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function u(t,e,n){return(u=a()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function c(t){var e="function"==typeof Map?new Map:void 0;return(c=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return u(t,arguments,o(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),i(n,t)})(t)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return s(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=t[Symbol.iterator]()).next.bind(n)}function l(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}function d(t,e){var n=void 0;if("size"in t?n="size":"length"in t&&(n="length"),!n)throw new RangeError;return t[n]<e[n]?[e,t]:[t,e]}function p(t,e){return Array.from({length:t},(function(){return e}))}function h(t,e){return Array.from({length:t},(function(t,n){return e(n)}))}var v,y;(v=t.Rank||(t.Rank={}))[v.Ace=1]="Ace",v[v.Two=2]="Two",v[v.Three=3]="Three",v[v.Four=4]="Four",v[v.Five=5]="Five",v[v.Six=6]="Six",v[v.Seven=7]="Seven",v[v.Eight=8]="Eight",v[v.Nine=9]="Nine",v[v.Ten=10]="Ten",v[v.Jack=11]="Jack",v[v.Queen=12]="Queen",v[v.King=13]="King",(y=t.Suit||(t.Suit={}))[y.Clubs=0]="Clubs",y[y.Diamonds=1]="Diamonds",y[y.Hearts=2]="Hearts",y[y.Spades=3]="Spades";var g,m,S=[{rank:t.Rank.Ace,suit:t.Suit.Clubs},{rank:t.Rank.Two,suit:t.Suit.Clubs},{rank:t.Rank.Three,suit:t.Suit.Clubs},{rank:t.Rank.Four,suit:t.Suit.Clubs},{rank:t.Rank.Five,suit:t.Suit.Clubs},{rank:t.Rank.Six,suit:t.Suit.Clubs},{rank:t.Rank.Seven,suit:t.Suit.Clubs},{rank:t.Rank.Eight,suit:t.Suit.Clubs},{rank:t.Rank.Nine,suit:t.Suit.Clubs},{rank:t.Rank.Ten,suit:t.Suit.Clubs},{rank:t.Rank.Jack,suit:t.Suit.Clubs},{rank:t.Rank.Queen,suit:t.Suit.Clubs},{rank:t.Rank.King,suit:t.Suit.Clubs},{rank:t.Rank.Ace,suit:t.Suit.Diamonds},{rank:t.Rank.Two,suit:t.Suit.Diamonds},{rank:t.Rank.Three,suit:t.Suit.Diamonds},{rank:t.Rank.Four,suit:t.Suit.Diamonds},{rank:t.Rank.Five,suit:t.Suit.Diamonds},{rank:t.Rank.Six,suit:t.Suit.Diamonds},{rank:t.Rank.Seven,suit:t.Suit.Diamonds},{rank:t.Rank.Eight,suit:t.Suit.Diamonds},{rank:t.Rank.Nine,suit:t.Suit.Diamonds},{rank:t.Rank.Ten,suit:t.Suit.Diamonds},{rank:t.Rank.Jack,suit:t.Suit.Diamonds},{rank:t.Rank.Queen,suit:t.Suit.Diamonds},{rank:t.Rank.King,suit:t.Suit.Diamonds},{rank:t.Rank.Ace,suit:t.Suit.Hearts},{rank:t.Rank.Two,suit:t.Suit.Hearts},{rank:t.Rank.Three,suit:t.Suit.Hearts},{rank:t.Rank.Four,suit:t.Suit.Hearts},{rank:t.Rank.Five,suit:t.Suit.Hearts},{rank:t.Rank.Six,suit:t.Suit.Hearts},{rank:t.Rank.Seven,suit:t.Suit.Hearts},{rank:t.Rank.Eight,suit:t.Suit.Hearts},{rank:t.Rank.Nine,suit:t.Suit.Hearts},{rank:t.Rank.Ten,suit:t.Suit.Hearts},{rank:t.Rank.Jack,suit:t.Suit.Hearts},{rank:t.Rank.Queen,suit:t.Suit.Hearts},{rank:t.Rank.King,suit:t.Suit.Hearts},{rank:t.Rank.Ace,suit:t.Suit.Spades},{rank:t.Rank.Two,suit:t.Suit.Spades},{rank:t.Rank.Three,suit:t.Suit.Spades},{rank:t.Rank.Four,suit:t.Suit.Spades},{rank:t.Rank.Five,suit:t.Suit.Spades},{rank:t.Rank.Six,suit:t.Suit.Spades},{rank:t.Rank.Seven,suit:t.Suit.Spades},{rank:t.Rank.Eight,suit:t.Suit.Spades},{rank:t.Rank.Nine,suit:t.Suit.Spades},{rank:t.Rank.Ten,suit:t.Suit.Spades},{rank:t.Rank.Jack,suit:t.Suit.Spades},{rank:t.Rank.Queen,suit:t.Suit.Spades},{rank:t.Rank.King,suit:t.Suit.Spades}],k=function(t){var e,n;function r(e,n){var r;return(r=t.call(this,n)||this).defaultValueOrDefaultValueFn=e,r.defaultValueIsFunction="function"==typeof r.defaultValueOrDefaultValueFn,r}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.prototype.get=function(e){return this.has(e)?t.prototype.get.call(this,e):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(e):this.defaultValueOrDefaultValueFn},r}(c(Map));function b(t){for(var e,n=t[0].map((function(t){return t.length})),r=f(t);!(e=r()).done;)for(var o=e.value,i=0;i<o.length;i++){var a=o[i].length;n[i]<a&&(n[i]=a)}return n}!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(g||(g={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(m||(m={}));var w={__proto__:null,get Status(){return g},get Method(){return m}},R=function(t,e){return function(t){var e=function(t){var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new R(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=k(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,i),o}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function d(){}function p(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(x([])));y&&y!==e&&n.call(y,o)&&(h=y);var g=p.prototype=l.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function k(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function x(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=g.constructor=p,p.constructor=d,d.displayName=u(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(S.prototype),S.prototype[i]=function(){return this},t.AsyncIterator=S,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new S(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),u(g,a,"Generator"),g[o]=function(){return this},g.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=x,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:x(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}(e={exports:{}}),e.exports}(),x=R.mark(T);function T(){var t,e,n,r,o,i=arguments;return R.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:for(t=i.length,e=new Array(t),n=0;n<t;n++)e[n]=i[n];r=0,o=e;case 2:if(!(r<o.length)){a.next=8;break}return a.delegateYield(o[r],"t0",5);case 5:r++,a.next=2;break;case 8:case"end":return a.stop()}}),x)}function E(t,e){return t+e}function O(t){var e=P(t);return t.map((function(t){return Math.pow(t-e,2)})).reduce(E)/(t.length-1)}function N(t,e,n){return 1/(e*Math.sqrt(2*Math.PI))*Math.pow(Math.E,-.5*Math.pow(t-n/e,2))}function P(t){var e=t.reduce(E);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function A(t,e){return Math.random()*(e-t)+t}function L(){return(L=n(R.mark((function t(e){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:return t.t0=t.sent,t.t1=void 0,t.abrupt("return",[t.t0,t.t1]);case 8:return t.prev=8,t.t2=t.catch(0),t.abrupt("return",[void 0,t.t2]);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))).apply(this,arguments)}var M=function(){function t(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}return t.from=function(e){return new t(e[0],e[1])},t.prototype.has=function(t){return t>=this.lower&&t<=this.upper},t}();function F(t,e){return t<e?-1:t>e?1:0}function _(t,e){return t<e?1:t>e?-1:0}var j={__proto__:null,ascending:function(t,e){return void 0===e&&"function"==typeof t?function(e,n){return F(t(e),t(n))}:F(t,e)},descending:function(t,e){return void 0===e&&"function"==typeof t?function(e,n){return _(t(e),t(n))}:_(t,e)}},C=function(){function t(){}t.start=function(){var t=new this;return t.start(),t};var e,n=t.prototype;return n.start=function(){this.startTime=process.hrtime.bigint()},n.end=function(){return Number(process.hrtime.bigint()-this.startTime)/1e6},(e=[{key:"started",get:function(){return void 0!==this.startTime}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t.prototype,e),t}();t.Bitwise={__proto__:null,and:function(t,e){return t&e},or:function(t,e){return t|e},xor:function(t,e){return t^e}},t.DefaultMap=k,t.Http=w,t.Range=M,t.Sort=j,t.Stopwatch=C,t.allDuplicates=function(t){for(var e,n=new Set,r=[],o=f(t);!(e=o()).done;){var i=e.value;n.has(i)&&r.push(i),n.add(i)}return r},t.binarySearch=function(t,e){for(var n=0,r=t.length-1;n<=r;){var o=Math.trunc((n+r)/2),i=e(t[o]);if(i<0)n=o+1;else{if(!(i>0))return t[o];r=o-1}}},t.capitalize=function(t){var e=t.charAt(0).toUpperCase();return""+e+t.slice(e.length)},t.chunk=function(t,e){return t.length===e?t.map((function(t){return[t]})):h(Math.ceil(t.length/e),(function(n){return t.slice(n*e,n*e+e)}))},t.clamp=function(t,e,n){return t<e?e:t>n?n:t},t.combineIterables=T,t.count=function(t,e){for(var n,r=0,o=f(t);!(n=o()).done;)n.value===e&&r++;return r},t.cycle=function(t,e){for(var n=[],r=0;r<e;r++)n.push.apply(n,t);return n},t.difference=function(t,e){for(var n,r=new Set(t),o=f(e);!(n=o()).done;)r.delete(n.value);return r},t.duplicates=function(t){for(var e,n=new Set,r=new Set,o=f(t);!(e=o()).done;){var i=e.value;n.has(i)&&r.add(i),n.add(i)}return r},t.every=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(!e(n.value))return!1;return!0},t.fill=p,t.find=function(t,e){for(var n,r=f(t);!(n=r()).done;){var o=n.value;if(e(o))return o}},t.first=function(t,e){var n=t[Symbol.iterator]();if(void 0===e)return n.next().value;for(var r=[],o=0;o<e;o++){var i=n.next();if(i.done)break;r.push(i.value)}return r},t.formatTable=function(t,e){void 0===e&&(e=" ");var n=b(t);return t.map((function(t){return t.map((function(t,e){return t.padEnd(n[e])})).join(e)})).join("\n")},t.frequencyTable=function(t){for(var e,n=new Map,r=f(t);!(e=r()).done;){var o=e.value,i=n.get(o);n.set(o,i?i+1:1)}return n},t.holes=function(t){for(var e=[],n=0;n<t.length;n++)n in t||e.push(n);return e},t.identical=function(t,e){if(t===e)return!0;if(Array.isArray(t))return t.length===e.length&&t.every((function(t,n){return t===e[n]}));if(t.size!==e.size)return!1;if(t instanceof Set){for(var n,r=f(t);!(n=r()).done;)if(!e.has(n.value))return!1}else if(t instanceof Map)for(var o,i=f(t.entries());!(o=i()).done;){var a=o.value,u=a[0],c=a[1];if(e.get(u)!==c||!e.has(u))return!1}return!0},t.includes=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(n.value===e)return!0;return!1},t.intersection=function(t,e){for(var n,r=new Set,o=d(t,e),i=o[1],a=f(o[0]);!(n=a()).done;){var u=n.value;i.has(u)&&r.add(u)}return r},t.invert=function(t){return function(){return-t.apply(void 0,arguments)}},t.isDisjoint=function(t,e){for(var n,r=new Set(t),o=f(e);!(n=o()).done;)if(r.has(n.value))return!1;return!0},t.isSubset=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(!e.has(n.value))return!1;return!0},t.isSuperset=function(t,e){for(var n,r=f(e);!(n=r()).done;)if(!t.has(n.value))return!1;return!0},t.join=function(t,e){void 0===e&&(e=",");for(var n="",r=t[Symbol.iterator](),o=r.next();;){var i=o;if(o=r.next(),n+=i.value,o.done)return n;n+=e}},t.largeToSmall=d,t.mapFill=h,t.max=function(t,e){return e>t?e:t},t.maxColumnLength=b,t.mean=P,t.median=function(t){var e=t.length/2;return t.length%2==0?(t[e-1]+t[e])/("bigint"==typeof t[0]?2n:2):t[Math.floor(e)]},t.min=function(t,e){return e<t?e:t},t.mode=function(t){for(var e,n=new Map,r=0,o=[],i=f(t);!(e=i()).done;){var a=e.value,u=n.get(a),c=void 0===u?1:u+1;n.set(a,c),c>r?(r=c,o=[a]):c===r&&o.push(a)}return o},t.multiReplace=function(t,e){for(var n=Object.entries(e),r="",o=0;o<t.length;)t:do{for(var i,a=f(n);!(i=a()).done;){var u=i.value,c=u[0],s=u[1];if(t.slice(o).startsWith(c)){r+=s,o+=c.length;break t}}r+=t[o++]}while(0);return r},t.newDeck=function(){return[].concat(S)},t.normaldist=N,t.not=function(t){return function(){return!t.apply(void 0,arguments)}},t.nullish=function(t){return null==t},t.padEnd=function(t,e,n){t.push.apply(t,p(e-t.length,n))},t.padStart=function(t,e,n){t.unshift.apply(t,p(e-t.length,n))},t.partition=function(t,e){for(var n,r=[],o=[],i=0,a=f(t);!(n=a()).done;){var u=n.value;(e(u,i++)?r:o).push(u)}return[r,o]},t.product=function(t,e){return t*e},t.pull=function(t,e){var n=t.indexOf(e);return-1===n?[]:t.splice(n,1)},t.random=A,t.randomInt=function(t,e){return Math.floor(A(Math.ceil(t),Math.floor(e)))},t.regExpUnion=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new RegExp(e.map((function(t){return"("+t.source+")"})).join("|"))},t.rename=function(t,e,n){var o;return e===n?r({},t):function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)e.indexOf(n=i[r])>=0||(o[n]=t[n]);return o}(r({},t,((o={})[n]=t[e],o)),[e].map(l))},t.reverse=function(t){if(Array.isArray(t))return h(t.length,(function(e){return t[t.length-(e+1)]}));for(var e,n=[],r=f(t);!(e=r()).done;)n.unshift(e.value);return n},t.same=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=e.map((function(t){return t[Symbol.iterator]()})),o=function(){for(var t,e=r.map((function(t){return t.next()})),n=e[0],o=n.done,i=n.value,a=f(e);!(t=a()).done;){var u=t.value;if(u.done)return{v:e.every((function(t){return t.done===o}))};if(u.value!==i)return{v:!1}}};;){var i=o();if("object"==typeof i)return i.v}},t.sample=function(t){return t[Math.floor(Math.random()*t.length)]},t.settled=function(t){return L.apply(this,arguments)},t.shuffle=function(t,e){void 0===e&&(e=!0);for(var n=e?t:[].concat(t),r=n.length-1;r>0;r--){var o=Math.floor(Math.random()*(r+1)),i=[n[o],n[r]];n[r]=i[0],n[o]=i[1]}if(!e)return n},t.some=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(e(n.value))return!0;return!1},t.sortObject=function(t,e){return Object.entries(t).sort((function(t,n){return e(t[1],n[1])}))},t.standardNormaldist=function(t){return N(t,1,0)},t.stddev=function(t){return Math.sqrt(O(t))},t.sum=E,t.symmetricDifference=function(t,e){for(var n,r=new Set(t),o=f(e);!(n=o()).done;){var i=n.value;r.has(i)?r.delete(i):r.add(i)}return r},t.toDigits=function(t,e){var n=Math.pow(10,e);return Math.round(t*n*(1+Number.EPSILON))/n},t.truncate=function(t,e,n){return void 0===n&&(n=""),t.length>e?""+t.slice(0,e)+n:t},t.uncapitalize=function(t){var e=t.charAt(0).toLowerCase();return""+e+t.slice(e.length)},t.union=function(t,e){for(var n,r=new Set(t),o=f(e);!(n=o()).done;)r.add(n.value);return r},t.variance=O,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=util.umd.production.min.js.map |
@@ -72,3 +72,3 @@ { | ||
"typings": "dist/index.d.ts", | ||
"version": "4.4.0" | ||
"version": "4.5.0" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1072144
40
11322