You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
139 KiB
JavaScript

2 months ago
/**
* 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.9.2 (2021-09-08)
*/
!function(){"use strict";function e(r){return function(e){return t=typeof(n=e),(null===n?"null":"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t)===r;var n,t}}function n(n){return function(e){return typeof e===n}}function t(n){return function(e){return n===e}}function l(e){return!(null==e)}function E(){}function C(e){return function(){return e}}function h(e){return e}function r(e,n){return e===n}var S=e("string"),g=e("object"),a=e("array"),v=t(null),o=n("boolean"),f=t(void 0),c=n("function"),s=n("number");function P(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=o.concat(e);return r.apply(null,t)}}function p(n){return function(e){return!n(e)}}function u(){return i}var w=C(!1),T=C(!0),i={fold:function(e,n){return e()},isSome:w,isNone:T,getOr:h,getOrThunk:d,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:C(null),getOrUndefined:C(void 0),or:h,orThunk:d,map:u,each:E,bind:u,exists:w,forall:T,filter:function(){return i},toArray:function(){return[]},toString:C("none()")};function d(e){return e()}function y(e,n){return-1<q.call(e,n)}function R(e,n){for(var t=0,r=e.length;t<r;t++)if(n(e[t],t))return!0;return!1}function D(e,n){for(var t=[],r=0;r<e;r++)t.push(n(r));return t}function x(e,n){for(var t=e.length,r=new Array(t),o=0;o<t;o++){var u=e[o];r[o]=n(u,o)}return r}function O(e,n){for(var t=0,r=e.length;t<r;t++)n(e[t],t)}function A(e,n){for(var t=[],r=0,o=e.length;r<o;r++){var u=e[r];n(u,r)&&t.push(u)}return t}function k(e,r,o){return function(e){for(var n,t=e.length-1;0<=t;t--)n=e[t],o=r(o,n,t)}(e),o}function I(e,t,r){return O(e,function(e,n){r=t(r,e,n)}),r}function B(e,n){return function(e,n,t){for(var r=0,o=e.length;r<o;r++){var u=e[r];if(n(u,r))return H.some(u);if(t(u,r))break}return H.none()}(e,n,w)}function m(e,n){for(var t=0,r=e.length;t<r;t++)if(n(e[t],t))return H.some(t);return H.none()}function b(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!a(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);U.apply(n,e[t])}return n}function N(e,n){return b(x(e,n))}function M(e,n){for(var t=0,r=e.length;t<r;++t)if(!0!==n(e[t],t))return!1;return!0}function z(e,n){for(var t={},r=0,o=e.length;r<o;r++){var u=e[r];t[String(u)]=n(u,r)}return t}function L(e){return[e]}function _(e,n){return 0<=n&&n<e.length?H.some(e[n]):H.none()}function W(e){return _(e,0)}function j(e,n){for(var t=0;t<e.length;t++){var r=n(e[t],t);if(r.isSome())return r}return H.none()}var F=function(t){function e(){return o}function n(e){return e(t)}var r=C(t),o={fold:function(e,n){return n(t)},isSome:T,isNone:w,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return F(e(t))},each:function(e){e(t)},bind:n,exists:n,forall:n,filter:function(e){return e(t)?o:i},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},H={some:F,none:u,from:function(e){return null==e?i:F(e)}},V=Array.prototype.slice,q=Array.prototype.indexOf,U=Array.prototype.push,$=function(){return($=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function K(e,n,t){if(t||2===arguments.length)for(var r,o=0,u=n.length;o<u;o++)!r&&o in n||((r=r||Array.prototype.slice.call(n,0,o))[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function G(t){var r,o=!1;return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o||(o=!0,r=t.apply(null,e)),r}}function X(e,n){var t=String(n).toLowerCase();return B(e,function(e){return e.search(t)})}function Y(e,n,t){return""===n||e.length>=n.length&&e.substr(t,t+n.length)===n}function J(e,n){return-1!==e.indexOf(n)}function Q(e,n){return Y(e,n,e.length-n.length)}function Z(e){return 0<e.length}function ee(n){return function(e){return J