11 lines
119 KiB
JavaScript
11 lines
119 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.16 (2019-09-24)
|
||
|
*/
|
||
|
|
||
|
!function(f){"use strict";function o(e){return e}var l=function(e){function n(){return t}var t=e;return{get:n,set:function(e){t=e},clone:function(){return l(n())}}},y=function(){},C=function(t,r){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t(r.apply(null,e))}},S=function(e){return function(){return e}};function b(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 d(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,e)}}function e(){return u}var n,s=S(!1),i=S(!0),u=(n={fold:function(e,n){return e()},is:s,isSome:s,isNone:i,getOr:c,getOrThunk:r,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:S(null),getOrUndefined:S(undefined),or:c,orThunk:r,map:e,each:y,bind:e,exists:s,forall:i,filter:e,equals:t,equals_:t,toArray:function(){return[]},toString:S("none()")},Object.freeze&&Object.freeze(n),n);function t(e){return e.isNone()}function r(e){return e()}function c(e){return e}function a(n){return function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"==n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n}(e)===n}}function m(e,n){return-1<function(e,n){return qe.call(e,n)}(e,n)}function g(e,n){for(var t=0,r=e.length;t<r;t++){if(n(e[t],t))return!0}return!1}function p(e,n){for(var t=e.length,r=new Array(t),o=0;o<t;o++){var i=e[o];r[o]=n(i,o)}return r}function h(e,n){for(var t=0,r=e.length;t<r;t++){n(e[t],t)}}function v(e,n){for(var t=[],r=0,o=e.length;r<o;r++){var i=e[r];n(i,r)&&t.push(i)}return t}function w(e,n,t){return function(e,n){for(var t=e.length-1;0<=t;t--){n(e[t],t)}}(e,function(e){t=n(t,e)}),t}function x(e,n,t){return h(e,function(e){t=n(t,e)}),t}function R(e,n){for(var t=0,r=e.length;t<r;t++){var o=e[t];if(n(o,t))return We.some(o)}return We.none()}function T(e,n){for(var t=0,r=e.length;t<r;t++){if(n(e[t],t))return We.some(t)}return We.none()}function O(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!je(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);Ve.apply(n,e[t])}return n}function D(e,n){var t=p(e,n);return O(t)}function A(e,n){for(var t=0,r=e.length;t<r;++t){if(!0!==n(e[t],t))return!1}return!0}function E(e){var n=Ue.call(e,0);return n.reverse(),n}function N(e,n){for(var t=Ge(e),r=0,o=t.length;r<o;r++){var i=t[r];n(e[i],i)}}function I(e,t){return Ke(e,function(e,n){return{k:n,v:t(e,n)}})}function k(e,n){return Xe(e,n)?We.from(e[n]):We.none()}function P(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(n.length!==t.length)throw new Error('Wrong number of arguments to struct. Expected "['+n.length+']", got '+t.length+" arguments");var r={};return h(n,function(e,n){r[e]=S(t[n])}),r}}function B(e){return e.slice(0).sort()}function M(e,n){throw new Error("All required keys ("+B(e).join(", ")+") were not specified. Specified keys were: "+B(n).join(", ")+".")}function W(e){throw new Error("Unsupported keys for object: "+B(e).join(", "))}function _(n,e){if(!je(e))throw new Error("The "+n+" fields must be an array. Was: "+e+".");h(e,function(e){if(!Le(e))throw new Error("The value "+e+" in the "+n+" fields was not a string.")})}function L(e){var t=B(e);R(t,function(e,n){return n<t.length-1&&e===t[n+1]}).each(function(e){throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+t.join(", ")+"].")})}function j(e){return e.dom().nodeName.toLowerCase()}function z(e){return e.dom().nodeType}function H(n){return function(e){return z(e)===n}}function F(e){return z(e)===Je||"#comment"===j(e)}function U(e,n,t){if(!(Le(t)||ze(t)||Fe(t)))throw f.console.error("Invalid call to Attr.set. Key ",n,":: Value ",t,":: Element ",e),new Error("Attribute value was not simple");e.set
|