mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-15 07:01:01 +01:00
37 lines
692 KiB
JavaScript
37 lines
692 KiB
JavaScript
|
!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=53)}([function(t,e){t.exports=function(t){return null==t?"":""+t}},function(t,e,n){var r=n(0),i=n(13),o=String.prototype.trim;t.exports=function(t,e){return t=r(t),!e&&o?o.call(t):(e=i(e),t.replace(new RegExp("^"+e+"+|"+e+"+$","g"),""))}},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(t,e,n){(function(t,r){var i;(function(){function o(t,e){return t.set(e[0],e[1]),t}function a(t,e){return t.add(e),t}function l(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function s(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function c(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function u(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function p(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function d(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function f(t,e){return!!(null==t?0:t.length)&&C(t,e,0)>-1}function m(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function h(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function g(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function b(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function v(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function x(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function y(t){return t.split("")}function w(t){return t.match(Re)||[]}function _(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function k(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function C(t,e,n){return e===e?J(t,e,n):k(t,S,n)}function O(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function S(t){return t!==t}function A(t,e){var n=null==t?0:t.length;return n?P(t,e)/n:Ft}function $(t){return function(e){return null==e?it:e[t]}}function T(t){return function(e){return null==t?it:t[e]}}function j(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function E(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function P(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);o!==it&&(n=n===it?o:n+o)}return n}function z(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function L(t,e){return h(e,function(e){return[e,t[e]]})}function F(t){return function(e){return t(e)}}function M(t,e){return h(e,function(e){return t[e]})}function D(t,e){return t.has(e)}function I(t,e){for(var n=-1,r=t.length;++n<r&&C(e,t[n],0)>-1;);return n}function B(t,e){for(var n=t.length;n--&&C(e,t[n],0)>-1;);return n}function R(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}function N(t){return"\\"+$n[t]}function H(t,e){return null==t?it:t[e]}function V(t){return xn.test(t)}function U(t){return yn.test(t)}function q(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function W(t){var e=-1
|
||
|
* Vue.js v2.4.2
|
||
|
* (c) 2014-2017 Evan You
|
||
|
* Released under the MIT License.
|
||
|
*/
|
||
|
function n(t){return void 0===t||null===t}function r(t){return void 0!==t&&null!==t}function i(t){return!0===t}function o(t){return!1===t}function a(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t}function l(t){return null!==t&&"object"==typeof t}function s(t){return"[object Object]"===Di.call(t)}function c(t){return"[object RegExp]"===Di.call(t)}function u(t){var e=parseFloat(t);return e>=0&&Math.floor(e)===e&&isFinite(t)}function p(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function d(t){var e=parseFloat(t);return isNaN(e)?t:e}function f(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}function m(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}function h(t,e){return Ri.call(t,e)}function g(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function b(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function v(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function x(t,e){for(var n in e)t[n]=e[n];return t}function y(t){for(var e={},n=0;n<t.length;n++)t[n]&&x(e,t[n]);return e}function w(t,e,n){}function _(t,e){if(t===e)return!0;var n=l(t),r=l(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var i=Array.isArray(t),o=Array.isArray(e);if(i&&o)return t.length===e.length&&t.every(function(t,n){return _(t,e[n])});if(i||o)return!1;var a=Object.keys(t),s=Object.keys(e);return a.length===s.length&&a.every(function(n){return _(t[n],e[n])})}catch(t){return!1}}function k(t,e){for(var n=0;n<t.length;n++)if(_(t[n],e))return n;return-1}function C(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}function O(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function S(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function A(t){if(!Qi.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}function $(t,e,n){if(Ji.errorHandler)Ji.errorHandler.call(null,t,e,n);else{if(!no||"undefined"==typeof console)throw t;console.error(t)}}function T(t){return"function"==typeof t&&/native code/.test(t.toString())}function j(t){wo.target&&_o.push(wo.target),wo.target=t}function E(){wo.target=_o.pop()}function P(t,e,n){t.__proto__=e}function z(t,e,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];S(t,o,e[o])}}function L(t,e){if(l(t)){var n;return h(t,"__ob__")&&t.__ob__ instanceof Ao?n=t.__ob__:So.shouldConvert&&!go()&&(Array.isArray(t)||s(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new Ao(t)),e&&n&&n.vmCount++,n}}function F(t,e,n,r,i){var o=new wo,a=Object.getOwnPropertyDescriptor(t,e);if(!a||!1!==a.configurable){var l=a&&a.get,s=a&&a.set,c=!i&&L(n);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=l?l.call(t):n;return wo.target&&(o.depend(),c&&c.dep.depend(),Array.isArray(e)&&I(e)),e},set:function(e){var r=l?l.call(t):n;e===r||e!==e&&r!==r||(s?s.call(t,e):n=e,c=!i&&L(e),o.notify())}})}}function M(t,e,n){if(Array.isArray(t)&&u(e))return t.length=Math.max(t.length,e),t.splice(e,1,n),n;if(h(t,e))return t[e]=n,n;var r=t.__ob__;return t._isVue||r&&r.vmCount?n:r?(F(r.value,e,n),r.dep.notify(),n):(t[e]=n,n)}function D(t,e){if(Array.isArray(t)&&u(e))return void t.splice(e,1);var n=t.__ob__;t._isVue||n&&n.vmCount||h(t,e)&&(delete t[e],n&&n.dep.notify())}function I(t){for(var e=void 0,n=0,r=t.length;n<r;n++)e=t[n],e&&e.__ob__&&e.__ob__.dep.depend(),Array.isArray(e)&&I(e)}function B(t,e){if(!e)return t;for(var n,r,i,o=Object.keys(e),a=0;a<o.length;a++)n=o[a],r=t[n],i=e[n],h(t,n)?s(r)&&s(i)&&B(r,i):M(t,n,i);return t}function R(t,e,n){return n?t||e?function(){var r="function"==typeof e?e.call(n):e,i="function"==typeof t?t.call(n):void 0;return r?B(r,i):i}:void 0:e?t?function(){return B("function"==typeof e?e.call(this):e,"function"==typeof t?t.call(this):t)}:e:t}function N(t,e){return e?t?t.concat(e):Array.isArray(e)?e:[e]:t}functi
|
||
|
* Underscore.string
|
||
|
* (c) 2010 Esa-Matti Suuronen <esa-matti aet suuronen dot org>
|
||
|
* Underscore.string is freely distributable under the terms of the MIT license.
|
||
|
* Documentation: https://github.com/epeli/underscore.string
|
||
|
* Some code is borrowed from MooTools and Alexandru Marasteanu.
|
||
|
* Version '3.3.4'
|
||
|
* @preserve
|
||
|
*/
|
||
|
function r(t){if(!(this instanceof r))return new r(t);this._wrapped=t}function i(t,e){"function"==typeof e&&(r.prototype[t]=function(){var t=[this._wrapped].concat(Array.prototype.slice.call(arguments)),n=e.apply(null,t);return"string"==typeof n?new r(n):n})}r.VERSION="3.3.4",r.isBlank=n(27),r.stripTags=n(101),r.capitalize=n(11),r.decapitalize=n(22),r.chop=n(65),r.trim=n(1),r.clean=n(67),r.cleanDiacritics=n(20),r.count=n(68),r.chars=n(12),r.swapCase=n(103),r.escapeHTML=n(71),r.unescapeHTML=n(109),r.splice=n(28),r.insert=n(77),r.replaceAll=n(91),r.include=n(76),r.join=n(78),r.lines=n(80),r.dedent=n(69),r.reverse=n(92),r.startsWith=n(96),r.endsWith=n(70),r.pred=n(87),r.succ=n(102),r.titleize=n(104),r.camelize=n(19),r.underscored=n(31),r.dasherize=n(21),r.classify=n(66),r.humanize=n(75),r.ltrim=n(83),r.rtrim=n(15),r.truncate=n(108),r.prune=n(88),r.words=n(112),r.pad=n(9),r.lpad=n(81),r.rpad=n(93),r.lrpad=n(82),r.sprintf=n(95),r.vsprintf=n(111),r.toNumber=n(106),r.numberFormat=n(86),r.strRight=n(99),r.strRightBack=n(100),r.strLeft=n(97),r.strLeftBack=n(98),r.toSentence=n(30),r.toSentenceSerial=n(107),r.slugify=n(94),r.surround=n(29),r.quote=n(89),r.unquote=n(110),r.repeat=n(90),r.naturalCmp=n(85),r.levenshtein=n(79),r.toBoolean=n(105),r.exports=n(72),r.escapeRegExp=n(24),r.wrap=n(113),r.map=n(84),r.strip=r.trim,r.lstrip=r.ltrim,r.rstrip=r.rtrim,r.center=r.lrpad,r.rjust=r.lpad,r.ljust=r.rpad,r.contains=r.include,r.q=r.quote,r.toBool=r.toBoolean,r.camelcase=r.camelize,r.mapChars=r.map,r.prototype={value:function(){return this._wrapped}};for(var o in r)i(o,r[o]);i("tap",function(t,e){return e(t)});var a=["toUpperCase","toLowerCase","split","replace","slice","substring","substr","concat"];for(var l in a)!function(t){i(t,function(e){var n=Array.prototype.slice.call(arguments,1);return String.prototype[t].apply(e,n)})}(a[l]);t.exports=r},function(t,e,n){var r=n(0),i=n(13),o=String.prototype.trimRight;t.exports=function(t,e){return t=r(t),!e&&o?o.call(t):(e=i(e),t.replace(new RegExp(e+"+$"),""))}},function(t,e,n){function r(t){for(var e=0;e<t.length;e++){var n=t[e],r=u[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(o(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],i=0;i<n.parts.length;i++)a.push(o(n.parts[i]));u[n.id]={id:n.id,refs:1,parts:a}}}}function i(){var t=document.createElement("style");return t.type="text/css",p.appendChild(t),t}function o(t){var e,n,r=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(r){if(m)return h;r.parentNode.removeChild(r)}if(g){var o=f++;r=d||(d=i()),e=a.bind(null,r,o,!1),n=a.bind(null,r,o,!0)}else r=i(),e=l.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}function a(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=b(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function l(t,e){var n=e.css,r=e.media,i=e.sourceMap;if(r&&t.setAttribute("media",r),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var s="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!s)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var c=n(126),u={},p=s&&(document.head||document.getElementsByTagName("head")[0]),d=null,f=0,m=!1,h=function(){},g="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,n){m=n;var i=c(t,e);return r(i),function(e){for(var n=[],o=0;o<i.length;o++){var a=i[o],l=u[a.id];l.refs--,n.push(l)}e?(i=c(t,e),r(i)):i=[];for(var o=0;o<n.leng
|
||
|
* vue-resource v1.3.4
|
||
|
* https://github.com/pagekit/vue-resource
|
||
|
* Released under the MIT License.
|
||
|
*/
|
||
|
var q=2;r.reject=function(t){return new r(function(e,n){n(t)})},r.resolve=function(t){return new r(function(e,n){e(t)})},r.all=function(t){return new r(function(e,n){var i=0,o=[];0===t.length&&e(o);for(var a=0;a<t.length;a+=1)r.resolve(t[a]).then(function(n){return function(r){o[n]=r,(i+=1)===t.length&&e(o)}}(a),n)})},r.race=function(t){return new r(function(e,n){for(var i=0;i<t.length;i+=1)r.resolve(t[i]).then(e,n)})};var W=r.prototype;W.resolve=function(t){var e=this;if(e.state===q){if(t===e)throw new TypeError("Promise settled with itself.");var n=!1;try{var r=t&&t.then;if(null!==t&&"object"==typeof t&&"function"==typeof r)return void r.call(t,function(t){n||e.resolve(t),n=!0},function(t){n||e.reject(t),n=!0})}catch(t){return void(n||e.reject(t))}e.state=0,e.value=t,e.notify()}},W.reject=function(t){var e=this;if(e.state===q){if(t===e)throw new TypeError("Promise settled with itself.");e.state=1,e.value=t,e.notify()}},W.notify=function(){var t=this;l(function(){if(t.state!==q)for(;t.deferred.length;){var e=t.deferred.shift(),n=e[0],r=e[1],i=e[2],o=e[3];try{0===t.state?i("function"==typeof n?n.call(void 0,t.value):t.value):1===t.state&&("function"==typeof r?i(r.call(void 0,t.value)):o(t.value))}catch(t){o(t)}}})},W.then=function(t,e){var n=this;return new r(function(r,i){n.deferred.push([t,e,r,i]),n.notify()})},W.catch=function(t){return this.then(void 0,t)},"undefined"==typeof Promise&&(window.Promise=r),i.all=function(t,e){return new i(Promise.all(t),e)},i.resolve=function(t,e){return new i(Promise.resolve(t),e)},i.reject=function(t,e){return new i(Promise.reject(t),e)},i.race=function(t,e){return new i(Promise.race(t),e)};var Y=i.prototype;Y.bind=function(t){return this.context=t,this},Y.then=function(t,e){return t&&t.bind&&this.context&&(t=t.bind(this.context)),e&&e.bind&&this.context&&(e=e.bind(this.context)),new i(this.promise.then(t,e),this.context)},Y.catch=function(t){return t&&t.bind&&this.context&&(t=t.bind(this.context)),new i(this.promise.catch(t),this.context)},Y.finally=function(t){return this.then(function(e){return t.call(this),e},function(e){return t.call(this),Promise.reject(e)})};var G,K={},Z=K.hasOwnProperty,J=[],X=J.slice,Q=!1,tt="undefined"!=typeof window,et=function(t){var e=t.config,n=t.nextTick;G=n,Q=e.debug||!e.silent},nt=Array.isArray,rt=Object.assign||k,it=function(t,e){var n=e(t);return d(t.root)&&!/^(https?:)?\//.test(n)&&(n=c(t.root,"/")+"/"+n),n},ot=function(t,e){var n=Object.keys(P.options.params),r={},i=e(t);return y(t.params,function(t,e){-1===n.indexOf(e)&&(r[e]=t)}),r=P.params(r),r&&(i+=(-1==i.indexOf("?")?"?":"&")+r),i},at=function(t){var e=[],n=O(t.url,t.params,e);return e.forEach(function(e){delete t.params[e]}),n};P.options={url:"",root:null,params:{}},P.transform={template:at,query:ot,root:it},P.transforms=["template","query","root"],P.params=function(t){var e=[],n=encodeURIComponent;return e.add=function(t,e){f(e)&&(e=e()),null===e&&(e=""),this.push(n(t)+"="+n(e))},L(e,t),e.join("&").replace(/%20/g,"+")},P.parse=function(t){var e=document.createElement("a");return document.documentMode&&(e.href=t,t=e.href),e.href=t,{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",port:e.port,host:e.host,hostname:e.hostname,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):""}};var lt=function(t){return new i(function(e){var n=new XDomainRequest,r=function(r){var i=r.type,o=0;"load"===i?o=200:"error"===i&&(o=500),e(t.respondWith(n.responseText,{status:o}))};t.abort=function(){return n.abort()},n.open(t.method,t.getUrl()),t.timeout&&(n.timeout=t.timeout),n.onload=r,n.onabort=r,n.onerror=r,n.ontimeout=r,n.onprogress=function(){},n.send(t.getBody())})},st=tt&&"withCredentials"in new XMLHttpRequest,ct=function(t,e){if(tt){var n=P.parse(location.href),r=P.parse(t.getUrl());r.protocol===n.protocol&&r.host===n.host||(t.crossOrigin=!0,t.emulateHTTP=!1,st||(t.client=lt))}e()},ut=function(t,e){b(t.body)?t.headers.delete("Content-Type"):m(t.body)&&t.emulateJSON&&(t.body=P.params(t.body),t.headers
|
||
|
* Module dependencies
|
||
|
*/
|
||
|
var n=Array.prototype.slice,r=Object.prototype.toString;/*!
|
||
|
* Current library version, should match `package.json`
|
||
|
*/
|
||
|
e.VERSION="0.0.8",/*!
|
||
|
* Alignment constants
|
||
|
*/
|
||
|
e.LEFT=0,e.CENTER=1,e.RIGHT=2,/*!
|
||
|
* Static methods
|
||
|
*/
|
||
|
e.factory=function(t,n){return new e(t,n)},e.align=function(t,n,r,i){return t===e.LEFT?e.alignLeft(n,r,i):t===e.RIGHT?e.alignRight(n,r,i):t===e.CENTER?e.alignCenter(n,r,i):e.alignAuto(n,r,i)},e.alignLeft=function(t,e,n){return!e||e<0?"":(void 0!==t&&null!==t||(t=""),void 0===n&&(n=" "),"string"!=typeof t&&(t=t.toString()),e+1-t.length<=0?t:t+Array(e+1-t.length).join(n))},e.alignCenter=function(t,n,r){if(!n||n<0)return"";void 0!==t&&null!==t||(t=""),void 0===r&&(r=" "),"string"!=typeof t&&(t=t.toString());var i=t.length,o=Math.floor(n/2-i/2),a=Math.abs(i%2-n%2),n=t.length;return e.alignRight("",o,r)+t+e.alignLeft("",o+a,r)},e.alignRight=function(t,e,n){return!e||e<0?"":(void 0!==t&&null!==t||(t=""),void 0===n&&(n=" "),"string"!=typeof t&&(t=t.toString()),e+1-t.length<=0?t:Array(e+1-t.length).join(n)+t)},e.alignAuto=function(t,n,i){void 0!==t&&null!==t||(t="");var o=r.call(t);if(i||(i=" "),n=+n,"[object String]"!==o&&(t=t.toString()),t.length<n)switch(o){case"[object Number]":return e.alignRight(t,n,i);default:return e.alignLeft(t,n,i)}return t},e.arrayFill=function(t,e){for(var n=new Array(t),r=0;r!==t;r++)n[r]=e;return n},/*!
|
||
|
* Instance methods
|
||
|
*/
|
||
|
e.prototype.reset=e.prototype.clear=function(t){return this.__name="",this.__nameAlign=e.CENTER,this.__rows=[],this.__maxCells=0,this.__aligns=[],this.__colMaxes=[],this.__spacing=1,this.__heading=null,this.__headingAlign=e.CENTER,this.setBorder(),"[object String]"===r.call(t)?this.__name=t:"[object Object]"===r.call(t)&&this.fromJSON(t),this},e.prototype.setBorder=function(t,e,n,r){return this.__border=!0,1===arguments.length&&(e=n=r=t),this.__edge=t||"|",this.__fill=e||"-",this.__top=n||".",this.__bottom=r||"'",this},e.prototype.removeBorder=function(){return this.__border=!1,this.__edge=" ",this.__fill=" ",this},e.prototype.setAlign=function(t,e){return this.__aligns[t]=e,this},e.prototype.setTitle=function(t){return this.__name=t,this},e.prototype.getTitle=function(){return this.__name},e.prototype.setTitleAlign=function(t){return this.__nameAlign=t,this},e.prototype.sort=function(t){return this.__rows.sort(t),this},e.prototype.sortColumn=function(t,e){return this.__rows.sort(function(n,r){return e(n[t],r[t])}),this},e.prototype.setHeading=function(t){return(arguments.length>1||"[object Array]"!==r.call(t))&&(t=n.call(arguments)),this.__heading=t,this},e.prototype.getHeading=function(){return this.__heading.slice()},e.prototype.setHeadingAlign=function(t){return this.__headingAlign=t,this},e.prototype.addRow=function(t){return(arguments.length>1||"[object Array]"!==r.call(t))&&(t=n.call(arguments)),this.__maxCells=Math.max(this.__maxCells,t.length),this.__rows.push(t),this},e.prototype.getRows=function(){return this.__rows.slice().map(function(t){return t.slice()})},e.prototype.addRowMatrix=function(t){for(var e=0;e<t.length;e++)this.addRow(t[e]);return this},e.prototype.addData=function(t,e,n){if("[object Array]"!==r.call(t))return this;for(var i=0,o=t.length;i<o;i++){var a=e(t[i]);n?this.addRowMatrix(a):this.addRow(a)}return this},e.prototype.clearRows=function(){return this.__rows=[],this.__maxCells=0,this.__colMaxes=[],this},e.prototype.setJustify=function(t){return 0===arguments.length&&(t=!0),this.__justify=!!t,this},e.prototype.toJSON=function(){return{title:this.getTitle(),heading:this.getHeading(),rows:this.getRows()}},e.prototype.parse=e.prototype.fromJSON=function(t){return this.clear().setTitle(t.title).setHeading(t.heading).addRowMatrix(t.rows)},e.prototype.render=e.prototype.valueOf=e.prototype.toString=function(){for(var t,n=this,r=[],i=this.__maxCells,o=e.arrayFill(i,0),a=3*i,l=this.__rows,s=this.__border,c=this.__heading?[this.__heading].concat(l):l,u=0;u<c.length;u++)for(var p=c[u],d=0;d<i;d++){var f=p[d];o[d]=Math.max(o[d],f?f.toString().length:0)}this.__colMaxes=o,t=this.__justify?Math.max.apply(null,o):0,o.forEach(function(e){a+=t||e+n.__spacing}),t&&(a+=o.length),a-=this.__spacing,s&&r.push(this._seperator(a-i+1,this.__top)),this.__name&&(r.push(this._renderTitle(a-i+1)),s&&r.push(this._seperator(a-i+1))),this.__heading&&(r.push(this._renderRow(this.__heading," ",this.__headingAlign)),r.push(this._rowSeperator(i,this.__fill)));for(var u=0;u<this.__rows.length;u++)r.push(this._renderRow(this.__rows[u]," "));s&&r.push(this._seperator(a-i+1,this.__bottom));var m=this.options.prefix||"";return m+r.join("\n"+m)},e.prototype._seperator=function(t,n){return n||(n=this.__edge),n+e.alignRight(n,t,this.__fill)},e.prototype._rowSeperator=function(){var t=e.arrayFill(this.__maxCells,this.__fill);return this._renderRow(t,this.__fill)},e.prototype._renderTitle=function(t){var n=" "+this.__name+" ",r=e.align(this.__nameAlign,n,t-1," ");return this.__edge+r+this.__edge},e.prototype._renderRow=function(t,n,r){for(var i=[""],o=this.__colMaxes,a=0;a<this.__maxCells;a++){var l=t[a],s=this.__justify?Math.max.apply(null,o):o[a],c=s,u=this.__aligns[a],p=r,d="alignAuto";void 0===r&&(p=u),p===e.LEFT&&(d="alignLeft"),p===e.CENTER&&(d="alignCenter"),p===e.RIGHT&&(d="alignRight"),i.push(e[d](l,c,n))}var f=i.join(n+this.__edge+n);return(f=f.substr(1,f.length))+n+this.__edge},["Left","Right","Center"].forEach(function(t){var r=e[t.toUpperCase()];["setAlign","setTitleAlign","setHeadingAlign"].forEach(function(i){e.prototype[
|
||
|
!function(o,a){r=a,void 0!==(i="function"==typeof r?r.call(e,n,e,t):r)&&(t.exports=i)}(0,function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=t.getBoundingClientRect(),n={};for(var r in e)n[r]=e[r];if(t.ownerDocument!==document){var o=t.ownerDocument.defaultView.frameElement;if(o){var a=i(o);n.top+=a.top,n.bottom+=a.top,n.left+=a.left,n.right+=a.left}}return n}function o(t){var e=getComputedStyle(t)||{},n=e.position,r=[];if("fixed"===n)return[t];for(var i=t;(i=i.parentNode)&&i&&1===i.nodeType;){var o=void 0;try{o=getComputedStyle(i)}catch(t){}if(void 0===o||null===o)return r.push(i),r;var a=o,l=a.overflow,s=a.overflowX;/(auto|scroll)/.test(l+a.overflowY+s)&&("absolute"!==n||["relative","absolute","fixed"].indexOf(o.position)>=0)&&r.push(i)}return r.push(t.ownerDocument.body),t.ownerDocument!==document&&r.push(t.ownerDocument.defaultView),r}function a(){O&&document.body.removeChild(O),O=null}function l(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var n=e.documentElement,r=i(t),o=$();return r.top-=o.top,r.left-=o.left,void 0===r.width&&(r.width=document.body.scrollWidth-r.left-r.right),void 0===r.height&&(r.height=document.body.scrollHeight-r.top-r.bottom),r.top=r.top-n.clientTop,r.left=r.left-n.clientLeft,r.right=e.body.clientWidth-r.width-r.left,r.bottom=e.body.clientHeight-r.height-r.top,r}function s(t){return t.offsetParent||document.documentElement}function c(){if(T)return T;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");u(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var n=t.offsetWidth;e.style.overflow="scroll";var r=t.offsetWidth;n===r&&(r=e.clientWidth),document.body.removeChild(e);var i=n-r;return T={width:i,height:i}}function u(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var n in e)({}).hasOwnProperty.call(e,n)&&(t[n]=e[n])}),t}function p(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var n=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),r=m(t).replace(n," ");h(t,r)}}function d(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{p(t,e);var n=m(t)+" "+e;h(t,n)}}function f(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=m(t);return new RegExp("(^| )"+e+"( |$)","gi").test(n)}function m(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function h(t,e){t.setAttribute("class",e)}function g(t,e,n){n.forEach(function(n){-1===e.indexOf(n)&&f(t,n)&&p(t,n)}),e.forEach(function(e){f(t,e)||d(t,e)})}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function v(t,e){var n=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+n>=e&&e>=t-n}function x(){return"undefined"!=typeof performance&&void 0!==performance.now?performance.now():+new Date}function y(){for(var t={top:0,left:0},e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach(function(e){var n=e.top,r=e.left;"string"==typeof n&&(n=parseFloat(n,10)),"string"==typeof r&&(r=parseFloat(r,10)),t.top+=n,t.left+=r}),t}function w(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function _(t,e){return"scrollParent"===e?e=t.s
|
||
|
//# sourceMappingURL=build.js.map
|