11 lines
342 KiB
JavaScript
11 lines
342 KiB
JavaScript
|
/**
|
||
|
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
||
|
* Licensed under the LGPL or a commercial license.
|
||
|
* For LGPL see License.txt in the project root for license information.
|
||
|
* For commercial licenses see https://www.tiny.cloud/
|
||
|
*
|
||
|
* Version: 5.0.3 (2019-03-19)
|
||
|
*/
|
||
|
|
||
|
!function(b){"use strict";var Q=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n]},p=function(e,o){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(o.apply(null,t))}},Z=function(t){return function(){return t}},d=function(t){return t};function h(o){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=r.concat(t);return o.apply(null,e)}}var t,n,e,o,r,s,i,m=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return!e.apply(null,t)}},u=function(t){return function(){throw new Error(t)}},a=Z(!1),c=Z(!0),f=a,l=c,g=function(){return v},v=(o={fold:function(t,n){return t()},is:f,isSome:f,isNone:l,getOr:e=function(t){return t},getOrThunk:n=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:e,orThunk:n,map:g,ap:g,each:function(){},bind:g,flatten:g,exists:f,forall:l,filter:g,equals:t=function(t){return t.isNone()},equals_:t,toArray:function(){return[]},toString:Z("none()")},Object.freeze&&Object.freeze(o),o),y=function(e){var t=function(){return e},n=function(){return r},o=function(t){return t(e)},r={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:l,isNone:f,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return y(t(e))},ap:function(t){return t.fold(g,function(t){return y(t(e))})},each:function(t){t(e)},bind:o,flatten:t,exists:o,forall:o,filter:function(t){return t(e)?r:v},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(f,function(t){return n(e,t)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return r},tt={some:y,none:g,from:function(t){return null===t||t===undefined?v:y(t)}},x=function(n){return function(t){return function(t){if(null===t)return"null";var n=typeof t;return"object"===n&&Array.prototype.isPrototypeOf(t)?"array":"object"===n&&String.prototype.isPrototypeOf(t)?"string":n}(t)===n}},w=x("string"),S=x("object"),T=x("array"),C=x("boolean"),k=x("function"),O=x("number"),E=(r=Array.prototype.indexOf)===undefined?function(t,n){return N(t,n)}:function(t,n){return r.call(t,n)},B=function(t,n){return-1<E(t,n)},D=function(t,n){return H(t,n).isSome()},A=function(t,n){for(var e=[],o=0;o<t.length;o+=n){var r=t.slice(o,o+n);e.push(r)}return e},_=function(t,n){for(var e=t.length,o=new Array(e),r=0;r<e;r++){var i=t[r];o[r]=n(i,r,t)}return o},M=function(t,n){for(var e=0,o=t.length;e<o;e++)n(t[e],e,t)},F=function(t,n){for(var e=[],o=0,r=t.length;o<r;o++){var i=t[o];n(i,o,t)&&e.push(i)}return e},I=function(t,n,e){return function(t,n){for(var e=t.length-1;0<=e;e--)n(t[e],e,t)}(t,function(t){e=n(e,t)}),e},V=function(t,n,e){return M(t,function(t){e=n(e,t)}),e},R=function(t,n){for(var e=0,o=t.length;e<o;e++){var r=t[e];if(n(r,e,t))return tt.some(r)}return tt.none()},H=function(t,n){for(var e=0,o=t.length;e<o;e++)if(n(t[e],e,t))return tt.some(e);return tt.none()},N=function(t,n){for(var e=0,o=t.length;e<o;++e)if(t[e]===n)return e;return-1},z=Array.prototype.push,P=function(t){for(var n=[],e=0,o=t.length;e<o;++e){if(!Array.prototype.isPrototypeOf(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);z.apply(n,t[e])}return n},L=function(t,n){var e=_(t,n);return P(e)},j=function(t,n){for(var e=0,o=t.length;e<o;++e)if(!0!==n(t[e],e,t))return!1;return!0},U=Array.prototype.slice,W=function(t){var n=U.call(t,0);return n.reverse(),n},G=function(t,n){return F(t,function(t){return!B(n,t)})},X=function(t){return[t]},Y=function(t){return 0===t.length?tt.none():tt.some(t[0])},q=function(t){return 0===t.length?tt.none():tt.some(t[t.length-1])},K=k(Array.from)?Array.from:function(t){return U.call(t)},J=Object.keys,$=Object.hasOwnProperty,nt=function(t,n){for(var e=J(t),o=0,r=e.length;o<r;o++){var i=e[o];n(t[i],i,t)}},et=function(t,o){return ot(t,function(t,n,e){return{k:n,v:o(t,n,e)}})},ot=function(o,r){var i={};return
|