hugo-theme-relearn/static/mermaid/mermaid.js

9 lines
834 KiB
JavaScript
Raw Normal View History

2018-12-03 16:40:21 +00:00
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=182)}([function(t,e,n){(function(t){t.exports=function(){"use strict";var e,r;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function u(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function c(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function d(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function f(t,e){for(var n in e)d(e,n)&&(t[n]=e[n]);return d(e,"toString")&&(t.toString=e.toString),d(e,"valueOf")&&(t.valueOf=e.valueOf),t}function h(t,e,n,r){return Se(t,e,n,r,!0).utc()}function _(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function p(t){if(null==t._isValid){var e=_(t),n=r.call(e.parsedDateParts,function(t){return null!=t}),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function m(t){var e=h(NaN);return null!=t?f(_(e),t):_(e).userInvalidated=!0,e}r=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var y=i.momentProperties=[];function g(t,e){var n,r,i;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=_(e)),s(e._locale)||(t._locale=e._locale),y.length>0)for(n=0;n<y.length;n++)r=y[n],s(i=e[r])||(t[r]=i);return t}var v=!1;function M(t){g(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,i.updateOffset(this),v=!1)}function b(t){return t instanceof M||null!=t&&null!=t._isAMomentObject}function k(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function L(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=k(e)),n}function w(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&L(t[r])!==L(e[r]))&&o++;return o+a}function x(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function T(t,e){var n=!0;return f(function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,a=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];a.push(r)}x(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)},e)}var Y,D={};function S(t,e){n
/*!
* Wait for document loaded before starting the execution
*/
window.addEventListener("load",function(){s()},!1);var u={startOnLoad:!0,htmlLabels:!0,mermaidAPI:i.default,parse:i.default.parse,render:i.default.render,init:function(){var t=i.default.getConfig();a.logger.debug("Starting rendering diagrams");var e=void 0;arguments.length>=2?(
/*! sequence config was passed as #1 */
void 0!==arguments[0]&&(u.sequenceConfig=arguments[0]),e=arguments[1]):e=arguments[0];var n=void 0;"function"==typeof arguments[arguments.length-1]?(n=arguments[arguments.length-1],a.logger.debug("Callback function found")):void 0!==t.mermaid&&("function"==typeof t.mermaid.callback?(n=t.mermaid.callback,a.logger.debug("Callback function found")):a.logger.debug("No Callback function found")),e=void 0===e?document.querySelectorAll(".mermaid"):"string"==typeof e?document.querySelectorAll(e):e instanceof window.Node?[e]:e,a.logger.debug("Start On Load before: "+u.startOnLoad),void 0!==u.startOnLoad&&(a.logger.debug("Start On Load inner: "+u.startOnLoad),i.default.initialize({startOnLoad:u.startOnLoad})),void 0!==u.ganttConfig&&i.default.initialize({gantt:u.ganttConfig});for(var o=void 0,s=function(t){var a=e[t];
/*! Check if previously processed */if(a.getAttribute("data-processed"))return"continue";a.setAttribute("data-processed",!0);var s="mermaid-"+Date.now();o=a.innerHTML,o=r.default.decode(o).trim().replace(/<br>/gi,"<br/>"),i.default.render(s,o,function(t,e){a.innerHTML=t,void 0!==n&&n(s),e(a)},a)},c=0;c<e.length;c++)s(c)},initialize:function(t){a.logger.debug("Initializing mermaid"),void 0!==t.mermaid&&(void 0!==t.mermaid.startOnLoad&&(u.startOnLoad=t.mermaid.startOnLoad),void 0!==t.mermaid.htmlLabels&&(u.htmlLabels=t.mermaid.htmlLabels)),i.default.initialize(t)},contentLoaded:s};e.default=u}]).default});