+12
-12
@@ -7,14 +7,14 @@ (function () { | ||
| var _intersect = require('./lib/lodash.custom.min.js').intersection; | ||
| var _intersectWith = require('./lib/lodash.custom.min.js').intersectionWith; | ||
| var _difference = require('./lib/lodash.custom.min.js').difference; | ||
| var _differenceWith = require('./lib/lodash.custom.min.js').differenceWith; | ||
| var _uniq = require('./lib/lodash.custom.min.js').uniq; | ||
| var _uniqWith = require('./lib/lodash.custom.min.js').uniqWith; | ||
| var _partialRight = require('./lib/lodash.custom.min.js').partialRight; | ||
| var _forEach = require('./lib/lodash.custom.min.js').forEach; | ||
| var _keys = require('./lib/lodash.custom.min.js').keys; | ||
| var _isArray = require('./lib/lodash.custom.min.js').isArray; | ||
| var _toArray = require('./lib/lodash.custom.min.js').toArray; | ||
| var _orderBy = require('./lib/lodash.custom.min.js').orderBy; | ||
| var _intersect = require('lodash/intersection'); | ||
| var _intersectWith = require('lodash/intersectionWith'); | ||
| var _difference = require('lodash/difference'); | ||
| var _differenceWith = require('lodash/differenceWith'); | ||
| var _uniq = require('lodash/uniq'); | ||
| var _uniqWith = require('lodash/uniqWith'); | ||
| var _partialRight = require('lodash/partialRight'); | ||
| var _forEach = require('lodash/forEach'); | ||
| var _keys = require('lodash/keys'); | ||
| var _isArray = require('lodash/isArray'); | ||
| var _toArray = require('lodash/toArray'); | ||
| var _orderBy = require('lodash/orderBy'); | ||
@@ -21,0 +21,0 @@ function orderByDesc (arr, cmp) { |
@@ -1,11 +0,4 @@ | ||
| var C,N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},X={exports:{}},H={exports:{}};C=H,function(){var N,X,H,U,q,W,G,Q,Y,Z,V,J,K,ee,te;H=Math.floor,Z=Math.min,X=function(C,N){return C<N?-1:C>N?1:0},Y=function(C,N,U,q,W){var G;if(null==U&&(U=0),null==W&&(W=X),U<0)throw new Error("lo must be non-negative");for(null==q&&(q=C.length);U<q;)W(N,C[G=H((U+q)/2)])<0?q=G:U=G+1;return[].splice.apply(C,[U,U-U].concat(N)),N},W=function(C,N,H){return null==H&&(H=X),C.push(N),ee(C,0,C.length-1,H)},q=function(C,N){var H,U;return null==N&&(N=X),H=C.pop(),C.length?(U=C[0],C[0]=H,te(C,0,N)):U=H,U},Q=function(C,N,H){var U;return null==H&&(H=X),U=C[0],C[0]=N,te(C,0,H),U},G=function(C,N,H){var U;return null==H&&(H=X),C.length&&H(C[0],N)<0&&(N=(U=[C[0],N])[0],C[0]=U[1],te(C,0,H)),N},U=function(C,N){var U,q,W,G,Q,Y;for(null==N&&(N=X),Q=[],q=0,W=(G=function(){Y=[];for(var N=0,X=H(C.length/2);0<=X?N<X:N>X;0<=X?N++:N--)Y.push(N);return Y}.apply(this).reverse()).length;q<W;q++)U=G[q],Q.push(te(C,U,N));return Q},K=function(C,N,H){var U;if(null==H&&(H=X),-1!==(U=C.indexOf(N)))return ee(C,0,U,H),te(C,U,H)},V=function(C,N,H){var q,W,Q,Y,Z;if(null==H&&(H=X),!(W=C.slice(0,N)).length)return W;for(U(W,H),Q=0,Y=(Z=C.slice(N)).length;Q<Y;Q++)q=Z[Q],G(W,q,H);return W.sort(H).reverse()},J=function(C,N,H){var W,G,Q,V,J,K,ee,te,re;if(null==H&&(H=X),10*N<=C.length){if(!(Q=C.slice(0,N).sort(H)).length)return Q;for(G=Q[Q.length-1],V=0,K=(ee=C.slice(N)).length;V<K;V++)H(W=ee[V],G)<0&&(Y(Q,W,0,null,H),Q.pop(),G=Q[Q.length-1]);return Q}for(U(C,H),re=[],J=0,te=Z(N,C.length);0<=te?J<te:J>te;0<=te?++J:--J)re.push(q(C,H));return re},ee=function(C,N,H,U){var q,W,G;for(null==U&&(U=X),q=C[H];H>N&&U(q,W=C[G=H-1>>1])<0;)C[H]=W,H=G;return C[H]=q},te=function(C,N,H){var U,q,W,G,Q;for(null==H&&(H=X),q=C.length,Q=N,W=C[N],U=2*N+1;U<q;)(G=U+1)<q&&!(H(C[U],C[G])<0)&&(U=G),C[N]=C[U],U=2*(N=U)+1;return C[N]=W,ee(C,Q,N,H)},N=function(){function Heap(C){this.cmp=null!=C?C:X,this.nodes=[]}return Heap.push=W,Heap.pop=q,Heap.replace=Q,Heap.pushpop=G,Heap.heapify=U,Heap.updateItem=K,Heap.nlargest=V,Heap.nsmallest=J,Heap.prototype.push=function(C){return W(this.nodes,C,this.cmp)},Heap.prototype.pop=function(){return q(this.nodes,this.cmp)},Heap.prototype.peek=function(){return this.nodes[0]},Heap.prototype.contains=function(C){return-1!==this.nodes.indexOf(C)},Heap.prototype.replace=function(C){return Q(this.nodes,C,this.cmp)},Heap.prototype.pushpop=function(C){return G(this.nodes,C,this.cmp)},Heap.prototype.heapify=function(){return U(this.nodes,this.cmp)},Heap.prototype.updateItem=function(C){return K(this.nodes,C,this.cmp)},Heap.prototype.clear=function(){return this.nodes=[]},Heap.prototype.empty=function(){return 0===this.nodes.length},Heap.prototype.size=function(){return this.nodes.length},Heap.prototype.clone=function(){var C;return(C=new Heap).nodes=this.nodes.slice(0),C},Heap.prototype.toArray=function(){return this.nodes.slice(0)},Heap.prototype.insert=Heap.prototype.push,Heap.prototype.top=Heap.prototype.peek,Heap.prototype.front=Heap.prototype.peek,Heap.prototype.has=Heap.prototype.contains,Heap.prototype.copy=Heap.prototype.clone,Heap}(),C.exports=N}.call(N);var U,q,W,G=H.exports,Q={exports:{}}; | ||
| /** | ||
| * @license | ||
| * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE | ||
| * Build: `lodash include="intersection,difference,uniq,toArray" -p -o ./lite/lodash.custom.min.js` | ||
| */ | ||
| !function(C,X){(function(){function t(C,N,X){switch(X.length){case 0:return C.call(N);case 1:return C.call(N,X[0]);case 2:return C.call(N,X[0],X[1]);case 3:return C.call(N,X[0],X[1],X[2])}return C.apply(N,X)}function e(C,N){var X;if(X=!(null==C||!C.length)){if(N==N)e:{X=-1;for(var H=C.length;++X<H;)if(C[X]===N)break e;X=-1}else e:{X=n;H=C.length;for(var U=-1;++U<H;)if(X(C[U],U,C)){X=U;break e}X=-1}X=-1<X}return X}function r(C,N){for(var X=-1,H=null==C?0:C.length,U=Array(H);++X<H;)U[X]=N(C[X],X,C);return U}function n(C){return C!=C}function f(C,N){return C.has(N)}function i(C){var N=-1,X=Array(C.size);return C.forEach((function(C,H){X[++N]=[H,C]})),X}function a(C){var N=-1,X=Array(C.size);return C.forEach((function(C){X[++N]=C})),X}function c(){}function s(C){var N=-1,X=null==C?0:C.length;for(this.clear();++N<X;){var H=C[N];this.set(H[0],H[1])}}function l(C){var N=-1,X=null==C?0:C.length;for(this.clear();++N<X;){var H=C[N];this.set(H[0],H[1])}}function h(C){var N=-1,X=null==C?0:C.length;for(this.clear();++N<X;){var H=C[N];this.set(H[0],H[1])}}function p(C){var N=-1,X=null==C?0:C.length;for(this.__data__=new h;++N<X;)this.add(C[N])}function d(C,N){for(var X=C.length;X--;)if(k(C[X][0],N))return X;return-1}function b(C,N,X,H,U){var q=-1,W=C.length;for(X||(X=w),U||(U=[]);++q<W;){var G=C[q];if(0<N&&X(G))if(1<N)b(G,N-1,X,H,U);else for(var Q=U,Y=-1,Z=G.length,V=Q.length;++Y<Z;)Q[V+Y]=G[Y];else H||(U[U.length]=G)}return U}function _(C){if(null==C)C=C===H?"[object Undefined]":"[object Null]";else if(me&&me in Object(C)){var N=ce.call(C,me),X=C[me];try{C[me]=H;var U=!0}catch(C){}var q=ue.call(C);U&&(N?C[me]=X:delete C[me]),C=q}else C=ue.call(C);return C}function y(C){return P(C)&&"[object Arguments]"==_(C)}function j(C){return He(O(C,R),C+"")}function v(C){return z(C)?C:[]}function A(C,N){var X=C.__data__,H=typeof N;return("string"==H||"number"==H||"symbol"==H||"boolean"==H?"__proto__"!==N:null===N)?X["string"==typeof N?"string":"hash"]:X.map}function m(C,N){var X=null==C?H:C[N];return!F(X)||le&&le in X||!(M(X)?fe:U).test(S(X))?H:X}function w(C){return Be(C)||Ue(C)||!!(ye&&C&&C[ye])}function O(C,N){var X=we((X=void 0)===H?C.length-1:X,0);return function(){for(var H=arguments,U=-1,q=we(H.length-X,0),W=Array(q);++U<q;)W[U]=H[X+U];for(U=-1,q=Array(X+1);++U<X;)q[U]=H[U];return q[X]=N(W),t(C,this,q)}}function S(C){if(null!=C){try{return se.call(C)}catch(C){}return C+""}return""}function k(C,N){return C===N||C!=C&&N!=N}function x(C){return null!=C&&E(C.length)&&!M(C)}function z(C){return P(C)&&x(C)}function M(C){return!!F(C)&&("[object Function]"==(C=_(C))||"[object GeneratorFunction]"==C||"[object AsyncFunction]"==C||"[object Proxy]"==C)}function E(C){return"number"==typeof C&&-1<C&&0==C%1&&9007199254740991>=C}function F(C){var N=typeof C;return null!=C&&("object"==N||"function"==N)}function P(C){return null!=C&&"object"==typeof C}function $(C){return"string"==typeof C||!Be(C)&&P(C)&&"[object String]"==_(C)}function B(C){if(x(C)){var N=Be(C),X=!N&&Ue(C),H=!N&&!X&&De(C),U=!N&&!X&&!H&&qe(C);if(N=N||X||H||U){X=C.length;for(var W=String,G=-1,Q=Array(X);++G<X;)Q[G]=W(G);X=Q}else X=[];var Y;W=X.length;for(Y in C){if(!(G=!ce.call(C,Y))&&(G=N)&&!(G="length"==Y||H&&("offset"==Y||"parent"==Y)||U&&("buffer"==Y||"byteLength"==Y||"byteOffset"==Y))){var Z=typeof(G=Y);G=!!(Q=null==(Q=W)?9007199254740991:Q)&&("number"==Z||"symbol"!=Z&&q.test(G))&&-1<G&&0==G%1&&G<Q}G||X.push(Y)}C=X}else if(C===("function"==typeof(Y=C&&C.constructor)&&Y.prototype||ae)){for(H in Y=[],Object(C))ce.call(C,H)&&"constructor"!=H&&Y.push(H);C=Y}else C=be(C);return C}function D(C){return null==C?[]:function o(C,N){return r(N,(function(N){return C[N]}))}(C,B(C))}function I(C){return function(){return C}}function R(C){return C}function T(){}function L(){return!1}var H,U=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,W=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*","g"),G=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Q={};Q["[object Float32Array]"]=Q["[object Float64Array]"]=Q["[object Int8Array]"]=Q["[object Int16Array]"]=Q["[object Int32Array]"]=Q["[object Uint8Array]"]=Q["[object Uint8ClampedArray]"]=Q["[object Uint16Array]"]=Q["[object Uint32Array]"]=!0,Q["[object Arguments]"]=Q["[object Array]"]=Q["[object ArrayBuffer]"]=Q["[object Boolean]"]=Q["[object DataView]"]=Q["[object Date]"]=Q["[object Error]"]=Q["[object Function]"]=Q["[object Map]"]=Q["[object Number]"]=Q["[object Object]"]=Q["[object RegExp]"]=Q["[object Set]"]=Q["[object String]"]=Q["[object WeakMap]"]=!1;var Y,Z="object"==typeof N&&N&&N.Object===Object&&N,V="object"==typeof self&&self&&self.Object===Object&&self,J=Z||V||Function("return this")(),K=X&&!X.nodeType&&X,ee=K&&C&&!C.nodeType&&C,te=ee&&ee.exports===K,re=te&&Z.process;e:{try{Y=re&&re.binding&&re.binding("util");break e}catch(t){}Y=void 0}var ne=Y&&Y.isTypedArray,oe=Array.prototype,ae=Object.prototype,ie=J["__core-js_shared__"],se=Function.prototype.toString,ce=ae.hasOwnProperty,le=function(){var C=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||"");return C?"Symbol(src)_1."+C:""}(),ue=ae.toString,fe=RegExp("^"+se.call(ce).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pe=te?J.Buffer:H,de=J.Symbol,he=ae.propertyIsEnumerable,ge=oe.splice,ye=de?de.isConcatSpreadable:H,ve=de?de.iterator:H,me=de?de.toStringTag:H,xe=function(){try{var C=m(Object,"defineProperty");return C({},"",{}),C}catch(C){}}(),_e=pe?pe.isBuffer:H,be=function(C,N){return function(X){return C(N(X))}}(Object.keys,Object),we=Math.max,Ee=Math.min,ke=Date.now,je=m(J,"DataView"),Ae=m(J,"Map"),Se=m(J,"Promise"),Re=m(J,"Set"),Ce=m(J,"WeakMap"),Ie=m(Object,"create"),Oe=S(je),$e=S(Ae),ze=S(Se),Pe=S(Re),Fe=S(Ce);s.prototype.clear=function(){this.__data__=Ie?Ie(null):{},this.size=0},s.prototype.delete=function(C){return C=this.has(C)&&delete this.__data__[C],this.size-=C?1:0,C},s.prototype.get=function(C){var N=this.__data__;return Ie?"__lodash_hash_undefined__"===(C=N[C])?H:C:ce.call(N,C)?N[C]:H},s.prototype.has=function(C){var N=this.__data__;return Ie?N[C]!==H:ce.call(N,C)},s.prototype.set=function(C,N){var X=this.__data__;return this.size+=this.has(C)?0:1,X[C]=Ie&&N===H?"__lodash_hash_undefined__":N,this},l.prototype.clear=function(){this.__data__=[],this.size=0},l.prototype.delete=function(C){var N=this.__data__;return!(0>(C=d(N,C))||(C==N.length-1?N.pop():ge.call(N,C,1),--this.size,0))},l.prototype.get=function(C){var N=this.__data__;return 0>(C=d(N,C))?H:N[C][1]},l.prototype.has=function(C){return-1<d(this.__data__,C)},l.prototype.set=function(C,N){var X=this.__data__,H=d(X,C);return 0>H?(++this.size,X.push([C,N])):X[H][1]=N,this},h.prototype.clear=function(){this.size=0,this.__data__={hash:new s,map:new(Ae||l),string:new s}},h.prototype.delete=function(C){return C=A(this,C).delete(C),this.size-=C?1:0,C},h.prototype.get=function(C){return A(this,C).get(C)},h.prototype.has=function(C){return A(this,C).has(C)},h.prototype.set=function(C,N){var X=A(this,C),H=X.size;return X.set(C,N),this.size+=X.size==H?0:1,this},p.prototype.add=p.prototype.push=function(C){return this.__data__.set(C,"__lodash_hash_undefined__"),this},p.prototype.has=function(C){return this.__data__.has(C)};var Ne=xe?function(C,N){return xe(C,"toString",{configurable:!0,enumerable:!1,value:I(N),writable:!0})}:R,Xe=Re&&1/a(new Re([,-0]))[1]==1/0?function(C){return new Re(C)}:T,Te=_;(je&&"[object DataView]"!=Te(new je(new ArrayBuffer(1)))||Ae&&"[object Map]"!=Te(new Ae)||Se&&"[object Promise]"!=Te(Se.resolve())||Re&&"[object Set]"!=Te(new Re)||Ce&&"[object WeakMap]"!=Te(new Ce))&&(Te=function(C){var N=_(C);if(C=(C="[object Object]"==N?C.constructor:H)?S(C):"")switch(C){case Oe:return"[object DataView]";case $e:return"[object Map]";case ze:return"[object Promise]";case Pe:return"[object Set]";case Fe:return"[object WeakMap]"}return N});var He=function(C){var N=0,X=0;return function(){var U=ke(),q=16-(U-X);if(X=U,0<q){if(800<=++N)return arguments[0]}else N=0;return C.apply(H,arguments)}}(Ne),Le=j((function(C,N){var X;if(z(C)){X=b(N,1,z,!0);var H=-1,U=e,q=!0,W=C.length,G=[],Q=X.length;if(W)e:for(200<=X.length&&(U=f,q=!1,X=new p(X));++H<W;){var Y=Z=C[H],Z=0!==Z?Z:0;if(q&&Y==Y){for(var V=Q;V--;)if(X[V]===Y)continue e;G.push(Z)}else U(X,Y,void 0)||G.push(Z)}X=G}else X=[];return X})),Me=j((function(C){var N=r(C,v);if(N.length&&N[0]===C[0]){C=N[0].length;for(var X=N.length,U=X,q=Array(X),W=1/0,G=[];U--;){var Q=N[U];W=Ee(Q.length,W);q[U]=120<=C&&120<=Q.length?new p(U&&Q):H}Q=N[0];var Y=-1,Z=q[0];e:for(;++Y<C&&G.length<W;){var V=J=Q[Y],J=0!==J?J:0;if(Z?!f(Z,V):!e(G,V)){for(U=X;--U;){var K=q[U];if(K?!f(K,V):!e(N[U],V))continue e}Z&&Z.push(V),G.push(J)}}N=G}else N=[];return N})),Ue=y(function(){return arguments}())?y:function(C){return P(C)&&ce.call(C,"callee")&&!he.call(C,"callee")},Be=Array.isArray,De=_e||L,qe=ne?function u(C){return function(N){return C(N)}}(ne):function g(C){return P(C)&&E(C.length)&&!!Q[_(C)]};c.constant=I,c.difference=Le,c.intersection=Me,c.keys=B,c.toArray=function(C){if(!C)return[];if(x(C)){if($(C))C=G.test(C)?C.match(W)||[]:C.split("");else{var N,X=-1,H=C.length;for(N||(N=Array(H));++X<H;)N[X]=C[X];C=N}return C}if(ve&&C[ve]){for(C=C[ve](),X=[];!(N=C.next()).done;)X.push(N.value);return X}return("[object Map]"==(N=Te(C))?i:"[object Set]"==N?a:D)(C)},c.uniq=function(C){if(C&&C.length)e:{var N=-1,X=e,H=C.length,U=!0,q=[],W=q;if(200<=H){if(X=Xe(C)){C=a(X);break e}U=!1,X=f,W=new p}else W=q;t:for(;++N<H;){var G=Q=C[N],Q=0!==Q?Q:0;if(U&&G==G){for(var Y=W.length;Y--;)if(W[Y]===G)continue t;q.push(Q)}else X(W,G,void 0)||(W!==q&&W.push(G),q.push(Q))}C=q}else C=[];return C},c.values=D,c.eq=k,c.identity=R,c.isArguments=Ue,c.isArray=Be,c.isArrayLike=x,c.isArrayLikeObject=z,c.isBuffer=De,c.isFunction=M,c.isLength=E,c.isObject=F,c.isObjectLike=P,c.isString=$,c.isTypedArray=qe,c.stubFalse=L,c.noop=T,c.VERSION="4.17.5",ee?((ee.exports=c)._=c,K._=c):J._=c}).call(N)}(Q,Q.exports), | ||
| /*! https://mths.be/codepointat v0.2.0 by @mathias */ | ||
| String.prototype.codePointAt||(U=function(){try{var C={},N=Object.defineProperty,X=N(C,C,C)&&N}catch(C){}return X}(),q=function(C){if(null==this)throw TypeError();var N=String(this),X=N.length,H=C?Number(C):0;if(H!=H&&(H=0),!(H<0||H>=X)){var U,q=N.charCodeAt(H);return q>=55296&&q<=56319&&X>H+1&&(U=N.charCodeAt(H+1))>=56320&&U<=57343?1024*(q-55296)+U-56320+65536:q}},U?U(String.prototype,"codePointAt",{value:q,configurable:!0,writable:!0}):String.prototype.codePointAt=q) | ||
| /*! http://mths.be/fromcodepoint v0.2.1 by @mathias */,String.fromCodePoint||function(){var C=function(){try{var C={},N=Object.defineProperty,X=N(C,C,C)&&N}catch(C){}return X}(),N=String.fromCharCode,X=Math.floor,fromCodePoint=function(C){var H,U,q=16384,W=[],G=-1,Q=arguments.length;if(!Q)return"";for(var Y="";++G<Q;){var Z=Number(arguments[G]);if(!isFinite(Z)||Z<0||Z>1114111||X(Z)!=Z)throw RangeError("Invalid code point: "+Z);Z<=65535?W.push(Z):(H=55296+((Z-=65536)>>10),U=Z%1024+56320,W.push(H,U)),(G+1==Q||W.length>q)&&(Y+=N.apply(null,W),W.length=0)}return Y};C?C(String,"fromCodePoint",{value:fromCodePoint,configurable:!0,writable:!0}):String.fromCodePoint=fromCodePoint}();try{W="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(C){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var Y,Z=function leven(C,N,X,H){var U=[],q=[],G=X&&W&&X.useCollator,Q=1;if(X&&X.subcost&&"number"==typeof X.subcost&&(Q=X.subcost),C===N)return 0;var Y,Z,V,J,K=H(C),ee=H(N),te=K.length,re=ee.length;if(0===te)return re;if(0===re)return te;for(var ne=0,oe=0;ne<te;)q[ne]=K[ne].codePointAt(0),U[ne]=++ne;if(G)for(;oe<re;)for(Y=ee[oe].codePointAt(0),V=oe++,Z=oe,ne=0;ne<te;ne++)J=0===W.compare(String.fromCodePoint(Y),String.fromCodePoint(q[ne]))?V:V+Q,V=U[ne],Z=U[ne]=V>Z?J>Z?Z+1:J:J>V?V+1:J;else for(;oe<re;)for(Y=ee[oe].codePointAt(0),V=oe++,Z=oe,ne=0;ne<te;ne++)J=Y===q[ne]?V:V+Q,V=U[ne],Z=U[ne]=V>Z?J>Z?Z+1:J:J>V?V+1:J;return Z};try{Y="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(C){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var V,J=function leven(C,N,X,H){var U=[],q=[],W=X&&Y&&X.useCollator,G=1;if(X&&X.subcost&&"number"==typeof X.subcost&&(G=X.subcost),C===N)return 0;var Q=C.length,Z=N.length;if(0===Q)return Z;if(0===Z)return Q;if(X&&X.wildcards&&"string"==typeof X.wildcards&&X.wildcards.length>0){var V,J,K,ee,te,re;if(!1===X.full_process&&!0!==X.processed){J=(V=X.wildcards[0]).charCodeAt(0);var ne="["+function escapeRegExp(C){return C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(X.wildcards)+"]";if((C=C.replace(new RegExp(ne,"g"),V))===(N=N.replace(new RegExp(ne,"g"),V)))return 0}else J=(V=X.wildcards[0].toLowerCase()).charCodeAt(0);for(var oe=0,ae=0;oe<Q;)q[oe]=C.charCodeAt(oe),U[oe]=++oe;if(W)for(;ae<Z;)for(K=N.charCodeAt(ae),te=ae++,ee=ae,oe=0;oe<Q;oe++)re=0===Y.compare(String.fromCharCode(K),String.fromCharCode(q[oe]))||K===J||q[oe]===J?te:te+G,te=U[oe],ee=U[oe]=te>ee?re>ee?ee+1:re:re>te?te+1:re;else for(;ae<Z;)for(K=N.charCodeAt(ae),te=ae++,ee=ae,oe=0;oe<Q;oe++)re=K===q[oe]||K===J||q[oe]===J?te:te+G,te=U[oe],ee=U[oe]=te>ee?re>ee?ee+1:re:re>te?te+1:re;return ee}return H(C,N,X)};try{V="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(C){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var K=function leven(C,N,X){var H=[],U=[],q=X&&V&&X.useCollator,W=1;if(X&&X.subcost&&"number"==typeof X.subcost&&(W=X.subcost),C===N)return 0;var G,Q,Y,Z,J=C.length,K=N.length;if(0===J)return K;if(0===K)return J;for(var ee=0,te=0;ee<J;)U[ee]=C.charCodeAt(ee),H[ee]=++ee;if(q)for(;te<K;)for(G=N.charCodeAt(te),Y=te++,Q=te,ee=0;ee<J;ee++)Z=0===V.compare(String.fromCharCode(G),String.fromCharCode(U[ee]))?Y:Y+W,Y=H[ee],Q=H[ee]=Y>Q?Z>Q?Q+1:Z:Z>Y?Y+1:Z;else for(;te<K;)for(G=N.charCodeAt(te),Y=te++,Q=te,ee=0;ee<J;ee++)Z=G===U[ee]?Y:Y+W,Y=H[ee],Q=H[ee]=Y>Q?Z>Q?Q+1:Z:Z>Y?Y+1:Z;return Q};!function(C,N){if(!C.setImmediate){var X,H=1,U={},q=!1,W=C.document,G=Object.getPrototypeOf&&Object.getPrototypeOf(C);G=G&&G.setTimeout?G:C,"[object process]"==={}.toString.call(C.process)?function installNextTickImplementation(){X=function(C){process.nextTick((function(){runIfPresent(C)}))}}():!function canUsePostMessage(){if(C.postMessage&&!C.importScripts){var N=!0,X=C.onmessage;return C.onmessage=function(){N=!1},C.postMessage("","*"),C.onmessage=X,N}}()?C.MessageChannel?function installMessageChannelImplementation(){var C=new MessageChannel;C.port1.onmessage=function(C){runIfPresent(C.data)},X=function(N){C.port2.postMessage(N)}}():W&&"onreadystatechange"in W.createElement("script")?function installReadyStateChangeImplementation(){var C=W.documentElement;X=function(N){var X=W.createElement("script");X.onreadystatechange=function(){runIfPresent(N),X.onreadystatechange=null,C.removeChild(X),X=null},C.appendChild(X)}}():function installSetTimeoutImplementation(){X=function(C){setTimeout(runIfPresent,0,C)}}():function installPostMessageImplementation(){var N="setImmediate$"+Math.random()+"$",onGlobalMessage=function(X){X.source===C&&"string"==typeof X.data&&0===X.data.indexOf(N)&&runIfPresent(+X.data.slice(N.length))};C.addEventListener?C.addEventListener("message",onGlobalMessage,!1):C.attachEvent("onmessage",onGlobalMessage),X=function(X){C.postMessage(N+X,"*")}}(),G.setImmediate=function setImmediate(C){"function"!=typeof C&&(C=new Function(""+C));for(var N=new Array(arguments.length-1),q=0;q<N.length;q++)N[q]=arguments[q+1];var W={callback:C,args:N};return U[H]=W,X(H),H++},G.clearImmediate=clearImmediate}function clearImmediate(C){delete U[C]}function runIfPresent(C){if(q)setTimeout(runIfPresent,0,C);else{var N=U[C];if(N){q=!0;try{!function run(C){var N=C.callback,X=C.args;switch(X.length){case 0:N();break;case 1:N(X[0]);break;case 2:N(X[0],X[1]);break;case 3:N(X[0],X[1],X[2]);break;default:N.apply(void 0,X)}}(N)}finally{clearImmediate(C),q=!1}}}}}("undefined"==typeof self?N:self); | ||
| var e,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t={exports:{}},n={exports:{}};e=n,function(){var r,t,n,o,a,i,s,c,u,l,p,f,d,h,g;n=Math.floor,l=Math.min,t=function(e,r){return e<r?-1:e>r?1:0},u=function(e,r,o,a,i){var s;if(null==o&&(o=0),null==i&&(i=t),o<0)throw new Error("lo must be non-negative");for(null==a&&(a=e.length);o<a;)i(r,e[s=n((o+a)/2)])<0?a=s:o=s+1;return[].splice.apply(e,[o,o-o].concat(r)),r},i=function(e,r,n){return null==n&&(n=t),e.push(r),h(e,0,e.length-1,n)},a=function(e,r){var n,o;return null==r&&(r=t),n=e.pop(),e.length?(o=e[0],e[0]=n,g(e,0,r)):o=n,o},c=function(e,r,n){var o;return null==n&&(n=t),o=e[0],e[0]=r,g(e,0,n),o},s=function(e,r,n){var o;return null==n&&(n=t),e.length&&n(e[0],r)<0&&(r=(o=[e[0],r])[0],e[0]=o[1],g(e,0,n)),r},o=function(e,r){var o,a,i,s,c,u;for(null==r&&(r=t),c=[],a=0,i=(s=function(){u=[];for(var r=0,t=n(e.length/2);0<=t?r<t:r>t;0<=t?r++:r--)u.push(r);return u}.apply(this).reverse()).length;a<i;a++)o=s[a],c.push(g(e,o,r));return c},d=function(e,r,n){var o;if(null==n&&(n=t),-1!==(o=e.indexOf(r)))return h(e,0,o,n),g(e,o,n)},p=function(e,r,n){var a,i,c,u,l;if(null==n&&(n=t),!(i=e.slice(0,r)).length)return i;for(o(i,n),c=0,u=(l=e.slice(r)).length;c<u;c++)a=l[c],s(i,a,n);return i.sort(n).reverse()},f=function(e,r,n){var i,s,c,p,f,d,h,g,v;if(null==n&&(n=t),10*r<=e.length){if(!(c=e.slice(0,r).sort(n)).length)return c;for(s=c[c.length-1],p=0,d=(h=e.slice(r)).length;p<d;p++)n(i=h[p],s)<0&&(u(c,i,0,null,n),c.pop(),s=c[c.length-1]);return c}for(o(e,n),v=[],f=0,g=l(r,e.length);0<=g?f<g:f>g;0<=g?++f:--f)v.push(a(e,n));return v},h=function(e,r,n,o){var a,i,s;for(null==o&&(o=t),a=e[n];n>r&&o(a,i=e[s=n-1>>1])<0;)e[n]=i,n=s;return e[n]=a},g=function(e,r,n){var o,a,i,s,c;for(null==n&&(n=t),a=e.length,c=r,i=e[r],o=2*r+1;o<a;)(s=o+1)<a&&!(n(e[o],e[s])<0)&&(o=s),e[r]=e[o],o=2*(r=o)+1;return e[r]=i,h(e,c,r,n)},r=function(){function Heap(e){this.cmp=null!=e?e:t,this.nodes=[]}return Heap.push=i,Heap.pop=a,Heap.replace=c,Heap.pushpop=s,Heap.heapify=o,Heap.updateItem=d,Heap.nlargest=p,Heap.nsmallest=f,Heap.prototype.push=function(e){return i(this.nodes,e,this.cmp)},Heap.prototype.pop=function(){return a(this.nodes,this.cmp)},Heap.prototype.peek=function(){return this.nodes[0]},Heap.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},Heap.prototype.replace=function(e){return c(this.nodes,e,this.cmp)},Heap.prototype.pushpop=function(e){return s(this.nodes,e,this.cmp)},Heap.prototype.heapify=function(){return o(this.nodes,this.cmp)},Heap.prototype.updateItem=function(e){return d(this.nodes,e,this.cmp)},Heap.prototype.clear=function(){return this.nodes=[]},Heap.prototype.empty=function(){return 0===this.nodes.length},Heap.prototype.size=function(){return this.nodes.length},Heap.prototype.clone=function(){var e;return(e=new Heap).nodes=this.nodes.slice(0),e},Heap.prototype.toArray=function(){return this.nodes.slice(0)},Heap.prototype.insert=Heap.prototype.push,Heap.prototype.top=Heap.prototype.peek,Heap.prototype.front=Heap.prototype.peek,Heap.prototype.has=Heap.prototype.contains,Heap.prototype.copy=Heap.prototype.clone,Heap}(),e.exports=r}.call(r);var o=n.exports;var a=function arrayMap$4(e,r){for(var t=-1,n=null==e?0:e.length,o=Array(n);++t<n;)o[t]=r(e[t],t,e);return o},i="object"==typeof r&&r&&r.Object===Object&&r,s=i,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),l=u.Symbol,p=l,f=Object.prototype,d=f.hasOwnProperty,h=f.toString,g=p?p.toStringTag:void 0;var v=function getRawTag$1(e){var r=d.call(e,g),t=e[g];try{e[g]=void 0;var n=!0}catch(e){}var o=h.call(e);return n&&(r?e[g]=t:delete e[g]),o},y=Object.prototype.toString;var m=v,x=function objectToString$1(e){return y.call(e)},b=l?l.toStringTag:void 0;var _=function baseGetTag$5(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":b&&b in Object(e)?m(e):x(e)};var w=function isObject$2(e){var r=typeof e;return null!=e&&("object"==r||"function"==r)},$=_,E=w;var C,j=function isFunction$2(e){if(!E(e))return!1;var r=$(e);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r},k=u["__core-js_shared__"],A=(C=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+C:"";var S=function isMasked$1(e){return!!A&&A in e},O=Function.prototype.toString;var R=function toSource$2(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""},I=j,P=S,z=w,F=R,N=/^\[object .+?Constructor\]$/,T=Function.prototype,H=Object.prototype,X=T.toString,L=H.hasOwnProperty,M=RegExp("^"+X.call(L).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var U=function baseIsNative$1(e){return!(!z(e)||P(e))&&(I(e)?M:N).test(F(e))},D=function getValue$1(e,r){return null==e?void 0:e[r]};var B=function getNative$7(e,r){var t=D(e,r);return U(t)?t:void 0},q=B(Object,"create"),G=q;var W=function hashClear$1(){this.__data__=G?G(null):{},this.size=0};var Q=function hashDelete$1(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r},Y=q,Z=Object.prototype.hasOwnProperty;var V=function hashGet$1(e){var r=this.__data__;if(Y){var t=r[e];return"__lodash_hash_undefined__"===t?void 0:t}return Z.call(r,e)?r[e]:void 0},K=q,J=Object.prototype.hasOwnProperty;var ee=q;var re=W,te=Q,ne=V,oe=function hashHas$1(e){var r=this.__data__;return K?void 0!==r[e]:J.call(r,e)},ae=function hashSet$1(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=ee&&void 0===r?"__lodash_hash_undefined__":r,this};function Hash$1(e){var r=-1,t=null==e?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}Hash$1.prototype.clear=re,Hash$1.prototype.delete=te,Hash$1.prototype.get=ne,Hash$1.prototype.has=oe,Hash$1.prototype.set=ae;var ie=Hash$1;var se=function listCacheClear$1(){this.__data__=[],this.size=0};var ce=function eq$1(e,r){return e===r||e!=e&&r!=r};var ue=function assocIndexOf$4(e,r){for(var t=e.length;t--;)if(ce(e[t][0],r))return t;return-1},le=ue,pe=Array.prototype.splice;var fe=ue;var de=ue;var he=ue;var ge=se,ve=function listCacheDelete$1(e){var r=this.__data__,t=le(r,e);return!(t<0)&&(t==r.length-1?r.pop():pe.call(r,t,1),--this.size,!0)},ye=function listCacheGet$1(e){var r=this.__data__,t=fe(r,e);return t<0?void 0:r[t][1]},me=function listCacheHas$1(e){return de(this.__data__,e)>-1},xe=function listCacheSet$1(e,r){var t=this.__data__,n=he(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this};function ListCache$1(e){var r=-1,t=null==e?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}ListCache$1.prototype.clear=ge,ListCache$1.prototype.delete=ve,ListCache$1.prototype.get=ye,ListCache$1.prototype.has=me,ListCache$1.prototype.set=xe;var be=ListCache$1,_e=B(u,"Map"),we=ie,$e=be,Ee=_e;var Ce=function isKeyable$1(e){var r=typeof e;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e};var je=function getMapData$4(e,r){var t=e.__data__;return Ce(r)?t["string"==typeof r?"string":"hash"]:t.map},ke=je;var Ae=je;var Se=je;var Oe=je;var Re=function mapCacheClear$1(){this.size=0,this.__data__={hash:new we,map:new(Ee||$e),string:new we}},Ie=function mapCacheDelete$1(e){var r=ke(this,e).delete(e);return this.size-=r?1:0,r},Pe=function mapCacheGet$1(e){return Ae(this,e).get(e)},ze=function mapCacheHas$1(e){return Se(this,e).has(e)},Fe=function mapCacheSet$1(e,r){var t=Oe(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this};function MapCache$1(e){var r=-1,t=null==e?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}MapCache$1.prototype.clear=Re,MapCache$1.prototype.delete=Ie,MapCache$1.prototype.get=Pe,MapCache$1.prototype.has=ze,MapCache$1.prototype.set=Fe;var Ne=MapCache$1,Te=function setCacheAdd$1(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},He=function setCacheHas$1(e){return this.__data__.has(e)};function SetCache$3(e){var r=-1,t=null==e?0:e.length;for(this.__data__=new Ne;++r<t;)this.add(e[r])}SetCache$3.prototype.add=SetCache$3.prototype.push=Te,SetCache$3.prototype.has=He;var Xe=SetCache$3;var Le=function baseFindIndex$1(e,r,t,n){for(var o=e.length,a=t+(n?1:-1);n?a--:++a<o;)if(r(e[a],a,e))return a;return-1},Me=function baseIsNaN$1(e){return e!=e},Ue=function strictIndexOf$1(e,r,t){for(var n=t-1,o=e.length;++n<o;)if(e[n]===r)return n;return-1};var De=function baseIndexOf$1(e,r,t){return r==r?Ue(e,r,t):Le(e,Me,t)};var Be=function arrayIncludes$3(e,r){return!!(null==e?0:e.length)&&De(e,r,0)>-1};var qe=function arrayIncludesWith$3(e,r,t){for(var n=-1,o=null==e?0:e.length;++n<o;)if(t(r,e[n]))return!0;return!1};var Ge=function baseUnary$3(e){return function(r){return e(r)}};var We=function cacheHas$3(e,r){return e.has(r)},Qe=Xe,Ye=Be,Ze=qe,Ve=a,Ke=Ge,Je=We,er=Math.min;var rr=function baseIntersection$1(e,r,t){for(var n=t?Ze:Ye,o=e[0].length,a=e.length,i=a,s=Array(a),c=1/0,u=[];i--;){var l=e[i];i&&r&&(l=Ve(l,Ke(r))),c=er(l.length,c),s[i]=!t&&(r||o>=120&&l.length>=120)?new Qe(i&&l):void 0}l=e[0];var p=-1,f=s[0];e:for(;++p<o&&u.length<c;){var d=l[p],h=r?r(d):d;if(d=t||0!==d?d:0,!(f?Je(f,h):n(u,h,t))){for(i=a;--i;){var g=s[i];if(!(g?Je(g,h):n(e[i],h,t)))continue e}f&&f.push(h),u.push(d)}}return u};var tr=function identity$2(e){return e};var nr=function apply$1(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)},or=Math.max;var ar=function overRest$1(e,r,t){return r=or(void 0===r?e.length-1:r,0),function(){for(var n=arguments,o=-1,a=or(n.length-r,0),i=Array(a);++o<a;)i[o]=n[r+o];o=-1;for(var s=Array(r+1);++o<r;)s[o]=n[o];return s[r]=t(i),nr(e,this,s)}};var ir=function constant$1(e){return function(){return e}},sr=B,cr=function(){try{var e=sr(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),ur=ir,lr=cr,pr=lr?function(e,r){return lr(e,"toString",{configurable:!0,enumerable:!1,value:ur(r),writable:!0})}:tr,fr=Date.now;var dr=function shortOut$1(e){var r=0,t=0;return function(){var n=fr(),o=16-(n-t);if(t=n,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}(pr),hr=tr,gr=ar,vr=dr;var yr=function baseRest$2(e,r){return vr(gr(e,r,hr),e+"")};var mr=function isLength$2(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},xr=j,br=mr;var _r=function isArrayLike$3(e){return null!=e&&br(e.length)&&!xr(e)};var wr=function isObjectLike$5(e){return null!=e&&"object"==typeof e},$r=_r,Er=wr;var Cr=function isArrayLikeObject$2(e){return Er(e)&&$r(e)},jr=Cr;var kr=a,Ar=rr,Sr=function castArrayLikeObject$1(e){return jr(e)?e:[]},Or=yr((function(e){var r=kr(e,Sr);return r.length&&r[0]===e[0]?Ar(r):[]})),Rr=Xe,Ir=Be,Pr=qe,zr=a,Fr=Ge,Nr=We;var Tr=function baseDifference$1(e,r,t,n){var o=-1,a=Ir,i=!0,s=e.length,c=[],u=r.length;if(!s)return c;t&&(r=zr(r,Fr(t))),n?(a=Pr,i=!1):r.length>=200&&(a=Nr,i=!1,r=new Rr(r));e:for(;++o<s;){var l=e[o],p=null==t?l:t(l);if(l=n||0!==l?l:0,i&&p==p){for(var f=u;f--;)if(r[f]===p)continue e;c.push(l)}else a(r,p,n)||c.push(l)}return c};var Hr=function arrayPush$1(e,r){for(var t=-1,n=r.length,o=e.length;++t<n;)e[o+t]=r[t];return e},Xr=_,Lr=wr;var Mr=function baseIsArguments$1(e){return Lr(e)&&"[object Arguments]"==Xr(e)},Ur=wr,Dr=Object.prototype,Br=Dr.hasOwnProperty,qr=Dr.propertyIsEnumerable,Gr=Mr(function(){return arguments}())?Mr:function(e){return Ur(e)&&Br.call(e,"callee")&&!qr.call(e,"callee")},Wr=Array.isArray,Qr=Gr,Yr=Wr,Zr=l?l.isConcatSpreadable:void 0;var Vr=Hr,Kr=function isFlattenable$1(e){return Yr(e)||Qr(e)||!!(Zr&&e&&e[Zr])};var Jr=function baseFlatten$1(e,r,t,n,o){var a=-1,i=e.length;for(t||(t=Kr),o||(o=[]);++a<i;){var s=e[a];r>0&&t(s)?r>1?baseFlatten$1(s,r-1,t,n,o):Vr(o,s):n||(o[o.length]=s)}return o},et=Tr,rt=Jr,tt=Cr,nt=yr((function(e,r){return tt(e)?et(e,rt(r,1,tt,!0)):[]})),ot=nt,at=B(u,"Set");var it=function setToArray$3(e){var r=-1,t=Array(e.size);return e.forEach((function(e){t[++r]=e})),t},st=at,ct=function noop$1(){},ut=st&&1/it(new st([,-0]))[1]==1/0?function(e){return new st(e)}:ct,lt=Xe,pt=Be,ft=qe,dt=We,ht=ut,gt=it;var vt=function baseUniq$1(e,r,t){var n=-1,o=pt,a=e.length,i=!0,s=[],c=s;if(t)i=!1,o=ft;else if(a>=200){var u=r?null:ht(e);if(u)return gt(u);i=!1,o=dt,c=new lt}else c=r?[]:s;e:for(;++n<a;){var l=e[n],p=r?r(l):l;if(l=t||0!==l?l:0,i&&p==p){for(var f=c.length;f--;)if(c[f]===p)continue e;r&&c.push(p),s.push(l)}else o(c,p,t)||(c!==s&&c.push(p),s.push(l))}return s};var yt=function uniq(e){return e&&e.length?vt(e):[]};var mt=function copyArray$1(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r},xt=B(u,"DataView"),bt=_e,_t=B(u,"Promise"),wt=at,$t=B(u,"WeakMap"),Et=_,Ct=R,jt=Ct(xt),kt=Ct(bt),At=Ct(_t),St=Ct(wt),Ot=Ct($t),Rt=Et;(xt&&"[object DataView]"!=Rt(new xt(new ArrayBuffer(1)))||bt&&"[object Map]"!=Rt(new bt)||_t&&"[object Promise]"!=Rt(_t.resolve())||wt&&"[object Set]"!=Rt(new wt)||$t&&"[object WeakMap]"!=Rt(new $t))&&(Rt=function(e){var r=Et(e),t="[object Object]"==r?e.constructor:void 0,n=t?Ct(t):"";if(n)switch(n){case jt:return"[object DataView]";case kt:return"[object Map]";case At:return"[object Promise]";case St:return"[object Set]";case Ot:return"[object WeakMap]"}return r});var It=Rt,Pt=_,zt=Wr,Ft=wr;var Nt=function isString$1(e){return"string"==typeof e||!zt(e)&&Ft(e)&&"[object String]"==Pt(e)};var Tt=function iteratorToArray$1(e){for(var r,t=[];!(r=e.next()).done;)t.push(r.value);return t};var Ht=function mapToArray$1(e){var r=-1,t=Array(e.size);return e.forEach((function(e,n){t[++r]=[n,e]})),t};var Xt=function asciiToArray$1(e){return e.split("")},Lt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Mt=function hasUnicode$1(e){return Lt.test(e)},Ut="[\\ud800-\\udfff]",Dt="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Bt="\\ud83c[\\udffb-\\udfff]",qt="[^\\ud800-\\udfff]",Gt="(?:\\ud83c[\\udde6-\\uddff]){2}",Wt="[\\ud800-\\udbff][\\udc00-\\udfff]",Qt="(?:"+Dt+"|"+Bt+")"+"?",Yt="[\\ufe0e\\ufe0f]?"+Qt+("(?:\\u200d(?:"+[qt,Gt,Wt].join("|")+")[\\ufe0e\\ufe0f]?"+Qt+")*"),Zt="(?:"+[qt+Dt+"?",Dt,Gt,Wt,Ut].join("|")+")",Vt=RegExp(Bt+"(?="+Bt+")|"+Zt+Yt,"g");var Kt=Xt,Jt=Mt,en=function unicodeToArray$1(e){return e.match(Vt)||[]};var rn=function stringToArray$1(e){return Jt(e)?en(e):Kt(e)},tn=a;var nn=function baseValues$1(e,r){return tn(r,(function(r){return e[r]}))};var on=function baseTimes$1(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n},an={exports:{}};var sn=function stubFalse(){return!1};!function(e,r){var t=u,n=sn,o=r&&!r.nodeType&&r,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?t.Buffer:void 0,s=(i?i.isBuffer:void 0)||n;e.exports=s}(an,an.exports);var cn=/^(?:0|[1-9]\d*)$/;var un=function isIndex$1(e,r){var t=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==t||"symbol"!=t&&cn.test(e))&&e>-1&&e%1==0&&e<r},ln=_,pn=mr,fn=wr,dn={};dn["[object Float32Array]"]=dn["[object Float64Array]"]=dn["[object Int8Array]"]=dn["[object Int16Array]"]=dn["[object Int32Array]"]=dn["[object Uint8Array]"]=dn["[object Uint8ClampedArray]"]=dn["[object Uint16Array]"]=dn["[object Uint32Array]"]=!0,dn["[object Arguments]"]=dn["[object Array]"]=dn["[object ArrayBuffer]"]=dn["[object Boolean]"]=dn["[object DataView]"]=dn["[object Date]"]=dn["[object Error]"]=dn["[object Function]"]=dn["[object Map]"]=dn["[object Number]"]=dn["[object Object]"]=dn["[object RegExp]"]=dn["[object Set]"]=dn["[object String]"]=dn["[object WeakMap]"]=!1;var hn=function baseIsTypedArray$1(e){return fn(e)&&pn(e.length)&&!!dn[ln(e)]},gn={exports:{}};!function(e,r){var t=i,n=r&&!r.nodeType&&r,o=n&&e&&!e.nodeType&&e,a=o&&o.exports===n&&t.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s}(gn,gn.exports);var vn=hn,yn=Ge,mn=gn.exports,xn=mn&&mn.isTypedArray,bn=xn?yn(xn):vn,_n=on,wn=Gr,$n=Wr,En=an.exports,Cn=un,jn=bn,kn=Object.prototype.hasOwnProperty;var An=function arrayLikeKeys$1(e,r){var t=$n(e),n=!t&&wn(e),o=!t&&!n&&En(e),a=!t&&!n&&!o&&jn(e),i=t||n||o||a,s=i?_n(e.length,String):[],c=s.length;for(var u in e)!r&&!kn.call(e,u)||i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Cn(u,c))||s.push(u);return s},Sn=Object.prototype;var On=function isPrototype$1(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||Sn)};var Rn=function overArg$1(e,r){return function(t){return e(r(t))}}(Object.keys,Object),In=On,Pn=Rn,zn=Object.prototype.hasOwnProperty;var Fn=An,Nn=function baseKeys$1(e){if(!In(e))return Pn(e);var r=[];for(var t in Object(e))zn.call(e,t)&&"constructor"!=t&&r.push(t);return r},Tn=_r;var Hn=nn,Xn=function keys$1(e){return Tn(e)?Fn(e):Nn(e)};var Ln=mt,Mn=It,Un=_r,Dn=Nt,Bn=Tt,qn=Ht,Gn=it,Wn=rn,Qn=function values$1(e){return null==e?[]:Hn(e,Xn(e))},Yn=l?l.iterator:void 0;var Zn,Vn=function toArray(e){if(!e)return[];if(Un(e))return Dn(e)?Wn(e):Ln(e);if(Yn&&e[Yn])return Bn(e[Yn]());var r=Mn(e);return("[object Map]"==r?qn:"[object Set]"==r?Gn:Qn)(e)}; | ||
| /*! https://mths.be/codepointat v0.2.0 by @mathias */String.prototype.codePointAt||function(){var e=function(){try{var e={},r=Object.defineProperty,t=r(e,e,e)&&r}catch(e){}return t}(),codePointAt=function(e){if(null==this)throw TypeError();var r=String(this),t=r.length,n=e?Number(e):0;if(n!=n&&(n=0),!(n<0||n>=t)){var o,a=r.charCodeAt(n);return a>=55296&&a<=56319&&t>n+1&&(o=r.charCodeAt(n+1))>=56320&&o<=57343?1024*(a-55296)+o-56320+65536:a}};e?e(String.prototype,"codePointAt",{value:codePointAt,configurable:!0,writable:!0}):String.prototype.codePointAt=codePointAt}() | ||
| /*! http://mths.be/fromcodepoint v0.2.1 by @mathias */,String.fromCodePoint||function(){var e=function(){try{var e={},r=Object.defineProperty,t=r(e,e,e)&&r}catch(e){}return t}(),r=String.fromCharCode,t=Math.floor,fromCodePoint=function(e){var n,o,a=16384,i=[],s=-1,c=arguments.length;if(!c)return"";for(var u="";++s<c;){var l=Number(arguments[s]);if(!isFinite(l)||l<0||l>1114111||t(l)!=l)throw RangeError("Invalid code point: "+l);l<=65535?i.push(l):(n=55296+((l-=65536)>>10),o=l%1024+56320,i.push(n,o)),(s+1==c||i.length>a)&&(u+=r.apply(null,i),i.length=0)}return u};e?e(String,"fromCodePoint",{value:fromCodePoint,configurable:!0,writable:!0}):String.fromCodePoint=fromCodePoint}();try{Zn="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(e){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var Kn,Jn=function leven(e,r,t,n){var o=[],a=[],i=t&&Zn&&t.useCollator,s=1;if(t&&t.subcost&&"number"==typeof t.subcost&&(s=t.subcost),e===r)return 0;var c,u,l,p,f=n(e),d=n(r),h=f.length,g=d.length;if(0===h)return g;if(0===g)return h;for(var v=0,y=0;v<h;)a[v]=f[v].codePointAt(0),o[v]=++v;if(i)for(;y<g;)for(c=d[y].codePointAt(0),l=y++,u=y,v=0;v<h;v++)p=0===Zn.compare(String.fromCodePoint(c),String.fromCodePoint(a[v]))?l:l+s,l=o[v],u=o[v]=l>u?p>u?u+1:p:p>l?l+1:p;else for(;y<g;)for(c=d[y].codePointAt(0),l=y++,u=y,v=0;v<h;v++)p=c===a[v]?l:l+s,l=o[v],u=o[v]=l>u?p>u?u+1:p:p>l?l+1:p;return u};try{Kn="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(e){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var eo,ro=function leven(e,r,t,n){var o=[],a=[],i=t&&Kn&&t.useCollator,s=1;if(t&&t.subcost&&"number"==typeof t.subcost&&(s=t.subcost),e===r)return 0;var c=e.length,u=r.length;if(0===c)return u;if(0===u)return c;if(t&&t.wildcards&&"string"==typeof t.wildcards&&t.wildcards.length>0){var l,p,f,d,h,g;if(!1===t.full_process&&!0!==t.processed){p=(l=t.wildcards[0]).charCodeAt(0);var v="["+function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(t.wildcards)+"]";if((e=e.replace(new RegExp(v,"g"),l))===(r=r.replace(new RegExp(v,"g"),l)))return 0}else p=(l=t.wildcards[0].toLowerCase()).charCodeAt(0);for(var y=0,m=0;y<c;)a[y]=e.charCodeAt(y),o[y]=++y;if(i)for(;m<u;)for(f=r.charCodeAt(m),h=m++,d=m,y=0;y<c;y++)g=0===Kn.compare(String.fromCharCode(f),String.fromCharCode(a[y]))||f===p||a[y]===p?h:h+s,h=o[y],d=o[y]=h>d?g>d?d+1:g:g>h?h+1:g;else for(;m<u;)for(f=r.charCodeAt(m),h=m++,d=m,y=0;y<c;y++)g=f===a[y]||f===p||a[y]===p?h:h+s,h=o[y],d=o[y]=h>d?g>d?d+1:g:g>h?h+1:g;return d}return n(e,r,t)};try{eo="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(e){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var to=function leven(e,r,t){var n=[],o=[],a=t&&eo&&t.useCollator,i=1;if(t&&t.subcost&&"number"==typeof t.subcost&&(i=t.subcost),e===r)return 0;var s,c,u,l,p=e.length,f=r.length;if(0===p)return f;if(0===f)return p;for(var d=0,h=0;d<p;)o[d]=e.charCodeAt(d),n[d]=++d;if(a)for(;h<f;)for(s=r.charCodeAt(h),u=h++,c=h,d=0;d<p;d++)l=0===eo.compare(String.fromCharCode(s),String.fromCharCode(o[d]))?u:u+i,u=n[d],c=n[d]=u>c?l>c?c+1:l:l>u?u+1:l;else for(;h<f;)for(s=r.charCodeAt(h),u=h++,c=h,d=0;d<p;d++)l=s===o[d]?u:u+i,u=n[d],c=n[d]=u>c?l>c?c+1:l:l>u?u+1:l;return c};!function(e,r){if(!e.setImmediate){var t,n=1,o={},a=!1,i=e.document,s=Object.getPrototypeOf&&Object.getPrototypeOf(e);s=s&&s.setTimeout?s:e,"[object process]"==={}.toString.call(e.process)?function installNextTickImplementation(){t=function(e){process.nextTick((function(){runIfPresent(e)}))}}():!function canUsePostMessage(){if(e.postMessage&&!e.importScripts){var r=!0,t=e.onmessage;return e.onmessage=function(){r=!1},e.postMessage("","*"),e.onmessage=t,r}}()?e.MessageChannel?function installMessageChannelImplementation(){var e=new MessageChannel;e.port1.onmessage=function(e){runIfPresent(e.data)},t=function(r){e.port2.postMessage(r)}}():i&&"onreadystatechange"in i.createElement("script")?function installReadyStateChangeImplementation(){var e=i.documentElement;t=function(r){var t=i.createElement("script");t.onreadystatechange=function(){runIfPresent(r),t.onreadystatechange=null,e.removeChild(t),t=null},e.appendChild(t)}}():function installSetTimeoutImplementation(){t=function(e){setTimeout(runIfPresent,0,e)}}():function installPostMessageImplementation(){var r="setImmediate$"+Math.random()+"$",onGlobalMessage=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(r)&&runIfPresent(+t.data.slice(r.length))};e.addEventListener?e.addEventListener("message",onGlobalMessage,!1):e.attachEvent("onmessage",onGlobalMessage),t=function(t){e.postMessage(r+t,"*")}}(),s.setImmediate=function setImmediate(e){"function"!=typeof e&&(e=new Function(""+e));for(var r=new Array(arguments.length-1),a=0;a<r.length;a++)r[a]=arguments[a+1];var i={callback:e,args:r};return o[n]=i,t(n),n++},s.clearImmediate=clearImmediate}function clearImmediate(e){delete o[e]}function runIfPresent(e){if(a)setTimeout(runIfPresent,0,e);else{var r=o[e];if(r){a=!0;try{!function run(e){var r=e.callback,t=e.args;switch(t.length){case 0:r();break;case 1:r(t[0]);break;case 2:r(t[0],t[1]);break;case 3:r(t[0],t[1],t[2]);break;default:r.apply(void 0,t)}}(r)}finally{clearImmediate(e),a=!1}}}}}("undefined"==typeof self?r:self); | ||
| /*! | ||
@@ -16,3 +9,3 @@ * XRegExp 3.1.1-next | ||
| */ | ||
| var ee={astral:!1,natives:!1},te={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},re={},ne={},oe={},ae=[],ie={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},se=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,ce=void 0===te.exec.call(/()??/,"")[1],le=void 0!==/x/.flags,ue={}.toString;function hasNativeFlag(C){var N=!0;try{new RegExp("",C)}catch(C){N=!1}return N&&"y"===C?new RegExp("aa|.","y").test("b"):N}var fe=hasNativeFlag("u"),pe=hasNativeFlag("y"),de={g:!0,i:!0,m:!0,u:fe,y:pe};function augment(C,N,X,H,U){var q;if(C.xregexp={captureNames:N},U)return C;if(C.__proto__)C.__proto__=XRegExp$1.prototype;else for(q in XRegExp$1.prototype)C[q]=XRegExp$1.prototype[q];return C.xregexp.source=X,C.xregexp.flags=H?H.split("").sort().join(""):H,C}function clipDuplicates(C){return te.replace.call(C,/([\s\S])(?=[\s\S]*\1)/g,"")}function copyRegex(C,N){if(!XRegExp$1.isRegExp(C))throw new TypeError("Type RegExp expected");var X=C.xregexp||{},H=function getNativeFlags(C){return le?C.flags:te.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(C))[1]}(C),U="",q="",W=null,G=null;return(N=N||{}).removeG&&(q+="g"),N.removeY&&(q+="y"),q&&(H=te.replace.call(H,new RegExp("["+q+"]+","g"),"")),N.addG&&(U+="g"),N.addY&&(U+="y"),U&&(H=clipDuplicates(H+U)),N.isInternalOnly||(void 0!==X.source&&(W=X.source),null!=X.flags&&(G=U?clipDuplicates(X.flags+U):X.flags)),C=augment(new RegExp(N.source||C.source,H),function hasNamedCapture(C){return!(!C.xregexp||!C.xregexp.captureNames)}(C)?X.captureNames.slice(0):null,W,G,N.isInternalOnly)}function dec(C){return parseInt(C,16)}function hex(C){return parseInt(C,10).toString(16)}function indexOf(C,N){var X,H=C.length;for(X=0;X<H;++X)if(C[X]===N)return X;return-1}function isQuantifierNext(C,N,X){return te.test.call(X.indexOf("x")>-1?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,C.slice(N))}function pad4(C){for(;C.length<4;)C="0"+C;return C}function registerFlag(C){if(!/^[\w$]$/.test(C))throw new Error("Flag must be a single character A-Za-z0-9_$");de[C]=!0}function runTokens(C,N,X,H,U){for(var q,W,G=ae.length,Q=C.charAt(X),Y=null;G--;)if(!((W=ae[G]).leadChar&&W.leadChar!==Q||W.scope!==H&&"all"!==W.scope||W.flag&&-1===N.indexOf(W.flag))&&(q=XRegExp$1.exec(C,W.regex,X,"sticky"))){Y={matchLength:q[0].length,output:W.handler.call(U,q,H,N),reparse:W.reparse};break}return Y}function XRegExp$1(C,N){if(XRegExp$1.isRegExp(C)){if(void 0!==N)throw new TypeError("Cannot supply flags when copying a RegExp");return copyRegex(C)}if(C=void 0===C?"":String(C),N=void 0===N?"":String(N),XRegExp$1.isInstalled("astral")&&-1===N.indexOf("A")&&(N+="A"),oe[C]||(oe[C]={}),!oe[C][N]){for(var X,H={hasNamedCapture:!1,captureNames:[]},U="default",q="",W=0,G=function prepareFlags(C,N){var X;if(clipDuplicates(N)!==N)throw new SyntaxError("Invalid duplicate regex flag "+N);for(C=te.replace.call(C,/^\(\?([\w$]+)\)/,(function(C,X){if(te.test.call(/[gy]/,X))throw new SyntaxError("Cannot use flag g or y in mode modifier "+C);return N=clipDuplicates(N+X),""})),X=0;X<N.length;++X)if(!de[N.charAt(X)])throw new SyntaxError("Unknown regex flag "+N.charAt(X));return{pattern:C,flags:N}}(C,N),Q=G.pattern,Y=G.flags;W<Q.length;){do{(X=runTokens(Q,Y,W,U,H))&&X.reparse&&(Q=Q.slice(0,W)+X.output+Q.slice(W+X.matchLength))}while(X&&X.reparse);if(X)q+=X.output,W+=X.matchLength||1;else{var Z=XRegExp$1.exec(Q,ie[U],W,"sticky")[0];q+=Z,W+=Z.length,"["===Z&&"default"===U?U="class":"]"===Z&&"class"===U&&(U="default")}}oe[C][N]={pattern:te.replace.call(q,/(?:\(\?:\))+/g,"(?:)"),flags:te.replace.call(Y,/[^gimuy]+/g,""),captures:H.hasNamedCapture?H.captureNames:null}}var V=oe[C][N];return augment(new RegExp(V.pattern,V.flags),V.captures,C,N)}XRegExp$1.prototype=new RegExp,XRegExp$1.version="3.1.1-next",XRegExp$1._clipDuplicates=clipDuplicates,XRegExp$1._hasNativeFlag=hasNativeFlag,XRegExp$1._dec=dec,XRegExp$1._hex=hex,XRegExp$1._pad4=pad4,XRegExp$1.addToken=function(C,N,X){var H,U=(X=X||{}).optionalFlags;if(X.flag&®isterFlag(X.flag),U)for(U=te.split.call(U,""),H=0;H<U.length;++H)registerFlag(U[H]);ae.push({regex:copyRegex(C,{addG:!0,addY:pe,isInternalOnly:!0}),handler:N,scope:X.scope||"default",flag:X.flag,reparse:X.reparse,leadChar:X.leadChar}),XRegExp$1.cache.flush("patterns")},XRegExp$1.cache=function(C,N){return ne[C]||(ne[C]={}),ne[C][N]||(ne[C][N]=XRegExp$1(C,N))},XRegExp$1.cache.flush=function(C){"patterns"===C?oe={}:ne={}},XRegExp$1.exec=function(C,N,X,H){var U,q,W,G="g",Q=!1;return(U=pe&&!!(H||N.sticky&&!1!==H))?G+="y":H&&(Q=!0,G+="FakeY"),N.xregexp=N.xregexp||{},X=X||0,(W=N.xregexp[G]||(N.xregexp[G]=copyRegex(N,{addG:!0,addY:U,source:Q?N.source+"|()":void 0,removeY:!1===H,isInternalOnly:!0}))).lastIndex=X,q=re.exec.call(W,C),Q&&q&&""===q.pop()&&(q=null),N.global&&(N.lastIndex=q?W.lastIndex:0),q},XRegExp$1.isInstalled=function(C){return!!ee[C]},XRegExp$1.isRegExp=function(C){return"[object RegExp]"===ue.call(C)},XRegExp$1.replace=function(C,N,X,H){var U,q=XRegExp$1.isRegExp(N),W=N.global&&"one"!==H||"all"===H,G=(W?"g":"")+(N.sticky?"y":"")||"noGY",Q=N;return q?(N.xregexp=N.xregexp||{},Q=N.xregexp[G]||(N.xregexp[G]=copyRegex(N,{addG:!!W,removeG:"one"===H,isInternalOnly:!0}))):W&&(Q=new RegExp(XRegExp$1.escape(String(N)),"g")),U=re.replace.call(function toObject(C){if(null==C)throw new TypeError("Cannot convert null or undefined to object");return C}(C),Q,X),q&&N.global&&(N.lastIndex=0),U},re.exec=function(C){var N,X,H,U=this.lastIndex,q=te.exec.apply(this,arguments);if(q){if(!ce&&q.length>1&&indexOf(q,"")>-1&&(X=copyRegex(this,{removeG:!0,isInternalOnly:!0}),te.replace.call(String(C).slice(q.index),X,(function(){var C,N=arguments.length;for(C=1;C<N-2;++C)void 0===arguments[C]&&(q[C]=void 0)}))),this.xregexp&&this.xregexp.captureNames)for(H=1;H<q.length;++H)(N=this.xregexp.captureNames[H-1])&&(q[N]=q[H]);this.global&&!q[0].length&&this.lastIndex>q.index&&(this.lastIndex=q.index)}return this.global||(this.lastIndex=U),q},re.replace=function(C,N){var X,H,U,q=XRegExp$1.isRegExp(C);return q?(C.xregexp&&(H=C.xregexp.captureNames),X=C.lastIndex):C+="",U=function isType(C,N){return ue.call(C)==="[object "+N+"]"}(N,"Function")?te.replace.call(String(this),C,(function(){var X,U=arguments;if(H)for(U[0]=new String(U[0]),X=0;X<H.length;++X)H[X]&&(U[0][H[X]]=U[X+1]);return q&&C.global&&(C.lastIndex=U[U.length-2]+U[0].length),N.apply(void 0,U)})):te.replace.call(null==this?this:String(this),C,(function(){var C=arguments;return te.replace.call(String(N),se,(function(N,X,U){var q;if(X){if((q=+X)<=C.length-3)return C[q]||"";if((q=H?indexOf(H,X):-1)<0)throw new SyntaxError("Backreference to undefined group "+N);return C[q+1]||""}if("$"===U)return"$";if("&"===U||0==+U)return C[0];if("`"===U)return C[C.length-1].slice(0,C[C.length-2]);if("'"===U)return C[C.length-1].slice(C[C.length-2]+C[0].length);if(U=+U,!isNaN(U)){if(U>C.length-3)throw new SyntaxError("Backreference to undefined group "+N);return C[U]||""}throw new SyntaxError("Invalid token "+N)}))})),q&&(C.global?C.lastIndex=0:C.lastIndex=X),U},re.split=function(C,N){if(!XRegExp$1.isRegExp(C))return te.split.apply(this,arguments);var X,H=String(this),U=[],q=C.lastIndex,W=0;return N=(void 0===N?-1:N)>>>0,XRegExp$1.forEach(H,C,(function(C){C.index+C[0].length>W&&(U.push(H.slice(W,C.index)),C.length>1&&C.index<H.length&&Array.prototype.push.apply(U,C.slice(1)),X=C[0].length,W=C.index+X)})),W===H.length?te.test.call(C,"")&&!X||U.push(""):U.push(H.slice(W)),C.lastIndex=q,U.length>N?U.slice(0,N):U},XRegExp$1.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,(function(C,N){if("B"===C[1]&&"default"===N)return C[0];throw new SyntaxError("Invalid escape "+C[0])}),{scope:"all",leadChar:"\\"}),XRegExp$1.addToken(/\\u{([\dA-Fa-f]+)}/,(function(C,N,X){var H=dec(C[1]);if(H>1114111)throw new SyntaxError("Invalid Unicode code point "+C[0]);if(H<=65535)return"\\u"+pad4(hex(H));if(fe&&X.indexOf("u")>-1)return C[0];throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u")}),{scope:"all",leadChar:"\\"}),XRegExp$1.addToken(/\[(\^?)\]/,(function(C){return C[1]?"[\\s\\S]":"\\b\\B"}),{leadChar:"["}),XRegExp$1.addToken(/\(\?#[^)]*\)/,(function(C,N,X){return isQuantifierNext(C.input,C.index+C[0].length,X)?"":"(?:)"}),{leadChar:"("}),XRegExp$1.addToken(/\s+|#[^\n]*\n?/,(function(C,N,X){return isQuantifierNext(C.input,C.index+C[0].length,X)?"":"(?:)"}),{flag:"x"}),XRegExp$1.addToken(/\./,(function(){return"[\\s\\S]"}),{flag:"s",leadChar:"."}),XRegExp$1.addToken(/\\k<([\w$]+)>/,(function(C){var N=isNaN(C[1])?indexOf(this.captureNames,C[1])+1:+C[1],X=C.index+C[0].length;if(!N||N>this.captureNames.length)throw new SyntaxError("Backreference to undefined group "+C[0]);return"\\"+N+(X===C.input.length||isNaN(C.input.charAt(X))?"":"(?:)")}),{leadChar:"\\"}),XRegExp$1.addToken(/\\(\d+)/,(function(C,N){if(!("default"===N&&/^[1-9]/.test(C[1])&&+C[1]<=this.captureNames.length)&&"0"!==C[1])throw new SyntaxError("Cannot use octal escape or backreference to undefined group "+C[0]);return C[0]}),{scope:"all",leadChar:"\\"}),XRegExp$1.addToken(/\(\?P?<([\w$]+)>/,(function(C){if(!isNaN(C[1]))throw new SyntaxError("Cannot use integer as capture name "+C[0]);if("length"===C[1]||"__proto__"===C[1])throw new SyntaxError("Cannot use reserved word as capture name "+C[0]);if(indexOf(this.captureNames,C[1])>-1)throw new SyntaxError("Cannot use same name for multiple groups "+C[0]);return this.captureNames.push(C[1]),this.hasNamedCapture=!0,"("}),{leadChar:"("}),XRegExp$1.addToken(/\((?!\?)/,(function(C,N,X){return X.indexOf("n")>-1?"(?:":(this.captureNames.push(null),"(")}),{optionalFlags:"n",leadChar:"("});var he=XRegExp$1; | ||
| var no={astral:!1,natives:!1},oo={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},ao={},io={},so={},co=[],uo={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},lo=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,po=void 0===oo.exec.call(/()??/,"")[1],fo=void 0!==/x/.flags,ho={}.toString;function hasNativeFlag(e){var r=!0;try{new RegExp("",e)}catch(e){r=!1}return r&&"y"===e?new RegExp("aa|.","y").test("b"):r}var go=hasNativeFlag("u"),vo=hasNativeFlag("y"),yo={g:!0,i:!0,m:!0,u:go,y:vo};function augment(e,r,t,n,o){var a;if(e.xregexp={captureNames:r},o)return e;if(e.__proto__)e.__proto__=XRegExp$1.prototype;else for(a in XRegExp$1.prototype)e[a]=XRegExp$1.prototype[a];return e.xregexp.source=t,e.xregexp.flags=n?n.split("").sort().join(""):n,e}function clipDuplicates(e){return oo.replace.call(e,/([\s\S])(?=[\s\S]*\1)/g,"")}function copyRegex(e,r){if(!XRegExp$1.isRegExp(e))throw new TypeError("Type RegExp expected");var t=e.xregexp||{},n=function getNativeFlags(e){return fo?e.flags:oo.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(e))[1]}(e),o="",a="",i=null,s=null;return(r=r||{}).removeG&&(a+="g"),r.removeY&&(a+="y"),a&&(n=oo.replace.call(n,new RegExp("["+a+"]+","g"),"")),r.addG&&(o+="g"),r.addY&&(o+="y"),o&&(n=clipDuplicates(n+o)),r.isInternalOnly||(void 0!==t.source&&(i=t.source),null!=t.flags&&(s=o?clipDuplicates(t.flags+o):t.flags)),e=augment(new RegExp(r.source||e.source,n),function hasNamedCapture(e){return!(!e.xregexp||!e.xregexp.captureNames)}(e)?t.captureNames.slice(0):null,i,s,r.isInternalOnly)}function dec(e){return parseInt(e,16)}function hex(e){return parseInt(e,10).toString(16)}function indexOf(e,r){var t,n=e.length;for(t=0;t<n;++t)if(e[t]===r)return t;return-1}function isQuantifierNext(e,r,t){return oo.test.call(t.indexOf("x")>-1?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,e.slice(r))}function pad4(e){for(;e.length<4;)e="0"+e;return e}function registerFlag(e){if(!/^[\w$]$/.test(e))throw new Error("Flag must be a single character A-Za-z0-9_$");yo[e]=!0}function runTokens(e,r,t,n,o){for(var a,i,s=co.length,c=e.charAt(t),u=null;s--;)if(!((i=co[s]).leadChar&&i.leadChar!==c||i.scope!==n&&"all"!==i.scope||i.flag&&-1===r.indexOf(i.flag))&&(a=XRegExp$1.exec(e,i.regex,t,"sticky"))){u={matchLength:a[0].length,output:i.handler.call(o,a,n,r),reparse:i.reparse};break}return u}function XRegExp$1(e,r){if(XRegExp$1.isRegExp(e)){if(void 0!==r)throw new TypeError("Cannot supply flags when copying a RegExp");return copyRegex(e)}if(e=void 0===e?"":String(e),r=void 0===r?"":String(r),XRegExp$1.isInstalled("astral")&&-1===r.indexOf("A")&&(r+="A"),so[e]||(so[e]={}),!so[e][r]){for(var t,n={hasNamedCapture:!1,captureNames:[]},o="default",a="",i=0,s=function prepareFlags(e,r){var t;if(clipDuplicates(r)!==r)throw new SyntaxError("Invalid duplicate regex flag "+r);for(e=oo.replace.call(e,/^\(\?([\w$]+)\)/,(function(e,t){if(oo.test.call(/[gy]/,t))throw new SyntaxError("Cannot use flag g or y in mode modifier "+e);return r=clipDuplicates(r+t),""})),t=0;t<r.length;++t)if(!yo[r.charAt(t)])throw new SyntaxError("Unknown regex flag "+r.charAt(t));return{pattern:e,flags:r}}(e,r),c=s.pattern,u=s.flags;i<c.length;){do{(t=runTokens(c,u,i,o,n))&&t.reparse&&(c=c.slice(0,i)+t.output+c.slice(i+t.matchLength))}while(t&&t.reparse);if(t)a+=t.output,i+=t.matchLength||1;else{var l=XRegExp$1.exec(c,uo[o],i,"sticky")[0];a+=l,i+=l.length,"["===l&&"default"===o?o="class":"]"===l&&"class"===o&&(o="default")}}so[e][r]={pattern:oo.replace.call(a,/(?:\(\?:\))+/g,"(?:)"),flags:oo.replace.call(u,/[^gimuy]+/g,""),captures:n.hasNamedCapture?n.captureNames:null}}var p=so[e][r];return augment(new RegExp(p.pattern,p.flags),p.captures,e,r)}XRegExp$1.prototype=new RegExp,XRegExp$1.version="3.1.1-next",XRegExp$1._clipDuplicates=clipDuplicates,XRegExp$1._hasNativeFlag=hasNativeFlag,XRegExp$1._dec=dec,XRegExp$1._hex=hex,XRegExp$1._pad4=pad4,XRegExp$1.addToken=function(e,r,t){var n,o=(t=t||{}).optionalFlags;if(t.flag&®isterFlag(t.flag),o)for(o=oo.split.call(o,""),n=0;n<o.length;++n)registerFlag(o[n]);co.push({regex:copyRegex(e,{addG:!0,addY:vo,isInternalOnly:!0}),handler:r,scope:t.scope||"default",flag:t.flag,reparse:t.reparse,leadChar:t.leadChar}),XRegExp$1.cache.flush("patterns")},XRegExp$1.cache=function(e,r){return io[e]||(io[e]={}),io[e][r]||(io[e][r]=XRegExp$1(e,r))},XRegExp$1.cache.flush=function(e){"patterns"===e?so={}:io={}},XRegExp$1.exec=function(e,r,t,n){var o,a,i,s="g",c=!1;return(o=vo&&!!(n||r.sticky&&!1!==n))?s+="y":n&&(c=!0,s+="FakeY"),r.xregexp=r.xregexp||{},t=t||0,(i=r.xregexp[s]||(r.xregexp[s]=copyRegex(r,{addG:!0,addY:o,source:c?r.source+"|()":void 0,removeY:!1===n,isInternalOnly:!0}))).lastIndex=t,a=ao.exec.call(i,e),c&&a&&""===a.pop()&&(a=null),r.global&&(r.lastIndex=a?i.lastIndex:0),a},XRegExp$1.isInstalled=function(e){return!!no[e]},XRegExp$1.isRegExp=function(e){return"[object RegExp]"===ho.call(e)},XRegExp$1.replace=function(e,r,t,n){var o,a=XRegExp$1.isRegExp(r),i=r.global&&"one"!==n||"all"===n,s=(i?"g":"")+(r.sticky?"y":"")||"noGY",c=r;return a?(r.xregexp=r.xregexp||{},c=r.xregexp[s]||(r.xregexp[s]=copyRegex(r,{addG:!!i,removeG:"one"===n,isInternalOnly:!0}))):i&&(c=new RegExp(XRegExp$1.escape(String(r)),"g")),o=ao.replace.call(function toObject(e){if(null==e)throw new TypeError("Cannot convert null or undefined to object");return e}(e),c,t),a&&r.global&&(r.lastIndex=0),o},ao.exec=function(e){var r,t,n,o=this.lastIndex,a=oo.exec.apply(this,arguments);if(a){if(!po&&a.length>1&&indexOf(a,"")>-1&&(t=copyRegex(this,{removeG:!0,isInternalOnly:!0}),oo.replace.call(String(e).slice(a.index),t,(function(){var e,r=arguments.length;for(e=1;e<r-2;++e)void 0===arguments[e]&&(a[e]=void 0)}))),this.xregexp&&this.xregexp.captureNames)for(n=1;n<a.length;++n)(r=this.xregexp.captureNames[n-1])&&(a[r]=a[n]);this.global&&!a[0].length&&this.lastIndex>a.index&&(this.lastIndex=a.index)}return this.global||(this.lastIndex=o),a},ao.replace=function(e,r){var t,n,o,a=XRegExp$1.isRegExp(e);return a?(e.xregexp&&(n=e.xregexp.captureNames),t=e.lastIndex):e+="",o=function isType(e,r){return ho.call(e)==="[object "+r+"]"}(r,"Function")?oo.replace.call(String(this),e,(function(){var t,o=arguments;if(n)for(o[0]=new String(o[0]),t=0;t<n.length;++t)n[t]&&(o[0][n[t]]=o[t+1]);return a&&e.global&&(e.lastIndex=o[o.length-2]+o[0].length),r.apply(void 0,o)})):oo.replace.call(null==this?this:String(this),e,(function(){var e=arguments;return oo.replace.call(String(r),lo,(function(r,t,o){var a;if(t){if((a=+t)<=e.length-3)return e[a]||"";if((a=n?indexOf(n,t):-1)<0)throw new SyntaxError("Backreference to undefined group "+r);return e[a+1]||""}if("$"===o)return"$";if("&"===o||0==+o)return e[0];if("`"===o)return e[e.length-1].slice(0,e[e.length-2]);if("'"===o)return e[e.length-1].slice(e[e.length-2]+e[0].length);if(o=+o,!isNaN(o)){if(o>e.length-3)throw new SyntaxError("Backreference to undefined group "+r);return e[o]||""}throw new SyntaxError("Invalid token "+r)}))})),a&&(e.global?e.lastIndex=0:e.lastIndex=t),o},ao.split=function(e,r){if(!XRegExp$1.isRegExp(e))return oo.split.apply(this,arguments);var t,n=String(this),o=[],a=e.lastIndex,i=0;return r=(void 0===r?-1:r)>>>0,XRegExp$1.forEach(n,e,(function(e){e.index+e[0].length>i&&(o.push(n.slice(i,e.index)),e.length>1&&e.index<n.length&&Array.prototype.push.apply(o,e.slice(1)),t=e[0].length,i=e.index+t)})),i===n.length?oo.test.call(e,"")&&!t||o.push(""):o.push(n.slice(i)),e.lastIndex=a,o.length>r?o.slice(0,r):o},XRegExp$1.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,(function(e,r){if("B"===e[1]&&"default"===r)return e[0];throw new SyntaxError("Invalid escape "+e[0])}),{scope:"all",leadChar:"\\"}),XRegExp$1.addToken(/\\u{([\dA-Fa-f]+)}/,(function(e,r,t){var n=dec(e[1]);if(n>1114111)throw new SyntaxError("Invalid Unicode code point "+e[0]);if(n<=65535)return"\\u"+pad4(hex(n));if(go&&t.indexOf("u")>-1)return e[0];throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u")}),{scope:"all",leadChar:"\\"}),XRegExp$1.addToken(/\[(\^?)\]/,(function(e){return e[1]?"[\\s\\S]":"\\b\\B"}),{leadChar:"["}),XRegExp$1.addToken(/\(\?#[^)]*\)/,(function(e,r,t){return isQuantifierNext(e.input,e.index+e[0].length,t)?"":"(?:)"}),{leadChar:"("}),XRegExp$1.addToken(/\s+|#[^\n]*\n?/,(function(e,r,t){return isQuantifierNext(e.input,e.index+e[0].length,t)?"":"(?:)"}),{flag:"x"}),XRegExp$1.addToken(/\./,(function(){return"[\\s\\S]"}),{flag:"s",leadChar:"."}),XRegExp$1.addToken(/\\k<([\w$]+)>/,(function(e){var r=isNaN(e[1])?indexOf(this.captureNames,e[1])+1:+e[1],t=e.index+e[0].length;if(!r||r>this.captureNames.length)throw new SyntaxError("Backreference to undefined group "+e[0]);return"\\"+r+(t===e.input.length||isNaN(e.input.charAt(t))?"":"(?:)")}),{leadChar:"\\"}),XRegExp$1.addToken(/\\(\d+)/,(function(e,r){if(!("default"===r&&/^[1-9]/.test(e[1])&&+e[1]<=this.captureNames.length)&&"0"!==e[1])throw new SyntaxError("Cannot use octal escape or backreference to undefined group "+e[0]);return e[0]}),{scope:"all",leadChar:"\\"}),XRegExp$1.addToken(/\(\?P?<([\w$]+)>/,(function(e){if(!isNaN(e[1]))throw new SyntaxError("Cannot use integer as capture name "+e[0]);if("length"===e[1]||"__proto__"===e[1])throw new SyntaxError("Cannot use reserved word as capture name "+e[0]);if(indexOf(this.captureNames,e[1])>-1)throw new SyntaxError("Cannot use same name for multiple groups "+e[0]);return this.captureNames.push(e[1]),this.hasNamedCapture=!0,"("}),{leadChar:"("}),XRegExp$1.addToken(/\((?!\?)/,(function(e,r,t){return t.indexOf("n")>-1?"(?:":(this.captureNames.push(null),"(")}),{optionalFlags:"n",leadChar:"("});var mo=XRegExp$1; | ||
| /*! | ||
@@ -22,2 +15,2 @@ * XRegExp Unicode Base 3.1.1-next | ||
| * Steven Levithan (c) 2008-2016 MIT License | ||
| */!function(C){var N={},X=C._dec,H=C._hex,U=C._pad4;function normalize(C){return C.replace(/[- _]+/g,"").toLowerCase()}function charCode(C){var N=/^\\[xu](.+)/.exec(C);return N?X(N[1]):C.charCodeAt("\\"===C.charAt(0)?1:0)}function cacheInvertedBmp(X){return N[X]["b!"]||(N[X]["b!"]=function invertBmp(N){var X="",q=-1;return C.forEach(N,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,(function(C){var N=charCode(C[1]);N>q+1&&(X+="\\u"+U(H(q+1)),N>q+2&&(X+="-\\u"+U(H(N-1)))),q=charCode(C[2]||C[1])})),q<65535&&(X+="\\u"+U(H(q+1)),q<65534&&(X+="-\\uFFFF")),X}(N[X].bmp))}C.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,(function(C,X,H){var U="P"===C[1]||!!C[2],q=normalize(C[4]||C[3]),W=N[q];if("P"===C[1]&&C[2])throw new SyntaxError("Invalid double negation "+C[0]);if(!N.hasOwnProperty(q))throw new SyntaxError("Unknown Unicode token "+C[0]);if(W.inverseOf){if(q=normalize(W.inverseOf),!N.hasOwnProperty(q))throw new ReferenceError("Unicode token missing data "+C[0]+" -> "+W.inverseOf);W=N[q],U=!U}if(!W.bmp)throw new SyntaxError("Astral mode required for Unicode token "+C[0]);return"class"===X?U?cacheInvertedBmp(q):W.bmp:(U?"[^":"[")+W.bmp+"]"}),{scope:"all",optionalFlags:"A",leadChar:"\\"}),C.addUnicodeData=function(X){for(var H,U=0;U<X.length;++U){if(!(H=X[U]).name)throw new Error("Unicode token requires name");if(!(H.inverseOf||H.bmp||H.astral))throw new Error("Unicode token has no character data "+H.name);N[normalize(H.name)]=H,H.alias&&(N[normalize(H.alias)]=H)}C.cache.flush("patterns")},C._getUnicodeProperty=function(C){var X=normalize(C);return N[X]}}(he),function(C){if(!C.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");C.addUnicodeData([{name:"L",alias:"Letter",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-Ᶎꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭧꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"},{name:"N",alias:"Number",bmp:"0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൘-൞൦-൸෦-෯๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9"}])}(he);var ge=he,ye={exports:{}};!function(C){C.exports=function(N,X,H,U){return(C={}).dedupe=function dedupe(C,q){var W,G=N(q);if(!X(C)&&"object"!=typeof C)throw new Error("contains_dupes must be an array or object");if(0===Object.keys(C).length)return void 0!==typeof console&&console.warn("contains_dupes is empty"),[];G.limit&&(void 0!==typeof console&&console.warn("options.limit will be ignored in dedupe"),G.limit=0),G.cutoff&&"number"==typeof G.cutoff||(void 0!==typeof console&&console.warn("Using default cutoff of 70"),G.cutoff=70),G.scorer||(G.scorer=H,void 0!==typeof console&&console.log("Using default scorer 'ratio' for dedupe")),W=G.processor&&"function"==typeof G.processor?G.processor:function(C){return C};var Q={};for(var Y in C){var Z=W(C[Y]);if("string"!=typeof Z&&Z instanceof String==!1)throw new Error("Each processed item in dedupe must be a string.");var V=U(Z,C,G);G.returnObjects?(1===V.length||(V=V.sort((function(C,N){var X=W(C.choice),H=W(N.choice),U=X.length,q=H.length;return U===q?X<H?-1:1:q-U}))),G.keepmap?Q[W(V[0].choice)]={item:V[0].choice,key:V[0].key,matches:V}:Q[W(V[0].choice)]={item:V[0].choice,key:V[0].key}):(1===V.length||(V=V.sort((function(C,N){var X=W(C[0]),H=W(N[0]),U=X.length,q=H.length;return U===q?X<H?-1:1:q-U}))),G.keepmap?Q[W(V[0][0])]=[V[0][0],V[0][2],V]:Q[W(V[0][0])]=[V[0][0],V[0][2]])}var J=[];for(var K in Q)J.push(Q[K]);return J},C}}(ye),function(){var C=G,N=Q.exports.intersection,H=Q.exports.difference,U=Q.exports.uniq,q=Q.exports.toArray,W=Z,Y=J,V=K,ee=function(C,N,X){var H={},U=ge,q=J,W=K;function escapeRegExp(C){return C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function validate(C){return("string"==typeof C||C instanceof String)&&C.length>0}H.validate=validate,H.process_and_sort=function process_and_sort(C){return validate(C)?C.match(/\S+/g).sort().join(" ").trim():""},H.tokenize=function unique_tokens(H,U){if(U&&U.wildcards&&N&&X){var G=X(q,U,W);return N(H.match(/\S+/g),(function(C,N){return 0===G(C,N)}))}return C(H.match(/\S+/g))};var G=U("[^\\pN|\\pL]","g");return H.full_process=function full_process(C,N){if(!(C instanceof String)&&"string"!=typeof C)return"";var X;if(N&&"object"==typeof N&&N.wildcards&&"string"==typeof N.wildcards&&N.wildcards.length>0){var H=N.wildcards.toLowerCase();if(C=C.toLowerCase(),N.force_ascii){var q="[^\0 -|"+escapeRegExp(H)+"]";C=C.replace(new RegExp(q,"g"),"");var W="["+escapeRegExp(H)+"]",Q=H[0];C=C.replace(new RegExp(W,"g"),Q);var Y="[^A-Za-z0-9"+escapeRegExp(H)+"]";X=(C=(C=C.replace(new RegExp(Y,"g")," ")).replace(/_/g," ")).trim()}else{var Z="[^\\pN|\\pL|"+escapeRegExp(H)+"]",V=U(Z,"g");C=U.replace(C,V," ","all"),W="["+escapeRegExp(H)+"]",Q=H[0],X=(C=C.replace(new RegExp(W,"g"),Q)).trim()}}else N&&(N.force_ascii||!0===N)&&(X=(C=C.replace(/[^\x00-\x7F]/g,"")).replace(/\W|_/g," ").toLowerCase().trim()),X=U.replace(C,G," ","all").toLowerCase().trim();return N&&N.collapseWhitespace&&(X=X.replace(/\s+/g," ")),X},H.clone_and_set_option_defaults=function(C){if(C&&C.isAClone)return C;var N={isAClone:!0};if(C){var X,H=Object.keys(C);for(X=0;X<H.length;X++)N[H[X]]=C[H[X]]}return void 0!==N.full_process&&!1===N.full_process||(N.full_process=!0),void 0!==N.force_ascii&&!0===N.force_ascii||(N.force_ascii=!1),void 0!==N.normalize&&!1===N.normalize||(N.normalize=!0),void 0!==N.astral&&!0===N.astral&&(N.full_process=!1),void 0!==N.collapseWhitespace&&!1===N.collapseWhitespace||(N.collapseWhitespace=!0),N},H.isCustomFunc=function(C){return"function"!=typeof C||"token_set_ratio"!==C.name&&"partial_token_set_ratio"!==C.name&&"token_sort_ratio"!==C.name&&"partial_token_sort_ratio"!==C.name&&"QRatio"!==C.name&&"WRatio"!==C.name&&"distance"!==C.name&&"partial_ratio"!==C.name},H}(U),te=ee.validate,re=ee.process_and_sort,ne=ee.tokenize,oe=ee.full_process,ae=ee.clone_and_set_option_defaults,ie=ee.isCustomFunc;void 0===Array.isArray&&(Array.isArray=function(C){return"[object Array]"===Object.prototype.toString.call(C)});var se=ye.exports(ae,Array.isArray,QRatio,extract).dedupe;function QRatio(C,N,X){var H=ae(X);return C=H.full_process?oe(C,H):C,N=H.full_process?oe(N,H):N,te(C)&&te(N)?_ratio(C,N,H):0}function extract(N,X,H){var U,q=ae(H),W=!1;if(X&&X.length&&Array.isArray(X))U=X.length,W=!0;else{if(!(X instanceof Object))throw new Error("Invalid choices");U=Object.keys(X).length}if(!X||0===U)return void 0!==typeof console&&console.warn("No choices"),[];if(q.processor&&"function"!=typeof q.processor)throw new Error("Invalid Processor");if(q.processor||(q.processor=function(C){return C}),q.scorer&&"function"!=typeof q.scorer)throw new Error("Invalid Scorer");q.scorer||(q.scorer=QRatio);var G=ie(q.scorer);q.cutoff&&"number"==typeof q.cutoff||(q.cutoff=-1);var pre_processor=function(C,N){return C};q.full_process&&(pre_processor=oe,G||(q.processed=!0));var Q=!1;G||(N=pre_processor(N,q),q.full_process=!1,q.astral&&q.normalize&&(q.normalize=!1,String.prototype.normalize?(Q=!0,N=N.normalize()):void 0!==typeof console&&console.warn("Normalization not supported in your environment")),0===N.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var Y,Z,V,J,K,ee=[],te=!1,se=!1,ce=!1;if("token_sort_ratio"===q.scorer.name||"partial_token_sort_ratio"===q.scorer.name){var le=re(N);se=!0}else if("token_set_ratio"===q.scorer.name||"partial_token_set_ratio"===q.scorer.name){var ue=ne(N);ce=!0}for(var fe in q.returnObjects?(J=function(C,N){return C.score-N.score},K=function(C,N){return N.score-C.score}):(J=function(C,N){return C[1]-N[1]},K=function(C,N){return N[1]-C[1]}),X)(W||X.hasOwnProperty(fe))&&(q.tokens=void 0,q.proc_sorted=!1,se?(q.proc_sorted=!0,X[fe]&&X[fe].proc_sorted?Z=X[fe].proc_sorted:(Z=pre_processor(q.processor(X[fe]),q),Z=re(Q?Z.normalize():Z)),V=q.scorer(le,Z,q)):ce?(Z="x",X[fe]&&X[fe].tokens?(q.tokens=[ue,X[fe].tokens],q.trySimple&&(Z=pre_processor(q.processor(X[fe]),q))):(Z=pre_processor(q.processor(X[fe]),q),q.tokens=[ue,ne(Q?Z.normalize():Z)]),V=q.scorer(N,Z,q)):G?(Z=q.processor(X[fe]),V=q.scorer(N,Z,q)):("string"==typeof(Z=pre_processor(q.processor(X[fe]),q))&&0!==Z.length||(te=!0),Q&&"string"==typeof Z&&(Z=Z.normalize()),V=q.scorer(N,Z,q)),Y=W?parseInt(fe):fe,V>q.cutoff&&(q.returnObjects?ee.push({choice:X[fe],score:V,key:Y}):ee.push([X[fe],V,Y])));return te&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),q.limit&&"number"==typeof q.limit&&q.limit>0&&q.limit<U&&!q.unsorted?ee=C.nlargest(ee,q.limit,J):q.unsorted||(ee=ee.sort(K)),ee}function extractAsync(N,X,H,U){var q,W,G=ae(H);"object"==typeof H.abortController&&(q=H.abortController),"object"==typeof H.cancelToken&&(W=H.cancelToken);var Q=256;"number"==typeof G.asyncLoopOffset&&(Q=G.asyncLoopOffset<1?1:G.asyncLoopOffset);var Y,Z=!1;if(X&&X.length&&Array.isArray(X))Y=X.length,Z=!0;else{if(!(X instanceof Object))return void U(new Error("Invalid choices"));Y=Object.keys(X).length}if(!X||0===Y)return void 0!==typeof console&&console.warn("No choices"),void U(null,[]);if(G.processor&&"function"!=typeof G.processor)U(new Error("Invalid Processor"));else if(G.processor||(G.processor=function(C){return C}),G.scorer&&"function"!=typeof G.scorer)U(new Error("Invalid Scorer"));else{G.scorer||(G.scorer=QRatio);var V=ie(G.scorer);G.cutoff&&"number"==typeof G.cutoff||(G.cutoff=-1);var pre_processor=function(C,N){return C};G.full_process&&(pre_processor=oe,V||(G.processed=!0));var J=!1;V||(N=pre_processor(N,G),G.full_process=!1,G.astral&&G.normalize&&(G.normalize=!1,String.prototype.normalize?(J=!0,N=N.normalize()):void 0!==typeof console&&console.warn("Normalization not supported in your environment")),0===N.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var K,ee,te,se,ce,le=[],ue=!1,fe=!1,pe=!1;if("token_sort_ratio"===G.scorer.name||"partial_token_sort_ratio"===G.scorer.name){var de=re(N);fe=!0}else if("token_set_ratio"===G.scorer.name||"partial_token_set_ratio"===G.scorer.name){var he=ne(N);pe=!0}G.returnObjects?(se=function(C,N){return C.score-N.score},ce=function(C,N){return N.score-C.score}):(se=function(C,N){return C[1]-N[1]},ce=function(C,N){return N[1]-C[1]});var ge=Object.keys(X);Z?searchLoop(0):searchLoop(ge[0],0)}function searchLoop(H,oe){(Z||X.hasOwnProperty(H))&&(G.tokens=void 0,G.proc_sorted=!1,fe?(G.proc_sorted=!0,X[H].proc_sorted?ee=X[H].proc_sorted:(ee=pre_processor(G.processor(X[H]),G),ee=re(J?ee.normalize():ee)),te=G.scorer(de,ee,G)):pe?(ee="x",X[H].tokens?(G.tokens=[he,X[H].tokens],G.trySimple&&(ee=pre_processor(G.processor(X[H]),G))):(ee=pre_processor(G.processor(X[H]),G),G.tokens=[he,ne(J?ee.normalize():ee)]),te=G.scorer(N,ee,G)):V?(ee=G.processor(X[H]),te=G.scorer(N,ee,G)):("string"==typeof(ee=pre_processor(G.processor(X[H]),G))&&0!==ee.length||(ue=!0),J&&"string"==typeof ee&&(ee=ee.normalize()),te=G.scorer(N,ee,G)),K=Z?parseInt(H):H,te>G.cutoff&&(G.returnObjects?le.push({choice:X[H],score:te,key:K}):le.push([X[H],te,K]))),q&&!0===q.signal.aborted?U(new Error("aborted")):W&&!0===W.canceled?U(new Error("canceled")):Z&&H<X.length-1?H%Q==0?setImmediate((function(){searchLoop(H+1)})):searchLoop(H+1):oe<ge.length-1?oe%Q==0?setImmediate((function(){searchLoop(ge[oe+1],oe+1)})):searchLoop(ge[oe+1],oe+1):(ue&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),G.limit&&"number"==typeof G.limit&&G.limit>0&&G.limit<Y&&!G.unsorted?le=C.nlargest(le,G.limit,se):G.unsorted||(le=le.sort(ce)),U(null,le))}}var ce,le,ue,fe,pe=!1;function _ratio(C,N,X){return te(C)&&te(N)?(void 0===X.subcost&&(X.subcost=2),X.astral?(X.normalize&&(String.prototype.normalize?(C=C.normalize(),N=N.normalize()):pe||(void 0!==typeof console&&console.warn("Normalization not supported in your environment"),pe=!0)),H=W(C,N,X,q),U=q(C).length+q(N).length):X.wildcards?(H=Y(C,N,X,V),U=C.length+N.length):(H=V(C,N,X),U=C.length+N.length),Math.round((U-H)/U*100)):0;var H,U}Object.keys||(Object.keys=(ce=Object.prototype.hasOwnProperty,le=!{toString:null}.propertyIsEnumerable("toString"),fe=(ue=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(C){if("object"!=typeof C&&("function"!=typeof C||null===C))throw new TypeError("Object.keys called on non-object");var N,X,H=[];for(N in C)ce.call(C,N)&&H.push(N);if(le)for(X=0;X<fe;X++)ce.call(C,ue[X])&&H.push(ue[X]);return H}));var de=void 0;"undefined"!=typeof Promise&&(de=function(C,N,X){return new Promise((function(H,U){extractAsync(C,N,X,(function(C,N){C?U(C):H(N)}))}))});var he={distance:function distance(C,N,X){var H=ae(X);return C=H.full_process?oe(C,H):C,N=H.full_process?oe(N,H):N,void 0===H.subcost&&(H.subcost=1),H.astral?W(C,N,H,q):Y(C,N,H,V)},ratio:QRatio,token_set_ratio:function token_set_ratio(C,X,U){var q=ae(U);return C=q.full_process?oe(C,q):C,X=q.full_process?oe(X,q):X,te(C)&&te(X)?function _token_set(C,X,U){if(U.tokens)q=U.tokens[0],W=U.tokens[1];else var q=ne(C),W=ne(X);var G=N(q,W),Q=H(q,W),Y=H(W,q),Z=G.sort().join(" "),V=Q.sort().join(" "),J=Y.sort().join(" "),K=Z+" "+V,ee=Z+" "+J;Z=Z.trim(),K=K.trim(),ee=ee.trim();var te=_ratio,re=[te(Z,K,U),te(Z,ee,U),te(K,ee,U)];U.trySimple&&re.push(te(C,X,U));return Math.max.apply(null,re)}(C,X,q):0},token_sort_ratio:function token_sort_ratio(C,N,X){var H=ae(X);return C=H.full_process?oe(C,H):C,N=H.full_process?oe(N,H):N,te(C)&&te(N)?(H.proc_sorted||(C=re(C),N=re(N)),_ratio(C,N,H)):0},full_process:oe,extract:extract,extractAsync:extractAsync,extractAsPromised:de,process_and_sort:re,unique_tokens:ne,dedupe:se};X.exports=he}();var ve=X.exports;const me=ve.distance,xe=ve.ratio,_e=ve.token_set_ratio,be=ve.token_sort_ratio,we=ve.full_process,Ee=ve.extract,ke=ve.extractAsync,je=ve.extractAsPromised,Ae=ve.process_and_sort,Se=ve.unique_tokens,Re=ve.dedupe;export{Re as dedupe,me as distance,Ee as extract,je as extractAsPromised,ke as extractAsync,we as full_process,Ae as process_and_sort,xe as ratio,_e as token_set_ratio,be as token_sort_ratio,Se as unique_tokens}; | ||
| */!function(e){var r={},t=e._dec,n=e._hex,o=e._pad4;function normalize(e){return e.replace(/[- _]+/g,"").toLowerCase()}function charCode(e){var r=/^\\[xu](.+)/.exec(e);return r?t(r[1]):e.charCodeAt("\\"===e.charAt(0)?1:0)}function cacheInvertedBmp(t){return r[t]["b!"]||(r[t]["b!"]=function invertBmp(r){var t="",a=-1;return e.forEach(r,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,(function(e){var r=charCode(e[1]);r>a+1&&(t+="\\u"+o(n(a+1)),r>a+2&&(t+="-\\u"+o(n(r-1)))),a=charCode(e[2]||e[1])})),a<65535&&(t+="\\u"+o(n(a+1)),a<65534&&(t+="-\\uFFFF")),t}(r[t].bmp))}e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,(function(e,t,n){var o="P"===e[1]||!!e[2],a=normalize(e[4]||e[3]),i=r[a];if("P"===e[1]&&e[2])throw new SyntaxError("Invalid double negation "+e[0]);if(!r.hasOwnProperty(a))throw new SyntaxError("Unknown Unicode token "+e[0]);if(i.inverseOf){if(a=normalize(i.inverseOf),!r.hasOwnProperty(a))throw new ReferenceError("Unicode token missing data "+e[0]+" -> "+i.inverseOf);i=r[a],o=!o}if(!i.bmp)throw new SyntaxError("Astral mode required for Unicode token "+e[0]);return"class"===t?o?cacheInvertedBmp(a):i.bmp:(o?"[^":"[")+i.bmp+"]"}),{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(t){for(var n,o=0;o<t.length;++o){if(!(n=t[o]).name)throw new Error("Unicode token requires name");if(!(n.inverseOf||n.bmp||n.astral))throw new Error("Unicode token has no character data "+n.name);r[normalize(n.name)]=n,n.alias&&(r[normalize(n.alias)]=n)}e.cache.flush("patterns")},e._getUnicodeProperty=function(e){var t=normalize(e);return r[t]}}(mo),function(e){if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");e.addUnicodeData([{name:"L",alias:"Letter",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-Ᶎꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭧꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"},{name:"N",alias:"Number",bmp:"0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൘-൞൦-൸෦-෯๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9"}])}(mo);var xo=mo,bo={exports:{}};!function(e){e.exports=function(r,t,n,o){return(e={}).dedupe=function dedupe(e,a){var i,s=r(a);if(!t(e)&&"object"!=typeof e)throw new Error("contains_dupes must be an array or object");if(0===Object.keys(e).length)return void 0!==typeof console&&console.warn("contains_dupes is empty"),[];s.limit&&(void 0!==typeof console&&console.warn("options.limit will be ignored in dedupe"),s.limit=0),s.cutoff&&"number"==typeof s.cutoff||(void 0!==typeof console&&console.warn("Using default cutoff of 70"),s.cutoff=70),s.scorer||(s.scorer=n,void 0!==typeof console&&console.log("Using default scorer 'ratio' for dedupe")),i=s.processor&&"function"==typeof s.processor?s.processor:function(e){return e};var c={};for(var u in e){var l=i(e[u]);if("string"!=typeof l&&l instanceof String==!1)throw new Error("Each processed item in dedupe must be a string.");var p=o(l,e,s);s.returnObjects?(1===p.length||(p=p.sort((function(e,r){var t=i(e.choice),n=i(r.choice),o=t.length,a=n.length;return o===a?t<n?-1:1:a-o}))),s.keepmap?c[i(p[0].choice)]={item:p[0].choice,key:p[0].key,matches:p}:c[i(p[0].choice)]={item:p[0].choice,key:p[0].key}):(1===p.length||(p=p.sort((function(e,r){var t=i(e[0]),n=i(r[0]),o=t.length,a=n.length;return o===a?t<n?-1:1:a-o}))),s.keepmap?c[i(p[0][0])]=[p[0][0],p[0][2],p]:c[i(p[0][0])]=[p[0][0],p[0][2]])}var f=[];for(var d in c)f.push(c[d]);return f},e}}(bo),function(){var e=o,r=Or,n=ot,a=Vn,i=Jn,s=ro,c=to,u=function(e,r,t){var n={},o=xo,a=ro,i=to;function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function validate(e){return("string"==typeof e||e instanceof String)&&e.length>0}n.validate=validate,n.process_and_sort=function process_and_sort(e){return validate(e)?e.match(/\S+/g).sort().join(" ").trim():""},n.tokenize=function unique_tokens(n,o){if(o&&o.wildcards&&r&&t){var s=t(a,o,i);return r(n.match(/\S+/g),(function(e,r){return 0===s(e,r)}))}return e(n.match(/\S+/g))};var s=o("[^\\pN|\\pL]","g");return n.full_process=function full_process(e,r){if(!(e instanceof String)&&"string"!=typeof e)return"";var t;if(r&&"object"==typeof r&&r.wildcards&&"string"==typeof r.wildcards&&r.wildcards.length>0){var n=r.wildcards.toLowerCase();if(e=e.toLowerCase(),r.force_ascii){var a="[^\0 -|"+escapeRegExp(n)+"]";e=e.replace(new RegExp(a,"g"),"");var i="["+escapeRegExp(n)+"]",c=n[0];e=e.replace(new RegExp(i,"g"),c);var u="[^A-Za-z0-9"+escapeRegExp(n)+"]";t=(e=(e=e.replace(new RegExp(u,"g")," ")).replace(/_/g," ")).trim()}else{var l="[^\\pN|\\pL|"+escapeRegExp(n)+"]",p=o(l,"g");e=o.replace(e,p," ","all"),i="["+escapeRegExp(n)+"]",c=n[0],t=(e=e.replace(new RegExp(i,"g"),c)).trim()}}else r&&(r.force_ascii||!0===r)&&(t=(e=e.replace(/[^\x00-\x7F]/g,"")).replace(/\W|_/g," ").toLowerCase().trim()),t=o.replace(e,s," ","all").toLowerCase().trim();return r&&r.collapseWhitespace&&(t=t.replace(/\s+/g," ")),t},n.clone_and_set_option_defaults=function(e){if(e&&e.isAClone)return e;var r={isAClone:!0};if(e){var t,n=Object.keys(e);for(t=0;t<n.length;t++)r[n[t]]=e[n[t]]}return!1!==r.full_process&&(r.full_process=!0),!0!==r.force_ascii&&(r.force_ascii=!1),!1!==r.normalize&&(r.normalize=!0),!0===r.astral&&(r.full_process=!1),!1!==r.collapseWhitespace&&(r.collapseWhitespace=!0),r},n.isCustomFunc=function(e){return"function"!=typeof e||"token_set_ratio"!==e.name&&"partial_token_set_ratio"!==e.name&&"token_sort_ratio"!==e.name&&"partial_token_sort_ratio"!==e.name&&"QRatio"!==e.name&&"WRatio"!==e.name&&"distance"!==e.name&&"partial_ratio"!==e.name},n}(yt),l=u.validate,p=u.process_and_sort,f=u.tokenize,d=u.full_process,h=u.clone_and_set_option_defaults,g=u.isCustomFunc;void 0===Array.isArray&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var v=bo.exports(h,Array.isArray,QRatio,extract).dedupe;function QRatio(e,r,t){var n=h(t);return e=n.full_process?d(e,n):e,r=n.full_process?d(r,n):r,l(e)&&l(r)?_ratio(e,r,n):0}function extract(r,t,n){var o,a=h(n),i=!1;if(t&&t.length&&Array.isArray(t))o=t.length,i=!0;else{if(!(t instanceof Object))throw new Error("Invalid choices");o=Object.keys(t).length}if(!t||0===o)return void 0!==typeof console&&console.warn("No choices"),[];if(a.processor&&"function"!=typeof a.processor)throw new Error("Invalid Processor");if(a.processor||(a.processor=function(e){return e}),a.scorer&&"function"!=typeof a.scorer)throw new Error("Invalid Scorer");a.scorer||(a.scorer=QRatio);var s=g(a.scorer);a.cutoff&&"number"==typeof a.cutoff||(a.cutoff=-1);var pre_processor=function(e,r){return e};a.full_process&&(pre_processor=d,s||(a.processed=!0));var c=!1;s||(r=pre_processor(r,a),a.full_process=!1,a.astral&&a.normalize&&(a.normalize=!1,String.prototype.normalize?(c=!0,r=r.normalize()):void 0!==typeof console&&console.warn("Normalization not supported in your environment")),0===r.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var u,l,v,y,m,x=[],b=!1,_=!1,w=!1;if("token_sort_ratio"===a.scorer.name||"partial_token_sort_ratio"===a.scorer.name){var $=p(r);_=!0}else if("token_set_ratio"===a.scorer.name||"partial_token_set_ratio"===a.scorer.name){var E=f(r);w=!0}for(var C in a.returnObjects?(y=function(e,r){return e.score-r.score},m=function(e,r){return r.score-e.score}):(y=function(e,r){return e[1]-r[1]},m=function(e,r){return r[1]-e[1]}),t)(i||t.hasOwnProperty(C))&&(a.tokens=void 0,a.proc_sorted=!1,_?(a.proc_sorted=!0,t[C]&&t[C].proc_sorted?l=t[C].proc_sorted:(l=pre_processor(a.processor(t[C]),a),l=p(c?l.normalize():l)),v=a.scorer($,l,a)):w?(l="x",t[C]&&t[C].tokens?(a.tokens=[E,t[C].tokens],a.trySimple&&(l=pre_processor(a.processor(t[C]),a))):(l=pre_processor(a.processor(t[C]),a),a.tokens=[E,f(c?l.normalize():l)]),v=a.scorer(r,l,a)):s?(l=a.processor(t[C]),v=a.scorer(r,l,a)):("string"==typeof(l=pre_processor(a.processor(t[C]),a))&&0!==l.length||(b=!0),c&&"string"==typeof l&&(l=l.normalize()),v=a.scorer(r,l,a)),u=i?parseInt(C):C,v>a.cutoff&&(a.returnObjects?x.push({choice:t[C],score:v,key:u}):x.push([t[C],v,u])));return b&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),a.limit&&"number"==typeof a.limit&&a.limit>0&&a.limit<o&&!a.unsorted?x=e.nlargest(x,a.limit,y):a.unsorted||(x=x.sort(m)),x}function extractAsync(r,t,n,o){var a,i,s=h(n);"object"==typeof n.abortController&&(a=n.abortController),"object"==typeof n.cancelToken&&(i=n.cancelToken);var c=256;"number"==typeof s.asyncLoopOffset&&(c=s.asyncLoopOffset<1?1:s.asyncLoopOffset);var u,l=!1;if(t&&t.length&&Array.isArray(t))u=t.length,l=!0;else{if(!(t instanceof Object))return void o(new Error("Invalid choices"));u=Object.keys(t).length}if(!t||0===u)return void 0!==typeof console&&console.warn("No choices"),void o(null,[]);if(s.processor&&"function"!=typeof s.processor)o(new Error("Invalid Processor"));else if(s.processor||(s.processor=function(e){return e}),s.scorer&&"function"!=typeof s.scorer)o(new Error("Invalid Scorer"));else{s.scorer||(s.scorer=QRatio);var v=g(s.scorer);s.cutoff&&"number"==typeof s.cutoff||(s.cutoff=-1);var pre_processor=function(e,r){return e};s.full_process&&(pre_processor=d,v||(s.processed=!0));var y=!1;v||(r=pre_processor(r,s),s.full_process=!1,s.astral&&s.normalize&&(s.normalize=!1,String.prototype.normalize?(y=!0,r=r.normalize()):void 0!==typeof console&&console.warn("Normalization not supported in your environment")),0===r.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var m,x,b,_,w,$=[],E=!1,C=!1,j=!1;if("token_sort_ratio"===s.scorer.name||"partial_token_sort_ratio"===s.scorer.name){var k=p(r);C=!0}else if("token_set_ratio"===s.scorer.name||"partial_token_set_ratio"===s.scorer.name){var A=f(r);j=!0}s.returnObjects?(_=function(e,r){return e.score-r.score},w=function(e,r){return r.score-e.score}):(_=function(e,r){return e[1]-r[1]},w=function(e,r){return r[1]-e[1]});var S=Object.keys(t);l?searchLoop(0):searchLoop(S[0],0)}function searchLoop(n,d){(l||t.hasOwnProperty(n))&&(s.tokens=void 0,s.proc_sorted=!1,C?(s.proc_sorted=!0,t[n].proc_sorted?x=t[n].proc_sorted:(x=pre_processor(s.processor(t[n]),s),x=p(y?x.normalize():x)),b=s.scorer(k,x,s)):j?(x="x",t[n].tokens?(s.tokens=[A,t[n].tokens],s.trySimple&&(x=pre_processor(s.processor(t[n]),s))):(x=pre_processor(s.processor(t[n]),s),s.tokens=[A,f(y?x.normalize():x)]),b=s.scorer(r,x,s)):v?(x=s.processor(t[n]),b=s.scorer(r,x,s)):("string"==typeof(x=pre_processor(s.processor(t[n]),s))&&0!==x.length||(E=!0),y&&"string"==typeof x&&(x=x.normalize()),b=s.scorer(r,x,s)),m=l?parseInt(n):n,b>s.cutoff&&(s.returnObjects?$.push({choice:t[n],score:b,key:m}):$.push([t[n],b,m]))),a&&!0===a.signal.aborted?o(new Error("aborted")):i&&!0===i.canceled?o(new Error("canceled")):l&&n<t.length-1?n%c==0?setImmediate((function(){searchLoop(n+1)})):searchLoop(n+1):d<S.length-1?d%c==0?setImmediate((function(){searchLoop(S[d+1],d+1)})):searchLoop(S[d+1],d+1):(E&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),s.limit&&"number"==typeof s.limit&&s.limit>0&&s.limit<u&&!s.unsorted?$=e.nlargest($,s.limit,_):s.unsorted||($=$.sort(w)),o(null,$))}}var y=!1;function _ratio(e,r,t){return l(e)&&l(r)?(void 0===t.subcost&&(t.subcost=2),t.astral?(t.normalize&&(String.prototype.normalize?(e=e.normalize(),r=r.normalize()):y||(void 0!==typeof console&&console.warn("Normalization not supported in your environment"),y=!0)),n=i(e,r,t,a),o=a(e).length+a(r).length):t.wildcards?(n=s(e,r,t,c),o=e.length+r.length):(n=c(e,r,t),o=e.length+r.length),Math.round((o-n)/o*100)):0;var n,o}Object.keys||(Object.keys=function(){var e=Object.prototype.hasOwnProperty,r=!{toString:null}.propertyIsEnumerable("toString"),t=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=t.length;return function(o){if("object"!=typeof o&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on non-object");var a,i,s=[];for(a in o)e.call(o,a)&&s.push(a);if(r)for(i=0;i<n;i++)e.call(o,t[i])&&s.push(t[i]);return s}}());var m=void 0;"undefined"!=typeof Promise&&(m=function(e,r,t){return new Promise((function(n,o){extractAsync(e,r,t,(function(e,r){e?o(e):n(r)}))}))});var x={distance:function distance(e,r,t){var n=h(t);return e=n.full_process?d(e,n):e,r=n.full_process?d(r,n):r,void 0===n.subcost&&(n.subcost=1),n.astral?i(e,r,n,a):s(e,r,n,c)},ratio:QRatio,token_set_ratio:function token_set_ratio(e,t,o){var a=h(o);return e=a.full_process?d(e,a):e,t=a.full_process?d(t,a):t,l(e)&&l(t)?function _token_set(e,t,o){if(o.tokens)a=o.tokens[0],i=o.tokens[1];else var a=f(e),i=f(t);var s=r(a,i),c=n(a,i),u=n(i,a),l=s.sort().join(" "),p=c.sort().join(" "),d=u.sort().join(" "),h=l+" "+p,g=l+" "+d;l=l.trim(),h=h.trim(),g=g.trim();var v=_ratio,y=[v(l,h,o),v(l,g,o),v(h,g,o)];o.trySimple&&y.push(v(e,t,o));return Math.max.apply(null,y)}(e,t,a):0},token_sort_ratio:function token_sort_ratio(e,r,t){var n=h(t);return e=n.full_process?d(e,n):e,r=n.full_process?d(r,n):r,l(e)&&l(r)?(n.proc_sorted||(e=p(e),r=p(r)),_ratio(e,r,n)):0},full_process:d,extract:extract,extractAsync:extractAsync,extractAsPromised:m,process_and_sort:p,unique_tokens:f,dedupe:v};t.exports=x}();var _o=t.exports;const wo=_o.distance,$o=_o.ratio,Eo=_o.token_set_ratio,Co=_o.token_sort_ratio,jo=_o.full_process,ko=_o.extract,Ao=_o.extractAsync,So=_o.extractAsPromised,Oo=_o.process_and_sort,Ro=_o.unique_tokens,Io=_o.dedupe;export{Io as dedupe,wo as distance,ko as extract,So as extractAsPromised,Ao as extractAsync,jo as full_process,Oo as process_and_sort,$o as ratio,Eo as token_set_ratio,Co as token_sort_ratio,Ro as unique_tokens}; |
@@ -5,6 +5,8 @@ (function () { | ||
| var Heap = require('heap'); | ||
| var _intersect = require('./lodash.custom.min.js').intersection; | ||
| var _difference = require('./lodash.custom.min.js').difference; | ||
| var _uniq = require('./lodash.custom.min.js').uniq; | ||
| var _toArray = require('./lodash.custom.min.js').toArray; | ||
| var _intersect = require('lodash/intersection'); | ||
| var _difference = require('lodash/difference'); | ||
| var _uniq = require('lodash/uniq'); | ||
| var _toArray = require('lodash/toArray'); | ||
| var iLeven = require('../lib/iLeven.js'); | ||
@@ -11,0 +13,0 @@ var wildLeven = require('../lib/wildcardLeven.js'); |
@@ -1,11 +0,4 @@ | ||
| !function(C,N){"object"==typeof exports&&"undefined"!=typeof module?module.exports=N():"function"==typeof define&&define.amd?define(N):(C="undefined"!=typeof globalThis?globalThis:C||self).fuzzball=N()}(this,(function(){"use strict";var C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},N={exports:{}},X={exports:{}};!function(N,X){(function(){var C,X,H,U,q,W,G,Q,Y,Z,V,J,K,ee,te;H=Math.floor,Z=Math.min,X=function(C,N){return C<N?-1:C>N?1:0},Y=function(C,N,U,q,W){var G;if(null==U&&(U=0),null==W&&(W=X),U<0)throw new Error("lo must be non-negative");for(null==q&&(q=C.length);U<q;)W(N,C[G=H((U+q)/2)])<0?q=G:U=G+1;return[].splice.apply(C,[U,U-U].concat(N)),N},W=function(C,N,H){return null==H&&(H=X),C.push(N),ee(C,0,C.length-1,H)},q=function(C,N){var H,U;return null==N&&(N=X),H=C.pop(),C.length?(U=C[0],C[0]=H,te(C,0,N)):U=H,U},Q=function(C,N,H){var U;return null==H&&(H=X),U=C[0],C[0]=N,te(C,0,H),U},G=function(C,N,H){var U;return null==H&&(H=X),C.length&&H(C[0],N)<0&&(N=(U=[C[0],N])[0],C[0]=U[1],te(C,0,H)),N},U=function(C,N){var U,q,W,G,Q,Y;for(null==N&&(N=X),Q=[],q=0,W=(G=function(){Y=[];for(var N=0,X=H(C.length/2);0<=X?N<X:N>X;0<=X?N++:N--)Y.push(N);return Y}.apply(this).reverse()).length;q<W;q++)U=G[q],Q.push(te(C,U,N));return Q},K=function(C,N,H){var U;if(null==H&&(H=X),-1!==(U=C.indexOf(N)))return ee(C,0,U,H),te(C,U,H)},V=function(C,N,H){var q,W,Q,Y,Z;if(null==H&&(H=X),!(W=C.slice(0,N)).length)return W;for(U(W,H),Q=0,Y=(Z=C.slice(N)).length;Q<Y;Q++)q=Z[Q],G(W,q,H);return W.sort(H).reverse()},J=function(C,N,H){var W,G,Q,V,J,K,ee,te,re;if(null==H&&(H=X),10*N<=C.length){if(!(Q=C.slice(0,N).sort(H)).length)return Q;for(G=Q[Q.length-1],V=0,K=(ee=C.slice(N)).length;V<K;V++)H(W=ee[V],G)<0&&(Y(Q,W,0,null,H),Q.pop(),G=Q[Q.length-1]);return Q}for(U(C,H),re=[],J=0,te=Z(N,C.length);0<=te?J<te:J>te;0<=te?++J:--J)re.push(q(C,H));return re},ee=function(C,N,H,U){var q,W,G;for(null==U&&(U=X),q=C[H];H>N&&U(q,W=C[G=H-1>>1])<0;)C[H]=W,H=G;return C[H]=q},te=function(C,N,H){var U,q,W,G,Q;for(null==H&&(H=X),q=C.length,Q=N,W=C[N],U=2*N+1;U<q;)(G=U+1)<q&&!(H(C[U],C[G])<0)&&(U=G),C[N]=C[U],U=2*(N=U)+1;return C[N]=W,ee(C,Q,N,H)},C=function(){function Heap(C){this.cmp=null!=C?C:X,this.nodes=[]}return Heap.push=W,Heap.pop=q,Heap.replace=Q,Heap.pushpop=G,Heap.heapify=U,Heap.updateItem=K,Heap.nlargest=V,Heap.nsmallest=J,Heap.prototype.push=function(C){return W(this.nodes,C,this.cmp)},Heap.prototype.pop=function(){return q(this.nodes,this.cmp)},Heap.prototype.peek=function(){return this.nodes[0]},Heap.prototype.contains=function(C){return-1!==this.nodes.indexOf(C)},Heap.prototype.replace=function(C){return Q(this.nodes,C,this.cmp)},Heap.prototype.pushpop=function(C){return G(this.nodes,C,this.cmp)},Heap.prototype.heapify=function(){return U(this.nodes,this.cmp)},Heap.prototype.updateItem=function(C){return K(this.nodes,C,this.cmp)},Heap.prototype.clear=function(){return this.nodes=[]},Heap.prototype.empty=function(){return 0===this.nodes.length},Heap.prototype.size=function(){return this.nodes.length},Heap.prototype.clone=function(){var C;return(C=new Heap).nodes=this.nodes.slice(0),C},Heap.prototype.toArray=function(){return this.nodes.slice(0)},Heap.prototype.insert=Heap.prototype.push,Heap.prototype.top=Heap.prototype.peek,Heap.prototype.front=Heap.prototype.peek,Heap.prototype.has=Heap.prototype.contains,Heap.prototype.copy=Heap.prototype.clone,Heap}(),N.exports=C}).call(C)}(X);var H,U,q,W=X.exports,G={exports:{}}; | ||
| /** | ||
| * @license | ||
| * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE | ||
| * Build: `lodash include="intersection,difference,uniq,toArray" -p -o ./lite/lodash.custom.min.js` | ||
| */ | ||
| !function(N,X){(function(){function t(C,N,X){switch(X.length){case 0:return C.call(N);case 1:return C.call(N,X[0]);case 2:return C.call(N,X[0],X[1]);case 3:return C.call(N,X[0],X[1],X[2])}return C.apply(N,X)}function e(C,N){var X;if(X=!(null==C||!C.length)){if(N==N)e:{X=-1;for(var H=C.length;++X<H;)if(C[X]===N)break e;X=-1}else e:{X=n;H=C.length;for(var U=-1;++U<H;)if(X(C[U],U,C)){X=U;break e}X=-1}X=-1<X}return X}function r(C,N){for(var X=-1,H=null==C?0:C.length,U=Array(H);++X<H;)U[X]=N(C[X],X,C);return U}function n(C){return C!=C}function f(C,N){return C.has(N)}function i(C){var N=-1,X=Array(C.size);return C.forEach((function(C,H){X[++N]=[H,C]})),X}function a(C){var N=-1,X=Array(C.size);return C.forEach((function(C){X[++N]=C})),X}function c(){}function s(C){var N=-1,X=null==C?0:C.length;for(this.clear();++N<X;){var H=C[N];this.set(H[0],H[1])}}function l(C){var N=-1,X=null==C?0:C.length;for(this.clear();++N<X;){var H=C[N];this.set(H[0],H[1])}}function h(C){var N=-1,X=null==C?0:C.length;for(this.clear();++N<X;){var H=C[N];this.set(H[0],H[1])}}function p(C){var N=-1,X=null==C?0:C.length;for(this.__data__=new h;++N<X;)this.add(C[N])}function d(C,N){for(var X=C.length;X--;)if(k(C[X][0],N))return X;return-1}function b(C,N,X,H,U){var q=-1,W=C.length;for(X||(X=w),U||(U=[]);++q<W;){var G=C[q];if(0<N&&X(G))if(1<N)b(G,N-1,X,H,U);else for(var Q=U,Y=-1,Z=G.length,V=Q.length;++Y<Z;)Q[V+Y]=G[Y];else H||(U[U.length]=G)}return U}function _(C){if(null==C)C=C===H?"[object Undefined]":"[object Null]";else if(me&&me in Object(C)){var N=ce.call(C,me),X=C[me];try{C[me]=H;var U=!0}catch(C){}var q=ue.call(C);U&&(N?C[me]=X:delete C[me]),C=q}else C=ue.call(C);return C}function y(C){return P(C)&&"[object Arguments]"==_(C)}function j(C){return He(O(C,R),C+"")}function v(C){return z(C)?C:[]}function A(C,N){var X=C.__data__,H=typeof N;return("string"==H||"number"==H||"symbol"==H||"boolean"==H?"__proto__"!==N:null===N)?X["string"==typeof N?"string":"hash"]:X.map}function m(C,N){var X=null==C?H:C[N];return!F(X)||le&&le in X||!(M(X)?fe:U).test(S(X))?H:X}function w(C){return Be(C)||Ue(C)||!!(ye&&C&&C[ye])}function O(C,N){var X=we((X=void 0)===H?C.length-1:X,0);return function(){for(var H=arguments,U=-1,q=we(H.length-X,0),W=Array(q);++U<q;)W[U]=H[X+U];for(U=-1,q=Array(X+1);++U<X;)q[U]=H[U];return q[X]=N(W),t(C,this,q)}}function S(C){if(null!=C){try{return se.call(C)}catch(C){}return C+""}return""}function k(C,N){return C===N||C!=C&&N!=N}function x(C){return null!=C&&E(C.length)&&!M(C)}function z(C){return P(C)&&x(C)}function M(C){return!!F(C)&&("[object Function]"==(C=_(C))||"[object GeneratorFunction]"==C||"[object AsyncFunction]"==C||"[object Proxy]"==C)}function E(C){return"number"==typeof C&&-1<C&&0==C%1&&9007199254740991>=C}function F(C){var N=typeof C;return null!=C&&("object"==N||"function"==N)}function P(C){return null!=C&&"object"==typeof C}function $(C){return"string"==typeof C||!Be(C)&&P(C)&&"[object String]"==_(C)}function B(C){if(x(C)){var N=Be(C),X=!N&&Ue(C),H=!N&&!X&&De(C),U=!N&&!X&&!H&&qe(C);if(N=N||X||H||U){X=C.length;for(var W=String,G=-1,Q=Array(X);++G<X;)Q[G]=W(G);X=Q}else X=[];var Y;W=X.length;for(Y in C){if(!(G=!ce.call(C,Y))&&(G=N)&&!(G="length"==Y||H&&("offset"==Y||"parent"==Y)||U&&("buffer"==Y||"byteLength"==Y||"byteOffset"==Y))){var Z=typeof(G=Y);G=!!(Q=null==(Q=W)?9007199254740991:Q)&&("number"==Z||"symbol"!=Z&&q.test(G))&&-1<G&&0==G%1&&G<Q}G||X.push(Y)}C=X}else if(C===("function"==typeof(Y=C&&C.constructor)&&Y.prototype||ae)){for(H in Y=[],Object(C))ce.call(C,H)&&"constructor"!=H&&Y.push(H);C=Y}else C=be(C);return C}function D(C){return null==C?[]:function o(C,N){return r(N,(function(N){return C[N]}))}(C,B(C))}function I(C){return function(){return C}}function R(C){return C}function T(){}function L(){return!1}var H,U=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,W=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*","g"),G=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Q={};Q["[object Float32Array]"]=Q["[object Float64Array]"]=Q["[object Int8Array]"]=Q["[object Int16Array]"]=Q["[object Int32Array]"]=Q["[object Uint8Array]"]=Q["[object Uint8ClampedArray]"]=Q["[object Uint16Array]"]=Q["[object Uint32Array]"]=!0,Q["[object Arguments]"]=Q["[object Array]"]=Q["[object ArrayBuffer]"]=Q["[object Boolean]"]=Q["[object DataView]"]=Q["[object Date]"]=Q["[object Error]"]=Q["[object Function]"]=Q["[object Map]"]=Q["[object Number]"]=Q["[object Object]"]=Q["[object RegExp]"]=Q["[object Set]"]=Q["[object String]"]=Q["[object WeakMap]"]=!1;var Y,Z="object"==typeof C&&C&&C.Object===Object&&C,V="object"==typeof self&&self&&self.Object===Object&&self,J=Z||V||Function("return this")(),K=X&&!X.nodeType&&X,ee=K&&N&&!N.nodeType&&N,te=ee&&ee.exports===K,re=te&&Z.process;e:{try{Y=re&&re.binding&&re.binding("util");break e}catch(t){}Y=void 0}var ne=Y&&Y.isTypedArray,oe=Array.prototype,ae=Object.prototype,ie=J["__core-js_shared__"],se=Function.prototype.toString,ce=ae.hasOwnProperty,le=function(){var C=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||"");return C?"Symbol(src)_1."+C:""}(),ue=ae.toString,fe=RegExp("^"+se.call(ce).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pe=te?J.Buffer:H,de=J.Symbol,he=ae.propertyIsEnumerable,ge=oe.splice,ye=de?de.isConcatSpreadable:H,ve=de?de.iterator:H,me=de?de.toStringTag:H,xe=function(){try{var C=m(Object,"defineProperty");return C({},"",{}),C}catch(C){}}(),_e=pe?pe.isBuffer:H,be=function(C,N){return function(X){return C(N(X))}}(Object.keys,Object),we=Math.max,Ee=Math.min,ke=Date.now,je=m(J,"DataView"),Se=m(J,"Map"),Ae=m(J,"Promise"),Re=m(J,"Set"),Ce=m(J,"WeakMap"),Ie=m(Object,"create"),Oe=S(je),$e=S(Se),ze=S(Ae),Pe=S(Re),Fe=S(Ce);s.prototype.clear=function(){this.__data__=Ie?Ie(null):{},this.size=0},s.prototype.delete=function(C){return C=this.has(C)&&delete this.__data__[C],this.size-=C?1:0,C},s.prototype.get=function(C){var N=this.__data__;return Ie?"__lodash_hash_undefined__"===(C=N[C])?H:C:ce.call(N,C)?N[C]:H},s.prototype.has=function(C){var N=this.__data__;return Ie?N[C]!==H:ce.call(N,C)},s.prototype.set=function(C,N){var X=this.__data__;return this.size+=this.has(C)?0:1,X[C]=Ie&&N===H?"__lodash_hash_undefined__":N,this},l.prototype.clear=function(){this.__data__=[],this.size=0},l.prototype.delete=function(C){var N=this.__data__;return!(0>(C=d(N,C))||(C==N.length-1?N.pop():ge.call(N,C,1),--this.size,0))},l.prototype.get=function(C){var N=this.__data__;return 0>(C=d(N,C))?H:N[C][1]},l.prototype.has=function(C){return-1<d(this.__data__,C)},l.prototype.set=function(C,N){var X=this.__data__,H=d(X,C);return 0>H?(++this.size,X.push([C,N])):X[H][1]=N,this},h.prototype.clear=function(){this.size=0,this.__data__={hash:new s,map:new(Se||l),string:new s}},h.prototype.delete=function(C){return C=A(this,C).delete(C),this.size-=C?1:0,C},h.prototype.get=function(C){return A(this,C).get(C)},h.prototype.has=function(C){return A(this,C).has(C)},h.prototype.set=function(C,N){var X=A(this,C),H=X.size;return X.set(C,N),this.size+=X.size==H?0:1,this},p.prototype.add=p.prototype.push=function(C){return this.__data__.set(C,"__lodash_hash_undefined__"),this},p.prototype.has=function(C){return this.__data__.has(C)};var Ne=xe?function(C,N){return xe(C,"toString",{configurable:!0,enumerable:!1,value:I(N),writable:!0})}:R,Te=Re&&1/a(new Re([,-0]))[1]==1/0?function(C){return new Re(C)}:T,Xe=_;(je&&"[object DataView]"!=Xe(new je(new ArrayBuffer(1)))||Se&&"[object Map]"!=Xe(new Se)||Ae&&"[object Promise]"!=Xe(Ae.resolve())||Re&&"[object Set]"!=Xe(new Re)||Ce&&"[object WeakMap]"!=Xe(new Ce))&&(Xe=function(C){var N=_(C);if(C=(C="[object Object]"==N?C.constructor:H)?S(C):"")switch(C){case Oe:return"[object DataView]";case $e:return"[object Map]";case ze:return"[object Promise]";case Pe:return"[object Set]";case Fe:return"[object WeakMap]"}return N});var He=function(C){var N=0,X=0;return function(){var U=ke(),q=16-(U-X);if(X=U,0<q){if(800<=++N)return arguments[0]}else N=0;return C.apply(H,arguments)}}(Ne),Le=j((function(C,N){var X;if(z(C)){X=b(N,1,z,!0);var H=-1,U=e,q=!0,W=C.length,G=[],Q=X.length;if(W)e:for(200<=X.length&&(U=f,q=!1,X=new p(X));++H<W;){var Y=Z=C[H],Z=0!==Z?Z:0;if(q&&Y==Y){for(var V=Q;V--;)if(X[V]===Y)continue e;G.push(Z)}else U(X,Y,void 0)||G.push(Z)}X=G}else X=[];return X})),Me=j((function(C){var N=r(C,v);if(N.length&&N[0]===C[0]){C=N[0].length;for(var X=N.length,U=X,q=Array(X),W=1/0,G=[];U--;){var Q=N[U];W=Ee(Q.length,W);q[U]=120<=C&&120<=Q.length?new p(U&&Q):H}Q=N[0];var Y=-1,Z=q[0];e:for(;++Y<C&&G.length<W;){var V=J=Q[Y],J=0!==J?J:0;if(Z?!f(Z,V):!e(G,V)){for(U=X;--U;){var K=q[U];if(K?!f(K,V):!e(N[U],V))continue e}Z&&Z.push(V),G.push(J)}}N=G}else N=[];return N})),Ue=y(function(){return arguments}())?y:function(C){return P(C)&&ce.call(C,"callee")&&!he.call(C,"callee")},Be=Array.isArray,De=_e||L,qe=ne?function u(C){return function(N){return C(N)}}(ne):function g(C){return P(C)&&E(C.length)&&!!Q[_(C)]};c.constant=I,c.difference=Le,c.intersection=Me,c.keys=B,c.toArray=function(C){if(!C)return[];if(x(C)){if($(C))C=G.test(C)?C.match(W)||[]:C.split("");else{var N,X=-1,H=C.length;for(N||(N=Array(H));++X<H;)N[X]=C[X];C=N}return C}if(ve&&C[ve]){for(C=C[ve](),X=[];!(N=C.next()).done;)X.push(N.value);return X}return("[object Map]"==(N=Xe(C))?i:"[object Set]"==N?a:D)(C)},c.uniq=function(C){if(C&&C.length)e:{var N=-1,X=e,H=C.length,U=!0,q=[],W=q;if(200<=H){if(X=Te(C)){C=a(X);break e}U=!1,X=f,W=new p}else W=q;t:for(;++N<H;){var G=Q=C[N],Q=0!==Q?Q:0;if(U&&G==G){for(var Y=W.length;Y--;)if(W[Y]===G)continue t;q.push(Q)}else X(W,G,void 0)||(W!==q&&W.push(G),q.push(Q))}C=q}else C=[];return C},c.values=D,c.eq=k,c.identity=R,c.isArguments=Ue,c.isArray=Be,c.isArrayLike=x,c.isArrayLikeObject=z,c.isBuffer=De,c.isFunction=M,c.isLength=E,c.isObject=F,c.isObjectLike=P,c.isString=$,c.isTypedArray=qe,c.stubFalse=L,c.noop=T,c.VERSION="4.17.5",ee?((ee.exports=c)._=c,K._=c):J._=c}).call(C)}(G,G.exports), | ||
| /*! https://mths.be/codepointat v0.2.0 by @mathias */ | ||
| String.prototype.codePointAt||(H=function(){try{var C={},N=Object.defineProperty,X=N(C,C,C)&&N}catch(C){}return X}(),U=function(C){if(null==this)throw TypeError();var N=String(this),X=N.length,H=C?Number(C):0;if(H!=H&&(H=0),!(H<0||H>=X)){var U,q=N.charCodeAt(H);return q>=55296&&q<=56319&&X>H+1&&(U=N.charCodeAt(H+1))>=56320&&U<=57343?1024*(q-55296)+U-56320+65536:q}},H?H(String.prototype,"codePointAt",{value:U,configurable:!0,writable:!0}):String.prototype.codePointAt=U) | ||
| /*! http://mths.be/fromcodepoint v0.2.1 by @mathias */,String.fromCodePoint||function(){var C=function(){try{var C={},N=Object.defineProperty,X=N(C,C,C)&&N}catch(C){}return X}(),N=String.fromCharCode,X=Math.floor,fromCodePoint=function(C){var H,U,q=16384,W=[],G=-1,Q=arguments.length;if(!Q)return"";for(var Y="";++G<Q;){var Z=Number(arguments[G]);if(!isFinite(Z)||Z<0||Z>1114111||X(Z)!=Z)throw RangeError("Invalid code point: "+Z);Z<=65535?W.push(Z):(H=55296+((Z-=65536)>>10),U=Z%1024+56320,W.push(H,U)),(G+1==Q||W.length>q)&&(Y+=N.apply(null,W),W.length=0)}return Y};C?C(String,"fromCodePoint",{value:fromCodePoint,configurable:!0,writable:!0}):String.fromCodePoint=fromCodePoint}();try{q="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(C){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var Q,Y=function leven(C,N,X,H){var U=[],W=[],G=X&&q&&X.useCollator,Q=1;if(X&&X.subcost&&"number"==typeof X.subcost&&(Q=X.subcost),C===N)return 0;var Y,Z,V,J,K=H(C),ee=H(N),te=K.length,re=ee.length;if(0===te)return re;if(0===re)return te;for(var ne=0,oe=0;ne<te;)W[ne]=K[ne].codePointAt(0),U[ne]=++ne;if(G)for(;oe<re;)for(Y=ee[oe].codePointAt(0),V=oe++,Z=oe,ne=0;ne<te;ne++)J=0===q.compare(String.fromCodePoint(Y),String.fromCodePoint(W[ne]))?V:V+Q,V=U[ne],Z=U[ne]=V>Z?J>Z?Z+1:J:J>V?V+1:J;else for(;oe<re;)for(Y=ee[oe].codePointAt(0),V=oe++,Z=oe,ne=0;ne<te;ne++)J=Y===W[ne]?V:V+Q,V=U[ne],Z=U[ne]=V>Z?J>Z?Z+1:J:J>V?V+1:J;return Z};try{Q="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(C){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var Z,V=function leven(C,N,X,H){var U=[],q=[],W=X&&Q&&X.useCollator,G=1;if(X&&X.subcost&&"number"==typeof X.subcost&&(G=X.subcost),C===N)return 0;var Y=C.length,Z=N.length;if(0===Y)return Z;if(0===Z)return Y;if(X&&X.wildcards&&"string"==typeof X.wildcards&&X.wildcards.length>0){var V,J,K,ee,te,re;if(!1===X.full_process&&!0!==X.processed){J=(V=X.wildcards[0]).charCodeAt(0);var ne="["+function escapeRegExp(C){return C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(X.wildcards)+"]";if((C=C.replace(new RegExp(ne,"g"),V))===(N=N.replace(new RegExp(ne,"g"),V)))return 0}else J=(V=X.wildcards[0].toLowerCase()).charCodeAt(0);for(var oe=0,ae=0;oe<Y;)q[oe]=C.charCodeAt(oe),U[oe]=++oe;if(W)for(;ae<Z;)for(K=N.charCodeAt(ae),te=ae++,ee=ae,oe=0;oe<Y;oe++)re=0===Q.compare(String.fromCharCode(K),String.fromCharCode(q[oe]))||K===J||q[oe]===J?te:te+G,te=U[oe],ee=U[oe]=te>ee?re>ee?ee+1:re:re>te?te+1:re;else for(;ae<Z;)for(K=N.charCodeAt(ae),te=ae++,ee=ae,oe=0;oe<Y;oe++)re=K===q[oe]||K===J||q[oe]===J?te:te+G,te=U[oe],ee=U[oe]=te>ee?re>ee?ee+1:re:re>te?te+1:re;return ee}return H(C,N,X)};try{Z="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(C){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var J=function leven(C,N,X){var H=[],U=[],q=X&&Z&&X.useCollator,W=1;if(X&&X.subcost&&"number"==typeof X.subcost&&(W=X.subcost),C===N)return 0;var G,Q,Y,V,J=C.length,K=N.length;if(0===J)return K;if(0===K)return J;for(var ee=0,te=0;ee<J;)U[ee]=C.charCodeAt(ee),H[ee]=++ee;if(q)for(;te<K;)for(G=N.charCodeAt(te),Y=te++,Q=te,ee=0;ee<J;ee++)V=0===Z.compare(String.fromCharCode(G),String.fromCharCode(U[ee]))?Y:Y+W,Y=H[ee],Q=H[ee]=Y>Q?V>Q?Q+1:V:V>Y?Y+1:V;else for(;te<K;)for(G=N.charCodeAt(te),Y=te++,Q=te,ee=0;ee<J;ee++)V=G===U[ee]?Y:Y+W,Y=H[ee],Q=H[ee]=Y>Q?V>Q?Q+1:V:V>Y?Y+1:V;return Q};!function(C,N){if(!C.setImmediate){var X,H=1,U={},q=!1,W=C.document,G=Object.getPrototypeOf&&Object.getPrototypeOf(C);G=G&&G.setTimeout?G:C,"[object process]"==={}.toString.call(C.process)?function installNextTickImplementation(){X=function(C){process.nextTick((function(){runIfPresent(C)}))}}():!function canUsePostMessage(){if(C.postMessage&&!C.importScripts){var N=!0,X=C.onmessage;return C.onmessage=function(){N=!1},C.postMessage("","*"),C.onmessage=X,N}}()?C.MessageChannel?function installMessageChannelImplementation(){var C=new MessageChannel;C.port1.onmessage=function(C){runIfPresent(C.data)},X=function(N){C.port2.postMessage(N)}}():W&&"onreadystatechange"in W.createElement("script")?function installReadyStateChangeImplementation(){var C=W.documentElement;X=function(N){var X=W.createElement("script");X.onreadystatechange=function(){runIfPresent(N),X.onreadystatechange=null,C.removeChild(X),X=null},C.appendChild(X)}}():function installSetTimeoutImplementation(){X=function(C){setTimeout(runIfPresent,0,C)}}():function installPostMessageImplementation(){var N="setImmediate$"+Math.random()+"$",onGlobalMessage=function(X){X.source===C&&"string"==typeof X.data&&0===X.data.indexOf(N)&&runIfPresent(+X.data.slice(N.length))};C.addEventListener?C.addEventListener("message",onGlobalMessage,!1):C.attachEvent("onmessage",onGlobalMessage),X=function(X){C.postMessage(N+X,"*")}}(),G.setImmediate=function setImmediate(C){"function"!=typeof C&&(C=new Function(""+C));for(var N=new Array(arguments.length-1),q=0;q<N.length;q++)N[q]=arguments[q+1];var W={callback:C,args:N};return U[H]=W,X(H),H++},G.clearImmediate=clearImmediate}function clearImmediate(C){delete U[C]}function runIfPresent(C){if(q)setTimeout(runIfPresent,0,C);else{var N=U[C];if(N){q=!0;try{!function run(C){var N=C.callback,X=C.args;switch(X.length){case 0:N();break;case 1:N(X[0]);break;case 2:N(X[0],X[1]);break;case 3:N(X[0],X[1],X[2]);break;default:N.apply(void 0,X)}}(N)}finally{clearImmediate(C),q=!1}}}}}("undefined"==typeof self?C:self); | ||
| !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(e="undefined"!=typeof globalThis?globalThis:e||self).fuzzball=r()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r={exports:{}},t={exports:{}};!function(r,t){(function(){var e,t,n,o,a,i,s,c,u,l,p,f,d,h,g;n=Math.floor,l=Math.min,t=function(e,r){return e<r?-1:e>r?1:0},u=function(e,r,o,a,i){var s;if(null==o&&(o=0),null==i&&(i=t),o<0)throw new Error("lo must be non-negative");for(null==a&&(a=e.length);o<a;)i(r,e[s=n((o+a)/2)])<0?a=s:o=s+1;return[].splice.apply(e,[o,o-o].concat(r)),r},i=function(e,r,n){return null==n&&(n=t),e.push(r),h(e,0,e.length-1,n)},a=function(e,r){var n,o;return null==r&&(r=t),n=e.pop(),e.length?(o=e[0],e[0]=n,g(e,0,r)):o=n,o},c=function(e,r,n){var o;return null==n&&(n=t),o=e[0],e[0]=r,g(e,0,n),o},s=function(e,r,n){var o;return null==n&&(n=t),e.length&&n(e[0],r)<0&&(r=(o=[e[0],r])[0],e[0]=o[1],g(e,0,n)),r},o=function(e,r){var o,a,i,s,c,u;for(null==r&&(r=t),c=[],a=0,i=(s=function(){u=[];for(var r=0,t=n(e.length/2);0<=t?r<t:r>t;0<=t?r++:r--)u.push(r);return u}.apply(this).reverse()).length;a<i;a++)o=s[a],c.push(g(e,o,r));return c},d=function(e,r,n){var o;if(null==n&&(n=t),-1!==(o=e.indexOf(r)))return h(e,0,o,n),g(e,o,n)},p=function(e,r,n){var a,i,c,u,l;if(null==n&&(n=t),!(i=e.slice(0,r)).length)return i;for(o(i,n),c=0,u=(l=e.slice(r)).length;c<u;c++)a=l[c],s(i,a,n);return i.sort(n).reverse()},f=function(e,r,n){var i,s,c,p,f,d,h,g,v;if(null==n&&(n=t),10*r<=e.length){if(!(c=e.slice(0,r).sort(n)).length)return c;for(s=c[c.length-1],p=0,d=(h=e.slice(r)).length;p<d;p++)n(i=h[p],s)<0&&(u(c,i,0,null,n),c.pop(),s=c[c.length-1]);return c}for(o(e,n),v=[],f=0,g=l(r,e.length);0<=g?f<g:f>g;0<=g?++f:--f)v.push(a(e,n));return v},h=function(e,r,n,o){var a,i,s;for(null==o&&(o=t),a=e[n];n>r&&o(a,i=e[s=n-1>>1])<0;)e[n]=i,n=s;return e[n]=a},g=function(e,r,n){var o,a,i,s,c;for(null==n&&(n=t),a=e.length,c=r,i=e[r],o=2*r+1;o<a;)(s=o+1)<a&&!(n(e[o],e[s])<0)&&(o=s),e[r]=e[o],o=2*(r=o)+1;return e[r]=i,h(e,c,r,n)},e=function(){function Heap(e){this.cmp=null!=e?e:t,this.nodes=[]}return Heap.push=i,Heap.pop=a,Heap.replace=c,Heap.pushpop=s,Heap.heapify=o,Heap.updateItem=d,Heap.nlargest=p,Heap.nsmallest=f,Heap.prototype.push=function(e){return i(this.nodes,e,this.cmp)},Heap.prototype.pop=function(){return a(this.nodes,this.cmp)},Heap.prototype.peek=function(){return this.nodes[0]},Heap.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},Heap.prototype.replace=function(e){return c(this.nodes,e,this.cmp)},Heap.prototype.pushpop=function(e){return s(this.nodes,e,this.cmp)},Heap.prototype.heapify=function(){return o(this.nodes,this.cmp)},Heap.prototype.updateItem=function(e){return d(this.nodes,e,this.cmp)},Heap.prototype.clear=function(){return this.nodes=[]},Heap.prototype.empty=function(){return 0===this.nodes.length},Heap.prototype.size=function(){return this.nodes.length},Heap.prototype.clone=function(){var e;return(e=new Heap).nodes=this.nodes.slice(0),e},Heap.prototype.toArray=function(){return this.nodes.slice(0)},Heap.prototype.insert=Heap.prototype.push,Heap.prototype.top=Heap.prototype.peek,Heap.prototype.front=Heap.prototype.peek,Heap.prototype.has=Heap.prototype.contains,Heap.prototype.copy=Heap.prototype.clone,Heap}(),r.exports=e}).call(e)}(t);var n=t.exports;var o=function arrayMap$4(e,r){for(var t=-1,n=null==e?0:e.length,o=Array(n);++t<n;)o[t]=r(e[t],t,e);return o},a="object"==typeof e&&e&&e.Object===Object&&e,i=a,s="object"==typeof self&&self&&self.Object===Object&&self,c=i||s||Function("return this")(),u=c.Symbol,l=u,p=Object.prototype,f=p.hasOwnProperty,d=p.toString,h=l?l.toStringTag:void 0;var g=function getRawTag$1(e){var r=f.call(e,h),t=e[h];try{e[h]=void 0;var n=!0}catch(e){}var o=d.call(e);return n&&(r?e[h]=t:delete e[h]),o},v=Object.prototype.toString;var y=g,m=function objectToString$1(e){return v.call(e)},x=u?u.toStringTag:void 0;var b=function baseGetTag$5(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":x&&x in Object(e)?y(e):m(e)};var _=function isObject$2(e){var r=typeof e;return null!=e&&("object"==r||"function"==r)},w=b,$=_;var E,C=function isFunction$2(e){if(!$(e))return!1;var r=w(e);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r},j=c["__core-js_shared__"],k=(E=/[^.]+$/.exec(j&&j.keys&&j.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"";var S=function isMasked$1(e){return!!k&&k in e},A=Function.prototype.toString;var O=function toSource$2(e){if(null!=e){try{return A.call(e)}catch(e){}try{return e+""}catch(e){}}return""},R=C,I=S,z=_,P=O,F=/^\[object .+?Constructor\]$/,N=Function.prototype,T=Object.prototype,H=N.toString,X=T.hasOwnProperty,L=RegExp("^"+H.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var M=function baseIsNative$1(e){return!(!z(e)||I(e))&&(R(e)?L:F).test(P(e))},U=function getValue$1(e,r){return null==e?void 0:e[r]};var D=function getNative$7(e,r){var t=U(e,r);return M(t)?t:void 0},B=D(Object,"create"),G=B;var q=function hashClear$1(){this.__data__=G?G(null):{},this.size=0};var Q=function hashDelete$1(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r},W=B,Y=Object.prototype.hasOwnProperty;var Z=function hashGet$1(e){var r=this.__data__;if(W){var t=r[e];return"__lodash_hash_undefined__"===t?void 0:t}return Y.call(r,e)?r[e]:void 0},V=B,K=Object.prototype.hasOwnProperty;var J=B;var ee=q,re=Q,te=Z,ne=function hashHas$1(e){var r=this.__data__;return V?void 0!==r[e]:K.call(r,e)},oe=function hashSet$1(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=J&&void 0===r?"__lodash_hash_undefined__":r,this};function Hash$1(e){var r=-1,t=null==e?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}Hash$1.prototype.clear=ee,Hash$1.prototype.delete=re,Hash$1.prototype.get=te,Hash$1.prototype.has=ne,Hash$1.prototype.set=oe;var ae=Hash$1;var ie=function listCacheClear$1(){this.__data__=[],this.size=0};var se=function eq$1(e,r){return e===r||e!=e&&r!=r};var ce=function assocIndexOf$4(e,r){for(var t=e.length;t--;)if(se(e[t][0],r))return t;return-1},ue=ce,le=Array.prototype.splice;var pe=ce;var fe=ce;var de=ce;var he=ie,ge=function listCacheDelete$1(e){var r=this.__data__,t=ue(r,e);return!(t<0)&&(t==r.length-1?r.pop():le.call(r,t,1),--this.size,!0)},ve=function listCacheGet$1(e){var r=this.__data__,t=pe(r,e);return t<0?void 0:r[t][1]},ye=function listCacheHas$1(e){return fe(this.__data__,e)>-1},me=function listCacheSet$1(e,r){var t=this.__data__,n=de(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this};function ListCache$1(e){var r=-1,t=null==e?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}ListCache$1.prototype.clear=he,ListCache$1.prototype.delete=ge,ListCache$1.prototype.get=ve,ListCache$1.prototype.has=ye,ListCache$1.prototype.set=me;var xe=ListCache$1,be=D(c,"Map"),_e=ae,we=xe,$e=be;var Ee=function isKeyable$1(e){var r=typeof e;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e};var Ce=function getMapData$4(e,r){var t=e.__data__;return Ee(r)?t["string"==typeof r?"string":"hash"]:t.map},je=Ce;var ke=Ce;var Se=Ce;var Ae=Ce;var Oe=function mapCacheClear$1(){this.size=0,this.__data__={hash:new _e,map:new($e||we),string:new _e}},Re=function mapCacheDelete$1(e){var r=je(this,e).delete(e);return this.size-=r?1:0,r},Ie=function mapCacheGet$1(e){return ke(this,e).get(e)},ze=function mapCacheHas$1(e){return Se(this,e).has(e)},Pe=function mapCacheSet$1(e,r){var t=Ae(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this};function MapCache$1(e){var r=-1,t=null==e?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}MapCache$1.prototype.clear=Oe,MapCache$1.prototype.delete=Re,MapCache$1.prototype.get=Ie,MapCache$1.prototype.has=ze,MapCache$1.prototype.set=Pe;var Fe=MapCache$1,Ne=function setCacheAdd$1(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Te=function setCacheHas$1(e){return this.__data__.has(e)};function SetCache$3(e){var r=-1,t=null==e?0:e.length;for(this.__data__=new Fe;++r<t;)this.add(e[r])}SetCache$3.prototype.add=SetCache$3.prototype.push=Ne,SetCache$3.prototype.has=Te;var He=SetCache$3;var Xe=function baseFindIndex$1(e,r,t,n){for(var o=e.length,a=t+(n?1:-1);n?a--:++a<o;)if(r(e[a],a,e))return a;return-1},Le=function baseIsNaN$1(e){return e!=e},Me=function strictIndexOf$1(e,r,t){for(var n=t-1,o=e.length;++n<o;)if(e[n]===r)return n;return-1};var Ue=function baseIndexOf$1(e,r,t){return r==r?Me(e,r,t):Xe(e,Le,t)};var De=function arrayIncludes$3(e,r){return!!(null==e?0:e.length)&&Ue(e,r,0)>-1};var Be=function arrayIncludesWith$3(e,r,t){for(var n=-1,o=null==e?0:e.length;++n<o;)if(t(r,e[n]))return!0;return!1};var Ge=function baseUnary$3(e){return function(r){return e(r)}};var qe=function cacheHas$3(e,r){return e.has(r)},Qe=He,We=De,Ye=Be,Ze=o,Ve=Ge,Ke=qe,Je=Math.min;var er=function baseIntersection$1(e,r,t){for(var n=t?Ye:We,o=e[0].length,a=e.length,i=a,s=Array(a),c=1/0,u=[];i--;){var l=e[i];i&&r&&(l=Ze(l,Ve(r))),c=Je(l.length,c),s[i]=!t&&(r||o>=120&&l.length>=120)?new Qe(i&&l):void 0}l=e[0];var p=-1,f=s[0];e:for(;++p<o&&u.length<c;){var d=l[p],h=r?r(d):d;if(d=t||0!==d?d:0,!(f?Ke(f,h):n(u,h,t))){for(i=a;--i;){var g=s[i];if(!(g?Ke(g,h):n(e[i],h,t)))continue e}f&&f.push(h),u.push(d)}}return u};var rr=function identity$2(e){return e};var tr=function apply$1(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)},nr=Math.max;var or=function overRest$1(e,r,t){return r=nr(void 0===r?e.length-1:r,0),function(){for(var n=arguments,o=-1,a=nr(n.length-r,0),i=Array(a);++o<a;)i[o]=n[r+o];o=-1;for(var s=Array(r+1);++o<r;)s[o]=n[o];return s[r]=t(i),tr(e,this,s)}};var ar=function constant$1(e){return function(){return e}},ir=D,sr=function(){try{var e=ir(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),cr=ar,ur=sr,lr=ur?function(e,r){return ur(e,"toString",{configurable:!0,enumerable:!1,value:cr(r),writable:!0})}:rr,pr=Date.now;var fr=function shortOut$1(e){var r=0,t=0;return function(){var n=pr(),o=16-(n-t);if(t=n,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}},dr=fr(lr),hr=rr,gr=or,vr=dr;var yr=function baseRest$2(e,r){return vr(gr(e,r,hr),e+"")};var mr=function isLength$2(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},xr=C,br=mr;var _r=function isArrayLike$3(e){return null!=e&&br(e.length)&&!xr(e)};var wr=function isObjectLike$5(e){return null!=e&&"object"==typeof e},$r=_r,Er=wr;var Cr=function isArrayLikeObject$2(e){return Er(e)&&$r(e)},jr=Cr;var kr=o,Sr=er,Ar=function castArrayLikeObject$1(e){return jr(e)?e:[]},Or=yr((function(e){var r=kr(e,Ar);return r.length&&r[0]===e[0]?Sr(r):[]})),Rr=He,Ir=De,zr=Be,Pr=o,Fr=Ge,Nr=qe;var Tr=function baseDifference$1(e,r,t,n){var o=-1,a=Ir,i=!0,s=e.length,c=[],u=r.length;if(!s)return c;t&&(r=Pr(r,Fr(t))),n?(a=zr,i=!1):r.length>=200&&(a=Nr,i=!1,r=new Rr(r));e:for(;++o<s;){var l=e[o],p=null==t?l:t(l);if(l=n||0!==l?l:0,i&&p==p){for(var f=u;f--;)if(r[f]===p)continue e;c.push(l)}else a(r,p,n)||c.push(l)}return c};var Hr=function arrayPush$1(e,r){for(var t=-1,n=r.length,o=e.length;++t<n;)e[o+t]=r[t];return e},Xr=b,Lr=wr;var Mr=function baseIsArguments$1(e){return Lr(e)&&"[object Arguments]"==Xr(e)},Ur=wr,Dr=Object.prototype,Br=Dr.hasOwnProperty,Gr=Dr.propertyIsEnumerable,qr=Mr(function(){return arguments}())?Mr:function(e){return Ur(e)&&Br.call(e,"callee")&&!Gr.call(e,"callee")},Qr=qr,Wr=Array.isArray,Yr=Qr,Zr=Wr,Vr=u?u.isConcatSpreadable:void 0;var Kr=Hr,Jr=function isFlattenable$1(e){return Zr(e)||Yr(e)||!!(Vr&&e&&e[Vr])};var et=function baseFlatten$1(e,r,t,n,o){var a=-1,i=e.length;for(t||(t=Jr),o||(o=[]);++a<i;){var s=e[a];r>0&&t(s)?r>1?baseFlatten$1(s,r-1,t,n,o):Kr(o,s):n||(o[o.length]=s)}return o},rt=Tr,tt=et,nt=Cr,ot=yr((function(e,r){return nt(e)?rt(e,tt(r,1,nt,!0)):[]})),at=ot,it=D(c,"Set");var st=function setToArray$3(e){var r=-1,t=Array(e.size);return e.forEach((function(e){t[++r]=e})),t},ct=it,ut=function noop$1(){},lt=ct&&1/st(new ct([,-0]))[1]==1/0?function(e){return new ct(e)}:ut,pt=He,ft=De,dt=Be,ht=qe,gt=lt,vt=st;var yt=function baseUniq$1(e,r,t){var n=-1,o=ft,a=e.length,i=!0,s=[],c=s;if(t)i=!1,o=dt;else if(a>=200){var u=r?null:gt(e);if(u)return vt(u);i=!1,o=ht,c=new pt}else c=r?[]:s;e:for(;++n<a;){var l=e[n],p=r?r(l):l;if(l=t||0!==l?l:0,i&&p==p){for(var f=c.length;f--;)if(c[f]===p)continue e;r&&c.push(p),s.push(l)}else o(c,p,t)||(c!==s&&c.push(p),s.push(l))}return s};var mt=function uniq(e){return e&&e.length?yt(e):[]};var xt=function copyArray$1(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r},bt=D(c,"DataView"),_t=be,wt=D(c,"Promise"),$t=it,Et=D(c,"WeakMap"),Ct=b,jt=O,kt="[object Map]",St="[object Promise]",At="[object Set]",Ot="[object WeakMap]",Rt="[object DataView]",It=jt(bt),zt=jt(_t),Pt=jt(wt),Ft=jt($t),Nt=jt(Et),Tt=Ct;(bt&&Tt(new bt(new ArrayBuffer(1)))!=Rt||_t&&Tt(new _t)!=kt||wt&&Tt(wt.resolve())!=St||$t&&Tt(new $t)!=At||Et&&Tt(new Et)!=Ot)&&(Tt=function(e){var r=Ct(e),t="[object Object]"==r?e.constructor:void 0,n=t?jt(t):"";if(n)switch(n){case It:return Rt;case zt:return kt;case Pt:return St;case Ft:return At;case Nt:return Ot}return r});var Ht=Tt,Xt=b,Lt=Wr,Mt=wr;var Ut=function isString$1(e){return"string"==typeof e||!Lt(e)&&Mt(e)&&"[object String]"==Xt(e)};var Dt=function iteratorToArray$1(e){for(var r,t=[];!(r=e.next()).done;)t.push(r.value);return t};var Bt=function mapToArray$1(e){var r=-1,t=Array(e.size);return e.forEach((function(e,n){t[++r]=[n,e]})),t};var Gt=function asciiToArray$1(e){return e.split("")},qt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Qt=function hasUnicode$1(e){return qt.test(e)},Wt="[\\ud800-\\udfff]",Yt="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Zt="\\ud83c[\\udffb-\\udfff]",Vt="[^\\ud800-\\udfff]",Kt="(?:\\ud83c[\\udde6-\\uddff]){2}",Jt="[\\ud800-\\udbff][\\udc00-\\udfff]",en="(?:"+Yt+"|"+Zt+")"+"?",rn="[\\ufe0e\\ufe0f]?",tn=rn+en+("(?:\\u200d(?:"+[Vt,Kt,Jt].join("|")+")"+rn+en+")*"),nn="(?:"+[Vt+Yt+"?",Yt,Kt,Jt,Wt].join("|")+")",on=RegExp(Zt+"(?="+Zt+")|"+nn+tn,"g");var an=Gt,sn=Qt,cn=function unicodeToArray$1(e){return e.match(on)||[]};var un=function stringToArray$1(e){return sn(e)?cn(e):an(e)},ln=o;var pn=function baseValues$1(e,r){return ln(r,(function(r){return e[r]}))};var fn=function baseTimes$1(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n},dn={exports:{}};var hn=function stubFalse(){return!1};!function(e,r){var t=c,n=hn,o=r&&!r.nodeType&&r,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?t.Buffer:void 0,s=(i?i.isBuffer:void 0)||n;e.exports=s}(dn,dn.exports);var gn=/^(?:0|[1-9]\d*)$/;var vn=function isIndex$1(e,r){var t=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==t||"symbol"!=t&&gn.test(e))&&e>-1&&e%1==0&&e<r},yn=b,mn=mr,xn=wr,bn={};bn["[object Float32Array]"]=bn["[object Float64Array]"]=bn["[object Int8Array]"]=bn["[object Int16Array]"]=bn["[object Int32Array]"]=bn["[object Uint8Array]"]=bn["[object Uint8ClampedArray]"]=bn["[object Uint16Array]"]=bn["[object Uint32Array]"]=!0,bn["[object Arguments]"]=bn["[object Array]"]=bn["[object ArrayBuffer]"]=bn["[object Boolean]"]=bn["[object DataView]"]=bn["[object Date]"]=bn["[object Error]"]=bn["[object Function]"]=bn["[object Map]"]=bn["[object Number]"]=bn["[object Object]"]=bn["[object RegExp]"]=bn["[object Set]"]=bn["[object String]"]=bn["[object WeakMap]"]=!1;var _n=function baseIsTypedArray$1(e){return xn(e)&&mn(e.length)&&!!bn[yn(e)]},wn={exports:{}};!function(e,r){var t=a,n=r&&!r.nodeType&&r,o=n&&e&&!e.nodeType&&e,i=o&&o.exports===n&&t.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=s}(wn,wn.exports);var $n=_n,En=Ge,Cn=wn.exports,jn=Cn&&Cn.isTypedArray,kn=jn?En(jn):$n,Sn=fn,An=Qr,On=Wr,Rn=dn.exports,In=vn,zn=kn,Pn=Object.prototype.hasOwnProperty;var Fn=function arrayLikeKeys$1(e,r){var t=On(e),n=!t&&An(e),o=!t&&!n&&Rn(e),a=!t&&!n&&!o&&zn(e),i=t||n||o||a,s=i?Sn(e.length,String):[],c=s.length;for(var u in e)!r&&!Pn.call(e,u)||i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||In(u,c))||s.push(u);return s},Nn=Object.prototype;var Tn=function isPrototype$1(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||Nn)};var Hn=function overArg$1(e,r){return function(t){return e(r(t))}}(Object.keys,Object),Xn=Tn,Ln=Hn,Mn=Object.prototype.hasOwnProperty;var Un=Fn,Dn=function baseKeys$1(e){if(!Xn(e))return Ln(e);var r=[];for(var t in Object(e))Mn.call(e,t)&&"constructor"!=t&&r.push(t);return r},Bn=_r;var Gn=pn,qn=function keys$1(e){return Bn(e)?Un(e):Dn(e)};var Qn=xt,Wn=Ht,Yn=_r,Zn=Ut,Vn=Dt,Kn=Bt,Jn=st,eo=un,ro=function values$1(e){return null==e?[]:Gn(e,qn(e))},to=u?u.iterator:void 0;var no,oo=function toArray(e){if(!e)return[];if(Yn(e))return Zn(e)?eo(e):Qn(e);if(to&&e[to])return Vn(e[to]());var r=Wn(e);return("[object Map]"==r?Kn:"[object Set]"==r?Jn:ro)(e)}; | ||
| /*! https://mths.be/codepointat v0.2.0 by @mathias */String.prototype.codePointAt||function(){var e=function(){try{var e={},r=Object.defineProperty,t=r(e,e,e)&&r}catch(e){}return t}(),codePointAt=function(e){if(null==this)throw TypeError();var r=String(this),t=r.length,n=e?Number(e):0;if(n!=n&&(n=0),!(n<0||n>=t)){var o,a=r.charCodeAt(n);return a>=55296&&a<=56319&&t>n+1&&(o=r.charCodeAt(n+1))>=56320&&o<=57343?1024*(a-55296)+o-56320+65536:a}};e?e(String.prototype,"codePointAt",{value:codePointAt,configurable:!0,writable:!0}):String.prototype.codePointAt=codePointAt}() | ||
| /*! http://mths.be/fromcodepoint v0.2.1 by @mathias */,String.fromCodePoint||function(){var e=function(){try{var e={},r=Object.defineProperty,t=r(e,e,e)&&r}catch(e){}return t}(),r=String.fromCharCode,t=Math.floor,fromCodePoint=function(e){var n,o,a=16384,i=[],s=-1,c=arguments.length;if(!c)return"";for(var u="";++s<c;){var l=Number(arguments[s]);if(!isFinite(l)||l<0||l>1114111||t(l)!=l)throw RangeError("Invalid code point: "+l);l<=65535?i.push(l):(n=55296+((l-=65536)>>10),o=l%1024+56320,i.push(n,o)),(s+1==c||i.length>a)&&(u+=r.apply(null,i),i.length=0)}return u};e?e(String,"fromCodePoint",{value:fromCodePoint,configurable:!0,writable:!0}):String.fromCodePoint=fromCodePoint}();try{no="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(e){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var ao,io=function leven(e,r,t,n){var o=[],a=[],i=t&&no&&t.useCollator,s=1;if(t&&t.subcost&&"number"==typeof t.subcost&&(s=t.subcost),e===r)return 0;var c,u,l,p,f=n(e),d=n(r),h=f.length,g=d.length;if(0===h)return g;if(0===g)return h;for(var v=0,y=0;v<h;)a[v]=f[v].codePointAt(0),o[v]=++v;if(i)for(;y<g;)for(c=d[y].codePointAt(0),l=y++,u=y,v=0;v<h;v++)p=0===no.compare(String.fromCodePoint(c),String.fromCodePoint(a[v]))?l:l+s,l=o[v],u=o[v]=l>u?p>u?u+1:p:p>l?l+1:p;else for(;y<g;)for(c=d[y].codePointAt(0),l=y++,u=y,v=0;v<h;v++)p=c===a[v]?l:l+s,l=o[v],u=o[v]=l>u?p>u?u+1:p:p>l?l+1:p;return u};try{ao="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(e){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var so,co=function leven(e,r,t,n){var o=[],a=[],i=t&&ao&&t.useCollator,s=1;if(t&&t.subcost&&"number"==typeof t.subcost&&(s=t.subcost),e===r)return 0;var c=e.length,u=r.length;if(0===c)return u;if(0===u)return c;if(t&&t.wildcards&&"string"==typeof t.wildcards&&t.wildcards.length>0){var l,p,f,d,h,g;if(!1===t.full_process&&!0!==t.processed){p=(l=t.wildcards[0]).charCodeAt(0);var v="["+function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(t.wildcards)+"]";if((e=e.replace(new RegExp(v,"g"),l))===(r=r.replace(new RegExp(v,"g"),l)))return 0}else p=(l=t.wildcards[0].toLowerCase()).charCodeAt(0);for(var y=0,m=0;y<c;)a[y]=e.charCodeAt(y),o[y]=++y;if(i)for(;m<u;)for(f=r.charCodeAt(m),h=m++,d=m,y=0;y<c;y++)g=0===ao.compare(String.fromCharCode(f),String.fromCharCode(a[y]))||f===p||a[y]===p?h:h+s,h=o[y],d=o[y]=h>d?g>d?d+1:g:g>h?h+1:g;else for(;m<u;)for(f=r.charCodeAt(m),h=m++,d=m,y=0;y<c;y++)g=f===a[y]||f===p||a[y]===p?h:h+s,h=o[y],d=o[y]=h>d?g>d?d+1:g:g>h?h+1:g;return d}return n(e,r,t)};try{so="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(e){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var uo=function leven(e,r,t){var n=[],o=[],a=t&&so&&t.useCollator,i=1;if(t&&t.subcost&&"number"==typeof t.subcost&&(i=t.subcost),e===r)return 0;var s,c,u,l,p=e.length,f=r.length;if(0===p)return f;if(0===f)return p;for(var d=0,h=0;d<p;)o[d]=e.charCodeAt(d),n[d]=++d;if(a)for(;h<f;)for(s=r.charCodeAt(h),u=h++,c=h,d=0;d<p;d++)l=0===so.compare(String.fromCharCode(s),String.fromCharCode(o[d]))?u:u+i,u=n[d],c=n[d]=u>c?l>c?c+1:l:l>u?u+1:l;else for(;h<f;)for(s=r.charCodeAt(h),u=h++,c=h,d=0;d<p;d++)l=s===o[d]?u:u+i,u=n[d],c=n[d]=u>c?l>c?c+1:l:l>u?u+1:l;return c};!function(e,r){if(!e.setImmediate){var t,n=1,o={},a=!1,i=e.document,s=Object.getPrototypeOf&&Object.getPrototypeOf(e);s=s&&s.setTimeout?s:e,"[object process]"==={}.toString.call(e.process)?function installNextTickImplementation(){t=function(e){process.nextTick((function(){runIfPresent(e)}))}}():!function canUsePostMessage(){if(e.postMessage&&!e.importScripts){var r=!0,t=e.onmessage;return e.onmessage=function(){r=!1},e.postMessage("","*"),e.onmessage=t,r}}()?e.MessageChannel?function installMessageChannelImplementation(){var e=new MessageChannel;e.port1.onmessage=function(e){runIfPresent(e.data)},t=function(r){e.port2.postMessage(r)}}():i&&"onreadystatechange"in i.createElement("script")?function installReadyStateChangeImplementation(){var e=i.documentElement;t=function(r){var t=i.createElement("script");t.onreadystatechange=function(){runIfPresent(r),t.onreadystatechange=null,e.removeChild(t),t=null},e.appendChild(t)}}():function installSetTimeoutImplementation(){t=function(e){setTimeout(runIfPresent,0,e)}}():function installPostMessageImplementation(){var r="setImmediate$"+Math.random()+"$",onGlobalMessage=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(r)&&runIfPresent(+t.data.slice(r.length))};e.addEventListener?e.addEventListener("message",onGlobalMessage,!1):e.attachEvent("onmessage",onGlobalMessage),t=function(t){e.postMessage(r+t,"*")}}(),s.setImmediate=function setImmediate(e){"function"!=typeof e&&(e=new Function(""+e));for(var r=new Array(arguments.length-1),a=0;a<r.length;a++)r[a]=arguments[a+1];var i={callback:e,args:r};return o[n]=i,t(n),n++},s.clearImmediate=clearImmediate}function clearImmediate(e){delete o[e]}function runIfPresent(e){if(a)setTimeout(runIfPresent,0,e);else{var r=o[e];if(r){a=!0;try{!function run(e){var r=e.callback,t=e.args;switch(t.length){case 0:r();break;case 1:r(t[0]);break;case 2:r(t[0],t[1]);break;case 3:r(t[0],t[1],t[2]);break;default:r.apply(void 0,t)}}(r)}finally{clearImmediate(e),a=!1}}}}}("undefined"==typeof self?e:self); | ||
| /*! | ||
@@ -16,3 +9,3 @@ * XRegExp 3.1.1-next | ||
| */ | ||
| var K={astral:!1,natives:!1},ee={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},te={},re={},ne={},oe=[],ae="default",ie="class",se={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},ce=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,le=void 0===ee.exec.call(/()??/,"")[1],ue=void 0!==/x/.flags,fe={}.toString;function hasNativeFlag(C){var N=!0;try{new RegExp("",C)}catch(C){N=!1}return N&&"y"===C?new RegExp("aa|.","y").test("b"):N}var pe=hasNativeFlag("u"),de=hasNativeFlag("y"),he={g:!0,i:!0,m:!0,u:pe,y:de};function augment(C,N,X,H,U){var q;if(C.xregexp={captureNames:N},U)return C;if(C.__proto__)C.__proto__=XRegExp$1.prototype;else for(q in XRegExp$1.prototype)C[q]=XRegExp$1.prototype[q];return C.xregexp.source=X,C.xregexp.flags=H?H.split("").sort().join(""):H,C}function clipDuplicates(C){return ee.replace.call(C,/([\s\S])(?=[\s\S]*\1)/g,"")}function copyRegex(C,N){if(!XRegExp$1.isRegExp(C))throw new TypeError("Type RegExp expected");var X=C.xregexp||{},H=function getNativeFlags(C){return ue?C.flags:ee.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(C))[1]}(C),U="",q="",W=null,G=null;return(N=N||{}).removeG&&(q+="g"),N.removeY&&(q+="y"),q&&(H=ee.replace.call(H,new RegExp("["+q+"]+","g"),"")),N.addG&&(U+="g"),N.addY&&(U+="y"),U&&(H=clipDuplicates(H+U)),N.isInternalOnly||(void 0!==X.source&&(W=X.source),null!=X.flags&&(G=U?clipDuplicates(X.flags+U):X.flags)),C=augment(new RegExp(N.source||C.source,H),function hasNamedCapture(C){return!(!C.xregexp||!C.xregexp.captureNames)}(C)?X.captureNames.slice(0):null,W,G,N.isInternalOnly)}function dec(C){return parseInt(C,16)}function hex(C){return parseInt(C,10).toString(16)}function indexOf(C,N){var X,H=C.length;for(X=0;X<H;++X)if(C[X]===N)return X;return-1}function isQuantifierNext(C,N,X){return ee.test.call(X.indexOf("x")>-1?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,C.slice(N))}function pad4(C){for(;C.length<4;)C="0"+C;return C}function registerFlag(C){if(!/^[\w$]$/.test(C))throw new Error("Flag must be a single character A-Za-z0-9_$");he[C]=!0}function runTokens(C,N,X,H,U){for(var q,W,G=oe.length,Q=C.charAt(X),Y=null;G--;)if(!((W=oe[G]).leadChar&&W.leadChar!==Q||W.scope!==H&&"all"!==W.scope||W.flag&&-1===N.indexOf(W.flag))&&(q=XRegExp$1.exec(C,W.regex,X,"sticky"))){Y={matchLength:q[0].length,output:W.handler.call(U,q,H,N),reparse:W.reparse};break}return Y}function XRegExp$1(C,N){if(XRegExp$1.isRegExp(C)){if(void 0!==N)throw new TypeError("Cannot supply flags when copying a RegExp");return copyRegex(C)}if(C=void 0===C?"":String(C),N=void 0===N?"":String(N),XRegExp$1.isInstalled("astral")&&-1===N.indexOf("A")&&(N+="A"),ne[C]||(ne[C]={}),!ne[C][N]){for(var X,H={hasNamedCapture:!1,captureNames:[]},U=ae,q="",W=0,G=function prepareFlags(C,N){var X;if(clipDuplicates(N)!==N)throw new SyntaxError("Invalid duplicate regex flag "+N);for(C=ee.replace.call(C,/^\(\?([\w$]+)\)/,(function(C,X){if(ee.test.call(/[gy]/,X))throw new SyntaxError("Cannot use flag g or y in mode modifier "+C);return N=clipDuplicates(N+X),""})),X=0;X<N.length;++X)if(!he[N.charAt(X)])throw new SyntaxError("Unknown regex flag "+N.charAt(X));return{pattern:C,flags:N}}(C,N),Q=G.pattern,Y=G.flags;W<Q.length;){do{(X=runTokens(Q,Y,W,U,H))&&X.reparse&&(Q=Q.slice(0,W)+X.output+Q.slice(W+X.matchLength))}while(X&&X.reparse);if(X)q+=X.output,W+=X.matchLength||1;else{var Z=XRegExp$1.exec(Q,se[U],W,"sticky")[0];q+=Z,W+=Z.length,"["===Z&&U===ae?U=ie:"]"===Z&&U===ie&&(U=ae)}}ne[C][N]={pattern:ee.replace.call(q,/(?:\(\?:\))+/g,"(?:)"),flags:ee.replace.call(Y,/[^gimuy]+/g,""),captures:H.hasNamedCapture?H.captureNames:null}}var V=ne[C][N];return augment(new RegExp(V.pattern,V.flags),V.captures,C,N)}XRegExp$1.prototype=new RegExp,XRegExp$1.version="3.1.1-next",XRegExp$1._clipDuplicates=clipDuplicates,XRegExp$1._hasNativeFlag=hasNativeFlag,XRegExp$1._dec=dec,XRegExp$1._hex=hex,XRegExp$1._pad4=pad4,XRegExp$1.addToken=function(C,N,X){var H,U=(X=X||{}).optionalFlags;if(X.flag&®isterFlag(X.flag),U)for(U=ee.split.call(U,""),H=0;H<U.length;++H)registerFlag(U[H]);oe.push({regex:copyRegex(C,{addG:!0,addY:de,isInternalOnly:!0}),handler:N,scope:X.scope||ae,flag:X.flag,reparse:X.reparse,leadChar:X.leadChar}),XRegExp$1.cache.flush("patterns")},XRegExp$1.cache=function(C,N){return re[C]||(re[C]={}),re[C][N]||(re[C][N]=XRegExp$1(C,N))},XRegExp$1.cache.flush=function(C){"patterns"===C?ne={}:re={}},XRegExp$1.exec=function(C,N,X,H){var U,q,W,G="g",Q=!1;return(U=de&&!!(H||N.sticky&&!1!==H))?G+="y":H&&(Q=!0,G+="FakeY"),N.xregexp=N.xregexp||{},X=X||0,(W=N.xregexp[G]||(N.xregexp[G]=copyRegex(N,{addG:!0,addY:U,source:Q?N.source+"|()":void 0,removeY:!1===H,isInternalOnly:!0}))).lastIndex=X,q=te.exec.call(W,C),Q&&q&&""===q.pop()&&(q=null),N.global&&(N.lastIndex=q?W.lastIndex:0),q},XRegExp$1.isInstalled=function(C){return!!K[C]},XRegExp$1.isRegExp=function(C){return"[object RegExp]"===fe.call(C)},XRegExp$1.replace=function(C,N,X,H){var U,q=XRegExp$1.isRegExp(N),W=N.global&&"one"!==H||"all"===H,G=(W?"g":"")+(N.sticky?"y":"")||"noGY",Q=N;return q?(N.xregexp=N.xregexp||{},Q=N.xregexp[G]||(N.xregexp[G]=copyRegex(N,{addG:!!W,removeG:"one"===H,isInternalOnly:!0}))):W&&(Q=new RegExp(XRegExp$1.escape(String(N)),"g")),U=te.replace.call(function toObject(C){if(null==C)throw new TypeError("Cannot convert null or undefined to object");return C}(C),Q,X),q&&N.global&&(N.lastIndex=0),U},te.exec=function(C){var N,X,H,U=this.lastIndex,q=ee.exec.apply(this,arguments);if(q){if(!le&&q.length>1&&indexOf(q,"")>-1&&(X=copyRegex(this,{removeG:!0,isInternalOnly:!0}),ee.replace.call(String(C).slice(q.index),X,(function(){var C,N=arguments.length;for(C=1;C<N-2;++C)void 0===arguments[C]&&(q[C]=void 0)}))),this.xregexp&&this.xregexp.captureNames)for(H=1;H<q.length;++H)(N=this.xregexp.captureNames[H-1])&&(q[N]=q[H]);this.global&&!q[0].length&&this.lastIndex>q.index&&(this.lastIndex=q.index)}return this.global||(this.lastIndex=U),q},te.replace=function(C,N){var X,H,U,q=XRegExp$1.isRegExp(C);return q?(C.xregexp&&(H=C.xregexp.captureNames),X=C.lastIndex):C+="",U=function isType(C,N){return fe.call(C)==="[object "+N+"]"}(N,"Function")?ee.replace.call(String(this),C,(function(){var X,U=arguments;if(H)for(U[0]=new String(U[0]),X=0;X<H.length;++X)H[X]&&(U[0][H[X]]=U[X+1]);return q&&C.global&&(C.lastIndex=U[U.length-2]+U[0].length),N.apply(void 0,U)})):ee.replace.call(null==this?this:String(this),C,(function(){var C=arguments;return ee.replace.call(String(N),ce,(function(N,X,U){var q;if(X){if((q=+X)<=C.length-3)return C[q]||"";if((q=H?indexOf(H,X):-1)<0)throw new SyntaxError("Backreference to undefined group "+N);return C[q+1]||""}if("$"===U)return"$";if("&"===U||0==+U)return C[0];if("`"===U)return C[C.length-1].slice(0,C[C.length-2]);if("'"===U)return C[C.length-1].slice(C[C.length-2]+C[0].length);if(U=+U,!isNaN(U)){if(U>C.length-3)throw new SyntaxError("Backreference to undefined group "+N);return C[U]||""}throw new SyntaxError("Invalid token "+N)}))})),q&&(C.global?C.lastIndex=0:C.lastIndex=X),U},te.split=function(C,N){if(!XRegExp$1.isRegExp(C))return ee.split.apply(this,arguments);var X,H=String(this),U=[],q=C.lastIndex,W=0;return N=(void 0===N?-1:N)>>>0,XRegExp$1.forEach(H,C,(function(C){C.index+C[0].length>W&&(U.push(H.slice(W,C.index)),C.length>1&&C.index<H.length&&Array.prototype.push.apply(U,C.slice(1)),X=C[0].length,W=C.index+X)})),W===H.length?ee.test.call(C,"")&&!X||U.push(""):U.push(H.slice(W)),C.lastIndex=q,U.length>N?U.slice(0,N):U},XRegExp$1.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,(function(C,N){if("B"===C[1]&&N===ae)return C[0];throw new SyntaxError("Invalid escape "+C[0])}),{scope:"all",leadChar:"\\"}),XRegExp$1.addToken(/\\u{([\dA-Fa-f]+)}/,(function(C,N,X){var H=dec(C[1]);if(H>1114111)throw new SyntaxError("Invalid Unicode code point "+C[0]);if(H<=65535)return"\\u"+pad4(hex(H));if(pe&&X.indexOf("u")>-1)return C[0];throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u")}),{scope:"all",leadChar:"\\"}),XRegExp$1.addToken(/\[(\^?)\]/,(function(C){return C[1]?"[\\s\\S]":"\\b\\B"}),{leadChar:"["}),XRegExp$1.addToken(/\(\?#[^)]*\)/,(function(C,N,X){return isQuantifierNext(C.input,C.index+C[0].length,X)?"":"(?:)"}),{leadChar:"("}),XRegExp$1.addToken(/\s+|#[^\n]*\n?/,(function(C,N,X){return isQuantifierNext(C.input,C.index+C[0].length,X)?"":"(?:)"}),{flag:"x"}),XRegExp$1.addToken(/\./,(function(){return"[\\s\\S]"}),{flag:"s",leadChar:"."}),XRegExp$1.addToken(/\\k<([\w$]+)>/,(function(C){var N=isNaN(C[1])?indexOf(this.captureNames,C[1])+1:+C[1],X=C.index+C[0].length;if(!N||N>this.captureNames.length)throw new SyntaxError("Backreference to undefined group "+C[0]);return"\\"+N+(X===C.input.length||isNaN(C.input.charAt(X))?"":"(?:)")}),{leadChar:"\\"}),XRegExp$1.addToken(/\\(\d+)/,(function(C,N){if(!(N===ae&&/^[1-9]/.test(C[1])&&+C[1]<=this.captureNames.length)&&"0"!==C[1])throw new SyntaxError("Cannot use octal escape or backreference to undefined group "+C[0]);return C[0]}),{scope:"all",leadChar:"\\"}),XRegExp$1.addToken(/\(\?P?<([\w$]+)>/,(function(C){if(!isNaN(C[1]))throw new SyntaxError("Cannot use integer as capture name "+C[0]);if("length"===C[1]||"__proto__"===C[1])throw new SyntaxError("Cannot use reserved word as capture name "+C[0]);if(indexOf(this.captureNames,C[1])>-1)throw new SyntaxError("Cannot use same name for multiple groups "+C[0]);return this.captureNames.push(C[1]),this.hasNamedCapture=!0,"("}),{leadChar:"("}),XRegExp$1.addToken(/\((?!\?)/,(function(C,N,X){return X.indexOf("n")>-1?"(?:":(this.captureNames.push(null),"(")}),{optionalFlags:"n",leadChar:"("});var ge=XRegExp$1; | ||
| var lo={astral:!1,natives:!1},po={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},fo={},ho={},go={},vo=[],yo="default",mo="class",xo={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},bo=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,_o=void 0===po.exec.call(/()??/,"")[1],wo=void 0!==/x/.flags,$o={}.toString;function hasNativeFlag(e){var r=!0;try{new RegExp("",e)}catch(e){r=!1}return r&&"y"===e?new RegExp("aa|.","y").test("b"):r}var Eo=hasNativeFlag("u"),Co=hasNativeFlag("y"),jo={g:!0,i:!0,m:!0,u:Eo,y:Co};function augment(e,r,t,n,o){var a;if(e.xregexp={captureNames:r},o)return e;if(e.__proto__)e.__proto__=XRegExp$1.prototype;else for(a in XRegExp$1.prototype)e[a]=XRegExp$1.prototype[a];return e.xregexp.source=t,e.xregexp.flags=n?n.split("").sort().join(""):n,e}function clipDuplicates(e){return po.replace.call(e,/([\s\S])(?=[\s\S]*\1)/g,"")}function copyRegex(e,r){if(!XRegExp$1.isRegExp(e))throw new TypeError("Type RegExp expected");var t=e.xregexp||{},n=function getNativeFlags(e){return wo?e.flags:po.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(e))[1]}(e),o="",a="",i=null,s=null;return(r=r||{}).removeG&&(a+="g"),r.removeY&&(a+="y"),a&&(n=po.replace.call(n,new RegExp("["+a+"]+","g"),"")),r.addG&&(o+="g"),r.addY&&(o+="y"),o&&(n=clipDuplicates(n+o)),r.isInternalOnly||(void 0!==t.source&&(i=t.source),null!=t.flags&&(s=o?clipDuplicates(t.flags+o):t.flags)),e=augment(new RegExp(r.source||e.source,n),function hasNamedCapture(e){return!(!e.xregexp||!e.xregexp.captureNames)}(e)?t.captureNames.slice(0):null,i,s,r.isInternalOnly)}function dec(e){return parseInt(e,16)}function hex(e){return parseInt(e,10).toString(16)}function indexOf(e,r){var t,n=e.length;for(t=0;t<n;++t)if(e[t]===r)return t;return-1}function isQuantifierNext(e,r,t){return po.test.call(t.indexOf("x")>-1?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,e.slice(r))}function pad4(e){for(;e.length<4;)e="0"+e;return e}function registerFlag(e){if(!/^[\w$]$/.test(e))throw new Error("Flag must be a single character A-Za-z0-9_$");jo[e]=!0}function runTokens(e,r,t,n,o){for(var a,i,s=vo.length,c=e.charAt(t),u=null;s--;)if(!((i=vo[s]).leadChar&&i.leadChar!==c||i.scope!==n&&"all"!==i.scope||i.flag&&-1===r.indexOf(i.flag))&&(a=XRegExp$1.exec(e,i.regex,t,"sticky"))){u={matchLength:a[0].length,output:i.handler.call(o,a,n,r),reparse:i.reparse};break}return u}function XRegExp$1(e,r){if(XRegExp$1.isRegExp(e)){if(void 0!==r)throw new TypeError("Cannot supply flags when copying a RegExp");return copyRegex(e)}if(e=void 0===e?"":String(e),r=void 0===r?"":String(r),XRegExp$1.isInstalled("astral")&&-1===r.indexOf("A")&&(r+="A"),go[e]||(go[e]={}),!go[e][r]){for(var t,n={hasNamedCapture:!1,captureNames:[]},o=yo,a="",i=0,s=function prepareFlags(e,r){var t;if(clipDuplicates(r)!==r)throw new SyntaxError("Invalid duplicate regex flag "+r);for(e=po.replace.call(e,/^\(\?([\w$]+)\)/,(function(e,t){if(po.test.call(/[gy]/,t))throw new SyntaxError("Cannot use flag g or y in mode modifier "+e);return r=clipDuplicates(r+t),""})),t=0;t<r.length;++t)if(!jo[r.charAt(t)])throw new SyntaxError("Unknown regex flag "+r.charAt(t));return{pattern:e,flags:r}}(e,r),c=s.pattern,u=s.flags;i<c.length;){do{(t=runTokens(c,u,i,o,n))&&t.reparse&&(c=c.slice(0,i)+t.output+c.slice(i+t.matchLength))}while(t&&t.reparse);if(t)a+=t.output,i+=t.matchLength||1;else{var l=XRegExp$1.exec(c,xo[o],i,"sticky")[0];a+=l,i+=l.length,"["===l&&o===yo?o=mo:"]"===l&&o===mo&&(o=yo)}}go[e][r]={pattern:po.replace.call(a,/(?:\(\?:\))+/g,"(?:)"),flags:po.replace.call(u,/[^gimuy]+/g,""),captures:n.hasNamedCapture?n.captureNames:null}}var p=go[e][r];return augment(new RegExp(p.pattern,p.flags),p.captures,e,r)}XRegExp$1.prototype=new RegExp,XRegExp$1.version="3.1.1-next",XRegExp$1._clipDuplicates=clipDuplicates,XRegExp$1._hasNativeFlag=hasNativeFlag,XRegExp$1._dec=dec,XRegExp$1._hex=hex,XRegExp$1._pad4=pad4,XRegExp$1.addToken=function(e,r,t){var n,o=(t=t||{}).optionalFlags;if(t.flag&®isterFlag(t.flag),o)for(o=po.split.call(o,""),n=0;n<o.length;++n)registerFlag(o[n]);vo.push({regex:copyRegex(e,{addG:!0,addY:Co,isInternalOnly:!0}),handler:r,scope:t.scope||yo,flag:t.flag,reparse:t.reparse,leadChar:t.leadChar}),XRegExp$1.cache.flush("patterns")},XRegExp$1.cache=function(e,r){return ho[e]||(ho[e]={}),ho[e][r]||(ho[e][r]=XRegExp$1(e,r))},XRegExp$1.cache.flush=function(e){"patterns"===e?go={}:ho={}},XRegExp$1.exec=function(e,r,t,n){var o,a,i,s="g",c=!1;return(o=Co&&!!(n||r.sticky&&!1!==n))?s+="y":n&&(c=!0,s+="FakeY"),r.xregexp=r.xregexp||{},t=t||0,(i=r.xregexp[s]||(r.xregexp[s]=copyRegex(r,{addG:!0,addY:o,source:c?r.source+"|()":void 0,removeY:!1===n,isInternalOnly:!0}))).lastIndex=t,a=fo.exec.call(i,e),c&&a&&""===a.pop()&&(a=null),r.global&&(r.lastIndex=a?i.lastIndex:0),a},XRegExp$1.isInstalled=function(e){return!!lo[e]},XRegExp$1.isRegExp=function(e){return"[object RegExp]"===$o.call(e)},XRegExp$1.replace=function(e,r,t,n){var o,a=XRegExp$1.isRegExp(r),i=r.global&&"one"!==n||"all"===n,s=(i?"g":"")+(r.sticky?"y":"")||"noGY",c=r;return a?(r.xregexp=r.xregexp||{},c=r.xregexp[s]||(r.xregexp[s]=copyRegex(r,{addG:!!i,removeG:"one"===n,isInternalOnly:!0}))):i&&(c=new RegExp(XRegExp$1.escape(String(r)),"g")),o=fo.replace.call(function toObject(e){if(null==e)throw new TypeError("Cannot convert null or undefined to object");return e}(e),c,t),a&&r.global&&(r.lastIndex=0),o},fo.exec=function(e){var r,t,n,o=this.lastIndex,a=po.exec.apply(this,arguments);if(a){if(!_o&&a.length>1&&indexOf(a,"")>-1&&(t=copyRegex(this,{removeG:!0,isInternalOnly:!0}),po.replace.call(String(e).slice(a.index),t,(function(){var e,r=arguments.length;for(e=1;e<r-2;++e)void 0===arguments[e]&&(a[e]=void 0)}))),this.xregexp&&this.xregexp.captureNames)for(n=1;n<a.length;++n)(r=this.xregexp.captureNames[n-1])&&(a[r]=a[n]);this.global&&!a[0].length&&this.lastIndex>a.index&&(this.lastIndex=a.index)}return this.global||(this.lastIndex=o),a},fo.replace=function(e,r){var t,n,o,a=XRegExp$1.isRegExp(e);return a?(e.xregexp&&(n=e.xregexp.captureNames),t=e.lastIndex):e+="",o=function isType(e,r){return $o.call(e)==="[object "+r+"]"}(r,"Function")?po.replace.call(String(this),e,(function(){var t,o=arguments;if(n)for(o[0]=new String(o[0]),t=0;t<n.length;++t)n[t]&&(o[0][n[t]]=o[t+1]);return a&&e.global&&(e.lastIndex=o[o.length-2]+o[0].length),r.apply(void 0,o)})):po.replace.call(null==this?this:String(this),e,(function(){var e=arguments;return po.replace.call(String(r),bo,(function(r,t,o){var a;if(t){if((a=+t)<=e.length-3)return e[a]||"";if((a=n?indexOf(n,t):-1)<0)throw new SyntaxError("Backreference to undefined group "+r);return e[a+1]||""}if("$"===o)return"$";if("&"===o||0==+o)return e[0];if("`"===o)return e[e.length-1].slice(0,e[e.length-2]);if("'"===o)return e[e.length-1].slice(e[e.length-2]+e[0].length);if(o=+o,!isNaN(o)){if(o>e.length-3)throw new SyntaxError("Backreference to undefined group "+r);return e[o]||""}throw new SyntaxError("Invalid token "+r)}))})),a&&(e.global?e.lastIndex=0:e.lastIndex=t),o},fo.split=function(e,r){if(!XRegExp$1.isRegExp(e))return po.split.apply(this,arguments);var t,n=String(this),o=[],a=e.lastIndex,i=0;return r=(void 0===r?-1:r)>>>0,XRegExp$1.forEach(n,e,(function(e){e.index+e[0].length>i&&(o.push(n.slice(i,e.index)),e.length>1&&e.index<n.length&&Array.prototype.push.apply(o,e.slice(1)),t=e[0].length,i=e.index+t)})),i===n.length?po.test.call(e,"")&&!t||o.push(""):o.push(n.slice(i)),e.lastIndex=a,o.length>r?o.slice(0,r):o},XRegExp$1.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,(function(e,r){if("B"===e[1]&&r===yo)return e[0];throw new SyntaxError("Invalid escape "+e[0])}),{scope:"all",leadChar:"\\"}),XRegExp$1.addToken(/\\u{([\dA-Fa-f]+)}/,(function(e,r,t){var n=dec(e[1]);if(n>1114111)throw new SyntaxError("Invalid Unicode code point "+e[0]);if(n<=65535)return"\\u"+pad4(hex(n));if(Eo&&t.indexOf("u")>-1)return e[0];throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u")}),{scope:"all",leadChar:"\\"}),XRegExp$1.addToken(/\[(\^?)\]/,(function(e){return e[1]?"[\\s\\S]":"\\b\\B"}),{leadChar:"["}),XRegExp$1.addToken(/\(\?#[^)]*\)/,(function(e,r,t){return isQuantifierNext(e.input,e.index+e[0].length,t)?"":"(?:)"}),{leadChar:"("}),XRegExp$1.addToken(/\s+|#[^\n]*\n?/,(function(e,r,t){return isQuantifierNext(e.input,e.index+e[0].length,t)?"":"(?:)"}),{flag:"x"}),XRegExp$1.addToken(/\./,(function(){return"[\\s\\S]"}),{flag:"s",leadChar:"."}),XRegExp$1.addToken(/\\k<([\w$]+)>/,(function(e){var r=isNaN(e[1])?indexOf(this.captureNames,e[1])+1:+e[1],t=e.index+e[0].length;if(!r||r>this.captureNames.length)throw new SyntaxError("Backreference to undefined group "+e[0]);return"\\"+r+(t===e.input.length||isNaN(e.input.charAt(t))?"":"(?:)")}),{leadChar:"\\"}),XRegExp$1.addToken(/\\(\d+)/,(function(e,r){if(!(r===yo&&/^[1-9]/.test(e[1])&&+e[1]<=this.captureNames.length)&&"0"!==e[1])throw new SyntaxError("Cannot use octal escape or backreference to undefined group "+e[0]);return e[0]}),{scope:"all",leadChar:"\\"}),XRegExp$1.addToken(/\(\?P?<([\w$]+)>/,(function(e){if(!isNaN(e[1]))throw new SyntaxError("Cannot use integer as capture name "+e[0]);if("length"===e[1]||"__proto__"===e[1])throw new SyntaxError("Cannot use reserved word as capture name "+e[0]);if(indexOf(this.captureNames,e[1])>-1)throw new SyntaxError("Cannot use same name for multiple groups "+e[0]);return this.captureNames.push(e[1]),this.hasNamedCapture=!0,"("}),{leadChar:"("}),XRegExp$1.addToken(/\((?!\?)/,(function(e,r,t){return t.indexOf("n")>-1?"(?:":(this.captureNames.push(null),"(")}),{optionalFlags:"n",leadChar:"("});var ko=XRegExp$1; | ||
| /*! | ||
@@ -22,2 +15,2 @@ * XRegExp Unicode Base 3.1.1-next | ||
| * Steven Levithan (c) 2008-2016 MIT License | ||
| */!function(C){var N={},X=C._dec,H=C._hex,U=C._pad4;function normalize(C){return C.replace(/[- _]+/g,"").toLowerCase()}function charCode(C){var N=/^\\[xu](.+)/.exec(C);return N?X(N[1]):C.charCodeAt("\\"===C.charAt(0)?1:0)}function cacheInvertedBmp(X){return N[X]["b!"]||(N[X]["b!"]=function invertBmp(N){var X="",q=-1;return C.forEach(N,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,(function(C){var N=charCode(C[1]);N>q+1&&(X+="\\u"+U(H(q+1)),N>q+2&&(X+="-\\u"+U(H(N-1)))),q=charCode(C[2]||C[1])})),q<65535&&(X+="\\u"+U(H(q+1)),q<65534&&(X+="-\\uFFFF")),X}(N[X].bmp))}C.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,(function(C,X,H){var U="P"===C[1]||!!C[2],q=normalize(C[4]||C[3]),W=N[q];if("P"===C[1]&&C[2])throw new SyntaxError("Invalid double negation "+C[0]);if(!N.hasOwnProperty(q))throw new SyntaxError("Unknown Unicode token "+C[0]);if(W.inverseOf){if(q=normalize(W.inverseOf),!N.hasOwnProperty(q))throw new ReferenceError("Unicode token missing data "+C[0]+" -> "+W.inverseOf);W=N[q],U=!U}if(!W.bmp)throw new SyntaxError("Astral mode required for Unicode token "+C[0]);return"class"===X?U?cacheInvertedBmp(q):W.bmp:(U?"[^":"[")+W.bmp+"]"}),{scope:"all",optionalFlags:"A",leadChar:"\\"}),C.addUnicodeData=function(X){for(var H,U=0;U<X.length;++U){if(!(H=X[U]).name)throw new Error("Unicode token requires name");if(!(H.inverseOf||H.bmp||H.astral))throw new Error("Unicode token has no character data "+H.name);N[normalize(H.name)]=H,H.alias&&(N[normalize(H.alias)]=H)}C.cache.flush("patterns")},C._getUnicodeProperty=function(C){var X=normalize(C);return N[X]}}(ge),function(C){if(!C.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");C.addUnicodeData([{name:"L",alias:"Letter",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-Ᶎꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭧꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"},{name:"N",alias:"Number",bmp:"0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൘-൞൦-൸෦-෯๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9"}])}(ge);var ye=ge,ve={exports:{}};return function(C){C.exports=function(N,X,H,U){return(C={}).dedupe=function dedupe(C,q){var W,G=N(q);if(!X(C)&&"object"!=typeof C)throw new Error("contains_dupes must be an array or object");if(0===Object.keys(C).length)return void 0!==typeof console&&console.warn("contains_dupes is empty"),[];G.limit&&(void 0!==typeof console&&console.warn("options.limit will be ignored in dedupe"),G.limit=0),G.cutoff&&"number"==typeof G.cutoff||(void 0!==typeof console&&console.warn("Using default cutoff of 70"),G.cutoff=70),G.scorer||(G.scorer=H,void 0!==typeof console&&console.log("Using default scorer 'ratio' for dedupe")),W=G.processor&&"function"==typeof G.processor?G.processor:function(C){return C};var Q={};for(var Y in C){var Z=W(C[Y]);if("string"!=typeof Z&&Z instanceof String==!1)throw new Error("Each processed item in dedupe must be a string.");var V=U(Z,C,G);G.returnObjects?(1===V.length||(V=V.sort((function(C,N){var X=W(C.choice),H=W(N.choice),U=X.length,q=H.length;return U===q?X<H?-1:1:q-U}))),G.keepmap?Q[W(V[0].choice)]={item:V[0].choice,key:V[0].key,matches:V}:Q[W(V[0].choice)]={item:V[0].choice,key:V[0].key}):(1===V.length||(V=V.sort((function(C,N){var X=W(C[0]),H=W(N[0]),U=X.length,q=H.length;return U===q?X<H?-1:1:q-U}))),G.keepmap?Q[W(V[0][0])]=[V[0][0],V[0][2],V]:Q[W(V[0][0])]=[V[0][0],V[0][2]])}var J=[];for(var K in Q)J.push(Q[K]);return J},C}}(ve),function(){var C=W,X=G.exports.intersection,H=G.exports.difference,U=G.exports.uniq,q=G.exports.toArray,Q=Y,Z=V,K=J,ee=function(C,N,X){var H={},U=ye,q=V,W=J;function escapeRegExp(C){return C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function validate(C){return("string"==typeof C||C instanceof String)&&C.length>0}H.validate=validate,H.process_and_sort=function process_and_sort(C){return validate(C)?C.match(/\S+/g).sort().join(" ").trim():""},H.tokenize=function unique_tokens(H,U){if(U&&U.wildcards&&N&&X){var G=X(q,U,W);return N(H.match(/\S+/g),(function(C,N){return 0===G(C,N)}))}return C(H.match(/\S+/g))};var G=U("[^\\pN|\\pL]","g");return H.full_process=function full_process(C,N){if(!(C instanceof String)&&"string"!=typeof C)return"";var X;if(N&&"object"==typeof N&&N.wildcards&&"string"==typeof N.wildcards&&N.wildcards.length>0){var H=N.wildcards.toLowerCase();if(C=C.toLowerCase(),N.force_ascii){var q="[^\0 -|"+escapeRegExp(H)+"]";C=C.replace(new RegExp(q,"g"),"");var W="["+escapeRegExp(H)+"]",Q=H[0];C=C.replace(new RegExp(W,"g"),Q);var Y="[^A-Za-z0-9"+escapeRegExp(H)+"]";X=(C=(C=C.replace(new RegExp(Y,"g")," ")).replace(/_/g," ")).trim()}else{var Z="[^\\pN|\\pL|"+escapeRegExp(H)+"]",V=U(Z,"g");C=U.replace(C,V," ","all"),W="["+escapeRegExp(H)+"]",Q=H[0],X=(C=C.replace(new RegExp(W,"g"),Q)).trim()}}else N&&(N.force_ascii||!0===N)&&(X=(C=C.replace(/[^\x00-\x7F]/g,"")).replace(/\W|_/g," ").toLowerCase().trim()),X=U.replace(C,G," ","all").toLowerCase().trim();return N&&N.collapseWhitespace&&(X=X.replace(/\s+/g," ")),X},H.clone_and_set_option_defaults=function(C){if(C&&C.isAClone)return C;var N={isAClone:!0};if(C){var X,H=Object.keys(C);for(X=0;X<H.length;X++)N[H[X]]=C[H[X]]}return void 0!==N.full_process&&!1===N.full_process||(N.full_process=!0),void 0!==N.force_ascii&&!0===N.force_ascii||(N.force_ascii=!1),void 0!==N.normalize&&!1===N.normalize||(N.normalize=!0),void 0!==N.astral&&!0===N.astral&&(N.full_process=!1),void 0!==N.collapseWhitespace&&!1===N.collapseWhitespace||(N.collapseWhitespace=!0),N},H.isCustomFunc=function(C){return"function"!=typeof C||"token_set_ratio"!==C.name&&"partial_token_set_ratio"!==C.name&&"token_sort_ratio"!==C.name&&"partial_token_sort_ratio"!==C.name&&"QRatio"!==C.name&&"WRatio"!==C.name&&"distance"!==C.name&&"partial_ratio"!==C.name},H}(U),te=ee.validate,re=ee.process_and_sort,ne=ee.tokenize,oe=ee.full_process,ae=ee.clone_and_set_option_defaults,ie=ee.isCustomFunc;void 0===Array.isArray&&(Array.isArray=function(C){return"[object Array]"===Object.prototype.toString.call(C)});var se=ve.exports(ae,Array.isArray,QRatio,extract).dedupe;function QRatio(C,N,X){var H=ae(X);return C=H.full_process?oe(C,H):C,N=H.full_process?oe(N,H):N,te(C)&&te(N)?_ratio(C,N,H):0}function extract(N,X,H){var U,q=ae(H),W=!1;if(X&&X.length&&Array.isArray(X))U=X.length,W=!0;else{if(!(X instanceof Object))throw new Error("Invalid choices");U=Object.keys(X).length}if(!X||0===U)return void 0!==typeof console&&console.warn("No choices"),[];if(q.processor&&"function"!=typeof q.processor)throw new Error("Invalid Processor");if(q.processor||(q.processor=function(C){return C}),q.scorer&&"function"!=typeof q.scorer)throw new Error("Invalid Scorer");q.scorer||(q.scorer=QRatio);var G=ie(q.scorer);q.cutoff&&"number"==typeof q.cutoff||(q.cutoff=-1);var pre_processor=function(C,N){return C};q.full_process&&(pre_processor=oe,G||(q.processed=!0));var Q=!1;G||(N=pre_processor(N,q),q.full_process=!1,q.astral&&q.normalize&&(q.normalize=!1,String.prototype.normalize?(Q=!0,N=N.normalize()):void 0!==typeof console&&console.warn("Normalization not supported in your environment")),0===N.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var Y,Z,V,J,K,ee=[],te=!1,se=!1,ce=!1;if("token_sort_ratio"===q.scorer.name||"partial_token_sort_ratio"===q.scorer.name){var le=re(N);se=!0}else if("token_set_ratio"===q.scorer.name||"partial_token_set_ratio"===q.scorer.name){var ue=ne(N);ce=!0}for(var fe in q.returnObjects?(J=function(C,N){return C.score-N.score},K=function(C,N){return N.score-C.score}):(J=function(C,N){return C[1]-N[1]},K=function(C,N){return N[1]-C[1]}),X)(W||X.hasOwnProperty(fe))&&(q.tokens=void 0,q.proc_sorted=!1,se?(q.proc_sorted=!0,X[fe]&&X[fe].proc_sorted?Z=X[fe].proc_sorted:(Z=pre_processor(q.processor(X[fe]),q),Z=re(Q?Z.normalize():Z)),V=q.scorer(le,Z,q)):ce?(Z="x",X[fe]&&X[fe].tokens?(q.tokens=[ue,X[fe].tokens],q.trySimple&&(Z=pre_processor(q.processor(X[fe]),q))):(Z=pre_processor(q.processor(X[fe]),q),q.tokens=[ue,ne(Q?Z.normalize():Z)]),V=q.scorer(N,Z,q)):G?(Z=q.processor(X[fe]),V=q.scorer(N,Z,q)):("string"==typeof(Z=pre_processor(q.processor(X[fe]),q))&&0!==Z.length||(te=!0),Q&&"string"==typeof Z&&(Z=Z.normalize()),V=q.scorer(N,Z,q)),Y=W?parseInt(fe):fe,V>q.cutoff&&(q.returnObjects?ee.push({choice:X[fe],score:V,key:Y}):ee.push([X[fe],V,Y])));return te&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),q.limit&&"number"==typeof q.limit&&q.limit>0&&q.limit<U&&!q.unsorted?ee=C.nlargest(ee,q.limit,J):q.unsorted||(ee=ee.sort(K)),ee}function extractAsync(N,X,H,U){var q,W,G=ae(H);"object"==typeof H.abortController&&(q=H.abortController),"object"==typeof H.cancelToken&&(W=H.cancelToken);var Q=256;"number"==typeof G.asyncLoopOffset&&(Q=G.asyncLoopOffset<1?1:G.asyncLoopOffset);var Y,Z=!1;if(X&&X.length&&Array.isArray(X))Y=X.length,Z=!0;else{if(!(X instanceof Object))return void U(new Error("Invalid choices"));Y=Object.keys(X).length}if(!X||0===Y)return void 0!==typeof console&&console.warn("No choices"),void U(null,[]);if(G.processor&&"function"!=typeof G.processor)U(new Error("Invalid Processor"));else if(G.processor||(G.processor=function(C){return C}),G.scorer&&"function"!=typeof G.scorer)U(new Error("Invalid Scorer"));else{G.scorer||(G.scorer=QRatio);var V=ie(G.scorer);G.cutoff&&"number"==typeof G.cutoff||(G.cutoff=-1);var pre_processor=function(C,N){return C};G.full_process&&(pre_processor=oe,V||(G.processed=!0));var J=!1;V||(N=pre_processor(N,G),G.full_process=!1,G.astral&&G.normalize&&(G.normalize=!1,String.prototype.normalize?(J=!0,N=N.normalize()):void 0!==typeof console&&console.warn("Normalization not supported in your environment")),0===N.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var K,ee,te,se,ce,le=[],ue=!1,fe=!1,pe=!1;if("token_sort_ratio"===G.scorer.name||"partial_token_sort_ratio"===G.scorer.name){var de=re(N);fe=!0}else if("token_set_ratio"===G.scorer.name||"partial_token_set_ratio"===G.scorer.name){var he=ne(N);pe=!0}G.returnObjects?(se=function(C,N){return C.score-N.score},ce=function(C,N){return N.score-C.score}):(se=function(C,N){return C[1]-N[1]},ce=function(C,N){return N[1]-C[1]});var ge=Object.keys(X);Z?searchLoop(0):searchLoop(ge[0],0)}function searchLoop(H,oe){(Z||X.hasOwnProperty(H))&&(G.tokens=void 0,G.proc_sorted=!1,fe?(G.proc_sorted=!0,X[H].proc_sorted?ee=X[H].proc_sorted:(ee=pre_processor(G.processor(X[H]),G),ee=re(J?ee.normalize():ee)),te=G.scorer(de,ee,G)):pe?(ee="x",X[H].tokens?(G.tokens=[he,X[H].tokens],G.trySimple&&(ee=pre_processor(G.processor(X[H]),G))):(ee=pre_processor(G.processor(X[H]),G),G.tokens=[he,ne(J?ee.normalize():ee)]),te=G.scorer(N,ee,G)):V?(ee=G.processor(X[H]),te=G.scorer(N,ee,G)):("string"==typeof(ee=pre_processor(G.processor(X[H]),G))&&0!==ee.length||(ue=!0),J&&"string"==typeof ee&&(ee=ee.normalize()),te=G.scorer(N,ee,G)),K=Z?parseInt(H):H,te>G.cutoff&&(G.returnObjects?le.push({choice:X[H],score:te,key:K}):le.push([X[H],te,K]))),q&&!0===q.signal.aborted?U(new Error("aborted")):W&&!0===W.canceled?U(new Error("canceled")):Z&&H<X.length-1?H%Q==0?setImmediate((function(){searchLoop(H+1)})):searchLoop(H+1):oe<ge.length-1?oe%Q==0?setImmediate((function(){searchLoop(ge[oe+1],oe+1)})):searchLoop(ge[oe+1],oe+1):(ue&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),G.limit&&"number"==typeof G.limit&&G.limit>0&&G.limit<Y&&!G.unsorted?le=C.nlargest(le,G.limit,se):G.unsorted||(le=le.sort(ce)),U(null,le))}}var ce,le,ue,fe,pe=!1;function _ratio(C,N,X){return te(C)&&te(N)?(void 0===X.subcost&&(X.subcost=2),X.astral?(X.normalize&&(String.prototype.normalize?(C=C.normalize(),N=N.normalize()):pe||(void 0!==typeof console&&console.warn("Normalization not supported in your environment"),pe=!0)),H=Q(C,N,X,q),U=q(C).length+q(N).length):X.wildcards?(H=Z(C,N,X,K),U=C.length+N.length):(H=K(C,N,X),U=C.length+N.length),Math.round((U-H)/U*100)):0;var H,U}Object.keys||(Object.keys=(ce=Object.prototype.hasOwnProperty,le=!{toString:null}.propertyIsEnumerable("toString"),fe=(ue=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(C){if("object"!=typeof C&&("function"!=typeof C||null===C))throw new TypeError("Object.keys called on non-object");var N,X,H=[];for(N in C)ce.call(C,N)&&H.push(N);if(le)for(X=0;X<fe;X++)ce.call(C,ue[X])&&H.push(ue[X]);return H}));var de=void 0;"undefined"!=typeof Promise&&(de=function(C,N,X){return new Promise((function(H,U){extractAsync(C,N,X,(function(C,N){C?U(C):H(N)}))}))});var he={distance:function distance(C,N,X){var H=ae(X);return C=H.full_process?oe(C,H):C,N=H.full_process?oe(N,H):N,void 0===H.subcost&&(H.subcost=1),H.astral?Q(C,N,H,q):Z(C,N,H,K)},ratio:QRatio,token_set_ratio:function token_set_ratio(C,N,U){var q=ae(U);return C=q.full_process?oe(C,q):C,N=q.full_process?oe(N,q):N,te(C)&&te(N)?function _token_set(C,N,U){if(U.tokens)q=U.tokens[0],W=U.tokens[1];else var q=ne(C),W=ne(N);var G=X(q,W),Q=H(q,W),Y=H(W,q),Z=G.sort().join(" "),V=Q.sort().join(" "),J=Y.sort().join(" "),K=Z+" "+V,ee=Z+" "+J;Z=Z.trim(),K=K.trim(),ee=ee.trim();var te=_ratio,re=[te(Z,K,U),te(Z,ee,U),te(K,ee,U)];U.trySimple&&re.push(te(C,N,U));return Math.max.apply(null,re)}(C,N,q):0},token_sort_ratio:function token_sort_ratio(C,N,X){var H=ae(X);return C=H.full_process?oe(C,H):C,N=H.full_process?oe(N,H):N,te(C)&&te(N)?(H.proc_sorted||(C=re(C),N=re(N)),_ratio(C,N,H)):0},full_process:oe,extract:extract,extractAsync:extractAsync,extractAsPromised:de,process_and_sort:re,unique_tokens:ne,dedupe:se};N.exports=he}(),N.exports})); | ||
| */!function(e){var r={},t=e._dec,n=e._hex,o=e._pad4;function normalize(e){return e.replace(/[- _]+/g,"").toLowerCase()}function charCode(e){var r=/^\\[xu](.+)/.exec(e);return r?t(r[1]):e.charCodeAt("\\"===e.charAt(0)?1:0)}function cacheInvertedBmp(t){return r[t]["b!"]||(r[t]["b!"]=function invertBmp(r){var t="",a=-1;return e.forEach(r,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,(function(e){var r=charCode(e[1]);r>a+1&&(t+="\\u"+o(n(a+1)),r>a+2&&(t+="-\\u"+o(n(r-1)))),a=charCode(e[2]||e[1])})),a<65535&&(t+="\\u"+o(n(a+1)),a<65534&&(t+="-\\uFFFF")),t}(r[t].bmp))}e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,(function(e,t,n){var o="P"===e[1]||!!e[2],a=normalize(e[4]||e[3]),i=r[a];if("P"===e[1]&&e[2])throw new SyntaxError("Invalid double negation "+e[0]);if(!r.hasOwnProperty(a))throw new SyntaxError("Unknown Unicode token "+e[0]);if(i.inverseOf){if(a=normalize(i.inverseOf),!r.hasOwnProperty(a))throw new ReferenceError("Unicode token missing data "+e[0]+" -> "+i.inverseOf);i=r[a],o=!o}if(!i.bmp)throw new SyntaxError("Astral mode required for Unicode token "+e[0]);return"class"===t?o?cacheInvertedBmp(a):i.bmp:(o?"[^":"[")+i.bmp+"]"}),{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(t){for(var n,o=0;o<t.length;++o){if(!(n=t[o]).name)throw new Error("Unicode token requires name");if(!(n.inverseOf||n.bmp||n.astral))throw new Error("Unicode token has no character data "+n.name);r[normalize(n.name)]=n,n.alias&&(r[normalize(n.alias)]=n)}e.cache.flush("patterns")},e._getUnicodeProperty=function(e){var t=normalize(e);return r[t]}}(ko),function(e){if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");e.addUnicodeData([{name:"L",alias:"Letter",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-Ᶎꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭧꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"},{name:"N",alias:"Number",bmp:"0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൘-൞൦-൸෦-෯๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9"}])}(ko);var So=ko,Ao={exports:{}};return function(e){e.exports=function(r,t,n,o){return(e={}).dedupe=function dedupe(e,a){var i,s=r(a);if(!t(e)&&"object"!=typeof e)throw new Error("contains_dupes must be an array or object");if(0===Object.keys(e).length)return void 0!==typeof console&&console.warn("contains_dupes is empty"),[];s.limit&&(void 0!==typeof console&&console.warn("options.limit will be ignored in dedupe"),s.limit=0),s.cutoff&&"number"==typeof s.cutoff||(void 0!==typeof console&&console.warn("Using default cutoff of 70"),s.cutoff=70),s.scorer||(s.scorer=n,void 0!==typeof console&&console.log("Using default scorer 'ratio' for dedupe")),i=s.processor&&"function"==typeof s.processor?s.processor:function(e){return e};var c={};for(var u in e){var l=i(e[u]);if("string"!=typeof l&&l instanceof String==!1)throw new Error("Each processed item in dedupe must be a string.");var p=o(l,e,s);s.returnObjects?(1===p.length||(p=p.sort((function(e,r){var t=i(e.choice),n=i(r.choice),o=t.length,a=n.length;return o===a?t<n?-1:1:a-o}))),s.keepmap?c[i(p[0].choice)]={item:p[0].choice,key:p[0].key,matches:p}:c[i(p[0].choice)]={item:p[0].choice,key:p[0].key}):(1===p.length||(p=p.sort((function(e,r){var t=i(e[0]),n=i(r[0]),o=t.length,a=n.length;return o===a?t<n?-1:1:a-o}))),s.keepmap?c[i(p[0][0])]=[p[0][0],p[0][2],p]:c[i(p[0][0])]=[p[0][0],p[0][2]])}var f=[];for(var d in c)f.push(c[d]);return f},e}}(Ao),function(){var e=n,t=Or,o=at,a=oo,i=io,s=co,c=uo,u=function(e,r,t){var n={},o=So,a=co,i=uo;function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function validate(e){return("string"==typeof e||e instanceof String)&&e.length>0}n.validate=validate,n.process_and_sort=function process_and_sort(e){return validate(e)?e.match(/\S+/g).sort().join(" ").trim():""},n.tokenize=function unique_tokens(n,o){if(o&&o.wildcards&&r&&t){var s=t(a,o,i);return r(n.match(/\S+/g),(function(e,r){return 0===s(e,r)}))}return e(n.match(/\S+/g))};var s=o("[^\\pN|\\pL]","g");return n.full_process=function full_process(e,r){if(!(e instanceof String)&&"string"!=typeof e)return"";var t;if(r&&"object"==typeof r&&r.wildcards&&"string"==typeof r.wildcards&&r.wildcards.length>0){var n=r.wildcards.toLowerCase();if(e=e.toLowerCase(),r.force_ascii){var a="[^\0 -|"+escapeRegExp(n)+"]";e=e.replace(new RegExp(a,"g"),"");var i="["+escapeRegExp(n)+"]",c=n[0];e=e.replace(new RegExp(i,"g"),c);var u="[^A-Za-z0-9"+escapeRegExp(n)+"]";t=(e=(e=e.replace(new RegExp(u,"g")," ")).replace(/_/g," ")).trim()}else{var l="[^\\pN|\\pL|"+escapeRegExp(n)+"]",p=o(l,"g");e=o.replace(e,p," ","all"),i="["+escapeRegExp(n)+"]",c=n[0],t=(e=e.replace(new RegExp(i,"g"),c)).trim()}}else r&&(r.force_ascii||!0===r)&&(t=(e=e.replace(/[^\x00-\x7F]/g,"")).replace(/\W|_/g," ").toLowerCase().trim()),t=o.replace(e,s," ","all").toLowerCase().trim();return r&&r.collapseWhitespace&&(t=t.replace(/\s+/g," ")),t},n.clone_and_set_option_defaults=function(e){if(e&&e.isAClone)return e;var r={isAClone:!0};if(e){var t,n=Object.keys(e);for(t=0;t<n.length;t++)r[n[t]]=e[n[t]]}return!1!==r.full_process&&(r.full_process=!0),!0!==r.force_ascii&&(r.force_ascii=!1),!1!==r.normalize&&(r.normalize=!0),!0===r.astral&&(r.full_process=!1),!1!==r.collapseWhitespace&&(r.collapseWhitespace=!0),r},n.isCustomFunc=function(e){return"function"!=typeof e||"token_set_ratio"!==e.name&&"partial_token_set_ratio"!==e.name&&"token_sort_ratio"!==e.name&&"partial_token_sort_ratio"!==e.name&&"QRatio"!==e.name&&"WRatio"!==e.name&&"distance"!==e.name&&"partial_ratio"!==e.name},n}(mt),l=u.validate,p=u.process_and_sort,f=u.tokenize,d=u.full_process,h=u.clone_and_set_option_defaults,g=u.isCustomFunc;void 0===Array.isArray&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var v=Ao.exports(h,Array.isArray,QRatio,extract).dedupe;function QRatio(e,r,t){var n=h(t);return e=n.full_process?d(e,n):e,r=n.full_process?d(r,n):r,l(e)&&l(r)?_ratio(e,r,n):0}function extract(r,t,n){var o,a=h(n),i=!1;if(t&&t.length&&Array.isArray(t))o=t.length,i=!0;else{if(!(t instanceof Object))throw new Error("Invalid choices");o=Object.keys(t).length}if(!t||0===o)return void 0!==typeof console&&console.warn("No choices"),[];if(a.processor&&"function"!=typeof a.processor)throw new Error("Invalid Processor");if(a.processor||(a.processor=function(e){return e}),a.scorer&&"function"!=typeof a.scorer)throw new Error("Invalid Scorer");a.scorer||(a.scorer=QRatio);var s=g(a.scorer);a.cutoff&&"number"==typeof a.cutoff||(a.cutoff=-1);var pre_processor=function(e,r){return e};a.full_process&&(pre_processor=d,s||(a.processed=!0));var c=!1;s||(r=pre_processor(r,a),a.full_process=!1,a.astral&&a.normalize&&(a.normalize=!1,String.prototype.normalize?(c=!0,r=r.normalize()):void 0!==typeof console&&console.warn("Normalization not supported in your environment")),0===r.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var u,l,v,y,m,x=[],b=!1,_=!1,w=!1;if("token_sort_ratio"===a.scorer.name||"partial_token_sort_ratio"===a.scorer.name){var $=p(r);_=!0}else if("token_set_ratio"===a.scorer.name||"partial_token_set_ratio"===a.scorer.name){var E=f(r);w=!0}for(var C in a.returnObjects?(y=function(e,r){return e.score-r.score},m=function(e,r){return r.score-e.score}):(y=function(e,r){return e[1]-r[1]},m=function(e,r){return r[1]-e[1]}),t)(i||t.hasOwnProperty(C))&&(a.tokens=void 0,a.proc_sorted=!1,_?(a.proc_sorted=!0,t[C]&&t[C].proc_sorted?l=t[C].proc_sorted:(l=pre_processor(a.processor(t[C]),a),l=p(c?l.normalize():l)),v=a.scorer($,l,a)):w?(l="x",t[C]&&t[C].tokens?(a.tokens=[E,t[C].tokens],a.trySimple&&(l=pre_processor(a.processor(t[C]),a))):(l=pre_processor(a.processor(t[C]),a),a.tokens=[E,f(c?l.normalize():l)]),v=a.scorer(r,l,a)):s?(l=a.processor(t[C]),v=a.scorer(r,l,a)):("string"==typeof(l=pre_processor(a.processor(t[C]),a))&&0!==l.length||(b=!0),c&&"string"==typeof l&&(l=l.normalize()),v=a.scorer(r,l,a)),u=i?parseInt(C):C,v>a.cutoff&&(a.returnObjects?x.push({choice:t[C],score:v,key:u}):x.push([t[C],v,u])));return b&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),a.limit&&"number"==typeof a.limit&&a.limit>0&&a.limit<o&&!a.unsorted?x=e.nlargest(x,a.limit,y):a.unsorted||(x=x.sort(m)),x}function extractAsync(r,t,n,o){var a,i,s=h(n);"object"==typeof n.abortController&&(a=n.abortController),"object"==typeof n.cancelToken&&(i=n.cancelToken);var c=256;"number"==typeof s.asyncLoopOffset&&(c=s.asyncLoopOffset<1?1:s.asyncLoopOffset);var u,l=!1;if(t&&t.length&&Array.isArray(t))u=t.length,l=!0;else{if(!(t instanceof Object))return void o(new Error("Invalid choices"));u=Object.keys(t).length}if(!t||0===u)return void 0!==typeof console&&console.warn("No choices"),void o(null,[]);if(s.processor&&"function"!=typeof s.processor)o(new Error("Invalid Processor"));else if(s.processor||(s.processor=function(e){return e}),s.scorer&&"function"!=typeof s.scorer)o(new Error("Invalid Scorer"));else{s.scorer||(s.scorer=QRatio);var v=g(s.scorer);s.cutoff&&"number"==typeof s.cutoff||(s.cutoff=-1);var pre_processor=function(e,r){return e};s.full_process&&(pre_processor=d,v||(s.processed=!0));var y=!1;v||(r=pre_processor(r,s),s.full_process=!1,s.astral&&s.normalize&&(s.normalize=!1,String.prototype.normalize?(y=!0,r=r.normalize()):void 0!==typeof console&&console.warn("Normalization not supported in your environment")),0===r.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var m,x,b,_,w,$=[],E=!1,C=!1,j=!1;if("token_sort_ratio"===s.scorer.name||"partial_token_sort_ratio"===s.scorer.name){var k=p(r);C=!0}else if("token_set_ratio"===s.scorer.name||"partial_token_set_ratio"===s.scorer.name){var S=f(r);j=!0}s.returnObjects?(_=function(e,r){return e.score-r.score},w=function(e,r){return r.score-e.score}):(_=function(e,r){return e[1]-r[1]},w=function(e,r){return r[1]-e[1]});var A=Object.keys(t);l?searchLoop(0):searchLoop(A[0],0)}function searchLoop(n,d){(l||t.hasOwnProperty(n))&&(s.tokens=void 0,s.proc_sorted=!1,C?(s.proc_sorted=!0,t[n].proc_sorted?x=t[n].proc_sorted:(x=pre_processor(s.processor(t[n]),s),x=p(y?x.normalize():x)),b=s.scorer(k,x,s)):j?(x="x",t[n].tokens?(s.tokens=[S,t[n].tokens],s.trySimple&&(x=pre_processor(s.processor(t[n]),s))):(x=pre_processor(s.processor(t[n]),s),s.tokens=[S,f(y?x.normalize():x)]),b=s.scorer(r,x,s)):v?(x=s.processor(t[n]),b=s.scorer(r,x,s)):("string"==typeof(x=pre_processor(s.processor(t[n]),s))&&0!==x.length||(E=!0),y&&"string"==typeof x&&(x=x.normalize()),b=s.scorer(r,x,s)),m=l?parseInt(n):n,b>s.cutoff&&(s.returnObjects?$.push({choice:t[n],score:b,key:m}):$.push([t[n],b,m]))),a&&!0===a.signal.aborted?o(new Error("aborted")):i&&!0===i.canceled?o(new Error("canceled")):l&&n<t.length-1?n%c==0?setImmediate((function(){searchLoop(n+1)})):searchLoop(n+1):d<A.length-1?d%c==0?setImmediate((function(){searchLoop(A[d+1],d+1)})):searchLoop(A[d+1],d+1):(E&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),s.limit&&"number"==typeof s.limit&&s.limit>0&&s.limit<u&&!s.unsorted?$=e.nlargest($,s.limit,_):s.unsorted||($=$.sort(w)),o(null,$))}}var y=!1;function _ratio(e,r,t){return l(e)&&l(r)?(void 0===t.subcost&&(t.subcost=2),t.astral?(t.normalize&&(String.prototype.normalize?(e=e.normalize(),r=r.normalize()):y||(void 0!==typeof console&&console.warn("Normalization not supported in your environment"),y=!0)),n=i(e,r,t,a),o=a(e).length+a(r).length):t.wildcards?(n=s(e,r,t,c),o=e.length+r.length):(n=c(e,r,t),o=e.length+r.length),Math.round((o-n)/o*100)):0;var n,o}Object.keys||(Object.keys=function(){var e=Object.prototype.hasOwnProperty,r=!{toString:null}.propertyIsEnumerable("toString"),t=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=t.length;return function(o){if("object"!=typeof o&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on non-object");var a,i,s=[];for(a in o)e.call(o,a)&&s.push(a);if(r)for(i=0;i<n;i++)e.call(o,t[i])&&s.push(t[i]);return s}}());var m=void 0;"undefined"!=typeof Promise&&(m=function(e,r,t){return new Promise((function(n,o){extractAsync(e,r,t,(function(e,r){e?o(e):n(r)}))}))});var x={distance:function distance(e,r,t){var n=h(t);return e=n.full_process?d(e,n):e,r=n.full_process?d(r,n):r,void 0===n.subcost&&(n.subcost=1),n.astral?i(e,r,n,a):s(e,r,n,c)},ratio:QRatio,token_set_ratio:function token_set_ratio(e,r,n){var a=h(n);return e=a.full_process?d(e,a):e,r=a.full_process?d(r,a):r,l(e)&&l(r)?function _token_set(e,r,n){if(n.tokens)a=n.tokens[0],i=n.tokens[1];else var a=f(e),i=f(r);var s=t(a,i),c=o(a,i),u=o(i,a),l=s.sort().join(" "),p=c.sort().join(" "),d=u.sort().join(" "),h=l+" "+p,g=l+" "+d;l=l.trim(),h=h.trim(),g=g.trim();var v=_ratio,y=[v(l,h,n),v(l,g,n),v(h,g,n)];n.trySimple&&y.push(v(e,r,n));return Math.max.apply(null,y)}(e,r,a):0},token_sort_ratio:function token_sort_ratio(e,r,t){var n=h(t);return e=n.full_process?d(e,n):e,r=n.full_process?d(r,n):r,l(e)&&l(r)?(n.proc_sorted||(e=p(e),r=p(r)),_ratio(e,r,n)):0},full_process:d,extract:extract,extractAsync:extractAsync,extractAsPromised:m,process_and_sort:p,unique_tokens:f,dedupe:v};r.exports=x}(),r.exports})); |
+7
-10
| { | ||
| "name": "fuzzball", | ||
| "version": "2.1.3", | ||
| "version": "2.1.6", | ||
| "description": "Fuzzy string matching algorithms and utilities, port of the TheFuzz Python library.", | ||
@@ -37,2 +37,3 @@ "main": "fuzzball.js", | ||
| "heap": ">=0.2.0", | ||
| "lodash": "^4.17.21", | ||
| "setimmediate": "^1.0.5", | ||
@@ -46,7 +47,6 @@ "string.fromcodepoint": "^0.2.1", | ||
| "cached-path-relative": "^1.0.2", | ||
| "jsdoc": "^3.6.3", | ||
| "jsdoc-to-markdown": "^5.0.3", | ||
| "lodash-cli": "^4.17.5", | ||
| "mocha": "^9.1.3", | ||
| "rollup": "^2.52.3", | ||
| "jsdoc": "^4.0.4", | ||
| "jsdoc-to-markdown": "^9.1.1", | ||
| "mocha": "^11.1.0", | ||
| "rollup": "^2.79.2", | ||
| "rollup-plugin-terser": "^7.0.2", | ||
@@ -73,8 +73,5 @@ "uglify-js": "^3.12.3" | ||
| "jsdoc2md": "./node_modules/.bin/jsdoc2md --template ./jsdocs/README.hbs fuzzball.js > jsdocs/fuzzball.md && ./node_modules/.bin/jsdoc2md lib/process.js > jsdocs/process.md", | ||
| "lodash:reg": "./node_modules/lodash-cli/bin/lodash include=intersection,difference,uniq,intersectionWith,differenceWith,uniqWith,toArray,partialRight,keys,isArray,forEach,orderBy -p -o ./lib/lodash.custom.min.js", | ||
| "lodash:lite": "./node_modules/lodash-cli/bin/lodash include=intersection,difference,uniq,toArray -p -o ./lite/lodash.custom.min.js", | ||
| "lodash:ultralite": "./node_modules/lodash-cli/bin/lodash include=intersection,difference,uniq -p -o ./ultra_lite/lodash.custom.min.js", | ||
| "build:demo": "rm -rf docs && cd demo-app && npm run build && cp -a build/. ../docs/", | ||
| "build:bundles": "rollup --config rollup.config.js", | ||
| "build": "npm run lodash:ultralite && npm run lodash:lite && npm run lodash:reg && npm run build:bundles && npm run jsdoc2md && npm run test:build && npm run build:demo", | ||
| "build": "npm run build:bundles && npm run jsdoc2md && npm run test:build && npm run build:demo", | ||
| "test": "mocha --use_strict", | ||
@@ -81,0 +78,0 @@ "test:build": "testenv=build npm run test" |
+1
-1
@@ -493,3 +493,3 @@ [](https://travis-ci.com/nol13/fuzzball.js) [](https://runkit.com/npm/fuzzball) | ||
| The full, lite and ultra_lite bundles currently weight in at a compressed 28kB, 20kB, and 8kB, respectively. | ||
| The full, lite and ultra_lite bundles currently weight in at a compressed 27.0kB, 17.8kB, and 7.0kB, respectively. | ||
@@ -496,0 +496,0 @@ ### Credits |
@@ -1,7 +0,1 @@ | ||
| var I,P,C,E="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},L={exports:{}},M={exports:{}}; | ||
| /** | ||
| * @license | ||
| * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE | ||
| * Build: `lodash include="intersection,difference,uniq" -p -o ./ultra_lite/lodash.custom.min.js` | ||
| */ | ||
| I=M,P=M.exports,function(){function t(I,P,C){switch(C.length){case 0:return I.call(P);case 1:return I.call(P,C[0]);case 2:return I.call(P,C[0],C[1]);case 3:return I.call(P,C[0],C[1],C[2])}return I.apply(P,C)}function e(I,P){var C;if(C=!(null==I||!I.length)){if(P==P)e:{C=-1;for(var E=I.length;++C<E;)if(I[C]===P)break e;C=-1}else e:{C=n,E=I.length;for(var L=-1;++L<E;)if(C(I[L],L,I)){C=L;break e}C=-1}C=-1<C}return C}function n(I){return I!=I}function r(I,P){return I.has(P)}function o(I){var P=-1,C=Array(I.size);return I.forEach((function(I){C[++P]=I})),C}function i(){}function u(I){var P=-1,C=null==I?0:I.length;for(this.clear();++P<C;){var E=I[P];this.set(E[0],E[1])}}function a(I){var P=-1,C=null==I?0:I.length;for(this.clear();++P<C;){var E=I[P];this.set(E[0],E[1])}}function l(I){var P=-1,C=null==I?0:I.length;for(this.clear();++P<C;){var E=I[P];this.set(E[0],E[1])}}function c(I){var P=-1,C=null==I?0:I.length;for(this.__data__=new l;++P<C;)this.add(I[P])}function s(I,P){for(var C=I.length;C--;)if(j(I[C][0],P))return C;return-1}function f(I,P,C,E,L){var M=-1,T=I.length;for(C||(C=g),L||(L=[]);++M<T;){var R=I[M];if(0<P&&C(R))if(1<P)f(R,P-1,C,E,L);else for(var q=L,$=-1,W=R.length,N=q.length;++$<W;)q[N+$]=R[$];else E||(L[L.length]=R)}return L}function h(I){if(null==I)return I===C?"[object Undefined]":"[object Null]";if(X&&X in Object(I)){var P=U.call(I,X),E=I[X];try{I[X]=C;var L=!0}catch(I){}var M=G.call(I);L&&(P?I[X]=E:delete I[X]),I=M}else I=G.call(I);return I}function _(I){return x(I)&&"[object Arguments]"==h(I)}function p(I,P){return ie(v(I,P,k),I+"")}function y(I,P){var C=I.__data__,E=typeof P;return("string"==E||"number"==E||"symbol"==E||"boolean"==E?"__proto__"!==P:null===P)?C["string"==typeof P?"string":"hash"]:C.map}function d(I,P){var E=null==I?C:I[P];return!z(E)||D&&D in E||!(w(E)?V:M).test(function b(I){if(null!=I){try{return Q.call(I)}catch(I){}return I+""}return""}(E))?C:E}function g(I){return ce(I)||ae(I)||!!(K&&I&&I[K])}function v(I,P,E){return P=Z(P===C?I.length-1:P,0),function(){for(var C=arguments,L=-1,M=Z(C.length-P,0),T=Array(M);++L<M;)T[L]=C[P+L];for(L=-1,M=Array(P+1);++L<P;)M[L]=C[L];return M[P]=E(T),t(I,this,M)}}function j(I,P){return I===P||I!=I&&P!=P}function m(I){return null!=I&&A(I.length)&&!w(I)}function O(I){return x(I)&&m(I)}function w(I){return!!z(I)&&("[object Function]"==(I=h(I))||"[object GeneratorFunction]"==I||"[object AsyncFunction]"==I||"[object Proxy]"==I)}function A(I){return"number"==typeof I&&-1<I&&0==I%1&&9007199254740991>=I}function z(I){var P=typeof I;return null!=I&&("object"==P||"function"==P)}function x(I){return null!=I&&"object"==typeof I}function S(I){return function(){return I}}function k(I){return I}function F(){}var C,L=1/0,M=/^\[object .+?Constructor\]$/,T="object"==typeof self&&self&&self.Object===Object&&self,R=(T="object"==typeof E&&E&&E.Object===Object&&E||T||Function("return this")(),P&&!P.nodeType&&P),q=R&&I&&!I.nodeType&&I,$=Array.prototype,W=Object.prototype,N=T["__core-js_shared__"],Q=Function.prototype.toString,U=W.hasOwnProperty,D=function(){var I=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||"");return I?"Symbol(src)_1."+I:""}(),G=W.toString,V=RegExp("^"+Q.call(U).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),B=T.Symbol,H=W.propertyIsEnumerable,J=$.splice,K=B?B.isConcatSpreadable:C,X=B?B.toStringTag:C,Y=function(){try{var I=d(Object,"defineProperty");return I({},"",{}),I}catch(I){}}(),Z=Math.max,ee=Math.min,te=Date.now,re=d(T,"Map"),ne=d(T,"Set"),oe=d(Object,"create");u.prototype.clear=function(){this.__data__=oe?oe(null):{},this.size=0},u.prototype.delete=function(I){return I=this.has(I)&&delete this.__data__[I],this.size-=I?1:0,I},u.prototype.get=function(I){var P=this.__data__;return oe?"__lodash_hash_undefined__"===(I=P[I])?C:I:U.call(P,I)?P[I]:C},u.prototype.has=function(I){var P=this.__data__;return oe?P[I]!==C:U.call(P,I)},u.prototype.set=function(I,P){var E=this.__data__;return this.size+=this.has(I)?0:1,E[I]=oe&&P===C?"__lodash_hash_undefined__":P,this},a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(I){var P=this.__data__;return!(0>(I=s(P,I))||(I==P.length-1?P.pop():J.call(P,I,1),--this.size,0))},a.prototype.get=function(I){var P=this.__data__;return 0>(I=s(P,I))?C:P[I][1]},a.prototype.has=function(I){return-1<s(this.__data__,I)},a.prototype.set=function(I,P){var C=this.__data__,E=s(C,I);return 0>E?(++this.size,C.push([I,P])):C[E][1]=P,this},l.prototype.clear=function(){this.size=0,this.__data__={hash:new u,map:new(re||a),string:new u}},l.prototype.delete=function(I){return I=y(this,I).delete(I),this.size-=I?1:0,I},l.prototype.get=function(I){return y(this,I).get(I)},l.prototype.has=function(I){return y(this,I).has(I)},l.prototype.set=function(I,P){var C=y(this,I),E=C.size;return C.set(I,P),this.size+=C.size==E?0:1,this},c.prototype.add=c.prototype.push=function(I){return this.__data__.set(I,"__lodash_hash_undefined__"),this},c.prototype.has=function(I){return this.__data__.has(I)},$=Y?function(I,P){return Y(I,"toString",{configurable:!0,enumerable:!1,value:S(P),writable:!0})}:k;var se=ne&&1/o(new ne([,-0]))[1]==L?function(I){return new ne(I)}:F,ie=function(I){var P=0,E=0;return function(){var L=te(),M=16-(L-E);if(E=L,0<M){if(800<=++P)return arguments[0]}else P=0;return I.apply(C,arguments)}}($),ae=(L=p((function(I,P){var C;if(O(I)){C=f(P,1,O,!0);var E=-1,L=e,M=!0,T=I.length,R=[],q=C.length;if(T)e:for(200<=C.length&&(L=r,M=!1,C=new c(C));++E<T;){var $=W=I[E],W=0!==W?W:0;if(M&&$==$){for(var N=q;N--;)if(C[N]===$)continue e;R.push(W)}else L(C,$,void 0)||R.push(W)}C=R}else C=[];return C})),$=p((function(I){for(var P=-1,E=null==I?0:I.length,L=Array(E);++P<E;){var M,T=P;M=O(M=I[P])?M:[],L[T]=M}if(L.length&&L[0]===I[0]){I=L[0].length,E=P=L.length,T=Array(P),M=1/0;for(var R=[];E--;){var q=L[E];M=ee(q.length,M),T[E]=120<=I&&120<=q.length?new c(E&&q):C}q=L[0];var $=-1,W=T[0];e:for(;++$<I&&R.length<M;){var N=Q=q[$],Q=0!==Q?Q:0;if(W?!r(W,N):!e(R,N)){for(E=P;--E;){var U=T[E];if(U?!r(U,N):!e(L[E],N))continue e}W&&W.push(N),R.push(Q)}}L=R}else L=[];return L})),_(function(){return arguments}())?_:function(I){return x(I)&&U.call(I,"callee")&&!H.call(I,"callee")}),ce=Array.isArray;i.constant=S,i.difference=L,i.intersection=$,i.uniq=function(I){if(I&&I.length)e:{var P=-1,C=e,E=I.length,L=!0,M=[],T=M;if(200<=E){if(C=se(I)){I=o(C);break e}L=!1,C=r,T=new c}else T=M;t:for(;++P<E;){var R=q=I[P],q=0!==q?q:0;if(L&&R==R){for(var $=T.length;$--;)if(T[$]===R)continue t;M.push(q)}else C(T,R,void 0)||(T!==M&&T.push(R),M.push(q))}I=M}else I=[];return I},i.eq=j,i.identity=k,i.isArguments=ae,i.isArray=ce,i.isArrayLike=m,i.isArrayLikeObject=O,i.isFunction=w,i.isLength=A,i.isObject=z,i.isObjectLike=x,i.noop=F,i.VERSION="4.17.5",q?((q.exports=i)._=i,R._=i):T._=i}.call(E);try{C="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(I){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var T=function leven(I,P,E){var L=[],M=[],T=E&&C&&E.useCollator,R=1;if(E&&E.subcost&&"number"==typeof E.subcost&&(R=E.subcost),I===P)return 0;var q,$,W,N,Q=I.length,U=P.length;if(0===Q)return U;if(0===U)return Q;for(var D=0,G=0;D<Q;)M[D]=I.charCodeAt(D),L[D]=++D;if(T)for(;G<U;)for(q=P.charCodeAt(G),W=G++,$=G,D=0;D<Q;D++)N=0===C.compare(String.fromCharCode(q),String.fromCharCode(M[D]))?W:W+R,W=L[D],$=L[D]=W>$?N>$?$+1:N:N>W?W+1:N;else for(;G<U;)for(q=P.charCodeAt(G),W=G++,$=G,D=0;D<Q;D++)N=q===M[D]?W:W+R,W=L[D],$=L[D]=W>$?N>$?$+1:N:N>W?W+1:N;return $};!function(I,P){if(!I.setImmediate){var C,E=1,L={},M=!1,T=I.document,R=Object.getPrototypeOf&&Object.getPrototypeOf(I);R=R&&R.setTimeout?R:I,"[object process]"==={}.toString.call(I.process)?function installNextTickImplementation(){C=function(I){process.nextTick((function(){runIfPresent(I)}))}}():!function canUsePostMessage(){if(I.postMessage&&!I.importScripts){var P=!0,C=I.onmessage;return I.onmessage=function(){P=!1},I.postMessage("","*"),I.onmessage=C,P}}()?I.MessageChannel?function installMessageChannelImplementation(){var I=new MessageChannel;I.port1.onmessage=function(I){runIfPresent(I.data)},C=function(P){I.port2.postMessage(P)}}():T&&"onreadystatechange"in T.createElement("script")?function installReadyStateChangeImplementation(){var I=T.documentElement;C=function(P){var C=T.createElement("script");C.onreadystatechange=function(){runIfPresent(P),C.onreadystatechange=null,I.removeChild(C),C=null},I.appendChild(C)}}():function installSetTimeoutImplementation(){C=function(I){setTimeout(runIfPresent,0,I)}}():function installPostMessageImplementation(){var P="setImmediate$"+Math.random()+"$",onGlobalMessage=function(C){C.source===I&&"string"==typeof C.data&&0===C.data.indexOf(P)&&runIfPresent(+C.data.slice(P.length))};I.addEventListener?I.addEventListener("message",onGlobalMessage,!1):I.attachEvent("onmessage",onGlobalMessage),C=function(C){I.postMessage(P+C,"*")}}(),R.setImmediate=function setImmediate(I){"function"!=typeof I&&(I=new Function(""+I));for(var P=new Array(arguments.length-1),M=0;M<P.length;M++)P[M]=arguments[M+1];var T={callback:I,args:P};return L[E]=T,C(E),E++},R.clearImmediate=clearImmediate}function clearImmediate(I){delete L[I]}function runIfPresent(I){if(M)setTimeout(runIfPresent,0,I);else{var P=L[I];if(P){M=!0;try{!function run(I){var P=I.callback,C=I.args;switch(C.length){case 0:P();break;case 1:P(C[0]);break;case 2:P(C[0],C[1]);break;case 3:P(C[0],C[1],C[2]);break;default:P.apply(void 0,C)}}(P)}finally{clearImmediate(I),M=!1}}}}}("undefined"==typeof self?E:self),function(){var I,P,C,E,R=M.exports.intersection,q=M.exports.difference,$=M.exports.uniq,W=T,N=function(I){var P={};function validate(I){return("string"==typeof I||I instanceof String)&&I.length>0}return P.validate=validate,P.process_and_sort=function process_and_sort(I){return validate(I)?I.match(/\S+/g).sort().join(" ").trim():""},P.tokenize=function unique_tokens(P,C){return I(P.match(/\S+/g))},P.full_process=function full_process(I,P){return I instanceof String||"string"==typeof I?(P&&(P.force_ascii||!0===P)&&(I=I.replace(/[^\x00-\x7F]/g,"")),C=I.replace(/\W|_/g," ").toLowerCase().trim(),P&&P.collapseWhitespace&&(C=C.replace(/\s+/g," ")),C):"";var C},P.clone_and_set_option_defaults=function(I){if(I&&I.isAClone)return I;var P={isAClone:!0};if(I){var C,E=Object.keys(I);for(C=0;C<E.length;C++)P[E[C]]=I[E[C]]}return void 0!==P.full_process&&!1===P.full_process||(P.full_process=!0),void 0!==P.force_ascii&&!0===P.force_ascii||(P.force_ascii=!1),void 0!==P.collapseWhitespace&&!1===P.collapseWhitespace||(P.collapseWhitespace=!0),P},P.isCustomFunc=function(I){return"function"!=typeof I||"token_set_ratio"!==I.name&&"partial_token_set_ratio"!==I.name&&"token_sort_ratio"!==I.name&&"partial_token_sort_ratio"!==I.name&&"QRatio"!==I.name&&"WRatio"!==I.name&&"distance"!==I.name&&"partial_ratio"!==I.name},P}($),Q=N.validate,U=N.process_and_sort,D=N.tokenize,G=N.full_process,V=N.clone_and_set_option_defaults,B=N.isCustomFunc;function QRatio(I,P,C){var E=V(C);return I=E.full_process?G(I,E):I,P=E.full_process?G(P,E):P,Q(I)&&Q(P)?_ratio(I,P,E):0}function extractAsync(I,P,C,E){var L,M,T=V(C);"object"==typeof C.abortController&&(L=C.abortController),"object"==typeof C.cancelToken&&(M=C.cancelToken);var R=256;"number"==typeof T.asyncLoopOffset&&(R=T.asyncLoopOffset<1?1:T.asyncLoopOffset);var q,$=!1;if(P&&P.length&&Array.isArray(P))q=P.length,$=!0;else{if(!(P instanceof Object))return void E(new Error("Invalid choices"));q=Object.keys(P).length}if(!P||0===q)return void 0!==typeof console&&console.warn("No choices"),void E(null,[]);if(T.processor&&"function"!=typeof T.processor)E(new Error("Invalid Processor"));else if(T.processor||(T.processor=function(I){return I}),T.scorer&&"function"!=typeof T.scorer)E(new Error("Invalid Scorer"));else{T.scorer||(T.scorer=QRatio);var W=B(T.scorer);T.cutoff&&"number"==typeof T.cutoff||(T.cutoff=-1);var pre_processor=function(I,P){return I};T.full_process&&(pre_processor=G,W||(T.processed=!0)),W||(I=pre_processor(I,T),T.full_process=!1,0===I.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var N,Q,H,J,K=[],X=!1,Y=!1,Z=!1;if("token_sort_ratio"===T.scorer.name||"partial_token_sort_ratio"===T.scorer.name){var ee=U(I);Y=!0}else if("token_set_ratio"===T.scorer.name||"partial_token_set_ratio"===T.scorer.name){var te=D(I);Z=!0}J=T.returnObjects?function(I,P){return P.score-I.score}:function(I,P){return P[1]-I[1]};var re=Object.keys(P);$?searchLoop(0):searchLoop(re[0],0)}function searchLoop(C,G){($||P.hasOwnProperty(C))&&(T.tokens=void 0,T.proc_sorted=!1,Y?(T.proc_sorted=!0,P[C].proc_sorted?Q=P[C].proc_sorted:(Q=pre_processor(T.processor(P[C]),T),Q=U(Q)),H=T.scorer(ee,Q,T)):Z?(Q="x",P[C].tokens?(T.tokens=[te,P[C].tokens],T.trySimple&&(Q=pre_processor(T.processor(P[C]),T))):(Q=pre_processor(T.processor(P[C]),T),T.tokens=[te,D(Q)]),H=T.scorer(I,Q,T)):W?(Q=T.processor(P[C]),H=T.scorer(I,Q,T)):("string"==typeof(Q=pre_processor(T.processor(P[C]),T))&&0!==Q.length||(X=!0),H=T.scorer(I,Q,T)),N=$?parseInt(C):C,H>T.cutoff&&(T.returnObjects?K.push({choice:P[C],score:H,key:N}):K.push([P[C],H,N]))),L&&!0===L.signal.aborted?E(new Error("aborted")):M&&!0===M.canceled?E(new Error("canceled")):$&&C<P.length-1?C%R==0?setImmediate((function(){searchLoop(C+1)})):searchLoop(C+1):G<re.length-1?G%R==0?setImmediate((function(){searchLoop(re[G+1],G+1)})):searchLoop(re[G+1],G+1):(X&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),T.limit&&"number"==typeof T.limit&&T.limit>0&&T.limit<q&&!T.unsorted?K=K.sort(J).slice(0,T.limit):T.unsorted||(K=K.sort(J)),E(null,K))}}function _ratio(I,P,C){return Q(I)&&Q(P)?(void 0===C.subcost&&(C.subcost=2),E=W(I,P,C),L=I.length+P.length,Math.round((L-E)/L*100)):0;var E,L}void 0===Array.isArray&&(Array.isArray=function(I){return"[object Array]"===Object.prototype.toString.call(I)}),Object.keys||(Object.keys=(I=Object.prototype.hasOwnProperty,P=!{toString:null}.propertyIsEnumerable("toString"),E=(C=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(L){if("object"!=typeof L&&("function"!=typeof L||null===L))throw new TypeError("Object.keys called on non-object");var M,T,R=[];for(M in L)I.call(L,M)&&R.push(M);if(P)for(T=0;T<E;T++)I.call(L,C[T])&&R.push(C[T]);return R}));var H=void 0;"undefined"!=typeof Promise&&(H=function(I,P,C){return new Promise((function(E,L){extractAsync(I,P,C,(function(I,P){I?L(I):E(P)}))}))});var J={distance:function distance(I,P,C){var E=V(C);return I=E.full_process?G(I,E):I,P=E.full_process?G(P,E):P,W(I,P,E)},ratio:QRatio,token_set_ratio:function token_set_ratio(I,P,C){var E=V(C);return I=E.full_process?G(I,E):I,P=E.full_process?G(P,E):P,Q(I)&&Q(P)?function _token_set(I,P,C){if(C.tokens)E=C.tokens[0],L=C.tokens[1];else var E=D(I),L=D(P);var M=R(E,L),T=q(E,L),$=q(L,E),W=M.sort().join(" "),N=T.sort().join(" "),Q=$.sort().join(" "),U=W+" "+N,G=W+" "+Q;W=W.trim(),U=U.trim(),G=G.trim();var V=_ratio,B=[V(W,U,C),V(W,G,C),V(U,G,C)];C.trySimple&&B.push(V(I,P,C));return Math.max.apply(null,B)}(I,P,E):0},token_sort_ratio:function token_sort_ratio(I,P,C){var E=V(C);return I=E.full_process?G(I,E):I,P=E.full_process?G(P,E):P,Q(I)&&Q(P)?(E.proc_sorted||(I=U(I),P=U(P)),_ratio(I,P,E)):0},full_process:G,extract:function extract(I,P,C){var E,L=V(C),M=!1;if(P&&P.length&&Array.isArray(P))E=P.length,M=!0;else{if(!(P instanceof Object))throw new Error("Invalid choices");E=Object.keys(P).length}if(!P||0===E)return void 0!==typeof console&&console.warn("No choices"),[];if(L.processor&&"function"!=typeof L.processor)throw new Error("Invalid Processor");if(L.processor||(L.processor=function(I){return I}),L.scorer&&"function"!=typeof L.scorer)throw new Error("Invalid Scorer");L.scorer||(L.scorer=QRatio);var T=B(L.scorer);L.cutoff&&"number"==typeof L.cutoff||(L.cutoff=-1);var pre_processor=function(I,P){return I};L.full_process&&(pre_processor=G,T||(L.processed=!0)),T||(I=pre_processor(I,L),L.full_process=!1,0===I.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var R,q,$,W,N=[],Q=!1,H=!1,J=!1;if("token_sort_ratio"===L.scorer.name||"partial_token_sort_ratio"===L.scorer.name){var K=U(I);H=!0}else if("token_set_ratio"===L.scorer.name||"partial_token_set_ratio"===L.scorer.name){var X=D(I);J=!0}for(var Y in W=L.returnObjects?function(I,P){return P.score-I.score}:function(I,P){return P[1]-I[1]},P)(M||P.hasOwnProperty(Y))&&(L.tokens=void 0,L.proc_sorted=!1,H?(L.proc_sorted=!0,P[Y]&&P[Y].proc_sorted?q=P[Y].proc_sorted:(q=pre_processor(L.processor(P[Y]),L),q=U(q)),$=L.scorer(K,q,L)):J?(q="x",P[Y]&&P[Y].tokens?(L.tokens=[X,P[Y].tokens],L.trySimple&&(q=pre_processor(L.processor(P[Y]),L))):(q=pre_processor(L.processor(P[Y]),L),L.tokens=[X,D(q)]),$=L.scorer(I,q,L)):T?(q=L.processor(P[Y]),$=L.scorer(I,q,L)):("string"==typeof(q=pre_processor(L.processor(P[Y]),L))&&0!==q.length||(Q=!0),$=L.scorer(I,q,L)),R=M?parseInt(Y):Y,$>L.cutoff&&(L.returnObjects?N.push({choice:P[Y],score:$,key:R}):N.push([P[Y],$,R])));return Q&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),L.limit&&"number"==typeof L.limit&&L.limit>0&&L.limit<E&&!L.unsorted?N=N.sort(W).slice(0,L.limit):L.unsorted||(N=N.sort(W)),N},extractAsync:extractAsync,extractAsPromised:H,process_and_sort:U,unique_tokens:D};L.exports=J}();var R=L.exports;const q=R.distance,$=R.ratio,W=R.token_set_ratio,N=R.token_sort_ratio,Q=R.full_process,U=R.extract,D=R.extractAsync,G=R.extractAsPromised,V=R.process_and_sort,B=R.unique_tokens;export{q as distance,U as extract,G as extractAsPromised,D as extractAsync,Q as full_process,V as process_and_sort,$ as ratio,W as token_set_ratio,N as token_sort_ratio,B as unique_tokens}; | ||
| var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t={exports:{}};var r=function arrayMap$3(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},n="object"==typeof e&&e&&e.Object===Object&&e,o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")(),s=a.Symbol,i=s,c=Object.prototype,u=c.hasOwnProperty,l=c.toString,f=i?i.toStringTag:void 0;var p=function getRawTag$1(e){var t=u.call(e,f),r=e[f];try{e[f]=void 0;var n=!0}catch(e){}var o=l.call(e);return n&&(t?e[f]=r:delete e[f]),o},h=Object.prototype.toString;var v=p,_=function objectToString$1(e){return h.call(e)},d=s?s.toStringTag:void 0;var y=function baseGetTag$2(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":d&&d in Object(e)?v(e):_(e)};var g=function isObject$2(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},m=y,b=g;var $,k=function isFunction$2(e){if(!b(e))return!1;var t=m(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},C=a["__core-js_shared__"],O=($=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"";var j=function isMasked$1(e){return!!O&&O in e},w=Function.prototype.toString;var I=k,S=j,A=g,P=function toSource$1(e){if(null!=e){try{return w.call(e)}catch(e){}try{return e+""}catch(e){}}return""},x=/^\[object .+?Constructor\]$/,L=Function.prototype,M=Object.prototype,E=L.toString,T=M.hasOwnProperty,z=RegExp("^"+E.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var F=function baseIsNative$1(e){return!(!A(e)||S(e))&&(I(e)?z:x).test(P(e))},H=function getValue$1(e,t){return null==e?void 0:e[t]};var R=function getNative$4(e,t){var r=H(e,t);return F(r)?r:void 0},q=R(Object,"create"),N=q;var W=function hashClear$1(){this.__data__=N?N(null):{},this.size=0};var D=function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},G=q,Q=Object.prototype.hasOwnProperty;var U=function hashGet$1(e){var t=this.__data__;if(G){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return Q.call(t,e)?t[e]:void 0},K=q,V=Object.prototype.hasOwnProperty;var B=q;var J=W,X=D,Y=U,Z=function hashHas$1(e){var t=this.__data__;return K?void 0!==t[e]:V.call(t,e)},ee=function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=B&&void 0===t?"__lodash_hash_undefined__":t,this};function Hash$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash$1.prototype.clear=J,Hash$1.prototype.delete=X,Hash$1.prototype.get=Y,Hash$1.prototype.has=Z,Hash$1.prototype.set=ee;var te=Hash$1;var re=function listCacheClear$1(){this.__data__=[],this.size=0};var ne=function eq$1(e,t){return e===t||e!=e&&t!=t};var oe=function assocIndexOf$4(e,t){for(var r=e.length;r--;)if(ne(e[r][0],t))return r;return-1},ae=oe,se=Array.prototype.splice;var ie=oe;var ce=oe;var ue=oe;var le=re,fe=function listCacheDelete$1(e){var t=this.__data__,r=ae(t,e);return!(r<0)&&(r==t.length-1?t.pop():se.call(t,r,1),--this.size,!0)},pe=function listCacheGet$1(e){var t=this.__data__,r=ie(t,e);return r<0?void 0:t[r][1]},he=function listCacheHas$1(e){return ce(this.__data__,e)>-1},ve=function listCacheSet$1(e,t){var r=this.__data__,n=ue(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function ListCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache$1.prototype.clear=le,ListCache$1.prototype.delete=fe,ListCache$1.prototype.get=pe,ListCache$1.prototype.has=he,ListCache$1.prototype.set=ve;var _e=ListCache$1,de=R(a,"Map"),ye=te,ge=_e,me=de;var be=function isKeyable$1(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var $e=function getMapData$4(e,t){var r=e.__data__;return be(t)?r["string"==typeof t?"string":"hash"]:r.map},ke=$e;var Ce=$e;var Oe=$e;var je=$e;var we=function mapCacheClear$1(){this.size=0,this.__data__={hash:new ye,map:new(me||ge),string:new ye}},Ie=function mapCacheDelete$1(e){var t=ke(this,e).delete(e);return this.size-=t?1:0,t},Se=function mapCacheGet$1(e){return Ce(this,e).get(e)},Ae=function mapCacheHas$1(e){return Oe(this,e).has(e)},Pe=function mapCacheSet$1(e,t){var r=je(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function MapCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache$1.prototype.clear=we,MapCache$1.prototype.delete=Ie,MapCache$1.prototype.get=Se,MapCache$1.prototype.has=Ae,MapCache$1.prototype.set=Pe;var xe=MapCache$1,Le=function setCacheAdd$1(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Me=function setCacheHas$1(e){return this.__data__.has(e)};function SetCache$3(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new xe;++t<r;)this.add(e[t])}SetCache$3.prototype.add=SetCache$3.prototype.push=Le,SetCache$3.prototype.has=Me;var Ee=SetCache$3;var Te=function baseFindIndex$1(e,t,r,n){for(var o=e.length,a=r+(n?1:-1);n?a--:++a<o;)if(t(e[a],a,e))return a;return-1},ze=function baseIsNaN$1(e){return e!=e},Fe=function strictIndexOf$1(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1};var He=function baseIndexOf$1(e,t,r){return t==t?Fe(e,t,r):Te(e,ze,r)};var Re=function arrayIncludes$3(e,t){return!!(null==e?0:e.length)&&He(e,t,0)>-1};var qe=function arrayIncludesWith$3(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1};var Ne=function baseUnary$2(e){return function(t){return e(t)}};var We=function cacheHas$3(e,t){return e.has(t)},De=Ee,Ge=Re,Qe=qe,Ue=r,Ke=Ne,Ve=We,Be=Math.min;var Je=function baseIntersection$1(e,t,r){for(var n=r?Qe:Ge,o=e[0].length,a=e.length,s=a,i=Array(a),c=1/0,u=[];s--;){var l=e[s];s&&t&&(l=Ue(l,Ke(t))),c=Be(l.length,c),i[s]=!r&&(t||o>=120&&l.length>=120)?new De(s&&l):void 0}l=e[0];var f=-1,p=i[0];e:for(;++f<o&&u.length<c;){var h=l[f],v=t?t(h):h;if(h=r||0!==h?h:0,!(p?Ve(p,v):n(u,v,r))){for(s=a;--s;){var _=i[s];if(!(_?Ve(_,v):n(e[s],v,r)))continue e}p&&p.push(v),u.push(h)}}return u};var Xe=function identity$2(e){return e};var Ye=function apply$1(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)},Ze=Math.max;var et=function overRest$1(e,t,r){return t=Ze(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=Ze(n.length-t,0),s=Array(a);++o<a;)s[o]=n[t+o];o=-1;for(var i=Array(t+1);++o<t;)i[o]=n[o];return i[t]=r(s),Ye(e,this,i)}};var tt=function constant$1(e){return function(){return e}},rt=R,nt=function(){try{var e=rt(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),ot=tt,at=nt,st=at?function(e,t){return at(e,"toString",{configurable:!0,enumerable:!1,value:ot(t),writable:!0})}:Xe,it=Date.now;var ct=function shortOut$1(e){var t=0,r=0;return function(){var n=it(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(st),ut=Xe,lt=et,ft=ct;var pt=function baseRest$2(e,t){return ft(lt(e,t,ut),e+"")};var ht=k,vt=function isLength$1(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var _t=function isObjectLike$3(e){return null!=e&&"object"==typeof e},dt=function isArrayLike$1(e){return null!=e&&vt(e.length)&&!ht(e)},yt=_t;var gt=function isArrayLikeObject$2(e){return yt(e)&&dt(e)},mt=gt;var bt=r,$t=Je,kt=function castArrayLikeObject$1(e){return mt(e)?e:[]},Ct=pt((function(e){var t=bt(e,kt);return t.length&&t[0]===e[0]?$t(t):[]})),Ot=Ee,jt=Re,wt=qe,It=r,St=Ne,At=We;var Pt=function baseDifference$1(e,t,r,n){var o=-1,a=jt,s=!0,i=e.length,c=[],u=t.length;if(!i)return c;r&&(t=It(t,St(r))),n?(a=wt,s=!1):t.length>=200&&(a=At,s=!1,t=new Ot(t));e:for(;++o<i;){var l=e[o],f=null==r?l:r(l);if(l=n||0!==l?l:0,s&&f==f){for(var p=u;p--;)if(t[p]===f)continue e;c.push(l)}else a(t,f,n)||c.push(l)}return c};var xt=function arrayPush$1(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},Lt=y,Mt=_t;var Et=function baseIsArguments$1(e){return Mt(e)&&"[object Arguments]"==Lt(e)},Tt=_t,zt=Object.prototype,Ft=zt.hasOwnProperty,Ht=zt.propertyIsEnumerable,Rt=Et(function(){return arguments}())?Et:function(e){return Tt(e)&&Ft.call(e,"callee")&&!Ht.call(e,"callee")},qt=Array.isArray,Nt=Rt,Wt=qt,Dt=s?s.isConcatSpreadable:void 0;var Gt=xt,Qt=function isFlattenable$1(e){return Wt(e)||Nt(e)||!!(Dt&&e&&e[Dt])};var Ut=function baseFlatten$1(e,t,r,n,o){var a=-1,s=e.length;for(r||(r=Qt),o||(o=[]);++a<s;){var i=e[a];t>0&&r(i)?t>1?baseFlatten$1(i,t-1,r,n,o):Gt(o,i):n||(o[o.length]=i)}return o},Kt=Pt,Vt=Ut,Bt=gt,Jt=pt((function(e,t){return Bt(e)?Kt(e,Vt(t,1,Bt,!0)):[]}));var Xt=function setToArray$2(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r},Yt=R(a,"Set"),Zt=function noop$1(){},er=Yt&&1/Xt(new Yt([,-0]))[1]==1/0?function(e){return new Yt(e)}:Zt,tr=Ee,rr=Re,nr=qe,or=We,ar=er,sr=Xt;var ir=function baseUniq$1(e,t,r){var n=-1,o=rr,a=e.length,s=!0,i=[],c=i;if(r)s=!1,o=nr;else if(a>=200){var u=t?null:ar(e);if(u)return sr(u);s=!1,o=or,c=new tr}else c=t?[]:i;e:for(;++n<a;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,s&&f==f){for(var p=c.length;p--;)if(c[p]===f)continue e;t&&c.push(f),i.push(l)}else o(c,f,r)||(c!==i&&c.push(f),i.push(l))}return i};var cr,ur=function uniq(e){return e&&e.length?ir(e):[]};try{cr="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(e){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var lr=function leven(e,t,r){var n=[],o=[],a=r&&cr&&r.useCollator,s=1;if(r&&r.subcost&&"number"==typeof r.subcost&&(s=r.subcost),e===t)return 0;var i,c,u,l,f=e.length,p=t.length;if(0===f)return p;if(0===p)return f;for(var h=0,v=0;h<f;)o[h]=e.charCodeAt(h),n[h]=++h;if(a)for(;v<p;)for(i=t.charCodeAt(v),u=v++,c=v,h=0;h<f;h++)l=0===cr.compare(String.fromCharCode(i),String.fromCharCode(o[h]))?u:u+s,u=n[h],c=n[h]=u>c?l>c?c+1:l:l>u?u+1:l;else for(;v<p;)for(i=t.charCodeAt(v),u=v++,c=v,h=0;h<f;h++)l=i===o[h]?u:u+s,u=n[h],c=n[h]=u>c?l>c?c+1:l:l>u?u+1:l;return c};!function(e,t){if(!e.setImmediate){var r,n=1,o={},a=!1,s=e.document,i=Object.getPrototypeOf&&Object.getPrototypeOf(e);i=i&&i.setTimeout?i:e,"[object process]"==={}.toString.call(e.process)?function installNextTickImplementation(){r=function(e){process.nextTick((function(){runIfPresent(e)}))}}():!function canUsePostMessage(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?function installMessageChannelImplementation(){var e=new MessageChannel;e.port1.onmessage=function(e){runIfPresent(e.data)},r=function(t){e.port2.postMessage(t)}}():s&&"onreadystatechange"in s.createElement("script")?function installReadyStateChangeImplementation(){var e=s.documentElement;r=function(t){var r=s.createElement("script");r.onreadystatechange=function(){runIfPresent(t),r.onreadystatechange=null,e.removeChild(r),r=null},e.appendChild(r)}}():function installSetTimeoutImplementation(){r=function(e){setTimeout(runIfPresent,0,e)}}():function installPostMessageImplementation(){var t="setImmediate$"+Math.random()+"$",onGlobalMessage=function(r){r.source===e&&"string"==typeof r.data&&0===r.data.indexOf(t)&&runIfPresent(+r.data.slice(t.length))};e.addEventListener?e.addEventListener("message",onGlobalMessage,!1):e.attachEvent("onmessage",onGlobalMessage),r=function(r){e.postMessage(t+r,"*")}}(),i.setImmediate=function setImmediate(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),a=0;a<t.length;a++)t[a]=arguments[a+1];var s={callback:e,args:t};return o[n]=s,r(n),n++},i.clearImmediate=clearImmediate}function clearImmediate(e){delete o[e]}function runIfPresent(e){if(a)setTimeout(runIfPresent,0,e);else{var t=o[e];if(t){a=!0;try{!function run(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{clearImmediate(e),a=!1}}}}}("undefined"==typeof self?e:self),function(){var e=Ct,r=Jt,n=lr,o=function(e){var t={};function validate(e){return("string"==typeof e||e instanceof String)&&e.length>0}return t.validate=validate,t.process_and_sort=function process_and_sort(e){return validate(e)?e.match(/\S+/g).sort().join(" ").trim():""},t.tokenize=function unique_tokens(t,r){return e(t.match(/\S+/g))},t.full_process=function full_process(e,t){return e instanceof String||"string"==typeof e?(t&&(t.force_ascii||!0===t)&&(e=e.replace(/[^\x00-\x7F]/g,"")),r=e.replace(/\W|_/g," ").toLowerCase().trim(),t&&t.collapseWhitespace&&(r=r.replace(/\s+/g," ")),r):"";var r},t.clone_and_set_option_defaults=function(e){if(e&&e.isAClone)return e;var t={isAClone:!0};if(e){var r,n=Object.keys(e);for(r=0;r<n.length;r++)t[n[r]]=e[n[r]]}return void 0!==t.full_process&&!1===t.full_process||(t.full_process=!0),void 0!==t.force_ascii&&!0===t.force_ascii||(t.force_ascii=!1),void 0!==t.collapseWhitespace&&!1===t.collapseWhitespace||(t.collapseWhitespace=!0),t},t.isCustomFunc=function(e){return"function"!=typeof e||"token_set_ratio"!==e.name&&"partial_token_set_ratio"!==e.name&&"token_sort_ratio"!==e.name&&"partial_token_sort_ratio"!==e.name&&"QRatio"!==e.name&&"WRatio"!==e.name&&"distance"!==e.name&&"partial_ratio"!==e.name},t}(ur),a=o.validate,s=o.process_and_sort,i=o.tokenize,c=o.full_process,u=o.clone_and_set_option_defaults,l=o.isCustomFunc;function QRatio(e,t,r){var n=u(r);return e=n.full_process?c(e,n):e,t=n.full_process?c(t,n):t,a(e)&&a(t)?_ratio(e,t,n):0}function extractAsync(e,t,r,n){var o,a,f=u(r);"object"==typeof r.abortController&&(o=r.abortController),"object"==typeof r.cancelToken&&(a=r.cancelToken);var p=256;"number"==typeof f.asyncLoopOffset&&(p=f.asyncLoopOffset<1?1:f.asyncLoopOffset);var h,v=!1;if(t&&t.length&&Array.isArray(t))h=t.length,v=!0;else{if(!(t instanceof Object))return void n(new Error("Invalid choices"));h=Object.keys(t).length}if(!t||0===h)return void 0!==typeof console&&console.warn("No choices"),void n(null,[]);if(f.processor&&"function"!=typeof f.processor)n(new Error("Invalid Processor"));else if(f.processor||(f.processor=function(e){return e}),f.scorer&&"function"!=typeof f.scorer)n(new Error("Invalid Scorer"));else{f.scorer||(f.scorer=QRatio);var _=l(f.scorer);f.cutoff&&"number"==typeof f.cutoff||(f.cutoff=-1);var pre_processor=function(e,t){return e};f.full_process&&(pre_processor=c,_||(f.processed=!0)),_||(e=pre_processor(e,f),f.full_process=!1,0===e.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var d,y,g,m,b=[],$=!1,k=!1,C=!1;if("token_sort_ratio"===f.scorer.name||"partial_token_sort_ratio"===f.scorer.name){var O=s(e);k=!0}else if("token_set_ratio"===f.scorer.name||"partial_token_set_ratio"===f.scorer.name){var j=i(e);C=!0}m=f.returnObjects?function(e,t){return t.score-e.score}:function(e,t){return t[1]-e[1]};var w=Object.keys(t);v?searchLoop(0):searchLoop(w[0],0)}function searchLoop(r,c){(v||t.hasOwnProperty(r))&&(f.tokens=void 0,f.proc_sorted=!1,k?(f.proc_sorted=!0,t[r].proc_sorted?y=t[r].proc_sorted:(y=pre_processor(f.processor(t[r]),f),y=s(y)),g=f.scorer(O,y,f)):C?(y="x",t[r].tokens?(f.tokens=[j,t[r].tokens],f.trySimple&&(y=pre_processor(f.processor(t[r]),f))):(y=pre_processor(f.processor(t[r]),f),f.tokens=[j,i(y)]),g=f.scorer(e,y,f)):_?(y=f.processor(t[r]),g=f.scorer(e,y,f)):("string"==typeof(y=pre_processor(f.processor(t[r]),f))&&0!==y.length||($=!0),g=f.scorer(e,y,f)),d=v?parseInt(r):r,g>f.cutoff&&(f.returnObjects?b.push({choice:t[r],score:g,key:d}):b.push([t[r],g,d]))),o&&!0===o.signal.aborted?n(new Error("aborted")):a&&!0===a.canceled?n(new Error("canceled")):v&&r<t.length-1?r%p==0?setImmediate((function(){searchLoop(r+1)})):searchLoop(r+1):c<w.length-1?c%p==0?setImmediate((function(){searchLoop(w[c+1],c+1)})):searchLoop(w[c+1],c+1):($&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),f.limit&&"number"==typeof f.limit&&f.limit>0&&f.limit<h&&!f.unsorted?b=b.sort(m).slice(0,f.limit):f.unsorted||(b=b.sort(m)),n(null,b))}}function _ratio(e,t,r){return a(e)&&a(t)?(void 0===r.subcost&&(r.subcost=2),o=n(e,t,r),s=e.length+t.length,Math.round((s-o)/s*100)):0;var o,s}void 0===Array.isArray&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),Object.keys||(Object.keys=function(){var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=r.length;return function(o){if("object"!=typeof o&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on non-object");var a,s,i=[];for(a in o)e.call(o,a)&&i.push(a);if(t)for(s=0;s<n;s++)e.call(o,r[s])&&i.push(r[s]);return i}}());var f=void 0;"undefined"!=typeof Promise&&(f=function(e,t,r){return new Promise((function(n,o){extractAsync(e,t,r,(function(e,t){e?o(e):n(t)}))}))});var p={distance:function distance(e,t,r){var o=u(r);return e=o.full_process?c(e,o):e,t=o.full_process?c(t,o):t,n(e,t,o)},ratio:QRatio,token_set_ratio:function token_set_ratio(t,n,o){var s=u(o);return t=s.full_process?c(t,s):t,n=s.full_process?c(n,s):n,a(t)&&a(n)?function _token_set(t,n,o){if(o.tokens)a=o.tokens[0],s=o.tokens[1];else var a=i(t),s=i(n);var c=e(a,s),u=r(a,s),l=r(s,a),f=c.sort().join(" "),p=u.sort().join(" "),h=l.sort().join(" "),v=f+" "+p,_=f+" "+h;f=f.trim(),v=v.trim(),_=_.trim();var d=_ratio,y=[d(f,v,o),d(f,_,o),d(v,_,o)];o.trySimple&&y.push(d(t,n,o));return Math.max.apply(null,y)}(t,n,s):0},token_sort_ratio:function token_sort_ratio(e,t,r){var n=u(r);return e=n.full_process?c(e,n):e,t=n.full_process?c(t,n):t,a(e)&&a(t)?(n.proc_sorted||(e=s(e),t=s(t)),_ratio(e,t,n)):0},full_process:c,extract:function extract(e,t,r){var n,o=u(r),a=!1;if(t&&t.length&&Array.isArray(t))n=t.length,a=!0;else{if(!(t instanceof Object))throw new Error("Invalid choices");n=Object.keys(t).length}if(!t||0===n)return void 0!==typeof console&&console.warn("No choices"),[];if(o.processor&&"function"!=typeof o.processor)throw new Error("Invalid Processor");if(o.processor||(o.processor=function(e){return e}),o.scorer&&"function"!=typeof o.scorer)throw new Error("Invalid Scorer");o.scorer||(o.scorer=QRatio);var f=l(o.scorer);o.cutoff&&"number"==typeof o.cutoff||(o.cutoff=-1);var pre_processor=function(e,t){return e};o.full_process&&(pre_processor=c,f||(o.processed=!0)),f||(e=pre_processor(e,o),o.full_process=!1,0===e.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var p,h,v,_,d=[],y=!1,g=!1,m=!1;if("token_sort_ratio"===o.scorer.name||"partial_token_sort_ratio"===o.scorer.name){var b=s(e);g=!0}else if("token_set_ratio"===o.scorer.name||"partial_token_set_ratio"===o.scorer.name){var $=i(e);m=!0}for(var k in _=o.returnObjects?function(e,t){return t.score-e.score}:function(e,t){return t[1]-e[1]},t)(a||t.hasOwnProperty(k))&&(o.tokens=void 0,o.proc_sorted=!1,g?(o.proc_sorted=!0,t[k]&&t[k].proc_sorted?h=t[k].proc_sorted:(h=pre_processor(o.processor(t[k]),o),h=s(h)),v=o.scorer(b,h,o)):m?(h="x",t[k]&&t[k].tokens?(o.tokens=[$,t[k].tokens],o.trySimple&&(h=pre_processor(o.processor(t[k]),o))):(h=pre_processor(o.processor(t[k]),o),o.tokens=[$,i(h)]),v=o.scorer(e,h,o)):f?(h=o.processor(t[k]),v=o.scorer(e,h,o)):("string"==typeof(h=pre_processor(o.processor(t[k]),o))&&0!==h.length||(y=!0),v=o.scorer(e,h,o)),p=a?parseInt(k):k,v>o.cutoff&&(o.returnObjects?d.push({choice:t[k],score:v,key:p}):d.push([t[k],v,p])));return y&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),o.limit&&"number"==typeof o.limit&&o.limit>0&&o.limit<n&&!o.unsorted?d=d.sort(_).slice(0,o.limit):o.unsorted||(d=d.sort(_)),d},extractAsync:extractAsync,extractAsPromised:f,process_and_sort:s,unique_tokens:i};t.exports=p}();var fr=t.exports;const pr=fr.distance,hr=fr.ratio,vr=fr.token_set_ratio,_r=fr.token_sort_ratio,dr=fr.full_process,yr=fr.extract,gr=fr.extractAsync,mr=fr.extractAsPromised,br=fr.process_and_sort,$r=fr.unique_tokens;export{pr as distance,yr as extract,mr as extractAsPromised,gr as extractAsync,dr as full_process,br as process_and_sort,hr as ratio,vr as token_set_ratio,_r as token_sort_ratio,$r as unique_tokens}; |
| (function () { | ||
| /** @module fuzzball */ | ||
| 'use strict'; | ||
| var _intersect = require('./lodash.custom.min.js').intersection; | ||
| var _difference = require('./lodash.custom.min.js').difference; | ||
| var _uniq = require('./lodash.custom.min.js').uniq; | ||
| var _intersect = require('lodash/intersection'); | ||
| var _difference = require('lodash/difference'); | ||
| var _uniq = require('lodash/uniq'); | ||
| var leven = require('../lib/leven'); | ||
@@ -8,0 +10,0 @@ |
@@ -1,7 +0,1 @@ | ||
| !function(I,P){"object"==typeof exports&&"undefined"!=typeof module?module.exports=P():"function"==typeof define&&define.amd?define(P):(I="undefined"!=typeof globalThis?globalThis:I||self).fuzzball=P()}(this,(function(){"use strict";var I,P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},C={exports:{}},E={exports:{}}; | ||
| /** | ||
| * @license | ||
| * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE | ||
| * Build: `lodash include="intersection,difference,uniq" -p -o ./ultra_lite/lodash.custom.min.js` | ||
| */ | ||
| !function(I,C){(function(){function t(I,P,C){switch(C.length){case 0:return I.call(P);case 1:return I.call(P,C[0]);case 2:return I.call(P,C[0],C[1]);case 3:return I.call(P,C[0],C[1],C[2])}return I.apply(P,C)}function e(I,P){var C;if(C=!(null==I||!I.length)){if(P==P)e:{C=-1;for(var E=I.length;++C<E;)if(I[C]===P)break e;C=-1}else e:{C=n;E=I.length;for(var L=-1;++L<E;)if(C(I[L],L,I)){C=L;break e}C=-1}C=-1<C}return C}function n(I){return I!=I}function r(I,P){return I.has(P)}function o(I){var P=-1,C=Array(I.size);return I.forEach((function(I){C[++P]=I})),C}function i(){}function u(I){var P=-1,C=null==I?0:I.length;for(this.clear();++P<C;){var E=I[P];this.set(E[0],E[1])}}function a(I){var P=-1,C=null==I?0:I.length;for(this.clear();++P<C;){var E=I[P];this.set(E[0],E[1])}}function l(I){var P=-1,C=null==I?0:I.length;for(this.clear();++P<C;){var E=I[P];this.set(E[0],E[1])}}function c(I){var P=-1,C=null==I?0:I.length;for(this.__data__=new l;++P<C;)this.add(I[P])}function s(I,P){for(var C=I.length;C--;)if(j(I[C][0],P))return C;return-1}function f(I,P,C,E,L){var T=-1,M=I.length;for(C||(C=g),L||(L=[]);++T<M;){var R=I[T];if(0<P&&C(R))if(1<P)f(R,P-1,C,E,L);else for(var $=L,q=-1,W=R.length,N=$.length;++q<W;)$[N+q]=R[q];else E||(L[L.length]=R)}return L}function h(I){if(null==I)return I===E?"[object Undefined]":"[object Null]";if(X&&X in Object(I)){var P=U.call(I,X),C=I[X];try{I[X]=E;var L=!0}catch(I){}var T=G.call(I);L&&(P?I[X]=C:delete I[X]),I=T}else I=G.call(I);return I}function _(I){return x(I)&&"[object Arguments]"==h(I)}function p(I,P){return ie(v(I,P,k),I+"")}function y(I,P){var C=I.__data__,E=typeof P;return("string"==E||"number"==E||"symbol"==E||"boolean"==E?"__proto__"!==P:null===P)?C["string"==typeof P?"string":"hash"]:C.map}function d(I,P){var C=null==I?E:I[P];return!(!z(C)||D&&D in C)&&(w(C)?V:T).test(function b(I){if(null!=I){try{return Q.call(I)}catch(I){}return I+""}return""}(C))?C:E}function g(I){return ce(I)||ae(I)||!!(K&&I&&I[K])}function v(I,P,C){return P=Z(P===E?I.length-1:P,0),function(){for(var E=arguments,L=-1,T=Z(E.length-P,0),M=Array(T);++L<T;)M[L]=E[P+L];for(L=-1,T=Array(P+1);++L<P;)T[L]=E[L];return T[P]=C(M),t(I,this,T)}}function j(I,P){return I===P||I!=I&&P!=P}function m(I){return null!=I&&A(I.length)&&!w(I)}function O(I){return x(I)&&m(I)}function w(I){return!!z(I)&&("[object Function]"==(I=h(I))||"[object GeneratorFunction]"==I||"[object AsyncFunction]"==I||"[object Proxy]"==I)}function A(I){return"number"==typeof I&&-1<I&&0==I%1&&9007199254740991>=I}function z(I){var P=typeof I;return null!=I&&("object"==P||"function"==P)}function x(I){return null!=I&&"object"==typeof I}function S(I){return function(){return I}}function k(I){return I}function F(){}var E,L=1/0,T=/^\[object .+?Constructor\]$/,M="object"==typeof self&&self&&self.Object===Object&&self,R=(M="object"==typeof P&&P&&P.Object===Object&&P||M||Function("return this")(),C&&!C.nodeType&&C),$=R&&I&&!I.nodeType&&I,q=Array.prototype,W=Object.prototype,N=M["__core-js_shared__"],Q=Function.prototype.toString,U=W.hasOwnProperty,D=function(){var I=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||"");return I?"Symbol(src)_1."+I:""}(),G=W.toString,V=RegExp("^"+Q.call(U).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),B=M.Symbol,H=W.propertyIsEnumerable,J=q.splice,K=B?B.isConcatSpreadable:E,X=B?B.toStringTag:E,Y=function(){try{var I=d(Object,"defineProperty");return I({},"",{}),I}catch(I){}}(),Z=Math.max,ee=Math.min,te=Date.now,re=d(M,"Map"),ne=d(M,"Set"),oe=d(Object,"create");u.prototype.clear=function(){this.__data__=oe?oe(null):{},this.size=0},u.prototype.delete=function(I){return I=this.has(I)&&delete this.__data__[I],this.size-=I?1:0,I},u.prototype.get=function(I){var P=this.__data__;return oe?"__lodash_hash_undefined__"===(I=P[I])?E:I:U.call(P,I)?P[I]:E},u.prototype.has=function(I){var P=this.__data__;return oe?P[I]!==E:U.call(P,I)},u.prototype.set=function(I,P){var C=this.__data__;return this.size+=this.has(I)?0:1,C[I]=oe&&P===E?"__lodash_hash_undefined__":P,this},a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(I){var P=this.__data__;return!(0>(I=s(P,I))||(I==P.length-1?P.pop():J.call(P,I,1),--this.size,0))},a.prototype.get=function(I){var P=this.__data__;return 0>(I=s(P,I))?E:P[I][1]},a.prototype.has=function(I){return-1<s(this.__data__,I)},a.prototype.set=function(I,P){var C=this.__data__,E=s(C,I);return 0>E?(++this.size,C.push([I,P])):C[E][1]=P,this},l.prototype.clear=function(){this.size=0,this.__data__={hash:new u,map:new(re||a),string:new u}},l.prototype.delete=function(I){return I=y(this,I).delete(I),this.size-=I?1:0,I},l.prototype.get=function(I){return y(this,I).get(I)},l.prototype.has=function(I){return y(this,I).has(I)},l.prototype.set=function(I,P){var C=y(this,I),E=C.size;return C.set(I,P),this.size+=C.size==E?0:1,this},c.prototype.add=c.prototype.push=function(I){return this.__data__.set(I,"__lodash_hash_undefined__"),this},c.prototype.has=function(I){return this.__data__.has(I)};q=Y?function(I,P){return Y(I,"toString",{configurable:!0,enumerable:!1,value:S(P),writable:!0})}:k;var se=ne&&1/o(new ne([,-0]))[1]==L?function(I){return new ne(I)}:F,ie=function(I){var P=0,C=0;return function(){var L=te(),T=16-(L-C);if(C=L,0<T){if(800<=++P)return arguments[0]}else P=0;return I.apply(E,arguments)}}(q),ae=(L=p((function(I,P){var C;if(O(I)){C=f(P,1,O,!0);var E=-1,L=e,T=!0,M=I.length,R=[],$=C.length;if(M)e:for(200<=C.length&&(L=r,T=!1,C=new c(C));++E<M;){var q=W=I[E],W=0!==W?W:0;if(T&&q==q){for(var N=$;N--;)if(C[N]===q)continue e;R.push(W)}else L(C,q,void 0)||R.push(W)}C=R}else C=[];return C})),q=p((function(I){for(var P=-1,C=null==I?0:I.length,L=Array(C);++P<C;){var T,M=P;T=O(T=I[P])?T:[],L[M]=T}if(L.length&&L[0]===I[0]){I=L[0].length,C=P=L.length,M=Array(P),T=1/0;for(var R=[];C--;){var $=L[C];T=ee($.length,T),M[C]=120<=I&&120<=$.length?new c(C&&$):E}$=L[0];var q=-1,W=M[0];e:for(;++q<I&&R.length<T;){var N=Q=$[q],Q=0!==Q?Q:0;if(W?!r(W,N):!e(R,N)){for(C=P;--C;){var U=M[C];if(U?!r(U,N):!e(L[C],N))continue e}W&&W.push(N),R.push(Q)}}L=R}else L=[];return L})),_(function(){return arguments}())?_:function(I){return x(I)&&U.call(I,"callee")&&!H.call(I,"callee")}),ce=Array.isArray;i.constant=S,i.difference=L,i.intersection=q,i.uniq=function(I){if(I&&I.length)e:{var P=-1,C=e,E=I.length,L=!0,T=[],M=T;if(200<=E){if(C=se(I)){I=o(C);break e}L=!1,C=r,M=new c}else M=T;t:for(;++P<E;){var R=$=I[P],$=0!==$?$:0;if(L&&R==R){for(var q=M.length;q--;)if(M[q]===R)continue t;T.push($)}else C(M,R,void 0)||(M!==T&&M.push(R),T.push($))}I=T}else I=[];return I},i.eq=j,i.identity=k,i.isArguments=ae,i.isArray=ce,i.isArrayLike=m,i.isArrayLikeObject=O,i.isFunction=w,i.isLength=A,i.isObject=z,i.isObjectLike=x,i.noop=F,i.VERSION="4.17.5",$?(($.exports=i)._=i,R._=i):M._=i}).call(P)}(E,E.exports);try{I="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(I){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var L=function leven(P,C,E){var L=[],T=[],M=E&&I&&E.useCollator,R=1;if(E&&E.subcost&&"number"==typeof E.subcost&&(R=E.subcost),P===C)return 0;var $,q,W,N,Q=P.length,U=C.length;if(0===Q)return U;if(0===U)return Q;for(var D=0,G=0;D<Q;)T[D]=P.charCodeAt(D),L[D]=++D;if(M)for(;G<U;)for($=C.charCodeAt(G),W=G++,q=G,D=0;D<Q;D++)N=0===I.compare(String.fromCharCode($),String.fromCharCode(T[D]))?W:W+R,W=L[D],q=L[D]=W>q?N>q?q+1:N:N>W?W+1:N;else for(;G<U;)for($=C.charCodeAt(G),W=G++,q=G,D=0;D<Q;D++)N=$===T[D]?W:W+R,W=L[D],q=L[D]=W>q?N>q?q+1:N:N>W?W+1:N;return q};return function(I,P){if(!I.setImmediate){var C,E=1,L={},T=!1,M=I.document,R=Object.getPrototypeOf&&Object.getPrototypeOf(I);R=R&&R.setTimeout?R:I,"[object process]"==={}.toString.call(I.process)?function installNextTickImplementation(){C=function(I){process.nextTick((function(){runIfPresent(I)}))}}():!function canUsePostMessage(){if(I.postMessage&&!I.importScripts){var P=!0,C=I.onmessage;return I.onmessage=function(){P=!1},I.postMessage("","*"),I.onmessage=C,P}}()?I.MessageChannel?function installMessageChannelImplementation(){var I=new MessageChannel;I.port1.onmessage=function(I){runIfPresent(I.data)},C=function(P){I.port2.postMessage(P)}}():M&&"onreadystatechange"in M.createElement("script")?function installReadyStateChangeImplementation(){var I=M.documentElement;C=function(P){var C=M.createElement("script");C.onreadystatechange=function(){runIfPresent(P),C.onreadystatechange=null,I.removeChild(C),C=null},I.appendChild(C)}}():function installSetTimeoutImplementation(){C=function(I){setTimeout(runIfPresent,0,I)}}():function installPostMessageImplementation(){var P="setImmediate$"+Math.random()+"$",onGlobalMessage=function(C){C.source===I&&"string"==typeof C.data&&0===C.data.indexOf(P)&&runIfPresent(+C.data.slice(P.length))};I.addEventListener?I.addEventListener("message",onGlobalMessage,!1):I.attachEvent("onmessage",onGlobalMessage),C=function(C){I.postMessage(P+C,"*")}}(),R.setImmediate=function setImmediate(I){"function"!=typeof I&&(I=new Function(""+I));for(var P=new Array(arguments.length-1),T=0;T<P.length;T++)P[T]=arguments[T+1];var M={callback:I,args:P};return L[E]=M,C(E),E++},R.clearImmediate=clearImmediate}function clearImmediate(I){delete L[I]}function runIfPresent(I){if(T)setTimeout(runIfPresent,0,I);else{var P=L[I];if(P){T=!0;try{!function run(I){var P=I.callback,C=I.args;switch(C.length){case 0:P();break;case 1:P(C[0]);break;case 2:P(C[0],C[1]);break;case 3:P(C[0],C[1],C[2]);break;default:P.apply(void 0,C)}}(P)}finally{clearImmediate(I),T=!1}}}}}("undefined"==typeof self?P:self),function(){var I,P,T,M,R=E.exports.intersection,$=E.exports.difference,q=E.exports.uniq,W=L,N=function(I){var P={};function validate(I){return("string"==typeof I||I instanceof String)&&I.length>0}return P.validate=validate,P.process_and_sort=function process_and_sort(I){return validate(I)?I.match(/\S+/g).sort().join(" ").trim():""},P.tokenize=function unique_tokens(P,C){return I(P.match(/\S+/g))},P.full_process=function full_process(I,P){return I instanceof String||"string"==typeof I?(P&&(P.force_ascii||!0===P)&&(I=I.replace(/[^\x00-\x7F]/g,"")),C=I.replace(/\W|_/g," ").toLowerCase().trim(),P&&P.collapseWhitespace&&(C=C.replace(/\s+/g," ")),C):"";var C},P.clone_and_set_option_defaults=function(I){if(I&&I.isAClone)return I;var P={isAClone:!0};if(I){var C,E=Object.keys(I);for(C=0;C<E.length;C++)P[E[C]]=I[E[C]]}return void 0!==P.full_process&&!1===P.full_process||(P.full_process=!0),void 0!==P.force_ascii&&!0===P.force_ascii||(P.force_ascii=!1),void 0!==P.collapseWhitespace&&!1===P.collapseWhitespace||(P.collapseWhitespace=!0),P},P.isCustomFunc=function(I){return"function"!=typeof I||"token_set_ratio"!==I.name&&"partial_token_set_ratio"!==I.name&&"token_sort_ratio"!==I.name&&"partial_token_sort_ratio"!==I.name&&"QRatio"!==I.name&&"WRatio"!==I.name&&"distance"!==I.name&&"partial_ratio"!==I.name},P}(q),Q=N.validate,U=N.process_and_sort,D=N.tokenize,G=N.full_process,V=N.clone_and_set_option_defaults,B=N.isCustomFunc;function QRatio(I,P,C){var E=V(C);return I=E.full_process?G(I,E):I,P=E.full_process?G(P,E):P,Q(I)&&Q(P)?_ratio(I,P,E):0}function extractAsync(I,P,C,E){var L,T,M=V(C);"object"==typeof C.abortController&&(L=C.abortController),"object"==typeof C.cancelToken&&(T=C.cancelToken);var R=256;"number"==typeof M.asyncLoopOffset&&(R=M.asyncLoopOffset<1?1:M.asyncLoopOffset);var $,q=!1;if(P&&P.length&&Array.isArray(P))$=P.length,q=!0;else{if(!(P instanceof Object))return void E(new Error("Invalid choices"));$=Object.keys(P).length}if(!P||0===$)return void 0!==typeof console&&console.warn("No choices"),void E(null,[]);if(M.processor&&"function"!=typeof M.processor)E(new Error("Invalid Processor"));else if(M.processor||(M.processor=function(I){return I}),M.scorer&&"function"!=typeof M.scorer)E(new Error("Invalid Scorer"));else{M.scorer||(M.scorer=QRatio);var W=B(M.scorer);M.cutoff&&"number"==typeof M.cutoff||(M.cutoff=-1);var pre_processor=function(I,P){return I};M.full_process&&(pre_processor=G,W||(M.processed=!0)),W||(I=pre_processor(I,M),M.full_process=!1,0===I.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var N,Q,H,J,K=[],X=!1,Y=!1,Z=!1;if("token_sort_ratio"===M.scorer.name||"partial_token_sort_ratio"===M.scorer.name){var ee=U(I);Y=!0}else if("token_set_ratio"===M.scorer.name||"partial_token_set_ratio"===M.scorer.name){var te=D(I);Z=!0}J=M.returnObjects?function(I,P){return P.score-I.score}:function(I,P){return P[1]-I[1]};var re=Object.keys(P);q?searchLoop(0):searchLoop(re[0],0)}function searchLoop(C,G){(q||P.hasOwnProperty(C))&&(M.tokens=void 0,M.proc_sorted=!1,Y?(M.proc_sorted=!0,P[C].proc_sorted?Q=P[C].proc_sorted:(Q=pre_processor(M.processor(P[C]),M),Q=U(Q)),H=M.scorer(ee,Q,M)):Z?(Q="x",P[C].tokens?(M.tokens=[te,P[C].tokens],M.trySimple&&(Q=pre_processor(M.processor(P[C]),M))):(Q=pre_processor(M.processor(P[C]),M),M.tokens=[te,D(Q)]),H=M.scorer(I,Q,M)):W?(Q=M.processor(P[C]),H=M.scorer(I,Q,M)):("string"==typeof(Q=pre_processor(M.processor(P[C]),M))&&0!==Q.length||(X=!0),H=M.scorer(I,Q,M)),N=q?parseInt(C):C,H>M.cutoff&&(M.returnObjects?K.push({choice:P[C],score:H,key:N}):K.push([P[C],H,N]))),L&&!0===L.signal.aborted?E(new Error("aborted")):T&&!0===T.canceled?E(new Error("canceled")):q&&C<P.length-1?C%R==0?setImmediate((function(){searchLoop(C+1)})):searchLoop(C+1):G<re.length-1?G%R==0?setImmediate((function(){searchLoop(re[G+1],G+1)})):searchLoop(re[G+1],G+1):(X&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),M.limit&&"number"==typeof M.limit&&M.limit>0&&M.limit<$&&!M.unsorted?K=K.sort(J).slice(0,M.limit):M.unsorted||(K=K.sort(J)),E(null,K))}}function _ratio(I,P,C){return Q(I)&&Q(P)?(void 0===C.subcost&&(C.subcost=2),E=W(I,P,C),L=I.length+P.length,Math.round((L-E)/L*100)):0;var E,L}void 0===Array.isArray&&(Array.isArray=function(I){return"[object Array]"===Object.prototype.toString.call(I)}),Object.keys||(Object.keys=(I=Object.prototype.hasOwnProperty,P=!{toString:null}.propertyIsEnumerable("toString"),M=(T=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(C){if("object"!=typeof C&&("function"!=typeof C||null===C))throw new TypeError("Object.keys called on non-object");var E,L,R=[];for(E in C)I.call(C,E)&&R.push(E);if(P)for(L=0;L<M;L++)I.call(C,T[L])&&R.push(T[L]);return R}));var H=void 0;"undefined"!=typeof Promise&&(H=function(I,P,C){return new Promise((function(E,L){extractAsync(I,P,C,(function(I,P){I?L(I):E(P)}))}))});var J={distance:function distance(I,P,C){var E=V(C);return I=E.full_process?G(I,E):I,P=E.full_process?G(P,E):P,W(I,P,E)},ratio:QRatio,token_set_ratio:function token_set_ratio(I,P,C){var E=V(C);return I=E.full_process?G(I,E):I,P=E.full_process?G(P,E):P,Q(I)&&Q(P)?function _token_set(I,P,C){if(C.tokens)E=C.tokens[0],L=C.tokens[1];else var E=D(I),L=D(P);var T=R(E,L),M=$(E,L),q=$(L,E),W=T.sort().join(" "),N=M.sort().join(" "),Q=q.sort().join(" "),U=W+" "+N,G=W+" "+Q;W=W.trim(),U=U.trim(),G=G.trim();var V=_ratio,B=[V(W,U,C),V(W,G,C),V(U,G,C)];C.trySimple&&B.push(V(I,P,C));return Math.max.apply(null,B)}(I,P,E):0},token_sort_ratio:function token_sort_ratio(I,P,C){var E=V(C);return I=E.full_process?G(I,E):I,P=E.full_process?G(P,E):P,Q(I)&&Q(P)?(E.proc_sorted||(I=U(I),P=U(P)),_ratio(I,P,E)):0},full_process:G,extract:function extract(I,P,C){var E,L=V(C),T=!1;if(P&&P.length&&Array.isArray(P))E=P.length,T=!0;else{if(!(P instanceof Object))throw new Error("Invalid choices");E=Object.keys(P).length}if(!P||0===E)return void 0!==typeof console&&console.warn("No choices"),[];if(L.processor&&"function"!=typeof L.processor)throw new Error("Invalid Processor");if(L.processor||(L.processor=function(I){return I}),L.scorer&&"function"!=typeof L.scorer)throw new Error("Invalid Scorer");L.scorer||(L.scorer=QRatio);var M=B(L.scorer);L.cutoff&&"number"==typeof L.cutoff||(L.cutoff=-1);var pre_processor=function(I,P){return I};L.full_process&&(pre_processor=G,M||(L.processed=!0)),M||(I=pre_processor(I,L),L.full_process=!1,0===I.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var R,$,q,W,N=[],Q=!1,H=!1,J=!1;if("token_sort_ratio"===L.scorer.name||"partial_token_sort_ratio"===L.scorer.name){var K=U(I);H=!0}else if("token_set_ratio"===L.scorer.name||"partial_token_set_ratio"===L.scorer.name){var X=D(I);J=!0}for(var Y in W=L.returnObjects?function(I,P){return P.score-I.score}:function(I,P){return P[1]-I[1]},P)(T||P.hasOwnProperty(Y))&&(L.tokens=void 0,L.proc_sorted=!1,H?(L.proc_sorted=!0,P[Y]&&P[Y].proc_sorted?$=P[Y].proc_sorted:($=pre_processor(L.processor(P[Y]),L),$=U($)),q=L.scorer(K,$,L)):J?($="x",P[Y]&&P[Y].tokens?(L.tokens=[X,P[Y].tokens],L.trySimple&&($=pre_processor(L.processor(P[Y]),L))):($=pre_processor(L.processor(P[Y]),L),L.tokens=[X,D($)]),q=L.scorer(I,$,L)):M?($=L.processor(P[Y]),q=L.scorer(I,$,L)):("string"==typeof($=pre_processor(L.processor(P[Y]),L))&&0!==$.length||(Q=!0),q=L.scorer(I,$,L)),R=T?parseInt(Y):Y,q>L.cutoff&&(L.returnObjects?N.push({choice:P[Y],score:q,key:R}):N.push([P[Y],q,R])));return Q&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),L.limit&&"number"==typeof L.limit&&L.limit>0&&L.limit<E&&!L.unsorted?N=N.sort(W).slice(0,L.limit):L.unsorted||(N=N.sort(W)),N},extractAsync:extractAsync,extractAsPromised:H,process_and_sort:U,unique_tokens:D};C.exports=J}(),C.exports})); | ||
| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).fuzzball=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t={exports:{}};var r=function arrayMap$3(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},n="object"==typeof e&&e&&e.Object===Object&&e,o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")(),s=a.Symbol,i=s,c=Object.prototype,u=c.hasOwnProperty,l=c.toString,f=i?i.toStringTag:void 0;var p=function getRawTag$1(e){var t=u.call(e,f),r=e[f];try{e[f]=void 0;var n=!0}catch(e){}var o=l.call(e);return n&&(t?e[f]=r:delete e[f]),o},h=Object.prototype.toString;var v=p,d=function objectToString$1(e){return h.call(e)},_=s?s.toStringTag:void 0;var y=function baseGetTag$2(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":_&&_ in Object(e)?v(e):d(e)};var g=function isObject$2(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},m=y,b=g;var $,k=function isFunction$2(e){if(!b(e))return!1;var t=m(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},C=a["__core-js_shared__"],O=($=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"";var j=function isMasked$1(e){return!!O&&O in e},w=Function.prototype.toString;var I=k,S=j,A=g,P=function toSource$1(e){if(null!=e){try{return w.call(e)}catch(e){}try{return e+""}catch(e){}}return""},x=/^\[object .+?Constructor\]$/,L=Function.prototype,M=Object.prototype,E=L.toString,T=M.hasOwnProperty,z=RegExp("^"+E.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var F=function baseIsNative$1(e){return!(!A(e)||S(e))&&(I(e)?z:x).test(P(e))},H=function getValue$1(e,t){return null==e?void 0:e[t]};var R=function getNative$4(e,t){var r=H(e,t);return F(r)?r:void 0},N=R(Object,"create"),q=N;var W=function hashClear$1(){this.__data__=q?q(null):{},this.size=0};var D=function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},G=N,Q=Object.prototype.hasOwnProperty;var U=function hashGet$1(e){var t=this.__data__;if(G){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return Q.call(t,e)?t[e]:void 0},K=N,V=Object.prototype.hasOwnProperty;var B=N;var J=W,X=D,Y=U,Z=function hashHas$1(e){var t=this.__data__;return K?void 0!==t[e]:V.call(t,e)},ee=function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=B&&void 0===t?"__lodash_hash_undefined__":t,this};function Hash$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash$1.prototype.clear=J,Hash$1.prototype.delete=X,Hash$1.prototype.get=Y,Hash$1.prototype.has=Z,Hash$1.prototype.set=ee;var te=Hash$1;var re=function listCacheClear$1(){this.__data__=[],this.size=0};var ne=function eq$1(e,t){return e===t||e!=e&&t!=t};var oe=function assocIndexOf$4(e,t){for(var r=e.length;r--;)if(ne(e[r][0],t))return r;return-1},ae=oe,se=Array.prototype.splice;var ie=oe;var ce=oe;var ue=oe;var le=re,fe=function listCacheDelete$1(e){var t=this.__data__,r=ae(t,e);return!(r<0)&&(r==t.length-1?t.pop():se.call(t,r,1),--this.size,!0)},pe=function listCacheGet$1(e){var t=this.__data__,r=ie(t,e);return r<0?void 0:t[r][1]},he=function listCacheHas$1(e){return ce(this.__data__,e)>-1},ve=function listCacheSet$1(e,t){var r=this.__data__,n=ue(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function ListCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache$1.prototype.clear=le,ListCache$1.prototype.delete=fe,ListCache$1.prototype.get=pe,ListCache$1.prototype.has=he,ListCache$1.prototype.set=ve;var de=ListCache$1,_e=R(a,"Map"),ye=te,ge=de,me=_e;var be=function isKeyable$1(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var $e=function getMapData$4(e,t){var r=e.__data__;return be(t)?r["string"==typeof t?"string":"hash"]:r.map},ke=$e;var Ce=$e;var Oe=$e;var je=$e;var we=function mapCacheClear$1(){this.size=0,this.__data__={hash:new ye,map:new(me||ge),string:new ye}},Ie=function mapCacheDelete$1(e){var t=ke(this,e).delete(e);return this.size-=t?1:0,t},Se=function mapCacheGet$1(e){return Ce(this,e).get(e)},Ae=function mapCacheHas$1(e){return Oe(this,e).has(e)},Pe=function mapCacheSet$1(e,t){var r=je(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function MapCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache$1.prototype.clear=we,MapCache$1.prototype.delete=Ie,MapCache$1.prototype.get=Se,MapCache$1.prototype.has=Ae,MapCache$1.prototype.set=Pe;var xe=MapCache$1,Le=function setCacheAdd$1(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Me=function setCacheHas$1(e){return this.__data__.has(e)};function SetCache$3(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new xe;++t<r;)this.add(e[t])}SetCache$3.prototype.add=SetCache$3.prototype.push=Le,SetCache$3.prototype.has=Me;var Ee=SetCache$3;var Te=function baseFindIndex$1(e,t,r,n){for(var o=e.length,a=r+(n?1:-1);n?a--:++a<o;)if(t(e[a],a,e))return a;return-1},ze=function baseIsNaN$1(e){return e!=e},Fe=function strictIndexOf$1(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1};var He=function baseIndexOf$1(e,t,r){return t==t?Fe(e,t,r):Te(e,ze,r)};var Re=function arrayIncludes$3(e,t){return!!(null==e?0:e.length)&&He(e,t,0)>-1};var Ne=function arrayIncludesWith$3(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1};var qe=function baseUnary$2(e){return function(t){return e(t)}};var We=function cacheHas$3(e,t){return e.has(t)},De=Ee,Ge=Re,Qe=Ne,Ue=r,Ke=qe,Ve=We,Be=Math.min;var Je=function baseIntersection$1(e,t,r){for(var n=r?Qe:Ge,o=e[0].length,a=e.length,s=a,i=Array(a),c=1/0,u=[];s--;){var l=e[s];s&&t&&(l=Ue(l,Ke(t))),c=Be(l.length,c),i[s]=!r&&(t||o>=120&&l.length>=120)?new De(s&&l):void 0}l=e[0];var f=-1,p=i[0];e:for(;++f<o&&u.length<c;){var h=l[f],v=t?t(h):h;if(h=r||0!==h?h:0,!(p?Ve(p,v):n(u,v,r))){for(s=a;--s;){var d=i[s];if(!(d?Ve(d,v):n(e[s],v,r)))continue e}p&&p.push(v),u.push(h)}}return u};var Xe=function identity$2(e){return e};var Ye=function apply$1(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)},Ze=Math.max;var et=function overRest$1(e,t,r){return t=Ze(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=Ze(n.length-t,0),s=Array(a);++o<a;)s[o]=n[t+o];o=-1;for(var i=Array(t+1);++o<t;)i[o]=n[o];return i[t]=r(s),Ye(e,this,i)}};var tt=function constant$1(e){return function(){return e}},rt=R,nt=function(){try{var e=rt(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),ot=tt,at=nt,st=at?function(e,t){return at(e,"toString",{configurable:!0,enumerable:!1,value:ot(t),writable:!0})}:Xe,it=Date.now;var ct=function shortOut$1(e){var t=0,r=0;return function(){var n=it(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},ut=ct(st),lt=Xe,ft=et,pt=ut;var ht=function baseRest$2(e,t){return pt(ft(e,t,lt),e+"")};var vt=k,dt=function isLength$1(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var _t=function isObjectLike$3(e){return null!=e&&"object"==typeof e},yt=function isArrayLike$1(e){return null!=e&&dt(e.length)&&!vt(e)},gt=_t;var mt=function isArrayLikeObject$2(e){return gt(e)&&yt(e)},bt=mt;var $t=r,kt=Je,Ct=function castArrayLikeObject$1(e){return bt(e)?e:[]},Ot=ht((function(e){var t=$t(e,Ct);return t.length&&t[0]===e[0]?kt(t):[]})),jt=Ee,wt=Re,It=Ne,St=r,At=qe,Pt=We;var xt=function baseDifference$1(e,t,r,n){var o=-1,a=wt,s=!0,i=e.length,c=[],u=t.length;if(!i)return c;r&&(t=St(t,At(r))),n?(a=It,s=!1):t.length>=200&&(a=Pt,s=!1,t=new jt(t));e:for(;++o<i;){var l=e[o],f=null==r?l:r(l);if(l=n||0!==l?l:0,s&&f==f){for(var p=u;p--;)if(t[p]===f)continue e;c.push(l)}else a(t,f,n)||c.push(l)}return c};var Lt=function arrayPush$1(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},Mt=y,Et=_t;var Tt=function baseIsArguments$1(e){return Et(e)&&"[object Arguments]"==Mt(e)},zt=_t,Ft=Object.prototype,Ht=Ft.hasOwnProperty,Rt=Ft.propertyIsEnumerable,Nt=Tt(function(){return arguments}())?Tt:function(e){return zt(e)&&Ht.call(e,"callee")&&!Rt.call(e,"callee")},qt=Nt,Wt=Array.isArray,Dt=qt,Gt=Wt,Qt=s?s.isConcatSpreadable:void 0;var Ut=Lt,Kt=function isFlattenable$1(e){return Gt(e)||Dt(e)||!!(Qt&&e&&e[Qt])};var Vt=function baseFlatten$1(e,t,r,n,o){var a=-1,s=e.length;for(r||(r=Kt),o||(o=[]);++a<s;){var i=e[a];t>0&&r(i)?t>1?baseFlatten$1(i,t-1,r,n,o):Ut(o,i):n||(o[o.length]=i)}return o},Bt=xt,Jt=Vt,Xt=mt,Yt=ht((function(e,t){return Xt(e)?Bt(e,Jt(t,1,Xt,!0)):[]}));var Zt=function setToArray$2(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r},er=R(a,"Set"),tr=function noop$1(){},rr=er&&1/Zt(new er([,-0]))[1]==1/0?function(e){return new er(e)}:tr,nr=Ee,or=Re,ar=Ne,sr=We,ir=rr,cr=Zt;var ur=function baseUniq$1(e,t,r){var n=-1,o=or,a=e.length,s=!0,i=[],c=i;if(r)s=!1,o=ar;else if(a>=200){var u=t?null:ir(e);if(u)return cr(u);s=!1,o=sr,c=new nr}else c=t?[]:i;e:for(;++n<a;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,s&&f==f){for(var p=c.length;p--;)if(c[p]===f)continue e;t&&c.push(f),i.push(l)}else o(c,f,r)||(c!==i&&c.push(f),i.push(l))}return i};var lr,fr=function uniq(e){return e&&e.length?ur(e):[]};try{lr="undefined"!=typeof Intl&&void 0!==Intl.Collator?Intl.Collator("generic",{sensitivity:"base"}):null}catch(e){void 0!==typeof console&&console.warn("Collator could not be initialized and wouldn't be used")}var pr=function leven(e,t,r){var n=[],o=[],a=r&&lr&&r.useCollator,s=1;if(r&&r.subcost&&"number"==typeof r.subcost&&(s=r.subcost),e===t)return 0;var i,c,u,l,f=e.length,p=t.length;if(0===f)return p;if(0===p)return f;for(var h=0,v=0;h<f;)o[h]=e.charCodeAt(h),n[h]=++h;if(a)for(;v<p;)for(i=t.charCodeAt(v),u=v++,c=v,h=0;h<f;h++)l=0===lr.compare(String.fromCharCode(i),String.fromCharCode(o[h]))?u:u+s,u=n[h],c=n[h]=u>c?l>c?c+1:l:l>u?u+1:l;else for(;v<p;)for(i=t.charCodeAt(v),u=v++,c=v,h=0;h<f;h++)l=i===o[h]?u:u+s,u=n[h],c=n[h]=u>c?l>c?c+1:l:l>u?u+1:l;return c};return function(e,t){if(!e.setImmediate){var r,n=1,o={},a=!1,s=e.document,i=Object.getPrototypeOf&&Object.getPrototypeOf(e);i=i&&i.setTimeout?i:e,"[object process]"==={}.toString.call(e.process)?function installNextTickImplementation(){r=function(e){process.nextTick((function(){runIfPresent(e)}))}}():!function canUsePostMessage(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?function installMessageChannelImplementation(){var e=new MessageChannel;e.port1.onmessage=function(e){runIfPresent(e.data)},r=function(t){e.port2.postMessage(t)}}():s&&"onreadystatechange"in s.createElement("script")?function installReadyStateChangeImplementation(){var e=s.documentElement;r=function(t){var r=s.createElement("script");r.onreadystatechange=function(){runIfPresent(t),r.onreadystatechange=null,e.removeChild(r),r=null},e.appendChild(r)}}():function installSetTimeoutImplementation(){r=function(e){setTimeout(runIfPresent,0,e)}}():function installPostMessageImplementation(){var t="setImmediate$"+Math.random()+"$",onGlobalMessage=function(r){r.source===e&&"string"==typeof r.data&&0===r.data.indexOf(t)&&runIfPresent(+r.data.slice(t.length))};e.addEventListener?e.addEventListener("message",onGlobalMessage,!1):e.attachEvent("onmessage",onGlobalMessage),r=function(r){e.postMessage(t+r,"*")}}(),i.setImmediate=function setImmediate(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),a=0;a<t.length;a++)t[a]=arguments[a+1];var s={callback:e,args:t};return o[n]=s,r(n),n++},i.clearImmediate=clearImmediate}function clearImmediate(e){delete o[e]}function runIfPresent(e){if(a)setTimeout(runIfPresent,0,e);else{var t=o[e];if(t){a=!0;try{!function run(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{clearImmediate(e),a=!1}}}}}("undefined"==typeof self?e:self),function(){var e=Ot,r=Yt,n=pr,o=function(e){var t={};function validate(e){return("string"==typeof e||e instanceof String)&&e.length>0}return t.validate=validate,t.process_and_sort=function process_and_sort(e){return validate(e)?e.match(/\S+/g).sort().join(" ").trim():""},t.tokenize=function unique_tokens(t,r){return e(t.match(/\S+/g))},t.full_process=function full_process(e,t){return e instanceof String||"string"==typeof e?(t&&(t.force_ascii||!0===t)&&(e=e.replace(/[^\x00-\x7F]/g,"")),r=e.replace(/\W|_/g," ").toLowerCase().trim(),t&&t.collapseWhitespace&&(r=r.replace(/\s+/g," ")),r):"";var r},t.clone_and_set_option_defaults=function(e){if(e&&e.isAClone)return e;var t={isAClone:!0};if(e){var r,n=Object.keys(e);for(r=0;r<n.length;r++)t[n[r]]=e[n[r]]}return void 0!==t.full_process&&!1===t.full_process||(t.full_process=!0),void 0!==t.force_ascii&&!0===t.force_ascii||(t.force_ascii=!1),void 0!==t.collapseWhitespace&&!1===t.collapseWhitespace||(t.collapseWhitespace=!0),t},t.isCustomFunc=function(e){return"function"!=typeof e||"token_set_ratio"!==e.name&&"partial_token_set_ratio"!==e.name&&"token_sort_ratio"!==e.name&&"partial_token_sort_ratio"!==e.name&&"QRatio"!==e.name&&"WRatio"!==e.name&&"distance"!==e.name&&"partial_ratio"!==e.name},t}(fr),a=o.validate,s=o.process_and_sort,i=o.tokenize,c=o.full_process,u=o.clone_and_set_option_defaults,l=o.isCustomFunc;function QRatio(e,t,r){var n=u(r);return e=n.full_process?c(e,n):e,t=n.full_process?c(t,n):t,a(e)&&a(t)?_ratio(e,t,n):0}function extractAsync(e,t,r,n){var o,a,f=u(r);"object"==typeof r.abortController&&(o=r.abortController),"object"==typeof r.cancelToken&&(a=r.cancelToken);var p=256;"number"==typeof f.asyncLoopOffset&&(p=f.asyncLoopOffset<1?1:f.asyncLoopOffset);var h,v=!1;if(t&&t.length&&Array.isArray(t))h=t.length,v=!0;else{if(!(t instanceof Object))return void n(new Error("Invalid choices"));h=Object.keys(t).length}if(!t||0===h)return void 0!==typeof console&&console.warn("No choices"),void n(null,[]);if(f.processor&&"function"!=typeof f.processor)n(new Error("Invalid Processor"));else if(f.processor||(f.processor=function(e){return e}),f.scorer&&"function"!=typeof f.scorer)n(new Error("Invalid Scorer"));else{f.scorer||(f.scorer=QRatio);var d=l(f.scorer);f.cutoff&&"number"==typeof f.cutoff||(f.cutoff=-1);var pre_processor=function(e,t){return e};f.full_process&&(pre_processor=c,d||(f.processed=!0)),d||(e=pre_processor(e,f),f.full_process=!1,0===e.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var _,y,g,m,b=[],$=!1,k=!1,C=!1;if("token_sort_ratio"===f.scorer.name||"partial_token_sort_ratio"===f.scorer.name){var O=s(e);k=!0}else if("token_set_ratio"===f.scorer.name||"partial_token_set_ratio"===f.scorer.name){var j=i(e);C=!0}m=f.returnObjects?function(e,t){return t.score-e.score}:function(e,t){return t[1]-e[1]};var w=Object.keys(t);v?searchLoop(0):searchLoop(w[0],0)}function searchLoop(r,c){(v||t.hasOwnProperty(r))&&(f.tokens=void 0,f.proc_sorted=!1,k?(f.proc_sorted=!0,t[r].proc_sorted?y=t[r].proc_sorted:(y=pre_processor(f.processor(t[r]),f),y=s(y)),g=f.scorer(O,y,f)):C?(y="x",t[r].tokens?(f.tokens=[j,t[r].tokens],f.trySimple&&(y=pre_processor(f.processor(t[r]),f))):(y=pre_processor(f.processor(t[r]),f),f.tokens=[j,i(y)]),g=f.scorer(e,y,f)):d?(y=f.processor(t[r]),g=f.scorer(e,y,f)):("string"==typeof(y=pre_processor(f.processor(t[r]),f))&&0!==y.length||($=!0),g=f.scorer(e,y,f)),_=v?parseInt(r):r,g>f.cutoff&&(f.returnObjects?b.push({choice:t[r],score:g,key:_}):b.push([t[r],g,_]))),o&&!0===o.signal.aborted?n(new Error("aborted")):a&&!0===a.canceled?n(new Error("canceled")):v&&r<t.length-1?r%p==0?setImmediate((function(){searchLoop(r+1)})):searchLoop(r+1):c<w.length-1?c%p==0?setImmediate((function(){searchLoop(w[c+1],c+1)})):searchLoop(w[c+1],c+1):($&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),f.limit&&"number"==typeof f.limit&&f.limit>0&&f.limit<h&&!f.unsorted?b=b.sort(m).slice(0,f.limit):f.unsorted||(b=b.sort(m)),n(null,b))}}function _ratio(e,t,r){return a(e)&&a(t)?(void 0===r.subcost&&(r.subcost=2),o=n(e,t,r),s=e.length+t.length,Math.round((s-o)/s*100)):0;var o,s}void 0===Array.isArray&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),Object.keys||(Object.keys=function(){var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=r.length;return function(o){if("object"!=typeof o&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on non-object");var a,s,i=[];for(a in o)e.call(o,a)&&i.push(a);if(t)for(s=0;s<n;s++)e.call(o,r[s])&&i.push(r[s]);return i}}());var f=void 0;"undefined"!=typeof Promise&&(f=function(e,t,r){return new Promise((function(n,o){extractAsync(e,t,r,(function(e,t){e?o(e):n(t)}))}))});var p={distance:function distance(e,t,r){var o=u(r);return e=o.full_process?c(e,o):e,t=o.full_process?c(t,o):t,n(e,t,o)},ratio:QRatio,token_set_ratio:function token_set_ratio(t,n,o){var s=u(o);return t=s.full_process?c(t,s):t,n=s.full_process?c(n,s):n,a(t)&&a(n)?function _token_set(t,n,o){if(o.tokens)a=o.tokens[0],s=o.tokens[1];else var a=i(t),s=i(n);var c=e(a,s),u=r(a,s),l=r(s,a),f=c.sort().join(" "),p=u.sort().join(" "),h=l.sort().join(" "),v=f+" "+p,d=f+" "+h;f=f.trim(),v=v.trim(),d=d.trim();var _=_ratio,y=[_(f,v,o),_(f,d,o),_(v,d,o)];o.trySimple&&y.push(_(t,n,o));return Math.max.apply(null,y)}(t,n,s):0},token_sort_ratio:function token_sort_ratio(e,t,r){var n=u(r);return e=n.full_process?c(e,n):e,t=n.full_process?c(t,n):t,a(e)&&a(t)?(n.proc_sorted||(e=s(e),t=s(t)),_ratio(e,t,n)):0},full_process:c,extract:function extract(e,t,r){var n,o=u(r),a=!1;if(t&&t.length&&Array.isArray(t))n=t.length,a=!0;else{if(!(t instanceof Object))throw new Error("Invalid choices");n=Object.keys(t).length}if(!t||0===n)return void 0!==typeof console&&console.warn("No choices"),[];if(o.processor&&"function"!=typeof o.processor)throw new Error("Invalid Processor");if(o.processor||(o.processor=function(e){return e}),o.scorer&&"function"!=typeof o.scorer)throw new Error("Invalid Scorer");o.scorer||(o.scorer=QRatio);var f=l(o.scorer);o.cutoff&&"number"==typeof o.cutoff||(o.cutoff=-1);var pre_processor=function(e,t){return e};o.full_process&&(pre_processor=c,f||(o.processed=!0)),f||(e=pre_processor(e,o),o.full_process=!1,0===e.length&&void 0!==typeof console&&console.warn("Processed query is empty string"));var p,h,v,d,_=[],y=!1,g=!1,m=!1;if("token_sort_ratio"===o.scorer.name||"partial_token_sort_ratio"===o.scorer.name){var b=s(e);g=!0}else if("token_set_ratio"===o.scorer.name||"partial_token_set_ratio"===o.scorer.name){var $=i(e);m=!0}for(var k in d=o.returnObjects?function(e,t){return t.score-e.score}:function(e,t){return t[1]-e[1]},t)(a||t.hasOwnProperty(k))&&(o.tokens=void 0,o.proc_sorted=!1,g?(o.proc_sorted=!0,t[k]&&t[k].proc_sorted?h=t[k].proc_sorted:(h=pre_processor(o.processor(t[k]),o),h=s(h)),v=o.scorer(b,h,o)):m?(h="x",t[k]&&t[k].tokens?(o.tokens=[$,t[k].tokens],o.trySimple&&(h=pre_processor(o.processor(t[k]),o))):(h=pre_processor(o.processor(t[k]),o),o.tokens=[$,i(h)]),v=o.scorer(e,h,o)):f?(h=o.processor(t[k]),v=o.scorer(e,h,o)):("string"==typeof(h=pre_processor(o.processor(t[k]),o))&&0!==h.length||(y=!0),v=o.scorer(e,h,o)),p=a?parseInt(k):k,v>o.cutoff&&(o.returnObjects?_.push({choice:t[k],score:v,key:p}):_.push([t[k],v,p])));return y&&void 0!==typeof console&&console.log("One or more choices were empty. (post-processing if applied)"),o.limit&&"number"==typeof o.limit&&o.limit>0&&o.limit<n&&!o.unsorted?_=_.sort(d).slice(0,o.limit):o.unsorted||(_=_.sort(d)),_},extractAsync:extractAsync,extractAsPromised:f,process_and_sort:s,unique_tokens:i};t.exports=p}(),t.exports})); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
657219
0.16%9
-10%5
25%7611
-0.33%+ Added
+ Added