1/******/ (() => { // webpackBootstrap 2/******/ var __webpack_modules__ = ({ 3 4/***/ 476: 5/***/ ((module) => { 6 7"use strict"; 8/* 9 # ----------------------------------------------------------------------------- 10 # ~/js/adapter/adapter.js 11 # Provides an empty object for later loaded adapter objects 12 # 13 # Product/Info: 14 # https://jekyll.one 15 # 16 # Copyright (C) 2022 Juergen Adams 17 # 18 # J1 Template is licensed under MIT License. 19 # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE 20 # ----------------------------------------------------------------------------- 21*/ 22// ----------------------------------------------------------------------------- 23// ESLint shimming 24// ----------------------------------------------------------------------------- 25 26/* eslint indent: "off" */ 27 28/* eslint no-unused-vars: "off" */ 29 30/* eslint no-undef: "off" */ 31// ----------------------------------------------------------------------------- 32 33 34module.exports = function (j1, window) { 35 return { 36 // ------------------------------------------------------------------------- 37 // _init_ 38 // Global initializer for the adapter object 39 // ------------------------------------------------------------------------- 40 _init_: function _init_() { 41 return; 42 } // END _init_ 43 44 }; // END return 45}(j1, window); 46 47/***/ }), 48 49/***/ 253: 50/***/ (() => { 51 52/* 53 # ----------------------------------------------------------------------------- 54 # ~/js/adoc_result_viewer/view_results.js 55 # Provides JavaScript functions displaying results for Asciidoctor 56 # example block 57 # 58 # Product/Info: 59 # https://jekyll.one 60 # 61 # Copyright (C) 2022 Juergen Adams 62 # 63 # J1 Template is licensed under MIT License. 64 # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE 65 # ----------------------------------------------------------------------------- 66 # TODO: Improve lanuage settings 67 # TODO: Improve auto-hide functionality for the results block 68 # ----------------------------------------------------------------------------- 69*/ 70// ----------------------------------------------------------------------------- 71// ESLint shimming 72// ----------------------------------------------------------------------------- 73 74/* eslint indent: "off" */ 75 76/* global $ */ 77// ----------------------------------------------------------------------------- 78var timeoutHandle; // var language = 'de'; 79 80var language = document.documentElement.lang; 81 82function toggle_result_block(result_block) { 83 window.clearTimeout(timeoutHandle); // Clear the timeout object 84 85 result_block.prev().toggleClass('stacked'); 86 result_block.toggle(); // jadams: Improve auto-hide functionality for the results block 87 // 88 // timeoutHandle = window.setTimeout(function () { 89 // result_block.hide(); 90 // }, 5000); 91} 92 93function insert_result_links() { 94 $('.result').each(function (idx, node) { 95 var view_result_link; 96 var result_block = $(node); 97 var title_div = result_block.prev().find('.title'); 98 99 if (language == 'en') { 100 view_result_link = $('<div class="j1-viewer"><span class="btn-viewer" data-bs-toggle="tooltip" data-bs-placement="left" title="toggle results" data-bs-original-title="toggle results">View</span></div>'); 101 } else if (language == 'de') { 102 view_result_link = $('<div class="j1-viewer"><span class="btn-viewer" data-bs-toggle="tooltip" data-bs-placement="left" title="Anzeige umschalten" data-bs-original-title="toggle results">Anzeige</span></div>'); 103 } else { 104 view_result_link = $('<div class="j1-viewer"><span class="btn-viewer" data-bs-toggle="tooltip" data-bs-placement="left" title="toggle results" data-bs-original-title="toggle results">View</span></div>'); 105 } 106 107 title_div.append(view_result_link); 108 $('.btn-viewer').tooltip(); 109 view_result_link.on('click', function (event) { 110 event.preventDefault(); 111 toggle_result_block(result_block); 112 }); 113 }); 114} 115 116$(insert_result_links); 117 118/***/ }), 119 120/***/ 921: 121/***/ ((module) => { 122 123"use strict"; 124/* 125 * anime.js v3.2.0 126 * (c) 2020 Julian Garnier 127 * Released under the MIT license 128 * animejs.com 129 */ 130 // Defaults 131 132var defaultInstanceSettings = { 133 update: null, 134 begin: null, 135 loopBegin: null, 136 changeBegin: null, 137 change: null, 138 changeComplete: null, 139 loopComplete: null, 140 complete: null, 141 loop: 1, 142 direction: 'normal', 143 autoplay: true, 144 timelineOffset: 0 145};
vendor: 4,733 bytes, lines 146-333
146var defaultTweenSettings = { 147 duration: 1000, 148 delay: 0, 149 endDelay: 0, 150 easing: 'easeOutElastic(1, .5)', 151 round: 0 152}; 153var validTransforms = ['translateX', 'translateY', 'translateZ', 'rotate', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'perspective', 'matrix', 'matrix3d']; // Caching 154 155var cache = { 156 CSS: {}, 157 springs: {} 158}; // Utils 159 160function minMax(val, min, max) { 161 return Math.min(Math.max(val, min), max); 162} 163 164function stringContains(str, text) { 165 return str.indexOf(text) > -1; 166} 167 168function applyArguments(func, args) { 169 return func.apply(null, args); 170} 171 172var is = { 173 arr: function arr(a) { 174 return Array.isArray(a); 175 }, 176 obj: function obj(a) { 177 return stringContains(Object.prototype.toString.call(a), 'Object'); 178 }, 179 pth: function pth(a) { 180 return is.obj(a) && a.hasOwnProperty('totalLength'); 181 }, 182 svg: function svg(a) { 183 return a instanceof SVGElement; 184 }, 185 inp: function inp(a) { 186 return a instanceof HTMLInputElement; 187 }, 188 dom: function dom(a) { 189 return a.nodeType || is.svg(a); 190 }, 191 str: function str(a) { 192 return typeof a === 'string'; 193 }, 194 fnc: function fnc(a) { 195 return typeof a === 'function'; 196 }, 197 und: function und(a) { 198 return typeof a === 'undefined'; 199 }, 200 hex: function hex(a) { 201 return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a); 202 }, 203 rgb: function rgb(a) { 204 return /^rgb/.test(a); 205 }, 206 hsl: function hsl(a) { 207 return /^hsl/.test(a); 208 }, 209 col: function col(a) { 210 return is.hex(a) || is.rgb(a) || is.hsl(a); 211 }, 212 key: function key(a) { 213 return !defaultInstanceSettings.hasOwnProperty(a) && !defaultTweenSettings.hasOwnProperty(a) && a !== 'targets' && a !== 'keyframes'; 214 } 215}; // Easings 216 217function parseEasingParameters(string) { 218 var match = /\(([^)]+)\)/.exec(string); 219 return match ? match[1].split(',').map(function (p) { 220 return parseFloat(p); 221 }) : []; 222} // Spring solver inspired by Webkit Copyright © 2016 Apple Inc. All rights reserved. https://webkit.org/demos/spring/spring.js 223 224 225function spring(string, duration) { 226 var params = parseEasingParameters(string); 227 var mass = minMax(is.und(params[0]) ? 1 : params[0], .1, 100); 228 var stiffness = minMax(is.und(params[1]) ? 100 : params[1], .1, 100); 229 var damping = minMax(is.und(params[2]) ? 10 : params[2], .1, 100); 230 var velocity = minMax(is.und(params[3]) ? 0 : params[3], .1, 100); 231 var w0 = Math.sqrt(stiffness / mass); 232 var zeta = damping / (2 * Math.sqrt(stiffness * mass)); 233 var wd = zeta < 1 ? w0 * Math.sqrt(1 - zeta * zeta) : 0; 234 var a = 1; 235 var b = zeta < 1 ? (zeta * w0 + -velocity) / wd : -velocity + w0; 236 237 function solver(t) { 238 var progress = duration ? duration * t / 1000 : t; 239 240 if (zeta < 1) { 241 progress = Math.exp(-progress * zeta * w0) * (a * Math.cos(wd * progress) + b * Math.sin(wd * progress)); 242 } else { 243 progress = (a + b * progress) * Math.exp(-progress * w0); 244 } 245 246 if (t === 0 || t === 1) { 247 return t; 248 } 249 250 return 1 - progress; 251 } 252 253 function getDuration() { 254 var cached = cache.springs[string]; 255 256 if (cached) { 257 return cached; 258 } 259 260 var frame = 1 / 6; 261 var elapsed = 0; 262 var rest = 0; 263 264 while (true) { 265 elapsed += frame; 266 267 if (solver(elapsed) === 1) { 268 rest++; 269 270 if (rest >= 16) { 271 break; 272 } 273 } else { 274 rest = 0; 275 } 276 } 277 278 var duration = elapsed * frame * 1000; 279 cache.springs[string] = duration; 280 return duration; 281 } 282 283 return duration ? solver : getDuration; 284} // Basic steps easing implementation https://developer.mozilla.org/fr/docs/Web/CSS/transition-timing-function 285 286 287function steps(steps) { 288 if (steps === void 0) steps = 10; 289 return function (t) { 290 return Math.ceil(minMax(t, 0.000001, 1) * steps) * (1 / steps); 291 }; 292} // BezierEasing https://github.com/gre/bezier-easing 293 294 295var bezier = function () { 296 var kSplineTableSize = 11; 297 var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0); 298 299 function A(aA1, aA2) { 300 return 1.0 - 3.0 * aA2 + 3.0 * aA1; 301 } 302 303 function B(aA1, aA2) { 304 return 3.0 * aA2 - 6.0 * aA1; 305 } 306 307 function C(aA1) { 308 return 3.0 * aA1; 309 } 310 311 function calcBezier(aT, aA1, aA2) { 312 return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; 313 } 314 315 function getSlope(aT, aA1, aA2) { 316 return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); 317 } 318 319 function binarySubdivide(aX, aA, aB, mX1, mX2) { 320 var currentX, 321 currentT, 322 i = 0; 323 324 do { 325 currentT = aA + (aB - aA) / 2.0; 326 currentX = calcBezier(currentT, mX1, mX2) - aX; 327 328 if (currentX > 0.0) { 329 aB = currentT; 330 } else { 331 aA = currentT; 332 } 333 } while (Math.abs(currentX) >
333 0.0000001 && ++i < 10); 334 335 return currentT; 336 } 337 338 function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) { 339 for (var i = 0; i < 4; ++i) { 340 var currentSlope = getSlope(aGuessT, mX1, mX2); 341 342 if (currentSlope === 0.0) { 343 return aGuessT; 344 } 345 346 var currentX = calcBezier(aGuessT, mX1, mX2) - aX; 347 aGuessT -= currentX / currentSlope; 348 } 349 350 return aGuessT; 351 } 352 353 function bezier(mX1, mY1, mX2, mY2) { 354 if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) { 355 return; 356 } 357 358 var sampleValues = new Float32Array(kSplineTableSize); 359 360 if (mX1 !== mY1 || mX2 !== mY2) { 361 for (var i = 0; i < kSplineTableSize; ++i) { 362 sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2); 363 } 364 } 365 366 function getTForX(aX) { 367 var intervalStart = 0; 368 var currentSample = 1; 369 var lastSample = kSplineTableSize - 1; 370 371 for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) { 372 intervalStart += kSampleStepSize; 373 } 374 375 --currentSample; 376 var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]); 377 var guessForT = intervalStart + dist * kSampleStepSize; 378 var initialSlope = getSlope(guessForT, mX1, mX2); 379 380 if (initialSlope >= 0.001) { 381 return newtonRaphsonIterate(aX, guessForT, mX1, mX2); 382 } else if (initialSlope === 0.0) { 383 return guessForT; 384 } else { 385 return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2); 386 } 387 } 388 389 return function (x) { 390 if (mX1 === mY1 && mX2 === mY2) { 391 return x; 392 } 393 394 if (x === 0 || x === 1) { 395 return x; 396 } 397 398 return calcBezier(getTForX(x), mY1, mY2); 399 }; 400 } 401 402 return bezier; 403}(); 404 405var penner = function () { 406 // Based on jQuery UI's implemenation of easing equations from Robert Penner (http://www.robertpenner.com/easing) 407 var eases = { 408 linear: function linear() { 409 return function (t) { 410 return t; 411 }; 412 } 413 }; 414 var functionEasings = { 415 Sine: function Sine() { 416 return function (t) { 417 return 1 - Math.cos(t * Math.PI / 2); 418 }; 419 }, 420 Circ: function Circ() { 421 return function (t) { 422 return 1 - Math.sqrt(1 - t * t); 423 }; 424 }, 425 Back: function Back() { 426 return function (t) { 427 return t * t * (3 * t - 2); 428 }; 429 }, 430 Bounce: function Bounce() { 431 return function (t) { 432 var pow2, 433 b = 4; 434 435 while (t < ((pow2 = Math.pow(2, --b)) - 1) / 11) {} 436 437 return 1 / Math.pow(4, 3 - b) - 7.5625 * Math.pow((pow2 * 3 - 2) / 22 - t, 2); 438 }; 439 }, 440 Elastic: function Elastic(amplitude, period) { 441 if (amplitude === void 0) amplitude = 1; 442 if (period === void 0) period = .5; 443 var a = minMax(amplitude, 1, 10); 444 var p = minMax(period, .1, 2); 445 return function (t) { 446 return t === 0 || t === 1 ? t : -a * Math.pow(2, 10 * (t - 1)) * Math.sin((t - 1 - p / (Math.PI * 2) * Math.asin(1 / a)) * (Math.PI * 2) / p); 447 }; 448 } 449 }; 450 var baseEasings = ['Quad', 'Cubic', 'Quart', 'Quint', 'Expo']; 451 baseEasings.forEach(function (name, i) { 452 functionEasings[name] = function () { 453 return function (t) { 454 return Math.pow(t, i + 2); 455 }; 456 }; 457 }); 458 Object.keys(functionEasings).forEach(function (name) { 459 var easeIn = functionEasings[name]; 460 eases['easeIn' + name] = easeIn; 461 462 eases['easeOut' + name] = function (a, b) { 463 return function (t) { 464 return 1 - easeIn(a, b)(1 - t); 465 }; 466 }; 467 468 eases['easeInOut' + name] = function (a, b) { 469 return function (t) { 470 return t < 0.5 ? easeIn(a, b)(t * 2) / 2 : 1 - easeIn(a, b)(t * -2 + 2) / 2; 471 }; 472 }; 473 }); 474 return eases; 475}(); 476 477function parseEasings(easing, duration) { 478 if (is.fnc(easing)) { 479 return easing; 480 } 481 482 var name = easing.split('(')[0]; 483 var ease = penner[name]; 484 var args = parseEasingParameters(easing); 485 486 switch (name) { 487 case 'spring': 488 return spring(easing, duration); 489 490 case 'cubicBezier': 491 return applyArguments(bezier, args); 492 493 case 'steps': 494 return applyArguments(steps, args); 495 496 default: 497 return applyArguments(ease, args); 498 } 499} // Strings 500 501
vendor: 17,501 bytes, lines 502-1255
502function selectString(str) { 503 try { 504 var nodes = document.querySelectorAll(str); 505 return nodes; 506 } catch (e) { 507 return; 508 } 509} // Arrays 510 511 512function filterArray(arr, callback) { 513 var len = arr.length; 514 var thisArg = arguments.length >= 2 ? arguments[1] : void 0; 515 var result = []; 516 517 for (var i = 0; i < len; i++) { 518 if (i in arr) { 519 var val = arr[i]; 520 521 if (callback.call(thisArg, val, i, arr)) { 522 result.push(val); 523 } 524 } 525 } 526 527 return result; 528} 529 530function flattenArray(arr) { 531 return arr.reduce(function (a, b) { 532 return a.concat(is.arr(b) ? flattenArray(b) : b); 533 }, []); 534} 535 536function toArray(o) { 537 if (is.arr(o)) { 538 return o; 539 } 540 541 if (is.str(o)) { 542 o = selectString(o) || o; 543 } 544 545 if (o instanceof NodeList || o instanceof HTMLCollection) { 546 return [].slice.call(o); 547 } 548 549 return [o]; 550} 551 552function arrayContains(arr, val) { 553 return arr.some(function (a) { 554 return a === val; 555 }); 556} // Objects 557 558 559function cloneObject(o) { 560 var clone = {}; 561 562 for (var p in o) { 563 clone[p] = o[p]; 564 } 565 566 return clone; 567} 568 569function replaceObjectProps(o1, o2) { 570 var o = cloneObject(o1); 571 572 for (var p in o1) { 573 o[p] = o2.hasOwnProperty(p) ? o2[p] : o1[p]; 574 } 575 576 return o; 577} 578 579function mergeObjects(o1, o2) { 580 var o = cloneObject(o1); 581 582 for (var p in o2) { 583 o[p] = is.und(o1[p]) ? o2[p] : o1[p]; 584 } 585 586 return o; 587} // Colors 588 589 590function rgbToRgba(rgbValue) { 591 var rgb = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(rgbValue); 592 return rgb ? "rgba(" + rgb[1] + ",1)" : rgbValue; 593} 594 595function hexToRgba(hexValue) { 596 var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; 597 var hex = hexValue.replace(rgx, function (m, r, g, b) { 598 return r + r + g + g + b + b; 599 }); 600 var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); 601 var r = parseInt(rgb[1], 16); 602 var g = parseInt(rgb[2], 16); 603 var b = parseInt(rgb[3], 16); 604 return "rgba(" + r + "," + g + "," + b + ",1)"; 605} 606 607function hslToRgba(hslValue) { 608 var hsl = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(hslValue) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(hslValue); 609 var h = parseInt(hsl[1], 10) / 360; 610 var s = parseInt(hsl[2], 10) / 100; 611 var l = parseInt(hsl[3], 10) / 100; 612 var a = hsl[4] || 1; 613 614 function hue2rgb(p, q, t) { 615 if (t < 0) { 616 t += 1; 617 } 618 619 if (t > 1) { 620 t -= 1; 621 } 622 623 if (t < 1 / 6) { 624 return p + (q - p) * 6 * t; 625 } 626 627 if (t < 1 / 2) { 628 return q; 629 } 630 631 if (t < 2 / 3) { 632 return p + (q - p) * (2 / 3 - t) * 6; 633 } 634 635 return p; 636 } 637 638 var r, g, b; 639 640 if (s == 0) { 641 r = g = b = l; 642 } else { 643 var q = l < 0.5 ? l * (1 + s) : l + s - l * s; 644 var p = 2 * l - q; 645 r = hue2rgb(p, q, h + 1 / 3); 646 g = hue2rgb(p, q, h); 647 b = hue2rgb(p, q, h - 1 / 3); 648 } 649 650 return "rgba(" + r * 255 + "," + g * 255 + "," + b * 255 + "," + a + ")"; 651} 652 653function colorToRgb(val) { 654 if (is.rgb(val)) { 655 return rgbToRgba(val); 656 } 657 658 if (is.hex(val)) { 659 return hexToRgba(val); 660 } 661 662 if (is.hsl(val)) { 663 return hslToRgba(val); 664 } 665} // Units 666 667 668function getUnit(val) { 669 var split = /[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(val); 670 671 if (split) { 672 return split[1]; 673 } 674} 675 676function getTransformUnit(propName) { 677 if (stringContains(propName, 'translate') || propName === 'perspective') { 678 return 'px'; 679 } 680 681 if (stringContains(propName, 'rotate') || stringContains(propName, 'skew')) { 682 return 'deg'; 683 } 684} // Values 685 686 687function getFunctionValue(val, animatable) { 688 if (!is.fnc(val)) { 689 return val; 690 } 691 692 return val(animatable.target, animatable.id, animatable.total); 693} 694 695function getAttribute(el, prop) { 696 return el.getAttribute(prop); 697} 698 699function convertPxToUnit(el, value, unit) { 700 var valueUnit = getUnit(value); 701 702 if (arrayContains([unit, 'deg', 'rad', 'turn'], valueUnit)) { 703 return value; 704 } 705 706 var cached = cache.CSS[value + unit]; 707 708 if (!is.und(cached)) { 709 return cached; 710 } 711 712 var baseline = 100; 713 var tempEl = document.createElement(el.tagName); 714 var parentEl = el.parentNode && el.parentNode !== document ? el.parentNode : document.body; 715 parentEl.appendChild(tempEl); 716 tempEl.style.position = 'absolute'; 717 tempEl.style.width = baseline + unit; 718 var factor = baseline / tempEl.offsetWidth; 719 parentEl.removeChild(tempEl); 720 var convertedUnit = factor * parseFloat(value); 721 cache.CSS[value + unit] = convertedUnit; 722 return convertedUnit; 723} 724 725function getCSSValue(el, prop, unit) { 726 if (prop in el.style) { 727 var uppercasePropName = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); 728 var value = el.style[prop] || getComputedStyle(el).getPropertyValue(uppercasePropName) || '0'; 729 return unit ? convertPxToUnit(el, value, unit) : value; 730 } 731} 732 733function getAnimationType(el, prop) { 734 if (is.dom(el) && !is.inp(el) && (getAttribute(el, prop) || is.svg(el) && el[prop])) { 735 return 'attribute'; 736 } 737 738 if (is.dom(el) && arrayContains(validTransforms, prop)) { 739 return 'transform'; 740 } 741 742 if (is.dom(el) && prop !== 'transform' && getCSSValue(el, prop)) { 743 return 'css'; 744 } 745 746 if (el[prop] != null) { 747 return 'object'; 748 } 749} 750 751function getElementTransforms(el) { 752 if (!is.dom(el)) { 753 return; 754 } 755 756 var str = el.style.transform || ''; 757 var reg = /(\w+)\(([^)]*)\)/g; 758 var transforms = new Map(); 759 var m; 760 761 while (m = reg.exec(str)) { 762 transforms.set(m[1], m[2]); 763 } 764 765 return transforms; 766} 767 768function getTransformValue(el, propName, animatable, unit) { 769 var defaultVal = stringContains(propName, 'scale') ? 1 : 0 + getTransformUnit(propName); 770 var value = getElementTransforms(el).get(propName) || defaultVal; 771 772 if (animatable) { 773 animatable.transforms.list.set(propName, value); 774 animatable.transforms['last'] = propName; 775 } 776 777 return unit ? convertPxToUnit(el, value, unit) : value; 778} 779 780function getOriginalTargetValue(target, propName, unit, animatable) { 781 switch (getAnimationType(target, propName)) { 782 case 'transform': 783 return getTransformValue(target, propName, animatable, unit); 784 785 case 'css': 786 return getCSSValue(target, propName, unit); 787 788 case 'attribute': 789 return getAttribute(target, propName); 790 791 default: 792 return target[propName] || 0; 793 } 794} 795 796function getRelativeValue(to, from) { 797 var operator = /^(\*=|\+=|-=)/.exec(to); 798 799 if (!operator) { 800 return to; 801 } 802 803 var u = getUnit(to) || 0; 804 var x = parseFloat(from); 805 var y = parseFloat(to.replace(operator[0], '')); 806 807 switch (operator[0][0]) { 808 case '+': 809 return x + y + u; 810 811 case '-': 812 return x - y + u; 813 814 case '*': 815 return x * y + u; 816 } 817} 818 819function validateValue(val, unit) { 820 if (is.col(val)) { 821 return colorToRgb(val); 822 } 823 824 if (/\s/g.test(val)) { 825 return val; 826 } 827 828 var originalUnit = getUnit(val); 829 var unitLess = originalUnit ? val.substr(0, val.length - originalUnit.length) : val; 830 831 if (unit) { 832 return unitLess + unit; 833 } 834 835 return unitLess; 836} // getTotalLength() equivalent for circle, rect, polyline, polygon and line shapes 837// adapted from https://gist.github.com/SebLambla/3e0550c496c236709744 838 839 840function getDistance(p1, p2) { 841 return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)); 842} 843 844function getCircleLength(el) { 845 return Math.PI * 2 * getAttribute(el, 'r'); 846} 847 848function getRectLength(el) { 849 return getAttribute(el, 'width') * 2 + getAttribute(el, 'height') * 2; 850} 851 852function getLineLength(el) { 853 return getDistance({ 854 x: getAttribute(el, 'x1'), 855 y: getAttribute(el, 'y1') 856 }, { 857 x: getAttribute(el, 'x2'), 858 y: getAttribute(el, 'y2') 859 }); 860} 861 862function getPolylineLength(el) { 863 var points = el.points; 864 var totalLength = 0; 865 var previousPos; 866 867 for (var i = 0; i < points.numberOfItems; i++) { 868 var currentPos = points.getItem(i); 869 870 if (i > 0) { 871 totalLength += getDistance(previousPos, currentPos); 872 } 873 874 previousPos = currentPos; 875 } 876 877 return totalLength; 878} 879 880function getPolygonLength(el) { 881 var points = el.points; 882 return getPolylineLength(el) + getDistance(points.getItem(points.numberOfItems - 1), points.getItem(0)); 883} // Path animation 884 885 886function getTotalLength(el) { 887 if (el.getTotalLength) { 888 return el.getTotalLength(); 889 } 890 891 switch (el.tagName.toLowerCase()) { 892 case 'circle': 893 return getCircleLength(el); 894 895 case 'rect': 896 return getRectLength(el); 897 898 case 'line': 899 return getLineLength(el); 900 901 case 'polyline': 902 return getPolylineLength(el); 903 904 case 'polygon': 905 return getPolygonLength(el); 906 } 907} 908 909function setDashoffset(el) { 910 var pathLength = getTotalLength(el); 911 el.setAttribute('stroke-dasharray', pathLength); 912 return pathLength; 913} // Motion path 914 915 916function getParentSvgEl(el) { 917 var parentEl = el.parentNode; 918 919 while (is.svg(parentEl)) { 920 if (!is.svg(parentEl.parentNode)) { 921 break; 922 } 923 924 parentEl = parentEl.parentNode; 925 } 926 927 return parentEl; 928} 929 930function getParentSvg(pathEl, svgData) { 931 var svg = svgData || {}; 932 var parentSvgEl = svg.el || getParentSvgEl(pathEl); 933 var rect = parentSvgEl.getBoundingClientRect(); 934 var viewBoxAttr = getAttribute(parentSvgEl, 'viewBox'); 935 var width = rect.width; 936 var height = rect.height; 937 var viewBox = svg.viewBox || (viewBoxAttr ? viewBoxAttr.split(' ') : [0, 0, width, height]); 938 return { 939 el: parentSvgEl, 940 viewBox: viewBox, 941 x: viewBox[0] / 1, 942 y: viewBox[1] / 1, 943 w: width / viewBox[2], 944 h: height / viewBox[3] 945 }; 946} 947 948function getPath(path, percent) { 949 var pathEl = is.str(path) ? selectString(path)[0] : path; 950 var p = percent || 100; 951 return function (property) { 952 return { 953 property: property, 954 el: pathEl, 955 svg: getParentSvg(pathEl), 956 totalLength: getTotalLength(pathEl) * (p / 100) 957 }; 958 }; 959} 960 961function getPathProgress(path, progress) { 962 function point(offset) { 963 if (offset === void 0) offset = 0; 964 var l = progress + offset >= 1 ? progress + offset : 0; 965 return path.el.getPointAtLength(l); 966 } 967 968 var svg = getParentSvg(path.el, path.svg); 969 var p = point(); 970 var p0 = point(-1); 971 var p1 = point(+1); 972 973 switch (path.property) { 974 case 'x': 975 return (p.x - svg.x) * svg.w; 976 977 case 'y': 978 return (p.y - svg.y) * svg.h; 979 980 case 'angle': 981 return Math.atan2(p1.y - p0.y, p1.x - p0.x) * 180 / Math.PI; 982 } 983} // Decompose value 984 985 986function decomposeValue(val, unit) { 987 // const rgx = /-?\d*\.?\d+/g; // handles basic numbers 988 // const rgx = /[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g; // handles exponents notation 989 var rgx = /[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g; // handles exponents notation 990 991 var value = validateValue(is.pth(val) ? val.totalLength : val, unit) + ''; 992 return { 993 original: value, 994 numbers: value.match(rgx) ? value.match(rgx).map(Number) : [0], 995 strings: is.str(val) || unit ? value.split(rgx) : [] 996 }; 997} // Animatables 998 999 1000function parseTargets(targets) { 1001 var targetsArray = targets ? flattenArray(is.arr(targets) ? targets.map(toArray) : toArray(targets)) : []; 1002 return filterArray(targetsArray, function (item, pos, self) { 1003 return self.indexOf(item) === pos; 1004 }); 1005} 1006 1007function getAnimatables(targets) { 1008 var parsed = parseTargets(targets); 1009 return parsed.map(function (t, i) { 1010 return { 1011 target: t, 1012 id: i, 1013 total: parsed.length, 1014 transforms: { 1015 list: getElementTransforms(t) 1016 } 1017 }; 1018 }); 1019} // Properties 1020 1021 1022function normalizePropertyTweens(prop, tweenSettings) { 1023 var settings = cloneObject(tweenSettings); // Override duration if easing is a spring 1024 1025 if (/^spring/.test(settings.easing)) { 1026 settings.duration = spring(settings.easing); 1027 } 1028 1029 if (is.arr(prop)) { 1030 var l = prop.length; 1031 var isFromTo = l === 2 && !is.obj(prop[0]); 1032 1033 if (!isFromTo) { 1034 // Duration divided by the number of tweens 1035 if (!is.fnc(tweenSettings.duration)) { 1036 settings.duration = tweenSettings.duration / l; 1037 } 1038 } else { 1039 // Transform [from, to] values shorthand to a valid tween value 1040 prop = { 1041 value: prop 1042 }; 1043 } 1044 } 1045 1046 var propArray = is.arr(prop) ? prop : [prop]; 1047 return propArray.map(function (v, i) { 1048 var obj = is.obj(v) && !is.pth(v) ? v : { 1049 value: v 1050 }; // Default delay value should only be applied to the first tween 1051 1052 if (is.und(obj.delay)) { 1053 obj.delay = !i ? tweenSettings.delay : 0; 1054 } // Default endDelay value should only be applied to the last tween 1055 1056 1057 if (is.und(obj.endDelay)) { 1058 obj.endDelay = i === propArray.length - 1 ? tweenSettings.endDelay : 0; 1059 } 1060 1061 return obj; 1062 }).map(function (k) { 1063 return mergeObjects(k, settings); 1064 }); 1065} 1066 1067function flattenKeyframes(keyframes) { 1068 var propertyNames = filterArray(flattenArray(keyframes.map(function (key) { 1069 return Object.keys(key); 1070 })), function (p) { 1071 return is.key(p); 1072 }).reduce(function (a, b) { 1073 if (a.indexOf(b) < 0) { 1074 a.push(b); 1075 } 1076 1077 return a; 1078 }, []); 1079 var properties = {}; 1080 1081 var loop = function loop(i) { 1082 var propName = propertyNames[i]; 1083 properties[propName] = keyframes.map(function (key) { 1084 var newKey = {}; 1085 1086 for (var p in key) { 1087 if (is.key(p)) { 1088 if (p == propName) { 1089 newKey.value = key[p]; 1090 } 1091 } else { 1092 newKey[p] = key[p]; 1093 } 1094 } 1095 1096 return newKey; 1097 }); 1098 }; 1099 1100 for (var i = 0; i < propertyNames.length; i++) { 1101 loop(i); 1102 } 1103 1104 return properties; 1105} 1106 1107function getProperties(tweenSettings, params) { 1108 var properties = []; 1109 var keyframes = params.keyframes; 1110 1111 if (keyframes) { 1112 params = mergeObjects(flattenKeyframes(keyframes), params); 1113 } 1114 1115 for (var p in params) { 1116 if (is.key(p)) { 1117 properties.push({ 1118 name: p, 1119 tweens: normalizePropertyTweens(params[p], tweenSettings) 1120 }); 1121 } 1122 } 1123 1124 return properties; 1125} // Tweens 1126 1127 1128function normalizeTweenValues(tween, animatable) { 1129 var t = {}; 1130 1131 for (var p in tween) { 1132 var value = getFunctionValue(tween[p], animatable); 1133 1134 if (is.arr(value)) { 1135 value = value.map(function (v) { 1136 return getFunctionValue(v, animatable); 1137 }); 1138 1139 if (value.length === 1) { 1140 value = value[0]; 1141 } 1142 } 1143 1144 t[p] = value; 1145 } 1146 1147 t.duration = parseFloat(t.duration); 1148 t.delay = parseFloat(t.delay); 1149 return t; 1150} 1151 1152function normalizeTweens(prop, animatable) { 1153 var previousTween; 1154 return prop.tweens.map(function (t) { 1155 var tween = normalizeTweenValues(t, animatable); 1156 var tweenValue = tween.value; 1157 var to = is.arr(tweenValue) ? tweenValue[1] : tweenValue; 1158 var toUnit = getUnit(to); 1159 var originalValue = getOriginalTargetValue(animatable.target, prop.name, toUnit, animatable); 1160 var previousValue = previousTween ? previousTween.to.original : originalValue; 1161 var from = is.arr(tweenValue) ? tweenValue[0] : previousValue; 1162 var fromUnit = getUnit(from) || getUnit(originalValue); 1163 var unit = toUnit || fromUnit; 1164 1165 if (is.und(to)) { 1166 to = previousValue; 1167 } 1168 1169 tween.from = decomposeValue(from, unit); 1170 tween.to = decomposeValue(getRelativeValue(to, from), unit); 1171 tween.start = previousTween ? previousTween.end : 0; 1172 tween.end = tween.start + tween.delay + tween.duration + tween.endDelay; 1173 tween.easing = parseEasings(tween.easing, tween.duration); 1174 tween.isPath = is.pth(tweenValue); 1175 tween.isColor = is.col(tween.from.original); 1176 1177 if (tween.isColor) { 1178 tween.round = 1; 1179 } 1180 1181 previousTween = tween; 1182 return tween; 1183 }); 1184} // Tween progress 1185 1186 1187var setProgressValue = { 1188 css: function css(t, p, v) { 1189 return t.style[p] = v; 1190 }, 1191 attribute: function attribute(t, p, v) { 1192 return t.setAttribute(p, v); 1193 }, 1194 object: function object(t, p, v) { 1195 return t[p] = v; 1196 }, 1197 transform: function transform(t, p, v, transforms, manual) { 1198 transforms.list.set(p, v); 1199 1200 if (p === transforms.last || manual) { 1201 var str = ''; 1202 transforms.list.forEach(function (value, prop) { 1203 str += prop + "(" + value + ") "; 1204 }); 1205 t.style.transform = str; 1206 } 1207 } 1208}; // Set Value helper 1209 1210function setTargetsValue(targets, properties) { 1211 var animatables = getAnimatables(targets); 1212 animatables.forEach(function (animatable) { 1213 for (var property in properties) { 1214 var value = getFunctionValue(properties[property], animatable); 1215 var target = animatable.target; 1216 var valueUnit = getUnit(value); 1217 var originalValue = getOriginalTargetValue(target, property, valueUnit, animatable); 1218 var unit = valueUnit || getUnit(originalValue); 1219 var to = getRelativeValue(validateValue(value, unit), originalValue); 1220 var animType = getAnimationType(target, property); 1221 setProgressValue[animType](target, property, to, animatable.transforms, true); 1222 } 1223 }); 1224} // Animations 1225 1226 1227function createAnimation(animatable, prop) { 1228 var animType = getAnimationType(animatable.target, prop.name); 1229 1230 if (animType) { 1231 var tweens = normalizeTweens(prop, animatable); 1232 var lastTween = tweens[tweens.length - 1]; 1233 return { 1234 type: animType, 1235 property: prop.name, 1236 animatable: animatable, 1237 tweens: tweens, 1238 duration: lastTween.end, 1239 delay: tweens[0].delay, 1240 endDelay: lastTween.endDelay 1241 }; 1242 } 1243} 1244 1245function getAnimations(animatables, properties) { 1246 return filterArray(flattenArray(animatables.map(function (animatable) { 1247 return properties.map(function (prop) { 1248 return createAnimation(animatable, prop); 1249 }); 1250 })), function (a) { 1251 return !is.und(a); 1252 }); 1253} // Create Instance 1254 1255
1256function getInstanceTimings(animations, tweenSettings) { 1257 var animLength = animations.length; 1258 1259 var getTlOffset = function getTlOffset(anim) { 1260 return anim.timelineOffset ? anim.timelineOffset : 0; 1261 }; 1262 1263 var timings = {}; 1264 timings.duration = animLength ? Math.max.apply(Math, animations.map(function (anim) { 1265 return getTlOffset(anim) + anim.duration; 1266 })) : tweenSettings.duration; 1267 timings.delay = animLength ? Math.min.apply(Math, animations.map(function (anim) { 1268 return getTlOffset(anim) + anim.delay; 1269 })) : tweenSettings.delay; 1270 timings.endDelay = animLength ? timings.duration - Math.max.apply(Math, animations.map(function (anim) { 1271 return getTlOffset(anim) + anim.duration - anim.endDelay; 1272 })) : tweenSettings.endDelay; 1273 return timings; 1274} 1275 1276var instanceID = 0; 1277 1278function createNewInstance(params) { 1279 var instanceSettings = replaceObjectProps(defaultInstanceSettings, params); 1280 var tweenSettings = replaceObjectProps(defaultTweenSettings, params); 1281 var properties = getProperties(tweenSettings, params); 1282 var animatables = getAnimatables(params.targets); 1283 var animations = getAnimations(animatables, properties); 1284 var timings = getInstanceTimings(animations, tweenSettings); 1285 var id = instanceID; 1286 instanceID++; 1287 return mergeObjects(instanceSettings, { 1288 id: id, 1289 children: [], 1290 animatables: animatables, 1291 animations: animations, 1292 duration: timings.duration, 1293 delay: timings.delay, 1294 endDelay: timings.endDelay 1295 }); 1296} // Core 1297 1298 1299var activeInstances = []; 1300var pausedInstances = []; 1301var raf; 1302 1303var engine = function () { 1304 function play() { 1305 raf = requestAnimationFrame(step); 1306 } 1307 1308 function step(t) { 1309 var activeInstancesLength = activeInstances.length; 1310 1311 if (activeInstancesLength) { 1312 var i = 0; 1313 1314 while (i < activeInstancesLength) { 1315 var activeInstance = activeInstances[i]; 1316 1317 if (!activeInstance.paused) { 1318 activeInstance.tick(t); 1319 } else { 1320 var instanceIndex = activeInstances.indexOf(activeInstance); 1321 1322 if (instanceIndex > -1) { 1323 activeInstances.splice(instanceIndex, 1); 1324 activeInstancesLength = activeInstances.length; 1325 } 1326 } 1327 1328 i++; 1329 } 1330 1331 play(); 1332 } else { 1333 raf = cancelAnimationFrame(raf); 1334 } 1335 } 1336 1337 return play; 1338}(); 1339 1340function handleVisibilityChange() { 1341 if (document.hidden) { 1342 activeInstances.forEach(function (ins) { 1343 return ins.pause(); 1344 }); 1345 pausedInstances = activeInstances.slice(0); 1346 anime.running = activeInstances = []; 1347 } else { 1348 pausedInstances.forEach(function (ins) { 1349 return ins.play(); 1350 }); 1351 } 1352} 1353 1354if (typeof document !== 'undefined') { 1355 document.addEventListener('visibilitychange', handleVisibilityChange); 1356} // Public Instance 1357 1358 1359function anime(params) { 1360 if (params === void 0) params = {}; 1361 var startTime = 0, 1362 lastTime = 0, 1363 now = 0; 1364 var children, 1365 childrenLength = 0; 1366 var resolve = null; 1367 1368 function makePromise(instance) { 1369 var promise = window.Promise && new Promise(function (_resolve) { 1370 return resolve = _resolve; 1371 }); 1372 instance.finished = promise; 1373 return promise; 1374 } 1375 1376 var instance = createNewInstance(params); 1377 var promise = makePromise(instance); 1378 1379 function toggleInstanceDirection() { 1380 var direction = instance.direction; 1381 1382 if (direction !== 'alternate') { 1383 instance.direction = direction !== 'normal' ? 'normal' : 'reverse'; 1384 } 1385 1386 instance.reversed = !instance.reversed; 1387 children.forEach(function (child) { 1388 return child.reversed = instance.reversed; 1389 }); 1390 } 1391 1392 function adjustTime(time) { 1393 return instance.reversed ? instance.duration - time : time; 1394 } 1395 1396 function resetTime() { 1397 startTime = 0; 1398 lastTime = adjustTime(instance.currentTime) * (1 / anime.speed); 1399 } 1400 1401 function seekChild(time, child) { 1402 if (child) { 1403 child.seek(time - child.timelineOffset); 1404 } 1405 } 1406 1407 function syncInstanceChildren(time) { 1408 if (!instance.reversePlayback) { 1409 for (var i = 0; i < childrenLength; i++) { 1410 seekChild(time, children[i]); 1411 } 1412 } else { 1413 for (var i$1 = childrenLength; i$1--;) { 1414 seekChild(time, children[i$1]); 1415 } 1416 } 1417 } 1418 1419 function setAnimationsProgress(insTime) { 1420 var i = 0; 1421 var animations = instance.animations; 1422 var animationsLength = animations.length; 1423 1424 while (i < animationsLength) { 1425 var anim = animations[i]; 1426 var animatable = anim.animatable; 1427 var tweens = anim.tweens; 1428 var tweenLength = tweens.length - 1; 1429 var tween = tweens[tweenLength]; // Only check for keyframes if there is more than one tween 1430 1431 if (tweenLength) { 1432 tween = filterArray(tweens, function (t) { 1433 return insTime < t.end; 1434 })[0] || tween; 1435 } 1436
vendor: 9,628 bytes, lines 1437-1811
1437 var elapsed = minMax(insTime - tween.start - tween.delay, 0, tween.duration) / tween.duration; 1438 var eased = isNaN(elapsed) ? 1 : tween.easing(elapsed); 1439 var strings = tween.to.strings; 1440 var round = tween.round; 1441 var numbers = []; 1442 var toNumbersLength = tween.to.numbers.length; 1443 var progress = void 0; 1444 1445 for (var n = 0; n < toNumbersLength; n++) { 1446 var value = void 0; 1447 var toNumber = tween.to.numbers[n]; 1448 var fromNumber = tween.from.numbers[n] || 0; 1449 1450 if (!tween.isPath) { 1451 value = fromNumber + eased * (toNumber - fromNumber); 1452 } else { 1453 value = getPathProgress(tween.value, eased * toNumber); 1454 } 1455 1456 if (round) { 1457 if (!(tween.isColor && n > 2)) { 1458 value = Math.round(value * round) / round; 1459 } 1460 } 1461 1462 numbers.push(value); 1463 } // Manual Array.reduce for better performances 1464 1465 1466 var stringsLength = strings.length; 1467 1468 if (!stringsLength) { 1469 progress = numbers[0]; 1470 } else { 1471 progress = strings[0]; 1472 1473 for (var s = 0; s < stringsLength; s++) { 1474 var a = strings[s]; 1475 var b = strings[s + 1]; 1476 var n$1 = numbers[s]; 1477 1478 if (!isNaN(n$1)) { 1479 if (!b) { 1480 progress += n$1 + ' '; 1481 } else { 1482 progress += n$1 + b; 1483 } 1484 } 1485 } 1486 } 1487 1488 setProgressValue[anim.type](animatable.target, anim.property, progress, animatable.transforms); 1489 anim.currentValue = progress; 1490 i++; 1491 } 1492 } 1493 1494 function setCallback(cb) { 1495 if (instance[cb] && !instance.passThrough) { 1496 instance[cb](instance); 1497 } 1498 } 1499 1500 function countIteration() { 1501 if (instance.remaining && instance.remaining !== true) { 1502 instance.remaining--; 1503 } 1504 } 1505 1506 function setInstanceProgress(engineTime) { 1507 var insDuration = instance.duration; 1508 var insDelay = instance.delay; 1509 var insEndDelay = insDuration - instance.endDelay; 1510 var insTime = adjustTime(engineTime); 1511 instance.progress = minMax(insTime / insDuration * 100, 0, 100); 1512 instance.reversePlayback = insTime < instance.currentTime; 1513 1514 if (children) { 1515 syncInstanceChildren(insTime); 1516 } 1517 1518 if (!instance.began && instance.currentTime > 0) { 1519 instance.began = true; 1520 setCallback('begin'); 1521 } 1522 1523 if (!instance.loopBegan && instance.currentTime > 0) { 1524 instance.loopBegan = true; 1525 setCallback('loopBegin'); 1526 } 1527 1528 if (insTime <= insDelay && instance.currentTime !== 0) { 1529 setAnimationsProgress(0); 1530 } 1531 1532 if (insTime >= insEndDelay && instance.currentTime !== insDuration || !insDuration) { 1533 setAnimationsProgress(insDuration); 1534 } 1535 1536 if (insTime > insDelay && insTime < insEndDelay) { 1537 if (!instance.changeBegan) { 1538 instance.changeBegan = true; 1539 instance.changeCompleted = false; 1540 setCallback('changeBegin'); 1541 } 1542 1543 setCallback('change'); 1544 setAnimationsProgress(insTime); 1545 } else { 1546 if (instance.changeBegan) { 1547 instance.changeCompleted = true; 1548 instance.changeBegan = false; 1549 setCallback('changeComplete'); 1550 } 1551 } 1552 1553 instance.currentTime = minMax(insTime, 0, insDuration); 1554 1555 if (instance.began) { 1556 setCallback('update'); 1557 } 1558 1559 if (engineTime >= insDuration) { 1560 lastTime = 0; 1561 countIteration(); 1562 1563 if (!instance.remaining) { 1564 instance.paused = true; 1565 1566 if (!instance.completed) { 1567 instance.completed = true; 1568 setCallback('loopComplete'); 1569 setCallback('complete'); 1570 1571 if (!instance.passThrough && 'Promise' in window) { 1572 resolve(); 1573 promise = makePromise(instance); 1574 } 1575 } 1576 } else { 1577 startTime = now; 1578 setCallback('loopComplete'); 1579 instance.loopBegan = false; 1580 1581 if (instance.direction === 'alternate') { 1582 toggleInstanceDirection(); 1583 } 1584 } 1585 } 1586 } 1587 1588 instance.reset = function () { 1589 var direction = instance.direction; 1590 instance.passThrough = false; 1591 instance.currentTime = 0; 1592 instance.progress = 0; 1593 instance.paused = true; 1594 instance.began = false; 1595 instance.loopBegan = false; 1596 instance.changeBegan = false; 1597 instance.completed = false; 1598 instance.changeCompleted = false; 1599 instance.reversePlayback = false; 1600 instance.reversed = direction === 'reverse'; 1601 instance.remaining = instance.loop; 1602 children = instance.children; 1603 childrenLength = children.length; 1604 1605 for (var i = childrenLength; i--;) { 1606 instance.children[i].reset(); 1607 } 1608 1609 if (instance.reversed && instance.loop !== true || direction === 'alternate' && instance.loop === 1) { 1610 instance.remaining++; 1611 } 1612 1613 setAnimationsProgress(instance.reversed ? instance.duration : 0); 1614 }; // Set Value helper 1615 1616 1617 instance.set = function (targets, properties) { 1618 setTargetsValue(targets, properties); 1619 return instance; 1620 }; 1621 1622 instance.tick = function (t) { 1623 now = t; 1624 1625 if (!startTime) { 1626 startTime = now; 1627 } 1628 1629 setInstanceProgress((now + (lastTime - startTime)) * anime.speed); 1630 }; 1631 1632 instance.seek = function (time) { 1633 setInstanceProgress(adjustTime(time)); 1634 }; 1635 1636 instance.pause = function () { 1637 instance.paused = true; 1638 resetTime(); 1639 }; 1640 1641 instance.play = function () { 1642 if (!instance.paused) { 1643 return; 1644 } 1645 1646 if (instance.completed) { 1647 instance.reset(); 1648 } 1649 1650 instance.paused = false; 1651 activeInstances.push(instance); 1652 resetTime(); 1653 1654 if (!raf) { 1655 engine(); 1656 } 1657 }; 1658 1659 instance.reverse = function () { 1660 toggleInstanceDirection(); 1661 instance.completed = instance.reversed ? false : true; 1662 resetTime(); 1663 }; 1664 1665 instance.restart = function () { 1666 instance.reset(); 1667 instance.play(); 1668 }; 1669 1670 instance.reset(); 1671 1672 if (instance.autoplay) { 1673 instance.play(); 1674 } 1675 1676 return instance; 1677} // Remove targets from animation 1678 1679 1680function removeTargetsFromAnimations(targetsArray, animations) { 1681 for (var a = animations.length; a--;) { 1682 if (arrayContains(targetsArray, animations[a].animatable.target)) { 1683 animations.splice(a, 1); 1684 } 1685 } 1686} 1687 1688function removeTargets(targets) { 1689 var targetsArray = parseTargets(targets); 1690 1691 for (var i = activeInstances.length; i--;) { 1692 var instance = activeInstances[i]; 1693 var animations = instance.animations; 1694 var children = instance.children; 1695 removeTargetsFromAnimations(targetsArray, animations); 1696 1697 for (var c = children.length; c--;) { 1698 var child = children[c]; 1699 var childAnimations = child.animations; 1700 removeTargetsFromAnimations(targetsArray, childAnimations); 1701 1702 if (!childAnimations.length && !child.children.length) { 1703 children.splice(c, 1); 1704 } 1705 } 1706 1707 if (!animations.length && !children.length) { 1708 instance.pause(); 1709 } 1710 } 1711} // Stagger helpers 1712 1713 1714function stagger(val, params) { 1715 if (params === void 0) params = {}; 1716 var direction = params.direction || 'normal'; 1717 var easing = params.easing ? parseEasings(params.easing) : null; 1718 var grid = params.grid; 1719 var axis = params.axis; 1720 var fromIndex = params.from || 0; 1721 var fromFirst = fromIndex === 'first'; 1722 var fromCenter = fromIndex === 'center'; 1723 var fromLast = fromIndex === 'last'; 1724 var isRange = is.arr(val); 1725 var val1 = isRange ? parseFloat(val[0]) : parseFloat(val); 1726 var val2 = isRange ? parseFloat(val[1]) : 0; 1727 var unit = getUnit(isRange ? val[1] : val) || 0; 1728 var start = params.start || 0 + (isRange ? val1 : 0); 1729 var values = []; 1730 var maxValue = 0; 1731 return function (el, i, t) { 1732 if (fromFirst) { 1733 fromIndex = 0; 1734 } 1735 1736 if (fromCenter) { 1737 fromIndex = (t - 1) / 2; 1738 } 1739 1740 if (fromLast) { 1741 fromIndex = t - 1; 1742 } 1743 1744 if (!values.length) { 1745 for (var index = 0; index < t; index++) { 1746 if (!grid) { 1747 values.push(Math.abs(fromIndex - index)); 1748 } else { 1749 var fromX = !fromCenter ? fromIndex % grid[0] : (grid[0] - 1) / 2; 1750 var fromY = !fromCenter ? Math.floor(fromIndex / grid[0]) : (grid[1] - 1) / 2; 1751 var toX = index % grid[0]; 1752 var toY = Math.floor(index / grid[0]); 1753 var distanceX = fromX - toX; 1754 var distanceY = fromY - toY; 1755 var value = Math.sqrt(distanceX * distanceX + distanceY * distanceY); 1756 1757 if (axis === 'x') { 1758 value = -distanceX; 1759 } 1760 1761 if (axis === 'y') { 1762 value = -distanceY; 1763 } 1764 1765 values.push(value); 1766 } 1767 1768 maxValue = Math.max.apply(Math, values); 1769 } 1770 1771 if (easing) { 1772 values = values.map(function (val) { 1773 return easing(val / maxValue) * maxValue; 1774 }); 1775 } 1776 1777 if (direction === 'reverse') { 1778 values = values.map(function (val) { 1779 return axis ? val < 0 ? val * -1 : -val : Math.abs(maxValue - val); 1780 }); 1781 } 1782 } 1783 1784 var spacing = isRange ? (val2 - val1) / maxValue : val1; 1785 return start + spacing * (Math.round(values[i] * 100) / 100) + unit; 1786 }; 1787} // Timeline 1788 1789 1790function timeline(params) { 1791 if (params === void 0) params = {}; 1792 var tl = anime(params); 1793 tl.duration = 0; 1794 1795 tl.add = function (instanceParams, timelineOffset) { 1796 var tlIndex = activeInstances.indexOf(tl); 1797 var children = tl.children; 1798 1799 if (tlIndex > -1) { 1800 activeInstances.splice(tlIndex, 1); 1801 } 1802 1803 function passThrough(ins) { 1804 ins.passThrough = true; 1805 } 1806 1807 for (var i = 0; i < children.length; i++) { 1808 passThrough(children[i]); 1809 } 1810 1811 var insParams = mergeObjects(instanceParams, replaceObjectProps(defaultTweenSett
1811ings, params)); 1812 insParams.targets = insParams.targets || params.targets; 1813 var tlDuration = tl.duration; 1814 insParams.autoplay = false; 1815 insParams.direction = tl.direction; 1816 insParams.timelineOffset = is.und(timelineOffset) ? tlDuration : getRelativeValue(timelineOffset, tlDuration); 1817 passThrough(tl); 1818 tl.seek(insParams.timelineOffset); 1819 var ins = anime(insParams); 1820 passThrough(ins); 1821 children.push(ins); 1822 var timings = getInstanceTimings(children, params); 1823 tl.delay = timings.delay; 1824 tl.endDelay = timings.endDelay; 1825 tl.duration = timings.duration; 1826 tl.seek(0); 1827 tl.reset(); 1828 1829 if (tl.autoplay) { 1830 tl.play(); 1831 } 1832 1833 return tl; 1834 }; 1835 1836 return tl; 1837} 1838 1839anime.version = '3.2.0'; 1840anime.speed = 1; 1841anime.running = activeInstances; 1842anime.remove = removeTargets; 1843anime.get = getOriginalTargetValue; 1844anime.set = setTargetsValue; 1845anime.convertPx = convertPxToUnit; 1846anime.path = getPath; 1847anime.setDashoffset = setDashoffset; 1848anime.stagger = stagger; 1849anime.timeline = timeline; 1850anime.easing = parseEasings; 1851anime.penner = penner; 1852 1853anime.random = function (min, max) { 1854 return Math.floor(Math.random() * (max - min + 1)) + min; 1855}; 1856 1857module.exports = anime; 1858 1859/***/ }), 1860 1861/***/ 977: 1862/***/ ((module) => { 1863 1864/* 1865 # ----------------------------------------------------------------------------- 1866 # ~200_template_js/js/asciidoctor/asciidoctor.js 1867 # Provides JS functions to (dynamically) modify Asciidoctor HTML elements 1868 # 1869 # Product/Info: 1870 # http://jekyll.one 1871 # 1872 # Copyright (C) 2022 Juergen Adams 1873 # 1874 # J1 Template is licensed under MIT License. 1875 # See: https://github.com/jekyll-one/J1 Template/blob/master/LICENSE 1876 # ----------------------------------------------------------------------------- 1877 # NOTE: 1878 # ----------------------------------------------------------------------------- 1879*/ 1880// ----------------------------------------------------------------------------- 1881// ESLint shimming 1882// ----------------------------------------------------------------------------- 1883 1884/* eslint no-unused-vars: "off" */ 1885 1886/* eslint no-undef: "off" */ 1887 1888/* eslint no-redeclare: "off" */ 1889 1890/* global window */ 1891// TODO: 1892// ----------------------------------------------------------------------------- 1893// J1 Asciidoctor registered as "asciidoctor" 1894// ----------------------------------------------------------------------------- 1895 1896/*! 1897 * J1 Asciidoctor 1898 * Copyright (C) 2022 Juergen Adams 1899 * Licensed under MIT License. 1900 */ 1901module.exports = function asciidoctor(options) { 1902 return { 1903 // ------------------------------------------------------------------------- 1904 // module initializer 1905 // ------------------------------------------------------------------------- 1906 init: function init(options) { 1907 var moduleOptions = options; 1908 var logger = log4javascript.getLogger('j1.core.asciidoctor'); 1909 var moduleDefaults = { 1910 dummyOption: false // placeholder 1911 1912 }; 1913 var options = $.extend(moduleDefaults, moduleOptions); 1914 logText = 'J1 Asciidoctor is being initialized'; 1915 logger.info(logText); 1916 this.callouts(); 1917 }, 1918 // end initializer 1919 // ------------------------------------------------------------------------- 1920 // manage callouts (HTML) 1921 // ------------------------------------------------------------------------- 1922 // see: https://stackoverflow.com/questions/19393493/add-colgroup-for-each-table-column 1923 callouts: function callouts(options) { 1924 var colgroupList = ''; // If the colist does not have a <colgroup> structure 1925 // 1926 1927 if ($('.colist > table > colgroup').length == 0) { 1928 colgroupList += '<!-- [INFO ] [j1.core.asciidoctor ] [ place a colgroup dynamically ] -->' + '\n'; 1929 colgroupList += '<colgroup> <col style="width: 5%;"> <col style="width: 95%;"> </colgroup>'; 1930 $(".colist > table").prepend(colgroupList); 1931 } 1932 }, 1933 // end callouts 1934 // ------------------------------------------------------------------------- 1935 // manage callouts (HTML) 1936 // ------------------------------------------------------------------------- 1937 conums: function conums(options) { 1938 var dependencies_met_page_finished = setInterval(function () { 1939 if (j1.getState() == 'finished') { 1940 // If the colist does not have a <colgroup> structure 1941 if ($('.colist > table > colgroup').length == 0) { 1942 var colgroupList = ''; 1943 colgroupList += '<colgroup> <col style="width: 5%;"> <col style="width: 95%;"> </colgroup>'; 1944 $(".colist > table").prepend(colgroupList); 1945 clearInterval(dependencies_met_page_finished); 1946 } 1947 } 1948 }); 1949 } // end conums 1950 1951 }; // END return 1952}(jQuery); 1953 1954/***/ }), 1955 1956/***/ 602: 1957/***/ ((module) => { 1958 1959"use strict"; 1960/* 1961 # ----------------------------------------------------------------------------- 1962 # ~/js/j1_template/core.js 1963 # Provides an empty object for later loaded core objects 1964 # 1965 # Product/Info: 1966 # https://jekyll.one 1967 # http://getbootstrap.com/ 1968 # 1969 # Copyright (C) 2022 Juergen Adams 1970 # 1971 # J1 Template is licensed under MIT License. 1972 # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE 1973 # ----------------------------------------------------------------------------- 1974*/ 1975 // ----------------------------------------------------------------------------- 1976// ESLint shimming 1977// ----------------------------------------------------------------------------- 1978 1979/* eslint indent: "off" */ 1980 1981/* eslint no-unused-vars: "off" */ 1982 1983/* eslint no-undef: "off" */ 1984// ----------------------------------------------------------------------------- 1985// module.exports = function core ( options ) { 1986 1987/*! 1988 * J1 Core 1989 * Copyright (C) 2022 Juergen Adams 1990 * Licensed under MIT License. 1991 */ 1992 1993module.exports = function (options) { 1994 // --------------------------------------------------------------------------- 1995 // Global variables 1996 // --------------------------------------------------------------------------- 1997 // var messageCatalog = {}; 1998 // var state; 1999 // var logger; 2000 // var logText; 2001 // --------------------------------------------------------------------------- 2002 // Default settings 2003 // --------------------------------------------------------------------------- 2004 var settings = $.extend({ 2005 foo: 'foo_option', 2006 bar: 'bar_option' 2007 }, options); 2008 var state = 'loaded'; 2009 return { 2010 // ------------------------------------------------------------------------- 2011 // _init_ 2012 // Global initializer for the core object 2013 // ------------------------------------------------------------------------- 2014 _init_: function _init_(options) { 2015 // 2016 // Place handling of options here 2017 // 2018 return; 2019 }, 2020 // END _init_ 2021 // ------------------------------------------------------------------------- 2022 // Returns the current (processing) state of the module 2023 // ------------------------------------------------------------------------- 2024 getState: function getState() { 2025 return state; 2026 }, 2027 // END state 2028 // ------------------------------------------------------------------------- 2029 // isMobile 2030 // Return true if the current platform is a mobile device 2031 // ------------------------------------------------------------------------- 2032 isMobile: function isMobile(ua_name) { 2033 var mobile = false;
2034 2035 (function (a) { 2036 if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm|cell|chtm|cldc|cmd|co(mp|nd)|craw|da(it|ll|ng)|dbte|dcs|devi|dica|dmob|do(c|p)o|ds(12|d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(|_)|g1 u|g560|gene|gf5|gmo|go(\.w|od)|gr(ad|un)|haie|hcit|hd(m|p|t)|hei|hi(pt|ta)|hp( i|ip)|hsc|ht(c(| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i(20|go|ma)|i230|iac( ||\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|[a-w])|libw|lynx|m1w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|mcr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|([1-8]|c))|phil|pire|pl(ay|uc)|pn2|po(ck|rt|se)|prox|psio|ptg|qaa|qc(07|12|21|32|60|[2-7]|i)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h|oo|p)|sdk\/|se(c(|0|1)|47|mc|nd|ri)|sgh|shar|sie(|m)|sk0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h|v|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl|tdg|tel(i|m)|tim|tmo|to(pl|sh)|ts(70|m|m3|m5)|tx9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas|your|zeto|zte/i.test(a.substr(0, 4))) mobile = true; 2037 })(navigator.userAgent || navigator.vendor || window.opera); 2038 2039 return mobile; 2040 }, 2041 // END isMobile 2042 // ------------------------------------------------------------------------- 2043 // Clear button for input fields (forms) 2044 // ------------------------------------------------------------------------- 2045 bsFormClearButton: function bsFormClearButton() { 2046 // $('.position-relative :input').on('keydown focus', function() { 2047 $(':input').on('keydown focus change mouseover', function () { 2048 if ($(this).val().length > 0) { 2049 $(this).nextAll('.form-clear').removeClass('d-none'); 2050 } 2051 }).on('keydown keyup blur', function () { 2052 if ($(this).val().length === 0) { 2053 $(this).nextAll('.form-clear').addClass('d-none'); 2054 } 2055 }); // $('.form-clear').on('click', function() { 2056 // $(this).addClass('d-none').prevAll(':input').val(''); 2057 // // hide|clear results from top search 2058 // $('#search-results').hide(); 2059 // $('#search-results').html(''); 2060 // }); 2061 }, 2062 // END bsFormClearButton 2063 // ------------------------------------------------------------------------- 2064 // Initialize Backdrops on all <p> elements of class "dropcap" 2065 // ------------------------------------------------------------------------- 2066 createDropCap: function createDropCap() { 2067 // add class dropcap 2068 $('.paragraph.dropcap').children('p').addClass('dropcap'); // 2069 2070 if ($('p.dropcap').length) { 2071 $('p.dropcap').each(function () { 2072 var $p = $(this); 2073 var text = $.trim($p.text()); 2074 var firstLetter = text[0]; 2075 var marginalDropCap = '<span class="j1-dropcap">' + firstLetter + '</span>'; 2076 $p.html(text.replace(firstLetter, marginalDropCap)); 2077 }); 2078 } 2079 } // END createDropCap 2080 2081 }; // end return (object) 2082 //})( jQuery, window ); 2083}(); // END IFFE 2084 2085/***/ }), 2086 2087/***/ 610: 2088/***/ (() => { 2089 2090function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } 2091 2092/* 2093 A simple jQuery function that can add listeners on attribute change. 2094 http://meetselva.github.io/attrchange/ 2095 2096 About License: 2097 Copyright (C) 2013-2014 Selvakumar Arumugam 2098 You may use attrchange plugin under the terms of the MIT Licese. 2099 https://github.com/meetselva/attrchange/blob/master/MIT-License.txt 2100*/ 2101; 2102 2103(function ($) { 2104 function isDOMAttrModifiedSupported() { 2105 var p = document.createElement('p'); 2106 var flag = false;
2107 2108 if (p.addEventListener) { 2109 p.addEventListener('DOMAttrModified', function () { 2110 flag = true; 2111 }, false); 2112 } else if (p.attachEvent) { 2113 p.attachEvent('onDOMAttrModified', function () { 2114 flag = true; 2115 }); 2116 } else { 2117 return false; 2118 } 2119 2120 p.setAttribute('id', 'target'); 2121 return flag; 2122 } 2123 2124 function checkAttributes(chkAttr, e) { 2125 if (chkAttr) { 2126 var attributes = this.data('attr-old-value'); 2127 2128 if (e.attributeName.indexOf('style') >= 0) { 2129 if (!attributes['style']) attributes['style'] = {}; //initialize 2130 2131 var keys = e.attributeName.split('.'); 2132 e.attributeName = keys[0]; 2133 e.oldValue = attributes['style'][keys[1]]; //old value 2134 2135 e.newValue = keys[1] + ':' + this.prop("style")[$.camelCase(keys[1])]; //new value 2136 2137 attributes['style'][keys[1]] = e.newValue; 2138 } else { 2139 e.oldValue = attributes[e.attributeName]; 2140 e.newValue = this.attr(e.attributeName); 2141 attributes[e.attributeName] = e.newValue; 2142 } 2143 2144 this.data('attr-old-value', attributes); //update the old value object 2145 } 2146 } //initialize Mutation Observer 2147 2148 2149 var MutationObserver = window.MutationObserver || window.WebKitMutationObserver; 2150 2151 $.fn.attrchange = function (a, b) { 2152 if (_typeof(a) == 'object') { 2153 //core 2154 var cfg = { 2155 trackValues: false, 2156 callback: $.noop 2157 }; //backward compatibility 2158 2159 if (typeof a === "function") { 2160 cfg.callback = a; 2161 } else { 2162 $.extend(cfg, a); 2163 } 2164 2165 if (cfg.trackValues) { 2166 //get attributes old value 2167 this.each(function (i, el) { 2168 var attributes = {}; 2169 2170 for (var attr, i = 0, attrs = el.attributes, l = attrs.length; i < l; i++) { 2171 attr = attrs.item(i); 2172 attributes[attr.nodeName] = attr.value; 2173 } 2174 2175 $(this).data('attr-old-value', attributes); 2176 }); 2177 } 2178 2179 if (MutationObserver) { 2180 //Modern Browsers supporting MutationObserver 2181 var mOptions = { 2182 subtree: false, 2183 attributes: true, 2184 attributeOldValue: cfg.trackValues 2185 }; 2186 var observer = new MutationObserver(function (mutations) { 2187 mutations.forEach(function (e) { 2188 var _this = e.target; //get new value if trackValues is true 2189 2190 if (cfg.trackValues) { 2191 e.newValue = $(_this).attr(e.attributeName); 2192 } 2193 2194 if ($(_this).data('attrchange-status') === 'connected') { 2195 //execute if connected 2196 cfg.callback.call(_this, e); 2197 } 2198 }); 2199 }); 2200 return this.data('attrchange-method', 'Mutation Observer').data('attrchange-status', 'connected').data('attrchange-obs', observer).each(function () { 2201 observer.observe(this, mOptions); 2202 }); 2203 } else if (isDOMAttrModifiedSupported()) { 2204 //Opera 2205 //Good old Mutation Events 2206 return this.data('attrchange-method', 'DOMAttrModified').data('attrchange-status', 'connected').on('DOMAttrModified', function (event) { 2207 if (event.originalEvent) { 2208 event = event.originalEvent; 2209 } //jQuery normalization is not required 2210 2211 2212 event.attributeName = event.attrName; //property names to be consistent with MutationObserver 2213 2214 event.oldValue = event.prevValue; //property names to be consistent with MutationObserver 2215 2216 if ($(this).data('attrchange-status') === 'connected') { 2217 //disconnected logically 2218 cfg.callback.call(this, event); 2219 } 2220 }); 2221 } else if ('onpropertychange' in document.body) { 2222 //works only in IE 2223 return this.data('attrchange-method', 'propertychange').data('attrchange-status', 'connected').on('propertychange', function (e) { 2224 e.attributeName = window.event.propertyName; //to set the attr old value 2225 2226 checkAttributes.call($(this), cfg.trackValues, e); 2227 2228 if ($(this).data('attrchange-status') === 'connected') { 2229 //disconnected logically 2230 cfg.callback.call(this, e); 2231 } 2232 }); 2233 } 2234 2235 return this; 2236 } else if (typeof a == 'string' && $.fn.attrchange.hasOwnProperty('extensions') && $.fn.attrchange['extensions'].hasOwnProperty(a)) { 2237 //extensions/options 2238 return $.fn.attrchange['extensions'][a].call(this, b); 2239 } 2240 }; 2241 2242 $.fn.attrchange.extensions = { 2243 /*attrchange option/extension*/ 2244 disconnect: function disconnect(o) { 2245 if (typeof o !== 'undefined' && o.isPhysicalDisconnect) { 2246 return this.each(function () { 2247 var attrchangeMethod = $(this).data('attrchange-method'); 2248 2249 if (attrchangeMethod == 'propertychange' || attrchangeMethod == 'DOMAttrModified') { 2250 $(this).off(attrchangeMethod); 2251 } else if (attrchangeMethod == 'Mutation Observer') { 2252 $(this).data('attrchange-obs').disconnect(); 2253 } else if (attrchangeMethod == 'polling') { 2254 clearInterval($(this).data('attrchange-polling-timer')); 2255 } 2256 }).removeData(['attrchange-method', 'attrchange-status']); 2257 } else { 2258 //logical disconnect 2259 return this.data('attrchange-status', 'disconnected'); //set a flag that prevents triggering callback onattrchange 2260 } 2261 }, 2262 remove: function remove(o) { 2263 return $.fn.attrchange.extensions['disconnect'].call(this, { 2264 isPhysicalDisconnect: true 2265 }); 2266 }, 2267 getProperties: function getProperties(o) { 2268 var attrchangeMethod = $(this).data('attrchange-method'); 2269 var pollInterval = $(this).data('attrchange-pollInterval'); 2270 return { 2271 method: attrchangeMethod, 2272 isPolling: attrchangeMethod == 'polling', 2273 pollingInterval: typeof pollInterval === 'undefined' ? 0 : parseInt(pollInterval, 10), 2274 status: typeof attrchangeMethod === 'undefined' ? 'removed' : $(this).data('attrchange-status') 2275 }; 2276 }, 2277 reconnect: function reconnect(o) { 2278 //reconnect possible only when there is a logical disconnect 2279 return this.data('attrchange-status', 'connected'); 2280 }, 2281 polling: function polling(o) { 2282 if (o.hasOwnProperty('isComputedStyle') && o.isComputedStyle == 'true') { 2283 /* extensive and slow - polling to check on computed style properties */ 2284 return this.each(function (i, _this) { 2285 if (!o.hasOwnProperty('properties') || Object.prototype.toString.call(o.properties) !== '[object Array]' || o.properties.length == 0) { 2286 return false;
2287 } //return if no properties found 2288 2289 2290 var attributes = {}; //store computed properties 2291 2292 for (var i = 0; i < o.properties.length; i++) { 2293 attributes[o.properties[i]] = $(this).css(o.properties[i]); 2294 } 2295 2296 var _this = this; 2297 2298 $(this).data('attrchange-polling-timer', setInterval(function () { 2299 var changes = {}, 2300 hasChanges = false; // attrName: { oldValue: xxx, newValue: yyy} 2301 2302 for (var comuptedVal, i = 0; i < o.properties.length; i++) { 2303 comuptedVal = $(_this).css(o.properties[i]); 2304 2305 if (attributes[o.properties[i]] !== comuptedVal) { 2306 hasChanges = true; 2307 changes[o.properties[i]] = { 2308 oldValue: attributes[o.properties[i]], 2309 newValue: comuptedVal 2310 }; 2311 attributes[o.properties[i]] = comuptedVal; //add the attribute to the orig 2312 } 2313 } 2314 2315 if (hasChanges && $(_this).data('attrchange-status') === 'connected') { 2316 //disconnected logically 2317 o.callback.call(_this, changes); 2318 } 2319 }, o.pollInterval ? o.pollInterval : 1000)).data('attrchange-method', 'polling').data('attrchange-pollInterval', o.pollInterval).data('attrchange-status', 'connected'); 2320 }); 2321 } else { 2322 return this.each(function (i, _this) { 2323 /* this one is programmatic polling */ 2324 var attributes = {}; 2325 2326 for (var attr, i = 0, attrs = _this.attributes, l = attrs.length; i < l; i++) { 2327 attr = attrs.item(i); 2328 attributes[attr.nodeName] = attr.nodeValue; 2329 } 2330 2331 $(_this).data('attrchange-polling-timer', setInterval(function () { 2332 var changes = {}, 2333 hasChanges = false; // attrName: { oldValue: xxx, newValue: yyy} 2334 2335 for (var attr, i = 0, attrs = _this.attributes, l = attrs.length; i < l; i++) { 2336 attr = attrs.item(i); 2337 2338 if (attributes.hasOwnProperty(attr.nodeName) && attributes[attr.nodeName] != attr.nodeValue) { 2339 //check the values 2340 changes[attr.nodeName] = { 2341 oldValue: attributes[attr.nodeName], 2342 newValue: attr.nodeValue 2343 }; 2344 hasChanges = true; 2345 } else if (!attributes.hasOwnProperty(attr.nodeName)) { 2346 //new attribute 2347 changes[attr.nodeName] = { 2348 oldValue: '', 2349 newValue: attr.nodeValue 2350 }; 2351 hasChanges = true; 2352 } 2353 2354 attributes[attr.nodeName] = attr.nodeValue; //add the attribute to the orig 2355 } 2356 2357 if (hasChanges && $(_this).data('attrchange-status') === 'connected') { 2358 //disconnected logically 2359 o.callback.call(_this, changes); 2360 } 2361 }, o.pollInterval ? o.pollInterval : 1000)).data('attrchange-method', 'polling').data('attrchange-pollInterval', o.pollInterval).data('attrchange-status', 'connected'); 2362 }); 2363 } 2364 } 2365 }; 2366})(jQuery); 2367 2368/***/ }), 2369 2370/***/ 490: 2371/***/ ((module) => { 2372 2373/* 2374 # ----------------------------------------------------------------------------- 2375 # ~/js/navigator/navigator.js 2376 # Provides all JavaScript core functions for J1 Navigator 2377 # 2378 # Product/Info: 2379 # https://jekyll.one 2380 # https://github.com/adamnurdin01/bootsnav 2381 # http://corenav.anurdin.net/ 2382 # 2383 # Copyright (C) 2022 Juergen Adams 2384 # Copyright (C) 2016 adamnurdin01 2385 # 2386 # J1 Template is licensed under MIT License. 2387 # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE 2388 # Bootsnav is licensed under MIT License. 2389 # See: https://github.com/adamnurdin01/navigator 2390 # 2391 # ----------------------------------------------------------------------------- 2392 # NOTE: 2393 # jadams, 2020-06-21: 2394 # J1 Navigator needs a general revision on BS4 code and functionalities 2395 # Current, only base function are tested with BS4 (was coded for BS3) 2396 # ----------------------------------------------------------------------------- 2397*/ 2398// ----------------------------------------------------------------------------- 2399// ESLint shimming 2400// ----------------------------------------------------------------------------- 2401 2402/* eslint indent: "off" */ 2403 2404/* eslint no-unused-vars: "off" */ 2405 2406/* eslint no-undef: "off" */ 2407// ----------------------------------------------------------------------------- 2408// ----------------------------------------------------------------------------- 2409// TODO: Height of dropdowns are to be limited in general 2410// ----------------------------------------------------------------------------- 2411// Navigator core registered as 'j1.core.navigator' 2412// ----------------------------------------------------------------------------- 2413module.exports = function navigator(options) { 2414 // --------------------------------------------------------------------------- 2415 // global vars 2416 // --------------------------------------------------------------------------- 2417 var message = {}; 2418 var state; 2419 var logger; 2420 var logText; // ----------------------------------------------------------------------- 2421 // default settings 2422 // ----------------------------------------------------------------------- 2423 2424 var settings = $.extend({ 2425 foo: 'bar', 2426 bar: 'foo' 2427 }, options); // --------------------------------------------------------------------------- 2428 // main object 2429 // --------------------------------------------------------------------------- 2430 2431 return { 2432 // ------------------------------------------------------------------------- 2433 // module initializer 2434 // ------------------------------------------------------------------------- 2435 init: function init(defaultOptions, menuOptions) { 2436 logger = log4javascript.getLogger('j1.core.navigator'); 2437 logText = 'core is being initialized'; 2438 logger.info(logText); // ----------------------------------------------------------------------- 2439 // Create a Wrapper for the nav system 2440 // ----------------------------------------------------------------------- 2441 2442 $('body').wrapInner('<div id="wrapper-inner" class="wrapper"></div>'); 2443 this.manageDropdownMenu(defaultOptions, menuOptions); 2444 this.navbarSticky(); 2445 this.eventHandler(defaultOptions); // jadams, 2021-07-03: initialize events early 2446 2447 message.type = 'command'; 2448 message.action = 'core_initialized'; 2449 message.text = 'navigator core initialized'; 2450 j1.sendMessage('j1.core.navigator', 'j1.adapter.navigator', message); 2451 return true; 2452 }, 2453 // ------------------------------------------------------------------------- 2454 // event handler 2455 // ------------------------------------------------------------------------- 2456 eventHandler: function eventHandler(options) { 2457 var defaultOptions = options; 2458 var logger = log4javascript.getLogger('j1.core.navigator.eventHandler'); 2459 var $getNav = $('nav.navbar.navigator'); 2460 var scrollDuration = 300; 2461 var page_link; 2462 var img_link; 2463 var classname; 2464 var nav_link; 2465 var anchor_id; 2466 var scrollOffset; 2467 var json_data; // jadams: unused code (for now).: manages HTML5 server side events 2468 // for incoming messages from Git Server send e.g. on a 'pull request' 2469 // NOTE: used for ControlCenter (cc) functionality only !!! 2470 // ----------------------------------------------------------------------- 2471 // const seeMe = 'https://smee.io/wlNIFNiJN0GClm2'; 2472 // const middleware = 'localhost:5000/state'; 2473 // const web_server_dev = 'http://localhost:41000/status'; 2474 // const utility_server = 'http://localhost:41001/git?request=pull'; 2475 // var sender = seeMe; 2476 // var payload; 2477 // if (j1.checkUserAgent('IE') || j1.checkUserAgent('Edge')) { 2478 // logger.warn('HTML5 server side events (SSE) not supported for: ' + userAgent); 2479 // logger.warn('Middleware messages disabled'); 2480 // } else { 2481 // const middleware_status = new EventSource(sender); 2482 // 2483 // // ----------------------------------------------------------------------- 2484 // // middleware event handler ( SSE currently NOT used) 2485 // // ----------------------------------------------------------------------- 2486 // middleware_status.onmessage = (event) => { 2487 // const payload = JSON.parse(event.data); 2488 // 2489 // logger.debug('middleware: event received'); 2490 // 2491 // json_data = JSON.stringify(payload, undefined, 2); 2492 // logText = 'payload: ' + json_data; 2493 // logger.debug(logText); 2494 // 2495 // message.type = 'command'; 2496 // message.action = 'status'; 2497 // message.text = payload; 2498 // j1.sendMessage( 'j1.core.navigator', 'j1.adapter.navigator', message ); 2499 // 2500 // return true; 2501 // }; // END event onMessage 2502 // } 2503 // bind click event to all plain '#' links to prevent default action 2504 // 'scroll-to-top' 2505 // See: 2506 // https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault 2507 // https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation 2508 // https://stackoverflow.com/questions/134845/which-href-value-should-i-use-for-javascript-links-or-javascriptvoid0 2509 // 2510 2511 $('a[href="#"]').click(function (e) { 2512 page_link = document.querySelector('[id="' + decodeURI(anchor_id).split('#').join('') + '"]') ? true : false;
2513 anchor_id = e.target.hash ? e.target.hash : false; 2514 classname = e.target.className ? e.target.className : ''; 2515 nav_link = classname.includes('nav-'); 2516 2517 if (nav_link || !page_link) { 2518 logger.debug('\n' + 'click event on href "#" detected: prevent default action'); 2519 e.preventDefault ? e.preventDefault() : e.returnValue = false; 2520 } 2521 }); // ----------------------------------------------------------------------- 2522 // In-page smooth scroll 2523 // ----------------------------------------------------------------------- 2524 // bind click event to all headlines generated by AsciiDoctor 2525 // for smooth-scroll (in-page) 2526 // ----------------------------------------------------------------------- 2527 2528 $('.sect1, .sect2 .sect3, .sect4, .sect5, .sect6').on('click', function (e) { 2529 img_link = e.target.localName == 'img' ? true : false; 2530 page_link = document.querySelector('[id="' + decodeURI(anchor_id).split('#').join('') + '"]') ? true : false; 2531 anchor_id = e.target.hash ? e.target.hash : false; 2532 classname = e.target.className ? e.target.className : ''; 2533 nav_link = typeof classname == 'string' ? classname.includes('nav-link') : false; // skip BS nav links 2534 2535 scrollOffset = j1.getScrollOffset(); 2536 2537 if (img_link) { 2538 // skip scrolling if a click on an image detected 2539 return true; 2540 } 2541 2542 if (anchor_id && !nav_link || page_link) { 2543 logger.debug('\n' + 'click event on headline detected: ' + anchor_id); 2544 $('html, body').animate({ 2545 scrollTop: $(anchor_id).offset().top + scrollOffset 2546 }, scrollDuration); 2547 e.preventDefault ? e.preventDefault() : e.returnValue = false; 2548 } 2549 }); // bind click event to all HTML elements of class '.badge' (Bootstrap) 2550 // for smooth-scroll (in-page) to a '<div>' element 2551 // ----------------------------------------------------------------------- 2552 2553 $('.badge').on('click', function (e) { 2554 anchor_id = e.target.hash ? e.target.hash : false; 2555 scrollOffset = 100; 2556 2557 if (anchor_id) { 2558 logger.debug('\n' + 'click event on badge detected: ' + anchor_id); 2559 $('html, body').animate({ 2560 scrollTop: $(anchor_id).offset().top - scrollOffset // NOTE: diffeent scrollOffset 2561 2562 }, scrollDuration); 2563 event.stopPropagation(); 2564 } 2565 }); // bind click event to all HTML elements of class '.badge-tag' (j1) 2566 // for smooth-scroll (in-page) 2567 2568 $('.badge-tag').on('click', function (e) { 2569 anchor_id = e.target.hash ? e.target.hash : false; 2570 scrollOffset = j1.getScrollOffset(); 2571 2572 if (anchor_id) { 2573 logger.debug('\n' + 'click event on badge-tag detected: ' + anchor_id); 2574 $('html, body').animate({ 2575 scrollTop: $(anchor_id).offset().top + scrollOffset 2576 }, scrollDuration); 2577 event.stopPropagation(); 2578 } 2579 }); // jadams: test code for jQuery plugin 'regex' 2580 // ----------------------------------------------------------------------- 2581 // $('a:contains("?#")').click(function(e) { 2582 // e.preventDefault ? e.preventDefault() : e.returnValue = false; 2583 // logger.info('bound click event to "?#*", suppress default action'); 2584 // }); 2585 // ----------------------------------------------------------------------- 2586 // Navbar Sticky 2587 // ----------------------------------------------------------------------- 2588 2589 var navSticky = $getNav.hasClass('navbar-sticky'); 2590 2591 if (navSticky) { 2592 // Wraped navigation 2593 $getNav.wrap('<div class=\'wrap-sticky\'></div>'); 2594 } // ----------------------------------------------------------------------- 2595 // Navbar Center 2596 // ----------------------------------------------------------------------- 2597 2598 2599 if ($getNav.hasClass('brand-center')) { 2600 var postsArr = new Array(); 2601 var index = $('nav.brand-center'); 2602 var $postsList = index.find('ul.navbar-nav'); //Create array of all posts in lists 2603 2604 index.find('ul.navbar-nav > li').each(function () { 2605 postsArr.push($(this).html()); 2606 }); // Split the array at this point. The original array is altered. 2607 2608 var firstList = postsArr.splice(0, Math.round(postsArr.length / 2)); 2609 var secondList = postsArr; 2610 var ListHTML = ''; 2611 2612 var createHTML = function createHTML(list) { 2613 ListHTML = ''; 2614 2615 for (var i = 0; i < list.length; i++) { 2616 ListHTML += '<li>' + list[i] + '</li>'; 2617 } 2618 }; // Generate HTML for first list 2619 2620 2621 createHTML(firstList); 2622 $postsList.html(ListHTML); 2623 index.find('ul.nav').first().addClass('navbar-left'); // Generate HTML for second list 2624 2625 createHTML(secondList); //Create new list after original one 2626 2627 $postsList.after('<ul class="nav navbar-nav"></ul>').next().html(ListHTML); 2628 index.find('ul.nav').last().addClass('navbar-right'); // Wrap navigation menu 2629 2630 index.find('ul.nav.navbar-left').wrap('<div class=\'col_half left\'></div>'); 2631 index.find('ul.nav.navbar-right').wrap('<div class=\'col_half right\'></div>'); // Selection Class 2632 2633 index.find('ul.navbar-nav > li').each(function () { 2634 var dropDown = $('ul.dropdown-menu', this), 2635 megaMenu = $('ul.megamenu-content', this); 2636 dropDown.closest('li').addClass('dropdown'); 2637 megaMenu.closest('li').addClass('megamenu-fw'); 2638 }); 2639 } // ----------------------------------------------------------------------- 2640 // Menu Center 2641 // ----------------------------------------------------------------------- 2642 2643 2644 if ($getNav.find('ul.nav').hasClass('navbar-center')) { 2645 $getNav.addClass('menu-center'); 2646 } // ----------------------------------------------------------------------- 2647 // Navbar Full 2648 // ----------------------------------------------------------------------- 2649 2650 2651 if ($getNav.hasClass('navbar-full')) { 2652 // Add Class to body 2653 $('nav.navbar.navigator').find('ul.nav').wrap('<div class=\'wrap-full-menu\'></div>'); 2654 $('.wrap-full-menu').wrap('<div class=\'nav-full\'></div>'); 2655 $('ul.nav.navbar-nav').prepend('<li class=\'close-full-menu\'><a href=\'#\'><i class=\'mdi mdi-close\'></i></a></li>'); 2656 } else if ($getNav.hasClass('navbar-mobile')) { 2657 $getNav.removeClass('no-full'); 2658 } else { 2659 $getNav.addClass('no-full'); 2660 } // ----------------------------------------------------------------------- 2661 // Navbar Fixed 2662 // ----------------------------------------------------------------------- 2663 2664 2665 if ($getNav.hasClass('no-background')) { 2666 $(window).on('scroll', function () { 2667 var navbarHeighth = $('nav.navbar').outerHeight(); 2668 var scrollPos = $(window).scrollTop(); 2669 2670 if (scrollPos > navbarHeighth) { 2671 $('.navbar-fixed').removeClass('no-background'); 2672 } else { 2673 $('.navbar-fixed').addClass('no-background'); 2674 } 2675 }); 2676 } 2677 2678 if ($getNav.hasClass('navbar-transparent')) { 2679 $(window).on('scroll', function () { 2680 var navbarHeighth = $('nav.navbar').outerHeight(); 2681 var scrollPos = $(window).scrollTop(); 2682 2683 if (scrollPos > navbarHeighth) { 2684 $('.navbar-fixed').removeClass('navbar-transparent'); 2685 $('.navbar-fixed').addClass('navbar-scrolled'); 2686 } else { 2687 $('.navbar-fixed').removeClass('navbar-scrolled'); 2688 $('.navbar-fixed').addClass('navbar-transparent'); 2689 } 2690 }); 2691 } // ----------------------------------------------------------------------- 2692 // Manage events for all quicklinks 2693 // https://stackoverflow.com/questions/178325/how-do-i-check-if-an-element-is-hidden-in-jquery 2694 // https://stackoverflow.com/questions/4770025/how-to-disable-scrolling-temporarily 2695 // https://stackoverflow.com/questions/5963669/whats-the-difference-between-event-stoppropagation-and-event-preventdefault 2696 // ----------------------------------------------------------------------- 2697 2698 2699 $('.attr-nav').each(function () { 2700 // --------------------------------------------------------------------- 2701 // QuickSearch 2702 // 2703 if ($('li.quicksearch')) { 2704 logger.debug('register OPEN event for QuickSearch'); 2705 $('li.quicksearch > a', this).on('click', function (e) { 2706 e.preventDefault(); // don't do the default browser action 2707 2708 logger.debug('manage search action OPEN'); 2709 $('html,body').animate({ 2710 scrollTop: 0 2711 }, 0); 2712 $('.top-search').slideToggle('slow', 'swing', function () { 2713 if ($('.top-search').is(':visible')) { 2714 // disable scrolling (desktop) 2715 $('body').addClass('stop-scrolling'); // disable scrolling (mobile) 2716 2717 $('body').bind('touchmove', function (e) { 2718 e.preventDefault(); 2719 }); // disable navbar 2720 2721 $('#' + defaultOptions.nav_bar.container_id).hide(); 2722 } else { 2723 // enable scrolling (desktop) 2724 $('body').removeClass('stop-scrolling'); // enable scrolling (mobile) 2725 2726 $('body').unbind('touchmove'); // enable navbar 2727 2728 $('#' + defaultOptions.nav_bar.container_id).show(); 2729 } 2730 }); 2731 e.stopPropagation(); // don't bubble up the event 2732 }); 2733 logger.debug('register CLOSE event for QuickSearch'); 2734 $('.input-group-addon.close-search').on('click', function (e) { 2735 e.preventDefault(); // don't do the default browser action 2736 2737 logger.debug('manage search action CLOSE');
2738 $('.top-search').slideUp('slow', 'swing'); 2739 $('html,body').animate({ 2740 scrollTop: 0 2741 }, 0); // enable scrolling (desktop) 2742 2743 $('body').removeClass('stop-scrolling'); // enable scrolling (mobile) 2744 2745 $('body').unbind('touchmove'); // enable navbar 2746 2747 $('#' + defaultOptions.nav_bar.container_id).show(); 2748 e.stopPropagation(); // don't bubble up the event 2749 }); 2750 } // END QuickSearch 2751 // --------------------------------------------------------------------- 2752 // Translator 2753 // 2754 2755 2756 if ($('li.translate')) { 2757 logger.debug('register SHOW event for J1 Translator'); 2758 $('li.translate > a', this).on('click', function (e) { 2759 j1.translator.showDialog(); 2760 }); 2761 } // END Translator 2762 // --------------------------------------------------------------------- 2763 // CookieConsent 2764 // 2765 2766 2767 if ($('li.cookie-consent')) { 2768 logger.debug('register SHOW event for J1 CookieConsent'); 2769 $('li.cookie-consent > a', this).on('click', function (e) { 2770 j1.cookieConsent.showDialog(); 2771 }); 2772 } // END CookieConsent 2773 2774 }); // End manage events for all quicklinks 2775 }, 2776 // END eventHandler 2777 // ------------------------------------------------------------------------- 2778 // Manage the Menu Dropdowns for Desktop|Mobile 2779 // ------------------------------------------------------------------------- 2780 manageDropdownMenu: function manageDropdownMenu(defaultOptions, menuOptions) { 2781 var navDefaultOptions = defaultOptions; 2782 var navMenuOptions = menuOptions; 2783 var $getNav = $('nav.navbar.navigator'); 2784 var $windowOrientation = window.matchMedia('(orientation: landscape)').matches ? 'landscape' : 'portrait'; 2785 var $getWindow = $(window).width(); 2786 var $getNavWidth = $('nav').width(); 2787 var $getIn = $getNav.find('ul.nav').data('in'); 2788 var $getOut = $getNav.find('ul.nav').data('out'); 2789 var menuSelector = '#' + navMenuOptions.xhr_container_id + '.collapse'; 2790 var quicklinksSelector = '#navigator_nav_quicklinks'; 2791 var delayMenuOpen = navMenuOptions.delay_menu_open; 2792 var breakPoint; 2793 var $menu; 2794 var $dropDown; 2795 var timeoutHandle; // BS4 @media MAX breakpoints 2796 // NOTE: a media query is always a range 2797 // ----------------------------------------------------------------------- 2798 2799 var gridBreakpoint_lg = 992; // bs-breakpoint-lg 2800 2801 var gridBreakpoint_md = 768; // bs-breakpoint-md 2802 2803 var gridBreakpoint_sm = 576; // bs-breakpoint-sm 2804 // BS4 @media MIN breakpoints 2805 // ----------------------------------------------------------------------- 2806 // NOTE: a media query is always a range 2807 // var gridBreakpoint_lg = 991; 2808 // var gridBreakpoint_md = 767; 2809 // var gridBreakpoint_sm = 575; 2810 // @media ranges 2811 // ----------------------------------------------------------------------- 2812 2813 var small_range = { 2814 min: '0em', 2815 max: '40em' 2816 }; 2817 /* 0, 640px */ 2818 2819 var medium_range = { 2820 min: '40.063em', 2821 max: '64em' 2822 }; 2823 /* 641px, 1024px */ 2824 2825 var large_range = { 2826 min: '64.063em', 2827 max: '90em' 2828 }; 2829 /* 1025px, 1440px */ 2830 2831 var xlarge_range = { 2832 min: '90.063em', 2833 max: '120em' 2834 }; 2835 /* 1441px, 1920px */ 2836 2837 var xxlarge_range = { 2838 min: '120.063em' 2839 }; 2840 /* 1921px */ 2841 // jadams, 2019-05-01: Set Media Breakpoint for Desktop|Mobile Navigation 2842 2843 if (navDefaultOptions.nav_bar.media_breakpoint === 'lg') { 2844 breakPoint = gridBreakpoint_lg; 2845 } else if (navDefaultOptions.nav_bar.media_breakpoint === 'md') { 2846 breakPoint = gridBreakpoint_md; 2847 } else if (navDefaultOptions.nav_bar.media_breakpoint === 'sm') { 2848 breakPoint = gridBreakpoint_sm; 2849 } else { 2850 breakPoint = gridBreakpoint_lg; 2851 } // ----------------------------------------------------------------------- 2852 // Tablet or Mobile 2853 // NOTE: 2854 // Managing the mobile menu is moved to MMenu Plugin 2855 // Only base functions like QuickLinks are managed by 2856 // J1 Navigator 2857 // ----------------------------------------------------------------------- 2858 // MIN media breakpoint 2859 2860 2861 if ($getWindow <= breakPoint) { 2862 // Collapse Navbar (Desktop Navigation) 2863 $(menuSelector).addClass('navbar-collapse'); 2864 $(menuSelector).removeClass('show'); // Show QuicklinksBar 2865 2866 $(quicklinksSelector).addClass('show'); // -----------------------------------------------------------------------
2867 // Desktop Navigation does NOT work on physical devices like iPad|Pro 2868 // Config DISABLED 2869 // 2870 // } else if ( $getWindow > breakPoint || $getWindow <= 1024 && $windowOrientation == 'portrait' ) { 2871 } else if ($getWindow > breakPoint) { 2872 // ----------------------------------------------------------------------- 2873 // Desktop 2874 // ----------------------------------------------------------------------- 2875 $('#navigator_nav_quicklinks').removeClass('show'); 2876 $('#desktop_menu').show(); // jadams, 2021-03-05: manage dropdown menus 2877 // --------------------------------------------------------------------- 2878 2879 $('.dropdown-menu > li').on('mouseenter', function () { 2880 if ($('body').hasClass('stop-scrolling')) { 2881 return false; 2882 } else { 2883 $('body').addClass('stop-scrolling'); 2884 } 2885 }); 2886 $('.dropdown-menu > li').on('mouseleave', function () { 2887 // stop scrolling if top search or any (mmenu) drawer is opened 2888 if ($('body').hasClass('stop-scrolling')) { 2889 $('body').removeClass('stop-scrolling'); 2890 } 2891 }); // limit the dropdown menu lenght if needed 2892 2893 $('.dropdown-menu > li').hover(function () { 2894 var $container = $(this); 2895 var $list = $container.find('ul'); // limit LAST menu ONLY 2896 2897 if ($list.length == 1) { 2898 $list.addClass('scrollable-menu'); 2899 } 2900 }); // jadams, 2021-03-06: Enable|Show Desktop Menu|s 2901 // 2902 2903 $(menuSelector).removeClass('navbar-collapse'); 2904 $(menuSelector).addClass('show'); // Open Desktop Menu|s on hover 2905 2906 $('nav.navbar.navigator ul.nav').each(function () { 2907 $('a.dropdown-toggle', this).off('click'); // $('a.dropdown-toggle', this).on('click', function (e) { 2908 // // e.stopPropagation(); // don't bubble up the event 2909 // }); 2910 2911 $('.megamenu-fw', this).each(function () { 2912 $('.title', this).off('click'); 2913 $('a.dropdown-toggle', this).off('click'); 2914 $('.content').removeClass('animated'); 2915 }); 2916 $('.dropdown-menu', this).addClass('animated'); 2917 $('li.dropdown', this).on('mouseenter', function (e) { 2918 $menu = $('.dropdown-menu', this).eq(0); 2919 $dropDown = $(this); 2920 $menu.removeClass($getOut); 2921 $menu.removeClass('open'); 2922 $dropDown.addClass('open'); // Create a timeout object to delay the dropdown menus to open 2923 2924 timeoutHandle = window.setTimeout(function () { 2925 if ($dropDown.hasClass('open')) { 2926 $menu.stop().fadeIn().addClass($getIn); 2927 $menu.addClass('open'); 2928 $dropDown.addClass('open'); 2929 } 2930 }, delayMenuOpen); 2931 return true; 2932 }); 2933 $('li.dropdown', this).on('mouseleave', function (e) { 2934 $menu = $('.dropdown-menu', this).eq(0); 2935 $dropDown = $(this); // Clear the timeout object for dropdown menus 'open' 2936 2937 window.clearTimeout(timeoutHandle); 2938 $menu.removeClass($getIn); 2939 $menu.addClass($getOut); 2940 $menu.fadeOut('slow'); 2941 $dropDown.removeClass('open'); 2942 return true; 2943 }); 2944 }); // END Desktop Menu 2945 } // end Desktop 2946 // ----------------------------------------------------------------------- 2947 // Fullscreen Menu 2948 // ----------------------------------------------------------------------- 2949 2950 2951 if ($getNav.hasClass('navbar-full')) { 2952 var windowHeight = $(window).height(), 2953 windowWidth = $(window).width(); 2954 $('.nav-full').css('height', windowHeight + 'px'); 2955 $('.wrap-full-menu').css('height', windowHeight + 'px'); 2956 $('.wrap-full-menu').css('width', windowWidth + 'px'); 2957 $('.navbar-collapse').addClass('animated'); 2958 $('.navbar-toggle').each(function () { 2959 var getId = $(this).data('target'); 2960 $(this).off('click'); 2961 $(this).on('click', function (e) { 2962 e.preventDefault(); 2963 $(getId).removeClass($getOut); 2964 $(getId).addClass('in'); 2965 $(getId).addClass($getIn); // e.stopPropagation(); // don't bubble up the event 2966 // return false;
2967 }); 2968 $('li.close-full-menu').on('click', function (e) { 2969 e.preventDefault(); 2970 $(getId).addClass($getOut); 2971 setTimeout(function () { 2972 $(getId).removeClass('in'); 2973 $(getId).removeClass($getIn); 2974 }, 500); //e.stopPropagation(); // don't bubble up the event 2975 // return false; 2976 }); 2977 }); 2978 } 2979 }, 2980 // end manageDropdownMenu 2981 // ------------------------------------------------------------------------- 2982 // Sticky Navbar 2983 // ------------------------------------------------------------------------- 2984 navbarSticky: function navbarSticky() { 2985 var $getNav = $('nav.navbar.navigator'), 2986 navSticky = $getNav.hasClass('navbar-sticky'); 2987 2988 if (navSticky) { 2989 // Set Height Navigation 2990 var $getHeight = $getNav.height(); 2991 $('.wrap-sticky').height($getHeight); // Windown on scroll 2992 2993 var getOffset = $('.wrap-sticky').offset().top; 2994 $(window).on('scroll', function () { 2995 var scrollTop = $(window).scrollTop(); 2996 2997 if (scrollTop > getOffset) { 2998 $getNav.addClass('sticked'); 2999 } else { 3000 $getNav.removeClass('sticked'); 3001 } 3002 }); 3003 } 3004 }, 3005 // end navbarSticky 3006 // ------------------------------------------------------------------------- 3007 // updateSidebar 3008 // Note: 3009 // ------------------------------------------------------------------------- 3010 updateSidebar: function updateSidebar(user_data) { 3011 var logger = log4javascript.getLogger('j1.core.navigator.updateSidebar'); 3012 var json_message; // json_message = JSON.stringify(user_data, undefined, 2); // multiline 3013 3014 json_message = JSON.stringify(user_data); 3015 logText = 'user state data: ' + json_message; 3016 logger.debug(logText); // Replace Macro placeholders to values 3017 3018 j1.resolveMacros(user_data); // Replace Macro values only 3019 3020 j1.updateMacros(user_data); 3021 return true; 3022 } // END updateSidebar 3023 3024 }; // end return (object) 3025}(jQuery); 3026 3027/***/ }), 3028 3029/***/ 814: 3030/***/ ((module) => { 3031 3032"use strict"; 3033/* 3034 # ----------------------------------------------------------------------------- 3035 # ~/js/scroll-smooth/scroll-smooth.js 3036 # Provides Javascript functions for smooth scrolling 3037 # 3038 # Product/Info: 3039 # http://jekyll.one 3040 # 3041 # 3042 # 3043 # J1 Template is licensed under the MIT License. 3044 # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE 3045 # ----------------------------------------------------------------------------- 3046*/ 3047 // ----------------------------------------------------------------------------- 3048// ESLint shimming 3049// ----------------------------------------------------------------------------- 3050 3051/* eslint indent: "off" */ 3052 3053/* eslint no-unused-vars: "off" */ 3054 3055/* eslint no-undef: "off" */ 3056 3057/* eslint no-redeclare: "off" */ 3058 3059/* eslint indent: "off" */ 3060// ----------------------------------------------------------------------------- 3061// ----------------------------------------------------------------------------- 3062// scrollSmooth core registered as "scrollSmooth" 3063// ----------------------------------------------------------------------------- 3064 3065module.exports = function scrollSmooth(options) { 3066 // Default settings 3067 var settings = $.extend({ 3068 foo: 'foo_option', 3069 bar: 'bar_option' 3070 }, options); // ----------------------------------------------------------------------- 3071 // Helper functions 3072 // ----------------------------------------------------------------------- 3073 3074 function stripHash(url) { 3075 return url.slice(0, url.lastIndexOf('#')); 3076 } 3077 3078 function isCssSmoothScrollSupported() { 3079 return 'scrollBehavior' in document.documentElement.style; 3080 } 3081 3082 return { 3083 // ------------------------------------------------------------------------- 3084 // Initialize scrollSmooth 3085 // ------------------------------------------------------------------------- 3086 scroll: function scroll(target, options) { 3087 var logger; 3088 var logText; 3089 logger = log4javascript.getLogger('j1.core.scrollSmooth'); // indicator|check currently NOT used 3090 // if (isCssSmoothScrollSupported()) { } 3091 3092 logText = 'run module scrollSmooth'; 3093 logger.info(logText); 3094 var duration = options.duration; 3095 var offset = options.offset; // var pageUrl = options.location.hash 3096 // ? stripHash(options.location.href) 3097 // : options.location.href; 3098 3099 this.scrollTo(target, { 3100 duration: duration, 3101 offset: offset, 3102 callback: false 3103 }); 3104 logText = 'scrollSmooth finished'; 3105 logger.info(logText); 3106 }, 3107 // ------------------------------------------------------------------------- 3108 // scrollTo 3109 // NOTE: Calculate the tgt (HTML heading element including the hash) 3110 // This makes ids that start with a number to work: 3111 // '[id="' + decodeURI(target).split('#').join('') + '"]'
3112 // DecodeURI is usded for nonASCII hashes, they was encoded, 3113 // but id was not encoded, it lead to not finding the tgt element by id. 3114 // ------------------------------------------------------------------------- 3115 scrollTo: function scrollTo(target, options) { 3116 var start = window.pageYOffset; 3117 var opt = { 3118 duration: options.duration, 3119 offset: options.offset || 0, 3120 callback: options.callback, 3121 easing: options.easing || easeInOutQuad 3122 }; // calculate the tgt (HTML heading element including the hash) 3123 3124 var tgt = document.querySelector('[id="' + decodeURI(target).split('#').join('') + '"]'); 3125 var distance = typeof target === 'string' ? opt.offset + (target ? tgt && tgt.getBoundingClientRect().top || 0 // handle non-existent links better. 3126 : -(document.documentElement.scrollTop || document.body.scrollTop)) : target; 3127 var duration = typeof opt.duration === 'function' ? opt.duration(distance) : opt.duration; 3128 var timeStart; 3129 var timeElapsed; 3130 requestAnimationFrame(function (time) { 3131 timeStart = time; 3132 loop(time); 3133 }); 3134 3135 function loop(time) { 3136 timeElapsed = time - timeStart; 3137 window.scrollTo(0, opt.easing(timeElapsed, start, distance, duration)); 3138 3139 if (timeElapsed < duration) { 3140 requestAnimationFrame(loop); 3141 } else { 3142 postPositioning(); 3143 } 3144 } 3145 3146 function postPositioning() { 3147 // if configured 3148 if (typeof opt.callback === 'function') { 3149 opt.callback(); 3150 } 3151 } // Robert Penner's easeInOutQuad - http://robertpenner.com/easing/ 3152 3153 3154 function easeInOutQuad(t, b, c, d) { 3155 t /= d / 2; 3156 if (t < 1) return c / 2 * t * t + b; 3157 t--; 3158 return -c / 2 * (t * (t - 2) - 1) + b; 3159 } 3160 } // END scrollTo 3161 3162 }; // END return 3163}(jQuery); 3164 3165/***/ }), 3166 3167/***/ 525: 3168/***/ ((module) => { 3169 3170/** 3171 * This file is responsible for building the DOM and updating DOM state. 3172 * 3173 * @author Tim Scanlin 3174 */ 3175// ----------------------------------------------------------------------------- 3176// ESLint shimming 3177// ----------------------------------------------------------------------------- 3178 3179/* eslint indent: "off" */ 3180 3181/* eslint no-undef: "off" */ 3182 3183/* eslint semi: "off" */ 3184// ----------------------------------------------------------------------------- 3185module.exports = function (options) { 3186 var forEach = [].forEach; 3187 var some = [].some; 3188 var body = document.body; 3189 var currentlyHighlighting = true; 3190 var SPACE_CHAR = ' '; 3191 /** 3192 * Create link and list elements. 3193 * @param {Object} d 3194 * @param {HTMLElement} container 3195 * @return {HTMLElement} 3196 */ 3197 3198 function createEl(d, container) { 3199 var link = container.appendChild(createLink(d)); 3200 3201 if (d.children.length) { 3202 var list = createList(d.isCollapsed); 3203 d.children.forEach(function (child) { 3204 createEl(child, list); 3205 }); 3206 link.appendChild(list); 3207 } 3208 } 3209 /** 3210 * Render nested heading array data into a given selector. 3211 * @param {String} selector 3212 * @param {Array} data 3213 * @return {HTMLElement} 3214 */ 3215 3216 3217 function render(selector, data) { 3218 var collapsed = false; 3219 var container = createList(collapsed); 3220 data.forEach(function (d) { 3221 createEl(d, container); 3222 }); 3223 var parent = document.querySelector(selector); // Return if no parent is found. 3224 3225 if (parent === null) { 3226 return; 3227 } // Remove existing child if it exists. 3228 3229 3230 if (parent.firstChild) { 3231 parent.removeChild(parent.firstChild); 3232 } // Just return the parent and don't append the list if no links are found. 3233 3234 3235 if (data.length === 0) { 3236 return parent; 3237 } // Append the Elements that have been created 3238 3239 3240 return parent.appendChild(container); 3241 } 3242 /** 3243 * Create link element. 3244 * @param {Object} data 3245 * @return {HTMLElement} 3246 */ 3247 3248 3249 function createLink(data) { 3250 var item = document.createElement('li'); 3251 var a = document.createElement('a'); 3252 3253 if (options.listItemClass) { 3254 item.setAttribute('class', options.listItemClass); 3255 } 3256 3257 if (options.onClick) { 3258 a.onclick = options.onClick; 3259 } 3260 3261 if (options.includeHtml && data.childNodes.length) {
3262 forEach.call(data.childNodes, function (node) { 3263 a.appendChild(node.cloneNode(true)); 3264 }); 3265 } else { 3266 // Default behavior. 3267 a.textContent = data.textContent; 3268 } 3269 3270 a.setAttribute('href', options.basePath + '#' + data.id); 3271 a.setAttribute('class', options.linkClass + SPACE_CHAR + 'node-name--' + data.nodeName + SPACE_CHAR + options.extraLinkClasses); 3272 item.appendChild(a); 3273 return item; 3274 } 3275 /** 3276 * Create list element. 3277 * @param {Boolean} isCollapsed 3278 * @return {HTMLElement} 3279 */ 3280 3281 3282 function createList(isCollapsed) { 3283 var listElement = options.orderedList ? 'ol' : 'ul'; 3284 var list = document.createElement(listElement); 3285 var classes = options.listClass + SPACE_CHAR + options.extraListClasses; 3286 3287 if (isCollapsed) { 3288 classes += SPACE_CHAR + options.collapsibleClass; 3289 classes += SPACE_CHAR + options.isCollapsedClass; 3290 } 3291 3292 list.setAttribute('class', classes); 3293 return list; 3294 } 3295 /** 3296 * Update fixed sidebar class. 3297 * @return {HTMLElement} 3298 */ 3299 3300 3301 function updateFixedSidebarClass() { 3302 if (options.scrollContainer && document.querySelector(options.scrollContainer)) { 3303 var top; 3304 top = document.querySelector(options.scrollContainer).scrollTop; 3305 } else { 3306 top = document.documentElement.scrollTop || body.scrollTop; 3307 } 3308 3309 var posFixedEl = document.querySelector(options.positionFixedSelector); 3310 3311 if (options.fixedSidebarOffset === 'auto') { 3312 options.fixedSidebarOffset = document.querySelector(options.tocSelector).offsetTop; 3313 } 3314 3315 if (top > options.fixedSidebarOffset) { 3316 if (posFixedEl.className.indexOf(options.positionFixedClass) === -1) { 3317 posFixedEl.className += SPACE_CHAR + options.positionFixedClass; 3318 } 3319 } else { 3320 posFixedEl.className = posFixedEl.className.split(SPACE_CHAR + options.positionFixedClass).join(''); 3321 } 3322 } 3323 /** 3324 * Get top position of heading 3325 * @param {HTMLElement} 3326 * @return {integer} position 3327 */ 3328 3329 3330 function getHeadingTopPos(obj) { 3331 var position = 0; 3332 3333 if (obj !== document.querySelector(options.contentSelector && obj != null)) { 3334 position = obj.offsetTop; 3335 3336 if (options.hasInnerContainers) { 3337 position += getHeadingTopPos(obj.offsetParent); 3338 } 3339 } 3340 3341 return position; 3342 } 3343 /** 3344 * Update TOC highlighting and collapsed groups 3345 */ 3346 3347 3348 function updateToc(headingsArray) { 3349 // If a fixed content container was set 3350 if (options.scrollContainer && document.querySelector(options.scrollContainer)) { 3351 var top; 3352 top = document.querySelector(options.scrollContainer).scrollTop; 3353 } else { 3354 top = document.documentElement.scrollTop || body.scrollTop; 3355 } // Add fixed class at offset 3356 3357 3358 if (options.positionFixedSelector) { 3359 updateFixedSidebarClass(); 3360 } // Get the most TOP heading currently visible on the page to 3361 // identify what element to be highlighted 3362 3363 3364 var headings = headingsArray; 3365 var topHeader; 3366 var headingTopPos; // Using some instead of each so that we can escape early 3367 3368 if (currentlyHighlighting && document.querySelector(options.tocSelector) !== null && headings.length > 0) { 3369 some.call(headings, function (heading, i) { 3370 headingTopPos = getHeadingTopPos(heading); 3371 3372 if (headingTopPos > top + options.headingsOffset + 10) { 3373 // Don't allow negative index value 3374 // var index = (i === 0) ? i : i - 1; 3375 // topHeader = headings[index]; 3376 // jadams, index correction seems NOT needed 3377 topHeader = headings[i]; 3378 return true; 3379 } else if (i === headings.length - 1) { 3380 // This allows scrolling for the last heading on the page 3381 topHeader = headings[headings.length - 1]; 3382 return true; 3383 } 3384 }); // Remove the active class from the other tocLinks. 3385 3386 var tocLinks = document.querySelector(options.tocSelector).querySelectorAll('.' + options.linkClass); 3387 forEach.call(tocLinks, function (tocLink) { 3388 tocLink.className = tocLink.className.split(SPACE_CHAR + options.activeLinkClass).join(''); 3389 }); 3390 var tocLis = document.querySelector(options.tocSelector).querySelectorAll('.' + options.listItemClass);
3391 forEach.call(tocLis, function (tocLi) { 3392 tocLi.className = tocLi.className.split(SPACE_CHAR + options.activeListItemClass).join(''); 3393 }); // Add the active class to the active tocLink. 3394 3395 var activeTocLink = document.querySelector(options.tocSelector).querySelector('.' + options.linkClass + '.node-name--' + topHeader.nodeName + '[href="' + options.basePath + '#' + topHeader.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/@])/g, '\\$1') + '"]'); 3396 3397 if (activeTocLink.className.indexOf(options.activeLinkClass) === -1) { 3398 activeTocLink.className += SPACE_CHAR + options.activeLinkClass; 3399 } 3400 3401 var li = activeTocLink.parentNode; 3402 3403 if (li && li.className.indexOf(options.activeListItemClass) === -1) { 3404 li.className += SPACE_CHAR + options.activeListItemClass; 3405 } 3406 3407 var tocLists = document.querySelector(options.tocSelector).querySelectorAll('.' + options.listClass + '.' + options.collapsibleClass); // Collapse the other collapsible lists. 3408 3409 forEach.call(tocLists, function (list) { 3410 if (list.className.indexOf(options.isCollapsedClass) === -1) { 3411 list.className += SPACE_CHAR + options.isCollapsedClass; 3412 } 3413 }); // Expand the active link's collapsible list and its sibling if applicable. 3414 3415 if (activeTocLink.nextSibling && activeTocLink.nextSibling.className.indexOf(options.isCollapsedClass) !== -1) { 3416 activeTocLink.nextSibling.className = activeTocLink.nextSibling.className.split(SPACE_CHAR + options.isCollapsedClass).join(''); 3417 } 3418 3419 removeCollapsedFromParents(activeTocLink.parentNode.parentNode); 3420 } 3421 } 3422 /** 3423 * Remove collpased class from parent elements. 3424 * @param {HTMLElement} element 3425 * @return {HTMLElement} 3426 */ 3427 3428 3429 function removeCollapsedFromParents(element) { 3430 if (element.className.indexOf(options.collapsibleClass) !== -1 && element.className.indexOf(options.isCollapsedClass) !== -1) { 3431 element.className = element.className.split(SPACE_CHAR + options.isCollapsedClass).join(''); 3432 return removeCollapsedFromParents(element.parentNode.parentNode); 3433 } 3434 3435 return element; 3436 } 3437 /** 3438 * Disable TOC Animation when a link is clicked. 3439 * @param {Event} event 3440 */ 3441 3442 3443 function disableTocAnimation(event) { 3444 var target = event.target || event.srcElement; 3445 3446 if (typeof target.className !== 'string' || target.className.indexOf(options.linkClass) === -1) { 3447 return; 3448 } // Bind to tocLink clicks to temporarily disable highlighting 3449 // while smoothScroll is animating. 3450 3451 3452 currentlyHighlighting = false; 3453 } 3454 /** 3455 * Enable TOC Animation. 3456 */ 3457 3458 3459 function enableTocAnimation() { 3460 currentlyHighlighting = true; 3461 } 3462 3463 return { 3464 enableTocAnimation: enableTocAnimation, 3465 disableTocAnimation: disableTocAnimation, 3466 render: render, 3467 updateToc: updateToc 3468 }; 3469}; 3470 3471/***/ }), 3472 3473/***/ 923: 3474/***/ ((module) => { 3475 3476// ----------------------------------------------------------------------------- 3477// ESLint shimming 3478// ----------------------------------------------------------------------------- 3479 3480/* eslint indent: "off" */ 3481 3482/* eslint no-undef: "off" */ 3483 3484/* eslint no-unused-vars: "off" */ 3485// ----------------------------------------------------------------------------- 3486module.exports = { 3487 // Where to render the table of contents. 3488 tocSelector: '.js-toc', 3489 // Where to grab the headings to build the table of contents. 3490 contentSelector: '.js-toc-content', 3491 // Which headings to grab inside of the contentSelector element. 3492 headingSelector: 'h1, h2, h3', 3493 // Headings that match the ignoreSelector will be skipped. 3494 ignoreSelector: '.js-toc-ignore', 3495 // For headings inside relative or absolute positioned containers within content 3496 hasInnerContainers: false, 3497 // Main class to add to links. 3498 linkClass: 'toc-link', 3499 // Extra classes to add to links. 3500 extraLinkClasses: '', 3501 // Class to add to active links, 3502 // the link corresponding to the top most heading on the page. 3503 activeLinkClass: 'is-active-link', 3504 // Main class to add to lists. 3505 listClass: 'toc-list', 3506 // Extra classes to add to lists. 3507 extraListClasses: '', 3508 // Class that gets added when a list should be collapsed. 3509 isCollapsedClass: 'is-collapsed', 3510 // Class that gets added when a list should be able 3511 // to be collapsed but isn't necessarily collapsed. 3512 collapsibleClass: 'is-collapsible', 3513 // Class to add to list items. 3514 listItemClass: 'toc-list-item', 3515 // Class to add to active list items. 3516 activeListItemClass: 'is-active-li', 3517 // How many heading levels should not be collapsed. 3518 // For example, number 6 will show everything since 3519 // there are only 6 heading levels and number 0 will collapse them all. 3520 // The sections that are hidden will open 3521 // and close as you scroll to headings within them. 3522 collapseDepth: 0, 3523 // Smooth scrolling enabled. 3524 scrollSmooth: true, 3525 // Smooth scroll duration. 3526 scrollSmoothDuration: 420, 3527 // Smooth scroll offset. 3528 scrollSmoothOffset: 0, 3529 // Callback for scroll end. 3530 scrollEndCallback: function scrollEndCallback(e) {}, 3531 // Headings offset between the headings and the top of the document (this is meant for minor adjustments). 3532 headingsOffset: 1, 3533 // Timeout between events firing to make sure it's 3534 // not too rapid (for performance reasons). 3535 throttleTimeout: 50, 3536 // Element to add the positionFixedClass to. 3537 positionFixedSelector: null, 3538 // Fixed position class to add to make sidebar fixed after scrolling 3539 // down past the fixedSidebarOffset. 3540 positionFixedClass: 'is-position-fixed', 3541 // fixedSidebarOffset can be any number but by default is set 3542 // to auto which sets the fixedSidebarOffset to the sidebar 3543 // element's offsetTop from the top of the document on init. 3544 fixedSidebarOffset: 'auto',
3545 // includeHtml can be set to true to include the HTML markup from the 3546 // heading node instead of just including the textContent. 3547 includeHtml: false, 3548 // onclick function to apply to all links in toc. will be called with 3549 // the event as the first parameter, and this can be used to stop, 3550 // propagation, prevent default or perform action 3551 onClick: function onClick(e) {}, 3552 // orderedList can be set to false to generate unordered lists (ul) 3553 // instead of ordered lists (ol) 3554 orderedList: true, 3555 // If there is a fixed article scroll container, set to calculate titles' offset 3556 scrollContainer: null, 3557 // prevent ToC DOM rendering if it's already rendered by an external system 3558 skipRendering: false, 3559 // Optional callback to change heading labels. 3560 // For example it can be used to cut down and put ellipses on multiline headings you deem too long. 3561 // Called each time a heading is parsed. Expects a string in return, the modified label to display. 3562 // function (string) => string 3563 headingLabelCallback: false, 3564 // ignore headings that are hidden in DOM 3565 ignoreHiddenElements: false, 3566 // Optional callback to modify properties of parsed headings. 3567 // The heading element is passed in node parameter and information parsed by default parser is provided in obj parameter. 3568 // Function has to return the same or modified obj. 3569 // The heading will be excluded from TOC if nothing is returned. 3570 // function (object, HTMLElement) => object | void 3571 headingObjectCallback: null, 3572 // Set the base path, useful if you use a `base` tag in `head`. 3573 basePath: '', 3574 // Only takes affect when `tocSelector` is scrolling, 3575 // keep the toc scroll position in sync with the content. 3576 disableTocScrollSync: false 3577}; 3578 3579/***/ }), 3580 3581/***/ 407: 3582/***/ ((module) => { 3583 3584/** 3585 * This file is responsible for parsing the content from the DOM and making 3586 * sure data is nested properly. 3587 * 3588 * @author Tim Scanlin 3589 */ 3590// ----------------------------------------------------------------------------- 3591// ESLint shimming 3592// ----------------------------------------------------------------------------- 3593 3594/* eslint indent: "off" */ 3595 3596/* eslint no-undef: "off" */ 3597 3598/* eslint semi: "off" */ 3599// ----------------------------------------------------------------------------- 3600module.exports = function parseContent(options) { 3601 var reduce = [].reduce; 3602 /** 3603 * Get the last item in an array and return a reference to it. 3604 * @param {Array} array 3605 * @return {Object} 3606 */ 3607 3608 function getLastItem(array) { 3609 return array[array.length - 1]; 3610 } 3611 /** 3612 * Get heading level for a heading dom node. 3613 * @param {HTMLElement} heading 3614 * @return {Number} 3615 */ 3616 3617 3618 function getHeadingLevel(heading) { 3619 return +heading.nodeName.split('H').join(''); 3620 } 3621 /** 3622 * Get important properties from a heading element and store in a plain object. 3623 * @param {HTMLElement} heading 3624 * @return {Object} 3625 */ 3626 3627 3628 function getHeadingObject(heading) { 3629 // each node is processed twice by this method because nestHeadingsArray() and addNode() calls it 3630 // first time heading is real DOM node element, second time it is obj 3631 // that is causing problem so I am processing only original DOM node 3632 if (!(heading instanceof window.HTMLElement)) return heading; 3633 3634 if (options.ignoreHiddenElements && (!heading.offsetHeight || !heading.offsetParent)) { 3635 return null; 3636 } 3637 3638 var obj = { 3639 id: heading.id, 3640 children: [], 3641 nodeName: heading.nodeName, 3642 headingLevel: getHeadingLevel(heading), 3643 textContent: options.headingLabelCallback ? String(options.headingLabelCallback(heading.textContent)) : heading.textContent.trim() 3644 }; 3645 3646 if (options.includeHtml) { 3647 obj.childNodes = heading.childNodes; 3648 } 3649 3650 if (options.headingObjectCallback) { 3651 return options.headingObjectCallback(obj, heading); 3652 } 3653 3654 return obj; 3655 } 3656 /** 3657 * Add a node to the nested array. 3658 * @param {Object} node 3659 * @param {Array} nest 3660 * @return {Array} 3661 */ 3662 3663 3664 function addNode(node, nest) { 3665 var obj = getHeadingObject(node); 3666 var level = obj.headingLevel; 3667 var array = nest; 3668 var lastItem = getLastItem(array); 3669 var lastItemLevel = lastItem ? lastItem.headingLevel : 0; 3670 var counter = level - lastItemLevel; 3671 3672 while (counter > 0) { 3673 lastItem = getLastItem(array); 3674 3675 if (lastItem && lastItem.children !== undefined) { 3676 array = lastItem.children; 3677 } 3678 3679 counter--; 3680 } 3681 3682 if (level >= options.collapseDepth) { 3683 obj.isCollapsed = true; 3684 } 3685 3686 array.push(obj); 3687 return array; 3688 } 3689 /** 3690 * Select headings in content area, exclude any selector in options.ignoreSelector 3691 * @param {String} contentSelector 3692 * @param {Array} headingSelector 3693 * @return {Array} 3694 */ 3695 3696 3697 function selectHeadings(contentSelector, headingSelector) { 3698 var selectors = headingSelector; 3699 3700 if (options.ignoreSelector) { 3701 selectors = headingSelector.split(',').map(function mapSelectors(selector) { 3702 return selector.trim() + ':not(' + options.ignoreSelector + ')'; 3703 }); 3704 } 3705 3706 try { 3707 return document.querySelector(contentSelector).querySelectorAll(selectors); 3708 } catch (e) { 3709 console.warn('Element not found: ' + contentSelector); // eslint-disable-line 3710 3711 return null; 3712 } 3713 } 3714 /** 3715 * Nest headings array into nested arrays with 'children' property. 3716 * @param {Array} headingsArray 3717 * @return {Object} 3718 */ 3719 3720 3721 function nestHeadingsArray(headingsArray) { 3722 return reduce.call(headingsArray, function reducer(prev, curr) { 3723 var currentHeading = getHeadingObject(curr); 3724 3725 if (currentHeading) { 3726 addNode(currentHeading, prev.nest); 3727 } 3728 3729 return prev; 3730 }, {
3731 nest: [] 3732 }); 3733 } 3734 3735 return { 3736 nestHeadingsArray: nestHeadingsArray, 3737 selectHeadings: selectHeadings 3738 }; 3739}; 3740 3741/***/ }), 3742 3743/***/ 968: 3744/***/ ((__unused_webpack_module, exports) => { 3745 3746/* 3747 # ----------------------------------------------------------------------------- 3748 # ~/js/tocbot/scroll-smooth/index.js 3749 # Scroll-Smooth (Tocbot v4.12.0) implementation for J1 template 3750 # 3751 # Product/Info: 3752 # https://jekyll.one 3753 # https://tscanlin.github.io/tocbot 3754 # https://github.com/tscanlin/tocbot 3755 # 3756 # Copyright (C) 2022 Juergen Adams 3757 # Copyright (C) 2016 Tim Scanlin 3758 # 3759 # J1 Template is licensed under MIT License. 3760 # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE 3761 # Tocbot is licensed under the MIT License. 3762 # For details, https://github.com/tscanlin/tocbot/blob/master/LICENSE 3763 # ----------------------------------------------------------------------------- 3764*/ 3765// ----------------------------------------------------------------------------- 3766// ESLint shimming 3767// ----------------------------------------------------------------------------- 3768 3769/* eslint no-redeclare: "off" */ 3770 3771/* eslint no-undef: "off" */ 3772 3773/* eslint no-empty: "off" */ 3774 3775/* eslint semi: "off" */ 3776// ----------------------------------------------------------------------------- 3777 3778/* globals location, requestAnimationFrame */ 3779exports.initSmoothScrolling = initSmoothScrolling; 3780 3781function initSmoothScrolling(options) { 3782 if (isCssSmoothSCrollSupported()) {} 3783 3784 var duration = options.duration; 3785 var offset = options.offset; 3786 var pageUrl = location.hash ? stripHash(location.href) : location.href; 3787 delegatedLinkHijacking(); 3788 3789 function delegatedLinkHijacking() { 3790 document.body.addEventListener('click', onClick, false); 3791 3792 function onClick(e) { 3793 if (!isInPageLink(e.target) || e.target.className.indexOf('no-smooth-scroll') > -1 || e.target.href.charAt(e.target.href.length - 2) === '#' && e.target.href.charAt(e.target.href.length - 1) === '!' || e.target.className.indexOf(options.linkClass) === -1) { 3794 return; 3795 } // Don't prevent default or hash doesn't change. 3796 // e.preventDefault() 3797 // fixing-skip-to-content-links 3798 // jump(e.target.hash, { 3799 // duration: duration, 3800 // offset: offset, 3801 // callback: function () { 3802 // setFocus(e.target.hash) 3803 // } 3804 // }) 3805 // jadams, 2021-11-13 3806 // fixing-skip-to-content-links, done by callback to focus(), seems 3807 // NOT longer required for current browsers 3808 3809 3810 jump(e.target.hash, { 3811 duration: duration, 3812 offset: offset, 3813 callback: false 3814 }); 3815 } 3816 } 3817 3818 function isInPageLink(n) { 3819 return n.tagName.toLowerCase() === 'a' && (n.hash.length > 0 || n.href.charAt(n.href.length - 1) === '#') && (stripHash(n.href) === pageUrl || stripHash(n.href) + '#' === pageUrl); 3820 } 3821 3822 function stripHash(url) { 3823 return url.slice(0, url.lastIndexOf('#')); 3824 } 3825 3826 function isCssSmoothSCrollSupported() { 3827 return 'scrollBehavior' in document.documentElement.style; 3828 } // Adapted from: 3829 // https://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links/ 3830 3831 3832 function setFocus(hash) { 3833 var element = document.getElementById(hash.substring(1)); 3834 3835 if (element) { 3836 if (!/^(?:a|select|input|button|textarea)$/i.test(element.tagName)) { 3837 element.tabIndex = -1; 3838 } 3839 3840 element.focus(); 3841 } 3842 } 3843} 3844 3845function jump(target, options) { 3846 var start = window.pageYOffset; 3847 var opt = { 3848 duration: options.duration, 3849 offset: options.offset || 0, 3850 callback: options.callback, 3851 easing: options.easing || easeInOutQuad 3852 }; // This makes ids that start with a number work: ('[id="' + decodeURI(target).split('#').join('') + '"]') 3853 // DecodeURI for nonASCII hashes, they was encoded, but id was not encoded, it lead to not finding the tgt element by id. 3854 // And this is for IE: document.body.scrollTop 3855 3856 var tgt = document.querySelector('[id="' + decodeURI(target).split('#').join('') + '"]'); 3857 var distance = typeof target === 'string' ? opt.offset + (target ? tgt && tgt.getBoundingClientRect().top || 0 // handle non-existent links better. 3858 : -(document.documentElement.scrollTop || document.body.scrollTop)) : target; 3859 var duration = typeof opt.duration === 'function' ? opt.duration(distance) : opt.duration; 3860 var timeStart; 3861 var timeElapsed; 3862 requestAnimationFrame(function (time) { 3863 timeStart = time; 3864 loop(time); 3865 }); 3866 3867 function loop(time) { 3868 timeElapsed = time - timeStart; 3869 window.scrollTo(0, opt.easing(timeElapsed, start, distance, duration)); 3870 3871 if (timeElapsed < duration) { 3872 requestAnimationFrame(loop); 3873 } else { 3874 end(); 3875 } 3876 } 3877 3878 function end() { 3879 // window.scrollTo(0, start + distance) 3880 // jadams, 2020-07-04: on (some?) mobile devices, the navbar 3881 // background is NOT switched (always?) correctly on a 3882 // page RELOAD. 3883 // 3884 // Solution: scroll the page one pixel back and forth (trigger) 3885 // to get the right position for the Toccer and adjust the
3886 // Navigator to display the (tranparent) navbar correctly based 3887 // on their onscroll events registered. 3888 // 3889 // $(window).scrollTop($(window).scrollTop()+1); 3890 // $(window).scrollTop($(window).scrollTop()-1); 3891 if (typeof opt.callback === 'function') { 3892 opt.callback(); 3893 } 3894 } // Robert Penner's easeInOutQuad - http://robertpenner.com/easing/ 3895 3896 3897 function easeInOutQuad(t, b, c, d) { 3898 t /= d / 2; 3899 if (t < 1) return c / 2 * t * t + b; 3900 t--; 3901 return -c / 2 * (t * (t - 2) - 1) + b; 3902 } 3903} 3904 3905/***/ }), 3906 3907/***/ 799: 3908/***/ (function(module, exports, __webpack_require__) { 3909 3910var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } 3911 3912/* 3913 # ----------------------------------------------------------------------------- 3914 # ~/js/tocbot/tocbot.js 3915 # Tocbot v4.12.0 implementation for J1 template 3916 # 3917 # Product/Info: 3918 # https://jekyll.one 3919 # https://tscanlin.github.io/tocbot 3920 # https://github.com/tscanlin/tocbot 3921 # 3922 # Copyright (C) 2022 Juergen Adams 3923 # Copyright (C) 2016 Tim Scanlin 3924 # 3925 # J1 Template is licensed under MIT License. 3926 # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE 3927 # Tocbot is licensed under the MIT License. 3928 # For details, https://github.com/tscanlin/tocbot/blob/master/LICENSE 3929 # ----------------------------------------------------------------------------- 3930 # rules: 3931 # "eslint:tocbot": "eslint --ignore-path .eslintignore src/tocbot/js" 3932 # ----------------------------------------------------------------------------- 3933*/ 3934// ----------------------------------------------------------------------------- 3935// ESLint shimming 3936// ----------------------------------------------------------------------------- 3937 3938/* eslint indent: "off" */ 3939 3940/* eslint no-undef: "off" */ 3941 3942/* eslint semi: "off" */ 3943// ----------------------------------------------------------------------------- 3944 3945/** 3946 * Tocbot 3947 * Tocbot creates a toble of contents based on HTML headings on a page, 3948 * this allows users to easily jump to different sections of the document. 3949 * Tocbot was inspired by tocify (http://gregfranko.com/jquery.tocify.js/). 3950 * The main differences are that it works natively without any need for jquery or jquery UI). 3951 * 3952 * @author Tim Scanlin 3953 */ 3954 3955/* globals define */ 3956(function (root, factory) { 3957 if (true) { 3958 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory(root)), 3959 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 3960 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 3961 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 3962 } else {} 3963})(typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : this.window || this.global, function (root) { 3964 'use strict'; // Default options. 3965 3966 var defaultOptions = __webpack_require__(923); // Object to store current options. 3967 3968 3969 var options = {}; // Object for public APIs. 3970 3971 var tocbot = {}; 3972 3973 var BuildHtml = __webpack_require__(525); 3974 3975 var ParseContent = __webpack_require__(407); 3976 3977 var updateTocScroll = __webpack_require__(172); // Keep these variables at top scope once options are passed in. 3978 3979 3980 var buildHtml; 3981 var parseContent; // Just return if its not a browser. 3982 3983 var supports = !!root && !!root.document && !!root.document.querySelector && !!root.addEventListener; // Feature test 3984 3985 if (typeof window === 'undefined' && !supports) { 3986 return; 3987 } 3988 3989 var headingsArray; // From: https://github.com/Raynos/xtend 3990 3991 var hasOwnProperty = Object.prototype.hasOwnProperty; 3992 3993 function extend() { 3994 var target = {}; 3995 3996 for (var i = 0; i < arguments.length; i++) { 3997 var source = arguments[i]; 3998 3999 for (var key in source) { 4000 if (hasOwnProperty.call(source, key)) { 4001 target[key] = source[key]; 4002 } 4003 } 4004 } 4005 4006 return target; 4007 } // From: https://remysharp.com/2010/07/21/throttling-function-calls 4008 4009 4010 function throttle(fn, threshold, scope) { 4011 threshold || (threshold = 250); 4012 var last; 4013 var deferTimer; 4014 return function () { 4015 var context = scope || this; 4016 var now = +new Date(); 4017 var args = arguments; 4018 4019 if (last && now < last + threshold) { 4020 // hold on to it 4021 clearTimeout(deferTimer); 4022 deferTimer = setTimeout(function () { 4023 last = now;
4024 fn.apply(context, args); 4025 }, threshold); 4026 } else { 4027 last = now; 4028 fn.apply(context, args); 4029 } 4030 }; 4031 } 4032 /** 4033 * Destroy tocbot. 4034 */ 4035 4036 4037 tocbot.destroy = function () { 4038 if (!options.skipRendering) { 4039 // Clear HTML. 4040 try { 4041 document.querySelector(options.tocSelector).innerHTML = ''; 4042 } catch (e) { 4043 console.warn('Element not found: ' + options.tocSelector); // eslint-disable-line 4044 } 4045 } // Remove event listeners. 4046 4047 4048 if (options.scrollContainer && document.querySelector(options.scrollContainer)) { 4049 document.querySelector(options.scrollContainer).removeEventListener('scroll', this._scrollListener, false); 4050 document.querySelector(options.scrollContainer).removeEventListener('resize', this._scrollListener, false); 4051 4052 if (buildHtml) { 4053 document.querySelector(options.scrollContainer).removeEventListener('click', this._clickListener, false); 4054 } 4055 } else { 4056 document.removeEventListener('scroll', this._scrollListener, false); 4057 document.removeEventListener('resize', this._scrollListener, false); 4058 4059 if (buildHtml) { 4060 document.removeEventListener('click', this._clickListener, false); 4061 } 4062 } 4063 }; 4064 /** 4065 * Initialize tocbot. 4066 * @param {object} customOptions 4067 */ 4068 4069 4070 tocbot.init = function (customOptions) { 4071 // feature test 4072 if (!supports) { 4073 return; 4074 } // Merge defaults with user options. 4075 // Set to options variable at the top. 4076 4077 4078 options = extend(defaultOptions, customOptions || {}); 4079 this.options = options; 4080 this.state = {}; // Init smooth scroll if enabled (default). 4081 4082 if (options.scrollSmooth) { 4083 options.duration = options.scrollSmoothDuration; 4084 options.offset = options.scrollSmoothOffset; 4085 tocbot.scrollSmooth = (__webpack_require__(968).initSmoothScrolling)(options); 4086 } // Pass options to these modules. 4087 4088 4089 buildHtml = BuildHtml(options); 4090 parseContent = ParseContent(options); // For testing purposes. 4091 4092 this._buildHtml = buildHtml; 4093 this._parseContent = parseContent; // Destroy it if it exists first. 4094 4095 tocbot.destroy(); // Get headings array. 4096 4097 headingsArray = parseContent.selectHeadings(options.contentSelector, options.headingSelector); // Return if no headings are found. 4098 4099 if (headingsArray === null) { 4100 return; 4101 } // Build nested headings array. 4102 4103 4104 var nestedHeadingsObj = parseContent.nestHeadingsArray(headingsArray); 4105 var nestedHeadings = nestedHeadingsObj.nest; // Render. 4106 4107 if (!options.skipRendering) { 4108 buildHtml.render(options.tocSelector, nestedHeadings); 4109 } // Update Sidebar and bind listeners. 4110 4111 4112 this._scrollListener = throttle(function (e) { 4113 buildHtml.updateToc(headingsArray); 4114 !options.disableTocScrollSync && updateTocScroll(options); 4115 var isTop = e && e.target && e.target.scrollingElement && e.target.scrollingElement.scrollTop === 0; 4116 4117 if (e && (e.eventPhase === 0 || e.currentTarget === null) || isTop) { 4118 buildHtml.updateToc(headingsArray); 4119 4120 if (options.scrollEndCallback) { 4121 options.scrollEndCallback(e); 4122 } 4123 } 4124 }, options.throttleTimeout); 4125 4126 this._scrollListener(); 4127 4128 if (options.scrollContainer && document.querySelector(options.scrollContainer)) { 4129 document.querySelector(options.scrollContainer).addEventListener('scroll', this._scrollListener, false); 4130 document.querySelector(options.scrollContainer).addEventListener('resize', this._scrollListener, false); 4131 } else { 4132 document.addEventListener('scroll', this._scrollListener, false); 4133 document.addEventListener('resize', this._scrollListener, false); 4134 } // Bind click listeners to disable animation. 4135 4136 4137 var timeout = null; 4138 this._clickListener = throttle(function (event) { 4139 if (options.scrollSmooth) { 4140 buildHtml.disableTocAnimation(event); 4141 } 4142 4143 buildHtml.updateToc(headingsArray); // Timeout to re-enable the animation. 4144 4145 timeout && clearTimeout(timeout); 4146 timeout = setTimeout(function () { 4147 buildHtml.enableTocAnimation(); 4148 }, options.scrollSmoothDuration); 4149 }, options.throttleTimeout); 4150 4151 if (options.scrollContainer && document.querySelector(options.scrollContainer)) { 4152 document.querySelector(options.scrollContainer).addEventListener('click', this._clickListener, false); 4153 } else { 4154 document.addEventListener('click', this._clickListener, false); 4155 } 4156 4157 return this; 4158 }; 4159 /** 4160 * Refresh tocbot. 4161 */ 4162 4163 4164 tocbot.refresh = function (customOptions) { 4165 tocbot.destroy(); 4166 tocbot.init(customOptions || this.options); 4167 }; // Make tocbot available globally. 4168 4169 4170 root.tocbot = tocbot; 4171 return tocbot; 4172}); 4173 4174/***/ }), 4175 4176/***/ 172: 4177/***/ ((module) => { 4178 4179// ----------------------------------------------------------------------------- 4180// ESLint shimming 4181// ----------------------------------------------------------------------------- 4182 4183/* eslint indent: "off" */ 4184 4185/* eslint no-undef: "off" */ 4186 4187/* eslint semi: "off" */ 4188// ----------------------------------------------------------------------------- 4189module.exports = function updateTocScroll(options) { 4190 var toc = document.querySelector(options.tocSelector); 4191 4192 if (toc && toc.scrollHeight > toc.clientHeight) { 4193 var activeItem = toc.querySelector('.' + options.activeListItemClass); 4194 4195 if (activeItem) { 4196 toc.scrollTop = activeItem.offsetTop; 4197 } 4198 } 4199}; 4200 4201/***/ }), 4202 4203/***/ 808: 4204/***/ ((module, exports, __webpack_require__) => { 4205 4206var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 4207 * JavaScript Cookie v2.2.1 4208 * https://github.com/js-cookie/js-cookie 4209 * 4210 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack 4211 * Released under the MIT license 4212 */ 4213;(function (factory) { 4214 var registeredInModuleLoader; 4215 if (true) { 4216 !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), 4217 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 4218 (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : 4219 __WEBPACK_AMD_DEFINE_FACTORY__),
vendor: 5,471 bytes, lines 4220-4432
4220 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 4221 registeredInModuleLoader = true; 4222 } 4223 if (true) { 4224 module.exports = factory(); 4225 registeredInModuleLoader = true; 4226 } 4227 if (!registeredInModuleLoader) { 4228 var OldCookies = window.Cookies; 4229 var api = window.Cookies = factory(); 4230 api.noConflict = function () { 4231 window.Cookies = OldCookies; 4232 return api; 4233 }; 4234 } 4235}(function () { 4236 function extend () { 4237 var i = 0; 4238 var result = {}; 4239 for (; i < arguments.length; i++) { 4240 var attributes = arguments[ i ]; 4241 for (var key in attributes) { 4242 result[key] = attributes[key]; 4243 } 4244 } 4245 return result; 4246 } 4247 4248 function decode (s) { 4249 return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent); 4250 } 4251 4252 function init (converter) { 4253 function api() {} 4254 4255 function set (key, value, attributes) { 4256 if (typeof document === 'undefined') { 4257 return; 4258 } 4259 4260 attributes = extend({ 4261 path: '/' 4262 }, api.defaults, attributes); 4263 4264 if (typeof attributes.expires === 'number') { 4265 attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5); 4266 } 4267 4268 // We're using "expires" because "max-age" is not supported by IE 4269 attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''; 4270 4271 try { 4272 var result = JSON.stringify(value); 4273 if (/^[\{\[]/.test(result)) { 4274 value = result; 4275 } 4276 } catch (e) {} 4277 4278 value = converter.write ? 4279 converter.write(value, key) : 4280 encodeURIComponent(String(value)) 4281 .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); 4282 4283 key = encodeURIComponent(String(key)) 4284 .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent) 4285 .replace(/[\(\)]/g, escape); 4286 4287 var stringifiedAttributes = ''; 4288 for (var attributeName in attributes) { 4289 if (!attributes[attributeName]) { 4290 continue; 4291 } 4292 stringifiedAttributes += '; ' + attributeName; 4293 if (attributes[attributeName] === true) { 4294 continue; 4295 } 4296 4297 // Considers RFC 6265 section 5.2: 4298 // ... 4299 // 3. If the remaining unparsed-attributes contains a %x3B (";") 4300 // character: 4301 // Consume the characters of the unparsed-attributes up to, 4302 // not including, the first %x3B (";") character. 4303 // ... 4304 stringifiedAttributes += '=' + attributes[attributeName].split(';')[0]; 4305 } 4306 4307 return (document.cookie = key + '=' + value + stringifiedAttributes); 4308 } 4309 4310 function get (key, json) { 4311 if (typeof document === 'undefined') { 4312 return; 4313 } 4314 4315 var jar = {}; 4316 // To prevent the for loop in the first place assign an empty array 4317 // in case there are no cookies at all. 4318 var cookies = document.cookie ? document.cookie.split('; ') : []; 4319 var i = 0; 4320 4321 for (; i < cookies.length; i++) { 4322 var parts = cookies[i].split('='); 4323 var cookie = parts.slice(1).join('='); 4324 4325 if (!json && cookie.charAt(0) === '"') { 4326 cookie = cookie.slice(1, -1); 4327 } 4328 4329 try { 4330 var name = decode(parts[0]); 4331 cookie = (converter.read || converter)(cookie, name) || 4332 decode(cookie); 4333 4334 if (json) { 4335 try { 4336 cookie = JSON.parse(cookie); 4337 } catch (e) {} 4338 } 4339 4340 jar[name] = cookie; 4341 4342 if (key === name) { 4343 break; 4344 } 4345 } catch (e) {} 4346 } 4347 4348 return key ? jar[key] : jar; 4349 } 4350 4351 api.set = set; 4352 api.get = function (key) { 4353 return get(key, false /* read as raw */); 4354 }; 4355 api.getJSON = function (key) { 4356 return get(key, true /* read as json */); 4357 }; 4358 api.remove = function (key, attributes) { 4359 set(key, '', extend(attributes, { 4360 expires: -1 4361 })); 4362 }; 4363 4364 api.defaults = {}; 4365 4366 api.withConverter = init; 4367 4368 return api; 4369 } 4370 4371 return init(function () {}); 4372})); 4373 4374 4375/***/ }), 4376 4377/***/ 320: 4378/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 4379 4380"use strict"; 4381 4382 4383 4384var loader = __webpack_require__(990); 4385var dumper = __webpack_require__(150); 4386 4387 4388function renamed(from, to) { 4389 return function () { 4390 throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + 4391 'Use yaml.' + to + ' instead, which is now safe by default.'); 4392 }; 4393} 4394 4395 4396module.exports.Type = __webpack_require__(364); 4397module.exports.Schema = __webpack_require__(657); 4398module.exports.FAILSAFE_SCHEMA = __webpack_require__(795); 4399module.exports.JSON_SCHEMA = __webpack_require__(966); 4400module.exports.CORE_SCHEMA = __webpack_require__(471); 4401module.exports.DEFAULT_SCHEMA = __webpack_require__(601); 4402module.exports.load = loader.load; 4403module.exports.loadAll = loader.loadAll; 4404module.exports.dump = dumper.dump; 4405module.exports.YAMLException = __webpack_require__(425); 4406 4407// Re-export all types in case user wants to create custom schema 4408module.exports.types = { 4409 binary: __webpack_require__(531), 4410 float: __webpack_require__(215), 4411 map: __webpack_require__(945), 4412 null: __webpack_require__(151), 4413 pairs: __webpack_require__(879), 4414 set: __webpack_require__(982), 4415 timestamp: __webpack_require__(156), 4416 bool: __webpack_require__(771), 4417 int: __webpack_require__(518), 4418 merge: __webpack_require__(452), 4419 omap: __webpack_require__(605), 4420 seq: __webpack_require__(451), 4421 str: __webpack_require__(48) 4422}; 4423 4424// Removed functions from JS-YAML 3.0.x 4425module.exports.safeLoad = renamed('safeLoad', 'load'); 4426module.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll'); 4427module.exports.safeDump = renamed('safeDump', 'dump'); 4428 4429 4430/***/ }), 4431 4432/***/ 347:
4433/***/ ((module) => { 4434 4435"use strict"; 4436 4437 4438 4439function isNothing(subject) { 4440 return (typeof subject === 'undefined') || (subject === null); 4441} 4442 4443 4444function isObject(subject) { 4445 return (typeof subject === 'object') && (subject !== null); 4446} 4447 4448 4449function toArray(sequence) { 4450 if (Array.isArray(sequence)) return sequence; 4451 else if (isNothing(sequence)) return []; 4452 4453 return [ sequence ]; 4454} 4455 4456 4457function extend(target, source) { 4458 var index, length, key, sourceKeys; 4459 4460 if (source) { 4461 sourceKeys = Object.keys(source); 4462 4463 for (index = 0, length = sourceKeys.length; index < length; index += 1) { 4464 key = sourceKeys[index]; 4465 target[key] = source[key]; 4466 } 4467 } 4468 4469 return target; 4470} 4471 4472 4473function repeat(string, count) { 4474 var result = '', cycle; 4475 4476 for (cycle = 0; cycle < count; cycle += 1) { 4477 result += string; 4478 } 4479 4480 return result; 4481} 4482 4483 4484function isNegativeZero(number) { 4485 return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); 4486} 4487 4488 4489module.exports.isNothing = isNothing; 4490module.exports.isObject = isObject; 4491module.exports.toArray = toArray; 4492module.exports.repeat = repeat; 4493module.exports.isNegativeZero = isNegativeZero; 4494module.exports.extend = extend; 4495 4496 4497/***/ }), 4498 4499/***/ 150: 4500/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 4501 4502"use strict"; 4503 4504 4505/*eslint-disable no-use-before-define*/ 4506 4507var common = __webpack_require__(347); 4508var YAMLException = __webpack_require__(425); 4509var DEFAULT_SCHEMA = __webpack_require__(601); 4510 4511var _toString = Object.prototype.toString; 4512var _hasOwnProperty = Object.prototype.hasOwnProperty; 4513 4514var CHAR_BOM = 0xFEFF; 4515var CHAR_TAB = 0x09; /* Tab */ 4516var CHAR_LINE_FEED = 0x0A; /* LF */ 4517var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ 4518var CHAR_SPACE = 0x20; /* Space */ 4519var CHAR_EXCLAMATION = 0x21; /* ! */ 4520var CHAR_DOUBLE_QUOTE = 0x22; /* " */ 4521var CHAR_SHARP = 0x23; /* # */ 4522var CHAR_PERCENT = 0x25; /* % */ 4523var CHAR_AMPERSAND = 0x26; /* & */ 4524var CHAR_SINGLE_QUOTE = 0x27; /* ' */ 4525var CHAR_ASTERISK = 0x2A; /* * */ 4526var CHAR_COMMA = 0x2C; /* , */ 4527var CHAR_MINUS = 0x2D; /* - */ 4528var CHAR_COLON = 0x3A; /* : */ 4529var CHAR_EQUALS = 0x3D; /* = */ 4530var CHAR_GREATER_THAN = 0x3E; /* > */ 4531var CHAR_QUESTION = 0x3F; /* ? */ 4532var CHAR_COMMERCIAL_AT = 0x40; /* @ */ 4533var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ 4534var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ 4535var CHAR_GRAVE_ACCENT = 0x60; /* ` */ 4536var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ 4537var CHAR_VERTICAL_LINE = 0x7C; /* | */ 4538var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ 4539 4540var ESCAPE_SEQUENCES = {}; 4541 4542ESCAPE_SEQUENCES[0x00] = '\\0'; 4543ESCAPE_SEQUENCES[0x07] = '\\a'; 4544ESCAPE_SEQUENCES[0x08] = '\\b'; 4545ESCAPE_SEQUENCES[0x09] = '\\t'; 4546ESCAPE_SEQUENCES[0x0A] = '\\n'; 4547ESCAPE_SEQUENCES[0x0B] = '\\v'; 4548ESCAPE_SEQUENCES[0x0C] = '\\f'; 4549ESCAPE_SEQUENCES[0x0D] = '\\r'; 4550ESCAPE_SEQUENCES[0x1B] = '\\e'; 4551ESCAPE_SEQUENCES[0x22] = '\\"'; 4552ESCAPE_SEQUENCES[0x5C] = '\\\\'; 4553ESCAPE_SEQUENCES[0x85] = '\\N'; 4554ESCAPE_SEQUENCES[0xA0] = '\\_'; 4555ESCAPE_SEQUENCES[0x2028] = '\\L'; 4556ESCAPE_SEQUENCES[0x2029] = '\\P'; 4557 4558var DEPRECATED_BOOLEANS_SYNTAX = [ 4559 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', 4560 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' 4561]; 4562 4563var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; 4564 4565function compileStyleMap(schema, map) { 4566 var result, keys, index, length, tag, style, type; 4567 4568 if (map === null) return {}; 4569 4570 result = {}; 4571 keys = Object.keys(map); 4572 4573 for (index = 0, length = keys.length; index < length; index += 1) { 4574 tag = keys[index]; 4575 style = String(map[tag]); 4576 4577 if (tag.slice(0, 2) === '!!') { 4578 tag = 'tag:yaml.org,2002:' + tag.slice(2); 4579 } 4580 type = schema.compiledTypeMap['fallback'][tag]; 4581 4582 if (type && _hasOwnProperty.call(type.styleAliases, style)) { 4583 style = type.styleAliases[style]; 4584 } 4585 4586 result[tag] = style; 4587 } 4588 4589 return result; 4590} 4591 4592function encodeHex(character) { 4593 var string, handle, length; 4594 4595 string = character.toString(16).toUpperCase(); 4596 4597 if (character <= 0xFF) { 4598 handle = 'x'; 4599 length = 2; 4600 } else if (character <= 0xFFFF) { 4601 handle = 'u'; 4602 length = 4; 4603 } else if (character <= 0xFFFFFFFF) { 4604 handle = 'U'; 4605 length = 8; 4606 } else { 4607 throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); 4608 } 4609 4610 return '\\' + handle + common.repeat('0', length - string.length) + string; 4611} 4612 4613 4614var QUOTING_TYPE_SINGLE = 1, 4615 QUOTING_TYPE_DOUBLE = 2; 4616 4617function State(options) { 4618 this.schema = options['schema'] || DEFAULT_SCHEMA; 4619 this.indent = Math.max(1, (options['indent'] || 2)); 4620 this.noArrayIndent = options['noArrayIndent'] || false; 4621 this.skipInvalid = options['skipInvalid'] || false; 4622 this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); 4623 this.styleMap = compileStyleMap(this.schema, options['styles'] || null);
4624 this.sortKeys = options['sortKeys'] || false; 4625 this.lineWidth = options['lineWidth'] || 80; 4626 this.noRefs = options['noRefs'] || false; 4627 this.noCompatMode = options['noCompatMode'] || false; 4628 this.condenseFlow = options['condenseFlow'] || false; 4629 this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; 4630 this.forceQuotes = options['forceQuotes'] || false; 4631 this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; 4632 4633 this.implicitTypes = this.schema.compiledImplicit; 4634 this.explicitTypes = this.schema.compiledExplicit; 4635 4636 this.tag = null; 4637 this.result = ''; 4638 4639 this.duplicates = []; 4640 this.usedDuplicates = null; 4641} 4642 4643// Indents every line in a string. Empty lines (\n only) are not indented. 4644function indentString(string, spaces) { 4645 var ind = common.repeat(' ', spaces), 4646 position = 0, 4647 next = -1, 4648 result = '', 4649 line, 4650 length = string.length; 4651 4652 while (position < length) { 4653 next = string.indexOf('\n', position); 4654 if (next === -1) { 4655 line = string.slice(position); 4656 position = length; 4657 } else { 4658 line = string.slice(position, next + 1); 4659 position = next + 1; 4660 } 4661 4662 if (line.length && line !== '\n') result += ind; 4663 4664 result += line; 4665 } 4666 4667 return result; 4668} 4669 4670function generateNextLine(state, level) { 4671 return '\n' + common.repeat(' ', state.indent * level); 4672} 4673 4674function testImplicitResolving(state, str) { 4675 var index, length, type; 4676 4677 for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { 4678 type = state.implicitTypes[index]; 4679 4680 if (type.resolve(str)) { 4681 return true; 4682 } 4683 } 4684 4685 return false; 4686} 4687 4688// [33] s-white ::= s-space | s-tab 4689function isWhitespace(c) { 4690 return c === CHAR_SPACE || c === CHAR_TAB; 4691} 4692 4693// Returns true if the character can be printed without escaping. 4694// From YAML 1.2: "any allowed characters known to be non-printable 4695// should also be escaped. [However,] This isnât mandatory" 4696// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. 4697function isPrintable(c) { 4698 return (0x00020 <= c && c <= 0x00007E) 4699 || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) 4700 || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) 4701 || (0x10000 <= c && c <= 0x10FFFF); 4702} 4703 4704// [34] ns-char ::= nb-char - s-white 4705// [27] nb-char ::= c-printable - b-char - c-byte-order-mark 4706// [26] b-char ::= b-line-feed | b-carriage-return 4707// Including s-white (for some reason, examples doesn't match specs in this aspect) 4708// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark 4709function isNsCharOrWhitespace(c) { 4710 return isPrintable(c) 4711 && c !== CHAR_BOM 4712 // - b-char 4713 && c !== CHAR_CARRIAGE_RETURN 4714 && c !== CHAR_LINE_FEED; 4715} 4716 4717// [127] ns-plain-safe(c) ::= c = flow-out â ns-plain-safe-out 4718// c = flow-in â ns-plain-safe-in 4719// c = block-key â ns-plain-safe-out 4720// c = flow-key â ns-plain-safe-in 4721// [128] ns-plain-safe-out ::= ns-char 4722// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator 4723// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - â:â - â#â ) 4724// | ( /* An ns-char preceding */ â#â ) 4725// | ( â:â /* Followed by an ns-plain-safe(c) */ ) 4726function isPlainSafe(c, prev, inblock) { 4727 var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); 4728 var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); 4729 return ( 4730 // ns-plain-safe 4731 inblock ? // c = flow-in 4732 cIsNsCharOrWhitespace 4733 : cIsNsCharOrWhitespace 4734 // - c-flow-indicator 4735 && c !== CHAR_COMMA 4736 && c !== CHAR_LEFT_SQUARE_BRACKET 4737 && c !== CHAR_RIGHT_SQUARE_BRACKET 4738 && c !== CHAR_LEFT_CURLY_BRACKET 4739 && c !== CHAR_RIGHT_CURLY_BRACKET 4740 ) 4741 // ns-plain-char 4742 && c !== CHAR_SHARP // false on '#' 4743 && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' 4744 || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' 4745 || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' 4746} 4747 4748// Simplified test for values allowed as the first character in plain style. 4749function isPlainSafeFirst(c) { 4750 // Uses a subset of ns-char - c-indicator 4751 // where ns-char = nb-char - s-white. 4752 // No support of ( ( â?â | â:â | â-â ) /* Followed by an ns-plain-safe(c)) */ ) part 4753 return isPrintable(c) && c !== CHAR_BOM 4754 && !isWhitespace(c) // - s-white 4755 // - (c-indicator ::= 4756 // â-â | â?â | â:â | â,â | â[â | â]â | â{â | â}â 4757 && c !== CHAR_MINUS 4758 && c !== CHAR_QUESTION 4759 && c !== CHAR_COLON 4760 && c !== CHAR_COMMA 4761 && c !== CHAR_LEFT_SQUARE_BRACKET 4762 && c !== CHAR_RIGHT_SQUARE_BRACKET 4763 && c !== CHAR_LEFT_CURLY_BRACKET 4764 && c !== CHAR_RIGHT_CURLY_BRACKET 4765 // | â#â | â&â | â*â | â!â | â|â | â=â | â>â | â'â | â"â 4766 && c !== CHAR_SHARP 4767 && c !== CHAR_AMPERSAND 4768 && c !== CHAR_ASTERISK 4769 && c !== CHAR_EXCLAMATION 4770 && c !== CHAR_VERTICAL_LINE 4771 && c !== CHAR_EQUALS 4772 && c !== CHAR_GREATER_THAN 4773 && c !== CHAR_SINGLE_QUOTE 4774 && c !== CHAR_DOUBLE_QUOTE 4775 // | â%â | â@â | â`â) 4776 && c !== CHAR_PERCENT 4777 && c !== CHAR_COMMERCIAL_AT 4778 && c !== CHAR_GRAVE_ACCENT; 4779} 4780 4781// Simplified test for values allowed as the last character in plain style. 4782function isPlainSafeLast(c) { 4783 // just not whitespace or colon, it will be checked to be plain character later 4784 return !isWhitespace(c) && c !== CHAR_COLON; 4785} 4786 4787// Same as 'string'.codePointAt(pos), but works in older browsers. 4788function codePointAt(string, pos) { 4789 var first = string.charCodeAt(pos), second; 4790 if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { 4791 second = string.charCodeAt(pos + 1); 4792 if (second >= 0xDC00 && second <= 0xDFFF) { 4793 // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae 4794 return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; 4795 } 4796 } 4797 return first; 4798} 4799 4800// Determines whether block indentation indicator is required. 4801function needIndentIndicator(string) { 4802 var leadingSpaceRe = /^\n* /; 4803 return leadingSpaceRe.test(string); 4804} 4805 4806var STYLE_PLAIN = 1, 4807 STYLE_SINGLE = 2, 4808 STYLE_LITERAL = 3, 4809 STYLE_FOLDED = 4, 4810 STYLE_DOUBLE = 5; 4811 4812// Determines which scalar styles are possible and returns the preferred style.
4813// lineWidth = -1 => no limit. 4814// Pre-conditions: str.length > 0. 4815// Post-conditions: 4816// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. 4817// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). 4818// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). 4819function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, 4820 testAmbiguousType, quotingType, forceQuotes, inblock) { 4821 4822 var i; 4823 var char = 0; 4824 var prevChar = null; 4825 var hasLineBreak = false; 4826 var hasFoldableLine = false; // only checked if shouldTrackWidth 4827 var shouldTrackWidth = lineWidth !== -1; 4828 var previousLineBreak = -1; // count the first line correctly 4829 var plain = isPlainSafeFirst(codePointAt(string, 0)) 4830 && isPlainSafeLast(codePointAt(string, string.length - 1)); 4831 4832 if (singleLineOnly || forceQuotes) { 4833 // Case: no block styles. 4834 // Check for disallowed characters to rule out plain and single. 4835 for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { 4836 char = codePointAt(string, i); 4837 if (!isPrintable(char)) { 4838 return STYLE_DOUBLE; 4839 } 4840 plain = plain && isPlainSafe(char, prevChar, inblock); 4841 prevChar = char; 4842 } 4843 } else { 4844 // Case: block styles permitted. 4845 for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { 4846 char = codePointAt(string, i); 4847 if (char === CHAR_LINE_FEED) { 4848 hasLineBreak = true; 4849 // Check if any line can be folded. 4850 if (shouldTrackWidth) { 4851 hasFoldableLine = hasFoldableLine || 4852 // Foldable line = too long, and not more-indented. 4853 (i - previousLineBreak - 1 > lineWidth && 4854 string[previousLineBreak + 1] !== ' '); 4855 previousLineBreak = i; 4856 } 4857 } else if (!isPrintable(char)) { 4858 return STYLE_DOUBLE; 4859 } 4860 plain = plain && isPlainSafe(char, prevChar, inblock); 4861 prevChar = char; 4862 } 4863 // in case the end is missing a \n 4864 hasFoldableLine = hasFoldableLine || (shouldTrackWidth && 4865 (i - previousLineBreak - 1 > lineWidth && 4866 string[previousLineBreak + 1] !== ' ')); 4867 } 4868 // Although every style can represent \n without escaping, prefer block styles 4869 // for multiline, since they're more readable and they don't add empty lines. 4870 // Also prefer folding a super-long line. 4871 if (!hasLineBreak && !hasFoldableLine) { 4872 // Strings interpretable as another type have to be quoted; 4873 // e.g. the string 'true' vs. the boolean true. 4874 if (plain && !forceQuotes && !testAmbiguousType(string)) { 4875 return STYLE_PLAIN; 4876 } 4877 return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; 4878 } 4879 // Edge case: block indentation indicator can only have one digit. 4880 if (indentPerLevel > 9 && needIndentIndicator(string)) { 4881 return STYLE_DOUBLE; 4882 } 4883 // At this point we know block styles are valid. 4884 // Prefer literal style unless we want to fold. 4885 if (!forceQuotes) { 4886 return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; 4887 } 4888 return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; 4889} 4890 4891// Note: line breaking/folding is implemented for only the folded style. 4892// NB. We drop the last trailing newline (if any) of a returned block scalar 4893// since the dumper adds its own newline. This always works: 4894// ⢠No ending newline => unaffected; already using strip "-" chomping. 4895// ⢠Ending newline => removed then restored. 4896// Importantly, this keeps the "+" chomp indicator from gaining an extra line. 4897function writeScalar(state, string, level, iskey, inblock) { 4898 state.dump = (function () { 4899 if (string.length === 0) { 4900 return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; 4901 } 4902 if (!state.noCompatMode) { 4903 if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { 4904 return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); 4905 } 4906 } 4907 4908 var indent = state.indent * Math.max(1, level); // no 0-indent scalars 4909 // As indentation gets deeper, let the width decrease monotonically 4910 // to the lower bound min(state.lineWidth, 40). 4911 // Note that this implies 4912 // state.lineWidth ⤠40 + state.indent: width is fixed at the lower bound. 4913 // state.lineWidth > 40 + state.indent: width decreases until the lower bound. 4914 // This behaves better than a constant minimum width which disallows narrower options, 4915 // or an indent threshold which causes the width to suddenly increase. 4916 var lineWidth = state.lineWidth === -1 4917 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); 4918 4919 // Without knowing if keys are implicit/explicit, assume implicit for safety. 4920 var singleLineOnly = iskey 4921 // No block styles in flow mode. 4922 || (state.flowLevel > -1 && level >= state.flowLevel); 4923 function testAmbiguity(string) { 4924 return testImplicitResolving(state, string); 4925 } 4926 4927 switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, 4928 testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { 4929 4930 case STYLE_PLAIN: 4931 return string; 4932 case STYLE_SINGLE: 4933 return "'" + string.replace(/'/g, "''") + "'"; 4934 case STYLE_LITERAL: 4935 return '|' + blockHeader(string, state.indent)
4936 + dropEndingNewline(indentString(string, indent)); 4937 case STYLE_FOLDED: 4938 return '>' + blockHeader(string, state.indent) 4939 + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); 4940 case STYLE_DOUBLE: 4941 return '"' + escapeString(string, lineWidth) + '"'; 4942 default: 4943 throw new YAMLException('impossible error: invalid scalar style'); 4944 } 4945 }()); 4946} 4947 4948// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. 4949function blockHeader(string, indentPerLevel) { 4950 var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; 4951 4952 // note the special case: the string '\n' counts as a "trailing" empty line. 4953 var clip = string[string.length - 1] === '\n'; 4954 var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); 4955 var chomp = keep ? '+' : (clip ? '' : '-'); 4956 4957 return indentIndicator + chomp + '\n'; 4958} 4959 4960// (See the note for writeScalar.) 4961function dropEndingNewline(string) { 4962 return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; 4963} 4964 4965// Note: a long line without a suitable break point will exceed the width limit. 4966// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. 4967function foldString(string, width) { 4968 // In folded style, $k$ consecutive newlines output as $k+1$ newlinesâ 4969 // unless they're before or after a more-indented line, or at the very 4970 // beginning or end, in which case $k$ maps to $k$. 4971 // Therefore, parse each chunk as newline(s) followed by a content line. 4972 var lineRe = /(\n+)([^\n]*)/g; 4973 4974 // first line (possibly an empty line) 4975 var result = (function () { 4976 var nextLF = string.indexOf('\n'); 4977 nextLF = nextLF !== -1 ? nextLF : string.length; 4978 lineRe.lastIndex = nextLF; 4979 return foldLine(string.slice(0, nextLF), width); 4980 }()); 4981 // If we haven't reached the first content line yet, don't add an extra \n. 4982 var prevMoreIndented = string[0] === '\n' || string[0] === ' '; 4983 var moreIndented; 4984 4985 // rest of the lines 4986 var match; 4987 while ((match = lineRe.exec(string))) { 4988 var prefix = match[1], line = match[2]; 4989 moreIndented = (line[0] === ' '); 4990 result += prefix 4991 + (!prevMoreIndented && !moreIndented && line !== '' 4992 ? '\n' : '') 4993 + foldLine(line, width); 4994 prevMoreIndented = moreIndented; 4995 } 4996 4997 return result; 4998} 4999 5000// Greedy line breaking. 5001// Picks the longest line under the limit each time, 5002// otherwise settles for the shortest line over the limit. 5003// NB. More-indented lines *cannot* be folded, as that would add an extra \n. 5004function foldLine(line, width) { 5005 if (line === '' || line[0] === ' ') return line; 5006 5007 // Since a more-indented line adds a \n, breaks can't be followed by a space. 5008 var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. 5009 var match; 5010 // start is an inclusive index. end, curr, and next are exclusive. 5011 var start = 0, end, curr = 0, next = 0; 5012 var result = ''; 5013 5014 // Invariants: 0 <= start <= length-1. 5015 // 0 <= curr <= next <= max(0, length-2). curr - start <= width. 5016 // Inside the loop: 5017 // A match implies length >= 2, so curr and next are <= length-2. 5018 while ((match = breakRe.exec(line))) { 5019 next = match.index; 5020 // maintain invariant: curr - start <= width 5021 if (next - start > width) { 5022 end = (curr > start) ? curr : next; // derive end <= length-2 5023 result += '\n' + line.slice(start, end); 5024 // skip the space that was output as \n 5025 start = end + 1; // derive start <= length-1 5026 } 5027 curr = next; 5028 } 5029 5030 // By the invariants, start <= length-1, so there is something left over. 5031 // It is either the whole string or a part starting from non-whitespace. 5032 result += '\n'; 5033 // Insert a break if the remainder is too long and there is a break available. 5034 if (line.length - start > width && curr > start) { 5035 result += line.slice(start, curr) + '\n' + line.slice(curr + 1); 5036 } else { 5037 result += line.slice(start); 5038 } 5039 5040 return result.slice(1); // drop extra \n joiner 5041} 5042 5043// Escapes a double-quoted string. 5044function escapeString(string) { 5045 var result = ''; 5046 var char = 0; 5047 var escapeSeq; 5048 5049 for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { 5050 char = codePointAt(string, i); 5051 escapeSeq = ESCAPE_SEQUENCES[char]; 5052 5053 if (!escapeSeq && isPrintable(char)) { 5054 result += string[i]; 5055 if (char >= 0x10000) result += string[i + 1]; 5056 } else { 5057 result += escapeSeq || encodeHex(char); 5058 } 5059 } 5060 5061 return result; 5062} 5063 5064function writeFlowSequence(state, level, object) { 5065 var _result = '', 5066 _tag = state.tag, 5067 index, 5068 length, 5069 value; 5070 5071 for (index = 0, length = object.length; index < length; index += 1) { 5072 value = object[index]; 5073 5074 if (state.replacer) { 5075 value = state.replacer.call(object, String(index), value); 5076 } 5077 5078 // Write only valid elements, put null instead of invalid elements. 5079 if (writeNode(state, level, value, false, false) || 5080 (typeof value === 'undefined' && 5081 writeNode(state, level, null, false, false))) { 5082 5083 if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); 5084 _result += state.dump; 5085 } 5086 } 5087 5088 state.tag = _tag; 5089 state.dump = '[' + _result + ']'; 5090} 5091 5092function writeBlockSequence(state, level, object, compact) { 5093 var _result = '', 5094 _tag = state.tag, 5095 index, 5096 length, 5097 value; 5098 5099 for (index = 0, length = object.length; index < length; index += 1) { 5100 value = object[index]; 5101 5102 if (state.replacer) { 5103 value = state.replacer.call(object, String(index), value); 5104 } 5105 5106 // Write only valid elements, put null instead of invalid elements. 5107 if (writeNode(state, level + 1, value, true, true, false, true) || 5108 (typeof value === 'undefined' && 5109 writeNode(state, level + 1, null, true, true, false, true))) { 5110 5111 if (!compact || _result !== '') { 5112 _result += generateNextLine(state, level); 5113 } 5114 5115 if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { 5116 _result += '-'; 5117 } else { 5118 _result += '- '; 5119 } 5120 5121 _result += state.dump; 5122 } 5123 } 5124 5125 state.tag = _tag; 5126 state.dump = _result || '[]'; // Empty sequence if no valid values. 5127} 5128 5129function writeFlowMapping(state, level, object) { 5130 var _result = '', 5131 _tag = state.tag, 5132 objectKeyList = Object.keys(object), 5133 index, 5134 length, 5135 objectKey, 5136 objectValue, 5137 pairBuffer; 5138 5139 for (index = 0, length = objectKeyList.length; index < length; index += 1) { 5140 5141 pairBuffer = ''; 5142 if (_result !== '') pairBuffer += ', '; 5143 5144 if (state.condenseFlow) pairBuffer += '"'; 5145 5146 objectKey = objectKeyList[index]; 5147 objectValue = object[objectKey]; 5148 5149 if (state.replacer) { 5150 objectValue = state.replacer.call(object, objectKey, objectValue); 5151 } 5152 5153 if (!writeNode(state, level, objectKey, false, false)) { 5154 continue; // Skip this pair because of invalid key; 5155 } 5156 5157 if (state.dump.length > 1024) pairBuffer += '? '; 5158 5159 pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); 5160 5161 if (!writeNode(state, level, objectValue, false, false)) { 5162 continue; // Skip this pair because of invalid value. 5163 } 5164 5165 pairBuffer += state.dump; 5166 5167 // Both key and value are valid. 5168 _result += pairBuffer; 5169 } 5170 5171 state.tag = _tag; 5172 state.dump = '{' + _result + '}'; 5173} 5174 5175function writeBlockMapping(state, level, object, compact) { 5176 var _result = '', 5177 _tag = state.tag, 5178 objectKeyList = Object.keys(object), 5179 index, 5180 length, 5181 objectKey, 5182 objectValue, 5183 explicitPair, 5184 pairBuffer; 5185 5186 // Allow sorting keys so that the output file is deterministic 5187 if (state.sortKeys === true) { 5188 // Default sorting 5189 objectKeyList.sort(); 5190 } else if (typeof state.sortKeys === 'function') { 5191 // Custom sort function 5192 objectKeyList.sort(state.sortKeys); 5193 } else if (state.sortKeys) { 5194 // Something is wrong 5195 throw new YAMLException('sortKeys must be a boolean or a function'); 5196 } 5197 5198 for (index = 0, length = objectKeyList.length; index < length; index += 1) { 5199 pairBuffer = ''; 5200 5201 if (!compact || _result !== '') { 5202 pairBuffer += generateNextLine(state, level); 5203 } 5204 5205 objectKey = objectKeyList[index]; 5206 objectValue = object[objectKey]; 5207 5208 if (state.replacer) { 5209 objectValue = state.replacer.call(object, objectKey, objectValue); 5210 } 5211 5212 if (!writeNode(state, level + 1, objectKey, true, true, true)) { 5213 continue; // Skip this pair because of invalid key. 5214 } 5215 5216 explicitPair = (state.tag !== null && state.tag !== '?') || 5217 (state.dump && state.dump.length > 1024); 5218 5219 if (explicitPair) { 5220 if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { 5221 pairBuffer += '?'; 5222 } else { 5223 pairBuffer += '? '; 5224 } 5225 } 5226 5227 pairBuffer += state.dump; 5228 5229 if (explicitPair) { 5230 pairBuffer += generateNextLine(state, level); 5231 } 5232 5233 if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { 5234 continue; // Skip this pair because of invalid value. 5235 } 5236 5237 if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { 5238 pairBuffer += ':'; 5239 } else { 5240 pairBuffer += ': '; 5241 } 5242 5243 pairBuffer += state.dump; 5244 5245 // Both key and value are valid. 5246 _result += pairBuffer; 5247 } 5248 5249 state.tag = _tag; 5250 state.dump = _result || '{}'; // Empty mapping if no valid pairs. 5251} 5252 5253function detectType(state, object, explicit) { 5254 var _result, typeList, index, length, type, style; 5255 5256 typeList = explicit ? state.explicitTypes : state.implicitTypes; 5257 5258 for (index = 0, length = typeList.length; index < length; index += 1) { 5259 type = typeList[index]; 5260 5261 if ((type.instanceOf || type.predicate) && 5262 (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && 5263 (!type.predicate || type.predicate(object))) { 5264 5265 if (explicit) { 5266 if (type.multi && type.representName) { 5267 state.tag = type.representName(object); 5268 } else { 5269 state.tag = type.tag; 5270 } 5271 } else { 5272 state.tag = '?'; 5273 } 5274 5275 if (type.represent) { 5276 style = state.styleMap[type.tag] || type.defaultStyle; 5277 5278 if (_toString.call(type.represent) === '[object Function]') { 5279 _result = type.represent(object, style); 5280 } else if (_hasOwnProperty.call(type.represent, style)) { 5281 _result = type.represent[style](object, style); 5282 } else { 5283 throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); 5284 } 5285 5286 state.dump = _result; 5287 } 5288 5289 return true; 5290 } 5291 } 5292 5293 return false;
5294} 5295 5296// Serializes `object` and writes it to global `result`. 5297// Returns true on success, or false on invalid object. 5298// 5299function writeNode(state, level, object, block, compact, iskey, isblockseq) { 5300 state.tag = null; 5301 state.dump = object; 5302 5303 if (!detectType(state, object, false)) { 5304 detectType(state, object, true); 5305 } 5306 5307 var type = _toString.call(state.dump); 5308 var inblock = block; 5309 var tagStr; 5310 5311 if (block) { 5312 block = (state.flowLevel < 0 || state.flowLevel > level); 5313 } 5314 5315 var objectOrArray = type === '[object Object]' || type === '[object Array]', 5316 duplicateIndex, 5317 duplicate; 5318 5319 if (objectOrArray) { 5320 duplicateIndex = state.duplicates.indexOf(object); 5321 duplicate = duplicateIndex !== -1; 5322 } 5323 5324 if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { 5325 compact = false; 5326 } 5327 5328 if (duplicate && state.usedDuplicates[duplicateIndex]) { 5329 state.dump = '*ref_' + duplicateIndex; 5330 } else { 5331 if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { 5332 state.usedDuplicates[duplicateIndex] = true; 5333 } 5334 if (type === '[object Object]') { 5335 if (block && (Object.keys(state.dump).length !== 0)) { 5336 writeBlockMapping(state, level, state.dump, compact); 5337 if (duplicate) { 5338 state.dump = '&ref_' + duplicateIndex + state.dump; 5339 } 5340 } else { 5341 writeFlowMapping(state, level, state.dump); 5342 if (duplicate) { 5343 state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; 5344 } 5345 } 5346 } else if (type === '[object Array]') { 5347 if (block && (state.dump.length !== 0)) { 5348 if (state.noArrayIndent && !isblockseq && level > 0) { 5349 writeBlockSequence(state, level - 1, state.dump, compact); 5350 } else { 5351 writeBlockSequence(state, level, state.dump, compact); 5352 } 5353 if (duplicate) { 5354 state.dump = '&ref_' + duplicateIndex + state.dump; 5355 } 5356 } else { 5357 writeFlowSequence(state, level, state.dump); 5358 if (duplicate) { 5359 state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; 5360 } 5361 } 5362 } else if (type === '[object String]') { 5363 if (state.tag !== '?') { 5364 writeScalar(state, state.dump, level, iskey, inblock); 5365 } 5366 } else if (type === '[object Undefined]') { 5367 return false; 5368 } else { 5369 if (state.skipInvalid) return false; 5370 throw new YAMLException('unacceptable kind of an object to dump ' + type); 5371 } 5372 5373 if (state.tag !== null && state.tag !== '?') { 5374 // Need to encode all characters except those allowed by the spec: 5375 // 5376 // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ 5377 // [36] ns-hex-digit ::= ns-dec-digit 5378 // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ 5379 // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ 5380 // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | â-â 5381 // [39] ns-uri-char ::= â%â ns-hex-digit ns-hex-digit | ns-word-char | â#â 5382 // | â;â | â/â | â?â | â:â | â@â | â&â | â=â | â+â | â$â | â,â 5383 // | â_â | â.â | â!â | â~â | â*â | â'â | â(â | â)â | â[â | â]â 5384 // 5385 // Also need to encode '!' because it has special meaning (end of tag prefix). 5386 // 5387 tagStr = encodeURI( 5388 state.tag[0] === '!' ? state.tag.slice(1) : state.tag 5389 ).replace(/!/g, '%21'); 5390 5391 if (state.tag[0] === '!') { 5392 tagStr = '!' + tagStr; 5393 } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { 5394 tagStr = '!!' + tagStr.slice(18); 5395 } else { 5396 tagStr = '!<' + tagStr + '>'; 5397 } 5398 5399 state.dump = tagStr + ' ' + state.dump; 5400 } 5401 } 5402 5403 return true; 5404} 5405 5406function getDuplicateReferences(object, state) { 5407 var objects = [], 5408 duplicatesIndexes = [], 5409 index, 5410 length; 5411 5412 inspectNode(object, objects, duplicatesIndexes); 5413 5414 for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { 5415 state.duplicates.push(objects[duplicatesIndexes[index]]); 5416 } 5417 state.usedDuplicates = new Array(length); 5418} 5419 5420function inspectNode(object, objects, duplicatesIndexes) { 5421 var objectKeyList, 5422 index, 5423 length; 5424 5425 if (object !== null && typeof object === 'object') { 5426 index = objects.indexOf(object); 5427 if (index !== -1) { 5428 if (duplicatesIndexes.indexOf(index) === -1) { 5429 duplicatesIndexes.push(index); 5430 } 5431 } else { 5432 objects.push(object); 5433 5434 if (Array.isArray(object)) { 5435 for (index = 0, length = object.length; index < length; index += 1) { 5436 inspectNode(object[index], objects, duplicatesIndexes); 5437 } 5438 } else { 5439 objectKeyList = Object.keys(object); 5440 5441 for (index = 0, length = objectKeyList.length; index < length; index += 1) { 5442 inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); 5443 } 5444 } 5445 } 5446 } 5447} 5448 5449function dump(input, options) { 5450 options = options || {}; 5451 5452 var state = new State(options); 5453 5454 if (!state.noRefs) getDuplicateReferences(input, state); 5455 5456 var value = input; 5457 5458 if (state.replacer) { 5459 value = state.replacer.call({ '': value }, '', value); 5460 } 5461 5462 if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; 5463 5464 return ''; 5465} 5466 5467module.exports.dump = dump; 5468 5469 5470/***/ }), 5471 5472/***/ 425: 5473/***/ ((module) => { 5474 5475"use strict";
5476// YAML error class. http://stackoverflow.com/questions/8458984 5477// 5478 5479 5480 5481function formatError(exception, compact) { 5482 var where = '', message = exception.reason || '(unknown reason)'; 5483 5484 if (!exception.mark) return message; 5485 5486 if (exception.mark.name) { 5487 where += 'in "' + exception.mark.name + '" '; 5488 } 5489 5490 where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')'; 5491 5492 if (!compact && exception.mark.snippet) { 5493 where += '\n\n' + exception.mark.snippet; 5494 } 5495 5496 return message + ' ' + where; 5497} 5498 5499 5500function YAMLException(reason, mark) { 5501 // Super constructor 5502 Error.call(this); 5503 5504 this.name = 'YAMLException'; 5505 this.reason = reason; 5506 this.mark = mark; 5507 this.message = formatError(this, false); 5508 5509 // Include stack trace in error object 5510 if (Error.captureStackTrace) { 5511 // Chrome and NodeJS 5512 Error.captureStackTrace(this, this.constructor); 5513 } else { 5514 // FF, IE 10+ and Safari 6+. Fallback for others 5515 this.stack = (new Error()).stack || ''; 5516 } 5517} 5518 5519 5520// Inherit from Error 5521YAMLException.prototype = Object.create(Error.prototype); 5522YAMLException.prototype.constructor = YAMLException; 5523 5524 5525YAMLException.prototype.toString = function toString(compact) { 5526 return this.name + ': ' + formatError(this, compact); 5527}; 5528 5529 5530module.exports = YAMLException; 5531 5532 5533/***/ }), 5534 5535/***/ 990: 5536/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 5537 5538"use strict"; 5539 5540 5541/*eslint-disable max-len,no-use-before-define*/ 5542 5543var common = __webpack_require__(347); 5544var YAMLException = __webpack_require__(425); 5545var makeSnippet = __webpack_require__(192); 5546var DEFAULT_SCHEMA = __webpack_require__(601); 5547 5548 5549var _hasOwnProperty = Object.prototype.hasOwnProperty; 5550 5551 5552var CONTEXT_FLOW_IN = 1; 5553var CONTEXT_FLOW_OUT = 2; 5554var CONTEXT_BLOCK_IN = 3; 5555var CONTEXT_BLOCK_OUT = 4; 5556 5557 5558var CHOMPING_CLIP = 1; 5559var CHOMPING_STRIP = 2; 5560var CHOMPING_KEEP = 3; 5561 5562 5563var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; 5564var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; 5565var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; 5566var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; 5567var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; 5568 5569 5570function _class(obj) { return Object.prototype.toString.call(obj); } 5571 5572function is_EOL(c) { 5573 return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); 5574} 5575 5576function is_WHITE_SPACE(c) { 5577 return (c === 0x09/* Tab */) || (c === 0x20/* Space */); 5578} 5579 5580function is_WS_OR_EOL(c) { 5581 return (c === 0x09/* Tab */) || 5582 (c === 0x20/* Space */) || 5583 (c === 0x0A/* LF */) || 5584 (c === 0x0D/* CR */); 5585} 5586 5587function is_FLOW_INDICATOR(c) { 5588 return c === 0x2C/* , */ || 5589 c === 0x5B/* [ */ || 5590 c === 0x5D/* ] */ || 5591 c === 0x7B/* { */ || 5592 c === 0x7D/* } */; 5593} 5594 5595function fromHexCode(c) { 5596 var lc; 5597 5598 if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { 5599 return c - 0x30; 5600 } 5601 5602 /*eslint-disable no-bitwise*/ 5603 lc = c | 0x20; 5604 5605 if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { 5606 return lc - 0x61 + 10; 5607 } 5608 5609 return -1; 5610} 5611 5612function escapedHexLen(c) { 5613 if (c === 0x78/* x */) { return 2; } 5614 if (c === 0x75/* u */) { return 4; } 5615 if (c === 0x55/* U */) { return 8; } 5616 return 0; 5617} 5618 5619function fromDecimalCode(c) { 5620 if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { 5621 return c - 0x30; 5622 } 5623 5624 return -1; 5625} 5626 5627function simpleEscapeSequence(c) { 5628 /* eslint-disable indent */ 5629 return (c === 0x30/* 0 */) ? '\x00' : 5630 (c === 0x61/* a */) ? '\x07' : 5631 (c === 0x62/* b */) ? '\x08' : 5632 (c === 0x74/* t */) ? '\x09' : 5633 (c === 0x09/* Tab */) ? '\x09' : 5634 (c === 0x6E/* n */) ? '\x0A' : 5635 (c === 0x76/* v */) ? '\x0B' : 5636 (c === 0x66/* f */) ? '\x0C' : 5637 (c === 0x72/* r */) ? '\x0D' : 5638 (c === 0x65/* e */) ? '\x1B' : 5639 (c === 0x20/* Space */) ? ' ' : 5640 (c === 0x22/* " */) ? '\x22' : 5641 (c === 0x2F/* / */) ? '/' : 5642 (c === 0x5C/* \ */) ? '\x5C' : 5643 (c === 0x4E/* N */) ? '\x85' : 5644 (c === 0x5F/* _ */) ? '\xA0' : 5645 (c === 0x4C/* L */) ? '\u2028' : 5646 (c === 0x50/* P */) ? '\u2029' : ''; 5647} 5648 5649function charFromCodepoint(c) { 5650 if (c <= 0xFFFF) { 5651 return String.fromCharCode(c); 5652 } 5653 // Encode UTF-16 surrogate pair 5654 // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF 5655 return String.fromCharCode( 5656 ((c - 0x010000) >> 10) + 0xD800, 5657 ((c - 0x010000) & 0x03FF) + 0xDC00 5658 ); 5659} 5660 5661var simpleEscapeCheck = new Array(256); // integer, for fast access 5662var simpleEscapeMap = new Array(256); 5663for (var i = 0; i < 256; i++) { 5664 simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; 5665 simpleEscapeMap[i] = simpleEscapeSequence(i); 5666} 5667 5668 5669function State(input, options) { 5670 this.input = input; 5671 5672 this.filename = options['filename'] || null; 5673 this.schema = options['schema'] || DEFAULT_SCHEMA; 5674 this.onWarning = options['onWarning'] || null; 5675 // (Hidden) Remove? makes the loader to expect YAML 1.1 documents 5676 // if such documents have no explicit %YAML directive 5677 this.legacy = options['legacy'] || false; 5678 5679 this.json = options['json'] || false; 5680 this.listener = options['listener'] || null; 5681
5682 this.implicitTypes = this.schema.compiledImplicit; 5683 this.typeMap = this.schema.compiledTypeMap; 5684 5685 this.length = input.length; 5686 this.position = 0; 5687 this.line = 0; 5688 this.lineStart = 0; 5689 this.lineIndent = 0; 5690 5691 // position of first leading tab in the current line, 5692 // used to make sure there are no tabs in the indentation 5693 this.firstTabInLine = -1; 5694 5695 this.documents = []; 5696 5697 /* 5698 this.version; 5699 this.checkLineBreaks; 5700 this.tagMap; 5701 this.anchorMap; 5702 this.tag; 5703 this.anchor; 5704 this.kind; 5705 this.result;*/ 5706 5707} 5708 5709 5710function generateError(state, message) { 5711 var mark = { 5712 name: state.filename, 5713 buffer: state.input.slice(0, -1), // omit trailing \0 5714 position: state.position, 5715 line: state.line, 5716 column: state.position - state.lineStart 5717 }; 5718 5719 mark.snippet = makeSnippet(mark); 5720 5721 return new YAMLException(message, mark); 5722} 5723 5724function throwError(state, message) { 5725 throw generateError(state, message); 5726} 5727 5728function throwWarning(state, message) { 5729 if (state.onWarning) { 5730 state.onWarning.call(null, generateError(state, message)); 5731 } 5732} 5733 5734 5735var directiveHandlers = { 5736 5737 YAML: function handleYamlDirective(state, name, args) { 5738 5739 var match, major, minor; 5740 5741 if (state.version !== null) { 5742 throwError(state, 'duplication of %YAML directive'); 5743 } 5744 5745 if (args.length !== 1) { 5746 throwError(state, 'YAML directive accepts exactly one argument'); 5747 } 5748 5749 match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); 5750 5751 if (match === null) { 5752 throwError(state, 'ill-formed argument of the YAML directive'); 5753 } 5754 5755 major = parseInt(match[1], 10); 5756 minor = parseInt(match[2], 10); 5757 5758 if (major !== 1) { 5759 throwError(state, 'unacceptable YAML version of the document'); 5760 } 5761 5762 state.version = args[0]; 5763 state.checkLineBreaks = (minor < 2); 5764 5765 if (minor !== 1 && minor !== 2) { 5766 throwWarning(state, 'unsupported YAML version of the document'); 5767 } 5768 }, 5769 5770 TAG: function handleTagDirective(state, name, args) { 5771 5772 var handle, prefix; 5773 5774 if (args.length !== 2) { 5775 throwError(state, 'TAG directive accepts exactly two arguments'); 5776 } 5777 5778 handle = args[0]; 5779 prefix = args[1]; 5780 5781 if (!PATTERN_TAG_HANDLE.test(handle)) { 5782 throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); 5783 } 5784 5785 if (_hasOwnProperty.call(state.tagMap, handle)) { 5786 throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); 5787 } 5788 5789 if (!PATTERN_TAG_URI.test(prefix)) { 5790 throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); 5791 } 5792 5793 try { 5794 prefix = decodeURIComponent(prefix); 5795 } catch (err) { 5796 throwError(state, 'tag prefix is malformed: ' + prefix); 5797 } 5798 5799 state.tagMap[handle] = prefix; 5800 } 5801}; 5802 5803 5804function captureSegment(state, start, end, checkJson) { 5805 var _position, _length, _character, _result; 5806 5807 if (start < end) { 5808 _result = state.input.slice(start, end); 5809 5810 if (checkJson) { 5811 for (_position = 0, _length = _result.length; _position < _length; _position += 1) { 5812 _character = _result.charCodeAt(_position); 5813 if (!(_character === 0x09 || 5814 (0x20 <= _character && _character <= 0x10FFFF))) { 5815 throwError(state, 'expected valid JSON character'); 5816 } 5817 } 5818 } else if (PATTERN_NON_PRINTABLE.test(_result)) { 5819 throwError(state, 'the stream contains non-printable characters'); 5820 } 5821 5822 state.result += _result; 5823 } 5824} 5825 5826function mergeMappings(state, destination, source, overridableKeys) { 5827 var sourceKeys, key, index, quantity; 5828 5829 if (!common.isObject(source)) { 5830 throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); 5831 } 5832 5833 sourceKeys = Object.keys(source); 5834 5835 for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { 5836 key = sourceKeys[index]; 5837 5838 if (!_hasOwnProperty.call(destination, key)) { 5839 destination[key] = source[key]; 5840 overridableKeys[key] = true; 5841 } 5842 } 5843} 5844 5845function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, 5846 startLine, startLineStart, startPos) { 5847 5848 var index, quantity; 5849 5850 // The output is a plain object here, so keys can only be strings. 5851 // We need to convert keyNode to a string, but doing so can hang the process 5852 // (deeply nested arrays that explode exponentially using aliases). 5853 if (Array.isArray(keyNode)) { 5854 keyNode = Array.prototype.slice.call(keyNode); 5855 5856 for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { 5857 if (Array.isArray(keyNode[index])) { 5858 throwError(state, 'nested arrays are not supported inside keys'); 5859 } 5860 5861 if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { 5862 keyNode[index] = '[object Object]'; 5863 } 5864 } 5865 } 5866 5867 // Avoid code execution in load() via toString property 5868 // (still use its own toString for arrays, timestamps, 5869 // and whatever user schema extensions happen to have @@toStringTag) 5870 if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { 5871 keyNode = '[object Object]'; 5872 } 5873 5874 5875 keyNode = String(keyNode); 5876 5877 if (_result === null) { 5878 _result = {}; 5879 } 5880 5881 if (keyTag === 'tag:yaml.org,2002:merge') { 5882 if (Array.isArray(valueNode)) { 5883 for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { 5884 mergeMappings(state, _result, valueNode[index], overridableKeys); 5885 } 5886 } else { 5887 mergeMappings(state, _result, valueNode, overridableKeys); 5888 } 5889 } else { 5890 if (!state.json && 5891 !_hasOwnProperty.call(overridableKeys, keyNode) && 5892 _hasOwnProperty.call(_result, keyNode)) { 5893 state.line = startLine || state.line; 5894 state.lineStart = startLineStart || state.lineStart; 5895 state.position = startPos || state.position; 5896 throwError(state, 'duplicated mapping key'); 5897 } 5898 5899 // used for this specific key only because Object.defineProperty is slow 5900 if (keyNode === '__proto__') { 5901 Object.defineProperty(_result, keyNode, { 5902 configurable: true, 5903 enumerable: true, 5904 writable: true, 5905 value: valueNode 5906 }); 5907 } else { 5908 _result[keyNode] = valueNode; 5909 } 5910 delete overridableKeys[keyNode]; 5911 } 5912 5913 return _result; 5914} 5915 5916function readLineBreak(state) { 5917 var ch; 5918 5919 ch = state.input.charCodeAt(state.position); 5920 5921 if (ch === 0x0A/* LF */) { 5922 state.position++; 5923 } else if (ch === 0x0D/* CR */) { 5924 state.position++; 5925 if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { 5926 state.position++; 5927 } 5928 } else { 5929 throwError(state, 'a line break is expected'); 5930 } 5931 5932 state.line += 1; 5933 state.lineStart = state.position; 5934 state.firstTabInLine = -1; 5935} 5936 5937function skipSeparationSpace(state, allowComments, checkIndent) { 5938 var lineBreaks = 0, 5939 ch = state.input.charCodeAt(state.position); 5940 5941 while (ch !== 0) { 5942 while (is_WHITE_SPACE(ch)) { 5943 if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { 5944 state.firstTabInLine = state.position; 5945 } 5946 ch = state.input.charCodeAt(++state.position); 5947 } 5948 5949 if (allowComments && ch === 0x23/* # */) { 5950 do { 5951 ch = state.input.charCodeAt(++state.position); 5952 } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); 5953 } 5954 5955 if (is_EOL(ch)) { 5956 readLineBreak(state); 5957 5958 ch = state.input.charCodeAt(state.position); 5959 lineBreaks++; 5960 state.lineIndent = 0; 5961 5962 while (ch === 0x20/* Space */) { 5963 state.lineIndent++; 5964 ch = state.input.charCodeAt(++state.position); 5965 } 5966 } else { 5967 break; 5968 } 5969 } 5970 5971 if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { 5972 throwWarning(state, 'deficient indentation'); 5973 } 5974 5975 return lineBreaks; 5976} 5977 5978function testDocumentSeparator(state) { 5979 var _position = state.position, 5980 ch; 5981 5982 ch = state.input.charCodeAt(_position); 5983 5984 // Condition state.position === state.lineStart is tested 5985 // in parent on each call, for efficiency. No needs to test here again. 5986 if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && 5987 ch === state.input.charCodeAt(_position + 1) && 5988 ch === state.input.charCodeAt(_position + 2)) { 5989 5990 _position += 3; 5991 5992 ch = state.input.charCodeAt(_position); 5993 5994 if (ch === 0 || is_WS_OR_EOL(ch)) { 5995 return true; 5996 } 5997 } 5998 5999 return false;
vendor: 9,317 bytes, lines 6000-6349
6000} 6001 6002function writeFoldedLines(state, count) { 6003 if (count === 1) { 6004 state.result += ' '; 6005 } else if (count > 1) { 6006 state.result += common.repeat('\n', count - 1); 6007 } 6008} 6009 6010 6011function readPlainScalar(state, nodeIndent, withinFlowCollection) { 6012 var preceding, 6013 following, 6014 captureStart, 6015 captureEnd, 6016 hasPendingContent, 6017 _line, 6018 _lineStart, 6019 _lineIndent, 6020 _kind = state.kind, 6021 _result = state.result, 6022 ch; 6023 6024 ch = state.input.charCodeAt(state.position); 6025 6026 if (is_WS_OR_EOL(ch) || 6027 is_FLOW_INDICATOR(ch) || 6028 ch === 0x23/* # */ || 6029 ch === 0x26/* & */ || 6030 ch === 0x2A/* * */ || 6031 ch === 0x21/* ! */ || 6032 ch === 0x7C/* | */ || 6033 ch === 0x3E/* > */ || 6034 ch === 0x27/* ' */ || 6035 ch === 0x22/* " */ || 6036 ch === 0x25/* % */ || 6037 ch === 0x40/* @ */ || 6038 ch === 0x60/* ` */) { 6039 return false; 6040 } 6041 6042 if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { 6043 following = state.input.charCodeAt(state.position + 1); 6044 6045 if (is_WS_OR_EOL(following) || 6046 withinFlowCollection && is_FLOW_INDICATOR(following)) { 6047 return false; 6048 } 6049 } 6050 6051 state.kind = 'scalar'; 6052 state.result = ''; 6053 captureStart = captureEnd = state.position; 6054 hasPendingContent = false; 6055 6056 while (ch !== 0) { 6057 if (ch === 0x3A/* : */) { 6058 following = state.input.charCodeAt(state.position + 1); 6059 6060 if (is_WS_OR_EOL(following) || 6061 withinFlowCollection && is_FLOW_INDICATOR(following)) { 6062 break; 6063 } 6064 6065 } else if (ch === 0x23/* # */) { 6066 preceding = state.input.charCodeAt(state.position - 1); 6067 6068 if (is_WS_OR_EOL(preceding)) { 6069 break; 6070 } 6071 6072 } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || 6073 withinFlowCollection && is_FLOW_INDICATOR(ch)) { 6074 break; 6075 6076 } else if (is_EOL(ch)) { 6077 _line = state.line; 6078 _lineStart = state.lineStart; 6079 _lineIndent = state.lineIndent; 6080 skipSeparationSpace(state, false, -1); 6081 6082 if (state.lineIndent >= nodeIndent) { 6083 hasPendingContent = true; 6084 ch = state.input.charCodeAt(state.position); 6085 continue; 6086 } else { 6087 state.position = captureEnd; 6088 state.line = _line; 6089 state.lineStart = _lineStart; 6090 state.lineIndent = _lineIndent; 6091 break; 6092 } 6093 } 6094 6095 if (hasPendingContent) { 6096 captureSegment(state, captureStart, captureEnd, false); 6097 writeFoldedLines(state, state.line - _line); 6098 captureStart = captureEnd = state.position; 6099 hasPendingContent = false; 6100 } 6101 6102 if (!is_WHITE_SPACE(ch)) { 6103 captureEnd = state.position + 1; 6104 } 6105 6106 ch = state.input.charCodeAt(++state.position); 6107 } 6108 6109 captureSegment(state, captureStart, captureEnd, false); 6110 6111 if (state.result) { 6112 return true; 6113 } 6114 6115 state.kind = _kind; 6116 state.result = _result; 6117 return false; 6118} 6119 6120function readSingleQuotedScalar(state, nodeIndent) { 6121 var ch, 6122 captureStart, captureEnd; 6123 6124 ch = state.input.charCodeAt(state.position); 6125 6126 if (ch !== 0x27/* ' */) { 6127 return false; 6128 } 6129 6130 state.kind = 'scalar'; 6131 state.result = ''; 6132 state.position++; 6133 captureStart = captureEnd = state.position; 6134 6135 while ((ch = state.input.charCodeAt(state.position)) !== 0) { 6136 if (ch === 0x27/* ' */) { 6137 captureSegment(state, captureStart, state.position, true); 6138 ch = state.input.charCodeAt(++state.position); 6139 6140 if (ch === 0x27/* ' */) { 6141 captureStart = state.position; 6142 state.position++; 6143 captureEnd = state.position; 6144 } else { 6145 return true; 6146 } 6147 6148 } else if (is_EOL(ch)) { 6149 captureSegment(state, captureStart, captureEnd, true); 6150 writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); 6151 captureStart = captureEnd = state.position; 6152 6153 } else if (state.position === state.lineStart && testDocumentSeparator(state)) { 6154 throwError(state, 'unexpected end of the document within a single quoted scalar'); 6155 6156 } else { 6157 state.position++; 6158 captureEnd = state.position; 6159 } 6160 } 6161 6162 throwError(state, 'unexpected end of the stream within a single quoted scalar'); 6163} 6164 6165function readDoubleQuotedScalar(state, nodeIndent) { 6166 var captureStart, 6167 captureEnd, 6168 hexLength, 6169 hexResult, 6170 tmp, 6171 ch; 6172 6173 ch = state.input.charCodeAt(state.position); 6174 6175 if (ch !== 0x22/* " */) { 6176 return false; 6177 } 6178 6179 state.kind = 'scalar'; 6180 state.result = ''; 6181 state.position++; 6182 captureStart = captureEnd = state.position; 6183 6184 while ((ch = state.input.charCodeAt(state.position)) !== 0) { 6185 if (ch === 0x22/* " */) { 6186 captureSegment(state, captureStart, state.position, true); 6187 state.position++; 6188 return true; 6189 6190 } else if (ch === 0x5C/* \ */) { 6191 captureSegment(state, captureStart, state.position, true); 6192 ch = state.input.charCodeAt(++state.position); 6193 6194 if (is_EOL(ch)) { 6195 skipSeparationSpace(state, false, nodeIndent); 6196 6197 // TODO: rework to inline fn with no type cast? 6198 } else if (ch < 256 && simpleEscapeCheck[ch]) { 6199 state.result += simpleEscapeMap[ch]; 6200 state.position++; 6201 6202 } else if ((tmp = escapedHexLen(ch)) > 0) { 6203 hexLength = tmp; 6204 hexResult = 0; 6205 6206 for (; hexLength > 0; hexLength--) { 6207 ch = state.input.charCodeAt(++state.position); 6208 6209 if ((tmp = fromHexCode(ch)) >= 0) { 6210 hexResult = (hexResult << 4) + tmp; 6211 6212 } else { 6213 throwError(state, 'expected hexadecimal character'); 6214 } 6215 } 6216 6217 state.result += charFromCodepoint(hexResult); 6218 6219 state.position++; 6220 6221 } else { 6222 throwError(state, 'unknown escape sequence'); 6223 } 6224 6225 captureStart = captureEnd = state.position; 6226 6227 } else if (is_EOL(ch)) { 6228 captureSegment(state, captureStart, captureEnd, true); 6229 writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); 6230 captureStart = captureEnd = state.position; 6231 6232 } else if (state.position === state.lineStart && testDocumentSeparator(state)) { 6233 throwError(state, 'unexpected end of the document within a double quoted scalar'); 6234 6235 } else { 6236 state.position++; 6237 captureEnd = state.position; 6238 } 6239 } 6240 6241 throwError(state, 'unexpected end of the stream within a double quoted scalar'); 6242} 6243 6244function readFlowCollection(state, nodeIndent) { 6245 var readNext = true, 6246 _line, 6247 _lineStart, 6248 _pos, 6249 _tag = state.tag, 6250 _result, 6251 _anchor = state.anchor, 6252 following, 6253 terminator, 6254 isPair, 6255 isExplicitPair, 6256 isMapping, 6257 overridableKeys = Object.create(null), 6258 keyNode, 6259 keyTag, 6260 valueNode, 6261 ch; 6262 6263 ch = state.input.charCodeAt(state.position); 6264 6265 if (ch === 0x5B/* [ */) { 6266 terminator = 0x5D;/* ] */ 6267 isMapping = false; 6268 _result = []; 6269 } else if (ch === 0x7B/* { */) { 6270 terminator = 0x7D;/* } */ 6271 isMapping = true; 6272 _result = {}; 6273 } else { 6274 return false; 6275 } 6276 6277 if (state.anchor !== null) { 6278 state.anchorMap[state.anchor] = _result; 6279 } 6280 6281 ch = state.input.charCodeAt(++state.position); 6282 6283 while (ch !== 0) { 6284 skipSeparationSpace(state, true, nodeIndent); 6285 6286 ch = state.input.charCodeAt(state.position); 6287 6288 if (ch === terminator) { 6289 state.position++; 6290 state.tag = _tag; 6291 state.anchor = _anchor; 6292 state.kind = isMapping ? 'mapping' : 'sequence'; 6293 state.result = _result; 6294 return true; 6295 } else if (!readNext) { 6296 throwError(state, 'missed comma between flow collection entries'); 6297 } else if (ch === 0x2C/* , */) { 6298 // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 6299 throwError(state, "expected the node content, but found ','"); 6300 } 6301 6302 keyTag = keyNode = valueNode = null; 6303 isPair = isExplicitPair = false; 6304 6305 if (ch === 0x3F/* ? */) { 6306 following = state.input.charCodeAt(state.position + 1); 6307 6308 if (is_WS_OR_EOL(following)) { 6309 isPair = isExplicitPair = true; 6310 state.position++; 6311 skipSeparationSpace(state, true, nodeIndent); 6312 } 6313 } 6314 6315 _line = state.line; // Save the current line. 6316 _lineStart = state.lineStart; 6317 _pos = state.position; 6318 composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); 6319 keyTag = state.tag; 6320 keyNode = state.result; 6321 skipSeparationSpace(state, true, nodeIndent); 6322 6323 ch = state.input.charCodeAt(state.position); 6324 6325 if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { 6326 isPair = true; 6327 ch = state.input.charCodeAt(++state.position); 6328 skipSeparationSpace(state, true, nodeIndent); 6329 composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); 6330 valueNode = state.result; 6331 } 6332 6333 if (isMapping) { 6334 storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); 6335 } else if (isPair) { 6336 _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); 6337 } else { 6338 _result.push(keyNode); 6339 } 6340 6341 skipSeparationSpace(state, true, nodeIndent); 6342 6343 ch = state.input.charCodeAt(state.position); 6344 6345 if (ch === 0x2C/* , */) { 6346 readNext = true; 6347 ch = state.input.charCodeAt(++state.position); 6348 } else { 6349 readNext = false;
6350 } 6351 } 6352 6353 throwError(state, 'unexpected end of the stream within a flow collection'); 6354} 6355 6356function readBlockScalar(state, nodeIndent) { 6357 var captureStart, 6358 folding, 6359 chomping = CHOMPING_CLIP, 6360 didReadContent = false, 6361 detectedIndent = false, 6362 textIndent = nodeIndent, 6363 emptyLines = 0, 6364 atMoreIndented = false, 6365 tmp, 6366 ch; 6367 6368 ch = state.input.charCodeAt(state.position); 6369 6370 if (ch === 0x7C/* | */) { 6371 folding = false; 6372 } else if (ch === 0x3E/* > */) { 6373 folding = true; 6374 } else { 6375 return false; 6376 } 6377 6378 state.kind = 'scalar'; 6379 state.result = ''; 6380 6381 while (ch !== 0) { 6382 ch = state.input.charCodeAt(++state.position); 6383 6384 if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { 6385 if (CHOMPING_CLIP === chomping) { 6386 chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; 6387 } else { 6388 throwError(state, 'repeat of a chomping mode identifier'); 6389 } 6390 6391 } else if ((tmp = fromDecimalCode(ch)) >= 0) { 6392 if (tmp === 0) { 6393 throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); 6394 } else if (!detectedIndent) { 6395 textIndent = nodeIndent + tmp - 1; 6396 detectedIndent = true; 6397 } else { 6398 throwError(state, 'repeat of an indentation width identifier'); 6399 } 6400 6401 } else { 6402 break; 6403 } 6404 } 6405 6406 if (is_WHITE_SPACE(ch)) { 6407 do { ch = state.input.charCodeAt(++state.position); } 6408 while (is_WHITE_SPACE(ch)); 6409 6410 if (ch === 0x23/* # */) { 6411 do { ch = state.input.charCodeAt(++state.position); } 6412 while (!is_EOL(ch) && (ch !== 0)); 6413 } 6414 } 6415 6416 while (ch !== 0) { 6417 readLineBreak(state); 6418 state.lineIndent = 0; 6419 6420 ch = state.input.charCodeAt(state.position); 6421 6422 while ((!detectedIndent || state.lineIndent < textIndent) && 6423 (ch === 0x20/* Space */)) { 6424 state.lineIndent++; 6425 ch = state.input.charCodeAt(++state.position); 6426 } 6427 6428 if (!detectedIndent && state.lineIndent > textIndent) { 6429 textIndent = state.lineIndent; 6430 } 6431 6432 if (is_EOL(ch)) { 6433 emptyLines++; 6434 continue; 6435 } 6436 6437 // End of the scalar. 6438 if (state.lineIndent < textIndent) { 6439 6440 // Perform the chomping. 6441 if (chomping === CHOMPING_KEEP) { 6442 state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); 6443 } else if (chomping === CHOMPING_CLIP) { 6444 if (didReadContent) { // i.e. only if the scalar is not empty. 6445 state.result += '\n'; 6446 } 6447 } 6448 6449 // Break this `while` cycle and go to the funciton's epilogue. 6450 break; 6451 } 6452 6453 // Folded style: use fancy rules to handle line breaks. 6454 if (folding) { 6455 6456 // Lines starting with white space characters (more-indented lines) are not folded. 6457 if (is_WHITE_SPACE(ch)) { 6458 atMoreIndented = true; 6459 // except for the first content line (cf. Example 8.1) 6460 state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); 6461 6462 // End of more-indented block. 6463 } else if (atMoreIndented) { 6464 atMoreIndented = false; 6465 state.result += common.repeat('\n', emptyLines + 1); 6466 6467 // Just one line break - perceive as the same line. 6468 } else if (emptyLines === 0) { 6469 if (didReadContent) { // i.e. only if we have already read some scalar content. 6470 state.result += ' '; 6471 } 6472 6473 // Several line breaks - perceive as different lines. 6474 } else { 6475 state.result += common.repeat('\n', emptyLines); 6476 } 6477 6478 // Literal style: just add exact number of line breaks between content lines. 6479 } else { 6480 // Keep all line breaks except the header line break. 6481 state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); 6482 } 6483 6484 didReadContent = true; 6485 detectedIndent = true; 6486 emptyLines = 0; 6487 captureStart = state.position; 6488 6489 while (!is_EOL(ch) && (ch !== 0)) { 6490 ch = state.input.charCodeAt(++state.position); 6491 } 6492 6493 captureSegment(state, captureStart, state.position, false); 6494 } 6495 6496 return true; 6497} 6498 6499function readBlockSequence(state, nodeIndent) { 6500 var _line, 6501 _tag = state.tag, 6502 _anchor = state.anchor, 6503 _result = [], 6504 following, 6505 detected = false, 6506 ch; 6507 6508 // there is a leading tab before this token, so it can't be a block sequence/mapping; 6509 // it can still be flow sequence/mapping or a scalar 6510 if (state.firstTabInLine !== -1) return false;
6511 6512 if (state.anchor !== null) { 6513 state.anchorMap[state.anchor] = _result; 6514 } 6515 6516 ch = state.input.charCodeAt(state.position); 6517 6518 while (ch !== 0) { 6519 if (state.firstTabInLine !== -1) { 6520 state.position = state.firstTabInLine; 6521 throwError(state, 'tab characters must not be used in indentation'); 6522 } 6523 6524 if (ch !== 0x2D/* - */) { 6525 break; 6526 } 6527 6528 following = state.input.charCodeAt(state.position + 1); 6529 6530 if (!is_WS_OR_EOL(following)) { 6531 break; 6532 } 6533 6534 detected = true; 6535 state.position++; 6536 6537 if (skipSeparationSpace(state, true, -1)) { 6538 if (state.lineIndent <= nodeIndent) { 6539 _result.push(null); 6540 ch = state.input.charCodeAt(state.position); 6541 continue; 6542 } 6543 } 6544 6545 _line = state.line; 6546 composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); 6547 _result.push(state.result); 6548 skipSeparationSpace(state, true, -1); 6549 6550 ch = state.input.charCodeAt(state.position); 6551 6552 if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { 6553 throwError(state, 'bad indentation of a sequence entry'); 6554 } else if (state.lineIndent < nodeIndent) { 6555 break; 6556 } 6557 } 6558 6559 if (detected) { 6560 state.tag = _tag; 6561 state.anchor = _anchor; 6562 state.kind = 'sequence'; 6563 state.result = _result; 6564 return true; 6565 } 6566 return false; 6567} 6568 6569function readBlockMapping(state, nodeIndent, flowIndent) { 6570 var following, 6571 allowCompact, 6572 _line, 6573 _keyLine, 6574 _keyLineStart, 6575 _keyPos, 6576 _tag = state.tag, 6577 _anchor = state.anchor, 6578 _result = {}, 6579 overridableKeys = Object.create(null), 6580 keyTag = null, 6581 keyNode = null, 6582 valueNode = null, 6583 atExplicitKey = false, 6584 detected = false, 6585 ch; 6586 6587 // there is a leading tab before this token, so it can't be a block sequence/mapping; 6588 // it can still be flow sequence/mapping or a scalar 6589 if (state.firstTabInLine !== -1) return false; 6590 6591 if (state.anchor !== null) { 6592 state.anchorMap[state.anchor] = _result; 6593 } 6594 6595 ch = state.input.charCodeAt(state.position); 6596 6597 while (ch !== 0) { 6598 if (!atExplicitKey && state.firstTabInLine !== -1) { 6599 state.position = state.firstTabInLine; 6600 throwError(state, 'tab characters must not be used in indentation'); 6601 } 6602 6603 following = state.input.charCodeAt(state.position + 1); 6604 _line = state.line; // Save the current line. 6605 6606 // 6607 // Explicit notation case. There are two separate blocks: 6608 // first for the key (denoted by "?") and second for the value (denoted by ":") 6609 // 6610 if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { 6611 6612 if (ch === 0x3F/* ? */) { 6613 if (atExplicitKey) { 6614 storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); 6615 keyTag = keyNode = valueNode = null; 6616 } 6617 6618 detected = true; 6619 atExplicitKey = true; 6620 allowCompact = true; 6621 6622 } else if (atExplicitKey) { 6623 // i.e. 0x3A/* : */ === character after the explicit key. 6624 atExplicitKey = false; 6625 allowCompact = true; 6626 6627 } else { 6628 throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); 6629 } 6630 6631 state.position += 1; 6632 ch = following; 6633 6634 // 6635 // Implicit notation case. Flow-style node as the key first, then ":", and the value. 6636 // 6637 } else { 6638 _keyLine = state.line; 6639 _keyLineStart = state.lineStart; 6640 _keyPos = state.position; 6641 6642 if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { 6643 // Neither implicit nor explicit notation. 6644 // Reading is done. Go to the epilogue. 6645 break; 6646 } 6647 6648 if (state.line === _line) { 6649 ch = state.input.charCodeAt(state.position); 6650 6651 while (is_WHITE_SPACE(ch)) { 6652 ch = state.input.charCodeAt(++state.position); 6653 } 6654 6655 if (ch === 0x3A/* : */) { 6656 ch = state.input.charCodeAt(++state.position); 6657 6658 if (!is_WS_OR_EOL(ch)) { 6659 throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); 6660 } 6661 6662 if (atExplicitKey) { 6663 storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
vendor: 4,901 bytes, lines 6664-6852
6664 keyTag = keyNode = valueNode = null; 6665 } 6666 6667 detected = true; 6668 atExplicitKey = false; 6669 allowCompact = false; 6670 keyTag = state.tag; 6671 keyNode = state.result; 6672 6673 } else if (detected) { 6674 throwError(state, 'can not read an implicit mapping pair; a colon is missed'); 6675 6676 } else { 6677 state.tag = _tag; 6678 state.anchor = _anchor; 6679 return true; // Keep the result of `composeNode`. 6680 } 6681 6682 } else if (detected) { 6683 throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); 6684 6685 } else { 6686 state.tag = _tag; 6687 state.anchor = _anchor; 6688 return true; // Keep the result of `composeNode`. 6689 } 6690 } 6691 6692 // 6693 // Common reading code for both explicit and implicit notations. 6694 // 6695 if (state.line === _line || state.lineIndent > nodeIndent) { 6696 if (atExplicitKey) { 6697 _keyLine = state.line; 6698 _keyLineStart = state.lineStart; 6699 _keyPos = state.position; 6700 } 6701 6702 if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { 6703 if (atExplicitKey) { 6704 keyNode = state.result; 6705 } else { 6706 valueNode = state.result; 6707 } 6708 } 6709 6710 if (!atExplicitKey) { 6711 storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); 6712 keyTag = keyNode = valueNode = null; 6713 } 6714 6715 skipSeparationSpace(state, true, -1); 6716 ch = state.input.charCodeAt(state.position); 6717 } 6718 6719 if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { 6720 throwError(state, 'bad indentation of a mapping entry'); 6721 } else if (state.lineIndent < nodeIndent) { 6722 break; 6723 } 6724 } 6725 6726 // 6727 // Epilogue. 6728 // 6729 6730 // Special case: last mapping's node contains only the key in explicit notation. 6731 if (atExplicitKey) { 6732 storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); 6733 } 6734 6735 // Expose the resulting mapping. 6736 if (detected) { 6737 state.tag = _tag; 6738 state.anchor = _anchor; 6739 state.kind = 'mapping'; 6740 state.result = _result; 6741 } 6742 6743 return detected; 6744} 6745 6746function readTagProperty(state) { 6747 var _position, 6748 isVerbatim = false, 6749 isNamed = false, 6750 tagHandle, 6751 tagName, 6752 ch; 6753 6754 ch = state.input.charCodeAt(state.position); 6755 6756 if (ch !== 0x21/* ! */) return false; 6757 6758 if (state.tag !== null) { 6759 throwError(state, 'duplication of a tag property'); 6760 } 6761 6762 ch = state.input.charCodeAt(++state.position); 6763 6764 if (ch === 0x3C/* < */) { 6765 isVerbatim = true; 6766 ch = state.input.charCodeAt(++state.position); 6767 6768 } else if (ch === 0x21/* ! */) { 6769 isNamed = true; 6770 tagHandle = '!!'; 6771 ch = state.input.charCodeAt(++state.position); 6772 6773 } else { 6774 tagHandle = '!'; 6775 } 6776 6777 _position = state.position; 6778 6779 if (isVerbatim) { 6780 do { ch = state.input.charCodeAt(++state.position); } 6781 while (ch !== 0 && ch !== 0x3E/* > */); 6782 6783 if (state.position < state.length) { 6784 tagName = state.input.slice(_position, state.position); 6785 ch = state.input.charCodeAt(++state.position); 6786 } else { 6787 throwError(state, 'unexpected end of the stream within a verbatim tag'); 6788 } 6789 } else { 6790 while (ch !== 0 && !is_WS_OR_EOL(ch)) { 6791 6792 if (ch === 0x21/* ! */) { 6793 if (!isNamed) { 6794 tagHandle = state.input.slice(_position - 1, state.position + 1); 6795 6796 if (!PATTERN_TAG_HANDLE.test(tagHandle)) { 6797 throwError(state, 'named tag handle cannot contain such characters'); 6798 } 6799 6800 isNamed = true; 6801 _position = state.position + 1; 6802 } else { 6803 throwError(state, 'tag suffix cannot contain exclamation marks'); 6804 } 6805 } 6806 6807 ch = state.input.charCodeAt(++state.position); 6808 } 6809 6810 tagName = state.input.slice(_position, state.position); 6811 6812 if (PATTERN_FLOW_INDICATORS.test(tagName)) { 6813 throwError(state, 'tag suffix cannot contain flow indicator characters'); 6814 } 6815 } 6816 6817 if (tagName && !PATTERN_TAG_URI.test(tagName)) { 6818 throwError(state, 'tag name cannot contain such characters: ' + tagName); 6819 } 6820 6821 try { 6822 tagName = decodeURIComponent(tagName); 6823 } catch (err) { 6824 throwError(state, 'tag name is malformed: ' + tagName); 6825 } 6826 6827 if (isVerbatim) { 6828 state.tag = tagName; 6829 6830 } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { 6831 state.tag = state.tagMap[tagHandle] + tagName; 6832 6833 } else if (tagHandle === '!') { 6834 state.tag = '!' + tagName; 6835 6836 } else if (tagHandle === '!!') { 6837 state.tag = 'tag:yaml.org,2002:' + tagName; 6838 6839 } else { 6840 throwError(state, 'undeclared tag handle "' + tagHandle + '"'); 6841 } 6842 6843 return true; 6844} 6845 6846function readAnchorProperty(state) { 6847 var _position, 6848 ch; 6849 6850 ch = state.input.charCodeAt(state.position); 6851 6852 if (ch !== 0x26/* & */) return false;
6853 6854 if (state.anchor !== null) { 6855 throwError(state, 'duplication of an anchor property'); 6856 } 6857 6858 ch = state.input.charCodeAt(++state.position); 6859 _position = state.position; 6860 6861 while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { 6862 ch = state.input.charCodeAt(++state.position); 6863 } 6864 6865 if (state.position === _position) { 6866 throwError(state, 'name of an anchor node must contain at least one character'); 6867 } 6868 6869 state.anchor = state.input.slice(_position, state.position); 6870 return true; 6871} 6872 6873function readAlias(state) { 6874 var _position, alias, 6875 ch; 6876 6877 ch = state.input.charCodeAt(state.position); 6878 6879 if (ch !== 0x2A/* * */) return false; 6880 6881 ch = state.input.charCodeAt(++state.position); 6882 _position = state.position; 6883 6884 while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { 6885 ch = state.input.charCodeAt(++state.position); 6886 } 6887 6888 if (state.position === _position) { 6889 throwError(state, 'name of an alias node must contain at least one character'); 6890 } 6891 6892 alias = state.input.slice(_position, state.position); 6893 6894 if (!_hasOwnProperty.call(state.anchorMap, alias)) { 6895 throwError(state, 'unidentified alias "' + alias + '"'); 6896 } 6897 6898 state.result = state.anchorMap[alias]; 6899 skipSeparationSpace(state, true, -1); 6900 return true; 6901} 6902 6903function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { 6904 var allowBlockStyles, 6905 allowBlockScalars, 6906 allowBlockCollections, 6907 indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent 6908 atNewLine = false, 6909 hasContent = false, 6910 typeIndex, 6911 typeQuantity, 6912 typeList, 6913 type, 6914 flowIndent, 6915 blockIndent; 6916 6917 if (state.listener !== null) { 6918 state.listener('open', state); 6919 } 6920 6921 state.tag = null; 6922 state.anchor = null; 6923 state.kind = null; 6924 state.result = null; 6925 6926 allowBlockStyles = allowBlockScalars = allowBlockCollections = 6927 CONTEXT_BLOCK_OUT === nodeContext || 6928 CONTEXT_BLOCK_IN === nodeContext; 6929 6930 if (allowToSeek) { 6931 if (skipSeparationSpace(state, true, -1)) { 6932 atNewLine = true; 6933 6934 if (state.lineIndent > parentIndent) { 6935 indentStatus = 1; 6936 } else if (state.lineIndent === parentIndent) { 6937 indentStatus = 0; 6938 } else if (state.lineIndent < parentIndent) { 6939 indentStatus = -1; 6940 } 6941 } 6942 } 6943 6944 if (indentStatus === 1) { 6945 while (readTagProperty(state) || readAnchorProperty(state)) { 6946 if (skipSeparationSpace(state, true, -1)) { 6947 atNewLine = true; 6948 allowBlockCollections = allowBlockStyles; 6949 6950 if (state.lineIndent > parentIndent) { 6951 indentStatus = 1; 6952 } else if (state.lineIndent === parentIndent) { 6953 indentStatus = 0; 6954 } else if (state.lineIndent < parentIndent) { 6955 indentStatus = -1; 6956 } 6957 } else { 6958 allowBlockCollections = false; 6959 } 6960 } 6961 } 6962 6963 if (allowBlockCollections) { 6964 allowBlockCollections = atNewLine || allowCompact; 6965 } 6966 6967 if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { 6968 if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { 6969 flowIndent = parentIndent; 6970 } else { 6971 flowIndent = parentIndent + 1; 6972 } 6973 6974 blockIndent = state.position - state.lineStart; 6975 6976 if (indentStatus === 1) { 6977 if (allowBlockCollections && 6978 (readBlockSequence(state, blockIndent) || 6979 readBlockMapping(state, blockIndent, flowIndent)) || 6980 readFlowCollection(state, flowIndent)) { 6981 hasContent = true; 6982 } else { 6983 if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || 6984 readSingleQuotedScalar(state, flowIndent) || 6985 readDoubleQuotedScalar(state, flowIndent)) { 6986 hasContent = true; 6987 6988 } else if (readAlias(state)) { 6989 hasContent = true; 6990 6991 if (state.tag !== null || state.anchor !== null) { 6992 throwError(state, 'alias node should not have any properties'); 6993 } 6994 6995 } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { 6996 hasContent = true; 6997 6998 if (state.tag === null) { 6999 state.tag = '?'; 7000 } 7001 } 7002 7003 if (state.anchor !== null) { 7004 state.anchorMap[state.anchor] = state.result; 7005 } 7006 } 7007 } else if (indentStatus === 0) { 7008 // Special case: block sequences are allowed to have same indentation level as the parent. 7009 // http://www.yaml.org/spec/1.2/spec.html#id2799784 7010 hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); 7011 } 7012 } 7013 7014 if (state.tag === null) { 7015 if (state.anchor !== null) { 7016 state.anchorMap[state.anchor] = state.result; 7017 } 7018 7019 } else if (state.tag === '?') { 7020 // Implicit resolving is not allowed for non-scalar types, and '?'
vendor: 8,318 bytes, lines 7021-7327
7021 // non-specific tag is only automatically assigned to plain scalars. 7022 // 7023 // We only need to check kind conformity in case user explicitly assigns '?' 7024 // tag, for example like this: "!<?> [0]" 7025 // 7026 if (state.result !== null && state.kind !== 'scalar') { 7027 throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"'); 7028 } 7029 7030 for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { 7031 type = state.implicitTypes[typeIndex]; 7032 7033 if (type.resolve(state.result)) { // `state.result` updated in resolver if matched 7034 state.result = type.construct(state.result); 7035 state.tag = type.tag; 7036 if (state.anchor !== null) { 7037 state.anchorMap[state.anchor] = state.result; 7038 } 7039 break; 7040 } 7041 } 7042 } else if (state.tag !== '!') { 7043 if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { 7044 type = state.typeMap[state.kind || 'fallback'][state.tag]; 7045 } else { 7046 // looking for multi type 7047 type = null; 7048 typeList = state.typeMap.multi[state.kind || 'fallback']; 7049 7050 for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { 7051 if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { 7052 type = typeList[typeIndex]; 7053 break; 7054 } 7055 } 7056 } 7057 7058 if (!type) { 7059 throwError(state, 'unknown tag !<' + state.tag + '>'); 7060 } 7061 7062 if (state.result !== null && type.kind !== state.kind) { 7063 throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); 7064 } 7065 7066 if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched 7067 throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); 7068 } else { 7069 state.result = type.construct(state.result, state.tag); 7070 if (state.anchor !== null) { 7071 state.anchorMap[state.anchor] = state.result; 7072 } 7073 } 7074 } 7075 7076 if (state.listener !== null) { 7077 state.listener('close', state); 7078 } 7079 return state.tag !== null || state.anchor !== null || hasContent; 7080} 7081 7082function readDocument(state) { 7083 var documentStart = state.position, 7084 _position, 7085 directiveName, 7086 directiveArgs, 7087 hasDirectives = false, 7088 ch; 7089 7090 state.version = null; 7091 state.checkLineBreaks = state.legacy; 7092 state.tagMap = Object.create(null); 7093 state.anchorMap = Object.create(null); 7094 7095 while ((ch = state.input.charCodeAt(state.position)) !== 0) { 7096 skipSeparationSpace(state, true, -1); 7097 7098 ch = state.input.charCodeAt(state.position); 7099 7100 if (state.lineIndent > 0 || ch !== 0x25/* % */) { 7101 break; 7102 } 7103 7104 hasDirectives = true; 7105 ch = state.input.charCodeAt(++state.position); 7106 _position = state.position; 7107 7108 while (ch !== 0 && !is_WS_OR_EOL(ch)) { 7109 ch = state.input.charCodeAt(++state.position); 7110 } 7111 7112 directiveName = state.input.slice(_position, state.position); 7113 directiveArgs = []; 7114 7115 if (directiveName.length < 1) { 7116 throwError(state, 'directive name must not be less than one character in length'); 7117 } 7118 7119 while (ch !== 0) { 7120 while (is_WHITE_SPACE(ch)) { 7121 ch = state.input.charCodeAt(++state.position); 7122 } 7123 7124 if (ch === 0x23/* # */) { 7125 do { ch = state.input.charCodeAt(++state.position); } 7126 while (ch !== 0 && !is_EOL(ch)); 7127 break; 7128 } 7129 7130 if (is_EOL(ch)) break; 7131 7132 _position = state.position; 7133 7134 while (ch !== 0 && !is_WS_OR_EOL(ch)) { 7135 ch = state.input.charCodeAt(++state.position); 7136 } 7137 7138 directiveArgs.push(state.input.slice(_position, state.position)); 7139 } 7140 7141 if (ch !== 0) readLineBreak(state); 7142 7143 if (_hasOwnProperty.call(directiveHandlers, directiveName)) { 7144 directiveHandlers[directiveName](state, directiveName, directiveArgs); 7145 } else { 7146 throwWarning(state, 'unknown document directive "' + directiveName + '"'); 7147 } 7148 } 7149 7150 skipSeparationSpace(state, true, -1); 7151 7152 if (state.lineIndent === 0 && 7153 state.input.charCodeAt(state.position) === 0x2D/* - */ && 7154 state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && 7155 state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { 7156 state.position += 3; 7157 skipSeparationSpace(state, true, -1); 7158 7159 } else if (hasDirectives) { 7160 throwError(state, 'directives end mark is expected'); 7161 } 7162 7163 composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); 7164 skipSeparationSpace(state, true, -1); 7165 7166 if (state.checkLineBreaks && 7167 PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { 7168 throwWarning(state, 'non-ASCII line breaks are interpreted as content'); 7169 } 7170 7171 state.documents.push(state.result); 7172 7173 if (state.position === state.lineStart && testDocumentSeparator(state)) { 7174 7175 if (state.input.charCodeAt(state.position) === 0x2E/* . */) { 7176 state.position += 3; 7177 skipSeparationSpace(state, true, -1); 7178 } 7179 return; 7180 } 7181 7182 if (state.position < (state.length - 1)) { 7183 throwError(state, 'end of the stream or a document separator is expected'); 7184 } else { 7185 return; 7186 } 7187} 7188 7189 7190function loadDocuments(input, options) { 7191 input = String(input); 7192 options = options || {}; 7193 7194 if (input.length !== 0) { 7195 7196 // Add tailing `\n` if not exists 7197 if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && 7198 input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { 7199 input += '\n'; 7200 } 7201 7202 // Strip BOM 7203 if (input.charCodeAt(0) === 0xFEFF) { 7204 input = input.slice(1); 7205 } 7206 } 7207 7208 var state = new State(input, options); 7209 7210 var nullpos = input.indexOf('\0'); 7211 7212 if (nullpos !== -1) { 7213 state.position = nullpos; 7214 throwError(state, 'null byte is not allowed in input'); 7215 } 7216 7217 // Use 0 as string terminator. That significantly simplifies bounds check. 7218 state.input += '\0'; 7219 7220 while (state.input.charCodeAt(state.position) === 0x20/* Space */) { 7221 state.lineIndent += 1; 7222 state.position += 1; 7223 } 7224 7225 while (state.position < (state.length - 1)) { 7226 readDocument(state); 7227 } 7228 7229 return state.documents; 7230} 7231 7232 7233function loadAll(input, iterator, options) { 7234 if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { 7235 options = iterator; 7236 iterator = null; 7237 } 7238 7239 var documents = loadDocuments(input, options); 7240 7241 if (typeof iterator !== 'function') { 7242 return documents; 7243 } 7244 7245 for (var index = 0, length = documents.length; index < length; index += 1) { 7246 iterator(documents[index]); 7247 } 7248} 7249 7250 7251function load(input, options) { 7252 var documents = loadDocuments(input, options); 7253 7254 if (documents.length === 0) { 7255 /*eslint-disable no-undefined*/ 7256 return undefined; 7257 } else if (documents.length === 1) { 7258 return documents[0]; 7259 } 7260 throw new YAMLException('expected a single document in the stream, but found more'); 7261} 7262 7263 7264module.exports.loadAll = loadAll; 7265module.exports.load = load; 7266 7267 7268/***/ }), 7269 7270/***/ 657: 7271/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 7272 7273"use strict"; 7274 7275 7276/*eslint-disable max-len*/ 7277 7278var YAMLException = __webpack_require__(425); 7279var Type = __webpack_require__(364); 7280 7281 7282function compileList(schema, name) { 7283 var result = []; 7284 7285 schema[name].forEach(function (currentType) { 7286 var newIndex = result.length; 7287 7288 result.forEach(function (previousType, previousIndex) { 7289 if (previousType.tag === currentType.tag && 7290 previousType.kind === currentType.kind && 7291 previousType.multi === currentType.multi) { 7292 7293 newIndex = previousIndex; 7294 } 7295 }); 7296 7297 result[newIndex] = currentType; 7298 }); 7299 7300 return result; 7301} 7302 7303 7304function compileMap(/* lists... */) { 7305 var result = { 7306 scalar: {}, 7307 sequence: {}, 7308 mapping: {}, 7309 fallback: {}, 7310 multi: { 7311 scalar: [], 7312 sequence: [], 7313 mapping: [], 7314 fallback: [] 7315 } 7316 }, index, length; 7317 7318 function collectType(type) { 7319 if (type.multi) { 7320 result.multi[type.kind].push(type); 7321 result.multi['fallback'].push(type); 7322 } else { 7323 result[type.kind][type.tag] = result['fallback'][type.tag] = type; 7324 } 7325 } 7326 7327 for (index = 0, length = arguments.length; index < length; index += 1) {
7328 arguments[index].forEach(collectType); 7329 } 7330 return result; 7331} 7332 7333 7334function Schema(definition) { 7335 return this.extend(definition); 7336} 7337 7338 7339Schema.prototype.extend = function extend(definition) { 7340 var implicit = []; 7341 var explicit = []; 7342 7343 if (definition instanceof Type) { 7344 // Schema.extend(type) 7345 explicit.push(definition); 7346 7347 } else if (Array.isArray(definition)) { 7348 // Schema.extend([ type1, type2, ... ]) 7349 explicit = explicit.concat(definition); 7350 7351 } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { 7352 // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) 7353 if (definition.implicit) implicit = implicit.concat(definition.implicit); 7354 if (definition.explicit) explicit = explicit.concat(definition.explicit); 7355 7356 } else { 7357 throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' + 7358 'or a schema definition ({ implicit: [...], explicit: [...] })'); 7359 } 7360 7361 implicit.forEach(function (type) { 7362 if (!(type instanceof Type)) { 7363 throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); 7364 } 7365 7366 if (type.loadKind && type.loadKind !== 'scalar') { 7367 throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); 7368 } 7369 7370 if (type.multi) { 7371 throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); 7372 } 7373 }); 7374 7375 explicit.forEach(function (type) { 7376 if (!(type instanceof Type)) { 7377 throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); 7378 } 7379 }); 7380 7381 var result = Object.create(Schema.prototype); 7382 7383 result.implicit = (this.implicit || []).concat(implicit); 7384 result.explicit = (this.explicit || []).concat(explicit); 7385 7386 result.compiledImplicit = compileList(result, 'implicit'); 7387 result.compiledExplicit = compileList(result, 'explicit'); 7388 result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); 7389 7390 return result; 7391}; 7392 7393 7394module.exports = Schema; 7395 7396 7397/***/ }), 7398 7399/***/ 471: 7400/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 7401 7402"use strict";
7403// Standard YAML's Core schema. 7404// http://www.yaml.org/spec/1.2/spec.html#id2804923 7405// 7406// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. 7407// So, Core schema has no distinctions from JSON schema is JS-YAML. 7408 7409 7410 7411 7412 7413module.exports = __webpack_require__(966); 7414 7415 7416/***/ }), 7417 7418/***/ 601: 7419/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 7420 7421"use strict"; 7422// JS-YAML's default schema for `safeLoad` function. 7423// It is not described in the YAML specification. 7424// 7425// This schema is based on standard YAML's Core schema and includes most of 7426// extra types described at YAML tag repository. (http://yaml.org/type/) 7427 7428 7429 7430 7431 7432module.exports = (__webpack_require__(471).extend)({ 7433 implicit: [ 7434 __webpack_require__(156), 7435 __webpack_require__(452) 7436 ], 7437 explicit: [ 7438 __webpack_require__(531), 7439 __webpack_require__(605), 7440 __webpack_require__(879), 7441 __webpack_require__(982) 7442 ] 7443}); 7444 7445 7446/***/ }), 7447 7448/***/ 795: 7449/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 7450 7451"use strict"; 7452// Standard YAML's Failsafe schema. 7453// http://www.yaml.org/spec/1.2/spec.html#id2802346 7454 7455 7456 7457 7458 7459var Schema = __webpack_require__(657); 7460 7461 7462module.exports = new Schema({ 7463 explicit: [ 7464 __webpack_require__(48), 7465 __webpack_require__(451), 7466 __webpack_require__(945) 7467 ] 7468}); 7469 7470 7471/***/ }), 7472 7473/***/ 966: 7474/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 7475 7476"use strict";
7477// Standard YAML's JSON schema. 7478// http://www.yaml.org/spec/1.2/spec.html#id2803231 7479// 7480// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. 7481// So, this schema is not such strict as defined in the YAML specification. 7482// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. 7483 7484 7485 7486 7487 7488module.exports = (__webpack_require__(795).extend)({ 7489 implicit: [ 7490 __webpack_require__(151), 7491 __webpack_require__(771), 7492 __webpack_require__(518), 7493 __webpack_require__(215) 7494 ] 7495}); 7496 7497 7498/***/ }), 7499 7500/***/ 192: 7501/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 7502 7503"use strict"; 7504 7505 7506 7507var common = __webpack_require__(347); 7508 7509 7510// get snippet for a single line, respecting maxLength 7511function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { 7512 var head = ''; 7513 var tail = ''; 7514 var maxHalfLength = Math.floor(maxLineLength / 2) - 1; 7515 7516 if (position - lineStart > maxHalfLength) { 7517 head = ' ... '; 7518 lineStart = position - maxHalfLength + head.length; 7519 } 7520 7521 if (lineEnd - position > maxHalfLength) { 7522 tail = ' ...'; 7523 lineEnd = position + maxHalfLength - tail.length; 7524 } 7525 7526 return { 7527 str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, 'â') + tail, 7528 pos: position - lineStart + head.length // relative position 7529 }; 7530} 7531 7532 7533function padStart(string, max) { 7534 return common.repeat(' ', max - string.length) + string; 7535} 7536 7537 7538function makeSnippet(mark, options) { 7539 options = Object.create(options || null); 7540 7541 if (!mark.buffer) return null; 7542 7543 if (!options.maxLength) options.maxLength = 79; 7544 if (typeof options.indent !== 'number') options.indent = 1; 7545 if (typeof options.linesBefore !== 'number') options.linesBefore = 3; 7546 if (typeof options.linesAfter !== 'number') options.linesAfter = 2; 7547 7548 var re = /\r?\n|\r|\0/g; 7549 var lineStarts = [ 0 ]; 7550 var lineEnds = []; 7551 var match; 7552 var foundLineNo = -1; 7553 7554 while ((match = re.exec(mark.buffer))) { 7555 lineEnds.push(match.index); 7556 lineStarts.push(match.index + match[0].length); 7557 7558 if (mark.position <= match.index && foundLineNo < 0) { 7559 foundLineNo = lineStarts.length - 2; 7560 } 7561 } 7562 7563 if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; 7564 7565 var result = '', i, line; 7566 var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; 7567 var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); 7568 7569 for (i = 1; i <= options.linesBefore; i++) { 7570 if (foundLineNo - i < 0) break; 7571 line = getLine( 7572 mark.buffer, 7573 lineStarts[foundLineNo - i], 7574 lineEnds[foundLineNo - i], 7575 mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), 7576 maxLineLength 7577 ); 7578 result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + 7579 ' | ' + line.str + '\n' + result; 7580 } 7581 7582 line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); 7583 result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + 7584 ' | ' + line.str + '\n'; 7585 result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; 7586 7587 for (i = 1; i <= options.linesAfter; i++) { 7588 if (foundLineNo + i >= lineEnds.length) break; 7589 line = getLine( 7590 mark.buffer, 7591 lineStarts[foundLineNo + i], 7592 lineEnds[foundLineNo + i], 7593 mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), 7594 maxLineLength 7595 ); 7596 result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + 7597 ' | ' + line.str + '\n'; 7598 } 7599 7600 return result.replace(/\n$/, ''); 7601} 7602 7603 7604module.exports = makeSnippet; 7605 7606 7607/***/ }), 7608 7609/***/ 364: 7610/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 7611 7612"use strict"; 7613 7614 7615var YAMLException = __webpack_require__(425); 7616 7617var TYPE_CONSTRUCTOR_OPTIONS = [ 7618 'kind', 7619 'multi', 7620 'resolve', 7621 'construct', 7622 'instanceOf', 7623 'predicate', 7624 'represent', 7625 'representName', 7626 'defaultStyle', 7627 'styleAliases' 7628]; 7629 7630var YAML_NODE_KINDS = [ 7631 'scalar', 7632 'sequence', 7633 'mapping' 7634]; 7635 7636function compileStyleAliases(map) { 7637 var result = {}; 7638 7639 if (map !== null) {
7640 Object.keys(map).forEach(function (style) { 7641 map[style].forEach(function (alias) { 7642 result[String(alias)] = style; 7643 }); 7644 }); 7645 } 7646 7647 return result; 7648} 7649 7650function Type(tag, options) { 7651 options = options || {}; 7652 7653 Object.keys(options).forEach(function (name) { 7654 if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { 7655 throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); 7656 } 7657 }); 7658 7659 // TODO: Add tag format check. 7660 this.options = options; // keep original options in case user wants to extend this type later 7661 this.tag = tag; 7662 this.kind = options['kind'] || null; 7663 this.resolve = options['resolve'] || function () { return true; }; 7664 this.construct = options['construct'] || function (data) { return data; }; 7665 this.instanceOf = options['instanceOf'] || null; 7666 this.predicate = options['predicate'] || null; 7667 this.represent = options['represent'] || null; 7668 this.representName = options['representName'] || null; 7669 this.defaultStyle = options['defaultStyle'] || null; 7670 this.multi = options['multi'] || false; 7671 this.styleAliases = compileStyleAliases(options['styleAliases'] || null); 7672 7673 if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { 7674 throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); 7675 } 7676} 7677 7678module.exports = Type; 7679 7680 7681/***/ }), 7682 7683/***/ 531: 7684/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 7685 7686"use strict"; 7687 7688 7689/*eslint-disable no-bitwise*/ 7690 7691 7692var Type = __webpack_require__(364); 7693 7694 7695// [ 64, 65, 66 ] -> [ padding, CR, LF ] 7696var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; 7697 7698 7699function resolveYamlBinary(data) { 7700 if (data === null) return false; 7701 7702 var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; 7703 7704 // Convert one by one. 7705 for (idx = 0; idx < max; idx++) { 7706 code = map.indexOf(data.charAt(idx)); 7707 7708 // Skip CR/LF 7709 if (code > 64) continue; 7710 7711 // Fail on illegal characters 7712 if (code < 0) return false; 7713 7714 bitlen += 6; 7715 } 7716 7717 // If there are any bits left, source was corrupted 7718 return (bitlen % 8) === 0; 7719} 7720 7721function constructYamlBinary(data) { 7722 var idx, tailbits, 7723 input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan 7724 max = input.length, 7725 map = BASE64_MAP, 7726 bits = 0, 7727 result = []; 7728 7729 // Collect by 6*4 bits (3 bytes) 7730 7731 for (idx = 0; idx < max; idx++) { 7732 if ((idx % 4 === 0) && idx) { 7733 result.push((bits >> 16) & 0xFF); 7734 result.push((bits >> 8) & 0xFF); 7735 result.push(bits & 0xFF); 7736 } 7737 7738 bits = (bits << 6) | map.indexOf(input.charAt(idx)); 7739 } 7740 7741 // Dump tail 7742 7743 tailbits = (max % 4) * 6; 7744 7745 if (tailbits === 0) { 7746 result.push((bits >> 16) & 0xFF); 7747 result.push((bits >> 8) & 0xFF); 7748 result.push(bits & 0xFF); 7749 } else if (tailbits === 18) { 7750 result.push((bits >> 10) & 0xFF); 7751 result.push((bits >> 2) & 0xFF); 7752 } else if (tailbits === 12) { 7753 result.push((bits >> 4) & 0xFF); 7754 } 7755 7756 return new Uint8Array(result); 7757} 7758 7759function representYamlBinary(object /*, style*/) { 7760 var result = '', bits = 0, idx, tail, 7761 max = object.length, 7762 map = BASE64_MAP; 7763 7764 // Convert every three bytes to 4 ASCII characters. 7765 7766 for (idx = 0; idx < max; idx++) { 7767 if ((idx % 3 === 0) && idx) { 7768 result += map[(bits >> 18) & 0x3F]; 7769 result += map[(bits >> 12) & 0x3F]; 7770 result += map[(bits >> 6) & 0x3F]; 7771 result += map[bits & 0x3F]; 7772 } 7773 7774 bits = (bits << 8) + object[idx]; 7775 } 7776 7777 // Dump tail 7778 7779 tail = max % 3; 7780 7781 if (tail === 0) { 7782 result += map[(bits >> 18) & 0x3F]; 7783 result += map[(bits >> 12) & 0x3F]; 7784 result += map[(bits >> 6) & 0x3F]; 7785 result += map[bits & 0x3F]; 7786 } else if (tail === 2) { 7787 result += map[(bits >> 10) & 0x3F]; 7788 result += map[(bits >> 4) & 0x3F]; 7789 result += map[(bits << 2) & 0x3F]; 7790 result += map[64]; 7791 } else if (tail === 1) { 7792 result += map[(bits >> 2) & 0x3F]; 7793 result += map[(bits << 4) & 0x3F]; 7794 result += map[64]; 7795 result += map[64]; 7796 } 7797 7798 return result; 7799} 7800 7801function isBinary(obj) { 7802 return Object.prototype.toString.call(obj) === '[object Uint8Array]'; 7803} 7804 7805module.exports = new Type('tag:yaml.org,2002:binary', { 7806 kind: 'scalar', 7807 resolve: resolveYamlBinary, 7808 construct: constructYamlBinary, 7809 predicate: isBinary, 7810 represent: representYamlBinary 7811}); 7812 7813 7814/***/ }), 7815 7816/***/ 771: 7817/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 7818 7819"use strict"; 7820 7821 7822var Type = __webpack_require__(364); 7823 7824function resolveYamlBoolean(data) { 7825 if (data === null) return false;
7826 7827 var max = data.length; 7828 7829 return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || 7830 (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); 7831} 7832 7833function constructYamlBoolean(data) { 7834 return data === 'true' || 7835 data === 'True' || 7836 data === 'TRUE'; 7837} 7838 7839function isBoolean(object) { 7840 return Object.prototype.toString.call(object) === '[object Boolean]'; 7841} 7842 7843module.exports = new Type('tag:yaml.org,2002:bool', { 7844 kind: 'scalar', 7845 resolve: resolveYamlBoolean, 7846 construct: constructYamlBoolean, 7847 predicate: isBoolean, 7848 represent: { 7849 lowercase: function (object) { return object ? 'true' : 'false'; }, 7850 uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, 7851 camelcase: function (object) { return object ? 'True' : 'False'; } 7852 }, 7853 defaultStyle: 'lowercase' 7854}); 7855 7856 7857/***/ }), 7858 7859/***/ 215: 7860/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 7861 7862"use strict"; 7863 7864 7865var common = __webpack_require__(347); 7866var Type = __webpack_require__(364); 7867 7868var YAML_FLOAT_PATTERN = new RegExp( 7869 // 2.5e4, 2.5 and integers 7870 '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + 7871 // .2e4, .2 7872 // special case, seems not from spec 7873 '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + 7874 // .inf 7875 '|[-+]?\\.(?:inf|Inf|INF)' + 7876 // .nan 7877 '|\\.(?:nan|NaN|NAN))$'); 7878 7879function resolveYamlFloat(data) { 7880 if (data === null) return false; 7881 7882 if (!YAML_FLOAT_PATTERN.test(data) || 7883 // Quick hack to not allow integers end with `_` 7884 // Probably should update regexp & check speed 7885 data[data.length - 1] === '_') { 7886 return false; 7887 } 7888 7889 return true; 7890} 7891 7892function constructYamlFloat(data) { 7893 var value, sign; 7894 7895 value = data.replace(/_/g, '').toLowerCase(); 7896 sign = value[0] === '-' ? -1 : 1; 7897 7898 if ('+-'.indexOf(value[0]) >= 0) { 7899 value = value.slice(1); 7900 } 7901 7902 if (value === '.inf') { 7903 return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; 7904 7905 } else if (value === '.nan') { 7906 return NaN; 7907 } 7908 return sign * parseFloat(value, 10); 7909} 7910 7911 7912var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; 7913 7914function representYamlFloat(object, style) { 7915 var res; 7916 7917 if (isNaN(object)) { 7918 switch (style) { 7919 case 'lowercase': return '.nan'; 7920 case 'uppercase': return '.NAN'; 7921 case 'camelcase': return '.NaN'; 7922 } 7923 } else if (Number.POSITIVE_INFINITY === object) { 7924 switch (style) { 7925 case 'lowercase': return '.inf'; 7926 case 'uppercase': return '.INF'; 7927 case 'camelcase': return '.Inf'; 7928 } 7929 } else if (Number.NEGATIVE_INFINITY === object) { 7930 switch (style) { 7931 case 'lowercase': return '-.inf'; 7932 case 'uppercase': return '-.INF'; 7933 case 'camelcase': return '-.Inf'; 7934 } 7935 } else if (common.isNegativeZero(object)) { 7936 return '-0.0'; 7937 } 7938 7939 res = object.toString(10); 7940 7941 // JS stringifier can build scientific format without dots: 5e-100, 7942 // while YAML requres dot: 5.e-100. Fix it with simple hack 7943 7944 return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; 7945} 7946 7947function isFloat(object) { 7948 return (Object.prototype.toString.call(object) === '[object Number]') && 7949 (object % 1 !== 0 || common.isNegativeZero(object)); 7950} 7951 7952module.exports = new Type('tag:yaml.org,2002:float', { 7953 kind: 'scalar', 7954 resolve: resolveYamlFloat, 7955 construct: constructYamlFloat, 7956 predicate: isFloat, 7957 represent: representYamlFloat, 7958 defaultStyle: 'lowercase' 7959}); 7960 7961 7962/***/ }), 7963 7964/***/ 518: 7965/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 7966 7967"use strict"; 7968 7969 7970var common = __webpack_require__(347); 7971var Type = __webpack_require__(364); 7972 7973function isHexCode(c) { 7974 return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || 7975 ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || 7976 ((0x61/* a */ <= c) && (c <= 0x66/* f */)); 7977} 7978 7979function isOctCode(c) { 7980 return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); 7981} 7982 7983function isDecCode(c) { 7984 return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); 7985} 7986 7987function resolveYamlInteger(data) { 7988 if (data === null) return false; 7989 7990 var max = data.length, 7991 index = 0, 7992 hasDigits = false, 7993 ch; 7994 7995 if (!max) return false;
7996 7997 ch = data[index]; 7998 7999 // sign 8000 if (ch === '-' || ch === '+') { 8001 ch = data[++index]; 8002 } 8003 8004 if (ch === '0') { 8005 // 0 8006 if (index + 1 === max) return true; 8007 ch = data[++index]; 8008 8009 // base 2, base 8, base 16 8010 8011 if (ch === 'b') { 8012 // base 2 8013 index++; 8014 8015 for (; index < max; index++) { 8016 ch = data[index]; 8017 if (ch === '_') continue; 8018 if (ch !== '0' && ch !== '1') return false; 8019 hasDigits = true; 8020 } 8021 return hasDigits && ch !== '_'; 8022 } 8023 8024 8025 if (ch === 'x') { 8026 // base 16 8027 index++; 8028 8029 for (; index < max; index++) { 8030 ch = data[index]; 8031 if (ch === '_') continue; 8032 if (!isHexCode(data.charCodeAt(index))) return false; 8033 hasDigits = true; 8034 } 8035 return hasDigits && ch !== '_'; 8036 } 8037 8038 8039 if (ch === 'o') { 8040 // base 8 8041 index++; 8042 8043 for (; index < max; index++) { 8044 ch = data[index]; 8045 if (ch === '_') continue; 8046 if (!isOctCode(data.charCodeAt(index))) return false; 8047 hasDigits = true; 8048 } 8049 return hasDigits && ch !== '_'; 8050 } 8051 } 8052 8053 // base 10 (except 0) 8054 8055 // value should not start with `_`; 8056 if (ch === '_') return false; 8057 8058 for (; index < max; index++) { 8059 ch = data[index]; 8060 if (ch === '_') continue; 8061 if (!isDecCode(data.charCodeAt(index))) { 8062 return false; 8063 } 8064 hasDigits = true; 8065 } 8066 8067 // Should have digits and should not end with `_` 8068 if (!hasDigits || ch === '_') return false; 8069 8070 return true; 8071} 8072 8073function constructYamlInteger(data) { 8074 var value = data, sign = 1, ch; 8075 8076 if (value.indexOf('_') !== -1) { 8077 value = value.replace(/_/g, ''); 8078 } 8079 8080 ch = value[0]; 8081 8082 if (ch === '-' || ch === '+') { 8083 if (ch === '-') sign = -1; 8084 value = value.slice(1); 8085 ch = value[0]; 8086 } 8087 8088 if (value === '0') return 0; 8089 8090 if (ch === '0') { 8091 if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); 8092 if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); 8093 if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); 8094 } 8095 8096 return sign * parseInt(value, 10); 8097} 8098 8099function isInteger(object) { 8100 return (Object.prototype.toString.call(object)) === '[object Number]' && 8101 (object % 1 === 0 && !common.isNegativeZero(object)); 8102} 8103 8104module.exports = new Type('tag:yaml.org,2002:int', { 8105 kind: 'scalar', 8106 resolve: resolveYamlInteger, 8107 construct: constructYamlInteger, 8108 predicate: isInteger, 8109 represent: { 8110 binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, 8111 octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, 8112 decimal: function (obj) { return obj.toString(10); }, 8113 /* eslint-disable max-len */ 8114 hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } 8115 }, 8116 defaultStyle: 'decimal', 8117 styleAliases: { 8118 binary: [ 2, 'bin' ], 8119 octal: [ 8, 'oct' ], 8120 decimal: [ 10, 'dec' ], 8121 hexadecimal: [ 16, 'hex' ] 8122 } 8123}); 8124 8125 8126/***/ }), 8127 8128/***/ 945: 8129/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 8130 8131"use strict"; 8132 8133 8134var Type = __webpack_require__(364); 8135 8136module.exports = new Type('tag:yaml.org,2002:map', { 8137 kind: 'mapping', 8138 construct: function (data) { return data !== null ? data : {}; } 8139}); 8140 8141 8142/***/ }), 8143 8144/***/ 452: 8145/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 8146 8147"use strict"; 8148 8149 8150var Type = __webpack_require__(364); 8151 8152function resolveYamlMerge(data) { 8153 return data === '<<' || data === null; 8154} 8155 8156module.exports = new Type('tag:yaml.org,2002:merge', { 8157 kind: 'scalar', 8158 resolve: resolveYamlMerge 8159}); 8160 8161 8162/***/ }), 8163 8164/***/ 151: 8165/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 8166 8167"use strict"; 8168 8169 8170var Type = __webpack_require__(364); 8171 8172function resolveYamlNull(data) { 8173 if (data === null) return true; 8174 8175 var max = data.length; 8176 8177 return (max === 1 && data === '~') || 8178 (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); 8179} 8180 8181function constructYamlNull() { 8182 return null; 8183} 8184 8185function isNull(object) { 8186 return object === null; 8187} 8188 8189module.exports = new Type('tag:yaml.org,2002:null', { 8190 kind: 'scalar', 8191 resolve: resolveYamlNull, 8192 construct: constructYamlNull, 8193 predicate: isNull, 8194 represent: { 8195 canonical: function () { return '~'; }, 8196 lowercase: function () { return 'null'; }, 8197 uppercase: function () { return 'NULL'; }, 8198 camelcase: function () { return 'Null'; }, 8199 empty: function () { return ''; } 8200 }, 8201 defaultStyle: 'lowercase' 8202}); 8203 8204 8205/***/ }), 8206 8207/***/ 605: 8208/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 8209 8210"use strict"; 8211 8212 8213var Type = __webpack_require__(364); 8214 8215var _hasOwnProperty = Object.prototype.hasOwnProperty; 8216var _toString = Object.prototype.toString; 8217 8218function resolveYamlOmap(data) { 8219 if (data === null) return true; 8220 8221 var objectKeys = [], index, length, pair, pairKey, pairHasKey, 8222 object = data; 8223 8224 for (index = 0, length = object.length; index < length; index += 1) { 8225 pair = object[index]; 8226 pairHasKey = false;
8227 8228 if (_toString.call(pair) !== '[object Object]') return false; 8229 8230 for (pairKey in pair) { 8231 if (_hasOwnProperty.call(pair, pairKey)) { 8232 if (!pairHasKey) pairHasKey = true; 8233 else return false; 8234 } 8235 } 8236 8237 if (!pairHasKey) return false; 8238 8239 if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); 8240 else return false; 8241 } 8242 8243 return true; 8244} 8245 8246function constructYamlOmap(data) { 8247 return data !== null ? data : []; 8248} 8249 8250module.exports = new Type('tag:yaml.org,2002:omap', { 8251 kind: 'sequence', 8252 resolve: resolveYamlOmap, 8253 construct: constructYamlOmap 8254}); 8255 8256 8257/***/ }), 8258 8259/***/ 879: 8260/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 8261 8262"use strict"; 8263 8264 8265var Type = __webpack_require__(364); 8266 8267var _toString = Object.prototype.toString; 8268 8269function resolveYamlPairs(data) { 8270 if (data === null) return true; 8271 8272 var index, length, pair, keys, result, 8273 object = data; 8274 8275 result = new Array(object.length); 8276 8277 for (index = 0, length = object.length; index < length; index += 1) { 8278 pair = object[index]; 8279 8280 if (_toString.call(pair) !== '[object Object]') return false; 8281 8282 keys = Object.keys(pair); 8283 8284 if (keys.length !== 1) return false; 8285 8286 result[index] = [ keys[0], pair[keys[0]] ]; 8287 } 8288 8289 return true; 8290} 8291 8292function constructYamlPairs(data) { 8293 if (data === null) return []; 8294 8295 var index, length, pair, keys, result, 8296 object = data; 8297 8298 result = new Array(object.length); 8299 8300 for (index = 0, length = object.length; index < length; index += 1) { 8301 pair = object[index]; 8302 8303 keys = Object.keys(pair); 8304 8305 result[index] = [ keys[0], pair[keys[0]] ]; 8306 } 8307 8308 return result; 8309} 8310 8311module.exports = new Type('tag:yaml.org,2002:pairs', { 8312 kind: 'sequence', 8313 resolve: resolveYamlPairs, 8314 construct: constructYamlPairs 8315}); 8316 8317 8318/***/ }), 8319 8320/***/ 451: 8321/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 8322 8323"use strict"; 8324 8325 8326var Type = __webpack_require__(364); 8327 8328module.exports = new Type('tag:yaml.org,2002:seq', { 8329 kind: 'sequence', 8330 construct: function (data) { return data !== null ? data : []; } 8331}); 8332 8333 8334/***/ }), 8335 8336/***/ 982: 8337/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 8338 8339"use strict"; 8340 8341 8342var Type = __webpack_require__(364); 8343 8344var _hasOwnProperty = Object.prototype.hasOwnProperty; 8345 8346function resolveYamlSet(data) { 8347 if (data === null) return true; 8348 8349 var key, object = data; 8350 8351 for (key in object) { 8352 if (_hasOwnProperty.call(object, key)) { 8353 if (object[key] !== null) return false; 8354 } 8355 } 8356 8357 return true; 8358} 8359 8360function constructYamlSet(data) { 8361 return data !== null ? data : {}; 8362} 8363 8364module.exports = new Type('tag:yaml.org,2002:set', { 8365 kind: 'mapping', 8366 resolve: resolveYamlSet, 8367 construct: constructYamlSet 8368}); 8369 8370 8371/***/ }), 8372 8373/***/ 48: 8374/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 8375 8376"use strict"; 8377 8378 8379var Type = __webpack_require__(364); 8380 8381module.exports = new Type('tag:yaml.org,2002:str', { 8382 kind: 'scalar', 8383 construct: function (data) { return data !== null ? data : ''; } 8384}); 8385 8386 8387/***/ }), 8388 8389/***/ 156: 8390/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 8391 8392"use strict"; 8393 8394 8395var Type = __webpack_require__(364); 8396 8397var YAML_DATE_REGEXP = new RegExp( 8398 '^([0-9][0-9][0-9][0-9])' + // [1] year 8399 '-([0-9][0-9])' + // [2] month 8400 '-([0-9][0-9])$'); // [3] day 8401 8402var YAML_TIMESTAMP_REGEXP = new RegExp( 8403 '^([0-9][0-9][0-9][0-9])' + // [1] year 8404 '-([0-9][0-9]?)' + // [2] month 8405 '-([0-9][0-9]?)' + // [3] day 8406 '(?:[Tt]|[ \\t]+)' + // ... 8407 '([0-9][0-9]?)' + // [4] hour 8408 ':([0-9][0-9])' + // [5] minute 8409 ':([0-9][0-9])' + // [6] second 8410 '(?:\\.([0-9]*))?' + // [7] fraction 8411 '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour 8412 '(?::([0-9][0-9]))?))?$'); // [11] tz_minute 8413 8414function resolveYamlTimestamp(data) { 8415 if (data === null) return false; 8416 if (YAML_DATE_REGEXP.exec(data) !== null) return true; 8417 if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; 8418 return false;
8419} 8420 8421function constructYamlTimestamp(data) { 8422 var match, year, month, day, hour, minute, second, fraction = 0, 8423 delta = null, tz_hour, tz_minute, date; 8424 8425 match = YAML_DATE_REGEXP.exec(data); 8426 if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); 8427 8428 if (match === null) throw new Error('Date resolve error'); 8429 8430 // match: [1] year [2] month [3] day 8431 8432 year = +(match[1]); 8433 month = +(match[2]) - 1; // JS month starts with 0 8434 day = +(match[3]); 8435 8436 if (!match[4]) { // no hour 8437 return new Date(Date.UTC(year, month, day)); 8438 } 8439 8440 // match: [4] hour [5] minute [6] second [7] fraction 8441 8442 hour = +(match[4]); 8443 minute = +(match[5]); 8444 second = +(match[6]); 8445 8446 if (match[7]) { 8447 fraction = match[7].slice(0, 3); 8448 while (fraction.length < 3) { // milli-seconds 8449 fraction += '0'; 8450 } 8451 fraction = +fraction; 8452 } 8453 8454 // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute 8455 8456 if (match[9]) { 8457 tz_hour = +(match[10]); 8458 tz_minute = +(match[11] || 0); 8459 delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds 8460 if (match[9] === '-') delta = -delta; 8461 } 8462 8463 date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); 8464 8465 if (delta) date.setTime(date.getTime() - delta); 8466 8467 return date; 8468} 8469 8470function representYamlTimestamp(object /*, style*/) { 8471 return object.toISOString(); 8472} 8473 8474module.exports = new Type('tag:yaml.org,2002:timestamp', { 8475 kind: 'scalar', 8476 resolve: resolveYamlTimestamp, 8477 construct: constructYamlTimestamp, 8478 instanceOf: Date, 8479 represent: representYamlTimestamp 8480}); 8481 8482 8483/***/ }), 8484 8485/***/ 578: 8486/***/ (function(module, exports) { 8487 8488/** 8489 * lite-url - Small, JS lib that uses regex for parsing a URL into it's component parts. 8490 * @version v1.0.5 8491 * @link https://github.com/sadams/lite-url 8492 * @license BSD-3-Clause 8493 */ 8494(function(){"use strict";function r(r,n,t){var e=r.split(n),o=e.shift();return t(o,e.join(n))}function n(n){var t={hash:"",host:"",hostname:"",origin:"",pathname:"",protocol:"",search:"",password:"",username:"",port:""};return r(n,"#",function(n,e){e&&(t.hash=e?"#"+e:""),r(n,"?",function(n,e){e&&(t.search="?"+e),n&&r(n,"//",function(n,e){t.protocol=n,r(e,"/",function(n,e){t.pathname="/"+(e||""),(t.protocol||n)&&(t.origin=t.protocol+"//"+n),r(n,"@",function(n,e){if(e){var o=n.split(":");t.username=o[0],t.password=o[1]}else e=n;t.host=e,r(e,":",function(r,n){t.hostname=r,n&&(t.port=n)})})})})})}),t.href=t.origin+t.pathname+t.search+t.hash,t}function t(r){var n={},t=r.search;if(t){t=t.replace(new RegExp("\\?"),"");var e=t.split("&");for(var o in e)if(e.hasOwnProperty(o)&&e[o]){var i=e[o].split("=");n[i[0]]=i[1]}}return n}function e(r){var e=i[r];return"undefined"!=typeof e?e:(e=n(r),e.params=t(e),i[r]=e,e)}var o=this,i={};return e.changeQueryParser=function(r){t=r}, true?( true&&module.exports&&(exports=module.exports=e),exports.liteURL=e):0,e}).call(this); 8495 8496 8497/***/ }), 8498 8499/***/ 979: 8500/***/ (function(module, exports, __webpack_require__) { 8501 8502var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/** 8503 * Copyright 2015 Tim Down. 8504 * 8505 * Licensed under the Apache License, Version 2.0 (the "License"); 8506 * you may not use this file except in compliance with the License. 8507 * You may obtain a copy of the License at 8508 * 8509 * http://www.apache.org/licenses/LICENSE-2.0 8510 * 8511 * Unless required by applicable law or agreed to in writing, software 8512 * distributed under the License is distributed on an "AS IS" BASIS, 8513 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 8514 * See the License for the specific language governing permissions and 8515 * limitations under the License. 8516 */ 8517 8518 8519(function(factory,root){if(true){!(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), 8520 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 8521 (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : 8522 __WEBPACK_AMD_DEFINE_FACTORY__), 8523 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));}else {}})(function(){if(!Array.prototype.push){Array.prototype.push=function(){for(var i=0,len=arguments.length;i<len;i++){this[this.length]=arguments[i];} 8524return this.length;};} 8525if(!Array.prototype.shift){Array.prototype.shift=function(){if(this.length>0){var firstItem=this[0];for(var i=0,len=this.length-1;i<len;i++){this[i]=this[i+1];} 8526this.length=this.length-1;return firstItem;}};} 8527if(!Array.prototype.splice){Array.prototype.splice=function(startIndex,deleteCount){var itemsAfterDeleted=this.slice(startIndex+deleteCount);var itemsDeleted=this.slice(startIndex,startIndex+deleteCount);this.length=startIndex;var argumentsArray=[];for(var i=0,len=arguments.length;i<len;i++){argumentsArray[i]=arguments[i];} 8528var itemsToAppend=(argumentsArray.length>2)?itemsAfterDeleted=argumentsArray.slice(2).concat(itemsAfterDeleted):itemsAfterDeleted;for(i=0,len=itemsToAppend.length;i<len;i++){this.push(itemsToAppend[i]);} 8529return itemsDeleted;};} 8530function isUndefined(obj){return typeof obj=="undefined";} 8531function EventSupport(){} 8532EventSupport.prototype={eventTypes:[],eventListeners:{},setEventTypes:function(eventTypesParam){if(eventTypesParam instanceof Array){this.eventTypes=eventTypesParam;this.eventListeners={};for(var i=0,len=this.eventTypes.length;i<len;i++){this.eventListeners[this.eventTypes[i]]=[];}}else{handleError("log4javascript.EventSupport ["+this+"]: setEventTypes: eventTypes parameter must be an Array");}},addEventListener:function(eventType,listener){if(typeof listener=="function"){if(!array_contains(this.eventTypes,eventType)){handleError("log4javascript.EventSupport ["+this+"]: addEventListener: no event called '"+eventType+"'");} 8533this.eventListeners[eventType].push(listener);}else{handleError("log4javascript.EventSupport ["+this+"]: addEventListener: listener must be a function");}},removeEventListener:function(eventType,listener){if(typeof listener=="function"){if(!array_contains(this.eventTypes,eventType)){handleError("log4javascript.EventSupport ["+this+"]: removeEventListener: no event called '"+eventType+"'");} 8534array_remove(this.eventListeners[eventType],listener);}else{handleError("log4javascript.EventSupport ["+this+"]: removeEventListener: listener must be a function");}},dispatchEvent:function(eventType,eventArgs){if(array_contains(this.eventTypes,eventType)){var listeners=this.eventListeners[eventType];for(var i=0,len=listeners.length;i<len;i++){listeners[i](this,eventType,eventArgs);}}else{handleError("log4javascript.EventSupport ["+this+"]: dispatchEvent: no event called '"+eventType+"'");}}};var applicationStartDate=new Date();var uniqueId="log4javascript_"+applicationStartDate.getTime()+"_"+ 8535Math.floor(Math.random()*100000000);var emptyFunction=function(){};var newLine="\r\n";var pageLoaded=false;function Log4JavaScript(){} 8536Log4JavaScript.prototype=new EventSupport();var log4javascript=new Log4JavaScript();log4javascript.version="1.4.13";log4javascript.edition="log4javascript";function toStr(obj){if(obj&&obj.toString){return obj.toString();}else{return String(obj);}} 8537function getExceptionMessage(ex){if(ex.message){return ex.message;}else if(ex.description){return ex.description;}else{return toStr(ex);}} 8538function getUrlFileName(url){var lastSlashIndex=Math.max(url.lastIndexOf("/"),url.lastIndexOf("\\"));return url.substr(lastSlashIndex+1);}
8539function getExceptionStringRep(ex){if(ex){var exStr="Exception: "+getExceptionMessage(ex);try{if(ex.lineNumber){exStr+=" on line number "+ex.lineNumber;} 8540if(ex.fileName){exStr+=" in file "+getUrlFileName(ex.fileName);}}catch(localEx){logLog.warn("Unable to obtain file and line information for error");} 8541if(showStackTraces&&ex.stack){exStr+=newLine+"Stack trace:"+newLine+ex.stack;} 8542return exStr;} 8543return null;} 8544function bool(obj){return Boolean(obj);} 8545function trim(str){return str.replace(/^\s+/,"").replace(/\s+$/,"");} 8546function splitIntoLines(text){var text2=text.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return text2.split("\n");} 8547var urlEncode=(typeof window.encodeURIComponent!="undefined")?function(str){return encodeURIComponent(str);}:function(str){return escape(str).replace(/\+/g,"%2B").replace(/"/g,"%22").replace(/'/g,"%27").replace(/\//g,"%2F").replace(/=/g,"%3D");};function array_remove(arr,val){var index=-1;for(var i=0,len=arr.length;i<len;i++){if(arr[i]===val){index=i;break;}} 8548if(index>=0){arr.splice(index,1);return true;}else{return false;}} 8549function array_contains(arr,val){for(var i=0,len=arr.length;i<len;i++){if(arr[i]==val){return true;}} 8550return false;} 8551function extractBooleanFromParam(param,defaultValue){if(isUndefined(param)){return defaultValue;}else{return bool(param);}} 8552function extractStringFromParam(param,defaultValue){if(isUndefined(param)){return defaultValue;}else{return String(param);}} 8553function extractIntFromParam(param,defaultValue){if(isUndefined(param)){return defaultValue;}else{try{var value=parseInt(param,10);return isNaN(value)?defaultValue:value;}catch(ex){logLog.warn("Invalid int param "+param,ex);return defaultValue;}}} 8554function extractFunctionFromParam(param,defaultValue){if(typeof param=="function"){return param;}else{return defaultValue;}} 8555function isError(err){return(err instanceof Error);} 8556if(!Function.prototype.apply){Function.prototype.apply=function(obj,args){var methodName="__apply__";if(typeof obj[methodName]!="undefined"){methodName+=String(Math.random()).substr(2);} 8557obj[methodName]=this;var argsStrings=[];for(var i=0,len=args.length;i<len;i++){argsStrings[i]="args["+i+"]";} 8558var script="obj."+methodName+"("+argsStrings.join(",")+")";var returnValue=eval(script);delete obj[methodName];return returnValue;};} 8559if(!Function.prototype.call){Function.prototype.call=function(obj){var args=[];for(var i=1,len=arguments.length;i<len;i++){args[i-1]=arguments[i];} 8560return this.apply(obj,args);};} 8561var logLog={quietMode:false,debugMessages:[],setQuietMode:function(quietMode){this.quietMode=bool(quietMode);},numberOfErrors:0,alertAllErrors:false,setAlertAllErrors:function(alertAllErrors){this.alertAllErrors=alertAllErrors;},debug:function(message){this.debugMessages.push(message);},displayDebug:function(){alert(this.debugMessages.join(newLine));},warn:function(message,exception){},error:function(message,exception){if(++this.numberOfErrors==1||this.alertAllErrors){if(!this.quietMode){var alertMessage="log4javascript error: "+message;if(exception){alertMessage+=newLine+newLine+"Original error: "+getExceptionStringRep(exception);} 8562alert(alertMessage);}}}};log4javascript.logLog=logLog;log4javascript.setEventTypes(["load","error"]);function handleError(message,exception){logLog.error(message,exception);log4javascript.dispatchEvent("error",{"message":message,"exception":exception});} 8563log4javascript.handleError=handleError;var enabled=!((typeof log4javascript_disabled!="undefined")&&log4javascript_disabled);log4javascript.setEnabled=function(enable){enabled=bool(enable);};log4javascript.isEnabled=function(){return enabled;};var useTimeStampsInMilliseconds=true;log4javascript.setTimeStampsInMilliseconds=function(timeStampsInMilliseconds){useTimeStampsInMilliseconds=bool(timeStampsInMilliseconds);};log4javascript.isTimeStampsInMilliseconds=function(){return useTimeStampsInMilliseconds;};log4javascript.evalInScope=function(expr){return eval(expr);};var showStackTraces=false;log4javascript.setShowStackTraces=function(show){showStackTraces=bool(show);};var Level=function(level,name){this.level=level;this.name=name;};Level.prototype={toString:function(){return this.name;},equals:function(level){return this.level==level.level;},isGreaterOrEqual:function(level){return this.level>=level.level;}};Level.ALL=new Level(Number.MIN_VALUE,"ALL");Level.TRACE=new Level(10000,"TRACE");Level.DEBUG=new Level(20000,"DEBUG");Level.INFO=new Level(30000,"INFO");Level.WARN=new Level(40000,"WARN");Level.ERROR=new Level(50000,"ERROR");Level.FATAL=new Level(60000,"FATAL");Level.OFF=new Level(Number.MAX_VALUE,"OFF");log4javascript.Level=Level;function Timer(name,level){this.name=name;this.level=isUndefined(level)?Level.INFO:level;this.start=new Date();} 8564Timer.prototype.getElapsedTime=function(){return new Date().getTime()-this.start.getTime();};var anonymousLoggerName="[anonymous]";var defaultLoggerName="[default]";var nullLoggerName="[null]";var rootLoggerName="root";function Logger(name){this.name=name;this.parent=null;this.children=[];var appenders=[];var loggerLevel=null;
8564var isRoot=(this.name===rootLoggerName);var isNull=(this.name===nullLoggerName);var appenderCache=null;var appenderCacheInvalidated=false;this.addChild=function(childLogger){this.children.push(childLogger);childLogger.parent=this;childLogger.invalidateAppenderCache();};var additive=true;this.getAdditivity=function(){return additive;};this.setAdditivity=function(additivity){var valueChanged=(additive!=additivity);additive=additivity;if(valueChanged){this.invalidateAppenderCache();}};this.addAppender=function(appender){if(isNull){handleError("Logger.addAppender: you may not add an appender to the null logger");}else{if(appender instanceof log4javascript.Appender){if(!array_contains(appenders,appender)){appenders.push(appender);appender.setAddedToLogger(this);this.invalidateAppenderCache();}}else{handleError("Logger.addAppender: appender supplied ('"+ 8565toStr(appender)+"') is not a subclass of Appender");}}};this.removeAppender=function(appender){array_remove(appenders,appender);appender.setRemovedFromLogger(this);this.invalidateAppenderCache();};this.removeAllAppenders=function(){var appenderCount=appenders.length;if(appenderCount>0){for(var i=0;i<appenderCount;i++){appenders[i].setRemovedFromLogger(this);} 8566appenders.length=0;this.invalidateAppenderCache();}};this.getEffectiveAppenders=function(){if(appenderCache===null||appenderCacheInvalidated){var parentEffectiveAppenders=(isRoot||!this.getAdditivity())?[]:this.parent.getEffectiveAppenders();appenderCache=parentEffectiveAppenders.concat(appenders);appenderCacheInvalidated=false;} 8567return appenderCache;};this.invalidateAppenderCache=function(){appenderCacheInvalidated=true;for(var i=0,len=this.children.length;i<len;i++){this.children[i].invalidateAppenderCache();}};this.log=function(level,params){if(enabled&&level.isGreaterOrEqual(this.getEffectiveLevel())){var exception;var finalParamIndex=params.length-1;var lastParam=params[finalParamIndex];if(params.length>1&&isError(lastParam)){exception=lastParam;finalParamIndex--;} 8568var messages=[];for(var i=0;i<=finalParamIndex;i++){messages[i]=params[i];} 8569var loggingEvent=new LoggingEvent(this,new Date(),level,messages,exception);this.callAppenders(loggingEvent);}};this.callAppenders=function(loggingEvent){var effectiveAppenders=this.getEffectiveAppenders();for(var i=0,len=effectiveAppenders.length;i<len;i++){effectiveAppenders[i].doAppend(loggingEvent);}};this.setLevel=function(level){if(isRoot&&level===null){handleError("Logger.setLevel: you cannot set the level of the root logger to null");}else if(level instanceof Level){loggerLevel=level;}else{handleError("Logger.setLevel: level supplied to logger "+ 8570this.name+" is not an instance of log4javascript.Level");}};this.getLevel=function(){return loggerLevel;};this.getEffectiveLevel=function(){for(var logger=this;logger!==null;logger=logger.parent){var level=logger.getLevel();if(level!==null){return level;}}};this.group=function(name,initiallyExpanded){if(enabled){var effectiveAppenders=this.getEffectiveAppenders();for(var i=0,len=effectiveAppenders.length;i<len;i++){effectiveAppenders[i].group(name,initiallyExpanded);}}};this.groupEnd=function(){if(enabled){var effectiveAppenders=this.getEffectiveAppenders();for(var i=0,len=effectiveAppenders.length;i<len;i++){effectiveAppenders[i].groupEnd();}}};var timers={};this.time=function(name,level){if(enabled){if(isUndefined(name)){handleError("Logger.time: a name for the timer must be supplied");}else if(level&&!(level instanceof Level)){handleError("Logger.time: level supplied to timer "+ 8571name+" is not an instance of log4javascript.Level");}else{timers[name]=new Timer(name,level);}}};this.timeEnd=function(name){if(enabled){if(isUndefined(name)){handleError("Logger.timeEnd: a name for the timer must be supplied");}else if(timers[name]){var timer=timers[name];var milliseconds=timer.getElapsedTime();this.log(timer.level,["Timer "+toStr(name)+" completed in "+milliseconds+"ms"]);delete timers[name];}else{logLog.warn("Logger.timeEnd: no timer found with name "+name);}}};this.assert=function(expr){if(enabled&&!expr){var args=[];for(var i=1,len=arguments.length;i<len;i++){args.push(arguments[i]);} 8572args=(args.length>0)?args:["Assertion Failure"];args.push(newLine);args.push(expr);this.log(Level.ERROR,args);}};this.toString=function(){return"Logger["+this.name+"]";};} 8573Logger.prototype={trace:function(){this.log(Level.TRACE,arguments);},debug:function(){this.log(Level.DEBUG,arguments);},info:function(){this.log(Level.INFO,arguments);},warn:function(){this.log(Level.WARN,arguments);},error:function(){this.log(Level.ERROR,arguments);},fatal:function(){this.log(Level.FATAL,arguments);},isEnabledFor:function(level){return level.isGreaterOrEqual(this.getEffectiveLevel());},isTraceEnabled:function(){return this.isEnabledFor(Level.TRACE);},isDebugEnabled:function(){return this.isEnabledFor(Level.DEBUG);},isInfoEnabled:function(){return this.isEnabledFor(Level.INFO);},isWarnEnabled:function(){return this.isEnabledFor(Level.WARN);},isErrorEnabled:function(){return this.isEnabledFor(Level.ERROR);},isFatalEnabled:function(){return this.isEnabledFor(Level.FATAL);}};Logger.prototype.trace.isEntryPoint=true;Logger.prototype.debug.isEntryPoint=true;Logger.prototype.info.isEntryPoint=true;Logger.prototype.warn.isEntryPoint=true;Logger.prototype.error.isEntryPoint=true;Logger.prototype.fatal.isEntryPoint=true;var loggers={};var loggerNames=[];var ROOT_LOGGER_DEFAULT_LEVEL=Level.DEBUG;var rootLogger=new Logger(rootLoggerName);rootLogger.setLevel(ROOT_LOGGER_DEFAULT_LEVEL);log4javascript.getRootLogger=function(){return rootLogger;};log4javascript.getLogger=function(loggerName){if(typeof loggerName!="string"){loggerName=anonymousLoggerName;logLog.warn("log4javascript.getLogger: non-string logger name "+
8574toStr(loggerName)+" supplied, returning anonymous logger");} 8575if(loggerName==rootLoggerName){handleError("log4javascript.getLogger: root logger may not be obtained by name");} 8576if(!loggers[loggerName]){var logger=new Logger(loggerName);loggers[loggerName]=logger;loggerNames.push(loggerName);var lastDotIndex=loggerName.lastIndexOf(".");var parentLogger;if(lastDotIndex>-1){var parentLoggerName=loggerName.substring(0,lastDotIndex);parentLogger=log4javascript.getLogger(parentLoggerName);}else{parentLogger=rootLogger;} 8577parentLogger.addChild(logger);} 8578return loggers[loggerName];};var defaultLogger=null;log4javascript.getDefaultLogger=function(){if(!defaultLogger){defaultLogger=createDefaultLogger();} 8579return defaultLogger;};var nullLogger=null;log4javascript.getNullLogger=function(){if(!nullLogger){nullLogger=new Logger(nullLoggerName);nullLogger.setLevel(Level.OFF);} 8580return nullLogger;};log4javascript.resetConfiguration=function(){rootLogger.setLevel(ROOT_LOGGER_DEFAULT_LEVEL);loggers={};};var LoggingEvent=function(logger,timeStamp,level,messages,exception){this.logger=logger;this.timeStamp=timeStamp;this.timeStampInMilliseconds=timeStamp.getTime();this.timeStampInSeconds=Math.floor(this.timeStampInMilliseconds/1000);this.milliseconds=this.timeStamp.getMilliseconds();this.level=level;this.messages=messages;this.exception=exception;};LoggingEvent.prototype={getThrowableStrRep:function(){return this.exception?getExceptionStringRep(this.exception):"";},getCombinedMessages:function(){return(this.messages.length==1)?this.messages[0]:this.messages.join(newLine);},toString:function(){return"LoggingEvent["+this.level+"]";}};log4javascript.LoggingEvent=LoggingEvent;var Layout=function(){};Layout.prototype={defaults:{loggerKey:"logger",timeStampKey:"timestamp",millisecondsKey:"milliseconds",levelKey:"level",messageKey:"message",exceptionKey:"exception",urlKey:"url"},loggerKey:"logger",timeStampKey:"timestamp",millisecondsKey:"milliseconds",levelKey:"level",messageKey:"message",exceptionKey:"exception",urlKey:"url",batchHeader:"",batchFooter:"",batchSeparator:"",returnsPostData:false,overrideTimeStampsSetting:false,useTimeStampsInMilliseconds:null,format:function(){handleError("Layout.format: layout supplied has no format() method");},ignoresThrowable:function(){handleError("Layout.ignoresThrowable: layout supplied has no ignoresThrowable() method");},getContentType:function(){return"text/plain";},allowBatching:function(){return true;},setTimeStampsInMilliseconds:function(timeStampsInMilliseconds){this.overrideTimeStampsSetting=true;this.useTimeStampsInMilliseconds=bool(timeStampsInMilliseconds);},isTimeStampsInMilliseconds:function(){return this.overrideTimeStampsSetting?this.useTimeStampsInMilliseconds:useTimeStampsInMilliseconds;},getTimeStampValue:function(loggingEvent){return this.isTimeStampsInMilliseconds()?loggingEvent.timeStampInMilliseconds:loggingEvent.timeStampInSeconds;},getDataValues:function(loggingEvent,combineMessages){var dataValues=[[this.loggerKey,loggingEvent.logger.name],[this.timeStampKey,this.getTimeStampValue(loggingEvent)],[this.levelKey,loggingEvent.level.name],[this.urlKey,window.location.href],[this.messageKey,combineMessages?loggingEvent.getCombinedMessages():loggingEvent.messages]];if(!this.isTimeStampsInMilliseconds()){dataValues.push([this.millisecondsKey,loggingEvent.milliseconds]);} 8581if(loggingEvent.exception){dataValues.push([this.exceptionKey,getExceptionStringRep(loggingEvent.exception)]);} 8582if(this.hasCustomFields()){for(var i=0,len=this.customFields.length;i<len;i++){var val=this.customFields[i].value;if(typeof val==="function"){val=val(this,loggingEvent);} 8583dataValues.push([this.customFields[i].name,val]);}} 8584return dataValues;},setKeys:function(loggerKey,timeStampKey,levelKey,messageKey,exceptionKey,urlKey,millisecondsKey){this.loggerKey=extractStringFromParam(loggerKey,this.defaults.loggerKey);this.timeStampKey=extractStringFromParam(timeStampKey,this.defaults.timeStampKey);this.levelKey=extractStringFromParam(levelKey,this.defaults.levelKey);this.messageKey=extractStringFromParam(messageKey,this.defaults.messageKey);this.exceptionKey=extractStringFromParam(exceptionKey,this.defaults.exceptionKey);this.urlKey=extractStringFromParam(urlKey,this.defaults.urlKey);this.millisecondsKey=extractStringFromParam(millisecondsKey,this.defaults.millisecondsKey);},setCustomField:function(name,value){var fieldUpdated=false;for(var i=0,len=this.customFields.length;i<len;i++){if(this.customFields[i].name===name){this.customFields[i].value=value;fieldUpdated=true;}} 8585if(!fieldUpdated){this.customFields.push({"name":name,"value":value});}},hasCustomFields:function(){return(this.customFields.length>0);},formatWithException:function(loggingEvent){var formatted=this.format(loggingEvent);if(loggingEvent.exception&&this.ignoresThrowable()){formatted+=loggingEvent.getThrowableStrRep();} 8586return formatted;},toString:function(){handleError("Layout.toString: all layouts must override this method");}};log4javascript.Layout=Layout;var Appender=function(){};Appender.prototype=new EventSupport();Appender.prototype.layout=new PatternLayout();Appender.prototype.threshold=Level.ALL;Appender.prototype.loggers=[];Appender.prototype.doAppend=function(loggingEvent){if(enabled&&loggingEvent.level.level>=this.threshold.level){this.append(loggingEvent);}};Appender.prototype.append=function(loggingEvent){};Appender.prototype.setLayout=function(layout){if(layout instanceof Layout){this.layout=layout;}else{handleError("Appender.setLayout: layout supplied to "+ 8587this.toString()+" is not a subclass of Layout");}};Appender.prototype.getLayout=function(){return this.layout;};Appender.prototype.setThreshold=function(threshold){if(threshold instanceof Level){this.threshold=threshold;}else{handleError("Appender.setThreshold: threshold supplied to "+ 8588this.toString()+" is not a subclass of Level");}};Appender.prototype.getThreshold=function(){return this.threshold;};Appender.prototype.setAddedToLogger=function(logger){this.loggers.push(logger);};Appender.prototype.setRemovedFromLogger=function(logger){array_remove(this.loggers,logger);};Appender.prototype.group=emptyFunction;Appender.prototype.groupEnd=emptyFunction;Appender.prototype.toString=function(){handleError("Appender.toString: all appenders must override this method");};log4javascript.Appender=Appender;function SimpleLayout(){this.customFields=[];} 8589SimpleLayout.prototype=new Layout();SimpleLayout.prototype.format=function(loggingEvent){return loggingEvent.level.name+" - "+loggingEvent.getCombinedMessages();};SimpleLayout.prototype.ignoresThrowable=function(){return true;};SimpleLayout.prototype.toString=function(){return"SimpleLayout";};log4javascript.SimpleLayout=SimpleLayout;function NullLayout(){this.customFields=[];} 8590NullLayout.prototype=new Layout();NullLayout.prototype.format=function(loggingEvent){return loggingEvent.messages;};NullLayout.prototype.ignoresThrowable=function(){return true;};NullLayout.prototype.formatWithException=function(loggingEvent){var messages=loggingEvent.messages,ex=loggingEvent.exception;return ex?messages.concat([ex]):messages;};NullLayout.prototype.toString=function(){return"NullLayout";};log4javascript.NullLayout=NullLayout;function XmlLayout(combineMessages){this.combineMessages=extractBooleanFromParam(combineMessages,true);this.customFields=[];} 8591XmlLayout.prototype=new Layout();XmlLayout.prototype.isCombinedMessages=function(){return this.combineMessages;};XmlLayout.prototype.getContentType=function(){return"text/xml";};XmlLayout.prototype.escapeCdata=function(str){return str.replace(/\]\]>/,"]]>]]><![CDATA[");};XmlLayout.prototype.format=function(loggingEvent){var layout=this;var i,len;function formatMessage(message){message=(typeof message==="string")?message:toStr(message);return"<log4javascript:message><![CDATA["+ 8592layout.escapeCdata(message)+"]]></log4javascript:message>";} 8593var str="<log4javascript:event logger=\""+loggingEvent.logger.name+"\" timestamp=\""+this.getTimeStampValue(loggingEvent)+"\"";if(!this.isTimeStampsInMilliseconds()){str+=" milliseconds=\""+loggingEvent.milliseconds+"\"";} 8594str+=" level=\""+loggingEvent.level.name+"\">"+newLine;if(this.combineMessages){str+=formatMessage(loggingEvent.getCombinedMessages());}else{str+="<log4javascript:messages>"+newLine;for(i=0,len=loggingEvent.messages.length;i<len;i++){str+=formatMessage(loggingEvent.messages[i])+newLine;} 8595str+="</log4javascript:messages>"+newLine;} 8596if(this.hasCustomFields()){for(i=0,len=this.customFields.length;i<len;i++){str+="<log4javascript:customfield name=\""+ 8597this.customFields[i].name+"\"><![CDATA["+ 8598this.customFields[i].value.toString()+"]]></log4javascript:customfield>"+newLine;}} 8599if(loggingEvent.exception){str+="<log4javascript:exception><![CDATA["+ 8600getExceptionStringRep(loggingEvent.exception)+"]]></log4javascript:exception>"+newLine;} 8601str+="</log4javascript:event>"+newLine+newLine;return str;};XmlLayout.prototype.ignoresThrowable=function(){return false;};XmlLayout.prototype.toString=function(){return"XmlLayout";};log4javascript.XmlLayout=XmlLayout;function escapeNewLines(str){return str.replace(/\r\n|\r|\n/g,"\\r\\n");} 8602function JsonLayout(readable,combineMessages){this.readable=extractBooleanFromParam(readable,false);this.combineMessages=extractBooleanFromParam(combineMessages,true);this.batchHeader=this.readable?"["+newLine:"[";this.batchFooter=this.readable?"]"+newLine:"]";this.batchSeparator=this.readable?","+newLine:",";this.setKeys();this.colon=this.readable?": ":":";this.tab=this.readable?"\t":"";this.lineBreak=this.readable?newLine:"";this.customFields=[];} 8603JsonLayout.prototype=new Layout();JsonLayout.prototype.isReadable=function(){return this.readable;};JsonLayout.prototype.isCombinedMessages=function(){return this.combineMessages;};JsonLayout.prototype.format=function(loggingEvent){var layout=this;var dataValues=this.getDataValues(loggingEvent,this.combineMessages);var str="{"+this.lineBreak;var i,len;function formatValue(val,prefix,expand){var formattedValue;var valType=typeof val;if(val instanceof Date){formattedValue=String(val.getTime());}else if(expand&&(val instanceof Array)){formattedValue="["+layout.lineBreak;for(var i=0,len=val.length;i<len;i++){var childPrefix=prefix+layout.tab;formattedValue+=childPrefix+formatValue(val[i],childPrefix,false);
8603if(i<val.length-1){formattedValue+=",";} 8604formattedValue+=layout.lineBreak;} 8605formattedValue+=prefix+"]";}else if(valType!=="number"&&valType!=="boolean"){formattedValue="\""+escapeNewLines(toStr(val).replace(/\"/g,"\\\""))+"\"";}else{formattedValue=val;} 8606return formattedValue;} 8607for(i=0,len=dataValues.length-1;i<=len;i++){str+=this.tab+"\""+dataValues[i][0]+"\""+this.colon+formatValue(dataValues[i][1],this.tab,true);if(i<len){str+=",";} 8608str+=this.lineBreak;} 8609str+="}"+this.lineBreak;return str;};JsonLayout.prototype.ignoresThrowable=function(){return false;};JsonLayout.prototype.toString=function(){return"JsonLayout";};JsonLayout.prototype.getContentType=function(){return"application/json";};log4javascript.JsonLayout=JsonLayout;function HttpPostDataLayout(){this.setKeys();this.customFields=[];this.returnsPostData=true;} 8610HttpPostDataLayout.prototype=new Layout();HttpPostDataLayout.prototype.allowBatching=function(){return false;};HttpPostDataLayout.prototype.format=function(loggingEvent){var dataValues=this.getDataValues(loggingEvent);var queryBits=[];for(var i=0,len=dataValues.length;i<len;i++){var val=(dataValues[i][1]instanceof Date)?String(dataValues[i][1].getTime()):dataValues[i][1];queryBits.push(urlEncode(dataValues[i][0])+"="+urlEncode(val));} 8611return queryBits.join("&");};HttpPostDataLayout.prototype.ignoresThrowable=function(loggingEvent){return false;};HttpPostDataLayout.prototype.toString=function(){return"HttpPostDataLayout";};log4javascript.HttpPostDataLayout=HttpPostDataLayout;function formatObjectExpansion(obj,depth,indentation){var objectsExpanded=[];function doFormat(obj,depth,indentation){var i,len,childDepth,childIndentation,childLines,expansion,childExpansion;if(!indentation){indentation="";} 8612function formatString(text){var lines=splitIntoLines(text);for(var j=1,jLen=lines.length;j<jLen;j++){lines[j]=indentation+lines[j];} 8613return lines.join(newLine);} 8614if(obj===null){return"null";}else if(typeof obj=="undefined"){return"undefined";}else if(typeof obj=="string"){return formatString(obj);}else if(typeof obj=="object"&&array_contains(objectsExpanded,obj)){try{expansion=toStr(obj);}catch(ex){expansion="Error formatting property. Details: "+getExceptionStringRep(ex);} 8615return expansion+" [already expanded]";}else if((obj instanceof Array)&&depth>0){objectsExpanded.push(obj);expansion="["+newLine;childDepth=depth-1;childIndentation=indentation+" ";childLines=[];for(i=0,len=obj.length;i<len;i++){try{childExpansion=doFormat(obj[i],childDepth,childIndentation);childLines.push(childIndentation+childExpansion);}catch(ex){childLines.push(childIndentation+"Error formatting array member. Details: "+ 8616getExceptionStringRep(ex)+"");}} 8617expansion+=childLines.join(","+newLine)+newLine+indentation+"]";return expansion;}else if(Object.prototype.toString.call(obj)=="[object Date]"){return obj.toString();}else if(typeof obj=="object"&&depth>0){objectsExpanded.push(obj);expansion="{"+newLine;childDepth=depth-1;childIndentation=indentation+" ";childLines=[];for(i in obj){try{childExpansion=doFormat(obj[i],childDepth,childIndentation);childLines.push(childIndentation+i+": "+childExpansion);}catch(ex){childLines.push(childIndentation+i+": Error formatting property. Details: "+ 8618getExceptionStringRep(ex));}} 8619expansion+=childLines.join(","+newLine)+newLine+indentation+"}";return expansion;}else{return formatString(toStr(obj));}} 8620return doFormat(obj,depth,indentation);} 8621var SimpleDateFormat;(function(){var regex=/('[^']*')|(G+|y+|M+|w+|W+|D+|d+|F+|E+|a+|H+|k+|K+|h+|m+|s+|S+|Z+)|([a-zA-Z]+)|([^a-zA-Z']+)/;var monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];var dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var TEXT2=0,TEXT3=1,NUMBER=2,YEAR=3,MONTH=4,TIMEZONE=5;var types={G:TEXT2,y:YEAR,M:MONTH,w:NUMBER,W:NUMBER,D:NUMBER,d:NUMBER,F:NUMBER,E:TEXT3,a:TEXT2,H:NUMBER,k:NUMBER,K:NUMBER,h:NUMBER,m:NUMBER,s:NUMBER,S:NUMBER,Z:TIMEZONE};var ONE_DAY=24*60*60*1000;var ONE_WEEK=7*ONE_DAY;var DEFAULT_MINIMAL_DAYS_IN_FIRST_WEEK=1;var newDateAtMidnight=function(year,month,day){var d=new Date(year,month,day,0,0,0);d.setMilliseconds(0);return d;};Date.prototype.getDifference=function(date){return this.getTime()-date.getTime();};Date.prototype.isBefore=function(d){return this.getTime()<d.getTime();};Date.prototype.getUTCTime=function(){return Date.UTC(this.getFullYear(),this.getMonth(),this.getDate(),this.getHours(),this.getMinutes(),this.get
8621Seconds(),this.getMilliseconds());};Date.prototype.getTimeSince=function(d){return this.getUTCTime()-d.getUTCTime();};Date.prototype.getPreviousSunday=function(){var midday=new Date(this.getFullYear(),this.getMonth(),this.getDate(),12,0,0);var previousSunday=new Date(midday.getTime()-this.getDay()*ONE_DAY);return newDateAtMidnight(previousSunday.getFullYear(),previousSunday.getMonth(),previousSunday.getDate());};Date.prototype.getWeekInYear=function(minimalDaysInFirstWeek){if(isUndefined(this.minimalDaysInFirstWeek)){minimalDaysInFirstWeek=DEFAULT_MINIMAL_DAYS_IN_FIRST_WEEK;} 8622var previousSunday=this.getPreviousSunday();var startOfYear=newDateAtMidnight(this.getFullYear(),0,1);var numberOfSundays=previousSunday.isBefore(startOfYear)?0:1+Math.floor(previousSunday.getTimeSince(startOfYear)/ONE_WEEK);var numberOfDaysInFirstWeek=7-startOfYear.getDay();var weekInYear=numberOfSundays;if(numberOfDaysInFirstWeek<minimalDaysInFirstWeek){weekInYear--;} 8623return weekInYear;};Date.prototype.getWeekInMonth=function(minimalDaysInFirstWeek){if(isUndefined(this.minimalDaysInFirstWeek)){minimalDaysInFirstWeek=DEFAULT_MINIMAL_DAYS_IN_FIRST_WEEK;} 8624var previousSunday=this.getPreviousSunday();var startOfMonth=newDateAtMidnight(this.getFullYear(),this.getMonth(),1);var numberOfSundays=previousSunday.isBefore(startOfMonth)?0:1+Math.floor(previousSunday.getTimeSince(startOfMonth)/ONE_WEEK);var numberOfDaysInFirstWeek=7-startOfMonth.getDay();var weekInMonth=numberOfSundays;if(numberOfDaysInFirstWeek>=minimalDaysInFirstWeek){weekInMonth++;} 8625return weekInMonth;};Date.prototype.getDayInYear=function(){var startOfYear=newDateAtMidnight(this.getFullYear(),0,1);return 1+Math.floor(this.getTimeSince(startOfYear)/ONE_DAY);};SimpleDateFormat=function(formatString){this.formatString=formatString;};SimpleDateFormat.prototype.setMinimalDaysInFirstWeek=function(days){this.minimalDaysInFirstWeek=days;};SimpleDateFormat.prototype.getMinimalDaysInFirstWeek=function(){return isUndefined(this.minimalDaysInFirstWeek)?DEFAULT_MINIMAL_DAYS_IN_FIRST_WEEK:this.minimalDaysInFirstWeek;};var padWithZeroes=function(str,len){while(str.length<len){str="0"+str;} 8626return str;};var formatText=function(data,numberOfLetters,minLength){return(numberOfLetters>=4)?data:data.substr(0,Math.max(minLength,numberOfLetters));};var formatNumber=function(data,numberOfLetters){var dataString=""+data;return padWithZeroes(dataString,numberOfLetters);};SimpleDateFormat.prototype.format=function(date){var formattedString="";var result;var searchString=this.formatString;while((result=regex.exec(searchString))){var quotedString=result[1];var patternLetters=result[2];var otherLetters=result[3];var otherCharacters=result[4];if(quotedString){if(quotedString=="''"){formattedString+="'";}else{formattedString+=quotedString.substring(1,quotedString.length-1);}}else if(otherLetters){}else if(otherCharacters){formattedString+=otherCharacters;}else if(patternLetters){var patternLetter=patternLetters.charAt(0);var numberOfLetters=patternLetters.length;var rawData="";switch(patternLetter){case"G":rawData="AD";break;case"y":rawData=date.getFullYear();break;case"M":rawData=date.getMonth();break;case"w":rawData=date.getWeekInYear(this.getMinimalDaysInFirstWeek());break;case"W":rawData=date.getWeekInMonth(this.getMinimalDaysInFirstWeek());break;case"D":rawData=date.getDayInYear();break;case"d":rawData=date.getDate();break;case"F":rawData=1+Math.floor((date.getDate()-1)/7);break;case"E":rawData=dayNames[date.getDay()];break;case"a":rawData=(date.getHours()>=12)?"PM":"AM";break;case"H":rawData=date.getHours();break;case"k":rawData=date.getHours()||24;break;case"K":rawData=date.getHours()%12;break;case"h":rawData=(date.getHours()%12)||12;break;case"m":rawData=date.getMinutes();break;case"s":rawData=date.getSeconds();break;case"S":rawData=date.getMilliseconds();break;case"Z":rawData=date.getTimezoneOffset();break;} 8627switch(types[patternLetter]){case TEXT2:formattedString+=formatText(rawData,numberOfLetters,2);break;case TEXT3:formattedString+=formatText(rawData,numberOfLetters,3);break;case NUMBER:formattedString+=formatNumber(rawData,numberOfLetters);break;case YEAR:if(numberOfLetters<=3){var dataString=""+rawData;formattedString+=dataString.substr(2,2);}else{formattedString+=formatNumber(rawData,numberOfLetters);} 8628break;case MONTH:if(numberOfLetters>=3){formattedString+=formatText(monthNames[rawData],numberOfLetters,numberOfLetters);}else{formattedString+=formatNumber(rawData+1,numberOfLetters);} 8629break;case TIMEZONE:var isPositive=(rawData>0);var prefix=isPositive?"-":"+";var absData=Math.abs(rawData);var hours=""+Math.floor(absData/60);hours=padWithZeroes(hours,2);var minutes=""+(absData%60);minutes=padWithZeroes(minutes,2);formattedString+=prefix+hours+minutes;break;}} 8630searchString=searchString.substr(result.index+result[0].length);} 8631return formattedString;};})();log4javascript.SimpleDateFormat=SimpleDateFormat;function PatternLayout(pattern){if(pattern){this.pattern=pattern;}else{this.pattern=PatternLayout.DEFAULT_CONVERSION_PATTERN;} 8632this.customFields=[];} 8633PatternLayout.TTCC_CONVERSION_PATTERN="%r %p %c - %m%n";PatternLayout.DEFAULT_CONVERSION_PATTERN="%m%n";PatternLayout.ISO8601_DATEFORMAT="yyyy-MM-dd HH:mm:ss,SSS";PatternLayout.DATETIME_DATEFORMAT="dd MMM yyyy HH:mm:ss,SSS";PatternLayout.ABSOLUTETIME_DATEFORMAT="HH:mm:ss,SSS";PatternLayout.prototype=new Layout();PatternLayout.prototype.format=function(loggingEvent){var regex=/%(-?[0-9]+)?(\.?[0-9]+)?([acdfmMnpr%])(\{([^\}]+)\})?|([^%]+)/;var formattedString="";var result;var searchString=this.pattern;while((result=regex.exec(searchString))){var matchedString=result[0];var padding=result[1];var truncation=result[2];var conversionCharacter=result[3];var specifier=result[5];var text=result[6];if(text){formattedString+=""+text;}else{var replacement="";switch(conversionCharacter){case"a":case"m":var depth=0;
8633if(specifier){depth=parseInt(specifier,10);if(isNaN(depth)){handleError("PatternLayout.format: invalid specifier '"+ 8634specifier+"' for conversion character '"+conversionCharacter+"' - should be a number");depth=0;}} 8635var messages=(conversionCharacter==="a")?loggingEvent.messages[0]:loggingEvent.messages;for(var i=0,len=messages.length;i<len;i++){if(i>0&&(replacement.charAt(replacement.length-1)!==" ")){replacement+=" ";} 8636if(depth===0){replacement+=messages[i];}else{replacement+=formatObjectExpansion(messages[i],depth);}} 8637break;case"c":var loggerName=loggingEvent.logger.name;if(specifier){var precision=parseInt(specifier,10);var loggerNameBits=loggingEvent.logger.name.split(".");if(precision>=loggerNameBits.length){replacement=loggerName;}else{replacement=loggerNameBits.slice(loggerNameBits.length-precision).join(".");}}else{replacement=loggerName;} 8638break;case"d":var dateFormat=PatternLayout.ISO8601_DATEFORMAT;if(specifier){dateFormat=specifier;if(dateFormat=="ISO8601"){dateFormat=PatternLayout.ISO8601_DATEFORMAT;}else if(dateFormat=="ABSOLUTE"){dateFormat=PatternLayout.ABSOLUTETIME_DATEFORMAT;}else if(dateFormat=="DATE"){dateFormat=PatternLayout.DATETIME_DATEFORMAT;}} 8639replacement=(new SimpleDateFormat(dateFormat)).format(loggingEvent.timeStamp);break;case"f":if(this.hasCustomFields()){var fieldIndex=0;if(specifier){fieldIndex=parseInt(specifier,10);if(isNaN(fieldIndex)){handleError("PatternLayout.format: invalid specifier '"+ 8640specifier+"' for conversion character 'f' - should be a number");}else if(fieldIndex===0){handleError("PatternLayout.format: invalid specifier '"+ 8641specifier+"' for conversion character 'f' - must be greater than zero");}else if(fieldIndex>this.customFields.length){handleError("PatternLayout.format: invalid specifier '"+ 8642specifier+"' for conversion character 'f' - there aren't that many custom fields");}else{fieldIndex=fieldIndex-1;}} 8643var val=this.customFields[fieldIndex].value;if(typeof val=="function"){val=val(this,loggingEvent);} 8644replacement=val;} 8645break;case"n":replacement=newLine;break;case"p":replacement=loggingEvent.level.name;break;case"r":replacement=""+loggingEvent.timeStamp.getDifference(applicationStartDate);break;case"%":replacement="%";break;default:replacement=matchedString;break;} 8646var l;if(truncation){l=parseInt(truncation.substr(1),10);var strLen=replacement.length;if(l<strLen){replacement=replacement.substring(strLen-l,strLen);}} 8647if(padding){if(padding.charAt(0)=="-"){l=parseInt(padding.substr(1),10);while(replacement.length<l){replacement+=" ";}}else{l=parseInt(padding,10);while(replacement.length<l){replacement=" "+replacement;}}} 8648formattedString+=replacement;} 8649searchString=searchString.substr(result.index+result[0].length);} 8650return formattedString;};PatternLayout.prototype.ignoresThrowable=function(){return true;};PatternLayout.prototype.toString=function(){return"PatternLayout";};log4javascript.PatternLayout=PatternLayout;function AlertAppender(){} 8651AlertAppender.prototype=new Appender();AlertAppender.prototype.layout=new SimpleLayout();AlertAppender.prototype.append=function(loggingEvent){alert(this.getLayout().formatWithException(loggingEvent));};AlertAppender.prototype.toString=function(){return"AlertAppender";};log4javascript.AlertAppender=AlertAppender;function BrowserConsoleAppender(){} 8652BrowserConsoleAppender.prototype=new log4javascript.Appender();BrowserConsoleAppender.prototype.layout=new NullLayout();BrowserConsoleAppender.prototype.threshold=Level.DEBUG;BrowserConsoleAppender.prototype.append=function(loggingEvent){var appender=this;var getFormattedMessage=function(concatenate){var formattedMessage=appender.getLayout().formatWithException(loggingEvent);return(typeof formattedMessage=="string")?(concatenate?formattedMessage:[formattedMessage]):(concatenate?formattedMessage.join(" "):formattedMessage);};var console=window.console;if(console&&console.log){var consoleMethodName;
8652if(console.debug&&Level.DEBUG.isGreaterOrEqual(loggingEvent.level)){consoleMethodName="debug";}else if(console.info&&Level.INFO.equals(loggingEvent.level)){consoleMethodName="info";}else if(console.warn&&Level.WARN.equals(loggingEvent.level)){consoleMethodName="warn";}else if(console.error&&loggingEvent.level.isGreaterOrEqual(Level.ERROR)){consoleMethodName="error";}else{consoleMethodName="log";} 8653if(typeof console[consoleMethodName].apply=="function"){console[consoleMethodName].apply(console,getFormattedMessage(false));}else{console[consoleMethodName](getFormattedMessage(true));}}else if((typeof opera!="undefined")&&opera.postError){opera.postError(getFormattedMessage(true));}};BrowserConsoleAppender.prototype.group=function(name){if(window.console&&window.console.group){window.console.group(name);}};BrowserConsoleAppender.prototype.groupEnd=function(){if(window.console&&window.console.groupEnd){window.console.groupEnd();}};BrowserConsoleAppender.prototype.toString=function(){return"BrowserConsoleAppender";};log4javascript.BrowserConsoleAppender=BrowserConsoleAppender;var xhrFactory=function(){return new XMLHttpRequest();};var xmlHttpFactories=[xhrFactory,function(){return new ActiveXObject("Msxml2.XMLHTTP");},function(){return new ActiveXObject("Microsoft.XMLHTTP");}];var withCredentialsSupported=false;var getXmlHttp=function(errorHandler){var xmlHttp=null,factory;for(var i=0,len=xmlHttpFactories.length;i<len;i++){factory=xmlHttpFactories[i];try{xmlHttp=factory();withCredentialsSupported=(factory==xhrFactory&&("withCredentials"in xmlHttp));getXmlHttp=factory;return xmlHttp;}catch(e){}} 8654if(errorHandler){errorHandler();}else{handleError("getXmlHttp: unable to obtain XMLHttpRequest object");}};function isHttpRequestSuccessful(xmlHttp){return isUndefined(xmlHttp.status)||xmlHttp.status===0||(xmlHttp.status>=200&&xmlHttp.status<300)||xmlHttp.status==1223;} 8655function AjaxAppender(url,withCredentials){var appender=this;var isSupported=true;if(!url){handleError("AjaxAppender: URL must be specified in constructor");isSupported=false;} 8656var timed=this.defaults.timed;var waitForResponse=this.defaults.waitForResponse;var batchSize=this.defaults.batchSize;var timerInterval=this.defaults.timerInterval;var requestSuccessCallback=this.defaults.requestSuccessCallback;var failCallback=this.defaults.failCallback;var postVarName=this.defaults.postVarName;var sendAllOnUnload=this.defaults.sendAllOnUnload;var contentType=this.defaults.contentType;var sessionId=null;var queuedLoggingEvents=[];var queuedRequests=[];var headers=[];var sending=false;var initialized=false;function checkCanConfigure(configOptionName){if(initialized){handleError("AjaxAppender: configuration option '"+ 8657configOptionName+"' may not be set after the appender has been initialized");return false;} 8658return true;} 8659this.getSessionId=function(){return sessionId;};this.setSessionId=function(sessionIdParam){sessionId=extractStringFromParam(sessionIdParam,null);this.layout.setCustomField("sessionid",sessionId);};this.setLayout=function(layoutParam){if(checkCanConfigure("layout")){this.layout=layoutParam;if(sessionId!==null){this.setSessionId(sessionId);}}};this.isTimed=function(){return timed;};this.setTimed=function(timedParam){if(checkCanConfigure("timed")){timed=bool(timedParam);}};this.getTimerInterval=function(){return timerInterval;};this.setTimerInterval=function(timerIntervalParam){if(checkCanConfigure("timerInterval")){timerInterval=extractIntFromParam(timerIntervalParam,timerInterval);}};this.isWaitForResponse=function(){return waitForResponse;};this.setWaitForResponse=function(waitForResponseParam){if(checkCanConfigure("waitForResponse")){waitForResponse=bool(waitForResponseParam);}};this.getBatchSize=function(){return batchSize;};this.setBatchSize=function(batchSizeParam){if(checkCanConfigure("batchSize")){batchSize=extractIntFromParam(batchSizeParam,batchSize);}};this.isSendAllOnUnload=function(){return sendAllOnUnload;};this.setSendAllOnUnload=function(sendAllOnUnloadParam){if(checkCanConfigure("sendAllOnUnload")){sendAllOnUnload=extractBooleanFromParam(sendAllOnUnloadParam,sendAllOnUnload);}};this.setRequestSuccessCallback=function(requestSuccessCallbackParam){requestSuccessCallback=extractFunctionFromParam(requestSuccessCallbackParam,requestSuccessCallback);};this.setFailCallback=function(failCallbackParam){failCallback=extractFunctionFromParam(failCallbackParam,failCallback);};this.getPostVarName=function(){return postVarName;};this.setPostVarName=function(postVarNameParam){if(checkCanConfigure("postVarName")){postVarName=extractStringFromParam(postVarNameParam,postVarName);}};this.getHeaders=function(){return headers;};this.addHeader=function(name,value){if(name.toLowerCase()=="content-type"){contentType=value;}else{headers.push({name:name,value:value});}};function sendAll(){if(isSupported&&enabled){sending=true;var currentRequestBatch;if(waitForResponse){if(queuedRequests.length>0){currentRequestBatch=queuedRequests.shift();sendRequest(preparePostData(currentRequestBatch),sendAll);}else{sending=false;if(timed){scheduleSending();}}}else{while((currentRequestBatch=queuedRequests.shift())){sendRequest(preparePostData(currentRequestBatch));} 8660sending=false;if(timed){scheduleSending();}}}} 8661this.sendAll=sendAll;function sendAllRemaining(){var sendingAnything=false;if(isSupported&&enabled){var actualBatchSize=appender.getLayout().allowBatching()?batchSize:1;var currentLoggingEvent;var batchedLoggingEvents=[];while((currentLoggingEvent=queuedLoggingEvents.shift())){batchedLoggingEvents.push(currentLoggingEvent);if(queuedLoggingEvents.length>=actualBatchSize){queuedRequests.push(batchedLoggingEvents);batchedLoggingEvents=[];}} 8662if(batchedLoggingEvents.length>0){queuedRequests.push(batchedLoggingEvents);} 8663sendingAnything=(queuedRequests.length>0);waitForResponse=false;timed=false;sendAll();} 8664return sendingAnything;} 8665this.sendAllRemaining=sendAllRemaining;function preparePostData(batchedLoggingEvents){var formattedMessages=[];var currentLoggingEvent;var postData="";while((currentLoggingEvent=batchedLoggingEvents.shift())){formattedMessages.push(appender.getLayout().formatWithException(currentLoggingEvent));} 8666if(batchedLoggingEvents.length==1){postData=formattedMessages.join("");}else{postData=appender.getLayout().batchHeader+ 8667formattedMessages.join(appender.getLayout().batchSeparator)+ 8668appender.getLayout().batchFooter;} 8669if(contentType==appender.defaults.contentType){postData=appender.getLayout().returnsPostData?postData:urlEncode(postVarName)+"="+urlEncode(postData);if(postData.length>0){postData+="&";} 8670postData+="layout="+urlEncode(appender.getLayout().toString());} 8671return postData;} 8672function scheduleSending(){window.setTimeout(sendAll,timerInterval);} 8673function xmlHttpErrorHandler(){var msg="AjaxAppender: could not create XMLHttpRequest object. AjaxAppender disabled";handleError(msg);isSupported=false;
8673if(failCallback){failCallback(msg);}} 8674function sendRequest(postData,successCallback){try{var xmlHttp=getXmlHttp(xmlHttpErrorHandler);if(isSupported){xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){if(isHttpRequestSuccessful(xmlHttp)){if(requestSuccessCallback){requestSuccessCallback(xmlHttp);} 8675if(successCallback){successCallback(xmlHttp);}}else{var msg="AjaxAppender.append: XMLHttpRequest request to URL "+ 8676url+" returned status code "+xmlHttp.status;handleError(msg);if(failCallback){failCallback(msg);}} 8677xmlHttp.onreadystatechange=emptyFunction;xmlHttp=null;}};xmlHttp.open("POST",url,true);if(withCredentials&&withCredentialsSupported){xmlHttp.withCredentials=true;} 8678try{for(var i=0,header;header=headers[i++];){xmlHttp.setRequestHeader(header.name,header.value);} 8679xmlHttp.setRequestHeader("Content-Type",contentType);}catch(headerEx){var msg="AjaxAppender.append: your browser's XMLHttpRequest implementation"+" does not support setRequestHeader, therefore cannot post data. AjaxAppender disabled";handleError(msg);isSupported=false;if(failCallback){failCallback(msg);} 8680return;} 8681xmlHttp.send(postData);}}catch(ex){var errMsg="AjaxAppender.append: error sending log message to "+url;handleError(errMsg,ex);isSupported=false;if(failCallback){failCallback(errMsg+". Details: "+getExceptionStringRep(ex));}}} 8682this.append=function(loggingEvent){if(isSupported){if(!initialized){init();} 8683queuedLoggingEvents.push(loggingEvent);var actualBatchSize=this.getLayout().allowBatching()?batchSize:1;if(queuedLoggingEvents.length>=actualBatchSize){var currentLoggingEvent;var batchedLoggingEvents=[];while((currentLoggingEvent=queuedLoggingEvents.shift())){batchedLoggingEvents.push(currentLoggingEvent);} 8684queuedRequests.push(batchedLoggingEvents);if(!timed&&(!waitForResponse||(waitForResponse&&!sending))){sendAll();}}}};function init(){initialized=true;if(sendAllOnUnload){var oldBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){if(oldBeforeUnload){oldBeforeUnload();} 8685sendAllRemaining();};} 8686if(timed){scheduleSending();}}} 8687AjaxAppender.prototype=new Appender();AjaxAppender.prototype.defaults={waitForResponse:false,timed:false,timerInterval:1000,batchSize:1,sendAllOnUnload:false,requestSuccessCallback:null,failCallback:null,postVarName:"data",contentType:"application/x-www-form-urlencoded"};AjaxAppender.prototype.layout=new HttpPostDataLayout();AjaxAppender.prototype.toString=function(){return"AjaxAppender";};log4javascript.AjaxAppender=AjaxAppender;function setCookie(name,value,days,path){var expires;path=path?"; path="+path:"";if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString();}else{expires="";} 8688document.cookie=escape(name)+"="+escape(value)+expires+path;} 8689function getCookie(name){var nameEquals=escape(name)+"=";var ca=document.cookie.split(";");for(var i=0,len=ca.length;i<len;i++){var c=ca[i];while(c.charAt(0)===" "){c=c.substring(1,c.length);} 8690if(c.indexOf(nameEquals)===0){return unescape(c.substring(nameEquals.length,c.length));}} 8691return null;} 8692function getBaseUrl(){var scripts=document.getElementsByTagName("script");for(var i=0,len=scripts.length;i<len;++i){if(scripts[i].src.indexOf("log4javascript")!=-1){var lastSlash=scripts[i].src.lastIndexOf("/");return(lastSlash==-1)?"":scripts[i].src.substr(0,lastSlash+1);}} 8693return null;} 8694function isLoaded(win){try{return bool(win.loaded);}catch(ex){return false;}} 8695var ConsoleAppender;(function(){var getConsoleHtmlLines=function(){return['<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">','<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">','<head>','<title>log4javascript</title>','<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />','<!-- Make IE8 behave like IE7, having gone to all the trouble of making IE work -->','<meta http-equiv="X-UA-Compatible" content="IE=7" />','<script type="text/javascript">var isIe = false, isIePre7 = false;</script>','<!--[if IE]><script type="text/javascript">isIe = true</script><![endif]-->','<!--[if lt IE 7]><script type="text/javascript">isIePre7 = true</script><![endif]-->','<script type="text/javascript">','//<![CDATA[','var loggingEnabled=true;var logQueuedEventsTimer=null;var logEntries=[];var logEntriesAndSeparators=[];var logItems=[];var renderDelay=100;var unrenderedLogItemsExist=false;var rootGroup,currentGroup=null;var loaded=false;var currentLogItem=null;var logMainContainer;function copyProperties(obj,props){for(var i in props){obj[i]=props[i];}}','function LogItem(){}','LogItem.prototype={mainContainer:null,wrappedContainer:null,unwrappedContainer:null,group:null,appendToLog:function(){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].appendToLog();}','this.group.update();},doRemove:function(doUpdate,removeFromGroup){if(this.rendered){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].remove();}','this.unwrappedElementContainer=null;this.wrappedElementContainer=null;this.mainElementContainer=null;}','if(this.group&&removeFromGroup){this.group.removeChild(this,doUpdate);}','if(this===currentLogItem){currentLogItem=null;}},remove:function(doUpdate,removeFromGroup){this.doRemove(doUpdate,removeFromGroup);},render:function(){},accept:function(visitor){visitor.visit(this);},getUnwrappedDomContainer:function(){return this.group.unwrappedElementContainer.contentDiv;},getWrappedDomContainer:function(){return this.group.wrappedElementContainer.contentDiv;},getMainDomContainer:function(){return this.group.mainElementContainer.contentDiv;}};LogItem.serializedItemKeys={LOG_ENTRY:0,GROUP_START:1,GROUP_END:2};function LogItemContainerElement(){}','LogItemContainerElement.prototype={appendToLog:function(){var insertBeforeFirst=(newestAtTop&&this.containerDomNode.hasChildNodes());if(insertBeforeFirst){this.containerDomNode.insertBefore(this.mainDiv,this.containerDomNode.firstChild);}else{this.containerDomNode.appendChild(this.mainDiv);}}};function SeparatorElementContainer(containerDomNode){this.containerDomNode=containerDomNode;this.mainDiv=document.createElement("div");this.mainDiv.className="separator";this.mainDiv.innerHTML=" ";}','SeparatorElementContainer.prototype=new LogItemContainerElement();SeparatorElementContainer.prototype.remove=function(){this.mainDiv.parentNode.removeChild(this.mainDiv);this.mainDiv=null;};function Separator(){this.rendered=false;}','Separator.prototype=new LogItem();copyProperties(Separator.prototype,{render:function(){var containerDomNode=this.group.contentDiv;if(isIe){this.unwrappedElementContainer=new SeparatorElementContainer(this.getUnwrappedDomContainer());this.wrappedElementContainer=new SeparatorElementContainer(this.getWrappedDomContainer());this.elementContainers=[this.unwrappedElementContainer,this.wrappedElementContainer];}else{this.mainElementContainer=new SeparatorElementContainer(this.getMainDomContainer());this.elementContainers=[this.mainElementContainer];}','this.content=this.formattedMessage;this.rendered=true;}});function GroupElementContainer(group,containerDomNode,isRoot,isWrapped){this.group=group;this.containerDomNode=containerDomNode;this.isRoot=isRoot;this.isWrapped=isWrapped;this.expandable=false;if(this.isRoot){if(isIe){this.contentDiv=logMainContainer.appendChild(document.createElement("div"));this.contentDiv.id=this.isWrapped?"log_wrapped":"log_unwrapped";}else{this.contentDiv=logMainContainer;}}else{var groupElementContainer=this;this.mainDiv=document.createElement("div");this.mainDiv.className="group";this.headingDiv=this.mainDiv.appendChild(document.createElement("div"));this.headingDiv.className="groupheading";this.expander=this.headingDiv.appendChild(document.createElement("span"));this.expander.className="expander unselectable greyedout";this.expander.unselectable=true;var expanderText=this.group.expanded?"-":"+";this.expanderTextNode=this.expander.appendChild(document.createTextNode(expanderText));this.headingDiv.appendChild(document.createTextNode(" "+this.group.name));this.contentDiv=this.mainDiv.appendChild(document.createElement("div"));var contentCssClass=this.group.expanded?"expanded":"collapsed";this.contentDiv.className="groupcontent "+contentCssClass;this.expander.onclick=function(){if(groupElementContainer.group.expandable){groupElementContainer.group.toggleExpanded();}};}}','GroupElementContainer.prototype=new LogItemContainerElement();copyProperties(GroupElementContainer.prototype,{toggleExpanded:function(){if(!this.isRoot){var oldCssClass,newCssClass,exp
8695anderText;if(this.group.expanded){newCssClass="expanded";oldCssClass="collapsed";expanderText="-";}else{newCssClass="collapsed";oldCssClass="expanded";expanderText="+";}','replaceClass(this.contentDiv,newCssClass,oldCssClass);this.expanderTextNode.nodeValue=expanderText;}},remove:function(){if(!this.isRoot){this.headingDiv=null;this.expander.onclick=null;this.expander=null;this.expanderTextNode=null;this.contentDiv=null;this.containerDomNode=null;this.mainDiv.parentNode.removeChild(this.mainDiv);this.mainDiv=null;}},reverseChildren:function(){var node=null;var childDomNodes=[];while((node=this.contentDiv.firstChild)){this.contentDiv.removeChild(node);childDomNodes.push(node);}','while((node=childDomNodes.pop())){this.contentDiv.appendChild(node);}},update:function(){if(!this.isRoot){if(this.group.expandable){removeClass(this.expander,"greyedout");}else{addClass(this.expander,"greyedout");}}},clear:function(){if(this.isRoot){this.contentDiv.innerHTML="";}}});function Group(name,isRoot,initiallyExpanded){this.name=name;this.group=null;this.isRoot=isRoot;this.initiallyExpanded=initiallyExpanded;this.elementContainers=[];this.children=[];this.expanded=initiallyExpanded;this.rendered=false;this.expandable=false;}','Group.prototype=new LogItem();copyProperties(Group.prototype,{addChild:function(logItem){this.children.push(logItem);logItem.group=this;},render:function(){if(isIe){var unwrappedDomContainer,wrappedDomContainer;if(this.isRoot){unwrappedDomContainer=logMainContainer;wrappedDomContainer=logMainContainer;}else{unwrappedDomContainer=this.getUnwrappedDomContainer();wrappedDomContainer=this.getWrappedDomContainer();}','this.unwrappedElementContainer=new GroupElementContainer(this,unwrappedDomContainer,this.isRoot,false);this.wrappedElementContainer=new GroupElementContainer(this,wrappedDomContainer,this.isRoot,true);this.elementContainers=[this.unwrappedElementContainer,this.wrappedElementContainer];}else{var mainDomContainer=this.isRoot?logMainContainer:this.getMainDomContainer();this.mainElementContainer=new GroupElementContainer(this,mainDomContainer,this.isRoot,false);this.elementContainers=[this.mainElementContainer];}','this.rendered=true;},toggleExpanded:function(){this.expanded=!this.expanded;for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].toggleExpanded();}},expand:function(){if(!this.expanded){this.toggleExpanded();}},accept:function(visitor){visitor.visitGroup(this);},reverseChildren:function(){if(this.rendered){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].reverseChildren();}}},update:function(){var previouslyExpandable=this.expandable;this.expandable=(this.children.length!==0);if(this.expandable!==previouslyExpandable){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].update();}}},flatten:function(){var visitor=new GroupFlattener();this.accept(visitor);return visitor.logEntriesAndSeparators;},removeChild:function(child,doUpdate){array_remove(this.children,child);child.group=null;if(doUpdate){this.update();}},remove:function(doUpdate,removeFromGroup){for(var i=0,len=this.children.length;i<len;i++){this.children[i].remove(false,false);}','this.children=[];this.update();if(this===currentGroup){currentGroup=this.group;}','this.doRemove(doUpdate,removeFromGroup);},serialize:function(items){items.push([LogItem.serializedItemKeys.GROUP_START,this.name]);for(var i=0,len=this.children.length;i<len;i++){this.children[i].serialize(items);}','if(this!==currentGroup){items.push([LogItem.serializedItemKeys.GROUP_END]);}},clear:function(){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].clear();}}});function LogEntryElementContainer(){}','LogEntryElementContainer.prototype=new LogItemContainerElement();copyProperties(LogEntryElementContainer.prototype,{remove:function(){this.doRemove();},doRemove:function(){this.mainDiv.parentNode.removeChild(this.mainDiv);this.mainDiv=null;this.contentElement=null;this.containerDomNode=null;},setContent:function(content,wrappedContent){if(content===this.formattedMessage){this.contentElement.innerHTML="";this.contentElement.appendChild(document.createTextNode(this.formattedMessage));}else{this.contentElement.innerHTML=content;}},setSearchMatch:function(isMatch){var oldCssClass=isMatch?"searchnonmatch":"searchmatch";var newCssClass=isMatch?"searchmatch":"searchnonmatch";replaceClass(this.mainDiv,newCssClass,oldCssClass);},clearSearch:function(){removeClass(this.mainDiv,"searchmatch");removeClass(this.mainDiv,"searchnonmatch");}});
8695function LogEntryWrappedElementContainer(logEntry,containerDomNode){this.logEntry=logEntry;this.containerDomNode=containerDomNode;this.mainDiv=document.createElement("div");this.mainDiv.appendChild(document.createTextNode(this.logEntry.formattedMessage));this.mainDiv.className="logentry wrapped "+this.logEntry.level;this.contentElement=this.mainDiv;}','LogEntryWrappedElementContainer.prototype=new LogEntryElementContainer();LogEntryWrappedElementContainer.prototype.setContent=function(content,wrappedContent){if(content===this.formattedMessage){this.contentElement.innerHTML="";this.contentElement.appendChild(document.createTextNode(this.formattedMessage));}else{this.contentElement.innerHTML=wrappedContent;}};function LogEntryUnwrappedElementContainer(logEntry,containerDomNode){this.logEntry=logEntry;this.containerDomNode=containerDomNode;this.mainDiv=document.createElement("div");this.mainDiv.className="logentry unwrapped "+this.logEntry.level;this.pre=this.mainDiv.appendChild(document.createElement("pre"));this.pre.appendChild(document.createTextNode(this.logEntry.formattedMessage));this.pre.className="unwrapped";this.contentElement=this.pre;}','LogEntryUnwrappedElementContainer.prototype=new LogEntryElementContainer();LogEntryUnwrappedElementContainer.prototype.remove=function(){this.doRemove();this.pre=null;};function LogEntryMainElementContainer(logEntry,containerDomNode){this.logEntry=logEntry;this.containerDomNode=containerDomNode;this.mainDiv=document.createElement("div");this.mainDiv.className="logentry nonielogentry "+this.logEntry.level;this.contentElement=this.mainDiv.appendChild(document.createElement("span"));this.contentElement.appendChild(document.createTextNode(this.logEntry.formattedMessage));}','LogEntryMainElementContainer.prototype=new LogEntryElementContainer();function LogEntry(level,formattedMessage){this.level=level;this.formattedMessage=formattedMessage;this.rendered=false;}','LogEntry.prototype=new LogItem();copyProperties(LogEntry.prototype,{render:function(){var logEntry=this;var containerDomNode=this.group.contentDiv;if(isIe){this.formattedMessage=this.formattedMessage.replace(/\\r\\n/g,"\\r");this.unwrappedElementContainer=new LogEntryUnwrappedElementContainer(this,this.getUnwrappedDomContainer());this.wrappedElementContainer=new LogEntryWrappedElementContainer(this,this.getWrappedDomContainer());this.elementContainers=[this.unwrappedElementContainer,this.wrappedElementContainer];}else{this.mainElementContainer=new LogEntryMainElementContainer(this,this.getMainDomContainer());this.elementContainers=[this.mainElementContainer];}','this.content=this.formattedMessage;this.rendered=true;},setContent:function(content,wrappedContent){if(content!=this.content){if(isIe&&(content!==this.formattedMessage)){content=content.replace(/\\r\\n/g,"\\r");}','for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].setContent(content,wrappedContent);}','this.content=content;}},getSearchMatches:function(){var matches=[];var i,len;if(isIe){var unwrappedEls=getElementsByClass(this.unwrappedElementContainer.mainDiv,"searchterm","span");var wrappedEls=getElementsByClass(this.wrappedElementContainer.mainDiv,"searchterm","span");for(i=0,len=unwrappedEls.length;i<len;i++){matches[i]=new Match(this.level,null,unwrappedEls[i],wrappedEls[i]);}}else{var els=getElementsByClass(this.mainElementContainer.mainDiv,"searchterm","span");for(i=0,len=els.length;i<len;i++){matches[i]=new Match(this.level,els[i]);}}','return matches;},setSearchMatch:function(isMatch){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].setSearchMatch(isMatch);}},clearSearch:function(){for(var i=0,len=this.elementContainers.length;i<len;i++){this.elementContainers[i].clearSearch();}},accept:function(visitor){visitor.visitLogEntry(this);},serialize:function(items){items.push([LogItem.serializedItemKeys.LOG_ENTRY,this.level,this.formattedMessage]);}});function LogItemVisitor(){}','LogItemVisitor.prototype={visit:function(logItem){},visitParent:function(logItem){if(logItem.group){logItem.group.accept(this);}},visitChildren:function(logItem){for(var i=0,len=logItem.children.length;i<len;i++){logItem.children[i].accept(this);}}
8695,visitLogEntry:function(logEntry){this.visit(logEntry);},visitSeparator:function(separator){this.visit(separator);},visitGroup:function(group){this.visit(group);}};function GroupFlattener(){this.logEntriesAndSeparators=[];}','GroupFlattener.prototype=new LogItemVisitor();GroupFlattener.prototype.visitGroup=function(group){this.visitChildren(group);};GroupFlattener.prototype.visitLogEntry=function(logEntry){this.logEntriesAndSeparators.push(logEntry);};GroupFlattener.prototype.visitSeparator=function(separator){this.logEntriesAndSeparators.push(separator);};window.onload=function(){if(location.search){var queryBits=unescape(location.search).substr(1).split("&"),nameValueBits;for(var i=0,len=queryBits.length;i<len;i++){nameValueBits=queryBits[i].split("=");if(nameValueBits[0]=="log4javascript_domain"){document.domain=nameValueBits[1];break;}}}','logMainContainer=$("log");if(isIePre7){addClass(logMainContainer,"oldIe");}','rootGroup=new Group("root",true);rootGroup.render();currentGroup=rootGroup;setCommandInputWidth();setLogContainerHeight();toggleLoggingEnabled();toggleSearchEnabled();toggleSearchFilter();toggleSearchHighlight();applyFilters();checkAllLevels();toggleWrap();toggleNewestAtTop();toggleScrollToLatest();renderQueuedLogItems();loaded=true;$("command").value="";$("command").autocomplete="off";$("command").onkeydown=function(evt){evt=getEvent(evt);if(evt.keyCode==10||evt.keyCode==13){evalCommandLine();stopPropagation(evt);}else if(evt.keyCode==27){this.value="";this.focus();}else if(evt.keyCode==38&&commandHistory.length>0){currentCommandIndex=Math.max(0,currentCommandIndex-1);this.value=commandHistory[currentCommandIndex];moveCaretToEnd(this);}else if(evt.keyCode==40&&commandHistory.length>0){currentCommandIndex=Math.min(commandHistory.length-1,currentCommandIndex+1);this.value=commandHistory[currentCommandIndex];moveCaretToEnd(this);}};$("command").onkeypress=function(evt){evt=getEvent(evt);if(evt.keyCode==38&&commandHistory.length>0&&evt.preventDefault){evt.preventDefault();}};$("command").onkeyup=function(evt){evt=getEvent(evt);if(evt.keyCode==27&&evt.preventDefault){evt.preventDefault();this.focus();}};document.onkeydown=function keyEventHandler(evt){evt=getEvent(evt);switch(evt.keyCode){case 69:if(evt.shiftKey&&(evt.ctrlKey||evt.metaKey)){evalLastCommand();cancelKeyEvent(evt);return false;}','break;case 75:if(evt.shiftKey&&(evt.ctrlKey||evt.metaKey)){focusSearch();cancelKeyEvent(evt);return false;}','break;case 40:case 76:if(evt.shiftKey&&(evt.ctrlKey||evt.metaKey)){focusCommandLine();cancelKeyEvent(evt);return false;}','break;}};setTimeout(setLogContainerHeight,20);setShowCommandLine(showCommandLine);doSearch();};window.onunload=function(){if(mainWindowExists()){appender.unload();}','appender=null;};function toggleLoggingEnabled(){setLoggingEnabled($("enableLogging").checked);}','function setLoggingEnabled(enable){loggingEnabled=enable;}','var appender=null;function setAppender(appenderParam){appender=appenderParam;}','function setShowCloseButton(showCloseButton){$("closeButton").style.display=showCloseButton?"inline":"none";}','function setShowHideButton(showHideButton){$("hideButton").style.display=showHideButton?"inline":"none";}','var newestAtTop=false;function LogItemContentReverser(){}','LogItemContentReverser.prototype=new LogItemVisitor();LogItemContentReverser.prototype.visitGroup=function(group){group.reverseChildren();this.visitChildren(group);};function setNewestAtTop(isNewestAtTop){var oldNewestAtTop=newestAtTop;var i,iLen,j,jLen;newestAtTop=Boolean(isNewestAtTop);if(oldNewestAtTop!=newestAtTop){var visitor=new LogItemContentReverser();rootGroup.accept(visitor);if(currentSearch){var currentMatch=currentSearch.matches[currentMatchIndex];var matchIndex=0;var matches=[];var actOnLogEntry=function(logEntry){var logEntryMatches=logEntry.getSearchMatches();for(j=0,jLen=logEntryMatches.length;j<jLen;j++){matches[matchIndex]=logEntryMatches[j];if(currentMatch&&logEntryMatches[j].equals(currentMatch)){currentMatchIndex=matchIndex;}','matchIndex++;}};if(newestAtTop){for(i=logEntries.length-1;i>=0;i--){actOnLogEntry(logEntries[i]);}}
8695else{for(i=0,iLen=logEntries.length;i<iLen;i++){actOnLogEntry(logEntries[i]);}}','currentSearch.matches=matches;if(currentMatch){currentMatch.setCurrent();}}else if(scrollToLatest){doScrollToLatest();}}','$("newestAtTop").checked=isNewestAtTop;}','function toggleNewestAtTop(){var isNewestAtTop=$("newestAtTop").checked;setNewestAtTop(isNewestAtTop);}','var scrollToLatest=true;function setScrollToLatest(isScrollToLatest){scrollToLatest=isScrollToLatest;if(scrollToLatest){doScrollToLatest();}','$("scrollToLatest").checked=isScrollToLatest;}','function toggleScrollToLatest(){var isScrollToLatest=$("scrollToLatest").checked;setScrollToLatest(isScrollToLatest);}','function doScrollToLatest(){var l=logMainContainer;if(typeof l.scrollTop!="undefined"){if(newestAtTop){l.scrollTop=0;}else{var latestLogEntry=l.lastChild;if(latestLogEntry){l.scrollTop=l.scrollHeight;}}}}','var closeIfOpenerCloses=true;function setCloseIfOpenerCloses(isCloseIfOpenerCloses){closeIfOpenerCloses=isCloseIfOpenerCloses;}','var maxMessages=null;function setMaxMessages(max){maxMessages=max;pruneLogEntries();}','var showCommandLine=false;function setShowCommandLine(isShowCommandLine){showCommandLine=isShowCommandLine;if(loaded){$("commandLine").style.display=showCommandLine?"block":"none";setCommandInputWidth();setLogContainerHeight();}}','function focusCommandLine(){if(loaded){$("command").focus();}}','function focusSearch(){if(loaded){$("searchBox").focus();}}','function getLogItems(){var items=[];for(var i=0,len=logItems.length;i<len;i++){logItems[i].serialize(items);}','return items;}','function setLogItems(items){var loggingReallyEnabled=loggingEnabled;loggingEnabled=true;for(var i=0,len=items.length;i<len;i++){switch(items[i][0]){case LogItem.serializedItemKeys.LOG_ENTRY:log(items[i][1],items[i][2]);break;case LogItem.serializedItemKeys.GROUP_START:group(items[i][1]);break;case LogItem.serializedItemKeys.GROUP_END:groupEnd();break;}}','loggingEnabled=loggingReallyEnabled;}','function log(logLevel,formattedMessage){if(loggingEnabled){var logEntry=new LogEntry(logLevel,formattedMessage);logEntries.push(logEntry);logEntriesAndSeparators.push(logEntry);logItems.push(logEntry);currentGroup.addChild(logEntry);if(loaded){if(logQueuedEventsTimer!==null){clearTimeout(logQueuedEventsTimer);}','logQueuedEventsTimer=setTimeout(renderQueuedLogItems,renderDelay);unrenderedLogItemsExist=true;}}}','function renderQueuedLogItems(){logQueuedEventsTimer=null;var pruned=pruneLogEntries();var initiallyHasMatches=currentSearch?currentSearch.hasMatches():false;for(var i=0,len=logItems.length;i<len;i++){if(!logItems[i].rendered){logItems[i].render();logItems[i].appendToLog();if(currentSearch&&(logItems[i]instanceof LogEntry)){currentSearch.applyTo(logItems[i]);}}}','if(currentSearch){if(pruned){if(currentSearch.hasVisibleMatches()){if(currentMatchIndex===null){setCurrentMatchIndex(0);}','displayMatches();}else{displayNoMatches();}}else if(!initiallyHasMatches&¤tSearch.hasVisibleMatches()){setCurrentMatchIndex(0);displayMatches();}}','if(scrollToLatest){doScrollToLatest();}','unrenderedLogItemsExist=false;}','function pruneLogEntries(){if((maxMessages!==null)&&(logEntriesAndSeparators.length>maxMessages)){var numberToDelete=logEntriesAndSeparators.length-maxMessages;var prunedLogEntries=logEntriesAndSeparators.slice(0,numberToDelete);if(currentSearch){currentSearch.removeMatches(prunedLogEntries);}','var group;for(var i=0;i<numberToDelete;i++){group=logEntriesAndSeparators[i].group;array_remove(logItems,logEntriesAndSeparators[i]);array_remove(logEntries,logEntriesAndSeparators[i]);logEntriesAndSeparators[i].remove(true,true);if(group.children.length===0&&group!==currentGroup&&group!==rootGroup){array_remove(logItems,group);group.remove(true,true);}}','logEntriesAndSeparators=array_removeFromStart(logEntriesAndSeparators,numberToDelete);return true;}','return false;}','function group(name,startExpanded){if(loggingEnabled){initiallyExpanded=(typeof startExpanded==="undefined")?true:Boolean(startExpanded);var newGroup=new Group(name,false,initiallyExpanded);currentGroup.addChild(newGroup);currentGroup=newGroup;logItems.push(newGroup);if(loaded){if(logQueuedEventsTimer!==null){clearTimeout(logQueuedEventsTimer);}','logQueuedEventsTimer=setTimeout(renderQueuedLogItems,renderDelay);unrenderedLogItemsExist=true;}}}','function groupEnd(){currentGroup=(currentGroup===rootGroup)?rootGroup:currentGroup.group;}','function mainPageReloaded(){currentGroup=rootGroup;var separator=new Separator();logEntriesAndSeparators.push(separator);logItems.push(separator);currentGroup.addChild(separator);}','function closeWindow(){if(appender&&mainWindowExists()){appender.close(true);}else{window.close();}}
8695','function hide(){if(appender&&mainWindowExists()){appender.hide();}}','var mainWindow=window;var windowId="log4javascriptConsoleWindow_"+new Date().getTime()+"_"+(""+Math.random()).substr(2);function setMainWindow(win){mainWindow=win;mainWindow[windowId]=window;if(opener&&closeIfOpenerCloses){pollOpener();}}','function pollOpener(){if(closeIfOpenerCloses){if(mainWindowExists()){setTimeout(pollOpener,500);}else{closeWindow();}}}','function mainWindowExists(){try{return(mainWindow&&!mainWindow.closed&&mainWindow[windowId]==window);}catch(ex){}','return false;}','var logLevels=["TRACE","DEBUG","INFO","WARN","ERROR","FATAL"];function getCheckBox(logLevel){return $("switch_"+logLevel);}','function getIeWrappedLogContainer(){return $("log_wrapped");}','function getIeUnwrappedLogContainer(){return $("log_unwrapped");}','function applyFilters(){for(var i=0;i<logLevels.length;i++){if(getCheckBox(logLevels[i]).checked){addClass(logMainContainer,logLevels[i]);}else{removeClass(logMainContainer,logLevels[i]);}}','updateSearchFromFilters();}','function toggleAllLevels(){var turnOn=$("switch_ALL").checked;for(var i=0;i<logLevels.length;i++){getCheckBox(logLevels[i]).checked=turnOn;if(turnOn){addClass(logMainContainer,logLevels[i]);}else{removeClass(logMainContainer,logLevels[i]);}}}','function checkAllLevels(){for(var i=0;i<logLevels.length;i++){if(!getCheckBox(logLevels[i]).checked){getCheckBox("ALL").checked=false;return;}}','getCheckBox("ALL").checked=true;}','function clearLog(){rootGroup.clear();currentGroup=rootGroup;logEntries=[];logItems=[];logEntriesAndSeparators=[];doSearch();}','function toggleWrap(){var enable=$("wrap").checked;if(enable){addClass(logMainContainer,"wrap");}else{removeClass(logMainContainer,"wrap");}','refreshCurrentMatch();}','var searchTimer=null;function scheduleSearch(){try{clearTimeout(searchTimer);}catch(ex){}','searchTimer=setTimeout(doSearch,500);}','function Search(searchTerm,isRegex,searchRegex,isCaseSensitive){this.searchTerm=searchTerm;this.isRegex=isRegex;this.searchRegex=searchRegex;this.isCaseSensitive=isCaseSensitive;this.matches=[];}','Search.prototype={hasMatches:function(){return this.matches.length>0;},hasVisibleMatches:function(){if(this.hasMatches()){for(var i=0;i<this.matches.length;i++){if(this.matches[i].isVisible()){return true;}}}','return false;},match:function(logEntry){var entryText=String(logEntry.formattedMessage);var matchesSearch=false;if(this.isRegex){matchesSearch=this.searchRegex.test(entryText);}else if(this.isCaseSensitive){matchesSearch=(entryText.indexOf(this.searchTerm)>-1);}else{matchesSearch=(entryText.toLowerCase().indexOf(this.searchTerm.toLowerCase())>-1);}','return matchesSearch;},getNextVisibleMatchIndex:function(){for(var i=currentMatchIndex+1;i<this.matches.length;i++){if(this.matches[i].isVisible()){return i;}}','for(i=0;i<=currentMatchIndex;i++){if(this.matches[i].isVisible()){return i;}}','return-1;},getPreviousVisibleMatchIndex:function(){for(var i=currentMatchIndex-1;i>=0;i--){if(this.matches[i].isVisible()){return i;}}','for(var i=this.matches.length-1;i>=currentMatchIndex;i--){if(this.matches[i].isVisible()){return i;}}','return-1;},applyTo:function(logEntry){var doesMatch=this.match(logEntry);if(doesMatch){logEntry.group.expand();logEntry.setSearchMatch(true);var logEntryContent;var wrappedLogEntryContent;var searchTermReplacementStartTag="<span class=\\\"searchterm\\\">";var searchTermReplacementEndTag="<"+"/span>";var preTagName=isIe?"pre":"span";var preStartTag="<"+preTagName+" class=\\\"pre\\\">";var preEndTag="<"+"/"+preTagName+">";var startIndex=0;var searchIndex,matchedText,textBeforeMatch;if(this.isRegex){var flags=this.isCaseSensitive?"g":"gi";var capturingRegex=new RegExp("("+this.searchRegex.source+")",flags);var rnd=(""+Math.random()).substr(2);var startToken="%%s"+rnd+"%%";var endToken="%%e"+rnd+"%%";logEntryContent=logEntry.formattedMessage.replace(capturingRegex,startToken+"$1"+endToken);logEntryContent=escapeHtml(logEntryContent);var result;var searchString=logEntryContent;logEntryContent="";wrappedLogEntryContent="";while((searchIndex=searchString.indexOf(startToken,startIndex))>-1){var endTokenIndex=searchString.indexOf(endToken,searchIndex);matchedText=searchString.substring(searchIndex+startToken.length,endTokenIndex);textBeforeMatch=searchString.substring(startIndex,searchIndex);logEntryContent+=preStartTag+textBeforeMatch+preEndTag;logEntryContent+=searchTermReplacementStartTag+preStartTag+matchedText+','preEndTag+searchTermReplacementEndTag;if(isIe){wrappedLogEntryContent+=textBeforeMatch+searchTermReplacementStartTag+','matchedText+searchTermReplacementEndTag;}','startIndex=endTokenIndex+endToken.length;}','logEntryContent+=preStartTag+searchString.substr(startIndex)+preEndTag;if(isIe){wrappedLogEntryContent+=searchString.substr(startIndex);}}else{logEntryContent="";wrappedLogEntryContent="";var searchTermReplacementLength=searchTermReplacementStartTag.length+','this.searchTerm.length+searchTermReplacementEndTag.length;var searchTermLength=this.searchTerm.length;var searchTermLowerCase=this.searchTerm.toLowerCase();var logTextLowerCase=logEntry.formattedMessage.toLowerCase();while((searchIndex=logTextLowerCase.indexOf(searchTermLowerCase,startIndex))>-1){matchedText=escapeHtml(logEntry.formattedMessage.substr(searchIndex,this.searchTerm.length));textBeforeMatch=escapeHtml(logEntry.formattedMessage.substring(startIndex,searchIndex));var searchTermReplacement=searchTermReplacementStartTag+','preStartTag+matchedText+preEndTag+searchTermReplacementEndTag;logEntryContent+=preStartTag+textBeforeMatch+preEndTag+searchTermReplacement;if(isIe){wrappedLogEntryContent+=textBeforeMatch+searchTermReplacementStartTag+','matchedText+searchTermReplacementEndTag;}','startIndex=searchIndex+searchTermLength;}','var textAfterLastMatch=escapeHtml(logEntry.formattedMessage.substr(startIndex));logEntryContent+=preStartTag+textAfterLastMatch+preEndTag;if(isIe){wrappedLogEntryContent+=textAfterLastMatch;}}','logEntry.setContent(logEntryContent,wrappedLogEntryContent);var logEntryMatches=logEntry.getSearchMatches();this.matches=this.matches.concat(logEntryMatches);}else{logEntry.setSearchMatch(false);logEntry.setContent(logEntry.formattedMessage,logEntry.formattedMessage);}','return doesMatch;},removeMatches:function(logEntries){var matchesToRemoveCount=0;var currentMatchRemoved=false;var matchesToRemove=[];var i,iLen,j,jLen;for(i=0,iLen=this.matches.length;i<iLen;i++){for(j=0,jLen=logEntries.length;j<jLen;j++){if(this.matches[i].belongsTo(logEntries[j])){matchesToRemove.push(this.matches[i]);if(i===currentMatchIndex){currentMatchRemoved=true;}}}}','var newMatch=currentMatchRemoved?null:this.matches[currentMatchIndex];if(currentMatchRemoved){for(i=currentMatchIndex,iLen=this.matches.length;i<iLen;i++){if(this.matches[i].isVisible()&&!array_contains(matchesToRemove,this.matches[i])){newMatch=this.matches[i];break;}}}','for(i=0,iLen=matchesToRemove.length;i<iLen;i++){array_remove(this.matches,matchesToRemove[i]);matchesToRemove[i].remove();}
8695','if(this.hasVisibleMatches()){if(newMatch===null){setCurrentMatchIndex(0);}else{var newMatchIndex=0;for(i=0,iLen=this.matches.length;i<iLen;i++){if(newMatch===this.matches[i]){newMatchIndex=i;break;}}','setCurrentMatchIndex(newMatchIndex);}}else{currentMatchIndex=null;displayNoMatches();}}};function getPageOffsetTop(el,container){var currentEl=el;var y=0;while(currentEl&¤tEl!=container){y+=currentEl.offsetTop;currentEl=currentEl.offsetParent;}','return y;}','function scrollIntoView(el){var logContainer=logMainContainer;if(!$("wrap").checked){var logContainerLeft=logContainer.scrollLeft;var logContainerRight=logContainerLeft+logContainer.offsetWidth;var elLeft=el.offsetLeft;var elRight=elLeft+el.offsetWidth;if(elLeft<logContainerLeft||elRight>logContainerRight){logContainer.scrollLeft=elLeft-(logContainer.offsetWidth-el.offsetWidth)/2;}}','var logContainerTop=logContainer.scrollTop;var logContainerBottom=logContainerTop+logContainer.offsetHeight;var elTop=getPageOffsetTop(el)-getToolBarsHeight();var elBottom=elTop+el.offsetHeight;if(elTop<logContainerTop||elBottom>logContainerBottom){logContainer.scrollTop=elTop-(logContainer.offsetHeight-el.offsetHeight)/2;}}','function Match(logEntryLevel,spanInMainDiv,spanInUnwrappedPre,spanInWrappedDiv){this.logEntryLevel=logEntryLevel;this.spanInMainDiv=spanInMainDiv;if(isIe){this.spanInUnwrappedPre=spanInUnwrappedPre;this.spanInWrappedDiv=spanInWrappedDiv;}','this.mainSpan=isIe?spanInUnwrappedPre:spanInMainDiv;}','Match.prototype={equals:function(match){return this.mainSpan===match.mainSpan;},setCurrent:function(){if(isIe){addClass(this.spanInUnwrappedPre,"currentmatch");addClass(this.spanInWrappedDiv,"currentmatch");var elementToScroll=$("wrap").checked?this.spanInWrappedDiv:this.spanInUnwrappedPre;scrollIntoView(elementToScroll);}else{addClass(this.spanInMainDiv,"currentmatch");scrollIntoView(this.spanInMainDiv);}},belongsTo:function(logEntry){if(isIe){return isDescendant(this.spanInUnwrappedPre,logEntry.unwrappedPre);}else{return isDescendant(this.spanInMainDiv,logEntry.mainDiv);}},setNotCurrent:function(){if(isIe){removeClass(this.spanInUnwrappedPre,"currentmatch");removeClass(this.spanInWrappedDiv,"currentmatch");}else{removeClass(this.spanInMainDiv,"currentmatch");}},isOrphan:function(){return isOrphan(this.mainSpan);},isVisible:function(){return getCheckBox(this.logEntryLevel).checked;},remove:function(){if(isIe){this.spanInUnwrappedPre=null;this.spanInWrappedDiv=null;}else{this.spanInMainDiv=null;}}};var currentSearch=null;var currentMatchIndex=null;function doSearch(){var searchBox=$("searchBox");var searchTerm=searchBox.value;var isRegex=$("searchRegex").checked;var isCaseSensitive=$("searchCaseSensitive").checked;var i;if(searchTerm===""){$("searchReset").disabled=true;$("searchNav").style.display="none";removeClass(document.body,"searching");removeClass(searchBox,"hasmatches");removeClass(searchBox,"nomatches");for(i=0;i<logEntries.length;i++){logEntries[i].clearSearch();logEntries[i].setContent(logEntries[i].formattedMessage,logEntries[i].formattedMessage);}','currentSearch=null;setLogContainerHeight();}else{$("searchReset").disabled=false;$("searchNav").style.display="block";var searchRegex;var regexValid;if(isRegex){try{searchRegex=isCaseSensitive?new RegExp(searchTerm,"g"):new RegExp(searchTerm,"gi");regexValid=true;replaceClass(searchBox,"validregex","invalidregex");searchBox.title="Valid regex";}catch(ex){regexValid=false;replaceClass(searchBox,"invalidregex","validregex");searchBox.title="Invalid regex: "+(ex.message?ex.message:(ex.description?ex.description:"unknown error"));return;}}else{searchBox.title="";removeClass(searchBox,"validregex");removeClass(searchBox,"invalidregex");}','addClass(document.body,"searching");currentSearch=new Search(searchTerm,isRegex,searchRegex,isCaseSensitive);for(i=0;i<logEntries.length;i++){currentSearch.applyTo(logEntries[i]);}','setLogContainerHeight();if(currentSearch.hasVisibleMatches()){setCurrentMatchIndex(0);displayMatches();}else{displayNoMatches();}}}','function updateSearchFromFilters(){if(currentSearch){if(currentSearch.hasMatches()){if(currentMatchIndex===null){currentMatchIndex=0;}','var currentMatch=currentSearch.matches[currentMatchIndex];if(currentMatch.isVisible()){displayMatches();setCurrentMatchIndex(currentMatchIndex);}else{currentMatch.setNotCurrent();var nextVisibleMatchIndex=currentSearch.getNextVisibleMatchIndex();if(nextVisibleMatchIndex>-1){setCurrentMatchIndex(nextVisibleMatchIndex);displayMatches();}else{displayNoMatches();}}}else{displayNoMatches();}}}','function refreshCurrentMatch(){if(currentSearch&¤tSearch.hasVisibleMatches()){setCurrentMatchIndex(currentMatchIndex);}}','function displayMatches(){replaceClass($("searchBox"),"hasmatches","nomatches");$("searchBox").title=""+currentSearch.matches.length+" matches found";$("searchNav").style.display="block";
8695setLogContainerHeight();}','function displayNoMatches(){replaceClass($("searchBox"),"nomatches","hasmatches");$("searchBox").title="No matches found";$("searchNav").style.display="none";setLogContainerHeight();}','function toggleSearchEnabled(enable){enable=(typeof enable=="undefined")?!$("searchDisable").checked:enable;$("searchBox").disabled=!enable;$("searchReset").disabled=!enable;$("searchRegex").disabled=!enable;$("searchNext").disabled=!enable;$("searchPrevious").disabled=!enable;$("searchCaseSensitive").disabled=!enable;$("searchNav").style.display=(enable&&($("searchBox").value!=="")&¤tSearch&¤tSearch.hasVisibleMatches())?"block":"none";if(enable){removeClass($("search"),"greyedout");addClass(document.body,"searching");if($("searchHighlight").checked){addClass(logMainContainer,"searchhighlight");}else{removeClass(logMainContainer,"searchhighlight");}','if($("searchFilter").checked){addClass(logMainContainer,"searchfilter");}else{removeClass(logMainContainer,"searchfilter");}','$("searchDisable").checked=!enable;}else{addClass($("search"),"greyedout");removeClass(document.body,"searching");removeClass(logMainContainer,"searchhighlight");removeClass(logMainContainer,"searchfilter");}','setLogContainerHeight();}','function toggleSearchFilter(){var enable=$("searchFilter").checked;if(enable){addClass(logMainContainer,"searchfilter");}else{removeClass(logMainContainer,"searchfilter");}','refreshCurrentMatch();}','function toggleSearchHighlight(){var enable=$("searchHighlight").checked;if(enable){addClass(logMainContainer,"searchhighlight");}else{removeClass(logMainContainer,"searchhighlight");}}','function clearSearch(){$("searchBox").value="";doSearch();}','function searchNext(){if(currentSearch!==null&¤tMatchIndex!==null){currentSearch.matches[currentMatchIndex].setNotCurrent();var nextMatchIndex=currentSearch.getNextVisibleMatchIndex();if(nextMatchIndex>currentMatchIndex||confirm("Reached the end of the page. Start from the top?")){setCurrentMatchIndex(nextMatchIndex);}}}','function searchPrevious(){if(currentSearch!==null&¤tMatchIndex!==null){currentSearch.matches[currentMatchIndex].setNotCurrent();var previousMatchIndex=currentSearch.getPreviousVisibleMatchIndex();if(previousMatchIndex<currentMatchIndex||confirm("Reached the start of the page. Continue from the bottom?")){setCurrentMatchIndex(previousMatchIndex);}}}','function setCurrentMatchIndex(index){currentMatchIndex=index;currentSearch.matches[currentMatchIndex].setCurrent();}','function addClass(el,cssClass){if(!hasClass(el,cssClass)){if(el.className){el.className+=" "+cssClass;}else{el.className=cssClass;}}}','function hasClass(el,cssClass){if(el.className){var classNames=el.className.split(" ");return array_contains(classNames,cssClass);}','return false;}','function removeClass(el,cssClass){if(hasClass(el,cssClass)){var existingClasses=el.className.split(" ");var newClasses=[];for(var i=0,len=existingClasses.length;i<len;i++){if(existingClasses[i]!=cssClass){newClasses[newClasses.length]=existingClasses[i];}}','el.className=newClasses.join(" ");}}','function replaceClass(el,newCssClass,oldCssClass){removeClass(el,oldCssClass);addClass(el,newCssClass);}','function getElementsByClass(el,cssClass,tagName){var elements=el.getElementsByTagName(tagName);var matches=[];for(var i=0,len=elements.length;i<len;i++){if(hasClass(elements[i],cssClass)){matches.push(elements[i]);}}','return matches;}','function $(id){return document.getElementById(id);}','function isDescendant(node,ancestorNode){while(node!=null){if(node===ancestorNode){return true;}','node=node.parentNode;}','return false;}','function isOrphan(node){var currentNode=node;while(currentNode){if(currentNode==document.body){return false;}','currentNode=currentNode.parentNode;}','return true;}','function escapeHtml(str){return str.replace(/&/g,"&").replace(/[<]/g,"<").replace(/>/g,">");}','function getWindowWidth(){if(window.innerWidth){return window.innerWidth;}else if(document.documentElement&&document.documentElement.clientWidth){return document.documentElement.clientWidth;}else if(document.body){return document.body.clientWidth;}','return 0;}','function getWindowHeight(){if(window.innerHeight){return window.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){return document.documentElement.clientHeight;}else if(document.body){return document.body.clientHeight;}','return 0;}','function getToolBarsHeight(){return $("switches").offsetHeight;}','function getChromeHeight(){var height=getToolBarsHeight();if(showCommandLine){height+=$("commandLine").offsetHeight;}','return height;}','function setLogContainerHeight(){if(logMainContainer){var windowHeight=getWindowHeight();$("body").style.height=getWindowHeight()+"px";logMainContainer.style.height=""+','Math.max(0,windowHeight-getChromeHeight())+"px";}}','function setCommandInputWidth(){if(showCommandLine){$("command").style.width=""+Math.max(0,$("commandLineContainer").offsetWidth-','($("evaluateButton").offsetWidth+13))+"px";}}','window.onresize=function(){setCommandInputWidth();setLogContainerHeight();};if(!Array.prototype.push){Array.prototype.push=function(){for(var i=0,len=arguments.length;i<len;i++){this[this.length]=arguments[i];}','return this.length;};}','if(!Array.prototype.pop){Array.prototype.pop=function(){if(this.length>0){var val=this[this.length-1];this.length=this.length-1;return val;}};}','if(!Array.prototype.shift){Array.prototype.shift=function(){if(this.length>0){var firstItem=this[0];for(var i=0,len=this.length-1;i<len;i++){this[i]=this[i+1];}','this.length=this.length-1;return firstItem;}};}','if(!Array.prototype.splice){Array.prototype.splice=function(startIndex,deleteCount){var itemsAfterDeleted=this.slice(startIndex+deleteCount);var itemsDeleted=this.slice(startIndex,startIndex+deleteCount);this.length=startIndex;var argumentsArray=[];for(var i=0,len=arguments.length;i<len;i++){argumentsArray[i]=arguments[i];}','var itemsToAppend=(argumentsArray.length>2)?itemsAfterDeleted=argumentsArray.slice(2).concat(itemsAfterDeleted):itemsAfterDeleted;for(i=0,len=itemsToAppend.length;i<len;i++){this.push(itemsToAppend[i]);}','return itemsDeleted;};}','function array_remove(arr,val){var index=-1;for(var i=0,len=arr.length;i<len;i++){if(arr[i]===val){index=i;break;}}','if(index>=0){arr.splice(index,1);return index;}else{return false;}}','function array_removeFromStart(array,numberToRemove){if(Array.prototype.splice){array.splice(0,numberToRemove);}else{for(var i=numberToRemove,len=array.length;i<len;i++){array[i-numberToRemove]=array[i];}','array.length=array.length-numberToRemove;}','return array;}','function array_contains(arr,val){for(var i=0,len=arr.length;i<len;i++){if(arr[i]==val){return true;}}','return false;}','function getErrorMessage(ex){if(ex.message){return ex.message;}else if(ex.description){return ex.description;}','return""+ex;}','function moveCaretToEnd(input){if(input.setSelectionRange){input.focus();var length=input.value.length;input.setSelectionRange(length,length);}else if(input.createTextRange){var range=input.createTextRange();range.collapse(false);range.select();}
8695','input.focus();}','function stopPropagation(evt){if(evt.stopPropagation){evt.stopPropagation();}else if(typeof evt.cancelBubble!="undefined"){evt.cancelBubble=true;}}','function getEvent(evt){return evt?evt:event;}','function getTarget(evt){return evt.target?evt.target:evt.srcElement;}','function getRelatedTarget(evt){if(evt.relatedTarget){return evt.relatedTarget;}else if(evt.srcElement){switch(evt.type){case"mouseover":return evt.fromElement;case"mouseout":return evt.toElement;default:return evt.srcElement;}}}','function cancelKeyEvent(evt){evt.returnValue=false;stopPropagation(evt);}','function evalCommandLine(){var expr=$("command").value;evalCommand(expr);$("command").value="";}','function evalLastCommand(){if(lastCommand!=null){evalCommand(lastCommand);}}','var lastCommand=null;var commandHistory=[];var currentCommandIndex=0;function evalCommand(expr){if(appender){appender.evalCommandAndAppend(expr);}else{var prefix=">>> "+expr+"\\r\\n";try{log("INFO",prefix+eval(expr));}catch(ex){log("ERROR",prefix+"Error: "+getErrorMessage(ex));}}','if(expr!=commandHistory[commandHistory.length-1]){commandHistory.push(expr);if(appender){appender.storeCommandHistory(commandHistory);}}','currentCommandIndex=(expr==commandHistory[currentCommandIndex])?currentCommandIndex+1:commandHistory.length;lastCommand=expr;}','//]]>','</script>','<style type="text/css">','body{background-color:white;color:black;padding:0;margin:0;font-family:tahoma,verdana,arial,helvetica,sans-serif;overflow:hidden}div#switchesContainer input{margin-bottom:0}div.toolbar{border-top:solid #ffffff 1px;border-bottom:solid #aca899 1px;background-color:#f1efe7;padding:3px 5px;font-size:68.75%}div.toolbar,div#search input{font-family:tahoma,verdana,arial,helvetica,sans-serif}div.toolbar input.button{padding:0 5px;font-size:100%}div.toolbar input.hidden{display:none}div#switches input#clearButton{margin-left:20px}div#levels label{font-weight:bold}div#levels label,div#options label{margin-right:5px}div#levels label#wrapLabel{font-weight:normal}div#search label{margin-right:10px}div#search label.searchboxlabel{margin-right:0}div#search input{font-size:100%}div#search input.validregex{color:green}div#search input.invalidregex{color:red}div#search input.nomatches{color:white;background-color:#ff6666}div#search input.nomatches{color:white;background-color:#ff6666}div#searchNav{display:none}div#commandLine{display:none}div#commandLine input#command{font-size:100%;font-family:Courier New,Courier}div#commandLine input#evaluateButton{}*.greyedout{color:gray !important;border-color:gray !important}*.greyedout *.alwaysenabled{color:black}*.unselectable{-khtml-user-select:none;-moz-user-select:none;user-select:none}div#log{font-family:Courier New,Courier;font-size:75%;width:100%;overflow:auto;clear:both;position:relative}div.group{border-color:#cccccc;border-style:solid;border-width:1px 0 1px 1px;overflow:visible}div.oldIe div.group,div.oldIe div.group *,div.oldIe *.logentry{height:1%}div.group div.groupheading span.expander{border:solid black 1px;font-family:Courier New,Courier;font-size:0.833em;background-color:#eeeeee;position:relative;top:-1px;color:black;padding:0 2px;cursor:pointer;cursor:hand;height:1%}div.group div.groupcontent{margin-left:10px;padding-bottom:2px;overflow:visible}div.group div.expanded{display:block}div.group div.collapsed{display:none}*.logentry{overflow:visible;display:none;white-space:pre}span.pre{white-space:pre}pre.unwrapped{display:inline !important}pre.unwrapped pre.pre,div.wrapped pre.pre{display:inline}div.wrapped pre.pre{white-space:normal}div.wrapped{display:none}body.searching *.logentry span.currentmatch{color:white !important;background-color:green !important}body.searching div.searchhighlight *.logentry span.searchterm{color:black;background-color:yellow}div.wrap *.logentry{white-space:normal !important;border-width:0 0 1px 0;border-color:#dddddd;border-style:dotted}div.wrap #log_wrapped,#log_unwrapped{display:block}div.wrap #log_unwrapped,#log_wrapped{display:none}div.wrap *.logentry span.pre{overflow:visible;white-space:normal}div.wrap *.logentry pre.unwrapped{display:none}div.wrap *.logentry span.wrapped{display:inline}div.searchfilter *.searchnonmatch{display:none !important}div#log *.TRACE,label#label_TRACE{color:#666666}div#log *.DEBUG,label#label_DEBUG{color:green}div#log *.INFO,label#label_INFO{color:#000099}div#log *.WARN,label#label_WARN{color:#999900}div#log *.ERROR,label#label_ERROR{color:red}div#log *.FATAL,label#label_FATAL{color:#660066}div.TRACE#log *.TRACE,div.DEBUG#log *.DEBUG,div.INFO#log *.INFO,div.WARN#log *.WARN,div.ERROR#log *.ERROR,div.FATAL#log *.FATAL{display:block}div#log div.separator{background-color:#cccccc;margin:5px 0;line-height:1px}','</style>','</head>','<body id="body">','<div id="switchesContainer">','<div id="switches">','<div id="levels" class="toolbar">','Filters:','<input type="checkbox" id="switch_TRACE" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide trace messages" /><label for="switch_TRACE" id="label_TRACE">trace</label>','<input type="checkbox" id="switch_DEBUG" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide debug messages" /><label for="switch_DEBUG" id="label_DEBUG">debug</label>','<input type="checkbox" id="switch_INFO" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide info messages" /><label for="switch_INFO" id="label_INFO">info</label>','<input type="checkbox" id="switch_WARN" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide warn messages" /><label for="switch_WARN" id="label_WARN">warn</label>','<input type="checkbox" id="switch_ERROR" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide error messages" /><label for="switch_ERROR" id="label_ERROR">error</label>','<input type="checkbox" id="switch_FATAL" onclick="applyFilters(); checkAllLevels()" checked="checked" title="Show/hide fatal messages" /><label for="switch_FATAL" id="label_FATAL">fatal</label>','<input type="checkbox" id="switch_ALL" onclick="toggleAllLevels(); applyFilters()" checked="checked" title="Show/hide all messages" /><label for="switch_ALL" id="label_ALL">all</label>','</div>','<div id="search" class="toolbar">','<label for="searchBox" class="searchboxlabel">Search:</label> <input type="text" id="searchBox" onclick="toggleSearchEnabled(true)" onkeyup="scheduleSearch()" size="20" />','<input type="button" id="searchReset" disabled="disabled" value="Reset" onclick="clearSearch()" class="button" title="Reset the search" />','<input type="checkbox" id="searchRegex" onclick="doSearch()" title="If checked, search is treated as a regular expression" /><label for="searchRegex">Regex</label>','<input type="checkbox" id="searchCaseSensitive" onclick="doSearch()" title="If checked, search is case sensitive" /><label for="searchCaseSensitive">Match case</label>','<input type="checkbox" id="searchDisable" onclick="toggleSearchEnabled()" title="Enable/disable search" /><label for="searchDisable" class="alwaysenabled">Disable</label>','<div id="searchNav">','<input type="button" id="searchNext" disabled="disabled" value="Next" onclick="searchNext(
8695)" class="button" title="Go to the next matching log entry" />','<input type="button" id="searchPrevious" disabled="disabled" value="Previous" onclick="searchPrevious()" class="button" title="Go to the previous matching log entry" />','<input type="checkbox" id="searchFilter" onclick="toggleSearchFilter()" title="If checked, non-matching log entries are filtered out" /><label for="searchFilter">Filter</label>','<input type="checkbox" id="searchHighlight" onclick="toggleSearchHighlight()" title="Highlight matched search terms" /><label for="searchHighlight" class="alwaysenabled">Highlight all</label>','</div>','</div>','<div id="options" class="toolbar">','Options:','<input type="checkbox" id="enableLogging" onclick="toggleLoggingEnabled()" checked="checked" title="Enable/disable logging" /><label for="enableLogging" id="enableLoggingLabel">Log</label>','<input type="checkbox" id="wrap" onclick="toggleWrap()" title="Enable / disable word wrap" /><label for="wrap" id="wrapLabel">Wrap</label>','<input type="checkbox" id="newestAtTop" onclick="toggleNewestAtTop()" title="If checked, causes newest messages to appear at the top" /><label for="newestAtTop" id="newestAtTopLabel">Newest at the top</label>','<input type="checkbox" id="scrollToLatest" onclick="toggleScrollToLatest()" checked="checked" title="If checked, window automatically scrolls to a new message when it is added" /><label for="scrollToLatest" id="scrollToLatestLabel">Scroll to latest</label>','<input type="button" id="clearButton" value="Clear" onclick="clearLog()" class="button" title="Clear all log messages" />','<input type="button" id="hideButton" value="Hide" onclick="hide()" class="hidden button" title="Hide the console" />','<input type="button" id="closeButton" value="Close" onclick="closeWindow()" class="hidden button" title="Close the window" />','</div>','</div>','</div>','<div id="log" class="TRACE DEBUG INFO WARN ERROR FATAL"></div>','<div id="commandLine" class="toolbar">','<div id="commandLineContainer">','<input type="text" id="command" title="Enter a JavaScript command here and hit return or press \'Evaluate\'" />','<input type="button" id="evaluateButton" value="Evaluate" class="button" title="Evaluate the command" onclick="evalCommandLine()" />','</div>','</div>','</body>','</html>',''];};var defaultCommandLineFunctions=[];ConsoleAppender=function(){};
8695var consoleAppenderIdCounter=1;ConsoleAppender.prototype=new Appender();ConsoleAppender.prototype.create=function(inPage,container,lazyInit,initiallyMinimized,useDocumentWrite,width,height,focusConsoleWindow){var appender=this;var initialized=false;var consoleWindowCreated=false;var consoleWindowLoaded=false;var consoleClosed=false;var queuedLoggingEvents=[];var isSupported=true;var consoleAppenderId=consoleAppenderIdCounter++;initiallyMinimized=extractBooleanFromParam(initiallyMinimized,this.defaults.initiallyMinimized);lazyInit=extractBooleanFromParam(lazyInit,this.defaults.lazyInit);useDocumentWrite=extractBooleanFromParam(useDocumentWrite,this.defaults.useDocumentWrite);var newestMessageAtTop=this.defaults.newestMessageAtTop;var scrollToLatestMessage=this.defaults.scrollToLatestMessage;width=width?width:this.defaults.width;height=height?height:this.defaults.height;var maxMessages=this.defaults.maxMessages;var showCommandLine=this.defaults.showCommandLine;var commandLineObjectExpansionDepth=this.defaults.commandLineObjectExpansionDepth;var showHideButton=this.defaults.showHideButton;var showCloseButton=this.defaults.showCloseButton;this.setLayout(this.defaults.layout);var init,createWindow,safeToAppend,getConsoleWindow,open;var appenderName=inPage?"InPageAppender":"PopUpAppender";var checkCanConfigure=function(configOptionName){if(consoleWindowCreated){handleError(appenderName+": configuration option '"+configOptionName+"' may not be set after the appender has been initialized");return false;} 8696return true;};var consoleWindowExists=function(){return(consoleWindowLoaded&&isSupported&&!consoleClosed);};this.isNewestMessageAtTop=function(){return newestMessageAtTop;};this.setNewestMessageAtTop=function(newestMessageAtTopParam){newestMessageAtTop=bool(newestMessageAtTopParam);if(consoleWindowExists()){getConsoleWindow().setNewestAtTop(newestMessageAtTop);}};this.isScrollToLatestMessage=function(){return scrollToLatestMessage;};this.setScrollToLatestMessage=function(scrollToLatestMessageParam){scrollToLatestMessage=bool(scrollToLatestMessageParam);if(consoleWindowExists()){getConsoleWindow().setScrollToLatest(scrollToLatestMessage);}};this.getWidth=function(){return width;};this.setWidth=function(widthParam){if(checkCanConfigure("width")){width=extractStringFromParam(widthParam,width);}};this.getHeight=function(){return height;};this.setHeight=function(heightParam){if(checkCanConfigure("height")){height=extractStringFromParam(heightParam,height);}};this.getMaxMessages=function(){return maxMessages;};this.setMaxMessages=function(maxMessagesParam){maxMessages=extractIntFromParam(maxMessagesParam,maxMessages);if(consoleWindowExists()){getConsoleWindow().setMaxMessages(maxMessages);}};this.isShowCommandLine=function(){return showCommandLine;};this.setShowCommandLine=function(showCommandLineParam){showCommandLine=bool(showCommandLineParam);if(consoleWindowExists()){getConsoleWindow().setShowCommandLine(showCommandLine);}};this.isShowHideButton=function(){return showHideButton;};this.setShowHideButton=function(showHideButtonParam){showHideButton=bool(showHideButtonParam);if(consoleWindowExists()){getConsoleWindow().setShowHideButton(showHideButton);}};this.isShowCloseButton=function(){return showCloseButton;};this.setShowCloseButton=function(showCloseButtonParam){showCloseButton=bool(showCloseButtonParam);if(consoleWindowExists()){getConsoleWindow().setShowCloseButton(showCloseButton);}};this.getCommandLineObjectExpansionDepth=function(){return commandLineObjectExpansionDepth;};this.setCommandLineObjectExpansionDepth=function(commandLineObjectExpansionDepthParam){commandLineObjectExpansionDepth=extractIntFromParam(commandLineObjectExpansionDepthParam,commandLineObjectExpansionDepth);};var minimized=initiallyMinimized;this.isInitiallyMinimized=function(){return initiallyMinimized;};this.setInitiallyMinimized=function(initiallyMinimizedParam){if(checkCanConfigure("initiallyMinimized")){initiallyMinimized=bool(initiallyMinimizedParam);minimized=initiallyMinimized;}};this.isUseDocumentWrite=function(){return useDocumentWrite;};this.setUseDocumentWrite=function(useDocumentWriteParam){if(checkCanConfigure("useDocumentWrite")){useDocumentWrite=bool(useDocumentWriteParam);}};function QueuedLoggingEvent(loggingEvent,formattedMessage){this.loggingEvent=loggingEvent;this.levelName=loggingEvent.level.name;this.formattedMessage=formattedMessage;} 8697QueuedLoggingEvent.prototype.append=function(){getConsoleWindow().log(this.levelName,this.formattedMessage);};function QueuedGroup(name,initiallyExpanded){this.name=name;this.initiallyExpanded=initiallyExpanded;} 8698QueuedGroup.prototype.append=function(){getConsoleWindow().group(this.name,this.initiallyExpanded);};function QueuedGroupEnd(){} 8699QueuedGroupEnd.prototype.append=function(){getConsoleWindow().groupEnd();};var checkAndAppend=function(){safeToAppend();
8699if(!initialized){init();}else if(consoleClosed&&reopenWhenClosed){createWindow();} 8700if(safeToAppend()){appendQueuedLoggingEvents();}};this.append=function(loggingEvent){if(isSupported){var formattedMessage=appender.getLayout().formatWithException(loggingEvent);queuedLoggingEvents.push(new QueuedLoggingEvent(loggingEvent,formattedMessage));checkAndAppend();}};this.group=function(name,initiallyExpanded){if(isSupported){queuedLoggingEvents.push(new QueuedGroup(name,initiallyExpanded));checkAndAppend();}};this.groupEnd=function(){if(isSupported){queuedLoggingEvents.push(new QueuedGroupEnd());checkAndAppend();}};var appendQueuedLoggingEvents=function(){while(queuedLoggingEvents.length>0){queuedLoggingEvents.shift().append();} 8701if(focusConsoleWindow){getConsoleWindow().focus();}};this.setAddedToLogger=function(logger){this.loggers.push(logger);if(enabled&&!lazyInit){init();}};this.clear=function(){if(consoleWindowExists()){getConsoleWindow().clearLog();} 8702queuedLoggingEvents.length=0;};this.focus=function(){if(consoleWindowExists()){getConsoleWindow().focus();}};this.focusCommandLine=function(){if(consoleWindowExists()){getConsoleWindow().focusCommandLine();}};this.focusSearch=function(){if(consoleWindowExists()){getConsoleWindow().focusSearch();}};var commandWindow=window;this.getCommandWindow=function(){return commandWindow;};this.setCommandWindow=function(commandWindowParam){commandWindow=commandWindowParam;};this.executeLastCommand=function(){if(consoleWindowExists()){getConsoleWindow().evalLastCommand();}};var commandLayout=new PatternLayout("%m");this.getCommandLayout=function(){return commandLayout;};this.setCommandLayout=function(commandLayoutParam){commandLayout=commandLayoutParam;};this.evalCommandAndAppend=function(expr){var commandReturnValue={appendResult:true,isError:false};var commandOutput="";try{var result,i;if(!commandWindow.eval&&commandWindow.execScript){commandWindow.execScript("null");} 8703var commandLineFunctionsHash={};for(i=0,len=commandLineFunctions.length;i<len;i++){commandLineFunctionsHash[commandLineFunctions[i][0]]=commandLineFunctions[i][1];} 8704var objectsToRestore=[];var addObjectToRestore=function(name){objectsToRestore.push([name,commandWindow[name]]);};addObjectToRestore("appender");commandWindow.appender=appender;addObjectToRestore("commandReturnValue");commandWindow.commandReturnValue=commandReturnValue;addObjectToRestore("commandLineFunctionsHash");commandWindow.commandLineFunctionsHash=commandLineFunctionsHash;var addFunctionToWindow=function(name){addObjectToRestore(name);commandWindow[name]=function(){return this.commandLineFunctionsHash[name](appender,arguments,commandReturnValue);};};for(i=0,len=commandLineFunctions.length;i<len;i++){addFunctionToWindow(commandLineFunctions[i][0]);} 8705if(commandWindow===window&&commandWindow.execScript){addObjectToRestore("evalExpr");addObjectToRestore("result");window.evalExpr=expr;commandWindow.execScript("window.result=eval(window.evalExpr);");result=window.result;}
8705else{result=commandWindow.eval(expr);} 8706commandOutput=isUndefined(result)?result:formatObjectExpansion(result,commandLineObjectExpansionDepth);for(i=0,len=objectsToRestore.length;i<len;i++){commandWindow[objectsToRestore[i][0]]=objectsToRestore[i][1];}}catch(ex){commandOutput="Error evaluating command: "+getExceptionStringRep(ex);commandReturnValue.isError=true;} 8707if(commandReturnValue.appendResult){var message=">>> "+expr;if(!isUndefined(commandOutput)){message+=newLine+commandOutput;} 8708var level=commandReturnValue.isError?Level.ERROR:Level.INFO;var loggingEvent=new LoggingEvent(null,new Date(),level,[message],null);var mainLayout=this.getLayout();this.setLayout(commandLayout);this.append(loggingEvent);this.setLayout(mainLayout);}};var commandLineFunctions=defaultCommandLineFunctions.concat([]);this.addCommandLineFunction=function(functionName,commandLineFunction){commandLineFunctions.push([functionName,commandLineFunction]);};var commandHistoryCookieName="log4javascriptCommandHistory";this.storeCommandHistory=function(commandHistory){setCookie(commandHistoryCookieName,commandHistory.join(","));};var writeHtml=function(doc){var lines=getConsoleHtmlLines();doc.open();for(var i=0,len=lines.length;i<len;i++){doc.writeln(lines[i]);} 8709doc.close();};this.setEventTypes(["load","unload"]);var consoleWindowLoadHandler=function(){var win=getConsoleWindow();win.setAppender(appender);win.setNewestAtTop(newestMessageAtTop);win.setScrollToLatest(scrollToLatestMessage);win.setMaxMessages(maxMessages);win.setShowCommandLine(showCommandLine);win.setShowHideButton(showHideButton);win.setShowCloseButton(showCloseButton);win.setMainWindow(window);var storedValue=getCookie(commandHistoryCookieName);if(storedValue){win.commandHistory=storedValue.split(",");win.currentCommandIndex=win.commandHistory.length;} 8710appender.dispatchEvent("load",{"win":win});};this.unload=function(){logLog.debug("unload "+this+", caller: "+this.unload.caller);if(!consoleClosed){logLog.debug("really doing unload "+this);consoleClosed=true;consoleWindowLoaded=false;consoleWindowCreated=false;appender.dispatchEvent("unload",{});}};var pollConsoleWindow=function(windowTest,interval,successCallback,errorMessage){function doPoll(){try{if(consoleClosed){clearInterval(poll);} 8711if(windowTest(getConsoleWindow())){clearInterval(poll);successCallback();}}catch(ex){clearInterval(poll);isSupported=false;handleError(errorMessage,ex);}} 8712var poll=setInterval(doPoll,interval);};var getConsoleUrl=function(){var documentDomainSet=(document.domain!=location.hostname);return useDocumentWrite?"":getBaseUrl()+"console.html"+ 8713(documentDomainSet?"?log4javascript_domain="+escape(document.domain):"");};if(inPage){var containerElement=null;var cssProperties=[];this.addCssProperty=function(name,value){if(checkCanConfigure("cssProperties")){cssProperties.push([name,value]);}};var windowCreationStarted=false;var iframeContainerDiv;var iframeId=uniqueId+"_InPageAppender_"+consoleAppenderId;this.hide=function(){if(initialized&&consoleWindowCreated){if(consoleWindowExists()){getConsoleWindow().$("command").blur();} 8714iframeContainerDiv.style.display="none";minimized=true;}};this.show=function(){if(initialized){if(consoleWindowCreated){iframeContainerDiv.style.display="block";this.setShowCommandLine(showCommandLine);minimized=false;}else if(!windowCreationStarted){createWindow(true);}}};this.isVisible=function(){return!minimized&&!consoleClosed;};this.close=function(fromButton){if(!consoleClosed&&(!fromButton||confirm("This will permanently remove the console from the page. No more messages will be logged. Do you wish to continue?"))){iframeContainerDiv.parentNode.removeChild(iframeContainerDiv);this.unload();}};open=function(){var initErrorMessage="InPageAppender.open: unable to create console iframe";function finalInit(){try{if(!initiallyMinimized){appender.show();} 8715consoleWindowLoadHandler();consoleWindowLoaded=true;appendQueuedLoggingEvents();}catch(ex){isSupported=false;handleError(initErrorMessage,ex);}} 8716function writeToDocument(){try{var windowTest=function(win){return isLoaded(win);};if(useDocumentWrite){writeHtml(getConsoleWindow().document);} 8717if(windowTest(getConsoleWindow())){finalInit();}else{pollConsoleWindow(windowTest,100,finalInit,initErrorMessage);}}catch(ex){isSupported=false;handleError(initErrorMessage,ex);}} 8718minimized=false;
8718iframeContainerDiv=containerElement.appendChild(document.createElement("div"));iframeContainerDiv.style.width=width;iframeContainerDiv.style.height=height;iframeContainerDiv.style.border="solid gray 1px";for(var i=0,len=cssProperties.length;i<len;i++){iframeContainerDiv.style[cssProperties[i][0]]=cssProperties[i][1];} 8719var iframeSrc=useDocumentWrite?"":" src='"+getConsoleUrl()+"'";iframeContainerDiv.innerHTML="<iframe id='"+iframeId+"' name='"+iframeId+"' width='100%' height='100%' frameborder='0'"+iframeSrc+" scrolling='no'></iframe>";consoleClosed=false;var iframeDocumentExistsTest=function(win){try{return bool(win)&&bool(win.document);}catch(ex){return false;}};if(iframeDocumentExistsTest(getConsoleWindow())){writeToDocument();}else{pollConsoleWindow(iframeDocumentExistsTest,100,writeToDocument,initErrorMessage);} 8720consoleWindowCreated=true;};createWindow=function(show){if(show||!initiallyMinimized){var pageLoadHandler=function(){if(!container){containerElement=document.createElement("div");containerElement.style.position="fixed";containerElement.style.left="0";containerElement.style.right="0";containerElement.style.bottom="0";document.body.appendChild(containerElement);appender.addCssProperty("borderWidth","1px 0 0 0");appender.addCssProperty("zIndex",1000000);open();}else{try{var el=document.getElementById(container);if(el.nodeType==1){containerElement=el;} 8721open();}catch(ex){handleError("InPageAppender.init: invalid container element '"+container+"' supplied",ex);}}};if(pageLoaded&&container&&container.appendChild){containerElement=container;open();}else if(pageLoaded){pageLoadHandler();}else{log4javascript.addEventListener("load",pageLoadHandler);} 8722windowCreationStarted=true;}};init=function(){createWindow();initialized=true;};getConsoleWindow=function(){var iframe=window.frames[iframeId];if(iframe){return iframe;}};safeToAppend=function(){if(isSupported&&!consoleClosed){if(consoleWindowCreated&&!consoleWindowLoaded&&getConsoleWindow()&&isLoaded(getConsoleWindow())){consoleWindowLoaded=true;} 8723return consoleWindowLoaded;} 8724return false;};}else{var useOldPopUp=appender.defaults.useOldPopUp;var complainAboutPopUpBlocking=appender.defaults.complainAboutPopUpBlocking;var reopenWhenClosed=this.defaults.reopenWhenClosed;this.isUseOldPopUp=function(){return useOldPopUp;};this.setUseOldPopUp=function(useOldPopUpParam){if(checkCanConfigure("useOldPopUp")){useOldPopUp=bool(useOldPopUpParam);}};this.isComplainAboutPopUpBlocking=function(){return complainAboutPopUpBlocking;};this.setComplainAboutPopUpBlocking=function(complainAboutPopUpBlockingParam){if(checkCanConfigure("complainAboutPopUpBlocking")){complainAboutPopUpBlocking=bool(complainAboutPopUpBlockingParam);}};this.isFocusPopUp=function(){return focusConsoleWindow;};this.setFocusPopUp=function(focusPopUpParam){focusConsoleWindow=bool(focusPopUpParam);};this.isReopenWhenClosed=function(){return reopenWhenClosed;};this.setReopenWhenClosed=function(reopenWhenClosedParam){reopenWhenClosed=bool(reopenWhenClosedParam);};this.close=function(){logLog.debug("close "+this);try{popUp.close();this.unload();}catch(ex){}};this.hide=function(){logLog.debug("hide "+this);if(consoleWindowExists()){this.close();}};this.show=function(){logLog.debug("show "+this);if(!consoleWindowCreated){open();}};this.isVisible=function(){return safeToAppend();};var popUp;open=function(){var windowProperties="width="+width+",height="+height+",status,resizable";var frameInfo="";try{var frameEl=window.frameElement;if(frameEl){frameInfo="_"+frameEl.tagName+"_"+(frameEl.name||frameEl.id||"");}}catch(e){frameInfo="_inaccessibleParentFrame";} 8725var windowName="PopUp_"+location.host.replace(/[^a-z0-9]/gi,"_")+"_"+consoleAppenderId+frameInfo;if(!useOldPopUp||!useDocumentWrite){windowName=windowName+"_"+uniqueId;} 8726var checkPopUpClosed=function(win){if(consoleClosed){return true;}else{try{return bool(win)&&win.closed;}catch(ex){}} 8727return false;};var popUpClosedCallback=function(){if(!consoleClosed){appender.unload();}};function finalInit(){getConsoleWindow().setCloseIfOpenerCloses(!useOldPopUp||!useDocumentWrite);consoleWindowLoadHandler();consoleWindowLoaded=true;appendQueuedLoggingEvents();pollConsoleWindow(checkPopUpClosed,500,popUpClosedCallback,"PopUpAppender.checkPopUpClosed: error checking pop-up window");} 8728try{popUp=window.open(getConsoleUrl(),windowName,windowProperties);consoleClosed=false;consoleWindowCreated=true;if(popUp&&popUp.document){if(useDocumentWrite&&useOldPopUp&&isLoaded(popUp)){popUp.mainPageReloaded();finalInit();}else{if(useDocumentWrite){writeHtml(popUp.document);} 8729var popUpLoadedTest=function(win){return bool(win)&&isLoaded(win);};if(isLoaded(popUp)){finalInit();}else{pollConsoleWindow(popUpLoadedTest,100,finalInit,"PopUpAppender.init: unable to create console window");}}}else{isSupported=false;logLog.warn("PopUpAppender.init: pop-ups blocked, please unblock to use PopUpAppender");if(complainAboutPopUpBlocking){handleError("log4javascript: pop-up windows appear to be blocked. Please unblock them to use pop-up logging.");}}}catch(ex){handleError("PopUpAppender.init: error creating pop-up",ex);}};createWindow=function(){if(!initiallyMinimized){open();}};init=function(){createWindow();initialized=true;};getConsoleWindow=function(){return popUp;};
8729safeToAppend=function(){if(isSupported&&!isUndefined(popUp)&&!consoleClosed){if(popUp.closed||(consoleWindowLoaded&&isUndefined(popUp.closed))){appender.unload();logLog.debug("PopUpAppender: pop-up closed");return false;} 8730if(!consoleWindowLoaded&&isLoaded(popUp)){consoleWindowLoaded=true;}} 8731return isSupported&&consoleWindowLoaded&&!consoleClosed;};} 8732this.getConsoleWindow=getConsoleWindow;};ConsoleAppender.addGlobalCommandLineFunction=function(functionName,commandLineFunction){defaultCommandLineFunctions.push([functionName,commandLineFunction]);};function PopUpAppender(lazyInit,initiallyMinimized,useDocumentWrite,width,height){this.create(false,null,lazyInit,initiallyMinimized,useDocumentWrite,width,height,this.defaults.focusPopUp);} 8733PopUpAppender.prototype=new ConsoleAppender();PopUpAppender.prototype.defaults={layout:new PatternLayout("%d{HH:mm:ss} %-5p - %m{1}%n"),initiallyMinimized:false,focusPopUp:false,lazyInit:true,useOldPopUp:true,complainAboutPopUpBlocking:true,newestMessageAtTop:false,scrollToLatestMessage:true,width:"600",height:"400",reopenWhenClosed:false,maxMessages:null,showCommandLine:true,commandLineObjectExpansionDepth:1,showHideButton:false,showCloseButton:true,useDocumentWrite:true};PopUpAppender.prototype.toString=function(){return"PopUpAppender";};log4javascript.PopUpAppender=PopUpAppender;function InPageAppender(container,lazyInit,initiallyMinimized,useDocumentWrite,width,height){this.create(true,container,lazyInit,initiallyMinimized,useDocumentWrite,width,height,false);} 8734InPageAppender.prototype=new ConsoleAppender();InPageAppender.prototype.defaults={layout:new PatternLayout("%d{HH:mm:ss} %-5p - %m{1}%n"),initiallyMinimized:false,lazyInit:true,newestMessageAtTop:false,scrollToLatestMessage:true,width:"100%",height:"220px",maxMessages:null,showCommandLine:true,commandLineObjectExpansionDepth:1,showHideButton:false,showCloseButton:false,showLogEntryDeleteButtons:true,useDocumentWrite:true};InPageAppender.prototype.toString=function(){return"InPageAppender";};log4javascript.InPageAppender=InPageAppender;log4javascript.InlineAppender=InPageAppender;})();function padWithSpaces(str,len){if(str.length<len){var spaces=[];var numberOfSpaces=Math.max(0,len-str.length);for(var i=0;i<numberOfSpaces;i++){spaces[i]=" ";} 8735str+=spaces.join("");} 8736return str;} 8737(function(){function dir(obj){var maxLen=0;for(var p in obj){maxLen=Math.max(toStr(p).length,maxLen);} 8738var propList=[];for(p in obj){var propNameStr=" "+padWithSpaces(toStr(p),maxLen+2);var propVal;try{propVal=splitIntoLines(toStr(obj[p])).join(padWithSpaces(newLine,maxLen+6));}catch(ex){propVal="[Error obtaining property. Details: "+getExceptionMessage(ex)+"]";} 8739propList.push(propNameStr+propVal);} 8740return propList.join(newLine);} 8741var nodeTypes={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};var preFormattedElements=["script","pre"];var emptyElements=["br","img","hr","param","link","area","input","col","base","meta"];var indentationUnit=" ";function getXhtml(rootNode,includeRootNode,indentation,startNewLine,preformatted){includeRootNode=(typeof includeRootNode=="undefined")?true:!!includeRootNode;if(typeof indentation!="string"){indentation="";} 8742startNewLine=!!startNewLine;preformatted=!!preformatted;var xhtml;function isWhitespace(node){return((node.nodeType==nodeTypes.TEXT_NODE)&&/^[ \t\r\n]*$/.test(node.nodeValue));} 8743function fixAttributeValue(attrValue){return attrValue.toString().replace(/&/g,"&").replace(/</g,"<").replace(/"/g,""");} 8744function getStyleAttributeValue(el){var stylePairs=el.style.cssText.split(";");var styleValue="";for(var j=0,len=stylePairs.length;j<len;j++){var nameValueBits=stylePairs[j].split(":");var props=[];if(!/^\s*$/.test(nameValueBits[0])){props.push(trim(nameValueBits[0]).toLowerCase()+":"+trim(nameValueBits[1]));} 8745styleValue=props.join(";");} 8746return styleValue;} 8747function getNamespace(el){if(el.prefix){return el.prefix;}else if(el.outerHTML){var regex=new RegExp("<([^:]+):"+el.tagName+"[^>]*>","i");if(regex.test(el.outerHTML)){return RegExp.$1.toLowerCase();}} 8748return"";} 8749var lt="<";var gt=">";var i,len;if(includeRootNode&&rootNode.nodeType!=nodeTypes.DOCUMENT_FRAGMENT_NODE){switch(rootNode.nodeType){case nodeTypes.ELEMENT_NODE:var tagName=rootNode.tagName.toLowerCase();xhtml=startNewLine?newLine+indentation:"";xhtml+=lt;var prefix=getNamespace(rootNode);var hasPrefix=!!prefix;if(hasPrefix){xhtml+=prefix+":";} 8750xhtml+=tagName;for(i=0,len=rootNode.attributes.length;i<len;i++){var currentAttr=rootNode.attributes[i];if(!currentAttr.specified||currentAttr.nodeValue===null||currentAttr.nodeName.toLowerCase()==="style"||typeof currentAttr.nodeValue!=="string"||currentAttr.nodeName.indexOf("_moz")===0){continue;} 8751xhtml+=" "+currentAttr.nodeName.toLowerCase()+"=\"";xhtml+=fixAttributeValue(currentAttr.nodeValue);xhtml+="\"";} 8752if(rootNode.style.cssText){var styleValue=getStyleAttributeValue(rootNode);
8752if(styleValue!==""){xhtml+=" style=\""+getStyleAttributeValue(rootNode)+"\"";}} 8753if(array_contains(emptyElements,tagName)||(hasPrefix&&!rootNode.hasChildNodes())){xhtml+="/"+gt;}else{xhtml+=gt;var childStartNewLine=!(rootNode.childNodes.length===1&&rootNode.childNodes[0].nodeType===nodeTypes.TEXT_NODE);var childPreformatted=array_contains(preFormattedElements,tagName);for(i=0,len=rootNode.childNodes.length;i<len;i++){xhtml+=getXhtml(rootNode.childNodes[i],true,indentation+indentationUnit,childStartNewLine,childPreformatted);} 8754var endTag=lt+"/"+tagName+gt;xhtml+=childStartNewLine?newLine+indentation+endTag:endTag;} 8755return xhtml;case nodeTypes.TEXT_NODE:if(isWhitespace(rootNode)){xhtml="";}else{if(preformatted){xhtml=rootNode.nodeValue;}else{var lines=splitIntoLines(trim(rootNode.nodeValue));var trimmedLines=[];for(i=0,len=lines.length;i<len;i++){trimmedLines[i]=trim(lines[i]);} 8756xhtml=trimmedLines.join(newLine+indentation);} 8757if(startNewLine){xhtml=newLine+indentation+xhtml;}} 8758return xhtml;case nodeTypes.CDATA_SECTION_NODE:return"<![CDA"+"TA["+rootNode.nodeValue+"]"+"]>"+newLine;case nodeTypes.DOCUMENT_NODE:xhtml="";for(i=0,len=rootNode.childNodes.length;i<len;i++){xhtml+=getXhtml(rootNode.childNodes[i],true,indentation);} 8759return xhtml;default:return"";}}else{xhtml="";for(i=0,len=rootNode.childNodes.length;i<len;i++){xhtml+=getXhtml(rootNode.childNodes[i],true,indentation+indentationUnit);} 8760return xhtml;}} 8761function createCommandLineFunctions(){ConsoleAppender.addGlobalCommandLineFunction("$",function(appender,args,returnValue){return document.getElementById(args[0]);});ConsoleAppender.addGlobalCommandLineFunction("dir",function(appender,args,returnValue){var lines=[];for(var i=0,len=args.length;i<len;i++){lines[i]=dir(args[i]);} 8762return lines.join(newLine+newLine);});ConsoleAppender.addGlobalCommandLineFunction("dirxml",function(appender,args,returnValue){var lines=[];for(var i=0,len=args.length;i<len;i++){lines[i]=getXhtml(args[i]);} 8763return lines.join(newLine+newLine);});ConsoleAppender.addGlobalCommandLineFunction("cd",function(appender,args,returnValue){var win,message;if(args.length===0||args[0]===""){win=window;message="Command line set to run in main window";}else{if(args[0].window==args[0]){win=args[0];message="Command line set to run in frame '"+args[0].name+"'";}else{win=window.frames[args[0]];if(win){message="Command line set to run in frame '"+args[0]+"'";}else{returnValue.isError=true;message="Frame '"+args[0]+"' does not exist";win=appender.getCommandWindow();}}} 8764appender.setCommandWindow(win);return message;});ConsoleAppender.addGlobalCommandLineFunction("clear",function(appender,args,returnValue){returnValue.appendResult=false;appender.clear();});ConsoleAppender.addGlobalCommandLineFunction("keys",function(appender,args,returnValue){var keys=[];for(var k in args[0]){keys.push(k);} 8765return keys;});ConsoleAppender.addGlobalCommandLineFunction("values",function(appender,args,returnValue){var values=[];for(var k in args[0]){try{values.push(args[0][k]);}catch(ex){logLog.warn("values(): Unable to obtain value for key "+k+". Details: "+getExceptionMessage(ex));}} 8766return values;});ConsoleAppender.addGlobalCommandLineFunction("expansionDepth",function(appender,args,returnValue){var expansionDepth=parseInt(args[0],10);if(isNaN(expansionDepth)||expansionDepth<0){returnValue.isError=true;return""+args[0]+" is not a valid expansion depth";}else{appender.setCommandLineObjectExpansionDepth(expansionDepth);return"Object expansion depth set to "+expansionDepth;}});} 8767function init(){createCommandLineFunctions();} 8768init();})();function createDefaultLogger(){var logger=log4javascript.getLogger(defaultLoggerName);var a=new log4javascript.PopUpAppender();logger.addAppender(a);return logger;} 8769log4javascript.setDocumentReady=function(){pageLoaded=true;log4javascript.dispatchEvent("load",{});};if(window.addEventListener){window.addEventListener("load",log4javascript.setDocumentReady,false);}else if(window.attachEvent){window.attachEvent("onload",log4javascript.setDocumentReady);}else{var oldOnload=window.onload;if(typeof window.onload!="function"){window.onload=log4javascript.setDocumentReady;}else{window.onload=function(evt){if(oldOnload){oldOnload(evt);} 8770log4javascript.setDocumentReady();};}} 8771return log4javascript;},this); 8772 8773 8774/***/ }), 8775 8776/***/ 727: 8777/***/ (function(module, exports, __webpack_require__) { 8778 8779/* module decorator */ module = __webpack_require__.nmd(module); 8780var __WEBPACK_AMD_DEFINE_RESULT__;/*! 8781 * Platform.js v1.3.6
8782 * Copyright 2014-2020 Benjamin Tan 8783 * Copyright 2011-2013 John-David Dalton 8784 * Available under MIT license 8785 */ 8786;(function() { 8787 'use strict'; 8788 8789 /** Used to determine if values are of the language type `Object`. */ 8790 var objectTypes = { 8791 'function': true, 8792 'object': true 8793 }; 8794 8795 /** Used as a reference to the global object. */ 8796 var root = (objectTypes[typeof window] && window) || this; 8797 8798 /** Backup possible global object. */ 8799 var oldRoot = root; 8800 8801 /** Detect free variable `exports`. */ 8802 var freeExports = objectTypes[typeof exports] && exports; 8803 8804 /** Detect free variable `module`. */ 8805 var freeModule = objectTypes["object"] && module && !module.nodeType && module; 8806 8807 /** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */ 8808 var freeGlobal = freeExports && freeModule && typeof __webpack_require__.g == 'object' && __webpack_require__.g
vendor: 16,835 bytes, lines 8808-9365
8808; 8809 if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) { 8810 root = freeGlobal; 8811 } 8812 8813 /** 8814 * Used as the maximum length of an array-like object. 8815 * See the [ES6 spec](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength) 8816 * for more details. 8817 */ 8818 var maxSafeInteger = Math.pow(2, 53) - 1; 8819 8820 /** Regular expression to detect Opera. */ 8821 var reOpera = /\bOpera/; 8822 8823 /** Possible global object. */ 8824 var thisBinding = this; 8825 8826 /** Used for native method references. */ 8827 var objectProto = Object.prototype; 8828 8829 /** Used to check for own properties of an object. */ 8830 var hasOwnProperty = objectProto.hasOwnProperty; 8831 8832 /** Used to resolve the internal `[[Class]]` of values. */ 8833 var toString = objectProto.toString; 8834 8835 /*--------------------------------------------------------------------------*/ 8836 8837 /** 8838 * Capitalizes a string value. 8839 * 8840 * @private 8841 * @param {string} string The string to capitalize. 8842 * @returns {string} The capitalized string. 8843 */ 8844 function capitalize(string) { 8845 string = String(string); 8846 return string.charAt(0).toUpperCase() + string.slice(1); 8847 } 8848 8849 /** 8850 * A utility function to clean up the OS name. 8851 * 8852 * @private 8853 * @param {string} os The OS name to clean up. 8854 * @param {string} [pattern] A `RegExp` pattern matching the OS name. 8855 * @param {string} [label] A label for the OS. 8856 */ 8857 function cleanupOS(os, pattern, label) { 8858 // Platform tokens are defined at: 8859 // http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx 8860 // http://web.archive.org/web/20081122053950/http://msdn.microsoft.com/en-us/library/ms537503(VS.85).aspx 8861 var data = { 8862 '10.0': '10', 8863 '6.4': '10 Technical Preview', 8864 '6.3': '8.1', 8865 '6.2': '8', 8866 '6.1': 'Server 2008 R2 / 7', 8867 '6.0': 'Server 2008 / Vista', 8868 '5.2': 'Server 2003 / XP 64-bit', 8869 '5.1': 'XP', 8870 '5.01': '2000 SP1', 8871 '5.0': '2000', 8872 '4.0': 'NT', 8873 '4.90': 'ME' 8874 }; 8875 // Detect Windows version from platform tokens. 8876 if (pattern && label && /^Win/i.test(os) && !/^Windows Phone /i.test(os) && 8877 (data = data[/[\d.]+$/.exec(os)])) { 8878 os = 'Windows ' + data; 8879 } 8880 // Correct character case and cleanup string. 8881 os = String(os); 8882 8883 if (pattern && label) { 8884 os = os.replace(RegExp(pattern, 'i'), label); 8885 } 8886 8887 os = format( 8888 os.replace(/ ce$/i, ' CE') 8889 .replace(/\bhpw/i, 'web') 8890 .replace(/\bMacintosh\b/, 'Mac OS') 8891 .replace(/_PowerPC\b/i, ' OS') 8892 .replace(/\b(OS X) [^ \d]+/i, '$1') 8893 .replace(/\bMac (OS X)\b/, '$1') 8894 .replace(/\/(\d)/, ' $1') 8895 .replace(/_/g, '.') 8896 .replace(/(?: BePC|[ .]*fc[ \d.]+)$/i, '') 8897 .replace(/\bx86\.64\b/gi, 'x86_64') 8898 .replace(/\b(Windows Phone) OS\b/, '$1') 8899 .replace(/\b(Chrome OS \w+) [\d.]+\b/, '$1') 8900 .split(' on ')[0] 8901 ); 8902 8903 return os; 8904 } 8905 8906 /** 8907 * An iteration utility for arrays and objects. 8908 * 8909 * @private 8910 * @param {Array|Object} object The object to iterate over. 8911 * @param {Function} callback The function called per iteration. 8912 */ 8913 function each(object, callback) { 8914 var index = -1, 8915 length = object ? object.length : 0; 8916 8917 if (typeof length == 'number' && length > -1 && length <= maxSafeInteger) { 8918 while (++index < length) { 8919 callback(object[index], index, object); 8920 } 8921 } else { 8922 forOwn(object, callback); 8923 } 8924 } 8925 8926 /** 8927 * Trim and conditionally capitalize string values. 8928 * 8929 * @private 8930 * @param {string} string The string to format. 8931 * @returns {string} The formatted string. 8932 */ 8933 function format(string) { 8934 string = trim(string); 8935 return /^(?:webOS|i(?:OS|P))/.test(string) 8936 ? string 8937 : capitalize(string); 8938 } 8939 8940 /** 8941 * Iterates over an object's own properties, executing the `callback` for each. 8942 * 8943 * @private 8944 * @param {Object} object The object to iterate over. 8945 * @param {Function} callback The function executed per own property. 8946 */ 8947 function forOwn(object, callback) { 8948 for (var key in object) { 8949 if (hasOwnProperty.call(object, key)) { 8950 callback(object[key], key, object); 8951 } 8952 } 8953 } 8954 8955 /** 8956 * Gets the internal `[[Class]]` of a value. 8957 * 8958 * @private 8959 * @param {*} value The value. 8960 * @returns {string} The `[[Class]]`. 8961 */ 8962 function getClassOf(value) { 8963 return value == null 8964 ? capitalize(value) 8965 : toString.call(value).slice(8, -1); 8966 } 8967 8968 /** 8969 * Host objects can return type values that are different from their actual 8970 * data type. The objects we are concerned with usually return non-primitive 8971 * types of "object", "function", or "unknown". 8972 * 8973 * @private 8974 * @param {*} object The owner of the property. 8975 * @param {string} property The property to check. 8976 * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`. 8977 */ 8978 function isHostType(object, property) { 8979 var type = object != null ? typeof object[property] : 'number'; 8980 return !/^(?:boolean|number|string|undefined)$/.test(type) && 8981 (type == 'object' ? !!object[property] : true); 8982 } 8983 8984 /** 8985 * Prepares a string for use in a `RegExp` by making hyphens and spaces optional. 8986 * 8987 * @private 8988 * @param {string} string The string to qualify. 8989 * @returns {string} The qualified string. 8990 */ 8991 function qualify(string) { 8992 return String(string).replace(/([ -])(?!$)/g, '$1?'); 8993 } 8994 8995 /** 8996 * A bare-bones `Array#reduce` like utility function. 8997 * 8998 * @private 8999 * @param {Array} array The array to iterate over. 9000 * @param {Function} callback The function called per iteration. 9001 * @returns {*} The accumulated result. 9002 */ 9003 function reduce(array, callback) { 9004 var accumulator = null; 9005 each(array, function(value, index) { 9006 accumulator = callback(accumulator, value, index, array); 9007 }); 9008 return accumulator; 9009 } 9010 9011 /** 9012 * Removes leading and trailing whitespace from a string. 9013 * 9014 * @private 9015 * @param {string} string The string to trim. 9016 * @returns {string} The trimmed string. 9017 */ 9018 function trim(string) { 9019 return String(string).replace(/^ +| +$/g, ''); 9020 } 9021 9022 /*--------------------------------------------------------------------------*/ 9023 9024 /** 9025 * Creates a new platform object. 9026 * 9027 * @memberOf platform 9028 * @param {Object|string} [ua=navigator.userAgent] The user agent string or 9029 * context object. 9030 * @returns {Object} A platform object. 9031 */ 9032 function parse(ua) { 9033 9034 /** The environment context object. */ 9035 var context = root; 9036 9037 /** Used to flag when a custom context is provided. */ 9038 var isCustomContext = ua && typeof ua == 'object' && getClassOf(ua) != 'String'; 9039 9040 // Juggle arguments. 9041 if (isCustomContext) { 9042 context = ua; 9043 ua = null; 9044 } 9045 9046 /** Browser navigator object. */ 9047 var nav = context.navigator || {}; 9048 9049 /** Browser user agent string. */ 9050 var userAgent = nav.userAgent || ''; 9051 9052 ua || (ua = userAgent); 9053 9054 /** Used to flag when `thisBinding` is the [ModuleScope]. */ 9055 var isModuleScope = isCustomContext || thisBinding == oldRoot; 9056 9057 /** Used to detect if browser is like Chrome. */ 9058 var likeChrome = isCustomContext 9059 ? !!nav.likeChrome 9060 : /\bChrome\b/.test(ua) && !/internal|\n/i.test(toString.toString()); 9061 9062 /** Internal `[[Class]]` value shortcuts. */ 9063 var objectClass = 'Object', 9064 airRuntimeClass = isCustomContext ? objectClass : 'ScriptBridgingProxyObject', 9065 enviroClass = isCustomContext ? objectClass : 'Environment', 9066 javaClass = (isCustomContext && context.java) ? 'JavaPackage' : getClassOf(context.java), 9067 phantomClass = isCustomContext ? objectClass : 'RuntimeObject'; 9068 9069 /** Detect Java environments. */ 9070 var java = /\bJava/.test(javaClass) && context.java; 9071 9072 /** Detect Rhino. */ 9073 var rhino = java && getClassOf(context.environment) == enviroClass; 9074 9075 /** A character to represent alpha. */ 9076 var alpha = java ? 'a' : '\u03b1'; 9077 9078 /** A character to represent beta. */ 9079 var beta = java ? 'b' : '\u03b2'; 9080 9081 /** Browser document object. */ 9082 var doc = context.document || {}; 9083 9084 /** 9085 * Detect Opera browser (Presto-based). 9086 * http://www.howtocreate.co.uk/operaStuff/operaObject.html 9087 * http://dev.opera.com/articles/view/opera-mini-web-content-authoring-guidelines/#operamini 9088 */ 9089 var opera = context.operamini || context.opera; 9090 9091 /** Opera `[[Class]]`. */ 9092 var operaClass = reOpera.test(operaClass = (isCustomContext && opera) ? opera['[[Class]]'] : getClassOf(opera)) 9093 ? operaClass 9094 : (opera = null); 9095 9096 /*------------------------------------------------------------------------*/ 9097 9098 /** Temporary variable used over the script's lifetime. */ 9099 var data; 9100 9101 /** The CPU architecture. */ 9102 var arch = ua; 9103 9104 /** Platform description array. */ 9105 var description = []; 9106 9107 /** Platform alpha/beta indicator. */ 9108 var prerelease = null; 9109 9110 /** A flag to indicate that environment features should be used to resolve the platform. */ 9111 var useFeatures = ua == userAgent; 9112 9113 /** The browser/environment version. */ 9114 var version = useFeatures && opera && typeof opera.version == 'function' && opera.version(); 9115 9116 /** A flag to indicate if the OS ends with "/ Version" */ 9117 var isSpecialCasedOS; 9118 9119 /* Detectable layout engines (order is important). */ 9120 var layout = getLayout([ 9121 { 'label': 'EdgeHTML', 'pattern': 'Edge' }, 9122 'Trident', 9123 { 'label': 'WebKit', 'pattern': 'AppleWebKit' }, 9124 'iCab', 9125 'Presto', 9126 'NetFront', 9127 'Tasman', 9128 'KHTML', 9129 'Gecko' 9130 ]); 9131 9132 /* Detectable browser names (order is important). */ 9133 var name = getName([ 9134 'Adobe AIR', 9135 'Arora', 9136 'Avant Browser', 9137 'Breach', 9138 'Camino', 9139 'Electron', 9140 'Epiphany', 9141 'Fennec', 9142 'Flock', 9143 'Galeon', 9144 'GreenBrowser', 9145 'iCab', 9146 'Iceweasel', 9147 'K-Meleon', 9148 'Konqueror', 9149 'Lunascape', 9150 'Maxthon', 9151 { 'label': 'Microsoft Edge', 'pattern': '(?:Edge|Edg|EdgA|EdgiOS)' }, 9152 'Midori', 9153 'Nook Browser', 9154 'PaleMoon', 9155 'PhantomJS', 9156 'Raven', 9157 'Rekonq', 9158 'RockMelt', 9159 { 'label': 'Samsung Internet', 'pattern': 'SamsungBrowser' }, 9160 'SeaMonkey', 9161 { 'label': 'Silk', 'pattern': '(?:Cloud9|Silk-Accelerated)' }, 9162 'Sleipnir', 9163 'SlimBrowser', 9164 { 'label': 'SRWare Iron', 'pattern': 'Iron' }, 9165 'Sunrise', 9166 'Swiftfox', 9167 'Vivaldi', 9168 'Waterfox', 9169 'WebPositive', 9170 { 'label': 'Yandex Browser', 'pattern': 'YaBrowser' }, 9171 { 'label': 'UC Browser', 'pattern': 'UCBrowser' }, 9172 'Opera Mini', 9173 { 'label': 'Opera Mini', 'pattern': 'OPiOS' }, 9174 'Opera', 9175 { 'label': 'Opera', 'pattern': 'OPR' }, 9176 'Chromium', 9177 'Chrome', 9178 { 'label': 'Chrome', 'pattern': '(?:HeadlessChrome)' }, 9179 { 'label': 'Chrome Mobile', 'pattern': '(?:CriOS|CrMo)' }, 9180 { 'label': 'Firefox', 'pattern': '(?:Firefox|Minefield)' }, 9181 { 'label': 'Firefox for iOS', 'pattern': 'FxiOS' }, 9182 { 'label': 'IE', 'pattern': 'IEMobile' }, 9183 { 'label': 'IE', 'pattern': 'MSIE' }, 9184 'Safari' 9185 ]); 9186 9187 /* Detectable products (order is important). */ 9188 var product = getProduct([ 9189 { 'label': 'BlackBerry', 'pattern': 'BB10' }, 9190 'BlackBerry', 9191 { 'label': 'Galaxy S', 'pattern': 'GT-I9000' }, 9192 { 'label': 'Galaxy S2', 'pattern': 'GT-I9100' }, 9193 { 'label': 'Galaxy S3', 'pattern': 'GT-I9300' }, 9194 { 'label': 'Galaxy S4', 'pattern': 'GT-I9500' }, 9195 { 'label': 'Galaxy S5', 'pattern': 'SM-G900' }, 9196 { 'label': 'Galaxy S6', 'pattern': 'SM-G920' }, 9197 { 'label': 'Galaxy S6 Edge', 'pattern': 'SM-G925' }, 9198 { 'label': 'Galaxy S7', 'pattern': 'SM-G930' }, 9199 { 'label': 'Galaxy S7 Edge', 'pattern': 'SM-G935' }, 9200 'Google TV', 9201 'Lumia', 9202 'iPad', 9203 'iPod', 9204 'iPhone', 9205 'Kindle', 9206 { 'label': 'Kindle Fire', 'pattern': '(?:Cloud9|Silk-Accelerated)' }, 9207 'Nexus', 9208 'Nook', 9209 'PlayBook', 9210 'PlayStation Vita', 9211 'PlayStation', 9212 'TouchPad', 9213 'Transformer', 9214 { 'label': 'Wii U', 'pattern': 'WiiU' }, 9215 'Wii', 9216 'Xbox One', 9217 { 'label': 'Xbox 360', 'pattern': 'Xbox' }, 9218 'Xoom' 9219 ]); 9220 9221 /* Detectable manufacturers. */ 9222 var manufacturer = getManufacturer({ 9223 'Apple': { 'iPad': 1, 'iPhone': 1, 'iPod': 1 }, 9224 'Alcatel': {}, 9225 'Archos': {}, 9226 'Amazon': { 'Kindle': 1, 'Kindle Fire': 1 }, 9227 'Asus': { 'Transformer': 1 }, 9228 'Barnes & Noble': { 'Nook': 1 }, 9229 'BlackBerry': { 'PlayBook': 1 }, 9230 'Google': { 'Google TV': 1, 'Nexus': 1 }, 9231 'HP': { 'TouchPad': 1 }, 9232 'HTC': {}, 9233 'Huawei': {}, 9234 'Lenovo': {}, 9235 'LG': {}, 9236 'Microsoft': { 'Xbox': 1, 'Xbox One': 1 }, 9237 'Motorola': { 'Xoom': 1 }, 9238 'Nintendo': { 'Wii U': 1, 'Wii': 1 }, 9239 'Nokia': { 'Lumia': 1 }, 9240 'Oppo': {}, 9241 'Samsung': { 'Galaxy S': 1, 'Galaxy S2': 1, 'Galaxy S3': 1, 'Galaxy S4': 1 }, 9242 'Sony': { 'PlayStation': 1, 'PlayStation Vita': 1 }, 9243 'Xiaomi': { 'Mi': 1, 'Redmi': 1 } 9244 }); 9245 9246 /* Detectable operating systems (order is important). */ 9247 var os = getOS([ 9248 'Windows Phone', 9249 'KaiOS', 9250 'Android', 9251 'CentOS', 9252 { 'label': 'Chrome OS', 'pattern': 'CrOS' }, 9253 'Debian', 9254 { 'label': 'DragonFly BSD', 'pattern': 'DragonFly' }, 9255 'Fedora', 9256 'FreeBSD', 9257 'Gentoo', 9258 'Haiku', 9259 'Kubuntu', 9260 'Linux Mint', 9261 'OpenBSD', 9262 'Red Hat', 9263 'SuSE', 9264 'Ubuntu', 9265 'Xubuntu', 9266 'Cygwin', 9267 'Symbian OS', 9268 'hpwOS', 9269 'webOS ', 9270 'webOS', 9271 'Tablet OS', 9272 'Tizen', 9273 'Linux', 9274 'Mac OS X', 9275 'Macintosh', 9276 'Mac', 9277 'Windows 98;', 9278 'Windows ' 9279 ]); 9280 9281 /*------------------------------------------------------------------------*/ 9282 9283 /** 9284 * Picks the layout engine from an array of guesses. 9285 * 9286 * @private 9287 * @param {Array} guesses An array of guesses. 9288 * @returns {null|string} The detected layout engine. 9289 */ 9290 function getLayout(guesses) { 9291 return reduce(guesses, function(result, guess) { 9292 return result || RegExp('\\b' + ( 9293 guess.pattern || qualify(guess) 9294 ) + '\\b', 'i').exec(ua) && (guess.label || guess); 9295 }); 9296 } 9297 9298 /** 9299 * Picks the manufacturer from an array of guesses. 9300 * 9301 * @private 9302 * @param {Array} guesses An object of guesses. 9303 * @returns {null|string} The detected manufacturer. 9304 */ 9305 function getManufacturer(guesses) { 9306 return reduce(guesses, function(result, value, key) { 9307 // Lookup the manufacturer by product or scan the UA for the manufacturer. 9308 return result || ( 9309 value[product] || 9310 value[/^[a-z]+(?: +[a-z]+\b)*/i.exec(product)] || 9311 RegExp('\\b' + qualify(key) + '(?:\\b|\\w*\\d)', 'i').exec(ua) 9312 ) && key; 9313 }); 9314 } 9315 9316 /** 9317 * Picks the browser name from an array of guesses. 9318 * 9319 * @private 9320 * @param {Array} guesses An array of guesses. 9321 * @returns {null|string} The detected browser name. 9322 */ 9323 function getName(guesses) { 9324 return reduce(guesses, function(result, guess) { 9325 return result || RegExp('\\b' + ( 9326 guess.pattern || qualify(guess) 9327 ) + '\\b', 'i').exec(ua) && (guess.label || guess); 9328 }); 9329 } 9330 9331 /** 9332 * Picks the OS name from an array of guesses. 9333 * 9334 * @private 9335 * @param {Array} guesses An array of guesses. 9336 * @returns {null|string} The detected OS name. 9337 */ 9338 function getOS(guesses) { 9339 return reduce(guesses, function(result, guess) { 9340 var pattern = guess.pattern || qualify(guess); 9341 if (!result && (result = 9342 RegExp('\\b' + pattern + '(?:/[\\d.]+|[ \\w.]*)', 'i').exec(ua) 9343 )) { 9344 result = cleanupOS(result, pattern, guess.label || guess); 9345 } 9346 return result; 9347 }); 9348 } 9349 9350 /** 9351 * Picks the product name from an array of guesses. 9352 * 9353 * @private 9354 * @param {Array} guesses An array of guesses. 9355 * @returns {null|string} The detected product name. 9356 */ 9357 function getProduct(guesses) { 9358 return reduce(guesses, function(result, guess) { 9359 var pattern = guess.pattern || qualify(guess); 9360 if (!result && (result = 9361 RegExp('\\b' + pattern + ' *\\d+[.\\w_]*', 'i').exec(ua) || 9362 RegExp('\\b' + pattern + ' *\\w+-[\\w]*', 'i').exec(ua) || 9363 RegExp('\\b' + pattern + '(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)', 'i').exec(ua) 9364 )) { 9365 // Split by forward slash and append product version if needed.
vendor: 24,143 bytes, lines 9366-10017
9366 if ((result = String((guess.label && !RegExp(pattern, 'i').test(guess.label)) ? guess.label : result).split('/'))[1] && !/[\d.]+/.test(result[0])) { 9367 result[0] += ' ' + result[1]; 9368 } 9369 // Correct character case and cleanup string. 9370 guess = guess.label || guess; 9371 result = format(result[0] 9372 .replace(RegExp(pattern, 'i'), guess) 9373 .replace(RegExp('; *(?:' + guess + '[_-])?', 'i'), ' ') 9374 .replace(RegExp('(' + guess + ')[-_.]?(\\w)', 'i'), '$1 $2')); 9375 } 9376 return result; 9377 }); 9378 } 9379 9380 /** 9381 * Resolves the version using an array of UA patterns. 9382 * 9383 * @private 9384 * @param {Array} patterns An array of UA patterns. 9385 * @returns {null|string} The detected version. 9386 */ 9387 function getVersion(patterns) { 9388 return reduce(patterns, function(result, pattern) { 9389 return result || (RegExp(pattern + 9390 '(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)', 'i').exec(ua) || 0)[1] || null; 9391 }); 9392 } 9393 9394 /** 9395 * Returns `platform.description` when the platform object is coerced to a string. 9396 * 9397 * @name toString 9398 * @memberOf platform 9399 * @returns {string} Returns `platform.description` if available, else an empty string. 9400 */ 9401 function toStringPlatform() { 9402 return this.description || ''; 9403 } 9404 9405 /*------------------------------------------------------------------------*/ 9406 9407 // Convert layout to an array so we can add extra details. 9408 layout && (layout = [layout]); 9409 9410 // Detect Android products. 9411 // Browsers on Android devices typically provide their product IDS after "Android;" 9412 // up to "Build" or ") AppleWebKit". 9413 // Example: 9414 // "Mozilla/5.0 (Linux; Android 8.1.0; Moto G (5) Plus) AppleWebKit/537.36 9415 // (KHTML, like Gecko) Chrome/70.0.3538.80 Mobile Safari/537.36" 9416 if (/\bAndroid\b/.test(os) && !product && 9417 (data = /\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(ua))) { 9418 product = trim(data[1]) 9419 // Replace any language codes (eg. "en-US"). 9420 .replace(/^[a-z]{2}-[a-z]{2};\s*/i, '') 9421 || null; 9422 } 9423 // Detect product names that contain their manufacturer's name. 9424 if (manufacturer && !product) { 9425 product = getProduct([manufacturer]); 9426 } else if (manufacturer && product) { 9427 product = product 9428 .replace(RegExp('^(' + qualify(manufacturer) + ')[-_.\\s]', 'i'), manufacturer + ' ') 9429 .replace(RegExp('^(' + qualify(manufacturer) + ')[-_.]?(\\w)', 'i'), manufacturer + ' $2'); 9430 } 9431 // Clean up Google TV. 9432 if ((data = /\bGoogle TV\b/.exec(product))) { 9433 product = data[0]; 9434 } 9435 // Detect simulators. 9436 if (/\bSimulator\b/i.test(ua)) { 9437 product = (product ? product + ' ' : '') + 'Simulator'; 9438 } 9439 // Detect Opera Mini 8+ running in Turbo/Uncompressed mode on iOS. 9440 if (name == 'Opera Mini' && /\bOPiOS\b/.test(ua)) { 9441 description.push('running in Turbo/Uncompressed mode'); 9442 } 9443 // Detect IE Mobile 11. 9444 if (name == 'IE' && /\blike iPhone OS\b/.test(ua)) { 9445 data = parse(ua.replace(/like iPhone OS/, '')); 9446 manufacturer = data.manufacturer; 9447 product = data.product; 9448 } 9449 // Detect iOS. 9450 else if (/^iP/.test(product)) { 9451 name || (name = 'Safari'); 9452 os = 'iOS' + ((data = / OS ([\d_]+)/i.exec(ua)) 9453 ? ' ' + data[1].replace(/_/g, '.') 9454 : ''); 9455 } 9456 // Detect Kubuntu. 9457 else if (name == 'Konqueror' && /^Linux\b/i.test(os)) { 9458 os = 'Kubuntu'; 9459 } 9460 // Detect Android browsers. 9461 else if ((manufacturer && manufacturer != 'Google' && 9462 ((/Chrome/.test(name) && !/\bMobile Safari\b/i.test(ua)) || /\bVita\b/.test(product))) || 9463 (/\bAndroid\b/.test(os) && /^Chrome/.test(name) && /\bVersion\//i.test(ua))) { 9464 name = 'Android Browser'; 9465 os = /\bAndroid\b/.test(os) ? os : 'Android'; 9466 } 9467 // Detect Silk desktop/accelerated modes. 9468 else if (name == 'Silk') { 9469 if (!/\bMobi/i.test(ua)) { 9470 os = 'Android'; 9471 description.unshift('desktop mode'); 9472 } 9473 if (/Accelerated *= *true/i.test(ua)) { 9474 description.unshift('accelerated'); 9475 } 9476 } 9477 // Detect UC Browser speed mode. 9478 else if (name == 'UC Browser' && /\bUCWEB\b/.test(ua)) { 9479 description.push('speed mode'); 9480 } 9481 // Detect PaleMoon identifying as Firefox. 9482 else if (name == 'PaleMoon' && (data = /\bFirefox\/([\d.]+)\b/.exec(ua))) { 9483 description.push('identifying as Firefox ' + data[1]); 9484 } 9485 // Detect Firefox OS and products running Firefox. 9486 else if (name == 'Firefox' && (data = /\b(Mobile|Tablet|TV)\b/i.exec(ua))) { 9487 os || (os = 'Firefox OS'); 9488 product || (product = data[1]); 9489 } 9490 // Detect false positives for Firefox/Safari. 9491 else if (!name || (data = !/\bMinefield\b/i.test(ua) && /\b(?:Firefox|Safari)\b/.exec(name))) { 9492 // Escape the `/` for Firefox 1. 9493 if (name && !product && /[\/,]|^[^(]+?\)/.test(ua.slice(ua.indexOf(data + '/') + 8))) { 9494 // Clear name of false positives. 9495 name = null; 9496 } 9497 // Reassign a generic name. 9498 if ((data = product || manufacturer || os) && 9499 (product || manufacturer || /\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(os))) { 9500 name = /[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(os) ? os : data) + ' Browser'; 9501 } 9502 } 9503 // Add Chrome version to description for Electron. 9504 else if (name == 'Electron' && (data = (/\bChrome\/([\d.]+)\b/.exec(ua) || 0)[1])) { 9505 description.push('Chromium ' + data); 9506 } 9507 // Detect non-Opera (Presto-based) versions (order is important). 9508 if (!version) { 9509 version = getVersion([ 9510 '(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)', 9511 'Version', 9512 qualify(name), 9513 '(?:Firefox|Minefield|NetFront)' 9514 ]); 9515 } 9516 // Detect stubborn layout engines. 9517 if ((data = 9518 layout == 'iCab' && parseFloat(version) > 3 && 'WebKit' || 9519 /\bOpera\b/.test(name) && (/\bOPR\b/.test(ua) ? 'Blink' : 'Presto') || 9520 /\b(?:Midori|Nook|Safari)\b/i.test(ua) && !/^(?:Trident|EdgeHTML)$/.test(layout) && 'WebKit' || 9521 !layout && /\bMSIE\b/i.test(ua) && (os == 'Mac OS' ? 'Tasman' : 'Trident') || 9522 layout == 'WebKit' && /\bPlayStation\b(?! Vita\b)/i.test(name) && 'NetFront' 9523 )) { 9524 layout = [data]; 9525 } 9526 // Detect Windows Phone 7 desktop mode. 9527 if (name == 'IE' && (data = (/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ua) || 0)[1])) { 9528 name += ' Mobile'; 9529 os = 'Windows Phone ' + (/\+$/.test(data) ? data : data + '.x'); 9530 description.unshift('desktop mode'); 9531 } 9532 // Detect Windows Phone 8.x desktop mode. 9533 else if (/\bWPDesktop\b/i.test(ua)) { 9534 name = 'IE Mobile'; 9535 os = 'Windows Phone 8.x'; 9536 description.unshift('desktop mode'); 9537 version || (version = (/\brv:([\d.]+)/.exec(ua) || 0)[1]); 9538 } 9539 // Detect IE 11 identifying as other browsers. 9540 else if (name != 'IE' && layout == 'Trident' && (data = /\brv:([\d.]+)/.exec(ua))) { 9541 if (name) { 9542 description.push('identifying as ' + name + (version ? ' ' + version : '')); 9543 } 9544 name = 'IE'; 9545 version = data[1]; 9546 } 9547 // Leverage environment features. 9548 if (useFeatures) { 9549 // Detect server-side environments. 9550 // Rhino has a global function while others have a global object. 9551 if (isHostType(context, 'global')) { 9552 if (java) { 9553 data = java.lang.System; 9554 arch = data.getProperty('os.arch'); 9555 os = os || data.getProperty('os.name') + ' ' + data.getProperty('os.version'); 9556 } 9557 if (rhino) { 9558 try { 9559 version = context.require('ringo/engine').version.join('.'); 9560 name = 'RingoJS'; 9561 } catch(e) { 9562 if ((data = context.system) && data.global.system == context.system) { 9563 name = 'Narwhal'; 9564 os || (os = data[0].os || null); 9565 } 9566 } 9567 if (!name) { 9568 name = 'Rhino'; 9569 } 9570 } 9571 else if ( 9572 typeof context.process == 'object' && !context.process.browser && 9573 (data = context.process) 9574 ) { 9575 if (typeof data.versions == 'object') { 9576 if (typeof data.versions.electron == 'string') { 9577 description.push('Node ' + data.versions.node); 9578 name = 'Electron'; 9579 version = data.versions.electron; 9580 } else if (typeof data.versions.nw == 'string') { 9581 description.push('Chromium ' + version, 'Node ' + data.versions.node); 9582 name = 'NW.js'; 9583 version = data.versions.nw; 9584 } 9585 } 9586 if (!name) { 9587 name = 'Node.js'; 9588 arch = data.arch; 9589 os = data.platform; 9590 version = /[\d.]+/.exec(data.version); 9591 version = version ? version[0] : null; 9592 } 9593 } 9594 } 9595 // Detect Adobe AIR. 9596 else if (getClassOf((data = context.runtime)) == airRuntimeClass) { 9597 name = 'Adobe AIR'; 9598 os = data.flash.system.Capabilities.os; 9599 } 9600 // Detect PhantomJS. 9601 else if (getClassOf((data = context.phantom)) == phantomClass) { 9602 name = 'PhantomJS'; 9603 version = (data = data.version || null) && (data.major + '.' + data.minor + '.' + data.patch); 9604 } 9605 // Detect IE compatibility modes. 9606 else if (typeof doc.documentMode == 'number' && (data = /\bTrident\/(\d+)/i.exec(ua))) { 9607 // We're in compatibility mode when the Trident version + 4 doesn't 9608 // equal the document mode. 9609 version = [version, doc.documentMode]; 9610 if ((data = +data[1] + 4) != version[1]) { 9611 description.push('IE ' + version[1] + ' mode'); 9612 layout && (layout[1] = ''); 9613 version[1] = data; 9614 } 9615 version = name == 'IE' ? String(version[1].toFixed(1)) : version[0]; 9616 } 9617 // Detect IE 11 masking as other browsers. 9618 else if (typeof doc.documentMode == 'number' && /^(?:Chrome|Firefox)\b/.test(name)) { 9619 description.push('masking as ' + name + ' ' + version); 9620 name = 'IE'; 9621 version = '11.0'; 9622 layout = ['Trident']; 9623 os = 'Windows'; 9624 } 9625 os = os && format(os); 9626 } 9627 // Detect prerelease phases. 9628 if (version && (data = 9629 /(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(version) || 9630 /(?:alpha|beta)(?: ?\d)?/i.exec(ua + ';' + (useFeatures && nav.appMinorVersion)) || 9631 /\bMinefield\b/i.test(ua) && 'a' 9632 )) { 9633 prerelease = /b/i.test(data) ? 'beta' : 'alpha'; 9634 version = version.replace(RegExp(data + '\\+?$'), '') + 9635 (prerelease == 'beta' ? beta : alpha) + (/\d+\+?/.exec(data) || ''); 9636 } 9637 // Detect Firefox Mobile. 9638 if (name == 'Fennec' || name == 'Firefox' && /\b(?:Android|Firefox OS|KaiOS)\b/.test(os)) { 9639 name = 'Firefox Mobile'; 9640 } 9641 // Obscure Maxthon's unreliable version. 9642 else if (name == 'Maxthon' && version) { 9643 version = version.replace(/\.[\d.]+/, '.x'); 9644 } 9645 // Detect Xbox 360 and Xbox One. 9646 else if (/\bXbox\b/i.test(product)) { 9647 if (product == 'Xbox 360') { 9648 os = null; 9649 } 9650 if (product == 'Xbox 360' && /\bIEMobile\b/.test(ua)) { 9651 description.unshift('mobile mode'); 9652 } 9653 } 9654 // Add mobile postfix. 9655 else if ((/^(?:Chrome|IE|Opera)$/.test(name) || name && !product && !/Browser|Mobi/.test(name)) && 9656 (os == 'Windows CE' || /Mobi/i.test(ua))) { 9657 name += ' Mobile'; 9658 } 9659 // Detect IE platform preview. 9660 else if (name == 'IE' && useFeatures) { 9661 try { 9662 if (context.external === null) { 9663 description.unshift('platform preview'); 9664 } 9665 } catch(e) { 9666 description.unshift('embedded'); 9667 } 9668 } 9669 // Detect BlackBerry OS version. 9670 // http://docs.blackberry.com/en/developers/deliverables/18169/HTTP_headers_sent_by_BB_Browser_1234911_11.jsp 9671 else if ((/\bBlackBerry\b/.test(product) || /\bBB10\b/.test(ua)) && (data = 9672 (RegExp(product.replace(/ +/g, ' *') + '/([.\\d]+)', 'i').exec(ua) || 0)[1] || 9673 version 9674 )) { 9675 data = [data, /BB10/.test(ua)]; 9676 os = (data[1] ? (product = null, manufacturer = 'BlackBerry') : 'Device Software') + ' ' + data[0]; 9677 version = null; 9678 } 9679 // Detect Opera identifying/masking itself as another browser. 9680 // http://www.opera.com/support/kb/view/843/ 9681 else if (this != forOwn && product != 'Wii' && ( 9682 (useFeatures && opera) || 9683 (/Opera/.test(name) && /\b(?:MSIE|Firefox)\b/i.test(ua)) || 9684 (name == 'Firefox' && /\bOS X (?:\d+\.){2,}/.test(os)) || 9685 (name == 'IE' && ( 9686 (os && !/^Win/.test(os) && version > 5.5) || 9687 /\bWindows XP\b/.test(os) && version > 8 || 9688 version == 8 && !/\bTrident\b/.test(ua) 9689 )) 9690 ) && !reOpera.test((data = parse.call(forOwn, ua.replace(reOpera, '') + ';'))) && data.name) { 9691 // When "identifying", the UA contains both Opera and the other browser's name. 9692 data = 'ing as ' + data.name + ((data = data.version) ? ' ' + data : ''); 9693 if (reOpera.test(name)) { 9694 if (/\bIE\b/.test(data) && os == 'Mac OS') { 9695 os = null; 9696 } 9697 data = 'identify' + data; 9698 } 9699 // When "masking", the UA contains only the other browser's name. 9700 else { 9701 data = 'mask' + data; 9702 if (operaClass) { 9703 name = format(operaClass.replace(/([a-z])([A-Z])/g, '$1 $2')); 9704 } else { 9705 name = 'Opera'; 9706 } 9707 if (/\bIE\b/.test(data)) { 9708 os = null; 9709 } 9710 if (!useFeatures) { 9711 version = null; 9712 } 9713 } 9714 layout = ['Presto']; 9715 description.push(data); 9716 } 9717 // Detect WebKit Nightly and approximate Chrome/Safari versions. 9718 if ((data = (/\bAppleWebKit\/([\d.]+\+?)/i.exec(ua) || 0)[1])) { 9719 // Correct build number for numeric comparison. 9720 // (e.g. "532.5" becomes "532.05") 9721 data = [parseFloat(data.replace(/\.(\d)$/, '.0$1')), data]; 9722 // Nightly builds are postfixed with a "+". 9723 if (name == 'Safari' && data[1].slice(-1) == '+') { 9724 name = 'WebKit Nightly'; 9725 prerelease = 'alpha'; 9726 version = data[1].slice(0, -1); 9727 } 9728 // Clear incorrect browser versions. 9729 else if (version == data[1] || 9730 version == (data[2] = (/\bSafari\/([\d.]+\+?)/i.exec(ua) || 0)[1])) { 9731 version = null; 9732 } 9733 // Use the full Chrome version when available. 9734 data[1] = (/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(ua) || 0)[1]; 9735 // Detect Blink layout engine. 9736 if (data[0] == 537.36 && data[2] == 537.36 && parseFloat(data[1]) >= 28 && layout == 'WebKit') { 9737 layout = ['Blink']; 9738 } 9739 // Detect JavaScriptCore. 9740 // http://stackoverflow.com/questions/6768474/how-can-i-detect-which-javascript-engine-v8-or-jsc-is-used-at-runtime-in-androi 9741 if (!useFeatures || (!likeChrome && !data[1])) { 9742 layout && (layout[1] = 'like Safari'); 9743 data = (data = data[0], data < 400 ? 1 : data < 500 ? 2 : data < 526 ? 3 : data < 533 ? 4 : data < 534 ? '4+' : data < 535 ? 5 : data < 537 ? 6 : data < 538 ? 7 : data < 601 ? 8 : data < 602 ? 9 : data < 604 ? 10 : data < 606 ? 11 : data < 608 ? 12 : '12'); 9744 } else { 9745 layout && (layout[1] = 'like Chrome'); 9746 data = data[1] || (data = data[0], data < 530 ? 1 : data < 532 ? 2 : data < 532.05 ? 3 : data < 533 ? 4 : data < 534.03 ? 5 : data < 534.07 ? 6 : data < 534.10 ? 7 : data < 534.13 ? 8 : data < 534.16 ? 9 : data < 534.24 ? 10 : data < 534.30 ? 11 : data < 535.01 ? 12 : data < 535.02 ? '13+' : data < 535.07 ? 15 : data < 535.11 ? 16 : data < 535.19 ? 17 : data < 536.05 ? 18 : data < 536.10 ? 19 : data < 537.01 ? 20 : data < 537.11 ? '21+' : data < 537.13 ? 23 : data < 537.18 ? 24 : data < 537.24 ? 25 : data < 537.36 ? 26 : layout != 'Blink' ? '27' : '28'); 9747 } 9748 // Add the postfix of ".x" or "+" for approximate versions. 9749 layout && (layout[1] += ' ' + (data += typeof data == 'number' ? '.x' : /[.+]/.test(data) ? '' : '+')); 9750 // Obscure version for some Safari 1-2 releases. 9751 if (name == 'Safari' && (!version || parseInt(version) > 45)) { 9752 version = data; 9753 } else if (name == 'Chrome' && /\bHeadlessChrome/i.test(ua)) { 9754 description.unshift('headless'); 9755 } 9756 } 9757 // Detect Opera desktop modes. 9758 if (name == 'Opera' && (data = /\bzbov|zvav$/.exec(os))) { 9759 name += ' '; 9760 description.unshift('desktop mode'); 9761 if (data == 'zvav') { 9762 name += 'Mini'; 9763 version = null; 9764 } else { 9765 name += 'Mobile'; 9766 } 9767 os = os.replace(RegExp(' *' + data + '$'), ''); 9768 } 9769 // Detect Chrome desktop mode. 9770 else if (name == 'Safari' && /\bChrome\b/.exec(layout && layout[1])) { 9771 description.unshift('desktop mode'); 9772 name = 'Chrome Mobile'; 9773 version = null; 9774 9775 if (/\bOS X\b/.test(os)) { 9776 manufacturer = 'Apple'; 9777 os = 'iOS 4.3+'; 9778 } else { 9779 os = null; 9780 } 9781 } 9782 // Newer versions of SRWare Iron uses the Chrome tag to indicate its version number. 9783 else if (/\bSRWare Iron\b/.test(name) && !version) { 9784 version = getVersion('Chrome'); 9785 } 9786 // Strip incorrect OS versions. 9787 if (version && version.indexOf((data = /[\d.]+$/.exec(os))) == 0 && 9788 ua.indexOf('/' + data + '-') > -1) { 9789 os = trim(os.replace(data, '')); 9790 } 9791 // Ensure OS does not include the browser name. 9792 if (os && os.indexOf(name) != -1 && !RegExp(name + ' OS').test(os)) { 9793 os = os.replace(RegExp(' *' + qualify(name) + ' *'), ''); 9794 } 9795 // Add layout engine. 9796 if (layout && !/\b(?:Avant|Nook)\b/.test(name) && ( 9797 /Browser|Lunascape|Maxthon/.test(name) || 9798 name != 'Safari' && /^iOS/.test(os) && /\bSafari\b/.test(layout[1]) || 9799 /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(name) && layout[1])) { 9800 // Don't add layout details to description if they are falsey. 9801 (data = layout[layout.length - 1]) && description.push(data); 9802 } 9803 // Combine contextual information. 9804 if (description.length) { 9805 description = ['(' + description.join('; ') + ')']; 9806 } 9807 // Append manufacturer to description. 9808 if (manufacturer && product && product.indexOf(manufacturer) < 0) { 9809 description.push('on ' + manufacturer); 9810 } 9811 // Append product to description. 9812 if (product) { 9813 description.push((/^on /.test(description[description.length - 1]) ? '' : 'on ') + product); 9814 } 9815 // Parse the OS into an object. 9816 if (os) { 9817 data = / ([\d.+]+)$/.exec(os); 9818 isSpecialCasedOS = data && os.charAt(os.length - data[0].length - 1) == '/'; 9819 os = { 9820 'architecture': 32, 9821 'family': (data && !isSpecialCasedOS) ? os.replace(data[0], '') : os, 9822 'version': data ? data[1] : null, 9823 'toString': function() { 9824 var version = this.version; 9825 return this.family + ((version && !isSpecialCasedOS) ? ' ' + version : '') + (this.architecture == 64 ? ' 64-bit' : ''); 9826 } 9827 }; 9828 } 9829 // Add browser/OS architecture. 9830 if ((data = /\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(arch)) && !/\bi686\b/i.test(arch)) { 9831 if (os) { 9832 os.architecture = 64; 9833 os.family = os.family.replace(RegExp(' *' + data), ''); 9834 } 9835 if ( 9836 name && (/\bWOW64\b/i.test(ua) || 9837 (useFeatures && /\w(?:86|32)$/.test(nav.cpuClass || nav.platform) && !/\bWin64; x64\b/i.test(ua))) 9838 ) { 9839 description.unshift('32-bit'); 9840 } 9841 } 9842 // Chrome 39 and above on OS X is always 64-bit. 9843 else if ( 9844 os && /^OS X/.test(os.family) && 9845 name == 'Chrome' && parseFloat(version) >= 39 9846 ) { 9847 os.architecture = 64; 9848 } 9849 9850 ua || (ua = null); 9851 9852 /*------------------------------------------------------------------------*/ 9853 9854 /** 9855 * The platform object. 9856 * 9857 * @name platform 9858 * @type Object 9859 */ 9860 var platform = {}; 9861 9862 /** 9863 * The platform description. 9864 * 9865 * @memberOf platform 9866 * @type string|null 9867 */ 9868 platform.description = ua; 9869 9870 /** 9871 * The name of the browser's layout engine. 9872 * 9873 * The list of common layout engines include: 9874 * "Blink", "EdgeHTML", "Gecko", "Trident" and "WebKit" 9875 * 9876 * @memberOf platform 9877 * @type string|null 9878 */ 9879 platform.layout = layout && layout[0]; 9880 9881 /** 9882 * The name of the product's manufacturer. 9883 * 9884 * The list of manufacturers include: 9885 * "Apple", "Archos", "Amazon", "Asus", "Barnes & Noble", "BlackBerry", 9886 * "Google", "HP", "HTC", "LG", "Microsoft", "Motorola", "Nintendo", 9887 * "Nokia", "Samsung" and "Sony" 9888 * 9889 * @memberOf platform 9890 * @type string|null 9891 */ 9892 platform.manufacturer = manufacturer; 9893 9894 /** 9895 * The name of the browser/environment. 9896 * 9897 * The list of common browser names include: 9898 * "Chrome", "Electron", "Firefox", "Firefox for iOS", "IE", 9899 * "Microsoft Edge", "PhantomJS", "Safari", "SeaMonkey", "Silk", 9900 * "Opera Mini" and "Opera" 9901 * 9902 * Mobile versions of some browsers have "Mobile" appended to their name: 9903 * eg. "Chrome Mobile", "Firefox Mobile", "IE Mobile" and "Opera Mobile" 9904 * 9905 * @memberOf platform 9906 * @type string|null 9907 */ 9908 platform.name = name; 9909 9910 /** 9911 * The alpha/beta release indicator. 9912 * 9913 * @memberOf platform 9914 * @type string|null 9915 */ 9916 platform.prerelease = prerelease; 9917 9918 /** 9919 * The name of the product hosting the browser. 9920 * 9921 * The list of common products include: 9922 * 9923 * "BlackBerry", "Galaxy S4", "Lumia", "iPad", "iPod", "iPhone", "Kindle", 9924 * "Kindle Fire", "Nexus", "Nook", "PlayBook", "TouchPad" and "Transformer" 9925 * 9926 * @memberOf platform 9927 * @type string|null 9928 */ 9929 platform.product = product; 9930 9931 /** 9932 * The browser's user agent string. 9933 * 9934 * @memberOf platform 9935 * @type string|null 9936 */ 9937 platform.ua = ua; 9938 9939 /** 9940 * The browser/environment version. 9941 * 9942 * @memberOf platform 9943 * @type string|null 9944 */ 9945 platform.version = name && version; 9946 9947 /** 9948 * The name of the operating system. 9949 * 9950 * @memberOf platform 9951 * @type Object 9952 */ 9953 platform.os = os || { 9954 9955 /** 9956 * The CPU architecture the OS is built for. 9957 * 9958 * @memberOf platform.os 9959 * @type number|null 9960 */ 9961 'architecture': null, 9962 9963 /** 9964 * The family of the OS. 9965 * 9966 * Common values include: 9967 * "Windows", "Windows Server 2008 R2 / 7", "Windows Server 2008 / Vista", 9968 * "Windows XP", "OS X", "Linux", "Ubuntu", "Debian", "Fedora", "Red Hat", 9969 * "SuSE", "Android", "iOS" and "Windows Phone" 9970 * 9971 * @memberOf platform.os 9972 * @type string|null 9973 */ 9974 'family': null, 9975 9976 /** 9977 * The version of the OS. 9978 * 9979 * @memberOf platform.os 9980 * @type string|null 9981 */ 9982 'version': null, 9983 9984 /** 9985 * Returns the OS string. 9986 * 9987 * @memberOf platform.os 9988 * @returns {string} The OS string. 9989 */ 9990 'toString': function() { return 'null'; } 9991 }; 9992 9993 platform.parse = parse; 9994 platform.toString = toStringPlatform; 9995 9996 if (platform.version) { 9997 description.unshift(version); 9998 } 9999 if (platform.name) { 10000 description.unshift(name); 10001 } 10002 if (os && name && !(os == String(os).split(' ')[0] && (os == name.split(' ')[0] || product))) { 10003 description.push(product ? '(' + os + ')' : 'on ' + os); 10004 } 10005 if (description.length) { 10006 platform.description = description.join(' '); 10007 } 10008 return platform; 10009 } 10010 10011 /*--------------------------------------------------------------------------*/ 10012 10013 // Export platform. 10014 var platform = parse(); 10015 10016 // Some AMD build optimizers, like r.js, check for condition patterns like the following: 10017 if (t
vendor: 2,921 bytes, lines 10017-10098
10017rue) { 10018 // Expose platform on the global object to prevent errors when platform is 10019 // loaded by a script tag in the presence of an AMD loader. 10020 // See http://requirejs.org/docs/errors.html#mismatch for more details. 10021 root.platform = platform; 10022 10023 // Define as an anonymous module so platform can be aliased through path mapping. 10024 !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { 10025 return platform; 10026 }).call(exports, __webpack_require__, exports, module), 10027 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 10028 } 10029 // Check for `exports` after `define` in case a build optimizer adds an `exports` object. 10030 else {} 10031}.call(this)); 10032 10033 10034/***/ }) 10035 10036/******/ }); 10037/************************************************************************/ 10038/******/ // The module cache 10039/******/ var __webpack_module_cache__ = {}; 10040/******/ 10041/******/ // The require function 10042/******/ function __webpack_require__(moduleId) { 10043/******/ // Check if module is in cache 10044/******/ var cachedModule = __webpack_module_cache__[moduleId]; 10045/******/ if (cachedModule !== undefined) { 10046/******/ return cachedModule.exports; 10047/******/ } 10048/******/ // Create a new module (and put it into the cache) 10049/******/ var module = __webpack_module_cache__[moduleId] = { 10050/******/ id: moduleId, 10051/******/ loaded: false, 10052/******/ exports: {} 10053/******/ }; 10054/******/ 10055/******/ // Execute the module function 10056/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); 10057/******/ 10058/******/ // Flag the module as loaded 10059/******/ module.loaded = true; 10060/******/ 10061/******/ // Return the exports of the module 10062/******/ return module.exports; 10063/******/ } 10064/******/ 10065/************************************************************************/ 10066/******/ /* webpack/runtime/global */ 10067/******/ (() => { 10068/******/ __webpack_require__.g = (function() { 10069/******/ if (typeof globalThis === 'object') return globalThis; 10070/******/ try { 10071/******/ return this || new Function('return this')(); 10072/******/ } catch (e) { 10073/******/ if (typeof window === 'object') return window; 10074/******/ } 10075/******/ })(); 10076/******/ })(); 10077/******/ 10078/******/ /* webpack/runtime/node module decorator */ 10079/******/ (() => { 10080/******/ __webpack_require__.nmd = (module) => { 10081/******/ module.paths = []; 10082/******/ if (!module.children) module.children = []; 10083/******/ return module; 10084/******/ }; 10085/******/ })(); 10086/******/ 10087/************************************************************************/ 10088var __webpack_exports__ = {}; 10089// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 10090(() => { 10091/* 10092 # ----------------------------------------------------------------------------- 10093 # ~/src/template.js 10094 # J1 Template Javascript Core library 10095 # 10096 # Product/Info: 10097 # https://jekyll.one 10098 #
10099 # Copyright (C) 2022 Juergen Adams 10100 # 10101 # J1 Template is licensed under the MIT License. 10102 # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE 10103 # 10104 # ----------------------------------------------------------------------------- 10105*/ 10106// ----------------------------------------------------------------------------- 10107// ESLint shimming 10108// ----------------------------------------------------------------------------- 10109 10110/* eslint-disable no-unused-vars */ 10111 10112/* global window */ 10113// ----------------------------------------------------------------------------- 10114// Import SASS sources for HMR 10115// ----------------------------------------------------------------------------- 10116// import '../100_template_css/scss/theme_uno/components/_footer.scss'; 10117// import '../100_template_css/theme_uno.css'; // <-- yes, also require (s)css. This is a Webpack thing 10118// Core Libraries - imported|required from NODE|NPM modules 10119// ----------------------------------------------------------------------------- 10120// 10121// Following objects (framework modules) are *conditionaly* forced to be 10122// exposed for run-time to the global namespace (window) by WP config 10123// file (expose-loader): 10124// jQuery 10125// Popper ('popper.js/dist/umd/popper', https://github.com/twbs/bootstrap/issues/23381) 10126// ----------------------------------------------------------------------------- 10127// Core Utilities (moved to modules) 10128// ----------------------------------------------------------------------------- 10129// Following objects (native node modules) are *explicitely* forced to be 10130// exposed for run-time to the global namespace (window). 10131// ----------------------------------------------------------------------------- 10132window.Cookies = __webpack_require__(808); 10133window.yaml = __webpack_require__(320); 10134window.log4javascript = __webpack_require__(979); 10135window.liteURL = __webpack_require__(578); 10136window.platform = __webpack_require__(727); // Core Libraries - build|required from SOURCE 10137// ----------------------------------------------------------------------------- 10138// Following source objects|modules are *explicitely* forced to be 10139// exposed for run-time to the global namespace (window). 10140// ----------------------------------------------------------------------------- 10141 10142window.j1.adapter = __webpack_require__(476); 10143window.j1.anime = __webpack_require__(921); // added for fam 10144 10145window.j1.core = __webpack_require__(602); 10146window.j1.core.navigator = __webpack_require__(490); 10147window.j1.core.asciidoctor = __webpack_require__(977); 10148window.j1.core.scrollSmooth = __webpack_require__(814); // window.deeplTranslator = require('./js/deepl-translator'); // J1 Module deeplAPI used instead 10149// window.j1.fam = require('./js/fam/fam.js'); // cannot used until NOT rewritten to jQuery 10150// Following source objects|modules are *implicetly* forced to be 10151// exposed for run-time to the global namespace (window). 10152// ----------------------------------------------------------------------------- 10153//const Bootstrap = require('./js/bootstrap/bootstrap.js'); 10154//const J1JekyllSearch = require('./js/jekyll_search/jekyll_search.js'); 10155//const J1Yaml = require('js-yaml'); 10156 10157var J1Tocbot = __webpack_require__(799); 10158 10159var J1AttrChangeListener = __webpack_require__(610); //const J1ThemeSwitcher = require('./js/bs_theme_switcher/switcher.js'); 10160// const J1MmenuLight = require('./js/mmenu-light/mmenu.js'); 10161// Passing log data over Internet|SeeMe (currently NOT used) 10162// ----------------------------------------------------------------------------- 10163// window.j1.core.log4javascript = require('./js/logger/client/webhook.js'); 10164// BMD Libraries (moved to modules) 10165// ----------------------------------------------------------------------------- 10166// window.bootstrapMaterialDesign = require('./js/bmd/js/bmd.js'); 10167// Github Webhooks (currently NOT used) 10168// ----------------------------------------------------------------------------- 10169// window.j1.core.webhooks = require('./js/webhooks/octokit/client.js'); 10170// Test|Custom modules (currently NOT used) 10171// ----------------------------------------------------------------------------- 10172// window.j1promiseTest = require('./js/custom/test_promises.js'); 10173// window.j1Example = require('./js/custom/example_module.js'); 10174// BS Libraries (moved to modules) 10175// ----------------------------------------------------------------------------- 10176// Following source objects|modules are *implicetly* forced to be 10177// exposed for run-time to the global namespace (window). 10178// ----------------------------------------------------------------------------- 10179// const Bootstrap = require('./js/bootstrap/bootstrap.js'); 10180// const J1JekyllSearch = require('./js/jekyll_search/jekyll_search.js'); // Buffer Kack 10181// const J1Tocbot = require('./js/tocbot/tocbot.js'); 10182// Backstretch (moved to modules) 10183// ----------------------------------------------------------------------------- 10184// Following source objects|modules are *implicetly* forced to be 10185// exposed for run-time to the namespace of jQuery ($). 10186// ----------------------------------------------------------------------------- 10187// const J1Attics = require('./js/backstretch/backstretch.js'); 10188// Additional Vanilla JS helpers 10189// ----------------------------------------------------------------------------- 10190 10191 10192var J1AdocResultViewer = __webpack_require__(253); // const MSIEPolyfills = require('./js/polyfills/ms-ie.js'); 10193// HMR messages (currently NOT used) 10194// ----------------------------------------------------------------------------- 10195// if (module.hot) { 10196// var logtext; 10197// var stat; 10198// var stat=module.hot.status(); 10199// 10200// logtext='[INFO ] [HMR ] [Hot Module Replacement enabled]'; 10201// console.log(logtext); 10202// logtext='[INFO ] [HMR ] [Status: ' + stat + ']'; 10203// console.log(logtext); 10204// 10205// module.hot.accept('./template.js', function() { 10206// console.log('[HMR] Accepting the updated template.js module!'); 10207// }); 10208// 10209// module.hot.accept('../100_template_css/theme_uno.scss', function () { 10210// console.log('[HMR] Accepting the updated style.css module!'); 10211// require('../100_template_css/theme_uno.scss') 10212// }) 10213// 10214// React to the current status... 10215// module.hot.addStatusHandler(status => { 10216// stat=module.hot.status(); 10217// logtext='[INFO ] [HMR ] [Status: ' + stat + ']'; 10218// console.log(logtext); 10219// }); 10220//} 10221// ----------------------------------------------------------------------------- 10222// END 10223})(); 10224 10225/******/ })() 10226;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.