vendor: 5,123 bytes, lines 1-174
1/******/ (function(modules) { // webpackBootstrap 2/******/ // The module cache 3/******/ var installedModules = {}; 4/******/ 5/******/ // The require function 6/******/ function __webpack_require__(moduleId) { 7/******/ 8/******/ // Check if module is in cache 9/******/ if(installedModules[moduleId]) { 10/******/ return installedModules[moduleId].exports; 11/******/ } 12/******/ // Create a new module (and put it into the cache) 13/******/ var module = installedModules[moduleId] = { 14/******/ i: moduleId, 15/******/ l: false, 16/******/ exports: {} 17/******/ }; 18/******/ 19/******/ // Execute the module function 20/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21/******/ 22/******/ // Flag the module as loaded 23/******/ module.l = true; 24/******/ 25/******/ // Return the exports of the module 26/******/ return module.exports; 27/******/ } 28/******/ 29/******/ 30/******/ // expose the modules object (__webpack_modules__) 31/******/ __webpack_require__.m = modules; 32/******/ 33/******/ // expose the module cache 34/******/ __webpack_require__.c = installedModules; 35/******/ 36/******/ // define getter function for harmony exports 37/******/ __webpack_require__.d = function(exports, name, getter) { 38/******/ if(!__webpack_require__.o(exports, name)) { 39/******/ Object.defineProperty(exports, name, { 40/******/ configurable: false, 41/******/ enumerable: true, 42/******/ get: getter 43/******/ }); 44/******/ } 45/******/ }; 46/******/ 47/******/ // getDefaultExport function for compatibility with non-harmony modules 48/******/ __webpack_require__.n = function(module) { 49/******/ var getter = module && module.__esModule ? 50/******/ function getDefault() { return module['default']; } : 51/******/ function getModuleExports() { return module; }; 52/******/ __webpack_require__.d(getter, 'a', getter); 53/******/ return getter; 54/******/ }; 55/******/ 56/******/ // Object.prototype.hasOwnProperty.call 57/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 58/******/ 59/******/ // __webpack_public_path__ 60/******/ __webpack_require__.p = "/app/themes/cclodeve/dist/"; 61/******/ 62/******/ // Load entry module and return exports 63/******/ return __webpack_require__(__webpack_require__.s = 138); 64/******/ }) 65/************************************************************************/ 66/******/ ([ 67/* 0 */ 68/***/ (function(module, exports, __webpack_require__) { 69 70/* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js 71//! version : 2.29.4 72//! authors : Tim Wood, Iskren Chernev, Moment.js contributors 73//! license : MIT 74//! momentjs.com 75 76;(function (global, factory) { 77 true ? module.exports = factory() : 78 typeof define === 'function' && define.amd ? define(factory) : 79 global.moment = factory() 80}(this, (function () { 'use strict'; 81 82 var hookCallback; 83 84 function hooks() { 85 return hookCallback.apply(null, arguments); 86 } 87 88 // This is done to register the method called with moment() 89 // without creating circular dependencies. 90 function setHookCallback(callback) { 91 hookCallback = callback; 92 } 93 94 function isArray(input) { 95 return ( 96 input instanceof Array || 97 Object.prototype.toString.call(input) === '[object Array]' 98 ); 99 } 100 101 function isObject(input) { 102 // IE8 will treat undefined and null as object if it wasn't for 103 // input != null 104 return ( 105 input != null && 106 Object.prototype.toString.call(input) === '[object Object]' 107 ); 108 } 109 110 function hasOwnProp(a, b) { 111 return Object.prototype.hasOwnProperty.call(a, b); 112 } 113 114 function isObjectEmpty(obj) { 115 if (Object.getOwnPropertyNames) { 116 return Object.getOwnPropertyNames(obj).length === 0; 117 } else { 118 var k; 119 for (k in obj) { 120 if (hasOwnProp(obj, k)) { 121 return false; 122 } 123 } 124 return true; 125 } 126 } 127 128 function isUndefined(input) { 129 return input === void 0; 130 } 131 132 function isNumber(input) { 133 return ( 134 typeof input === 'number' || 135 Object.prototype.toString.call(input) === '[object Number]' 136 ); 137 } 138 139 function isDate(input) { 140 return ( 141 input instanceof Date || 142 Object.prototype.toString.call(input) === '[object Date]' 143 ); 144 } 145 146 function map(arr, fn) { 147 var res = [], 148 i, 149 arrLen = arr.length; 150 for (i = 0; i < arrLen; ++i) { 151 res.push(fn(arr[i], i)); 152 } 153 return res; 154 } 155 156 function extend(a, b) { 157 for (var i in b) { 158 if (hasOwnProp(b, i)) { 159 a[i] = b[i]; 160 } 161 } 162 163 if (hasOwnProp(b, 'toString')) { 164 a.toString = b.toString; 165 } 166 167 if (hasOwnProp(b, 'valueOf')) { 168 a.valueOf = b.valueOf; 169 } 170 171 return a; 172 } 173 174 function createUTC(input, format, locale, strict) {
vendor: 10,392 bytes, lines 175-524
175 return createLocalOrUTC(input, format, locale, strict, true).utc(); 176 } 177 178 function defaultParsingFlags() { 179 // We need to deep clone this object. 180 return { 181 empty: false, 182 unusedTokens: [], 183 unusedInput: [], 184 overflow: -2, 185 charsLeftOver: 0, 186 nullInput: false, 187 invalidEra: null, 188 invalidMonth: null, 189 invalidFormat: false, 190 userInvalidated: false, 191 iso: false, 192 parsedDateParts: [], 193 era: null, 194 meridiem: null, 195 rfc2822: false, 196 weekdayMismatch: false, 197 }; 198 } 199 200 function getParsingFlags(m) { 201 if (m._pf == null) { 202 m._pf = defaultParsingFlags(); 203 } 204 return m._pf; 205 } 206 207 var some; 208 if (Array.prototype.some) { 209 some = Array.prototype.some; 210 } else { 211 some = function (fun) { 212 var t = Object(this), 213 len = t.length >>> 0, 214 i; 215 216 for (i = 0; i < len; i++) { 217 if (i in t && fun.call(this, t[i], i, t)) { 218 return true; 219 } 220 } 221 222 return false; 223 }; 224 } 225 226 function isValid(m) { 227 if (m._isValid == null) { 228 var flags = getParsingFlags(m), 229 parsedParts = some.call(flags.parsedDateParts, function (i) { 230 return i != null; 231 }), 232 isNowValid = 233 !isNaN(m._d.getTime()) && 234 flags.overflow < 0 && 235 !flags.empty && 236 !flags.invalidEra && 237 !flags.invalidMonth && 238 !flags.invalidWeekday && 239 !flags.weekdayMismatch && 240 !flags.nullInput && 241 !flags.invalidFormat && 242 !flags.userInvalidated && 243 (!flags.meridiem || (flags.meridiem && parsedParts)); 244 245 if (m._strict) { 246 isNowValid = 247 isNowValid && 248 flags.charsLeftOver === 0 && 249 flags.unusedTokens.length === 0 && 250 flags.bigHour === undefined; 251 } 252 253 if (Object.isFrozen == null || !Object.isFrozen(m)) { 254 m._isValid = isNowValid; 255 } else { 256 return isNowValid; 257 } 258 } 259 return m._isValid; 260 } 261 262 function createInvalid(flags) { 263 var m = createUTC(NaN); 264 if (flags != null) { 265 extend(getParsingFlags(m), flags); 266 } else { 267 getParsingFlags(m).userInvalidated = true; 268 } 269 270 return m; 271 } 272 273 // Plugins that add properties should also add the key here (null value), 274 // so we can properly clone ourselves. 275 var momentProperties = (hooks.momentProperties = []), 276 updateInProgress = false; 277 278 function copyConfig(to, from) { 279 var i, 280 prop, 281 val, 282 momentPropertiesLen = momentProperties.length; 283 284 if (!isUndefined(from._isAMomentObject)) { 285 to._isAMomentObject = from._isAMomentObject; 286 } 287 if (!isUndefined(from._i)) { 288 to._i = from._i; 289 } 290 if (!isUndefined(from._f)) { 291 to._f = from._f; 292 } 293 if (!isUndefined(from._l)) { 294 to._l = from._l; 295 } 296 if (!isUndefined(from._strict)) { 297 to._strict = from._strict; 298 } 299 if (!isUndefined(from._tzm)) { 300 to._tzm = from._tzm; 301 } 302 if (!isUndefined(from._isUTC)) { 303 to._isUTC = from._isUTC; 304 } 305 if (!isUndefined(from._offset)) { 306 to._offset = from._offset; 307 } 308 if (!isUndefined(from._pf)) { 309 to._pf = getParsingFlags(from); 310 } 311 if (!isUndefined(from._locale)) { 312 to._locale = from._locale; 313 } 314 315 if (momentPropertiesLen > 0) { 316 for (i = 0; i < momentPropertiesLen; i++) { 317 prop = momentProperties[i]; 318 val = from[prop]; 319 if (!isUndefined(val)) { 320 to[prop] = val; 321 } 322 } 323 } 324 325 return to; 326 } 327 328 // Moment prototype object 329 function Moment(config) { 330 copyConfig(this, config); 331 this._d = new Date(config._d != null ? config._d.getTime() : NaN); 332 if (!this.isValid()) { 333 this._d = new Date(NaN); 334 } 335 // Prevent infinite loop in case updateOffset creates new moment 336 // objects. 337 if (updateInProgress === false) { 338 updateInProgress = true; 339 hooks.updateOffset(this); 340 updateInProgress = false; 341 } 342 } 343 344 function isMoment(obj) { 345 return ( 346 obj instanceof Moment || (obj != null && obj._isAMomentObject != null) 347 ); 348 } 349 350 function warn(msg) { 351 if ( 352 hooks.suppressDeprecationWarnings === false && 353 typeof console !== 'undefined' && 354 console.warn 355 ) { 356 console.warn('Deprecation warning: ' + msg); 357 } 358 } 359 360 function deprecate(msg, fn) { 361 var firstTime = true; 362 363 return extend(function () { 364 if (hooks.deprecationHandler != null) { 365 hooks.deprecationHandler(null, msg); 366 } 367 if (firstTime) { 368 var args = [], 369 arg, 370 i, 371 key, 372 argLen = arguments.length; 373 for (i = 0; i < argLen; i++) { 374 arg = ''; 375 if (typeof arguments[i] === 'object') { 376 arg += '\n[' + i + '] '; 377 for (key in arguments[0]) { 378 if (hasOwnProp(arguments[0], key)) { 379 arg += key + ': ' + arguments[0][key] + ', '; 380 } 381 } 382 arg = arg.slice(0, -2); // Remove trailing comma and space 383 } else { 384 arg = arguments[i]; 385 } 386 args.push(arg); 387 } 388 warn( 389 msg + 390 '\nArguments: ' + 391 Array.prototype.slice.call(args).join('') + 392 '\n' + 393 new Error().stack 394 ); 395 firstTime = false; 396 } 397 return fn.apply(this, arguments); 398 }, fn); 399 } 400 401 var deprecations = {}; 402 403 function deprecateSimple(name, msg) { 404 if (hooks.deprecationHandler != null) { 405 hooks.deprecationHandler(name, msg); 406 } 407 if (!deprecations[name]) { 408 warn(msg); 409 deprecations[name] = true; 410 } 411 } 412 413 hooks.suppressDeprecationWarnings = false; 414 hooks.deprecationHandler = null; 415 416 function isFunction(input) { 417 return ( 418 (typeof Function !== 'undefined' && input instanceof Function) || 419 Object.prototype.toString.call(input) === '[object Function]' 420 ); 421 } 422 423 function set(config) { 424 var prop, i; 425 for (i in config) { 426 if (hasOwnProp(config, i)) { 427 prop = config[i]; 428 if (isFunction(prop)) { 429 this[i] = prop; 430 } else { 431 this['_' + i] = prop; 432 } 433 } 434 } 435 this._config = config; 436 // Lenient ordinal parsing accepts just a number in addition to 437 // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. 438 // TODO: Remove "ordinalParse" fallback in next major release. 439 this._dayOfMonthOrdinalParseLenient = new RegExp( 440 (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + 441 '|' + 442 /\d{1,2}/.source 443 ); 444 } 445 446 function mergeConfigs(parentConfig, childConfig) { 447 var res = extend({}, parentConfig), 448 prop; 449 for (prop in childConfig) { 450 if (hasOwnProp(childConfig, prop)) { 451 if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { 452 res[prop] = {}; 453 extend(res[prop], parentConfig[prop]); 454 extend(res[prop], childConfig[prop]); 455 } else if (childConfig[prop] != null) { 456 res[prop] = childConfig[prop]; 457 } else { 458 delete res[prop]; 459 } 460 } 461 } 462 for (prop in parentConfig) { 463 if ( 464 hasOwnProp(parentConfig, prop) && 465 !hasOwnProp(childConfig, prop) && 466 isObject(parentConfig[prop]) 467 ) { 468 // make sure changes to properties don't modify parent config 469 res[prop] = extend({}, res[prop]); 470 } 471 } 472 return res; 473 } 474 475 function Locale(config) { 476 if (config != null) { 477 this.set(config); 478 } 479 } 480 481 var keys; 482 483 if (Object.keys) { 484 keys = Object.keys; 485 } else { 486 keys = function (obj) { 487 var i, 488 res = []; 489 for (i in obj) { 490 if (hasOwnProp(obj, i)) { 491 res.push(i); 492 } 493 } 494 return res; 495 }; 496 } 497 498 var defaultCalendar = { 499 sameDay: '[Today at] LT', 500 nextDay: '[Tomorrow at] LT', 501 nextWeek: 'dddd [at] LT', 502 lastDay: '[Yesterday at] LT', 503 lastWeek: '[Last] dddd [at] LT', 504 sameElse: 'L', 505 }; 506 507 function calendar(key, mom, now) { 508 var output = this._calendar[key] || this._calendar['sameElse']; 509 return isFunction(output) ? output.call(mom, now) : output; 510 } 511 512 function zeroFill(number, targetLength, forceSign) { 513 var absNumber = '' + Math.abs(number), 514 zerosToFill = targetLength - absNumber.length, 515 sign = number >= 0; 516 return ( 517 (sign ? (forceSign ? '+' : '') : '-') + 518 Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + 519 absNumber 520 ); 521 } 522 523 var formattingTokens = 524
vendor: 8,563 bytes, lines 524-828
524 /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, 525 localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, 526 formatFunctions = {}, 527 formatTokenFunctions = {}; 528 529 // token: 'M' 530 // padded: ['MM', 2] 531 // ordinal: 'Mo' 532 // callback: function () { this.month() + 1 } 533 function addFormatToken(token, padded, ordinal, callback) { 534 var func = callback; 535 if (typeof callback === 'string') { 536 func = function () { 537 return this[callback](); 538 }; 539 } 540 if (token) { 541 formatTokenFunctions[token] = func; 542 } 543 if (padded) { 544 formatTokenFunctions[padded[0]] = function () { 545 return zeroFill(func.apply(this, arguments), padded[1], padded[2]); 546 }; 547 } 548 if (ordinal) { 549 formatTokenFunctions[ordinal] = function () { 550 return this.localeData().ordinal( 551 func.apply(this, arguments), 552 token 553 ); 554 }; 555 } 556 } 557 558 function removeFormattingTokens(input) { 559 if (input.match(/\[[\s\S]/)) { 560 return input.replace(/^\[|\]$/g, ''); 561 } 562 return input.replace(/\\/g, ''); 563 } 564 565 function makeFormatFunction(format) { 566 var array = format.match(formattingTokens), 567 i, 568 length; 569 570 for (i = 0, length = array.length; i < length; i++) { 571 if (formatTokenFunctions[array[i]]) { 572 array[i] = formatTokenFunctions[array[i]]; 573 } else { 574 array[i] = removeFormattingTokens(array[i]); 575 } 576 } 577 578 return function (mom) { 579 var output = '', 580 i; 581 for (i = 0; i < length; i++) { 582 output += isFunction(array[i]) 583 ? array[i].call(mom, format) 584 : array[i]; 585 } 586 return output; 587 }; 588 } 589 590 // format date using native date object 591 function formatMoment(m, format) { 592 if (!m.isValid()) { 593 return m.localeData().invalidDate(); 594 } 595 596 format = expandFormat(format, m.localeData()); 597 formatFunctions[format] = 598 formatFunctions[format] || makeFormatFunction(format); 599 600 return formatFunctions[format](m); 601 } 602 603 function expandFormat(format, locale) { 604 var i = 5; 605 606 function replaceLongDateFormatTokens(input) { 607 return locale.longDateFormat(input) || input; 608 } 609 610 localFormattingTokens.lastIndex = 0; 611 while (i >= 0 && localFormattingTokens.test(format)) { 612 format = format.replace( 613 localFormattingTokens, 614 replaceLongDateFormatTokens 615 ); 616 localFormattingTokens.lastIndex = 0; 617 i -= 1; 618 } 619 620 return format; 621 } 622 623 var defaultLongDateFormat = { 624 LTS: 'h:mm:ss A', 625 LT: 'h:mm A', 626 L: 'MM/DD/YYYY', 627 LL: 'MMMM D, YYYY', 628 LLL: 'MMMM D, YYYY h:mm A', 629 LLLL: 'dddd, MMMM D, YYYY h:mm A', 630 }; 631 632 function longDateFormat(key) { 633 var format = this._longDateFormat[key], 634 formatUpper = this._longDateFormat[key.toUpperCase()]; 635 636 if (format || !formatUpper) { 637 return format; 638 } 639 640 this._longDateFormat[key] = formatUpper 641 .match(formattingTokens) 642 .map(function (tok) { 643 if ( 644 tok === 'MMMM' || 645 tok === 'MM' || 646 tok === 'DD' || 647 tok === 'dddd' 648 ) { 649 return tok.slice(1); 650 } 651 return tok; 652 }) 653 .join(''); 654 655 return this._longDateFormat[key]; 656 } 657 658 var defaultInvalidDate = 'Invalid date'; 659 660 function invalidDate() { 661 return this._invalidDate; 662 } 663 664 var defaultOrdinal = '%d', 665 defaultDayOfMonthOrdinalParse = /\d{1,2}/; 666 667 function ordinal(number) { 668 return this._ordinal.replace('%d', number); 669 } 670 671 var defaultRelativeTime = { 672 future: 'in %s', 673 past: '%s ago', 674 s: 'a few seconds', 675 ss: '%d seconds', 676 m: 'a minute', 677 mm: '%d minutes', 678 h: 'an hour', 679 hh: '%d hours', 680 d: 'a day', 681 dd: '%d days', 682 w: 'a week', 683 ww: '%d weeks', 684 M: 'a month', 685 MM: '%d months', 686 y: 'a year', 687 yy: '%d years', 688 }; 689 690 function relativeTime(number, withoutSuffix, string, isFuture) { 691 var output = this._relativeTime[string]; 692 return isFunction(output) 693 ? output(number, withoutSuffix, string, isFuture) 694 : output.replace(/%d/i, number); 695 } 696 697 function pastFuture(diff, output) { 698 var format = this._relativeTime[diff > 0 ? 'future' : 'past']; 699 return isFunction(format) ? format(output) : format.replace(/%s/i, output); 700 } 701 702 var aliases = {}; 703 704 function addUnitAlias(unit, shorthand) { 705 var lowerCase = unit.toLowerCase(); 706 aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; 707 } 708 709 function normalizeUnits(units) { 710 return typeof units === 'string' 711 ? aliases[units] || aliases[units.toLowerCase()] 712 : undefined; 713 } 714 715 function normalizeObjectUnits(inputObject) { 716 var normalizedInput = {}, 717 normalizedProp, 718 prop; 719 720 for (prop in inputObject) { 721 if (hasOwnProp(inputObject, prop)) { 722 normalizedProp = normalizeUnits(prop); 723 if (normalizedProp) { 724 normalizedInput[normalizedProp] = inputObject[prop]; 725 } 726 } 727 } 728 729 return normalizedInput; 730 } 731 732 var priorities = {}; 733 734 function addUnitPriority(unit, priority) { 735 priorities[unit] = priority; 736 } 737 738 function getPrioritizedUnits(unitsObj) { 739 var units = [], 740 u; 741 for (u in unitsObj) { 742 if (hasOwnProp(unitsObj, u)) { 743 units.push({ unit: u, priority: priorities[u] }); 744 } 745 } 746 units.sort(function (a, b) { 747 return a.priority - b.priority; 748 }); 749 return units; 750 } 751 752 function isLeapYear(year) { 753 return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; 754 } 755 756 function absFloor(number) { 757 if (number < 0) { 758 // -0 -> 0 759 return Math.ceil(number) || 0; 760 } else { 761 return Math.floor(number); 762 } 763 } 764 765 function toInt(argumentForCoercion) { 766 var coercedNumber = +argumentForCoercion, 767 value = 0; 768 769 if (coercedNumber !== 0 && isFinite(coercedNumber)) { 770 value = absFloor(coercedNumber); 771 } 772 773 return value; 774 } 775 776 function makeGetSet(unit, keepTime) { 777 return function (value) { 778 if (value != null) { 779 set$1(this, unit, value); 780 hooks.updateOffset(this, keepTime); 781 return this; 782 } else { 783 return get(this, unit); 784 } 785 }; 786 } 787 788 function get(mom, unit) { 789 return mom.isValid() 790 ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() 791 : NaN; 792 } 793 794 function set$1(mom, unit, value) { 795 if (mom.isValid() && !isNaN(value)) { 796 if ( 797 unit === 'FullYear' && 798 isLeapYear(mom.year()) && 799 mom.month() === 1 && 800 mom.date() === 29 801 ) { 802 value = toInt(value); 803 mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit]( 804 value, 805 mom.month(), 806 daysInMonth(value, mom.month()) 807 ); 808 } else { 809 mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); 810 } 811 } 812 } 813 814 // MOMENTS 815 816 function stringGet(units) { 817 units = normalizeUnits(units); 818 if (isFunction(this[units])) { 819 return this[units](); 820 } 821 return this; 822 } 823 824 function stringSet(units, value) { 825 if (typeof units === 'object') { 826 units = normalizeObjectUnits(units); 827 var prioritized = getPrioritizedUnits(units), 828 i
vendor: 5,547 bytes, lines 828-1014
828, 829 prioritizedLen = prioritized.length; 830 for (i = 0; i < prioritizedLen; i++) { 831 this[prioritized[i].unit](units[prioritized[i].unit]); 832 } 833 } else { 834 units = normalizeUnits(units); 835 if (isFunction(this[units])) { 836 return this[units](value); 837 } 838 } 839 return this; 840 } 841 842 var match1 = /\d/, // 0 - 9 843 match2 = /\d\d/, // 00 - 99 844 match3 = /\d{3}/, // 000 - 999 845 match4 = /\d{4}/, // 0000 - 9999 846 match6 = /[+-]?\d{6}/, // -999999 - 999999 847 match1to2 = /\d\d?/, // 0 - 99 848 match3to4 = /\d\d\d\d?/, // 999 - 9999 849 match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999 850 match1to3 = /\d{1,3}/, // 0 - 999 851 match1to4 = /\d{1,4}/, // 0 - 9999 852 match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999 853 matchUnsigned = /\d+/, // 0 - inf 854 matchSigned = /[+-]?\d+/, // -inf - inf 855 matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z 856 matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z 857 matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123 858 // any word (or two) characters or numbers including two/three word month in arabic. 859 // includes scottish gaelic two word and hyphenated months 860 matchWord = 861 /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, 862 regexes; 863 864 regexes = {}; 865 866 function addRegexToken(token, regex, strictRegex) { 867 regexes[token] = isFunction(regex) 868 ? regex 869 : function (isStrict, localeData) { 870 return isStrict && strictRegex ? strictRegex : regex; 871 }; 872 } 873 874 function getParseRegexForToken(token, config) { 875 if (!hasOwnProp(regexes, token)) { 876 return new RegExp(unescapeFormat(token)); 877 } 878 879 return regexes[token](config._strict, config._locale); 880 } 881 882 // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript 883 function unescapeFormat(s) { 884 return regexEscape( 885 s 886 .replace('\\', '') 887 .replace( 888 /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, 889 function (matched, p1, p2, p3, p4) { 890 return p1 || p2 || p3 || p4; 891 } 892 ) 893 ); 894 } 895 896 function regexEscape(s) { 897 return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); 898 } 899 900 var tokens = {}; 901 902 function addParseToken(token, callback) { 903 var i, 904 func = callback, 905 tokenLen; 906 if (typeof token === 'string') { 907 token = [token]; 908 } 909 if (isNumber(callback)) { 910 func = function (input, array) { 911 array[callback] = toInt(input); 912 }; 913 } 914 tokenLen = token.length; 915 for (i = 0; i < tokenLen; i++) { 916 tokens[token[i]] = func; 917 } 918 } 919 920 function addWeekParseToken(token, callback) { 921 addParseToken(token, function (input, array, config, token) { 922 config._w = config._w || {}; 923 callback(input, config._w, config, token); 924 }); 925 } 926 927 function addTimeToArrayFromToken(token, input, config) { 928 if (input != null && hasOwnProp(tokens, token)) { 929 tokens[token](input, config._a, config, token); 930 } 931 } 932 933 var YEAR = 0, 934 MONTH = 1, 935 DATE = 2, 936 HOUR = 3, 937 MINUTE = 4, 938 SECOND = 5, 939 MILLISECOND = 6, 940 WEEK = 7, 941 WEEKDAY = 8; 942 943 function mod(n, x) { 944 return ((n % x) + x) % x; 945 } 946 947 var indexOf; 948 949 if (Array.prototype.indexOf) { 950 indexOf = Array.prototype.indexOf; 951 } else { 952 indexOf = function (o) { 953 // I know 954 var i; 955 for (i = 0; i < this.length; ++i) { 956 if (this[i] === o) { 957 return i; 958 } 959 } 960 return -1; 961 }; 962 } 963 964 function daysInMonth(year, month) { 965 if (isNaN(year) || isNaN(month)) { 966 return NaN; 967 } 968 var modMonth = mod(month, 12); 969 year += (month - modMonth) / 12; 970 return modMonth === 1 971 ? isLeapYear(year) 972 ? 29 973 : 28 974 : 31 - ((modMonth % 7) % 2); 975 } 976 977 // FORMATTING 978 979 addFormatToken('M', ['MM', 2], 'Mo', function () { 980 return this.month() + 1; 981 }); 982 983 addFormatToken('MMM', 0, 0, function (format) { 984 return this.localeData().monthsShort(this, format); 985 }); 986 987 addFormatToken('MMMM', 0, 0, function (format) { 988 return this.localeData().months(this, format); 989 }); 990 991 // ALIASES 992 993 addUnitAlias('month', 'M'); 994 995 // PRIORITY 996 997 addUnitPriority('month', 8); 998 999 // PARSING 1000 1001 addRegexToken('M', match1to2); 1002 addRegexToken('MM', match1to2, match2); 1003 addRegexToken('MMM', function (isStrict, locale) { 1004 return locale.monthsShortRegex(isStrict); 1005 }); 1006 addRegexToken('MMMM', function (isStrict, locale) { 1007 return locale.monthsRegex(isStrict); 1008 }); 1009 1010 addParseToken(['M', 'MM'], function (input, array) { 1011 array[MONTH] = toInt(input) - 1; 1012 }); 1013 1014 addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
1015 var month = config._locale.monthsParse(input, token, config._strict); 1016 // if we didn't find a month name, mark the date as invalid. 1017 if (month != null) { 1018 array[MONTH] = month; 1019 } else { 1020 getParsingFlags(config).invalidMonth = input; 1021 } 1022 }); 1023 1024 // LOCALES 1025 1026 var defaultLocaleMonths = 1027 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 1028 '_' 1029 ), 1030 defaultLocaleMonthsShort = 1031 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'
vendor: 13,773 bytes, lines 1031-1473
1031), 1032 MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, 1033 defaultMonthsShortRegex = matchWord, 1034 defaultMonthsRegex = matchWord; 1035 1036 function localeMonths(m, format) { 1037 if (!m) { 1038 return isArray(this._months) 1039 ? this._months 1040 : this._months['standalone']; 1041 } 1042 return isArray(this._months) 1043 ? this._months[m.month()] 1044 : this._months[ 1045 (this._months.isFormat || MONTHS_IN_FORMAT).test(format) 1046 ? 'format' 1047 : 'standalone' 1048 ][m.month()]; 1049 } 1050 1051 function localeMonthsShort(m, format) { 1052 if (!m) { 1053 return isArray(this._monthsShort) 1054 ? this._monthsShort 1055 : this._monthsShort['standalone']; 1056 } 1057 return isArray(this._monthsShort) 1058 ? this._monthsShort[m.month()] 1059 : this._monthsShort[ 1060 MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone' 1061 ][m.month()]; 1062 } 1063 1064 function handleStrictParse(monthName, format, strict) { 1065 var i, 1066 ii, 1067 mom, 1068 llc = monthName.toLocaleLowerCase(); 1069 if (!this._monthsParse) { 1070 // this is not used 1071 this._monthsParse = []; 1072 this._longMonthsParse = []; 1073 this._shortMonthsParse = []; 1074 for (i = 0; i < 12; ++i) { 1075 mom = createUTC([2000, i]); 1076 this._shortMonthsParse[i] = this.monthsShort( 1077 mom, 1078 '' 1079 ).toLocaleLowerCase(); 1080 this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); 1081 } 1082 } 1083 1084 if (strict) { 1085 if (format === 'MMM') { 1086 ii = indexOf.call(this._shortMonthsParse, llc); 1087 return ii !== -1 ? ii : null; 1088 } else { 1089 ii = indexOf.call(this._longMonthsParse, llc); 1090 return ii !== -1 ? ii : null; 1091 } 1092 } else { 1093 if (format === 'MMM') { 1094 ii = indexOf.call(this._shortMonthsParse, llc); 1095 if (ii !== -1) { 1096 return ii; 1097 } 1098 ii = indexOf.call(this._longMonthsParse, llc); 1099 return ii !== -1 ? ii : null; 1100 } else { 1101 ii = indexOf.call(this._longMonthsParse, llc); 1102 if (ii !== -1) { 1103 return ii; 1104 } 1105 ii = indexOf.call(this._shortMonthsParse, llc); 1106 return ii !== -1 ? ii : null; 1107 } 1108 } 1109 } 1110 1111 function localeMonthsParse(monthName, format, strict) { 1112 var i, mom, regex; 1113 1114 if (this._monthsParseExact) { 1115 return handleStrictParse.call(this, monthName, format, strict); 1116 } 1117 1118 if (!this._monthsParse) { 1119 this._monthsParse = []; 1120 this._longMonthsParse = []; 1121 this._shortMonthsParse = []; 1122 } 1123 1124 // TODO: add sorting 1125 // Sorting makes sure if one month (or abbr) is a prefix of another 1126 // see sorting in computeMonthsParse 1127 for (i = 0; i < 12; i++) { 1128 // make the regex if we don't have it already 1129 mom = createUTC([2000, i]); 1130 if (strict && !this._longMonthsParse[i]) { 1131 this._longMonthsParse[i] = new RegExp( 1132 '^' + this.months(mom, '').replace('.', '') + '$', 1133 'i' 1134 ); 1135 this._shortMonthsParse[i] = new RegExp( 1136 '^' + this.monthsShort(mom, '').replace('.', '') + '$', 1137 'i' 1138 ); 1139 } 1140 if (!strict && !this._monthsParse[i]) { 1141 regex = 1142 '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); 1143 this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); 1144 } 1145 // test the regex 1146 if ( 1147 strict && 1148 format === 'MMMM' && 1149 this._longMonthsParse[i].test(monthName) 1150 ) { 1151 return i; 1152 } else if ( 1153 strict && 1154 format === 'MMM' && 1155 this._shortMonthsParse[i].test(monthName) 1156 ) { 1157 return i; 1158 } else if (!strict && this._monthsParse[i].test(monthName)) { 1159 return i; 1160 } 1161 } 1162 } 1163 1164 // MOMENTS 1165 1166 function setMonth(mom, value) { 1167 var dayOfMonth; 1168 1169 if (!mom.isValid()) { 1170 // No op 1171 return mom; 1172 } 1173 1174 if (typeof value === 'string') { 1175 if (/^\d+$/.test(value)) { 1176 value = toInt(value); 1177 } else { 1178 value = mom.localeData().monthsParse(value); 1179 // TODO: Another silent failure? 1180 if (!isNumber(value)) { 1181 return mom; 1182 } 1183 } 1184 } 1185 1186 dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); 1187 mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); 1188 return mom; 1189 } 1190 1191 function getSetMonth(value) { 1192 if (value != null) { 1193 setMonth(this, value); 1194 hooks.updateOffset(this, true); 1195 return this; 1196 } else { 1197 return get(this, 'Month'); 1198 } 1199 } 1200 1201 function getDaysInMonth() { 1202 return daysInMonth(this.year(), this.month()); 1203 } 1204 1205 function monthsShortRegex(isStrict) { 1206 if (this._monthsParseExact) { 1207 if (!hasOwnProp(this, '_monthsRegex')) { 1208 computeMonthsParse.call(this); 1209 } 1210 if (isStrict) { 1211 return this._monthsShortStrictRegex; 1212 } else { 1213 return this._monthsShortRegex; 1214 } 1215 } else { 1216 if (!hasOwnProp(this, '_monthsShortRegex')) { 1217 this._monthsShortRegex = defaultMonthsShortRegex; 1218 } 1219 return this._monthsShortStrictRegex && isStrict 1220 ? this._monthsShortStrictRegex 1221 : this._monthsShortRegex; 1222 } 1223 } 1224 1225 function monthsRegex(isStrict) { 1226 if (this._monthsParseExact) { 1227 if (!hasOwnProp(this, '_monthsRegex')) { 1228 computeMonthsParse.call(this); 1229 } 1230 if (isStrict) { 1231 return this._monthsStrictRegex; 1232 } else { 1233 return this._monthsRegex; 1234 } 1235 } else { 1236 if (!hasOwnProp(this, '_monthsRegex')) { 1237 this._monthsRegex = defaultMonthsRegex; 1238 } 1239 return this._monthsStrictRegex && isStrict 1240 ? this._monthsStrictRegex 1241 : this._monthsRegex; 1242 } 1243 } 1244 1245 function computeMonthsParse() { 1246 function cmpLenRev(a, b) { 1247 return b.length - a.length; 1248 } 1249 1250 var shortPieces = [], 1251 longPieces = [], 1252 mixedPieces = [], 1253 i, 1254 mom; 1255 for (i = 0; i < 12; i++) { 1256 // make the regex if we don't have it already 1257 mom = createUTC([2000, i]); 1258 shortPieces.push(this.monthsShort(mom, '')); 1259 longPieces.push(this.months(mom, '')); 1260 mixedPieces.push(this.months(mom, '')); 1261 mixedPieces.push(this.monthsShort(mom, '')); 1262 } 1263 // Sorting makes sure if one month (or abbr) is a prefix of another it 1264 // will match the longer piece. 1265 shortPieces.sort(cmpLenRev); 1266 longPieces.sort(cmpLenRev); 1267 mixedPieces.sort(cmpLenRev); 1268 for (i = 0; i < 12; i++) { 1269 shortPieces[i] = regexEscape(shortPieces[i]); 1270 longPieces[i] = regexEscape(longPieces[i]); 1271 } 1272 for (i = 0; i < 24; i++) { 1273 mixedPieces[i] = regexEscape(mixedPieces[i]); 1274 } 1275 1276 this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); 1277 this._monthsShortRegex = this._monthsRegex; 1278 this._monthsStrictRegex = new RegExp( 1279 '^(' + longPieces.join('|') + ')', 1280 'i' 1281 ); 1282 this._monthsShortStrictRegex = new RegExp( 1283 '^(' + shortPieces.join('|') + ')', 1284 'i' 1285 ); 1286 } 1287 1288 // FORMATTING 1289 1290 addFormatToken('Y', 0, 0, function () { 1291 var y = this.year(); 1292 return y <= 9999 ? zeroFill(y, 4) : '+' + y; 1293 }); 1294 1295 addFormatToken(0, ['YY', 2], 0, function () { 1296 return this.year() % 100; 1297 }); 1298 1299 addFormatToken(0, ['YYYY', 4], 0, 'year'); 1300 addFormatToken(0, ['YYYYY', 5], 0, 'year'); 1301 addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); 1302 1303 // ALIASES 1304 1305 addUnitAlias('year', 'y'); 1306 1307 // PRIORITIES 1308 1309 addUnitPriority('year', 1); 1310 1311 // PARSING 1312 1313 addRegexToken('Y', matchSigned); 1314 addRegexToken('YY', match1to2, match2); 1315 addRegexToken('YYYY', match1to4, match4); 1316 addRegexToken('YYYYY', match1to6, match6); 1317 addRegexToken('YYYYYY', match1to6, match6); 1318 1319 addParseToken(['YYYYY', 'YYYYYY'], YEAR); 1320 addParseToken('YYYY', function (input, array) { 1321 array[YEAR] = 1322 input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); 1323 }); 1324 addParseToken('YY', function (input, array) { 1325 array[YEAR] = hooks.parseTwoDigitYear(input); 1326 }); 1327 addParseToken('Y', function (input, array) { 1328 array[YEAR] = parseInt(input, 10); 1329 }); 1330 1331 // HELPERS 1332 1333 function daysInYear(year) { 1334 return isLeapYear(year) ? 366 : 365; 1335 } 1336 1337 // HOOKS 1338 1339 hooks.parseTwoDigitYear = function (input) { 1340 return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); 1341 }; 1342 1343 // MOMENTS 1344 1345 var getSetYear = makeGetSet('FullYear', true); 1346 1347 function getIsLeapYear() { 1348 return isLeapYear(this.year()); 1349 } 1350 1351 function createDate(y, m, d, h, M, s, ms) { 1352 // can't just apply() to create a date: 1353 // https://stackoverflow.com/q/181348 1354 var date; 1355 // the date constructor remaps years 0-99 to 1900-1999 1356 if (y < 100 && y >= 0) { 1357 // preserve leap years using a full 400 year cycle, then reset 1358 date = new Date(y + 400, m, d, h, M, s, ms); 1359 if (isFinite(date.getFullYear())) { 1360 date.setFullYear(y); 1361 } 1362 } else { 1363 date = new Date(y, m, d, h, M, s, ms); 1364 } 1365 1366 return date; 1367 } 1368 1369 function createUTCDate(y) { 1370 var date, args; 1371 // the Date.UTC function remaps years 0-99 to 1900-1999 1372 if (y < 100 && y >= 0) { 1373 args = Array.prototype.slice.call(arguments); 1374 // preserve leap years using a full 400 year cycle, then reset 1375 args[0] = y + 400; 1376 date = new Date(Date.UTC.apply(null, args)); 1377 if (isFinite(date.getUTCFullYear())) { 1378 date.setUTCFullYear(y); 1379 } 1380 } else { 1381 date = new Date(Date.UTC.apply(null, arguments)); 1382 } 1383 1384 return date; 1385 } 1386 1387 // start-of-first-week - start-of-year 1388 function firstWeekOffset(year, dow, doy) { 1389 var // first-week day -- which january is always in the first week (4 for iso, 1 for other) 1390 fwd = 7 + dow - doy, 1391 // first-week day local weekday -- which local weekday is fwd 1392 fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; 1393 1394 return -fwdlw + fwd - 1; 1395 } 1396 1397 // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday 1398 function dayOfYearFromWeeks(year, week, weekday, dow, doy) { 1399 var localWeekday = (7 + weekday - dow) % 7, 1400 weekOffset = firstWeekOffset(year, dow, doy), 1401 dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, 1402 resYear, 1403 resDayOfYear; 1404 1405 if (dayOfYear <= 0) { 1406 resYear = year - 1; 1407 resDayOfYear = daysInYear(resYear) + dayOfYear; 1408 } else if (dayOfYear > daysInYear(year)) { 1409 resYear = year + 1; 1410 resDayOfYear = dayOfYear - daysInYear(year); 1411 } else { 1412 resYear = year; 1413 resDayOfYear = dayOfYear; 1414 } 1415 1416 return { 1417 year: resYear, 1418 dayOfYear: resDayOfYear, 1419 }; 1420 } 1421 1422 function weekOfYear(mom, dow, doy) { 1423 var weekOffset = firstWeekOffset(mom.year(), dow, doy), 1424 week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, 1425 resWeek, 1426 resYear; 1427 1428 if (week < 1) { 1429 resYear = mom.year() - 1; 1430 resWeek = week + weeksInYear(resYear, dow, doy); 1431 } else if (week > weeksInYear(mom.year(), dow, doy)) { 1432 resWeek = week - weeksInYear(mom.year(), dow, doy); 1433 resYear = mom.year() + 1; 1434 } else { 1435 resYear = mom.year(); 1436 resWeek = week; 1437 } 1438 1439 return { 1440 week: resWeek, 1441 year: resYear, 1442 }; 1443 } 1444 1445 function weeksInYear(year, dow, doy) { 1446 var weekOffset = firstWeekOffset(year, dow, doy), 1447 weekOffsetNext = firstWeekOffset(year + 1, dow, doy); 1448 return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; 1449 } 1450 1451 // FORMATTING 1452 1453 addFormatToken('w', ['ww', 2], 'wo', 'week'); 1454 addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); 1455 1456 // ALIASES 1457 1458 addUnitAlias('week', 'w'); 1459 addUnitAlias('isoWeek', 'W'); 1460 1461 // PRIORITIES 1462 1463 addUnitPriority('week', 5); 1464 addUnitPriority('isoWeek', 5); 1465 1466 // PARSING 1467 1468 addRegexToken('w', match1to2); 1469 addRegexToken('ww', match1to2, match2); 1470 addRegexToken('W', match1to2); 1471 addRegexToken('WW', match1to2, match2); 1472 1473 addWeekParseToken(
vendor: 3,487 bytes, lines 1473-1604
1473 1474 ['w', 'ww', 'W', 'WW'], 1475 function (input, week, config, token) { 1476 week[token.substr(0, 1)] = toInt(input); 1477 } 1478 ); 1479 1480 // HELPERS 1481 1482 // LOCALES 1483 1484 function localeWeek(mom) { 1485 return weekOfYear(mom, this._week.dow, this._week.doy).week; 1486 } 1487 1488 var defaultLocaleWeek = { 1489 dow: 0, // Sunday is the first day of the week. 1490 doy: 6, // The week that contains Jan 6th is the first week of the year. 1491 }; 1492 1493 function localeFirstDayOfWeek() { 1494 return this._week.dow; 1495 } 1496 1497 function localeFirstDayOfYear() { 1498 return this._week.doy; 1499 } 1500 1501 // MOMENTS 1502 1503 function getSetWeek(input) { 1504 var week = this.localeData().week(this); 1505 return input == null ? week : this.add((input - week) * 7, 'd'); 1506 } 1507 1508 function getSetISOWeek(input) { 1509 var week = weekOfYear(this, 1, 4).week; 1510 return input == null ? week : this.add((input - week) * 7, 'd'); 1511 } 1512 1513 // FORMATTING 1514 1515 addFormatToken('d', 0, 'do', 'day'); 1516 1517 addFormatToken('dd', 0, 0, function (format) { 1518 return this.localeData().weekdaysMin(this, format); 1519 }); 1520 1521 addFormatToken('ddd', 0, 0, function (format) { 1522 return this.localeData().weekdaysShort(this, format); 1523 }); 1524 1525 addFormatToken('dddd', 0, 0, function (format) { 1526 return this.localeData().weekdays(this, format); 1527 }); 1528 1529 addFormatToken('e', 0, 0, 'weekday'); 1530 addFormatToken('E', 0, 0, 'isoWeekday'); 1531 1532 // ALIASES 1533 1534 addUnitAlias('day', 'd'); 1535 addUnitAlias('weekday', 'e'); 1536 addUnitAlias('isoWeekday', 'E'); 1537 1538 // PRIORITY 1539 addUnitPriority('day', 11); 1540 addUnitPriority('weekday', 11); 1541 addUnitPriority('isoWeekday', 11); 1542 1543 // PARSING 1544 1545 addRegexToken('d', match1to2); 1546 addRegexToken('e', match1to2); 1547 addRegexToken('E', match1to2); 1548 addRegexToken('dd', function (isStrict, locale) { 1549 return locale.weekdaysMinRegex(isStrict); 1550 }); 1551 addRegexToken('ddd', function (isStrict, locale) { 1552 return locale.weekdaysShortRegex(isStrict); 1553 }); 1554 addRegexToken('dddd', function (isStrict, locale) { 1555 return locale.weekdaysRegex(isStrict); 1556 }); 1557 1558 addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { 1559 var weekday = config._locale.weekdaysParse(input, token, config._strict); 1560 // if we didn't get a weekday name, mark the date as invalid 1561 if (weekday != null) { 1562 week.d = weekday; 1563 } else { 1564 getParsingFlags(config).invalidWeekday = input; 1565 } 1566 }); 1567 1568 addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { 1569 week[token] = toInt(input); 1570 }); 1571 1572 // HELPERS 1573 1574 function parseWeekday(input, locale) { 1575 if (typeof input !== 'string') { 1576 return input; 1577 } 1578 1579 if (!isNaN(input)) { 1580 return parseInt(input, 10); 1581 } 1582 1583 input = locale.weekdaysParse(input); 1584 if (typeof input === 'number') { 1585 return input; 1586 } 1587 1588 return null; 1589 } 1590 1591 function parseIsoWeekday(input, locale) { 1592 if (typeof input === 'string') { 1593 return locale.weekdaysParse(input) % 7 || 7; 1594 } 1595 return isNaN(input) ? null : input; 1596 } 1597 1598 // LOCALES 1599 function shiftWeekdays(ws, n) { 1600 return ws.slice(n, 7).concat(ws.slice(0, n)); 1601 } 1602 1603 var defaultLocaleWeekdays = 1604 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'
vendor: 17,864 bytes, lines 1604-2152
1604), 1605 defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 1606 defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 1607 defaultWeekdaysRegex = matchWord, 1608 defaultWeekdaysShortRegex = matchWord, 1609 defaultWeekdaysMinRegex = matchWord; 1610 1611 function localeWeekdays(m, format) { 1612 var weekdays = isArray(this._weekdays) 1613 ? this._weekdays 1614 : this._weekdays[ 1615 m && m !== true && this._weekdays.isFormat.test(format) 1616 ? 'format' 1617 : 'standalone' 1618 ]; 1619 return m === true 1620 ? shiftWeekdays(weekdays, this._week.dow) 1621 : m 1622 ? weekdays[m.day()] 1623 : weekdays; 1624 } 1625 1626 function localeWeekdaysShort(m) { 1627 return m === true 1628 ? shiftWeekdays(this._weekdaysShort, this._week.dow) 1629 : m 1630 ? this._weekdaysShort[m.day()] 1631 : this._weekdaysShort; 1632 } 1633 1634 function localeWeekdaysMin(m) { 1635 return m === true 1636 ? shiftWeekdays(this._weekdaysMin, this._week.dow) 1637 : m 1638 ? this._weekdaysMin[m.day()] 1639 : this._weekdaysMin; 1640 } 1641 1642 function handleStrictParse$1(weekdayName, format, strict) { 1643 var i, 1644 ii, 1645 mom, 1646 llc = weekdayName.toLocaleLowerCase(); 1647 if (!this._weekdaysParse) { 1648 this._weekdaysParse = []; 1649 this._shortWeekdaysParse = []; 1650 this._minWeekdaysParse = []; 1651 1652 for (i = 0; i < 7; ++i) { 1653 mom = createUTC([2000, 1]).day(i); 1654 this._minWeekdaysParse[i] = this.weekdaysMin( 1655 mom, 1656 '' 1657 ).toLocaleLowerCase(); 1658 this._shortWeekdaysParse[i] = this.weekdaysShort( 1659 mom, 1660 '' 1661 ).toLocaleLowerCase(); 1662 this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); 1663 } 1664 } 1665 1666 if (strict) { 1667 if (format === 'dddd') { 1668 ii = indexOf.call(this._weekdaysParse, llc); 1669 return ii !== -1 ? ii : null; 1670 } else if (format === 'ddd') { 1671 ii = indexOf.call(this._shortWeekdaysParse, llc); 1672 return ii !== -1 ? ii : null; 1673 } else { 1674 ii = indexOf.call(this._minWeekdaysParse, llc); 1675 return ii !== -1 ? ii : null; 1676 } 1677 } else { 1678 if (format === 'dddd') { 1679 ii = indexOf.call(this._weekdaysParse, llc); 1680 if (ii !== -1) { 1681 return ii; 1682 } 1683 ii = indexOf.call(this._shortWeekdaysParse, llc); 1684 if (ii !== -1) { 1685 return ii; 1686 } 1687 ii = indexOf.call(this._minWeekdaysParse, llc); 1688 return ii !== -1 ? ii : null; 1689 } else if (format === 'ddd') { 1690 ii = indexOf.call(this._shortWeekdaysParse, llc); 1691 if (ii !== -1) { 1692 return ii; 1693 } 1694 ii = indexOf.call(this._weekdaysParse, llc); 1695 if (ii !== -1) { 1696 return ii; 1697 } 1698 ii = indexOf.call(this._minWeekdaysParse, llc); 1699 return ii !== -1 ? ii : null; 1700 } else { 1701 ii = indexOf.call(this._minWeekdaysParse, llc); 1702 if (ii !== -1) { 1703 return ii; 1704 } 1705 ii = indexOf.call(this._weekdaysParse, llc); 1706 if (ii !== -1) { 1707 return ii; 1708 } 1709 ii = indexOf.call(this._shortWeekdaysParse, llc); 1710 return ii !== -1 ? ii : null; 1711 } 1712 } 1713 } 1714 1715 function localeWeekdaysParse(weekdayName, format, strict) { 1716 var i, mom, regex; 1717 1718 if (this._weekdaysParseExact) { 1719 return handleStrictParse$1.call(this, weekdayName, format, strict); 1720 } 1721 1722 if (!this._weekdaysParse) { 1723 this._weekdaysParse = []; 1724 this._minWeekdaysParse = []; 1725 this._shortWeekdaysParse = []; 1726 this._fullWeekdaysParse = []; 1727 } 1728 1729 for (i = 0; i < 7; i++) { 1730 // make the regex if we don't have it already 1731 1732 mom = createUTC([2000, 1]).day(i); 1733 if (strict && !this._fullWeekdaysParse[i]) { 1734 this._fullWeekdaysParse[i] = new RegExp( 1735 '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 1736 'i' 1737 ); 1738 this._shortWeekdaysParse[i] = new RegExp( 1739 '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 1740 'i' 1741 ); 1742 this._minWeekdaysParse[i] = new RegExp( 1743 '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 1744 'i' 1745 ); 1746 } 1747 if (!this._weekdaysParse[i]) { 1748 regex = 1749 '^' + 1750 this.weekdays(mom, '') + 1751 '|^' + 1752 this.weekdaysShort(mom, '') + 1753 '|^' + 1754 this.weekdaysMin(mom, ''); 1755 this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); 1756 } 1757 // test the regex 1758 if ( 1759 strict && 1760 format === 'dddd' && 1761 this._fullWeekdaysParse[i].test(weekdayName) 1762 ) { 1763 return i; 1764 } else if ( 1765 strict && 1766 format === 'ddd' && 1767 this._shortWeekdaysParse[i].test(weekdayName) 1768 ) { 1769 return i; 1770 } else if ( 1771 strict && 1772 format === 'dd' && 1773 this._minWeekdaysParse[i].test(weekdayName) 1774 ) { 1775 return i; 1776 } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { 1777 return i; 1778 } 1779 } 1780 } 1781 1782 // MOMENTS 1783 1784 function getSetDayOfWeek(input) { 1785 if (!this.isValid()) { 1786 return input != null ? this : NaN; 1787 } 1788 var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); 1789 if (input != null) { 1790 input = parseWeekday(input, this.localeData()); 1791 return this.add(input - day, 'd'); 1792 } else { 1793 return day; 1794 } 1795 } 1796 1797 function getSetLocaleDayOfWeek(input) { 1798 if (!this.isValid()) { 1799 return input != null ? this : NaN; 1800 } 1801 var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; 1802 return input == null ? weekday : this.add(input - weekday, 'd'); 1803 } 1804 1805 function getSetISODayOfWeek(input) { 1806 if (!this.isValid()) { 1807 return input != null ? this : NaN; 1808 } 1809 1810 // behaves the same as moment#day except 1811 // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) 1812 // as a setter, sunday should belong to the previous week. 1813 1814 if (input != null) { 1815 var weekday = parseIsoWeekday(input, this.localeData()); 1816 return this.day(this.day() % 7 ? weekday : weekday - 7); 1817 } else { 1818 return this.day() || 7; 1819 } 1820 } 1821 1822 function weekdaysRegex(isStrict) { 1823 if (this._weekdaysParseExact) { 1824 if (!hasOwnProp(this, '_weekdaysRegex')) { 1825 computeWeekdaysParse.call(this); 1826 } 1827 if (isStrict) { 1828 return this._weekdaysStrictRegex; 1829 } else { 1830 return this._weekdaysRegex; 1831 } 1832 } else { 1833 if (!hasOwnProp(this, '_weekdaysRegex')) { 1834 this._weekdaysRegex = defaultWeekdaysRegex; 1835 } 1836 return this._weekdaysStrictRegex && isStrict 1837 ? this._weekdaysStrictRegex 1838 : this._weekdaysRegex; 1839 } 1840 } 1841 1842 function weekdaysShortRegex(isStrict) { 1843 if (this._weekdaysParseExact) { 1844 if (!hasOwnProp(this, '_weekdaysRegex')) { 1845 computeWeekdaysParse.call(this); 1846 } 1847 if (isStrict) { 1848 return this._weekdaysShortStrictRegex; 1849 } else { 1850 return this._weekdaysShortRegex; 1851 } 1852 } else { 1853 if (!hasOwnProp(this, '_weekdaysShortRegex')) { 1854 this._weekdaysShortRegex = defaultWeekdaysShortRegex; 1855 } 1856 return this._weekdaysShortStrictRegex && isStrict 1857 ? this._weekdaysShortStrictRegex 1858 : this._weekdaysShortRegex; 1859 } 1860 } 1861 1862 function weekdaysMinRegex(isStrict) { 1863 if (this._weekdaysParseExact) { 1864 if (!hasOwnProp(this, '_weekdaysRegex')) { 1865 computeWeekdaysParse.call(this); 1866 } 1867 if (isStrict) { 1868 return this._weekdaysMinStrictRegex; 1869 } else { 1870 return this._weekdaysMinRegex; 1871 } 1872 } else { 1873 if (!hasOwnProp(this, '_weekdaysMinRegex')) { 1874 this._weekdaysMinRegex = defaultWeekdaysMinRegex; 1875 } 1876 return this._weekdaysMinStrictRegex && isStrict 1877 ? this._weekdaysMinStrictRegex 1878 : this._weekdaysMinRegex; 1879 } 1880 } 1881 1882 function computeWeekdaysParse() { 1883 function cmpLenRev(a, b) { 1884 return b.length - a.length; 1885 } 1886 1887 var minPieces = [], 1888 shortPieces = [], 1889 longPieces = [], 1890 mixedPieces = [], 1891 i, 1892 mom, 1893 minp, 1894 shortp, 1895 longp; 1896 for (i = 0; i < 7; i++) { 1897 // make the regex if we don't have it already 1898 mom = createUTC([2000, 1]).day(i); 1899 minp = regexEscape(this.weekdaysMin(mom, '')); 1900 shortp = regexEscape(this.weekdaysShort(mom, '')); 1901 longp = regexEscape(this.weekdays(mom, '')); 1902 minPieces.push(minp); 1903 shortPieces.push(shortp); 1904 longPieces.push(longp); 1905 mixedPieces.push(minp); 1906 mixedPieces.push(shortp); 1907 mixedPieces.push(longp); 1908 } 1909 // Sorting makes sure if one weekday (or abbr) is a prefix of another it 1910 // will match the longer piece. 1911 minPieces.sort(cmpLenRev); 1912 shortPieces.sort(cmpLenRev); 1913 longPieces.sort(cmpLenRev); 1914 mixedPieces.sort(cmpLenRev); 1915 1916 this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); 1917 this._weekdaysShortRegex = this._weekdaysRegex; 1918 this._weekdaysMinRegex = this._weekdaysRegex; 1919 1920 this._weekdaysStrictRegex = new RegExp( 1921 '^(' + longPieces.join('|') + ')', 1922 'i' 1923 ); 1924 this._weekdaysShortStrictRegex = new RegExp( 1925 '^(' + shortPieces.join('|') + ')', 1926 'i' 1927 ); 1928 this._weekdaysMinStrictRegex = new RegExp( 1929 '^(' + minPieces.join('|') + ')', 1930 'i' 1931 ); 1932 } 1933 1934 // FORMATTING 1935 1936 function hFormat() { 1937 return this.hours() % 12 || 12; 1938 } 1939 1940 function kFormat() { 1941 return this.hours() || 24; 1942 } 1943 1944 addFormatToken('H', ['HH', 2], 0, 'hour'); 1945 addFormatToken('h', ['hh', 2], 0, hFormat); 1946 addFormatToken('k', ['kk', 2], 0, kFormat); 1947 1948 addFormatToken('hmm', 0, 0, function () { 1949 return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); 1950 }); 1951 1952 addFormatToken('hmmss', 0, 0, function () { 1953 return ( 1954 '' + 1955 hFormat.apply(this) + 1956 zeroFill(this.minutes(), 2) + 1957 zeroFill(this.seconds(), 2) 1958 ); 1959 }); 1960 1961 addFormatToken('Hmm', 0, 0, function () { 1962 return '' + this.hours() + zeroFill(this.minutes(), 2); 1963 }); 1964 1965 addFormatToken('Hmmss', 0, 0, function () { 1966 return ( 1967 '' + 1968 this.hours() + 1969 zeroFill(this.minutes(), 2) + 1970 zeroFill(this.seconds(), 2) 1971 ); 1972 }); 1973 1974 function meridiem(token, lowercase) { 1975 addFormatToken(token, 0, 0, function () { 1976 return this.localeData().meridiem( 1977 this.hours(), 1978 this.minutes(), 1979 lowercase 1980 ); 1981 }); 1982 } 1983 1984 meridiem('a', true); 1985 meridiem('A', false); 1986 1987 // ALIASES 1988 1989 addUnitAlias('hour', 'h'); 1990 1991 // PRIORITY 1992 addUnitPriority('hour', 13); 1993 1994 // PARSING 1995 1996 function matchMeridiem(isStrict, locale) { 1997 return locale._meridiemParse; 1998 } 1999 2000 addRegexToken('a', matchMeridiem); 2001 addRegexToken('A', matchMeridiem); 2002 addRegexToken('H', match1to2); 2003 addRegexToken('h', match1to2); 2004 addRegexToken('k', match1to2); 2005 addRegexToken('HH', match1to2, match2); 2006 addRegexToken('hh', match1to2, match2); 2007 addRegexToken('kk', match1to2, match2); 2008 2009 addRegexToken('hmm', match3to4); 2010 addRegexToken('hmmss', match5to6); 2011 addRegexToken('Hmm', match3to4); 2012 addRegexToken('Hmmss', match5to6); 2013 2014 addParseToken(['H', 'HH'], HOUR); 2015 addParseToken(['k', 'kk'], function (input, array, config) { 2016 var kInput = toInt(input); 2017 array[HOUR] = kInput === 24 ? 0 : kInput; 2018 }); 2019 addParseToken(['a', 'A'], function (input, array, config) { 2020 config._isPm = config._locale.isPM(input); 2021 config._meridiem = input; 2022 }); 2023 addParseToken(['h', 'hh'], function (input, array, config) { 2024 array[HOUR] = toInt(input); 2025 getParsingFlags(config).bigHour = true; 2026 }); 2027 addParseToken('hmm', function (input, array, config) { 2028 var pos = input.length - 2; 2029 array[HOUR] = toInt(input.substr(0, pos)); 2030 array[MINUTE] = toInt(input.substr(pos)); 2031 getParsingFlags(config).bigHour = true; 2032 }); 2033 addParseToken('hmmss', function (input, array, config) { 2034 var pos1 = input.length - 4, 2035 pos2 = input.length - 2; 2036 array[HOUR] = toInt(input.substr(0, pos1)); 2037 array[MINUTE] = toInt(input.substr(pos1, 2)); 2038 array[SECOND] = toInt(input.substr(pos2)); 2039 getParsingFlags(config).bigHour = true; 2040 }); 2041 addParseToken('Hmm', function (input, array, config) { 2042 var pos = input.length - 2; 2043 array[HOUR] = toInt(input.substr(0, pos)); 2044 array[MINUTE] = toInt(input.substr(pos)); 2045 }); 2046 addParseToken('Hmmss', function (input, array, config) { 2047 var pos1 = input.length - 4, 2048 pos2 = input.length - 2; 2049 array[HOUR] = toInt(input.substr(0, pos1)); 2050 array[MINUTE] = toInt(input.substr(pos1, 2)); 2051 array[SECOND] = toInt(input.substr(pos2)); 2052 }); 2053 2054 // LOCALES 2055 2056 function localeIsPM(input) { 2057 // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays 2058 // Using charAt should be more compatible. 2059 return (input + '').toLowerCase().charAt(0) === 'p'; 2060 } 2061 2062 var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, 2063 // Setting the hour should keep the time, because the user explicitly 2064 // specified which hour they want. So trying to maintain the same hour (in 2065 // a new timezone) makes sense. Adding/subtracting hours does not follow 2066 // this rule. 2067 getSetHour = makeGetSet('Hours', true); 2068 2069 function localeMeridiem(hours, minutes, isLower) { 2070 if (hours > 11) { 2071 return isLower ? 'pm' : 'PM'; 2072 } else { 2073 return isLower ? 'am' : 'AM'; 2074 } 2075 } 2076 2077 var baseConfig = { 2078 calendar: defaultCalendar, 2079 longDateFormat: defaultLongDateFormat, 2080 invalidDate: defaultInvalidDate, 2081 ordinal: defaultOrdinal, 2082 dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, 2083 relativeTime: defaultRelativeTime, 2084 2085 months: defaultLocaleMonths, 2086 monthsShort: defaultLocaleMonthsShort, 2087 2088 week: defaultLocaleWeek, 2089 2090 weekdays: defaultLocaleWeekdays, 2091 weekdaysMin: defaultLocaleWeekdaysMin, 2092 weekdaysShort: defaultLocaleWeekdaysShort, 2093 2094 meridiemParse: defaultLocaleMeridiemParse, 2095 }; 2096 2097 // internal storage for locale config files 2098 var locales = {}, 2099 localeFamilies = {}, 2100 globalLocale; 2101 2102 function commonPrefix(arr1, arr2) { 2103 var i, 2104 minl = Math.min(arr1.length, arr2.length); 2105 for (i = 0; i < minl; i += 1) { 2106 if (arr1[i] !== arr2[i]) { 2107 return i; 2108 } 2109 } 2110 return minl; 2111 } 2112 2113 function normalizeLocale(key) { 2114 return key ? key.toLowerCase().replace('_', '-') : key; 2115 } 2116 2117 // pick the locale from the array 2118 // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each 2119 // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root 2120 function chooseLocale(names) { 2121 var i = 0, 2122 j, 2123 next, 2124 locale, 2125 split; 2126 2127 while (i < names.length) { 2128 split = normalizeLocale(names[i]).split('-'); 2129 j = split.length; 2130 next = normalizeLocale(names[i + 1]); 2131 next = next ? next.split('-') : null; 2132 while (j > 0) { 2133 locale = loadLocale(split.slice(0, j).join('-')); 2134 if (locale) { 2135 return locale; 2136 } 2137 if ( 2138 next && 2139 next.length >= j && 2140 commonPrefix(split, next) >= j - 1 2141 ) { 2142 //the next array item is better than a shallower substring of this one 2143 break; 2144 } 2145 j--; 2146 } 2147 i++; 2148 } 2149 return globalLocale; 2150 } 2151 2152 function
2152isLocaleNameSane(name) { 2153 // Prevent names that look like filesystem paths, i.e contain '/' or '\' 2154 return name.match('^[^/\\\\]*$') != null; 2155 } 2156 2157 function loadLocale(name) { 2158 var oldLocale = null, 2159 aliasedRequire; 2160 // TODO: Find a better way to register and load all the locales in Node 2161 if ( 2162 locales[name] === undefined && 2163 typeof module !== 'undefined' && 2164 module && 2165 module.exports && 2166 isLocaleNameSane(name) 2167 ) { 2168 try { 2169 oldLocale = globalLocale._abbr; 2170 aliasedRequire = require;
vendor: 6,811 bytes, lines 2171-2359
2171 __webpack_require__(154)("./" + name); 2172 getSetGlobalLocale(oldLocale); 2173 } catch (e) { 2174 // mark as not found to avoid repeating expensive file require call causing high CPU 2175 // when trying to find en-US, en_US, en-us for every format call 2176 locales[name] = null; // null means not found 2177 } 2178 } 2179 return locales[name]; 2180 } 2181 2182 // This function will load locale and then set the global locale. If 2183 // no arguments are passed in, it will simply return the current global 2184 // locale key. 2185 function getSetGlobalLocale(key, values) { 2186 var data; 2187 if (key) { 2188 if (isUndefined(values)) { 2189 data = getLocale(key); 2190 } else { 2191 data = defineLocale(key, values); 2192 } 2193 2194 if (data) { 2195 // moment.duration._locale = moment._locale = data; 2196 globalLocale = data; 2197 } else { 2198 if (typeof console !== 'undefined' && console.warn) { 2199 //warn user if arguments are passed but the locale could not be set 2200 console.warn( 2201 'Locale ' + key + ' not found. Did you forget to load it?' 2202 ); 2203 } 2204 } 2205 } 2206 2207 return globalLocale._abbr; 2208 } 2209 2210 function defineLocale(name, config) { 2211 if (config !== null) { 2212 var locale, 2213 parentConfig = baseConfig; 2214 config.abbr = name; 2215 if (locales[name] != null) { 2216 deprecateSimple( 2217 'defineLocaleOverride', 2218 'use moment.updateLocale(localeName, config) to change ' + 2219 'an existing locale. moment.defineLocale(localeName, ' + 2220 'config) should only be used for creating a new locale ' + 2221 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.' 2222 ); 2223 parentConfig = locales[name]._config; 2224 } else if (config.parentLocale != null) { 2225 if (locales[config.parentLocale] != null) { 2226 parentConfig = locales[config.parentLocale]._config; 2227 } else { 2228 locale = loadLocale(config.parentLocale); 2229 if (locale != null) { 2230 parentConfig = locale._config; 2231 } else { 2232 if (!localeFamilies[config.parentLocale]) { 2233 localeFamilies[config.parentLocale] = []; 2234 } 2235 localeFamilies[config.parentLocale].push({ 2236 name: name, 2237 config: config, 2238 }); 2239 return null; 2240 } 2241 } 2242 } 2243 locales[name] = new Locale(mergeConfigs(parentConfig, config)); 2244 2245 if (localeFamilies[name]) { 2246 localeFamilies[name].forEach(function (x) { 2247 defineLocale(x.name, x.config); 2248 }); 2249 } 2250 2251 // backwards compat for now: also set the locale 2252 // make sure we set the locale AFTER all child locales have been 2253 // created, so we won't end up with the child locale set. 2254 getSetGlobalLocale(name); 2255 2256 return locales[name]; 2257 } else { 2258 // useful for testing 2259 delete locales[name]; 2260 return null; 2261 } 2262 } 2263 2264 function updateLocale(name, config) { 2265 if (config != null) { 2266 var locale, 2267 tmpLocale, 2268 parentConfig = baseConfig; 2269 2270 if (locales[name] != null && locales[name].parentLocale != null) { 2271 // Update existing child locale in-place to avoid memory-leaks 2272 locales[name].set(mergeConfigs(locales[name]._config, config)); 2273 } else { 2274 // MERGE 2275 tmpLocale = loadLocale(name); 2276 if (tmpLocale != null) { 2277 parentConfig = tmpLocale._config; 2278 } 2279 config = mergeConfigs(parentConfig, config); 2280 if (tmpLocale == null) { 2281 // updateLocale is called for creating a new locale 2282 // Set abbr so it will have a name (getters return 2283 // undefined otherwise). 2284 config.abbr = name; 2285 } 2286 locale = new Locale(config); 2287 locale.parentLocale = locales[name]; 2288 locales[name] = locale; 2289 } 2290 2291 // backwards compat for now: also set the locale 2292 getSetGlobalLocale(name); 2293 } else { 2294 // pass null for config to unupdate, useful for tests 2295 if (locales[name] != null) { 2296 if (locales[name].parentLocale != null) { 2297 locales[name] = locales[name].parentLocale; 2298 if (name === getSetGlobalLocale()) { 2299 getSetGlobalLocale(name); 2300 } 2301 } else if (locales[name] != null) { 2302 delete locales[name]; 2303 } 2304 } 2305 } 2306 return locales[name]; 2307 } 2308 2309 // returns locale data 2310 function getLocale(key) { 2311 var locale; 2312 2313 if (key && key._locale && key._locale._abbr) { 2314 key = key._locale._abbr; 2315 } 2316 2317 if (!key) { 2318 return globalLocale; 2319 } 2320 2321 if (!isArray(key)) { 2322 //short-circuit everything else 2323 locale = loadLocale(key); 2324 if (locale) { 2325 return locale; 2326 } 2327 key = [key]; 2328 } 2329 2330 return chooseLocale(key); 2331 } 2332 2333 function listLocales() { 2334 return keys(locales); 2335 } 2336 2337 function checkOverflow(m) { 2338 var overflow, 2339 a = m._a; 2340 2341 if (a && getParsingFlags(m).overflow === -2) { 2342 overflow = 2343 a[MONTH] < 0 || a[MONTH] > 11 2344 ? MONTH 2345 : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) 2346 ? DATE 2347 : a[HOUR] < 0 || 2348 a[HOUR] > 24 || 2349 (a[HOUR] === 24 && 2350 (a[MINUTE] !== 0 || 2351 a[SECOND] !== 0 || 2352 a[MILLISECOND] !== 0)) 2353 ? HOUR 2354 : a[MINUTE] < 0 || a[MINUTE] > 59 2355 ? MINUTE 2356 : a[SECOND] < 0 || a[SECOND] > 59 2357 ? SECOND 2358 : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 2359 ? MILLISECOND
vendor: 9,346 bytes, lines 2360-2643
2360 : -1; 2361 2362 if ( 2363 getParsingFlags(m)._overflowDayOfYear && 2364 (overflow < YEAR || overflow > DATE) 2365 ) { 2366 overflow = DATE; 2367 } 2368 if (getParsingFlags(m)._overflowWeeks && overflow === -1) { 2369 overflow = WEEK; 2370 } 2371 if (getParsingFlags(m)._overflowWeekday && overflow === -1) { 2372 overflow = WEEKDAY; 2373 } 2374 2375 getParsingFlags(m).overflow = overflow; 2376 } 2377 2378 return m; 2379 } 2380 2381 // iso 8601 regex 2382 // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) 2383 var extendedIsoRegex = 2384 /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, 2385 basicIsoRegex = 2386 /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, 2387 tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, 2388 isoDates = [ 2389 ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], 2390 ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], 2391 ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], 2392 ['GGGG-[W]WW', /\d{4}-W\d\d/, false], 2393 ['YYYY-DDD', /\d{4}-\d{3}/], 2394 ['YYYY-MM', /\d{4}-\d\d/, false], 2395 ['YYYYYYMMDD', /[+-]\d{10}/], 2396 ['YYYYMMDD', /\d{8}/], 2397 ['GGGG[W]WWE', /\d{4}W\d{3}/], 2398 ['GGGG[W]WW', /\d{4}W\d{2}/, false], 2399 ['YYYYDDD', /\d{7}/], 2400 ['YYYYMM', /\d{6}/, false], 2401 ['YYYY', /\d{4}/, false], 2402 ], 2403 // iso time formats and regexes 2404 isoTimes = [ 2405 ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], 2406 ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], 2407 ['HH:mm:ss', /\d\d:\d\d:\d\d/], 2408 ['HH:mm', /\d\d:\d\d/], 2409 ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], 2410 ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], 2411 ['HHmmss', /\d\d\d\d\d\d/], 2412 ['HHmm', /\d\d\d\d/], 2413 ['HH', /\d\d/], 2414 ], 2415 aspNetJsonRegex = /^\/?Date\((-?\d+)/i, 2416 // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 2417 rfc2822 = 2418 /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, 2419 obsOffsets = { 2420 UT: 0, 2421 GMT: 0, 2422 EDT: -4 * 60, 2423 EST: -5 * 60, 2424 CDT: -5 * 60, 2425 CST: -6 * 60, 2426 MDT: -6 * 60, 2427 MST: -7 * 60, 2428 PDT: -7 * 60, 2429 PST: -8 * 60, 2430 }; 2431 2432 // date from iso format 2433 function configFromISO(config) { 2434 var i, 2435 l, 2436 string = config._i, 2437 match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), 2438 allowTime, 2439 dateFormat, 2440 timeFormat, 2441 tzFormat, 2442 isoDatesLen = isoDates.length, 2443 isoTimesLen = isoTimes.length; 2444 2445 if (match) { 2446 getParsingFlags(config).iso = true; 2447 for (i = 0, l = isoDatesLen; i < l; i++) { 2448 if (isoDates[i][1].exec(match[1])) { 2449 dateFormat = isoDates[i][0]; 2450 allowTime = isoDates[i][2] !== false; 2451 break; 2452 } 2453 } 2454 if (dateFormat == null) { 2455 config._isValid = false; 2456 return; 2457 } 2458 if (match[3]) { 2459 for (i = 0, l = isoTimesLen; i < l; i++) { 2460 if (isoTimes[i][1].exec(match[3])) { 2461 // match[2] should be 'T' or space 2462 timeFormat = (match[2] || ' ') + isoTimes[i][0]; 2463 break; 2464 } 2465 } 2466 if (timeFormat == null) { 2467 config._isValid = false; 2468 return; 2469 } 2470 } 2471 if (!allowTime && timeFormat != null) { 2472 config._isValid = false; 2473 return; 2474 } 2475 if (match[4]) { 2476 if (tzRegex.exec(match[4])) { 2477 tzFormat = 'Z'; 2478 } else { 2479 config._isValid = false; 2480 return; 2481 } 2482 } 2483 config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); 2484 configFromStringAndFormat(config); 2485 } else { 2486 config._isValid = false; 2487 } 2488 } 2489 2490 function extractFromRFC2822Strings( 2491 yearStr, 2492 monthStr, 2493 dayStr, 2494 hourStr, 2495 minuteStr, 2496 secondStr 2497 ) { 2498 var result = [ 2499 untruncateYear(yearStr), 2500 defaultLocaleMonthsShort.indexOf(monthStr), 2501 parseInt(dayStr, 10), 2502 parseInt(hourStr, 10), 2503 parseInt(minuteStr, 10), 2504 ]; 2505 2506 if (secondStr) { 2507 result.push(parseInt(secondStr, 10)); 2508 } 2509 2510 return result; 2511 } 2512 2513 function untruncateYear(yearStr) { 2514 var year = parseInt(yearStr, 10); 2515 if (year <= 49) { 2516 return 2000 + year; 2517 } else if (year <= 999) { 2518 return 1900 + year; 2519 } 2520 return year; 2521 } 2522 2523 function preprocessRFC2822(s) { 2524 // Remove comments and folding whitespace and replace multiple-spaces with a single space 2525 return s 2526 .replace(/\([^()]*\)|[\n\t]/g, ' ') 2527 .replace(/(\s\s+)/g, ' ') 2528 .replace(/^\s\s*/, '') 2529 .replace(/\s\s*$/, ''); 2530 } 2531 2532 function checkWeekday(weekdayStr, parsedInput, config) { 2533 if (weekdayStr) { 2534 // TODO: Replace the vanilla JS Date object with an independent day-of-week check. 2535 var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), 2536 weekdayActual = new Date( 2537 parsedInput[0], 2538 parsedInput[1], 2539 parsedInput[2] 2540 ).getDay(); 2541 if (weekdayProvided !== weekdayActual) { 2542 getParsingFlags(config).weekdayMismatch = true; 2543 config._isValid = false; 2544 return false; 2545 } 2546 } 2547 return true; 2548 } 2549 2550 function calculateOffset(obsOffset, militaryOffset, numOffset) { 2551 if (obsOffset) { 2552 return obsOffsets[obsOffset]; 2553 } else if (militaryOffset) { 2554 // the only allowed military tz is Z 2555 return 0; 2556 } else { 2557 var hm = parseInt(numOffset, 10), 2558 m = hm % 100, 2559 h = (hm - m) / 100; 2560 return h * 60 + m; 2561 } 2562 } 2563 2564 // date and time from ref 2822 format 2565 function configFromRFC2822(config) { 2566 var match = rfc2822.exec(preprocessRFC2822(config._i)), 2567 parsedArray; 2568 if (match) { 2569 parsedArray = extractFromRFC2822Strings( 2570 match[4], 2571 match[3], 2572 match[2], 2573 match[5], 2574 match[6], 2575 match[7] 2576 ); 2577 if (!checkWeekday(match[1], parsedArray, config)) { 2578 return; 2579 } 2580 2581 config._a = parsedArray; 2582 config._tzm = calculateOffset(match[8], match[9], match[10]); 2583 2584 config._d = createUTCDate.apply(null, config._a); 2585 config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); 2586 2587 getParsingFlags(config).rfc2822 = true; 2588 } else { 2589 config._isValid = false; 2590 } 2591 } 2592 2593 // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict 2594 function configFromString(config) { 2595 var matched = aspNetJsonRegex.exec(config._i); 2596 if (matched !== null) { 2597 config._d = new Date(+matched[1]); 2598 return; 2599 } 2600 2601 configFromISO(config); 2602 if (config._isValid === false) { 2603 delete config._isValid; 2604 } else { 2605 return; 2606 } 2607 2608 configFromRFC2822(config); 2609 if (config._isValid === false) { 2610 delete config._isValid; 2611 } else { 2612 return; 2613 } 2614 2615 if (config._strict) { 2616 config._isValid = false; 2617 } else { 2618 // Final attempt, use Input Fallback 2619 hooks.createFromInputFallback(config); 2620 } 2621 } 2622 2623 hooks.createFromInputFallback = deprecate( 2624 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 2625 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 2626 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.', 2627 function (config) { 2628 config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); 2629 } 2630 ); 2631 2632 // Pick the first defined of two or three arguments. 2633 function defaults(a, b, c) { 2634 if (a != null) { 2635 return a; 2636 } 2637 if (b != null) { 2638 return b; 2639 } 2640 return c; 2641 } 2642 2643 function currentDateArray(config
vendor: 17,694 bytes, lines 2643-3204
2643) { 2644 // hooks is actually the exported moment object 2645 var nowValue = new Date(hooks.now()); 2646 if (config._useUTC) { 2647 return [ 2648 nowValue.getUTCFullYear(), 2649 nowValue.getUTCMonth(), 2650 nowValue.getUTCDate(), 2651 ]; 2652 } 2653 return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; 2654 } 2655 2656 // convert an array to a date. 2657 // the array should mirror the parameters below 2658 // note: all values past the year are optional and will default to the lowest possible value. 2659 // [year, month, day , hour, minute, second, millisecond] 2660 function configFromArray(config) { 2661 var i, 2662 date, 2663 input = [], 2664 currentDate, 2665 expectedWeekday, 2666 yearToUse; 2667 2668 if (config._d) { 2669 return; 2670 } 2671 2672 currentDate = currentDateArray(config); 2673 2674 //compute day of the year from weeks and weekdays 2675 if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { 2676 dayOfYearFromWeekInfo(config); 2677 } 2678 2679 //if the day of the year is set, figure out what it is 2680 if (config._dayOfYear != null) { 2681 yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); 2682 2683 if ( 2684 config._dayOfYear > daysInYear(yearToUse) || 2685 config._dayOfYear === 0 2686 ) { 2687 getParsingFlags(config)._overflowDayOfYear = true; 2688 } 2689 2690 date = createUTCDate(yearToUse, 0, config._dayOfYear); 2691 config._a[MONTH] = date.getUTCMonth(); 2692 config._a[DATE] = date.getUTCDate(); 2693 } 2694 2695 // Default to current date. 2696 // * if no year, month, day of month are given, default to today 2697 // * if day of month is given, default month and year 2698 // * if month is given, default only year 2699 // * if year is given, don't default anything 2700 for (i = 0; i < 3 && config._a[i] == null; ++i) { 2701 config._a[i] = input[i] = currentDate[i]; 2702 } 2703 2704 // Zero out whatever was not defaulted, including time 2705 for (; i < 7; i++) { 2706 config._a[i] = input[i] = 2707 config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i]; 2708 } 2709 2710 // Check for 24:00:00.000 2711 if ( 2712 config._a[HOUR] === 24 && 2713 config._a[MINUTE] === 0 && 2714 config._a[SECOND] === 0 && 2715 config._a[MILLISECOND] === 0 2716 ) { 2717 config._nextDay = true; 2718 config._a[HOUR] = 0; 2719 } 2720 2721 config._d = (config._useUTC ? createUTCDate : createDate).apply( 2722 null, 2723 input 2724 ); 2725 expectedWeekday = config._useUTC 2726 ? config._d.getUTCDay() 2727 : config._d.getDay(); 2728 2729 // Apply timezone offset from input. The actual utcOffset can be changed 2730 // with parseZone. 2731 if (config._tzm != null) { 2732 config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); 2733 } 2734 2735 if (config._nextDay) { 2736 config._a[HOUR] = 24; 2737 } 2738 2739 // check for mismatching day of week 2740 if ( 2741 config._w && 2742 typeof config._w.d !== 'undefined' && 2743 config._w.d !== expectedWeekday 2744 ) { 2745 getParsingFlags(config).weekdayMismatch = true; 2746 } 2747 } 2748 2749 function dayOfYearFromWeekInfo(config) { 2750 var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek; 2751 2752 w = config._w; 2753 if (w.GG != null || w.W != null || w.E != null) { 2754 dow = 1; 2755 doy = 4; 2756 2757 // TODO: We need to take the current isoWeekYear, but that depends on 2758 // how we interpret now (local, utc, fixed offset). So create 2759 // a now version of current config (take local/utc/offset flags, and 2760 // create now). 2761 weekYear = defaults( 2762 w.GG, 2763 config._a[YEAR], 2764 weekOfYear(createLocal(), 1, 4).year 2765 ); 2766 week = defaults(w.W, 1); 2767 weekday = defaults(w.E, 1); 2768 if (weekday < 1 || weekday > 7) { 2769 weekdayOverflow = true; 2770 } 2771 } else { 2772 dow = config._locale._week.dow; 2773 doy = config._locale._week.doy; 2774 2775 curWeek = weekOfYear(createLocal(), dow, doy); 2776 2777 weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); 2778 2779 // Default to current week. 2780 week = defaults(w.w, curWeek.week); 2781 2782 if (w.d != null) { 2783 // weekday -- low day numbers are considered next week 2784 weekday = w.d; 2785 if (weekday < 0 || weekday > 6) { 2786 weekdayOverflow = true; 2787 } 2788 } else if (w.e != null) { 2789 // local weekday -- counting starts from beginning of week 2790 weekday = w.e + dow; 2791 if (w.e < 0 || w.e > 6) { 2792 weekdayOverflow = true; 2793 } 2794 } else { 2795 // default to beginning of week 2796 weekday = dow; 2797 } 2798 } 2799 if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { 2800 getParsingFlags(config)._overflowWeeks = true; 2801 } else if (weekdayOverflow != null) { 2802 getParsingFlags(config)._overflowWeekday = true; 2803 } else { 2804 temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); 2805 config._a[YEAR] = temp.year; 2806 config._dayOfYear = temp.dayOfYear; 2807 } 2808 } 2809 2810 // constant that refers to the ISO standard 2811 hooks.ISO_8601 = function () {}; 2812 2813 // constant that refers to the RFC 2822 form 2814 hooks.RFC_2822 = function () {}; 2815 2816 // date from string and format string 2817 function configFromStringAndFormat(config) { 2818 // TODO: Move this to another part of the creation flow to prevent circular deps 2819 if (config._f === hooks.ISO_8601) { 2820 configFromISO(config); 2821 return; 2822 } 2823 if (config._f === hooks.RFC_2822) { 2824 configFromRFC2822(config); 2825 return; 2826 } 2827 config._a = []; 2828 getParsingFlags(config).empty = true; 2829 2830 // This array is used to make a Date, either with `new Date` or `Date.UTC` 2831 var string = '' + config._i, 2832 i, 2833 parsedInput, 2834 tokens, 2835 token, 2836 skipped, 2837 stringLength = string.length, 2838 totalParsedInputLength = 0, 2839 era, 2840 tokenLen; 2841 2842 tokens = 2843 expandFormat(config._f, config._locale).match(formattingTokens) || []; 2844 tokenLen = tokens.length; 2845 for (i = 0; i < tokenLen; i++) { 2846 token = tokens[i]; 2847 parsedInput = (string.match(getParseRegexForToken(token, config)) || 2848 [])[0]; 2849 if (parsedInput) { 2850 skipped = string.substr(0, string.indexOf(parsedInput)); 2851 if (skipped.length > 0) { 2852 getParsingFlags(config).unusedInput.push(skipped); 2853 } 2854 string = string.slice( 2855 string.indexOf(parsedInput) + parsedInput.length 2856 ); 2857 totalParsedInputLength += parsedInput.length; 2858 } 2859 // don't parse if it's not a known token 2860 if (formatTokenFunctions[token]) { 2861 if (parsedInput) { 2862 getParsingFlags(config).empty = false; 2863 } else { 2864 getParsingFlags(config).unusedTokens.push(token); 2865 } 2866 addTimeToArrayFromToken(token, parsedInput, config); 2867 } else if (config._strict && !parsedInput) { 2868 getParsingFlags(config).unusedTokens.push(token); 2869 } 2870 } 2871 2872 // add remaining unparsed input length to the string 2873 getParsingFlags(config).charsLeftOver = 2874 stringLength - totalParsedInputLength; 2875 if (string.length > 0) { 2876 getParsingFlags(config).unusedInput.push(string); 2877 } 2878 2879 // clear _12h flag if hour is <= 12 2880 if ( 2881 config._a[HOUR] <= 12 && 2882 getParsingFlags(config).bigHour === true && 2883 config._a[HOUR] > 0 2884 ) { 2885 getParsingFlags(config).bigHour = undefined; 2886 } 2887 2888 getParsingFlags(config).parsedDateParts = config._a.slice(0); 2889 getParsingFlags(config).meridiem = config._meridiem; 2890 // handle meridiem 2891 config._a[HOUR] = meridiemFixWrap( 2892 config._locale, 2893 config._a[HOUR], 2894 config._meridiem 2895 ); 2896 2897 // handle era 2898 era = getParsingFlags(config).era; 2899 if (era !== null) { 2900 config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]); 2901 } 2902 2903 configFromArray(config); 2904 checkOverflow(config); 2905 } 2906 2907 function meridiemFixWrap(locale, hour, meridiem) { 2908 var isPm; 2909 2910 if (meridiem == null) { 2911 // nothing to do 2912 return hour; 2913 } 2914 if (locale.meridiemHour != null) { 2915 return locale.meridiemHour(hour, meridiem); 2916 } else if (locale.isPM != null) { 2917 // Fallback 2918 isPm = locale.isPM(meridiem); 2919 if (isPm && hour < 12) { 2920 hour += 12; 2921 } 2922 if (!isPm && hour === 12) { 2923 hour = 0; 2924 } 2925 return hour; 2926 } else { 2927 // this is not supposed to happen 2928 return hour; 2929 } 2930 } 2931 2932 // date from string and array of format strings 2933 function configFromStringAndArray(config) { 2934 var tempConfig, 2935 bestMoment, 2936 scoreToBeat, 2937 i, 2938 currentScore, 2939 validFormatFound, 2940 bestFormatIsValid = false, 2941 configfLen = config._f.length; 2942 2943 if (configfLen === 0) { 2944 getParsingFlags(config).invalidFormat = true; 2945 config._d = new Date(NaN); 2946 return; 2947 } 2948 2949 for (i = 0; i < configfLen; i++) { 2950 currentScore = 0; 2951 validFormatFound = false; 2952 tempConfig = copyConfig({}, config); 2953 if (config._useUTC != null) { 2954 tempConfig._useUTC = config._useUTC; 2955 } 2956 tempConfig._f = config._f[i]; 2957 configFromStringAndFormat(tempConfig); 2958 2959 if (isValid(tempConfig)) { 2960 validFormatFound = true; 2961 } 2962 2963 // if there is any input that was not parsed add a penalty for that format 2964 currentScore += getParsingFlags(tempConfig).charsLeftOver; 2965 2966 //or tokens 2967 currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; 2968 2969 getParsingFlags(tempConfig).score = currentScore; 2970 2971 if (!bestFormatIsValid) { 2972 if ( 2973 scoreToBeat == null || 2974 currentScore < scoreToBeat || 2975 validFormatFound 2976 ) { 2977 scoreToBeat = currentScore; 2978 bestMoment = tempConfig; 2979 if (validFormatFound) { 2980 bestFormatIsValid = true; 2981 } 2982 } 2983 } else { 2984 if (currentScore < scoreToBeat) { 2985 scoreToBeat = currentScore; 2986 bestMoment = tempConfig; 2987 } 2988 } 2989 } 2990 2991 extend(config, bestMoment || tempConfig); 2992 } 2993 2994 function configFromObject(config) { 2995 if (config._d) { 2996 return; 2997 } 2998 2999 var i = normalizeObjectUnits(config._i), 3000 dayOrDate = i.day === undefined ? i.date : i.day; 3001 config._a = map( 3002 [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], 3003 function (obj) { 3004 return obj && parseInt(obj, 10); 3005 } 3006 ); 3007 3008 configFromArray(config); 3009 } 3010 3011 function createFromConfig(config) { 3012 var res = new Moment(checkOverflow(prepareConfig(config))); 3013 if (res._nextDay) { 3014 // Adding is smart enough around DST 3015 res.add(1, 'd'); 3016 res._nextDay = undefined; 3017 } 3018 3019 return res; 3020 } 3021 3022 function prepareConfig(config) { 3023 var input = config._i, 3024 format = config._f; 3025 3026 config._locale = config._locale || getLocale(config._l); 3027 3028 if (input === null || (format === undefined && input === '')) { 3029 return createInvalid({ nullInput: true }); 3030 } 3031 3032 if (typeof input === 'string') { 3033 config._i = input = config._locale.preparse(input); 3034 } 3035 3036 if (isMoment(input)) { 3037 return new Moment(checkOverflow(input)); 3038 } else if (isDate(input)) { 3039 config._d = input; 3040 } else if (isArray(format)) { 3041 configFromStringAndArray(config); 3042 } else if (format) { 3043 configFromStringAndFormat(config); 3044 } else { 3045 configFromInput(config); 3046 } 3047 3048 if (!isValid(config)) { 3049 config._d = null; 3050 } 3051 3052 return config; 3053 } 3054 3055 function configFromInput(config) { 3056 var input = config._i; 3057 if (isUndefined(input)) { 3058 config._d = new Date(hooks.now()); 3059 } else if (isDate(input)) { 3060 config._d = new Date(input.valueOf()); 3061 } else if (typeof input === 'string') { 3062 configFromString(config); 3063 } else if (isArray(input)) { 3064 config._a = map(input.slice(0), function (obj) { 3065 return parseInt(obj, 10); 3066 }); 3067 configFromArray(config); 3068 } else if (isObject(input)) { 3069 configFromObject(config); 3070 } else if (isNumber(input)) { 3071 // from milliseconds 3072 config._d = new Date(input); 3073 } else { 3074 hooks.createFromInputFallback(config); 3075 } 3076 } 3077 3078 function createLocalOrUTC(input, format, locale, strict, isUTC) { 3079 var c = {}; 3080 3081 if (format === true || format === false) { 3082 strict = format; 3083 format = undefined; 3084 } 3085 3086 if (locale === true || locale === false) { 3087 strict = locale; 3088 locale = undefined; 3089 } 3090 3091 if ( 3092 (isObject(input) && isObjectEmpty(input)) || 3093 (isArray(input) && input.length === 0) 3094 ) { 3095 input = undefined; 3096 } 3097 // object construction must be done this way. 3098 // https://github.com/moment/moment/issues/1423 3099 c._isAMomentObject = true; 3100 c._useUTC = c._isUTC = isUTC; 3101 c._l = locale; 3102 c._i = input; 3103 c._f = format; 3104 c._strict = strict; 3105 3106 return createFromConfig(c); 3107 } 3108 3109 function createLocal(input, format, locale, strict) { 3110 return createLocalOrUTC(input, format, locale, strict, false); 3111 } 3112 3113 var prototypeMin = deprecate( 3114 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', 3115 function () { 3116 var other = createLocal.apply(null, arguments); 3117 if (this.isValid() && other.isValid()) { 3118 return other < this ? this : other; 3119 } else { 3120 return createInvalid(); 3121 } 3122 } 3123 ), 3124 prototypeMax = deprecate( 3125 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', 3126 function () { 3127 var other = createLocal.apply(null, arguments); 3128 if (this.isValid() && other.isValid()) { 3129 return other > this ? this : other; 3130 } else { 3131 return createInvalid(); 3132 } 3133 } 3134 ); 3135 3136 // Pick a moment m from moments so that m[fn](other) is true for all 3137 // other. This relies on the function fn to be transitive. 3138 // 3139 // moments should either be an array of moment objects or an array, whose 3140 // first element is an array of moment objects. 3141 function pickBy(fn, moments) { 3142 var res, i; 3143 if (moments.length === 1 && isArray(moments[0])) { 3144 moments = moments[0]; 3145 } 3146 if (!moments.length) { 3147 return createLocal(); 3148 } 3149 res = moments[0]; 3150 for (i = 1; i < moments.length; ++i) { 3151 if (!moments[i].isValid() || moments[i][fn](res)) { 3152 res = moments[i]; 3153 } 3154 } 3155 return res; 3156 } 3157 3158 // TODO: Use [].sort instead? 3159 function min() { 3160 var args = [].slice.call(arguments, 0); 3161 3162 return pickBy('isBefore', args); 3163 } 3164 3165 function max() { 3166 var args = [].slice.call(arguments, 0); 3167 3168 return pickBy('isAfter', args); 3169 } 3170 3171 var now = function () { 3172 return Date.now ? Date.now() : +new Date(); 3173 }; 3174 3175 var ordering = [ 3176 'year', 3177 'quarter', 3178 'month', 3179 'week', 3180 'day', 3181 'hour', 3182 'minute', 3183 'second', 3184 'millisecond', 3185 ]; 3186 3187 function isDurationValid(m) { 3188 var key, 3189 unitHasDecimal = false, 3190 i, 3191 orderLen = ordering.length; 3192 for (key in m) { 3193 if ( 3194 hasOwnProp(m, key) && 3195 !( 3196 indexOf.call(ordering, key) !== -1 && 3197 (m[key] == null || !isNaN(m[key])) 3198 ) 3199 ) { 3200 return false; 3201 } 3202 } 3203 3204 for (i = 0; i < orderLen
vendor: 10,251 bytes, lines 3204-3529
3204; ++i) { 3205 if (m[ordering[i]]) { 3206 if (unitHasDecimal) { 3207 return false; // only allow non-integers for smallest unit 3208 } 3209 if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { 3210 unitHasDecimal = true; 3211 } 3212 } 3213 } 3214 3215 return true; 3216 } 3217 3218 function isValid$1() { 3219 return this._isValid; 3220 } 3221 3222 function createInvalid$1() { 3223 return createDuration(NaN); 3224 } 3225 3226 function Duration(duration) { 3227 var normalizedInput = normalizeObjectUnits(duration), 3228 years = normalizedInput.year || 0, 3229 quarters = normalizedInput.quarter || 0, 3230 months = normalizedInput.month || 0, 3231 weeks = normalizedInput.week || normalizedInput.isoWeek || 0, 3232 days = normalizedInput.day || 0, 3233 hours = normalizedInput.hour || 0, 3234 minutes = normalizedInput.minute || 0, 3235 seconds = normalizedInput.second || 0, 3236 milliseconds = normalizedInput.millisecond || 0; 3237 3238 this._isValid = isDurationValid(normalizedInput); 3239 3240 // representation for dateAddRemove 3241 this._milliseconds = 3242 +milliseconds + 3243 seconds * 1e3 + // 1000 3244 minutes * 6e4 + // 1000 * 60 3245 hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 3246 // Because of dateAddRemove treats 24 hours as different from a 3247 // day when working around DST, we need to store them separately 3248 this._days = +days + weeks * 7; 3249 // It is impossible to translate months into days without knowing 3250 // which months you are are talking about, so we have to store 3251 // it separately. 3252 this._months = +months + quarters * 3 + years * 12; 3253 3254 this._data = {}; 3255 3256 this._locale = getLocale(); 3257 3258 this._bubble(); 3259 } 3260 3261 function isDuration(obj) { 3262 return obj instanceof Duration; 3263 } 3264 3265 function absRound(number) { 3266 if (number < 0) { 3267 return Math.round(-1 * number) * -1; 3268 } else { 3269 return Math.round(number); 3270 } 3271 } 3272 3273 // compare two arrays, return the number of differences 3274 function compareArrays(array1, array2, dontConvert) { 3275 var len = Math.min(array1.length, array2.length), 3276 lengthDiff = Math.abs(array1.length - array2.length), 3277 diffs = 0, 3278 i; 3279 for (i = 0; i < len; i++) { 3280 if ( 3281 (dontConvert && array1[i] !== array2[i]) || 3282 (!dontConvert && toInt(array1[i]) !== toInt(array2[i])) 3283 ) { 3284 diffs++; 3285 } 3286 } 3287 return diffs + lengthDiff; 3288 } 3289 3290 // FORMATTING 3291 3292 function offset(token, separator) { 3293 addFormatToken(token, 0, 0, function () { 3294 var offset = this.utcOffset(), 3295 sign = '+'; 3296 if (offset < 0) { 3297 offset = -offset; 3298 sign = '-'; 3299 } 3300 return ( 3301 sign + 3302 zeroFill(~~(offset / 60), 2) + 3303 separator + 3304 zeroFill(~~offset % 60, 2) 3305 ); 3306 }); 3307 } 3308 3309 offset('Z', ':'); 3310 offset('ZZ', ''); 3311 3312 // PARSING 3313 3314 addRegexToken('Z', matchShortOffset); 3315 addRegexToken('ZZ', matchShortOffset); 3316 addParseToken(['Z', 'ZZ'], function (input, array, config) { 3317 config._useUTC = true; 3318 config._tzm = offsetFromString(matchShortOffset, input); 3319 }); 3320 3321 // HELPERS 3322 3323 // timezone chunker 3324 // '+10:00' > ['10', '00'] 3325 // '-1530' > ['-15', '30'] 3326 var chunkOffset = /([\+\-]|\d\d)/gi; 3327 3328 function offsetFromString(matcher, string) { 3329 var matches = (string || '').match(matcher), 3330 chunk, 3331 parts, 3332 minutes; 3333 3334 if (matches === null) { 3335 return null; 3336 } 3337 3338 chunk = matches[matches.length - 1] || []; 3339 parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; 3340 minutes = +(parts[1] * 60) + toInt(parts[2]); 3341 3342 return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; 3343 } 3344 3345 // Return a moment from input, that is local/utc/zone equivalent to model. 3346 function cloneWithOffset(input, model) { 3347 var res, diff; 3348 if (model._isUTC) { 3349 res = model.clone(); 3350 diff = 3351 (isMoment(input) || isDate(input) 3352 ? input.valueOf() 3353 : createLocal(input).valueOf()) - res.valueOf(); 3354 // Use low-level api, because this fn is low-level api. 3355 res._d.setTime(res._d.valueOf() + diff); 3356 hooks.updateOffset(res, false); 3357 return res; 3358 } else { 3359 return createLocal(input).local(); 3360 } 3361 } 3362 3363 function getDateOffset(m) { 3364 // On Firefox.24 Date#getTimezoneOffset returns a floating point. 3365 // https://github.com/moment/moment/pull/1871 3366 return -Math.round(m._d.getTimezoneOffset()); 3367 } 3368 3369 // HOOKS 3370 3371 // This function will be called whenever a moment is mutated. 3372 // It is intended to keep the offset in sync with the timezone. 3373 hooks.updateOffset = function () {}; 3374 3375 // MOMENTS 3376 3377 // keepLocalTime = true means only change the timezone, without 3378 // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> 3379 // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset 3380 // +0200, so we adjust the time as needed, to be valid. 3381 // 3382 // Keeping the time actually adds/subtracts (one hour) 3383 // from the actual represented time. That is why we call updateOffset 3384 // a second time. In case it wants us to change the offset again 3385 // _changeInProgress == true case, then we have to adjust, because 3386 // there is no such time in the given timezone. 3387 function getSetOffset(input, keepLocalTime, keepMinutes) { 3388 var offset = this._offset || 0, 3389 localAdjust; 3390 if (!this.isValid()) { 3391 return input != null ? this : NaN; 3392 } 3393 if (input != null) { 3394 if (typeof input === 'string') { 3395 input = offsetFromString(matchShortOffset, input); 3396 if (input === null) { 3397 return this; 3398 } 3399 } else if (Math.abs(input) < 16 && !keepMinutes) { 3400 input = input * 60; 3401 } 3402 if (!this._isUTC && keepLocalTime) { 3403 localAdjust = getDateOffset(this); 3404 } 3405 this._offset = input; 3406 this._isUTC = true; 3407 if (localAdjust != null) { 3408 this.add(localAdjust, 'm'); 3409 } 3410 if (offset !== input) { 3411 if (!keepLocalTime || this._changeInProgress) { 3412 addSubtract( 3413 this, 3414 createDuration(input - offset, 'm'), 3415 1, 3416 false 3417 ); 3418 } else if (!this._changeInProgress) { 3419 this._changeInProgress = true; 3420 hooks.updateOffset(this, true); 3421 this._changeInProgress = null; 3422 } 3423 } 3424 return this; 3425 } else { 3426 return this._isUTC ? offset : getDateOffset(this); 3427 } 3428 } 3429 3430 function getSetZone(input, keepLocalTime) { 3431 if (input != null) { 3432 if (typeof input !== 'string') { 3433 input = -input; 3434 } 3435 3436 this.utcOffset(input, keepLocalTime); 3437 3438 return this; 3439 } else { 3440 return -this.utcOffset(); 3441 } 3442 } 3443 3444 function setOffsetToUTC(keepLocalTime) { 3445 return this.utcOffset(0, keepLocalTime); 3446 } 3447 3448 function setOffsetToLocal(keepLocalTime) { 3449 if (this._isUTC) { 3450 this.utcOffset(0, keepLocalTime); 3451 this._isUTC = false; 3452 3453 if (keepLocalTime) { 3454 this.subtract(getDateOffset(this), 'm'); 3455 } 3456 } 3457 return this; 3458 } 3459 3460 function setOffsetToParsedOffset() { 3461 if (this._tzm != null) { 3462 this.utcOffset(this._tzm, false, true); 3463 } else if (typeof this._i === 'string') { 3464 var tZone = offsetFromString(matchOffset, this._i); 3465 if (tZone != null) { 3466 this.utcOffset(tZone); 3467 } else { 3468 this.utcOffset(0, true); 3469 } 3470 } 3471 return this; 3472 } 3473 3474 function hasAlignedHourOffset(input) { 3475 if (!this.isValid()) { 3476 return false; 3477 } 3478 input = input ? createLocal(input).utcOffset() : 0; 3479 3480 return (this.utcOffset() - input) % 60 === 0; 3481 } 3482 3483 function isDaylightSavingTime() { 3484 return ( 3485 this.utcOffset() > this.clone().month(0).utcOffset() || 3486 this.utcOffset() > this.clone().month(5).utcOffset() 3487 ); 3488 } 3489 3490 function isDaylightSavingTimeShifted() { 3491 if (!isUndefined(this._isDSTShifted)) { 3492 return this._isDSTShifted; 3493 } 3494 3495 var c = {}, 3496 other; 3497 3498 copyConfig(c, this); 3499 c = prepareConfig(c); 3500 3501 if (c._a) { 3502 other = c._isUTC ? createUTC(c._a) : createLocal(c._a); 3503 this._isDSTShifted = 3504 this.isValid() && compareArrays(c._a, other.toArray()) > 0; 3505 } else { 3506 this._isDSTShifted = false; 3507 } 3508 3509 return this._isDSTShifted; 3510 } 3511 3512 function isLocal() { 3513 return this.isValid() ? !this._isUTC : false; 3514 } 3515 3516 function isUtcOffset() { 3517 return this.isValid() ? this._isUTC : false; 3518 } 3519 3520 function isUtc() { 3521 return this.isValid() ? this._isUTC && this._offset === 0 : false; 3522 } 3523 3524 // ASP.NET json date format regex 3525 var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, 3526 // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html 3527 // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere 3528 // and further modified to allow for strings containing both week and day 3529 isoRegex =
vendor: 9,021 bytes, lines 3529-3819
3529 3530 /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; 3531 3532 function createDuration(input, key) { 3533 var duration = input, 3534 // matching against regexp is expensive, do it on demand 3535 match = null, 3536 sign, 3537 ret, 3538 diffRes; 3539 3540 if (isDuration(input)) { 3541 duration = { 3542 ms: input._milliseconds, 3543 d: input._days, 3544 M: input._months, 3545 }; 3546 } else if (isNumber(input) || !isNaN(+input)) { 3547 duration = {}; 3548 if (key) { 3549 duration[key] = +input; 3550 } else { 3551 duration.milliseconds = +input; 3552 } 3553 } else if ((match = aspNetRegex.exec(input))) { 3554 sign = match[1] === '-' ? -1 : 1; 3555 duration = { 3556 y: 0, 3557 d: toInt(match[DATE]) * sign, 3558 h: toInt(match[HOUR]) * sign, 3559 m: toInt(match[MINUTE]) * sign, 3560 s: toInt(match[SECOND]) * sign, 3561 ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match 3562 }; 3563 } else if ((match = isoRegex.exec(input))) { 3564 sign = match[1] === '-' ? -1 : 1; 3565 duration = { 3566 y: parseIso(match[2], sign), 3567 M: parseIso(match[3], sign), 3568 w: parseIso(match[4], sign), 3569 d: parseIso(match[5], sign), 3570 h: parseIso(match[6], sign), 3571 m: parseIso(match[7], sign), 3572 s: parseIso(match[8], sign), 3573 }; 3574 } else if (duration == null) { 3575 // checks for null or undefined 3576 duration = {}; 3577 } else if ( 3578 typeof duration === 'object' && 3579 ('from' in duration || 'to' in duration) 3580 ) { 3581 diffRes = momentsDifference( 3582 createLocal(duration.from), 3583 createLocal(duration.to) 3584 ); 3585 3586 duration = {}; 3587 duration.ms = diffRes.milliseconds; 3588 duration.M = diffRes.months; 3589 } 3590 3591 ret = new Duration(duration); 3592 3593 if (isDuration(input) && hasOwnProp(input, '_locale')) { 3594 ret._locale = input._locale; 3595 } 3596 3597 if (isDuration(input) && hasOwnProp(input, '_isValid')) { 3598 ret._isValid = input._isValid; 3599 } 3600 3601 return ret; 3602 } 3603 3604 createDuration.fn = Duration.prototype; 3605 createDuration.invalid = createInvalid$1; 3606 3607 function parseIso(inp, sign) { 3608 // We'd normally use ~~inp for this, but unfortunately it also 3609 // converts floats to ints. 3610 // inp may be undefined, so careful calling replace on it. 3611 var res = inp && parseFloat(inp.replace(',', '.')); 3612 // apply sign while we're at it 3613 return (isNaN(res) ? 0 : res) * sign; 3614 } 3615 3616 function positiveMomentsDifference(base, other) { 3617 var res = {}; 3618 3619 res.months = 3620 other.month() - base.month() + (other.year() - base.year()) * 12; 3621 if (base.clone().add(res.months, 'M').isAfter(other)) { 3622 --res.months; 3623 } 3624 3625 res.milliseconds = +other - +base.clone().add(res.months, 'M'); 3626 3627 return res; 3628 } 3629 3630 function momentsDifference(base, other) { 3631 var res; 3632 if (!(base.isValid() && other.isValid())) { 3633 return { milliseconds: 0, months: 0 }; 3634 } 3635 3636 other = cloneWithOffset(other, base); 3637 if (base.isBefore(other)) { 3638 res = positiveMomentsDifference(base, other); 3639 } else { 3640 res = positiveMomentsDifference(other, base); 3641 res.milliseconds = -res.milliseconds; 3642 res.months = -res.months; 3643 } 3644 3645 return res; 3646 } 3647 3648 // TODO: remove 'name' arg after deprecation is removed 3649 function createAdder(direction, name) { 3650 return function (val, period) { 3651 var dur, tmp; 3652 //invert the arguments, but complain about it 3653 if (period !== null && !isNaN(+period)) { 3654 deprecateSimple( 3655 name, 3656 'moment().' + 3657 name + 3658 '(period, number) is deprecated. Please use moment().' + 3659 name + 3660 '(number, period). ' + 3661 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.' 3662 ); 3663 tmp = val; 3664 val = period; 3665 period = tmp; 3666 } 3667 3668 dur = createDuration(val, period); 3669 addSubtract(this, dur, direction); 3670 return this; 3671 }; 3672 } 3673 3674 function addSubtract(mom, duration, isAdding, updateOffset) { 3675 var milliseconds = duration._milliseconds, 3676 days = absRound(duration._days), 3677 months = absRound(duration._months); 3678 3679 if (!mom.isValid()) { 3680 // No op 3681 return; 3682 } 3683 3684 updateOffset = updateOffset == null ? true : updateOffset; 3685 3686 if (months) { 3687 setMonth(mom, get(mom, 'Month') + months * isAdding); 3688 } 3689 if (days) { 3690 set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); 3691 } 3692 if (milliseconds) { 3693 mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); 3694 } 3695 if (updateOffset) { 3696 hooks.updateOffset(mom, days || months); 3697 } 3698 } 3699 3700 var add = createAdder(1, 'add'), 3701 subtract = createAdder(-1, 'subtract'); 3702 3703 function isString(input) { 3704 return typeof input === 'string' || input instanceof String; 3705 } 3706 3707 // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined 3708 function isMomentInput(input) { 3709 return ( 3710 isMoment(input) || 3711 isDate(input) || 3712 isString(input) || 3713 isNumber(input) || 3714 isNumberOrStringArray(input) || 3715 isMomentInputObject(input) || 3716 input === null || 3717 input === undefined 3718 ); 3719 } 3720 3721 function isMomentInputObject(input) { 3722 var objectTest = isObject(input) && !isObjectEmpty(input), 3723 propertyTest = false, 3724 properties = [ 3725 'years', 3726 'year', 3727 'y', 3728 'months', 3729 'month', 3730 'M', 3731 'days', 3732 'day', 3733 'd', 3734 'dates', 3735 'date', 3736 'D', 3737 'hours', 3738 'hour', 3739 'h', 3740 'minutes', 3741 'minute', 3742 'm', 3743 'seconds', 3744 'second', 3745 's', 3746 'milliseconds', 3747 'millisecond', 3748 'ms', 3749 ], 3750 i, 3751 property, 3752 propertyLen = properties.length; 3753 3754 for (i = 0; i < propertyLen; i += 1) { 3755 property = properties[i]; 3756 propertyTest = propertyTest || hasOwnProp(input, property); 3757 } 3758 3759 return objectTest && propertyTest; 3760 } 3761 3762 function isNumberOrStringArray(input) { 3763 var arrayTest = isArray(input), 3764 dataTypeTest = false; 3765 if (arrayTest) { 3766 dataTypeTest = 3767 input.filter(function (item) { 3768 return !isNumber(item) && isString(input); 3769 }).length === 0; 3770 } 3771 return arrayTest && dataTypeTest; 3772 } 3773 3774 function isCalendarSpec(input) { 3775 var objectTest = isObject(input) && !isObjectEmpty(input), 3776 propertyTest = false, 3777 properties = [ 3778 'sameDay', 3779 'nextDay', 3780 'lastDay', 3781 'nextWeek', 3782 'lastWeek', 3783 'sameElse', 3784 ], 3785 i, 3786 property; 3787 3788 for (i = 0; i < properties.length; i += 1) { 3789 property = properties[i]; 3790 propertyTest = propertyTest || hasOwnProp(input, property); 3791 } 3792 3793 return objectTest && propertyTest; 3794 } 3795 3796 function getCalendarFormat(myMoment, now) { 3797 var diff = myMoment.diff(now, 'days', true); 3798 return diff < -6 3799 ? 'sameElse' 3800 : diff < -1 3801 ? 'lastWeek' 3802 : diff < 0 3803 ? 'lastDay' 3804 : diff < 1 3805 ? 'sameDay' 3806 : diff < 2 3807 ? 'nextDay' 3808 : diff < 7 3809 ? 'nextWeek' 3810 : 'sameElse'; 3811 } 3812 3813 function calendar$1(time, formats) { 3814 // Support for single parameter, formats only overload to the calendar function 3815 if (arguments.length === 1) { 3816 if (!arguments[0]) { 3817 time = undefined; 3818 formats = undefined; 3819 } else
vendor: 17,627 bytes, lines 3819-4377
3819 if (isMomentInput(arguments[0])) { 3820 time = arguments[0]; 3821 formats = undefined; 3822 } else if (isCalendarSpec(arguments[0])) { 3823 formats = arguments[0]; 3824 time = undefined; 3825 } 3826 } 3827 // We want to compare the start of today, vs this. 3828 // Getting start-of-today depends on whether we're local/utc/offset or not. 3829 var now = time || createLocal(), 3830 sod = cloneWithOffset(now, this).startOf('day'), 3831 format = hooks.calendarFormat(this, sod) || 'sameElse', 3832 output = 3833 formats && 3834 (isFunction(formats[format]) 3835 ? formats[format].call(this, now) 3836 : formats[format]); 3837 3838 return this.format( 3839 output || this.localeData().calendar(format, this, createLocal(now)) 3840 ); 3841 } 3842 3843 function clone() { 3844 return new Moment(this); 3845 } 3846 3847 function isAfter(input, units) { 3848 var localInput = isMoment(input) ? input : createLocal(input); 3849 if (!(this.isValid() && localInput.isValid())) { 3850 return false; 3851 } 3852 units = normalizeUnits(units) || 'millisecond'; 3853 if (units === 'millisecond') { 3854 return this.valueOf() > localInput.valueOf(); 3855 } else { 3856 return localInput.valueOf() < this.clone().startOf(units).valueOf(); 3857 } 3858 } 3859 3860 function isBefore(input, units) { 3861 var localInput = isMoment(input) ? input : createLocal(input); 3862 if (!(this.isValid() && localInput.isValid())) { 3863 return false; 3864 } 3865 units = normalizeUnits(units) || 'millisecond'; 3866 if (units === 'millisecond') { 3867 return this.valueOf() < localInput.valueOf(); 3868 } else { 3869 return this.clone().endOf(units).valueOf() < localInput.valueOf(); 3870 } 3871 } 3872 3873 function isBetween(from, to, units, inclusivity) { 3874 var localFrom = isMoment(from) ? from : createLocal(from), 3875 localTo = isMoment(to) ? to : createLocal(to); 3876 if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { 3877 return false; 3878 } 3879 inclusivity = inclusivity || '()'; 3880 return ( 3881 (inclusivity[0] === '(' 3882 ? this.isAfter(localFrom, units) 3883 : !this.isBefore(localFrom, units)) && 3884 (inclusivity[1] === ')' 3885 ? this.isBefore(localTo, units) 3886 : !this.isAfter(localTo, units)) 3887 ); 3888 } 3889 3890 function isSame(input, units) { 3891 var localInput = isMoment(input) ? input : createLocal(input), 3892 inputMs; 3893 if (!(this.isValid() && localInput.isValid())) { 3894 return false; 3895 } 3896 units = normalizeUnits(units) || 'millisecond'; 3897 if (units === 'millisecond') { 3898 return this.valueOf() === localInput.valueOf(); 3899 } else { 3900 inputMs = localInput.valueOf(); 3901 return ( 3902 this.clone().startOf(units).valueOf() <= inputMs && 3903 inputMs <= this.clone().endOf(units).valueOf() 3904 ); 3905 } 3906 } 3907 3908 function isSameOrAfter(input, units) { 3909 return this.isSame(input, units) || this.isAfter(input, units); 3910 } 3911 3912 function isSameOrBefore(input, units) { 3913 return this.isSame(input, units) || this.isBefore(input, units); 3914 } 3915 3916 function diff(input, units, asFloat) { 3917 var that, zoneDelta, output; 3918 3919 if (!this.isValid()) { 3920 return NaN; 3921 } 3922 3923 that = cloneWithOffset(input, this); 3924 3925 if (!that.isValid()) { 3926 return NaN; 3927 } 3928 3929 zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; 3930 3931 units = normalizeUnits(units); 3932 3933 switch (units) { 3934 case 'year': 3935 output = monthDiff(this, that) / 12; 3936 break; 3937 case 'month': 3938 output = monthDiff(this, that); 3939 break; 3940 case 'quarter': 3941 output = monthDiff(this, that) / 3; 3942 break; 3943 case 'second': 3944 output = (this - that) / 1e3; 3945 break; // 1000 3946 case 'minute': 3947 output = (this - that) / 6e4; 3948 break; // 1000 * 60 3949 case 'hour': 3950 output = (this - that) / 36e5; 3951 break; // 1000 * 60 * 60 3952 case 'day': 3953 output = (this - that - zoneDelta) / 864e5; 3954 break; // 1000 * 60 * 60 * 24, negate dst 3955 case 'week': 3956 output = (this - that - zoneDelta) / 6048e5; 3957 break; // 1000 * 60 * 60 * 24 * 7, negate dst 3958 default: 3959 output = this - that; 3960 } 3961 3962 return asFloat ? output : absFloor(output); 3963 } 3964 3965 function monthDiff(a, b) { 3966 if (a.date() < b.date()) { 3967 // end-of-month calculations work correct when the start month has more 3968 // days than the end month. 3969 return -monthDiff(b, a); 3970 } 3971 // difference in months 3972 var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), 3973 // b is in (anchor - 1 month, anchor + 1 month) 3974 anchor = a.clone().add(wholeMonthDiff, 'months'), 3975 anchor2, 3976 adjust; 3977 3978 if (b - anchor < 0) { 3979 anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); 3980 // linear across the month 3981 adjust = (b - anchor) / (anchor - anchor2); 3982 } else { 3983 anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); 3984 // linear across the month 3985 adjust = (b - anchor) / (anchor2 - anchor); 3986 } 3987 3988 //check for negative zero, return zero if negative zero 3989 return -(wholeMonthDiff + adjust) || 0; 3990 } 3991 3992 hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; 3993 hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; 3994 3995 function toString() { 3996 return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); 3997 } 3998 3999 function toISOString(keepOffset) { 4000 if (!this.isValid()) { 4001 return null; 4002 } 4003 var utc = keepOffset !== true, 4004 m = utc ? this.clone().utc() : this; 4005 if (m.year() < 0 || m.year() > 9999) { 4006 return formatMoment( 4007 m, 4008 utc 4009 ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' 4010 : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ' 4011 ); 4012 } 4013 if (isFunction(Date.prototype.toISOString)) { 4014 // native implementation is ~50x faster, use it when we can 4015 if (utc) { 4016 return this.toDate().toISOString(); 4017 } else { 4018 return new Date(this.valueOf() + this.utcOffset() * 60 * 1000) 4019 .toISOString() 4020 .replace('Z', formatMoment(m, 'Z')); 4021 } 4022 } 4023 return formatMoment( 4024 m, 4025 utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ' 4026 ); 4027 } 4028 4029 /** 4030 * Return a human readable representation of a moment that can 4031 * also be evaluated to get a new moment which is the same 4032 * 4033 * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects 4034 */ 4035 function inspect() { 4036 if (!this.isValid()) { 4037 return 'moment.invalid(/* ' + this._i + ' */)'; 4038 } 4039 var func = 'moment', 4040 zone = '', 4041 prefix, 4042 year, 4043 datetime, 4044 suffix; 4045 if (!this.isLocal()) { 4046 func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; 4047 zone = 'Z'; 4048 } 4049 prefix = '[' + func + '("]'; 4050 year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; 4051 datetime = '-MM-DD[T]HH:mm:ss.SSS'; 4052 suffix = zone + '[")]'; 4053 4054 return this.format(prefix + year + datetime + suffix); 4055 } 4056 4057 function format(inputString) { 4058 if (!inputString) { 4059 inputString = this.isUtc() 4060 ? hooks.defaultFormatUtc 4061 : hooks.defaultFormat; 4062 } 4063 var output = formatMoment(this, inputString); 4064 return this.localeData().postformat(output); 4065 } 4066 4067 function from(time, withoutSuffix) { 4068 if ( 4069 this.isValid() && 4070 ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) 4071 ) { 4072 return createDuration({ to: this, from: time }) 4073 .locale(this.locale()) 4074 .humanize(!withoutSuffix); 4075 } else { 4076 return this.localeData().invalidDate(); 4077 } 4078 } 4079 4080 function fromNow(withoutSuffix) { 4081 return this.from(createLocal(), withoutSuffix); 4082 } 4083 4084 function to(time, withoutSuffix) { 4085 if ( 4086 this.isValid() && 4087 ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) 4088 ) { 4089 return createDuration({ from: this, to: time }) 4090 .locale(this.locale()) 4091 .humanize(!withoutSuffix); 4092 } else { 4093 return this.localeData().invalidDate(); 4094 } 4095 } 4096 4097 function toNow(withoutSuffix) { 4098 return this.to(createLocal(), withoutSuffix); 4099 } 4100 4101 // If passed a locale key, it will set the locale for this 4102 // instance. Otherwise, it will return the locale configuration 4103 // variables for this instance. 4104 function locale(key) { 4105 var newLocaleData; 4106 4107 if (key === undefined) { 4108 return this._locale._abbr; 4109 } else { 4110 newLocaleData = getLocale(key); 4111 if (newLocaleData != null) { 4112 this._locale = newLocaleData; 4113 } 4114 return this; 4115 } 4116 } 4117 4118 var lang = deprecate( 4119 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', 4120 function (key) { 4121 if (key === undefined) { 4122 return this.localeData(); 4123 } else { 4124 return this.locale(key); 4125 } 4126 } 4127 ); 4128 4129 function localeData() { 4130 return this._locale; 4131 } 4132 4133 var MS_PER_SECOND = 1000, 4134 MS_PER_MINUTE = 60 * MS_PER_SECOND, 4135 MS_PER_HOUR = 60 * MS_PER_MINUTE, 4136 MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; 4137 4138 // actual modulo - handles negative numbers (for dates before 1970): 4139 function mod$1(dividend, divisor) { 4140 return ((dividend % divisor) + divisor) % divisor; 4141 } 4142 4143 function localStartOfDate(y, m, d) { 4144 // the date constructor remaps years 0-99 to 1900-1999 4145 if (y < 100 && y >= 0) { 4146 // preserve leap years using a full 400 year cycle, then reset 4147 return new Date(y + 400, m, d) - MS_PER_400_YEARS; 4148 } else { 4149 return new Date(y, m, d).valueOf(); 4150 } 4151 } 4152 4153 function utcStartOfDate(y, m, d) { 4154 // Date.UTC remaps years 0-99 to 1900-1999 4155 if (y < 100 && y >= 0) { 4156 // preserve leap years using a full 400 year cycle, then reset 4157 return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; 4158 } else { 4159 return Date.UTC(y, m, d); 4160 } 4161 } 4162 4163 function startOf(units) { 4164 var time, startOfDate; 4165 units = normalizeUnits(units); 4166 if (units === undefined || units === 'millisecond' || !this.isValid()) { 4167 return this; 4168 } 4169 4170 startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; 4171 4172 switch (units) { 4173 case 'year': 4174 time = startOfDate(this.year(), 0, 1); 4175 break; 4176 case 'quarter': 4177 time = startOfDate( 4178 this.year(), 4179 this.month() - (this.month() % 3), 4180 1 4181 ); 4182 break; 4183 case 'month': 4184 time = startOfDate(this.year(), this.month(), 1); 4185 break; 4186 case 'week': 4187 time = startOfDate( 4188 this.year(), 4189 this.month(), 4190 this.date() - this.weekday() 4191 ); 4192 break; 4193 case 'isoWeek': 4194 time = startOfDate( 4195 this.year(), 4196 this.month(), 4197 this.date() - (this.isoWeekday() - 1) 4198 ); 4199 break; 4200 case 'day': 4201 case 'date': 4202 time = startOfDate(this.year(), this.month(), this.date()); 4203 break; 4204 case 'hour': 4205 time = this._d.valueOf(); 4206 time -= mod$1( 4207 time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), 4208 MS_PER_HOUR 4209 ); 4210 break; 4211 case 'minute': 4212 time = this._d.valueOf(); 4213 time -= mod$1(time, MS_PER_MINUTE); 4214 break; 4215 case 'second': 4216 time = this._d.valueOf(); 4217 time -= mod$1(time, MS_PER_SECOND); 4218 break; 4219 } 4220 4221 this._d.setTime(time); 4222 hooks.updateOffset(this, true); 4223 return this; 4224 } 4225 4226 function endOf(units) { 4227 var time, startOfDate; 4228 units = normalizeUnits(units); 4229 if (units === undefined || units === 'millisecond' || !this.isValid()) { 4230 return this; 4231 } 4232 4233 startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; 4234 4235 switch (units) { 4236 case 'year': 4237 time = startOfDate(this.year() + 1, 0, 1) - 1; 4238 break; 4239 case 'quarter': 4240 time = 4241 startOfDate( 4242 this.year(), 4243 this.month() - (this.month() % 3) + 3, 4244 1 4245 ) - 1; 4246 break; 4247 case 'month': 4248 time = startOfDate(this.year(), this.month() + 1, 1) - 1; 4249 break; 4250 case 'week': 4251 time = 4252 startOfDate( 4253 this.year(), 4254 this.month(), 4255 this.date() - this.weekday() + 7 4256 ) - 1; 4257 break; 4258 case 'isoWeek': 4259 time = 4260 startOfDate( 4261 this.year(), 4262 this.month(), 4263 this.date() - (this.isoWeekday() - 1) + 7 4264 ) - 1; 4265 break; 4266 case 'day': 4267 case 'date': 4268 time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; 4269 break; 4270 case 'hour': 4271 time = this._d.valueOf(); 4272 time += 4273 MS_PER_HOUR - 4274 mod$1( 4275 time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), 4276 MS_PER_HOUR 4277 ) - 4278 1; 4279 break; 4280 case 'minute': 4281 time = this._d.valueOf(); 4282 time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; 4283 break; 4284 case 'second': 4285 time = this._d.valueOf(); 4286 time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; 4287 break; 4288 } 4289 4290 this._d.setTime(time); 4291 hooks.updateOffset(this, true); 4292 return this; 4293 } 4294 4295 function valueOf() { 4296 return this._d.valueOf() - (this._offset || 0) * 60000; 4297 } 4298 4299 function unix() { 4300 return Math.floor(this.valueOf() / 1000); 4301 } 4302 4303 function toDate() { 4304 return new Date(this.valueOf()); 4305 } 4306 4307 function toArray() { 4308 var m = this; 4309 return [ 4310 m.year(), 4311 m.month(), 4312 m.date(), 4313 m.hour(), 4314 m.minute(), 4315 m.second(), 4316 m.millisecond(), 4317 ]; 4318 } 4319 4320 function toObject() { 4321 var m = this; 4322 return { 4323 years: m.year(), 4324 months: m.month(), 4325 date: m.date(), 4326 hours: m.hours(), 4327 minutes: m.minutes(), 4328 seconds: m.seconds(), 4329 milliseconds: m.milliseconds(), 4330 }; 4331 } 4332 4333 function toJSON() { 4334 // new Date(NaN).toJSON() === null 4335 return this.isValid() ? this.toISOString() : null; 4336 } 4337 4338 function isValid$2() { 4339 return isValid(this); 4340 } 4341 4342 function parsingFlags() { 4343 return extend({}, getParsingFlags(this)); 4344 } 4345 4346 function invalidAt() { 4347 return getParsingFlags(this).overflow; 4348 } 4349 4350 function creationData() { 4351 return { 4352 input: this._i, 4353 format: this._f, 4354 locale: this._locale, 4355 isUTC: this._isUTC, 4356 strict: this._strict, 4357 }; 4358 } 4359 4360 addFormatToken('N', 0, 0, 'eraAbbr'); 4361 addFormatToken('NN', 0, 0, 'eraAbbr'); 4362 addFormatToken('NNN', 0, 0, 'eraAbbr'); 4363 addFormatToken('NNNN', 0, 0, 'eraName'); 4364 addFormatToken('NNNNN', 0, 0, 'eraNarrow'); 4365 4366 addFormatToken('y', ['y', 1], 'yo', 'eraYear'); 4367 addFormatToken('y', ['yy', 2], 0, 'eraYear'); 4368 addFormatToken('y', ['yyy', 3], 0, 'eraYear'); 4369 addFormatToken('y', ['yyyy', 4], 0, 'eraYear'); 4370 4371 addRegexToken('N', matchEraAbbr); 4372 addRegexToken('NN', matchEraAbbr); 4373 addRegexToken('NNN', matchEraAbbr); 4374 addRegexToken('NNNN', matchEraName); 4375 addRegexToken('NNNNN', matchEraNarrow); 4376 4377 addParseToken(
vendor: 8,145 bytes, lines 4377-4652
4377 4378 ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], 4379 function (input, array, config, token) { 4380 var era = config._locale.erasParse(input, token, config._strict); 4381 if (era) { 4382 getParsingFlags(config).era = era; 4383 } else { 4384 getParsingFlags(config).invalidEra = input; 4385 } 4386 } 4387 ); 4388 4389 addRegexToken('y', matchUnsigned); 4390 addRegexToken('yy', matchUnsigned); 4391 addRegexToken('yyy', matchUnsigned); 4392 addRegexToken('yyyy', matchUnsigned); 4393 addRegexToken('yo', matchEraYearOrdinal); 4394 4395 addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR); 4396 addParseToken(['yo'], function (input, array, config, token) { 4397 var match; 4398 if (config._locale._eraYearOrdinalRegex) { 4399 match = input.match(config._locale._eraYearOrdinalRegex); 4400 } 4401 4402 if (config._locale.eraYearOrdinalParse) { 4403 array[YEAR] = config._locale.eraYearOrdinalParse(input, match); 4404 } else { 4405 array[YEAR] = parseInt(input, 10); 4406 } 4407 }); 4408 4409 function localeEras(m, format) { 4410 var i, 4411 l, 4412 date, 4413 eras = this._eras || getLocale('en')._eras; 4414 for (i = 0, l = eras.length; i < l; ++i) { 4415 switch (typeof eras[i].since) { 4416 case 'string': 4417 // truncate time 4418 date = hooks(eras[i].since).startOf('day'); 4419 eras[i].since = date.valueOf(); 4420 break; 4421 } 4422 4423 switch (typeof eras[i].until) { 4424 case 'undefined': 4425 eras[i].until = +Infinity; 4426 break; 4427 case 'string': 4428 // truncate time 4429 date = hooks(eras[i].until).startOf('day').valueOf(); 4430 eras[i].until = date.valueOf(); 4431 break; 4432 } 4433 } 4434 return eras; 4435 } 4436 4437 function localeErasParse(eraName, format, strict) { 4438 var i, 4439 l, 4440 eras = this.eras(), 4441 name, 4442 abbr, 4443 narrow; 4444 eraName = eraName.toUpperCase(); 4445 4446 for (i = 0, l = eras.length; i < l; ++i) { 4447 name = eras[i].name.toUpperCase(); 4448 abbr = eras[i].abbr.toUpperCase(); 4449 narrow = eras[i].narrow.toUpperCase(); 4450 4451 if (strict) { 4452 switch (format) { 4453 case 'N': 4454 case 'NN': 4455 case 'NNN': 4456 if (abbr === eraName) { 4457 return eras[i]; 4458 } 4459 break; 4460 4461 case 'NNNN': 4462 if (name === eraName) { 4463 return eras[i]; 4464 } 4465 break; 4466 4467 case 'NNNNN': 4468 if (narrow === eraName) { 4469 return eras[i]; 4470 } 4471 break; 4472 } 4473 } else if ([name, abbr, narrow].indexOf(eraName) >= 0) { 4474 return eras[i]; 4475 } 4476 } 4477 } 4478 4479 function localeErasConvertYear(era, year) { 4480 var dir = era.since <= era.until ? +1 : -1; 4481 if (year === undefined) { 4482 return hooks(era.since).year(); 4483 } else { 4484 return hooks(era.since).year() + (year - era.offset) * dir; 4485 } 4486 } 4487 4488 function getEraName() { 4489 var i, 4490 l, 4491 val, 4492 eras = this.localeData().eras(); 4493 for (i = 0, l = eras.length; i < l; ++i) { 4494 // truncate time 4495 val = this.clone().startOf('day').valueOf(); 4496 4497 if (eras[i].since <= val && val <= eras[i].until) { 4498 return eras[i].name; 4499 } 4500 if (eras[i].until <= val && val <= eras[i].since) { 4501 return eras[i].name; 4502 } 4503 } 4504 4505 return ''; 4506 } 4507 4508 function getEraNarrow() { 4509 var i, 4510 l, 4511 val, 4512 eras = this.localeData().eras(); 4513 for (i = 0, l = eras.length; i < l; ++i) { 4514 // truncate time 4515 val = this.clone().startOf('day').valueOf(); 4516 4517 if (eras[i].since <= val && val <= eras[i].until) { 4518 return eras[i].narrow; 4519 } 4520 if (eras[i].until <= val && val <= eras[i].since) { 4521 return eras[i].narrow; 4522 } 4523 } 4524 4525 return ''; 4526 } 4527 4528 function getEraAbbr() { 4529 var i, 4530 l, 4531 val, 4532 eras = this.localeData().eras(); 4533 for (i = 0, l = eras.length; i < l; ++i) { 4534 // truncate time 4535 val = this.clone().startOf('day').valueOf(); 4536 4537 if (eras[i].since <= val && val <= eras[i].until) { 4538 return eras[i].abbr; 4539 } 4540 if (eras[i].until <= val && val <= eras[i].since) { 4541 return eras[i].abbr; 4542 } 4543 } 4544 4545 return ''; 4546 } 4547 4548 function getEraYear() { 4549 var i, 4550 l, 4551 dir, 4552 val, 4553 eras = this.localeData().eras(); 4554 for (i = 0, l = eras.length; i < l; ++i) { 4555 dir = eras[i].since <= eras[i].until ? +1 : -1; 4556 4557 // truncate time 4558 val = this.clone().startOf('day').valueOf(); 4559 4560 if ( 4561 (eras[i].since <= val && val <= eras[i].until) || 4562 (eras[i].until <= val && val <= eras[i].since) 4563 ) { 4564 return ( 4565 (this.year() - hooks(eras[i].since).year()) * dir + 4566 eras[i].offset 4567 ); 4568 } 4569 } 4570 4571 return this.year(); 4572 } 4573 4574 function erasNameRegex(isStrict) { 4575 if (!hasOwnProp(this, '_erasNameRegex')) { 4576 computeErasParse.call(this); 4577 } 4578 return isStrict ? this._erasNameRegex : this._erasRegex; 4579 } 4580 4581 function erasAbbrRegex(isStrict) { 4582 if (!hasOwnProp(this, '_erasAbbrRegex')) { 4583 computeErasParse.call(this); 4584 } 4585 return isStrict ? this._erasAbbrRegex : this._erasRegex; 4586 } 4587 4588 function erasNarrowRegex(isStrict) { 4589 if (!hasOwnProp(this, '_erasNarrowRegex')) { 4590 computeErasParse.call(this); 4591 } 4592 return isStrict ? this._erasNarrowRegex : this._erasRegex; 4593 } 4594 4595 function matchEraAbbr(isStrict, locale) { 4596 return locale.erasAbbrRegex(isStrict); 4597 } 4598 4599 function matchEraName(isStrict, locale) { 4600 return locale.erasNameRegex(isStrict); 4601 } 4602 4603 function matchEraNarrow(isStrict, locale) { 4604 return locale.erasNarrowRegex(isStrict); 4605 } 4606 4607 function matchEraYearOrdinal(isStrict, locale) { 4608 return locale._eraYearOrdinalRegex || matchUnsigned; 4609 } 4610 4611 function computeErasParse() { 4612 var abbrPieces = [], 4613 namePieces = [], 4614 narrowPieces = [], 4615 mixedPieces = [], 4616 i, 4617 l, 4618 eras = this.eras(); 4619 4620 for (i = 0, l = eras.length; i < l; ++i) { 4621 namePieces.push(regexEscape(eras[i].name)); 4622 abbrPieces.push(regexEscape(eras[i].abbr)); 4623 narrowPieces.push(regexEscape(eras[i].narrow)); 4624 4625 mixedPieces.push(regexEscape(eras[i].name)); 4626 mixedPieces.push(regexEscape(eras[i].abbr)); 4627 mixedPieces.push(regexEscape(eras[i].narrow)); 4628 } 4629 4630 this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); 4631 this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i'); 4632 this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i'); 4633 this._erasNarrowRegex = new RegExp( 4634 '^(' + narrowPieces.join('|') + ')', 4635 'i' 4636 ); 4637 } 4638 4639 // FORMATTING 4640 4641 addFormatToken(0, ['gg', 2], 0, function () { 4642 return this.weekYear() % 100; 4643 }); 4644 4645 addFormatToken(0, ['GG', 2], 0, function () { 4646 return this.isoWeekYear() % 100; 4647 }); 4648 4649 function addWeekYearFormatToken(token, getter) { 4650 addFormatToken(0, [token, token.length], 0, getter); 4651 } 4652
4653 addWeekYearFormatToken('gggg', 'weekYear'); 4654 addWeekYearFormatToken('ggggg', 'weekYear'); 4655 addWeekYearFormatToken('GGGG', 'isoWeekYear'); 4656 addWeekYearFormatToken('GGGGG', 'isoWeekYear'); 4657 4658 // ALIASES 4659 4660 addUnitAlias('weekYear', 'gg'); 4661 addUnitAlias('isoWeekYear', 'GG'); 4662 4663 // PRIORITY 4664 4665 addUnitPriority('weekYear', 1); 4666 addUnitPriority('isoWeekYear', 1); 4667 4668 // PARSING 4669 4670 addRegexToken('G', matchSigned); 4671 addRegexToken('g', matchSigned); 4672 addRegexToken('GG', match1to2, match2); 4673 addRegexToken('gg', match1to2, match2); 4674 addRegexToken('GGGG', match1to4, match4); 4675 addRegexToken('gggg', match1to4, match4); 4676 addRegexToken('GGGGG', match1to6, match6); 4677 addRegexToken('ggggg', match1to6, match6); 4678 4679 addWeekParseToken( 4680 ['gggg', 'ggggg', 'GGGG', 'GGGGG'], 4681 function (input, week, config, token) { 4682 week[token.substr(0, 2)] = toInt(input); 4683 } 4684
vendor: 29,543 bytes, lines 4684-5707
4684); 4685 4686 addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { 4687 week[token] = hooks.parseTwoDigitYear(input); 4688 }); 4689 4690 // MOMENTS 4691 4692 function getSetWeekYear(input) { 4693 return getSetWeekYearHelper.call( 4694 this, 4695 input, 4696 this.week(), 4697 this.weekday(), 4698 this.localeData()._week.dow, 4699 this.localeData()._week.doy 4700 ); 4701 } 4702 4703 function getSetISOWeekYear(input) { 4704 return getSetWeekYearHelper.call( 4705 this, 4706 input, 4707 this.isoWeek(), 4708 this.isoWeekday(), 4709 1, 4710 4 4711 ); 4712 } 4713 4714 function getISOWeeksInYear() { 4715 return weeksInYear(this.year(), 1, 4); 4716 } 4717 4718 function getISOWeeksInISOWeekYear() { 4719 return weeksInYear(this.isoWeekYear(), 1, 4); 4720 } 4721 4722 function getWeeksInYear() { 4723 var weekInfo = this.localeData()._week; 4724 return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); 4725 } 4726 4727 function getWeeksInWeekYear() { 4728 var weekInfo = this.localeData()._week; 4729 return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy); 4730 } 4731 4732 function getSetWeekYearHelper(input, week, weekday, dow, doy) { 4733 var weeksTarget; 4734 if (input == null) { 4735 return weekOfYear(this, dow, doy).year; 4736 } else { 4737 weeksTarget = weeksInYear(input, dow, doy); 4738 if (week > weeksTarget) { 4739 week = weeksTarget; 4740 } 4741 return setWeekAll.call(this, input, week, weekday, dow, doy); 4742 } 4743 } 4744 4745 function setWeekAll(weekYear, week, weekday, dow, doy) { 4746 var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), 4747 date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); 4748 4749 this.year(date.getUTCFullYear()); 4750 this.month(date.getUTCMonth()); 4751 this.date(date.getUTCDate()); 4752 return this; 4753 } 4754 4755 // FORMATTING 4756 4757 addFormatToken('Q', 0, 'Qo', 'quarter'); 4758 4759 // ALIASES 4760 4761 addUnitAlias('quarter', 'Q'); 4762 4763 // PRIORITY 4764 4765 addUnitPriority('quarter', 7); 4766 4767 // PARSING 4768 4769 addRegexToken('Q', match1); 4770 addParseToken('Q', function (input, array) { 4771 array[MONTH] = (toInt(input) - 1) * 3; 4772 }); 4773 4774 // MOMENTS 4775 4776 function getSetQuarter(input) { 4777 return input == null 4778 ? Math.ceil((this.month() + 1) / 3) 4779 : this.month((input - 1) * 3 + (this.month() % 3)); 4780 } 4781 4782 // FORMATTING 4783 4784 addFormatToken('D', ['DD', 2], 'Do', 'date'); 4785 4786 // ALIASES 4787 4788 addUnitAlias('date', 'D'); 4789 4790 // PRIORITY 4791 addUnitPriority('date', 9); 4792 4793 // PARSING 4794 4795 addRegexToken('D', match1to2); 4796 addRegexToken('DD', match1to2, match2); 4797 addRegexToken('Do', function (isStrict, locale) { 4798 // TODO: Remove "ordinalParse" fallback in next major release. 4799 return isStrict 4800 ? locale._dayOfMonthOrdinalParse || locale._ordinalParse 4801 : locale._dayOfMonthOrdinalParseLenient; 4802 }); 4803 4804 addParseToken(['D', 'DD'], DATE); 4805 addParseToken('Do', function (input, array) { 4806 array[DATE] = toInt(input.match(match1to2)[0]); 4807 }); 4808 4809 // MOMENTS 4810 4811 var getSetDayOfMonth = makeGetSet('Date', true); 4812 4813 // FORMATTING 4814 4815 addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); 4816 4817 // ALIASES 4818 4819 addUnitAlias('dayOfYear', 'DDD'); 4820 4821 // PRIORITY 4822 addUnitPriority('dayOfYear', 4); 4823 4824 // PARSING 4825 4826 addRegexToken('DDD', match1to3); 4827 addRegexToken('DDDD', match3); 4828 addParseToken(['DDD', 'DDDD'], function (input, array, config) { 4829 config._dayOfYear = toInt(input); 4830 }); 4831 4832 // HELPERS 4833 4834 // MOMENTS 4835 4836 function getSetDayOfYear(input) { 4837 var dayOfYear = 4838 Math.round( 4839 (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5 4840 ) + 1; 4841 return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); 4842 } 4843 4844 // FORMATTING 4845 4846 addFormatToken('m', ['mm', 2], 0, 'minute'); 4847 4848 // ALIASES 4849 4850 addUnitAlias('minute', 'm'); 4851 4852 // PRIORITY 4853 4854 addUnitPriority('minute', 14); 4855 4856 // PARSING 4857 4858 addRegexToken('m', match1to2); 4859 addRegexToken('mm', match1to2, match2); 4860 addParseToken(['m', 'mm'], MINUTE); 4861 4862 // MOMENTS 4863 4864 var getSetMinute = makeGetSet('Minutes', false); 4865 4866 // FORMATTING 4867 4868 addFormatToken('s', ['ss', 2], 0, 'second'); 4869 4870 // ALIASES 4871 4872 addUnitAlias('second', 's'); 4873 4874 // PRIORITY 4875 4876 addUnitPriority('second', 15); 4877 4878 // PARSING 4879 4880 addRegexToken('s', match1to2); 4881 addRegexToken('ss', match1to2, match2); 4882 addParseToken(['s', 'ss'], SECOND); 4883 4884 // MOMENTS 4885 4886 var getSetSecond = makeGetSet('Seconds', false); 4887 4888 // FORMATTING 4889 4890 addFormatToken('S', 0, 0, function () { 4891 return ~~(this.millisecond() / 100); 4892 }); 4893 4894 addFormatToken(0, ['SS', 2], 0, function () { 4895 return ~~(this.millisecond() / 10); 4896 }); 4897 4898 addFormatToken(0, ['SSS', 3], 0, 'millisecond'); 4899 addFormatToken(0, ['SSSS', 4], 0, function () { 4900 return this.millisecond() * 10; 4901 }); 4902 addFormatToken(0, ['SSSSS', 5], 0, function () { 4903 return this.millisecond() * 100; 4904 }); 4905 addFormatToken(0, ['SSSSSS', 6], 0, function () { 4906 return this.millisecond() * 1000; 4907 }); 4908 addFormatToken(0, ['SSSSSSS', 7], 0, function () { 4909 return this.millisecond() * 10000; 4910 }); 4911 addFormatToken(0, ['SSSSSSSS', 8], 0, function () { 4912 return this.millisecond() * 100000; 4913 }); 4914 addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { 4915 return this.millisecond() * 1000000; 4916 }); 4917 4918 // ALIASES 4919 4920 addUnitAlias('millisecond', 'ms'); 4921 4922 // PRIORITY 4923 4924 addUnitPriority('millisecond', 16); 4925 4926 // PARSING 4927 4928 addRegexToken('S', match1to3, match1); 4929 addRegexToken('SS', match1to3, match2); 4930 addRegexToken('SSS', match1to3, match3); 4931 4932 var token, getSetMillisecond; 4933 for (token = 'SSSS'; token.length <= 9; token += 'S') { 4934 addRegexToken(token, matchUnsigned); 4935 } 4936 4937 function parseMs(input, array) { 4938 array[MILLISECOND] = toInt(('0.' + input) * 1000); 4939 } 4940 4941 for (token = 'S'; token.length <= 9; token += 'S') { 4942 addParseToken(token, parseMs); 4943 } 4944 4945 getSetMillisecond = makeGetSet('Milliseconds', false); 4946 4947 // FORMATTING 4948 4949 addFormatToken('z', 0, 0, 'zoneAbbr'); 4950 addFormatToken('zz', 0, 0, 'zoneName'); 4951 4952 // MOMENTS 4953 4954 function getZoneAbbr() { 4955 return this._isUTC ? 'UTC' : ''; 4956 } 4957 4958 function getZoneName() { 4959 return this._isUTC ? 'Coordinated Universal Time' : ''; 4960 } 4961 4962 var proto = Moment.prototype; 4963 4964 proto.add = add; 4965 proto.calendar = calendar$1; 4966 proto.clone = clone; 4967 proto.diff = diff; 4968 proto.endOf = endOf; 4969 proto.format = format; 4970 proto.from = from; 4971 proto.fromNow = fromNow; 4972 proto.to = to; 4973 proto.toNow = toNow; 4974 proto.get = stringGet; 4975 proto.invalidAt = invalidAt; 4976 proto.isAfter = isAfter; 4977 proto.isBefore = isBefore; 4978 proto.isBetween = isBetween; 4979 proto.isSame = isSame; 4980 proto.isSameOrAfter = isSameOrAfter; 4981 proto.isSameOrBefore = isSameOrBefore; 4982 proto.isValid = isValid$2; 4983 proto.lang = lang; 4984 proto.locale = locale; 4985 proto.localeData = localeData; 4986 proto.max = prototypeMax; 4987 proto.min = prototypeMin; 4988 proto.parsingFlags = parsingFlags; 4989 proto.set = stringSet; 4990 proto.startOf = startOf; 4991 proto.subtract = subtract; 4992 proto.toArray = toArray; 4993 proto.toObject = toObject; 4994 proto.toDate = toDate; 4995 proto.toISOString = toISOString; 4996 proto.inspect = inspect; 4997 if (typeof Symbol !== 'undefined' && Symbol.for != null) { 4998 proto[Symbol.for('nodejs.util.inspect.custom')] = function () { 4999 return 'Moment<' + this.format() + '>'; 5000 }; 5001 } 5002 proto.toJSON = toJSON; 5003 proto.toString = toString; 5004 proto.unix = unix; 5005 proto.valueOf = valueOf; 5006 proto.creationData = creationData; 5007 proto.eraName = getEraName; 5008 proto.eraNarrow = getEraNarrow; 5009 proto.eraAbbr = getEraAbbr; 5010 proto.eraYear = getEraYear; 5011 proto.year = getSetYear; 5012 proto.isLeapYear = getIsLeapYear; 5013 proto.weekYear = getSetWeekYear; 5014 proto.isoWeekYear = getSetISOWeekYear; 5015 proto.quarter = proto.quarters = getSetQuarter; 5016 proto.month = getSetMonth; 5017 proto.daysInMonth = getDaysInMonth; 5018 proto.week = proto.weeks = getSetWeek; 5019 proto.isoWeek = proto.isoWeeks = getSetISOWeek; 5020 proto.weeksInYear = getWeeksInYear; 5021 proto.weeksInWeekYear = getWeeksInWeekYear; 5022 proto.isoWeeksInYear = getISOWeeksInYear; 5023 proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear; 5024 proto.date = getSetDayOfMonth; 5025 proto.day = proto.days = getSetDayOfWeek; 5026 proto.weekday = getSetLocaleDayOfWeek; 5027 proto.isoWeekday = getSetISODayOfWeek; 5028 proto.dayOfYear = getSetDayOfYear; 5029 proto.hour = proto.hours = getSetHour; 5030 proto.minute = proto.minutes = getSetMinute; 5031 proto.second = proto.seconds = getSetSecond; 5032 proto.millisecond = proto.milliseconds = getSetMillisecond; 5033 proto.utcOffset = getSetOffset; 5034 proto.utc = setOffsetToUTC; 5035 proto.local = setOffsetToLocal; 5036 proto.parseZone = setOffsetToParsedOffset; 5037 proto.hasAlignedHourOffset = hasAlignedHourOffset; 5038 proto.isDST = isDaylightSavingTime; 5039 proto.isLocal = isLocal; 5040 proto.isUtcOffset = isUtcOffset; 5041 proto.isUtc = isUtc; 5042 proto.isUTC = isUtc; 5043 proto.zoneAbbr = getZoneAbbr; 5044 proto.zoneName = getZoneName; 5045 proto.dates = deprecate( 5046 'dates accessor is deprecated. Use date instead.', 5047 getSetDayOfMonth 5048 ); 5049 proto.months = deprecate( 5050 'months accessor is deprecated. Use month instead', 5051 getSetMonth 5052 ); 5053 proto.years = deprecate( 5054 'years accessor is deprecated. Use year instead', 5055 getSetYear 5056 ); 5057 proto.zone = deprecate( 5058 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', 5059 getSetZone 5060 ); 5061 proto.isDSTShifted = deprecate( 5062 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', 5063 isDaylightSavingTimeShifted 5064 ); 5065 5066 function createUnix(input) { 5067 return createLocal(input * 1000); 5068 } 5069 5070 function createInZone() { 5071 return createLocal.apply(null, arguments).parseZone(); 5072 } 5073 5074 function preParsePostFormat(string) { 5075 return string; 5076 } 5077 5078 var proto$1 = Locale.prototype; 5079 5080 proto$1.calendar = calendar; 5081 proto$1.longDateFormat = longDateFormat; 5082 proto$1.invalidDate = invalidDate; 5083 proto$1.ordinal = ordinal; 5084 proto$1.preparse = preParsePostFormat; 5085 proto$1.postformat = preParsePostFormat; 5086 proto$1.relativeTime = relativeTime; 5087 proto$1.pastFuture = pastFuture; 5088 proto$1.set = set; 5089 proto$1.eras = localeEras; 5090 proto$1.erasParse = localeErasParse; 5091 proto$1.erasConvertYear = localeErasConvertYear; 5092 proto$1.erasAbbrRegex = erasAbbrRegex; 5093 proto$1.erasNameRegex = erasNameRegex; 5094 proto$1.erasNarrowRegex = erasNarrowRegex; 5095 5096 proto$1.months = localeMonths; 5097 proto$1.monthsShort = localeMonthsShort; 5098 proto$1.monthsParse = localeMonthsParse; 5099 proto$1.monthsRegex = monthsRegex; 5100 proto$1.monthsShortRegex = monthsShortRegex; 5101 proto$1.week = localeWeek; 5102 proto$1.firstDayOfYear = localeFirstDayOfYear; 5103 proto$1.firstDayOfWeek = localeFirstDayOfWeek; 5104 5105 proto$1.weekdays = localeWeekdays; 5106 proto$1.weekdaysMin = localeWeekdaysMin; 5107 proto$1.weekdaysShort = localeWeekdaysShort; 5108 proto$1.weekdaysParse = localeWeekdaysParse; 5109 5110 proto$1.weekdaysRegex = weekdaysRegex; 5111 proto$1.weekdaysShortRegex = weekdaysShortRegex; 5112 proto$1.weekdaysMinRegex = weekdaysMinRegex; 5113 5114 proto$1.isPM = localeIsPM; 5115 proto$1.meridiem = localeMeridiem; 5116 5117 function get$1(format, index, field, setter) { 5118 var locale = getLocale(), 5119 utc = createUTC().set(setter, index); 5120 return locale[field](utc, format); 5121 } 5122 5123 function listMonthsImpl(format, index, field) { 5124 if (isNumber(format)) { 5125 index = format; 5126 format = undefined; 5127 } 5128 5129 format = format || ''; 5130 5131 if (index != null) { 5132 return get$1(format, index, field, 'month'); 5133 } 5134 5135 var i, 5136 out = []; 5137 for (i = 0; i < 12; i++) { 5138 out[i] = get$1(format, i, field, 'month'); 5139 } 5140 return out; 5141 } 5142 5143 // () 5144 // (5) 5145 // (fmt, 5) 5146 // (fmt) 5147 // (true) 5148 // (true, 5) 5149 // (true, fmt, 5) 5150 // (true, fmt) 5151 function listWeekdaysImpl(localeSorted, format, index, field) { 5152 if (typeof localeSorted === 'boolean') { 5153 if (isNumber(format)) { 5154 index = format; 5155 format = undefined; 5156 } 5157 5158 format = format || ''; 5159 } else { 5160 format = localeSorted; 5161 index = format; 5162 localeSorted = false; 5163 5164 if (isNumber(format)) { 5165 index = format; 5166 format = undefined; 5167 } 5168 5169 format = format || ''; 5170 } 5171 5172 var locale = getLocale(), 5173 shift = localeSorted ? locale._week.dow : 0, 5174 i, 5175 out = []; 5176 5177 if (index != null) { 5178 return get$1(format, (index + shift) % 7, field, 'day'); 5179 } 5180 5181 for (i = 0; i < 7; i++) { 5182 out[i] = get$1(format, (i + shift) % 7, field, 'day'); 5183 } 5184 return out; 5185 } 5186 5187 function listMonths(format, index) { 5188 return listMonthsImpl(format, index, 'months'); 5189 } 5190 5191 function listMonthsShort(format, index) { 5192 return listMonthsImpl(format, index, 'monthsShort'); 5193 } 5194 5195 function listWeekdays(localeSorted, format, index) { 5196 return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); 5197 } 5198 5199 function listWeekdaysShort(localeSorted, format, index) { 5200 return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); 5201 } 5202 5203 function listWeekdaysMin(localeSorted, format, index) { 5204 return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); 5205 } 5206 5207 getSetGlobalLocale('en', { 5208 eras: [ 5209 { 5210 since: '0001-01-01', 5211 until: +Infinity, 5212 offset: 1, 5213 name: 'Anno Domini', 5214 narrow: 'AD', 5215 abbr: 'AD', 5216 }, 5217 { 5218 since: '0000-12-31', 5219 until: -Infinity, 5220 offset: 1, 5221 name: 'Before Christ', 5222 narrow: 'BC', 5223 abbr: 'BC', 5224 }, 5225 ], 5226 dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, 5227 ordinal: function (number) { 5228 var b = number % 10, 5229 output = 5230 toInt((number % 100) / 10) === 1 5231 ? 'th' 5232 : b === 1 5233 ? 'st' 5234 : b === 2 5235 ? 'nd' 5236 : b === 3 5237 ? 'rd' 5238 : 'th'; 5239 return number + output; 5240 }, 5241 }); 5242 5243 // Side effect imports 5244 5245 hooks.lang = deprecate( 5246 'moment.lang is deprecated. Use moment.locale instead.', 5247 getSetGlobalLocale 5248 ); 5249 hooks.langData = deprecate( 5250 'moment.langData is deprecated. Use moment.localeData instead.', 5251 getLocale 5252 ); 5253 5254 var mathAbs = Math.abs; 5255 5256 function abs() { 5257 var data = this._data; 5258 5259 this._milliseconds = mathAbs(this._milliseconds); 5260 this._days = mathAbs(this._days); 5261 this._months = mathAbs(this._months); 5262 5263 data.milliseconds = mathAbs(data.milliseconds); 5264 data.seconds = mathAbs(data.seconds); 5265 data.minutes = mathAbs(data.minutes); 5266 data.hours = mathAbs(data.hours); 5267 data.months = mathAbs(data.months); 5268 data.years = mathAbs(data.years); 5269 5270 return this; 5271 } 5272 5273 function addSubtract$1(duration, input, value, direction) { 5274 var other = createDuration(input, value); 5275 5276 duration._milliseconds += direction * other._milliseconds; 5277 duration._days += direction * other._days; 5278 duration._months += direction * other._months; 5279 5280 return duration._bubble(); 5281 } 5282 5283 // supports only 2.0-style add(1, 's') or add(duration) 5284 function add$1(input, value) { 5285 return addSubtract$1(this, input, value, 1); 5286 } 5287 5288 // supports only 2.0-style subtract(1, 's') or subtract(duration) 5289 function subtract$1(input, value) { 5290 return addSubtract$1(this, input, value, -1); 5291 } 5292 5293 function absCeil(number) { 5294 if (number < 0) { 5295 return Math.floor(number); 5296 } else { 5297 return Math.ceil(number); 5298 } 5299 } 5300 5301 function bubble() { 5302 var milliseconds = this._milliseconds, 5303 days = this._days, 5304 months = this._months, 5305 data = this._data, 5306 seconds, 5307 minutes, 5308 hours, 5309 years, 5310 monthsFromDays; 5311 5312 // if we have a mix of positive and negative values, bubble down first 5313 // check: https://github.com/moment/moment/issues/2166 5314 if ( 5315 !( 5316 (milliseconds >= 0 && days >= 0 && months >= 0) || 5317 (milliseconds <= 0 && days <= 0 && months <= 0) 5318 ) 5319 ) { 5320 milliseconds += absCeil(monthsToDays(months) + days) * 864e5; 5321 days = 0; 5322 months = 0; 5323 } 5324 5325 // The following code bubbles up values, see the tests for 5326 // examples of what that means. 5327 data.milliseconds = milliseconds % 1000; 5328 5329 seconds = absFloor(milliseconds / 1000); 5330 data.seconds = seconds % 60; 5331 5332 minutes = absFloor(seconds / 60); 5333 data.minutes = minutes % 60; 5334 5335 hours = absFloor(minutes / 60); 5336 data.hours = hours % 24; 5337 5338 days += absFloor(hours / 24); 5339 5340 // convert days to months 5341 monthsFromDays = absFloor(daysToMonths(days)); 5342 months += monthsFromDays; 5343 days -= absCeil(monthsToDays(monthsFromDays)); 5344 5345 // 12 months -> 1 year 5346 years = absFloor(months / 12); 5347 months %= 12; 5348 5349 data.days = days; 5350 data.months = months; 5351 data.years = years; 5352 5353 return this; 5354 } 5355 5356 function daysToMonths(days) { 5357 // 400 years have 146097 days (taking into account leap year rules) 5358 // 400 years have 12 months === 4800 5359 return (days * 4800) / 146097; 5360 } 5361 5362 function monthsToDays(months) { 5363 // the reverse of daysToMonths 5364 return (months * 146097) / 4800; 5365 } 5366 5367 function as(units) { 5368 if (!this.isValid()) { 5369 return NaN; 5370 } 5371 var days, 5372 months, 5373 milliseconds = this._milliseconds; 5374 5375 units = normalizeUnits(units); 5376 5377 if (units === 'month' || units === 'quarter' || units === 'year') { 5378 days = this._days + milliseconds / 864e5; 5379 months = this._months + daysToMonths(days); 5380 switch (units) { 5381 case 'month': 5382 return months; 5383 case 'quarter': 5384 return months / 3; 5385 case 'year': 5386 return months / 12; 5387 } 5388 } else { 5389 // handle milliseconds separately because of floating point math errors (issue #1867) 5390 days = this._days + Math.round(monthsToDays(this._months)); 5391 switch (units) { 5392 case 'week': 5393 return days / 7 + milliseconds / 6048e5; 5394 case 'day': 5395 return days + milliseconds / 864e5; 5396 case 'hour': 5397 return days * 24 + milliseconds / 36e5; 5398 case 'minute': 5399 return days * 1440 + milliseconds / 6e4; 5400 case 'second': 5401 return days * 86400 + milliseconds / 1000; 5402 // Math.floor prevents floating point math errors here 5403 case 'millisecond': 5404 return Math.floor(days * 864e5) + milliseconds; 5405 default: 5406 throw new Error('Unknown unit ' + units); 5407 } 5408 } 5409 } 5410 5411 // TODO: Use this.as('ms')? 5412 function valueOf$1() { 5413 if (!this.isValid()) { 5414 return NaN; 5415 } 5416 return ( 5417 this._milliseconds + 5418 this._days * 864e5 + 5419 (this._months % 12) * 2592e6 + 5420 toInt(this._months / 12) * 31536e6 5421 ); 5422 } 5423 5424 function makeAs(alias) { 5425 return function () { 5426 return this.as(alias); 5427 }; 5428 } 5429 5430 var asMilliseconds = makeAs('ms'), 5431 asSeconds = makeAs('s'), 5432 asMinutes = makeAs('m'), 5433 asHours = makeAs('h'), 5434 asDays = makeAs('d'), 5435 asWeeks = makeAs('w'), 5436 asMonths = makeAs('M'), 5437 asQuarters = makeAs('Q'), 5438 asYears = makeAs('y'); 5439 5440 function clone$1() { 5441 return createDuration(this); 5442 } 5443 5444 function get$2(units) { 5445 units = normalizeUnits(units); 5446 return this.isValid() ? this[units + 's']() : NaN; 5447 } 5448 5449 function makeGetter(name) { 5450 return function () { 5451 return this.isValid() ? this._data[name] : NaN; 5452 }; 5453 } 5454 5455 var milliseconds = makeGetter('milliseconds'), 5456 seconds = makeGetter('seconds'), 5457 minutes = makeGetter('minutes'), 5458 hours = makeGetter('hours'), 5459 days = makeGetter('days'), 5460 months = makeGetter('months'), 5461 years = makeGetter('years'); 5462 5463 function weeks() { 5464 return absFloor(this.days() / 7); 5465 } 5466 5467 var round = Math.round, 5468 thresholds = { 5469 ss: 44, // a few seconds to seconds 5470 s: 45, // seconds to minute 5471 m: 45, // minutes to hour 5472 h: 22, // hours to day 5473 d: 26, // days to month/week 5474 w: null, // weeks to month 5475 M: 11, // months to year 5476 }; 5477 5478 // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize 5479 function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { 5480 return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); 5481 } 5482 5483 function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) { 5484 var duration = createDuration(posNegDuration).abs(), 5485 seconds = round(duration.as('s')), 5486 minutes = round(duration.as('m')), 5487 hours = round(duration.as('h')), 5488 days = round(duration.as('d')), 5489 months = round(duration.as('M')), 5490 weeks = round(duration.as('w')), 5491 years = round(duration.as('y')), 5492 a = 5493 (seconds <= thresholds.ss && ['s', seconds]) || 5494 (seconds < thresholds.s && ['ss', seconds]) || 5495 (minutes <= 1 && ['m']) || 5496 (minutes < thresholds.m && ['mm', minutes]) || 5497 (hours <= 1 && ['h']) || 5498 (hours < thresholds.h && ['hh', hours]) || 5499 (days <= 1 && ['d']) || 5500 (days < thresholds.d && ['dd', days]); 5501 5502 if (thresholds.w != null) { 5503 a = 5504 a || 5505 (weeks <= 1 && ['w']) || 5506 (weeks < thresholds.w && ['ww', weeks]); 5507 } 5508 a = a || 5509 (months <= 1 && ['M']) || 5510 (months < thresholds.M && ['MM', months]) || 5511 (years <= 1 && ['y']) || ['yy', years]; 5512 5513 a[2] = withoutSuffix; 5514 a[3] = +posNegDuration > 0; 5515 a[4] = locale; 5516 return substituteTimeAgo.apply(null, a); 5517 } 5518 5519 // This function allows you to set the rounding function for relative time strings 5520 function getSetRelativeTimeRounding(roundingFunction) { 5521 if (roundingFunction === undefined) { 5522 return round; 5523 } 5524 if (typeof roundingFunction === 'function') { 5525 round = roundingFunction; 5526 return true; 5527 } 5528 return false; 5529 } 5530 5531 // This function allows you to set a threshold for relative time strings 5532 function getSetRelativeTimeThreshold(threshold, limit) { 5533 if (thresholds[threshold] === undefined) { 5534 return false; 5535 } 5536 if (limit === undefined) { 5537 return thresholds[threshold]; 5538 } 5539 thresholds[threshold] = limit; 5540 if (threshold === 's') { 5541 thresholds.ss = limit - 1; 5542 } 5543 return true; 5544 } 5545 5546 function humanize(argWithSuffix, argThresholds) { 5547 if (!this.isValid()) { 5548 return this.localeData().invalidDate(); 5549 } 5550 5551 var withSuffix = false, 5552 th = thresholds, 5553 locale, 5554 output; 5555 5556 if (typeof argWithSuffix === 'object') { 5557 argThresholds = argWithSuffix; 5558 argWithSuffix = false; 5559 } 5560 if (typeof argWithSuffix === 'boolean') { 5561 withSuffix = argWithSuffix; 5562 } 5563 if (typeof argThresholds === 'object') { 5564 th = Object.assign({}, thresholds, argThresholds); 5565 if (argThresholds.s != null && argThresholds.ss == null) { 5566 th.ss = argThresholds.s - 1; 5567 } 5568 } 5569 5570 locale = this.localeData(); 5571 output = relativeTime$1(this, !withSuffix, th, locale); 5572 5573 if (withSuffix) { 5574 output = locale.pastFuture(+this, output); 5575 } 5576 5577 return locale.postformat(output); 5578 } 5579 5580 var abs$1 = Math.abs; 5581 5582 function sign(x) { 5583 return (x > 0) - (x < 0) || +x; 5584 } 5585 5586 function toISOString$1() { 5587 // for ISO strings we do not use the normal bubbling rules: 5588 // * milliseconds bubble up until they become hours 5589 // * days do not bubble at all 5590 // * months bubble up until they become years 5591 // This is because there is no context-free conversion between hours and days 5592 // (think of clock changes) 5593 // and also not between days and months (28-31 days per month) 5594 if (!this.isValid()) { 5595 return this.localeData().invalidDate(); 5596 } 5597 5598 var seconds = abs$1(this._milliseconds) / 1000, 5599 days = abs$1(this._days), 5600 months = abs$1(this._months), 5601 minutes, 5602 hours, 5603 years, 5604 s, 5605 total = this.asSeconds(), 5606 totalSign, 5607 ymSign, 5608 daysSign, 5609 hmsSign; 5610 5611 if (!total) { 5612 // this is the same as C#'s (Noda) and python (isodate)... 5613 // but not other JS (goog.date) 5614 return 'P0D'; 5615 } 5616 5617 // 3600 seconds -> 60 minutes -> 1 hour 5618 minutes = absFloor(seconds / 60); 5619 hours = absFloor(minutes / 60); 5620 seconds %= 60; 5621 minutes %= 60; 5622 5623 // 12 months -> 1 year 5624 years = absFloor(months / 12); 5625 months %= 12; 5626 5627 // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js 5628 s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; 5629 5630 totalSign = total < 0 ? '-' : ''; 5631 ymSign = sign(this._months) !== sign(total) ? '-' : ''; 5632 daysSign = sign(this._days) !== sign(total) ? '-' : ''; 5633 hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; 5634 5635 return ( 5636 totalSign + 5637 'P' + 5638 (years ? ymSign + years + 'Y' : '') + 5639 (months ? ymSign + months + 'M' : '') + 5640 (days ? daysSign + days + 'D' : '') + 5641 (hours || minutes || seconds ? 'T' : '') + 5642 (hours ? hmsSign + hours + 'H' : '') + 5643 (minutes ? hmsSign + minutes + 'M' : '') + 5644 (seconds ? hmsSign + s + 'S' : '') 5645 ); 5646 } 5647 5648 var proto$2 = Duration.prototype; 5649 5650 proto$2.isValid = isValid$1; 5651 proto$2.abs = abs; 5652 proto$2.add = add$1; 5653 proto$2.subtract = subtract$1; 5654 proto$2.as = as; 5655 proto$2.asMilliseconds = asMilliseconds; 5656 proto$2.asSeconds = asSeconds; 5657 proto$2.asMinutes = asMinutes; 5658 proto$2.asHours = asHours; 5659 proto$2.asDays = asDays; 5660 proto$2.asWeeks = asWeeks; 5661 proto$2.asMonths = asMonths; 5662 proto$2.asQuarters = asQuarters; 5663 proto$2.asYears = asYears; 5664 proto$2.valueOf = valueOf$1; 5665 proto$2._bubble = bubble; 5666 proto$2.clone = clone$1; 5667 proto$2.get = get$2; 5668 proto$2.milliseconds = milliseconds; 5669 proto$2.seconds = seconds; 5670 proto$2.minutes = minutes; 5671 proto$2.hours = hours; 5672 proto$2.days = days; 5673 proto$2.weeks = weeks; 5674 proto$2.months = months; 5675 proto$2.years = years; 5676 proto$2.humanize = humanize; 5677 proto$2.toISOString = toISOString$1; 5678 proto$2.toString = toISOString$1; 5679 proto$2.toJSON = toISOString$1; 5680 proto$2.locale = locale; 5681 proto$2.localeData = localeData; 5682 5683 proto$2.toIsoString = deprecate( 5684 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', 5685 toISOString$1 5686 ); 5687 proto$2.lang = lang; 5688 5689 // FORMATTING 5690 5691 addFormatToken('X', 0, 0, 'unix'); 5692 addFormatToken('x', 0, 0, 'valueOf'); 5693 5694 // PARSING 5695 5696 addRegexToken('x', matchSigned); 5697 addRegexToken('X', matchTimestamp); 5698 addParseToken('X', function (input, array, config) { 5699 config._d = new Date(parseFloat(input) * 1000); 5700 }); 5701 addParseToken('x', function (input, array, config) { 5702 config._d = new Date(toInt(input)); 5703 }); 5704 5705 //! moment.js 5706 5707 hooks.version = '2.2
57079.4'; 5708 5709 setHookCallback(createLocal); 5710 5711 hooks.fn = proto; 5712 hooks.min = min; 5713 hooks.max = max; 5714 hooks.now = now; 5715 hooks.utc = createUTC; 5716 hooks.unix = createUnix; 5717 hooks.months = listMonths; 5718 hooks.isDate = isDate; 5719 hooks.locale = getSetGlobalLocale; 5720 hooks.invalid = createInvalid; 5721 hooks.duration = createDuration; 5722 hooks.isMoment = isMoment; 5723 hooks.weekdays = listWeekdays; 5724 hooks.parseZone = createInZone; 5725 hooks.localeData = getLocale; 5726 hooks.isDuration = isDuration; 5727 hooks.monthsShort = listMonthsShort; 5728 hooks.weekdaysMin = listWeekdaysMin; 5729 hooks.defineLocale = defineLocale; 5730 hooks.updateLocale = updateLocale; 5731 hooks.locales = listLocales; 5732 hooks.weekdaysShort = listWeekdaysShort; 5733 hooks.normalizeUnits = normalizeUnits; 5734 hooks.relativeTimeRounding = getSetRelativeTimeRounding; 5735 hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; 5736 hooks.calendarFormat = getCalendarFormat; 5737 hooks.prototype = proto; 5738 5739 // currently HTML5 input type only supports 24-hour formats 5740 hooks.HTML5_FMT = { 5741 DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" /> 5742 DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" /> 5743 DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" /> 5744 DATE: 'YYYY-MM-DD', // <input type="date" /> 5745 TIME: 'HH:mm', // <input type="time" /> 5746 TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" /> 5747 TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" /> 5748 WEEK: 'GGGG-[W]WW', // <input type="week" /> 5749 MONTH: 'YYYY-MM', // <input type="month" /> 5750 }; 5751 5752 return hooks; 5753 5754}))); 5755 5756/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(153)(module))) 5757 5758/***/ }), 5759/* 1 */ 5760/***/ (function(module, exports) { 5761 5762module.exports = jQuery; 5763 5764/***/ }), 5765/* 2 */ 5766/***/ (function(module, exports, __webpack_require__) { 5767 5768/* @preserve 5769 * Leaflet 1.8.0, a JS library for interactive maps. https://leafletjs.com 5770 * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade 5771 */ 5772 5773(function (global, factory) { 5774 true ? factory(exports) : 5775 typeof define === 'function' && define.amd ? define(['exports'], factory) : 5776 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.leaflet = {})); 5777})(this, (function (exports) { 'use strict'; 5778 5779 var version = "1.8.0
vendor: 13,119 bytes, lines 5779-6168
5779"; 5780 5781 /* 5782 * @namespace Util 5783 * 5784 * Various utility functions, used by Leaflet internally. 5785 */ 5786 5787 // @function extend(dest: Object, src?: Object): Object 5788 // Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut. 5789 function extend(dest) { 5790 var i, j, len, src; 5791 5792 for (j = 1, len = arguments.length; j < len; j++) { 5793 src = arguments[j]; 5794 for (i in src) { 5795 dest[i] = src[i]; 5796 } 5797 } 5798 return dest; 5799 } 5800 5801 // @function create(proto: Object, properties?: Object): Object 5802 // Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create) 5803 var create$2 = Object.create || (function () { 5804 function F() {} 5805 return function (proto) { 5806 F.prototype = proto; 5807 return new F(); 5808 }; 5809 })(); 5810 5811 // @function bind(fn: Function, â¦): Function 5812 // Returns a new function bound to the arguments passed, like [Function.prototype.bind](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). 5813 // Has a `L.bind()` shortcut. 5814 function bind(fn, obj) { 5815 var slice = Array.prototype.slice; 5816 5817 if (fn.bind) { 5818 return fn.bind.apply(fn, slice.call(arguments, 1)); 5819 } 5820 5821 var args = slice.call(arguments, 2); 5822 5823 return function () { 5824 return fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments); 5825 }; 5826 } 5827 5828 // @property lastId: Number 5829 // Last unique ID used by [`stamp()`](#util-stamp) 5830 var lastId = 0; 5831 5832 // @function stamp(obj: Object): Number 5833 // Returns the unique ID of an object, assigning it one if it doesn't have it. 5834 function stamp(obj) { 5835 if (!('_leaflet_id' in obj)) { 5836 obj['_leaflet_id'] = ++lastId; 5837 } 5838 return obj._leaflet_id; 5839 } 5840 5841 // @function throttle(fn: Function, time: Number, context: Object): Function 5842 // Returns a function which executes function `fn` with the given scope `context` 5843 // (so that the `this` keyword refers to `context` inside `fn`'s code). The function 5844 // `fn` will be called no more than one time per given amount of `time`. The arguments 5845 // received by the bound function will be any arguments passed when binding the 5846 // function, followed by any arguments passed when invoking the bound function. 5847 // Has an `L.throttle` shortcut. 5848 function throttle(fn, time, context) { 5849 var lock, args, wrapperFn, later; 5850 5851 later = function () { 5852 // reset lock and call if queued 5853 lock = false; 5854 if (args) { 5855 wrapperFn.apply(context, args); 5856 args = false; 5857 } 5858 }; 5859 5860 wrapperFn = function () { 5861 if (lock) { 5862 // called too soon, queue to call later 5863 args = arguments; 5864 5865 } else { 5866 // call and lock until later 5867 fn.apply(context, arguments); 5868 setTimeout(later, time); 5869 lock = true; 5870 } 5871 }; 5872 5873 return wrapperFn; 5874 } 5875 5876 // @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number 5877 // Returns the number `num` modulo `range` in such a way so it lies within 5878 // `range[0]` and `range[1]`. The returned value will be always smaller than 5879 // `range[1]` unless `includeMax` is set to `true`. 5880 function wrapNum(x, range, includeMax) { 5881 var max = range[1], 5882 min = range[0], 5883 d = max - min; 5884 return x === max && includeMax ? x : ((x - min) % d + d) % d + min; 5885 } 5886 5887 // @function falseFn(): Function 5888 // Returns a function which always returns `false`. 5889 function falseFn() { return false; } 5890 5891 // @function formatNum(num: Number, precision?: Number|false): Number 5892 // Returns the number `num` rounded with specified `precision`. 5893 // The default `precision` value is 6 decimal places. 5894 // `false` can be passed to skip any processing (can be useful to avoid round-off errors). 5895 function formatNum(num, precision) { 5896 if (precision === false) { return num; } 5897 var pow = Math.pow(10, precision === undefined ? 6 : precision); 5898 return Math.round(num * pow) / pow; 5899 } 5900 5901 // @function trim(str: String): String 5902 // Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim) 5903 function trim(str) { 5904 return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); 5905 } 5906 5907 // @function splitWords(str: String): String[] 5908 // Trims and splits the string on whitespace and returns the array of parts. 5909 function splitWords(str) { 5910 return trim(str).split(/\s+/); 5911 } 5912 5913 // @function setOptions(obj: Object, options: Object): Object 5914 // Merges the given properties to the `options` of the `obj` object, returning the resulting options. See `Class options`. Has an `L.setOptions` shortcut. 5915 function setOptions(obj, options) { 5916 if (!Object.prototype.hasOwnProperty.call(obj, 'options')) { 5917 obj.options = obj.options ? create$2(obj.options) : {}; 5918 } 5919 for (var i in options) { 5920 obj.options[i] = options[i]; 5921 } 5922 return obj.options; 5923 } 5924 5925 // @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String 5926 // Converts an object into a parameter URL string, e.g. `{a: "foo", b: "bar"}` 5927 // translates to `'?a=foo&b=bar'`. If `existingUrl` is set, the parameters will 5928 // be appended at the end. If `uppercase` is `true`, the parameter names will 5929 // be uppercased (e.g. `'?A=foo&B=bar'`) 5930 function getParamString(obj, existingUrl, uppercase) { 5931 var params = []; 5932 for (var i in obj) { 5933 params.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i])); 5934 } 5935 return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&'); 5936 } 5937 5938 var templateRe = /\{ *([\w_ -]+) *\}/g; 5939 5940 // @function template(str: String, data: Object): String 5941 // Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'` 5942 // and a data object like `{a: 'foo', b: 'bar'}`, returns evaluated string 5943 // `('Hello foo, bar')`. You can also specify functions instead of strings for 5944 // data values â they will be evaluated passing `data` as an argument. 5945 function template(str, data) { 5946 return str.replace(templateRe, function (str, key) { 5947 var value = data[key]; 5948 5949 if (value === undefined) { 5950 throw new Error('No value provided for variable ' + str); 5951 5952 } else if (typeof value === 'function') { 5953 value = value(data); 5954 } 5955 return value; 5956 }); 5957 } 5958 5959 // @function isArray(obj): Boolean 5960 // Compatibility polyfill for [Array.isArray](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray) 5961 var isArray = Array.isArray || function (obj) { 5962 return (Object.prototype.toString.call(obj) === '[object Array]'); 5963 }; 5964 5965 // @function indexOf(array: Array, el: Object): Number 5966 // Compatibility polyfill for [Array.prototype.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) 5967 function indexOf(array, el) { 5968 for (var i = 0; i < array.length; i++) { 5969 if (array[i] === el) { return i; } 5970 } 5971 return -1; 5972 } 5973 5974 // @property emptyImageUrl: String 5975 // Data URI string containing a base64-encoded empty GIF image. 5976 // Used as a hack to free memory from unused images on WebKit-powered 5977 // mobile devices (by setting image `src` to this string). 5978 var emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='; 5979 5980 // inspired by https://paulirish.com/2011/requestanimationframe-for-smart-animating/ 5981 5982 function getPrefixed(name) { 5983 return window['webkit' + name] || window['moz' + name] || window['ms' + name]; 5984 } 5985 5986 var lastTime = 0; 5987 5988 // fallback for IE 7-8 5989 function timeoutDefer(fn) { 5990 var time = +new Date(), 5991 timeToCall = Math.max(0, 16 - (time - lastTime)); 5992 5993 lastTime = time + timeToCall; 5994 return window.setTimeout(fn, timeToCall); 5995 } 5996 5997 var requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer; 5998 var cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') || 5999 getPrefixed('CancelRequestAnimationFrame') || function (id) { window.clearTimeout(id); }; 6000 6001 // @function requestAnimFrame(fn: Function, context?: Object, immediate?: Boolean): Number 6002 // Schedules `fn` to be executed when the browser repaints. `fn` is bound to 6003 // `context` if given. When `immediate` is set, `fn` is called immediately if 6004 // the browser doesn't have native support for 6005 // [`window.requestAnimationFrame`](https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame), 6006 // otherwise it's delayed. Returns a request ID that can be used to cancel the request. 6007 function requestAnimFrame(fn, context, immediate) { 6008 if (immediate && requestFn === timeoutDefer) { 6009 fn.call(context); 6010 } else { 6011 return requestFn.call(window, bind(fn, context)); 6012 } 6013 } 6014 6015 // @function cancelAnimFrame(id: Number): undefined 6016 // Cancels a previous `requestAnimFrame`. See also [window.cancelAnimationFrame](https://developer.mozilla.org/docs/Web/API/window/cancelAnimationFrame). 6017 function cancelAnimFrame(id) { 6018 if (id) { 6019 cancelFn.call(window, id); 6020 } 6021 } 6022 6023 var Util = { 6024 __proto__: null, 6025 extend: extend, 6026 create: create$2, 6027 bind: bind, 6028 get lastId () { return lastId; }, 6029 stamp: stamp, 6030 throttle: throttle, 6031 wrapNum: wrapNum, 6032 falseFn: falseFn, 6033 formatNum: formatNum, 6034 trim: trim, 6035 splitWords: splitWords, 6036 setOptions: setOptions, 6037 getParamString: getParamString, 6038 template: template, 6039 isArray: isArray, 6040 indexOf: indexOf, 6041 emptyImageUrl: emptyImageUrl, 6042 requestFn: requestFn, 6043 cancelFn: cancelFn, 6044 requestAnimFrame: requestAnimFrame, 6045 cancelAnimFrame: cancelAnimFrame 6046 }; 6047 6048 // @class Class 6049 // @aka L.Class 6050 6051 // @section 6052 // @uninheritable 6053 6054 // Thanks to John Resig and Dean Edwards for inspiration! 6055 6056 function Class() {} 6057 6058 Class.extend = function (props) { 6059 6060 // @function extend(props: Object): Function 6061 // [Extends the current class](#class-inheritance) given the properties to be included. 6062 // Returns a Javascript function that is a class constructor (to be called with `new`). 6063 var NewClass = function () { 6064 6065 setOptions(this); 6066 6067 // call the constructor 6068 if (this.initialize) { 6069 this.initialize.apply(this, arguments); 6070 } 6071 6072 // call all constructor hooks 6073 this.callInitHooks(); 6074 }; 6075 6076 var parentProto = NewClass.__super__ = this.prototype; 6077 6078 var proto = create$2(parentProto); 6079 proto.constructor = NewClass; 6080 6081 NewClass.prototype = proto; 6082 6083 // inherit parent's statics 6084 for (var i in this) { 6085 if (Object.prototype.hasOwnProperty.call(this, i) && i !== 'prototype' && i !== '__super__') { 6086 NewClass[i] = this[i]; 6087 } 6088 } 6089 6090 // mix static properties into the class 6091 if (props.statics) { 6092 extend(NewClass, props.statics); 6093 } 6094 6095 // mix includes into the prototype 6096 if (props.includes) { 6097 checkDeprecatedMixinEvents(props.includes); 6098 extend.apply(null, [proto].concat(props.includes)); 6099 } 6100 6101 // mix given properties into the prototype 6102 extend(proto, props); 6103 delete proto.statics; 6104 delete proto.includes; 6105 6106 // merge options 6107 if (proto.options) { 6108 proto.options = parentProto.options ? create$2(parentProto.options) : {}; 6109 extend(proto.options, props.options); 6110 } 6111 6112 proto._initHooks = []; 6113 6114 // add method for calling all hooks 6115 proto.callInitHooks = function () { 6116 6117 if (this._initHooksCalled) { return; } 6118 6119 if (parentProto.callInitHooks) { 6120 parentProto.callInitHooks.call(this); 6121 } 6122 6123 this._initHooksCalled = true; 6124 6125 for (var i = 0, len = proto._initHooks.length; i < len; i++) { 6126 proto._initHooks[i].call(this); 6127 } 6128 }; 6129 6130 return NewClass; 6131 }; 6132 6133 6134 // @function include(properties: Object): this 6135 // [Includes a mixin](#class-includes) into the current class. 6136 Class.include = function (props) { 6137 var parentOptions = this.prototype.options; 6138 extend(this.prototype, props); 6139 if (props.options) { 6140 this.prototype.options = parentOptions; 6141 this.mergeOptions(props.options); 6142 } 6143 return this; 6144 }; 6145 6146 // @function mergeOptions(options: Object): this 6147 // [Merges `options`](#class-options) into the defaults of the class. 6148 Class.mergeOptions = function (options) { 6149 extend(this.prototype.options, options); 6150 return this; 6151 }; 6152 6153 // @function addInitHook(fn: Function): this 6154 // Adds a [constructor hook](#class-constructor-hooks) to the class. 6155 Class.addInitHook = function (fn) { // (Function) || (String, args...) 6156 var args = Array.prototype.slice.call(arguments, 1); 6157 6158 var init = typeof fn === 'function' ? fn : function () { 6159 this[fn].apply(this, args); 6160 }; 6161 6162 this.prototype._initHooks = this.prototype._initHooks || []; 6163 this.prototype._initHooks.push(init); 6164 return this; 6165 }; 6166 6167 function checkDeprecatedMixinEvents(includes) { 6168
6168if (typeof L === 'undefined' || !L || !L.Mixin) { return; } 6169 6170 includes = isArray(includes) ? includes : [includes]; 6171 6172 for (var i = 0; i < includes.length; i++) { 6173 if (includes[i] === L.Mixin.Events) {
6174 console.warn('Deprecated include of L.Mixin.Events: ' + 6175 'this property will be removed in future releases, ' + 6176 'please inherit from L.Evented instead.', new Error().stack); 6177 } 6178 } 6179 } 6180 6181 /* 6182 * @class Evented 6183 * @aka L.Evented 6184 * @inherits Class 6185 * 6186 * A set of methods shared between event-powered classes (like `Map` and `Marker`). Generally, events allow you to execute some function when something happens with an object (e.g. the user clicks on the map, causing the map to fire `'click'` event). 6187 * 6188 * @example 6189 * 6190 * ```js 6191 * map.on('click', function(e) { 6192 * alert(e.latlng); 6193 * } ); 6194 * ``` 6195 * 6196 * Leaflet deals with event listeners by reference, so if you want to add a listener and then remove it, define it as a function: 6197 * 6198 * ```js 6199 * function onClick(e) { ... } 6200 * 6201 * map.on('click', onClick); 6202 * map.off('click', onClick); 6203 * ``` 6204 */ 6205 6206 var Events = { 6207 /* @method on(type: String, fn: Function, context?: Object): this 6208 * Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`). 6209 * 6210 * @alternative 6211 * @method on(eventMap: Object): this 6212 * Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}` 6213 */ 6214 on: function (types, fn, context) { 6215 6216 // types can be a map of types/handlers 6217 if (typeof types === 'object') { 6218 for (var type in types) { 6219 // we don't process space-separated events here for performance; 6220 // it's a hot path since Layer uses the on(obj) syntax 6221 this._on(type, types[type], fn); 6222 } 6223 6224 } else { 6225 // types can be a string of space-separated words 6226 types = splitWords(types); 6227 6228 for (var i = 0, len = types.length; i < len; i++) { 6229 this._on(types[i], fn, context); 6230 } 6231 } 6232 6233 return this; 6234 }, 6235 6236 /* @method off(type: String, fn?: Function, context?: Object): this 6237 * Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to `on`, you must pass the same context to `off` in order to remove the listener. 6238 * 6239 * @alternative 6240 * @method off(eventMap: Object): this 6241 * Removes a set of type/listener pairs. 6242 * 6243 * @alternative 6244 * @method off: this 6245 * Removes all listeners to all events on the object. This includes implicitly attached events. 6246 */ 6247 off: function (types, fn, context) { 6248 6249 if (!arguments.length) { 6250 // clear all listeners if called without arguments 6251 delete this._events; 6252 6253 } else if (typeof types === 'object') { 6254 for (var type in types) { 6255 this._off(type, types[type], fn); 6256 } 6257 6258 } else { 6259 types = splitWords(types); 6260 6261 var removeAll = arguments.length === 1; 6262 for (var i = 0, len = types.length; i < len; i++) { 6263 if (removeAll) { 6264 this._off(types[i]); 6265 } else { 6266 this._off(types[i], fn, context); 6267 } 6268 } 6269 } 6270 6271 return this; 6272 }, 6273 6274 // attach listener (without syntactic sugar now) 6275 _on: function (type, fn, context) { 6276 if (typeof fn !== 'function') { 6277 console.warn('wrong listener type: ' + typeof fn); 6278 return; 6279 } 6280 this._events = this._events || {}; 6281 6282 /* get/init listeners for type */ 6283 var typeListeners = this._events[type]; 6284 if (!typeListeners) { 6285 typeListeners = []; 6286 this._events[type] = typeListeners; 6287 } 6288 6289 if (context === this) { 6290 // Less memory footprint. 6291 context = undefined; 6292 } 6293 var newListener = {fn: fn, ctx: context}, 6294 listeners = typeListeners; 6295 6296 // check if fn already there 6297 for (var i = 0, len = listeners.length; i < len; i++) { 6298 if (listeners[i].fn === fn && listeners[i].ctx === context) { 6299 return; 6300 } 6301 } 6302 6303 listeners.push(newListener); 6304 }, 6305 6306 _off: function (type, fn, context) { 6307 var listeners, 6308 i, 6309 len; 6310 6311 if (!this._events) { return; } 6312 6313 listeners = this._events[type]; 6314 6315 if (!listeners) { 6316 return; 6317 } 6318 6319 if (arguments.length === 1) { // remove all 6320 if (this._firingCount) { 6321 // Set all removed listeners to noop 6322 // so they are not called if remove happens in fire 6323 for (i = 0, len = listeners.length; i < len; i++) { 6324 listeners[i].fn = falseFn; 6325 } 6326 } 6327 // clear all listeners for a type if function isn't specified 6328 delete this._events[type]; 6329 return; 6330 } 6331 6332 if (context === this) { 6333 context = undefined; 6334 } 6335 6336 if (typeof fn !== 'function') { 6337 console.warn('wrong listener type: ' + typeof fn); 6338 return; 6339 } 6340 // find fn and remove it 6341 for (i = 0, len = listeners.length; i < len; i++) { 6342 var l = listeners[i];
6343 if (l.ctx !== context) { continue; } 6344 if (l.fn === fn) { 6345 if (this._firingCount) { 6346 // set the removed listener to noop so that's not called if remove happens in fire 6347 l.fn = falseFn; 6348 6349 /* copy array in case events are being fired */ 6350 this._events[type] = listeners = listeners.slice(); 6351 } 6352 listeners.splice(i, 1); 6353 6354 return; 6355 } 6356 } 6357 console.warn('listener not found'); 6358 }, 6359 6360 // @method fire(type: String, data?: Object, propagate?: Boolean): this 6361 // Fires an event of the specified type. You can optionally provide a data 6362 // object â the first argument of the listener function will contain its 6363 // properties. The event can optionally be propagated to event parents. 6364 fire: function (type, data, propagate) { 6365 if (!this.listens(type, propagate)) { return this; } 6366 6367 var event = extend({}, data, { 6368 type: type, 6369 target: this, 6370 sourceTarget: data && data.sourceTarget || this 6371 }); 6372 6373 if (this._events) { 6374 var listeners = this._events[type]; 6375 6376 if (listeners) { 6377 this._firingCount = (this._firingCount + 1) || 1; 6378 for (var i = 0, len = listeners.length; i < len; i++) { 6379 var l = listeners[i]; 6380 l.fn.call(l.ctx || this, event); 6381 } 6382 6383 this._firingCount--; 6384 } 6385 } 6386 6387 if (propagate) { 6388 // propagate the event to parents (set with addEventParent) 6389 this._propagateEvent(event); 6390 } 6391 6392 return this; 6393 }, 6394 6395 // @method listens(type: String, propagate?: Boolean): Boolean 6396 // Returns `true` if a particular event type has any listeners attached to it. 6397 // The verification can optionally be propagated, it will return `true` if parents have the listener attached to it. 6398 listens: function (type, propagate) { 6399 if (typeof type !== 'string') { 6400 console.warn('"string" type argument expected'); 6401 } 6402 var listeners = this._events && this._events[type]; 6403 if (listeners && listeners.length) { return true; } 6404 6405 if (propagate) { 6406 // also check parents for listeners if event propagates 6407 for (var id in this._eventParents) { 6408 if (this._eventParents[id].listens(type, propagate)) { return true; } 6409 } 6410 } 6411 return false; 6412 }, 6413 6414 // @method once(â¦): this 6415 // Behaves as [`on(â¦)`](#evented-on), except the listener will only get fired once and then removed. 6416 once: function (types, fn, context) { 6417 6418 if (typeof types === 'object') { 6419 for (var type in types) { 6420 this.once(type, types[type], fn); 6421 } 6422 return this; 6423 } 6424 6425 var handler = bind(function () { 6426 this 6427 .off(types, fn, context) 6428 .off(types, handler, context); 6429 }, this); 6430 6431 // add a listener that's executed once and removed after that 6432 return this 6433 .on(types, fn, context) 6434 .on(types, handler, context)
vendor: 9,158 bytes, lines 6434-6749
6434; 6435 }, 6436 6437 // @method addEventParent(obj: Evented): this 6438 // Adds an event parent - an `Evented` that will receive propagated events 6439 addEventParent: function (obj) { 6440 this._eventParents = this._eventParents || {}; 6441 this._eventParents[stamp(obj)] = obj; 6442 return this; 6443 }, 6444 6445 // @method removeEventParent(obj: Evented): this 6446 // Removes an event parent, so it will stop receiving propagated events 6447 removeEventParent: function (obj) { 6448 if (this._eventParents) { 6449 delete this._eventParents[stamp(obj)]; 6450 } 6451 return this; 6452 }, 6453 6454 _propagateEvent: function (e) { 6455 for (var id in this._eventParents) { 6456 this._eventParents[id].fire(e.type, extend({ 6457 layer: e.target, 6458 propagatedFrom: e.target 6459 }, e), true); 6460 } 6461 } 6462 }; 6463 6464 // aliases; we should ditch those eventually 6465 6466 // @method addEventListener(â¦): this 6467 // Alias to [`on(â¦)`](#evented-on) 6468 Events.addEventListener = Events.on; 6469 6470 // @method removeEventListener(â¦): this 6471 // Alias to [`off(â¦)`](#evented-off) 6472 6473 // @method clearAllEventListeners(â¦): this 6474 // Alias to [`off()`](#evented-off) 6475 Events.removeEventListener = Events.clearAllEventListeners = Events.off; 6476 6477 // @method addOneTimeEventListener(â¦): this 6478 // Alias to [`once(â¦)`](#evented-once) 6479 Events.addOneTimeEventListener = Events.once; 6480 6481 // @method fireEvent(â¦): this 6482 // Alias to [`fire(â¦)`](#evented-fire) 6483 Events.fireEvent = Events.fire; 6484 6485 // @method hasEventListeners(â¦): Boolean 6486 // Alias to [`listens(â¦)`](#evented-listens) 6487 Events.hasEventListeners = Events.listens; 6488 6489 var Evented = Class.extend(Events); 6490 6491 /* 6492 * @class Point 6493 * @aka L.Point 6494 * 6495 * Represents a point with `x` and `y` coordinates in pixels. 6496 * 6497 * @example 6498 * 6499 * ```js 6500 * var point = L.point(200, 300); 6501 * ``` 6502 * 6503 * All Leaflet methods and options that accept `Point` objects also accept them in a simple Array form (unless noted otherwise), so these lines are equivalent: 6504 * 6505 * ```js 6506 * map.panBy([200, 300]); 6507 * map.panBy(L.point(200, 300)); 6508 * ``` 6509 * 6510 * Note that `Point` does not inherit from Leaflet's `Class` object, 6511 * which means new classes can't inherit from it, and new methods 6512 * can't be added to it with the `include` function. 6513 */ 6514 6515 function Point(x, y, round) { 6516 // @property x: Number; The `x` coordinate of the point 6517 this.x = (round ? Math.round(x) : x); 6518 // @property y: Number; The `y` coordinate of the point 6519 this.y = (round ? Math.round(y) : y); 6520 } 6521 6522 var trunc = Math.trunc || function (v) { 6523 return v > 0 ? Math.floor(v) : Math.ceil(v); 6524 }; 6525 6526 Point.prototype = { 6527 6528 // @method clone(): Point 6529 // Returns a copy of the current point. 6530 clone: function () { 6531 return new Point(this.x, this.y); 6532 }, 6533 6534 // @method add(otherPoint: Point): Point 6535 // Returns the result of addition of the current and the given points. 6536 add: function (point) { 6537 // non-destructive, returns a new point 6538 return this.clone()._add(toPoint(point)); 6539 }, 6540 6541 _add: function (point) { 6542 // destructive, used directly for performance in situations where it's safe to modify existing point 6543 this.x += point.x; 6544 this.y += point.y; 6545 return this; 6546 }, 6547 6548 // @method subtract(otherPoint: Point): Point 6549 // Returns the result of subtraction of the given point from the current. 6550 subtract: function (point) { 6551 return this.clone()._subtract(toPoint(point)); 6552 }, 6553 6554 _subtract: function (point) { 6555 this.x -= point.x; 6556 this.y -= point.y; 6557 return this; 6558 }, 6559 6560 // @method divideBy(num: Number): Point 6561 // Returns the result of division of the current point by the given number. 6562 divideBy: function (num) { 6563 return this.clone()._divideBy(num); 6564 }, 6565 6566 _divideBy: function (num) { 6567 this.x /= num; 6568 this.y /= num; 6569 return this; 6570 }, 6571 6572 // @method multiplyBy(num: Number): Point 6573 // Returns the result of multiplication of the current point by the given number. 6574 multiplyBy: function (num) { 6575 return this.clone()._multiplyBy(num); 6576 }, 6577 6578 _multiplyBy: function (num) { 6579 this.x *= num; 6580 this.y *= num; 6581 return this; 6582 }, 6583 6584 // @method scaleBy(scale: Point): Point 6585 // Multiply each coordinate of the current point by each coordinate of 6586 // `scale`. In linear algebra terms, multiply the point by the 6587 // [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation) 6588 // defined by `scale`. 6589 scaleBy: function (point) { 6590 return new Point(this.x * point.x, this.y * point.y); 6591 }, 6592 6593 // @method unscaleBy(scale: Point): Point 6594 // Inverse of `scaleBy`. Divide each coordinate of the current point by 6595 // each coordinate of `scale`. 6596 unscaleBy: function (point) { 6597 return new Point(this.x / point.x, this.y / point.y); 6598 }, 6599 6600 // @method round(): Point 6601 // Returns a copy of the current point with rounded coordinates. 6602 round: function () { 6603 return this.clone()._round(); 6604 }, 6605 6606 _round: function () { 6607 this.x = Math.round(this.x); 6608 this.y = Math.round(this.y); 6609 return this; 6610 }, 6611 6612 // @method floor(): Point 6613 // Returns a copy of the current point with floored coordinates (rounded down). 6614 floor: function () { 6615 return this.clone()._floor(); 6616 }, 6617 6618 _floor: function () { 6619 this.x = Math.floor(this.x); 6620 this.y = Math.floor(this.y); 6621 return this; 6622 }, 6623 6624 // @method ceil(): Point 6625 // Returns a copy of the current point with ceiled coordinates (rounded up). 6626 ceil: function () { 6627 return this.clone()._ceil(); 6628 }, 6629 6630 _ceil: function () { 6631 this.x = Math.ceil(this.x); 6632 this.y = Math.ceil(this.y); 6633 return this; 6634 }, 6635 6636 // @method trunc(): Point 6637 // Returns a copy of the current point with truncated coordinates (rounded towards zero). 6638 trunc: function () { 6639 return this.clone()._trunc(); 6640 }, 6641 6642 _trunc: function () { 6643 this.x = trunc(this.x); 6644 this.y = trunc(this.y); 6645 return this; 6646 }, 6647 6648 // @method distanceTo(otherPoint: Point): Number 6649 // Returns the cartesian distance between the current and the given points. 6650 distanceTo: function (point) { 6651 point = toPoint(point); 6652 6653 var x = point.x - this.x, 6654 y = point.y - this.y; 6655 6656 return Math.sqrt(x * x + y * y); 6657 }, 6658 6659 // @method equals(otherPoint: Point): Boolean 6660 // Returns `true` if the given point has the same coordinates. 6661 equals: function (point) { 6662 point = toPoint(point); 6663 6664 return point.x === this.x && 6665 point.y === this.y; 6666 }, 6667 6668 // @method contains(otherPoint: Point): Boolean 6669 // Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values). 6670 contains: function (point) { 6671 point = toPoint(point); 6672 6673 return Math.abs(point.x) <= Math.abs(this.x) && 6674 Math.abs(point.y) <= Math.abs(this.y); 6675 }, 6676 6677 // @method toString(): String 6678 // Returns a string representation of the point for debugging purposes. 6679 toString: function () { 6680 return 'Point(' + 6681 formatNum(this.x) + ', ' + 6682 formatNum(this.y) + ')'; 6683 } 6684 }; 6685 6686 // @factory L.point(x: Number, y: Number, round?: Boolean) 6687 // Creates a Point object with the given `x` and `y` coordinates. If optional `round` is set to true, rounds the `x` and `y` values. 6688 6689 // @alternative 6690 // @factory L.point(coords: Number[]) 6691 // Expects an array of the form `[x, y]` instead. 6692 6693 // @alternative 6694 // @factory L.point(coords: Object) 6695 // Expects a plain object of the form `{x: Number, y: Number}` instead. 6696 function toPoint(x, y, round) { 6697 if (x instanceof Point) { 6698 return x; 6699 } 6700 if (isArray(x)) { 6701 return new Point(x[0], x[1]); 6702 } 6703 if (x === undefined || x === null) { 6704 return x; 6705 } 6706 if (typeof x === 'object' && 'x' in x && 'y' in x) { 6707 return new Point(x.x, x.y); 6708 } 6709 return new Point(x, y, round); 6710 } 6711 6712 /* 6713 * @class Bounds 6714 * @aka L.Bounds 6715 * 6716 * Represents a rectangular area in pixel coordinates. 6717 * 6718 * @example 6719 * 6720 * ```js 6721 * var p1 = L.point(10, 10), 6722 * p2 = L.point(40, 60), 6723 * bounds = L.bounds(p1, p2); 6724 * ``` 6725 * 6726 * All Leaflet methods that accept `Bounds` objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this: 6727 * 6728 * ```js 6729 * otherBounds.intersects([[10, 10], [40, 60]]); 6730 * ``` 6731 * 6732 * Note that `Bounds` does not inherit from Leaflet's `Class` object, 6733 * which means new classes can't inherit from it, and new methods 6734 * can't be added to it with the `include` function. 6735 */ 6736 6737 function Bounds(a, b) { 6738 if (!a) { return; } 6739 6740 var points = b ? [a, b] : a; 6741 6742 for (var i = 0, len = points.length; i < len; i++) { 6743 this.extend(points[i]); 6744 } 6745 } 6746 6747 Bounds.prototype = { 6748 // @method extend(point: Point): this 6749 // Extends the bounds to contain the given point.
vendor: 3,646 bytes, lines 6750-6868
6750 extend: function (point) { // (Point) 6751 point = toPoint(point); 6752 6753 // @property min: Point 6754 // The top left corner of the rectangle. 6755 // @property max: Point 6756 // The bottom right corner of the rectangle. 6757 if (!this.min && !this.max) { 6758 this.min = point.clone(); 6759 this.max = point.clone(); 6760 } else { 6761 this.min.x = Math.min(point.x, this.min.x); 6762 this.max.x = Math.max(point.x, this.max.x); 6763 this.min.y = Math.min(point.y, this.min.y); 6764 this.max.y = Math.max(point.y, this.max.y); 6765 } 6766 return this; 6767 }, 6768 6769 // @method getCenter(round?: Boolean): Point 6770 // Returns the center point of the bounds. 6771 getCenter: function (round) { 6772 return new Point( 6773 (this.min.x + this.max.x) / 2, 6774 (this.min.y + this.max.y) / 2, round); 6775 }, 6776 6777 // @method getBottomLeft(): Point 6778 // Returns the bottom-left point of the bounds. 6779 getBottomLeft: function () { 6780 return new Point(this.min.x, this.max.y); 6781 }, 6782 6783 // @method getTopRight(): Point 6784 // Returns the top-right point of the bounds. 6785 getTopRight: function () { // -> Point 6786 return new Point(this.max.x, this.min.y); 6787 }, 6788 6789 // @method getTopLeft(): Point 6790 // Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)). 6791 getTopLeft: function () { 6792 return this.min; // left, top 6793 }, 6794 6795 // @method getBottomRight(): Point 6796 // Returns the bottom-right point of the bounds (i.e. [`this.max`](#bounds-max)). 6797 getBottomRight: function () { 6798 return this.max; // right, bottom 6799 }, 6800 6801 // @method getSize(): Point 6802 // Returns the size of the given bounds 6803 getSize: function () { 6804 return this.max.subtract(this.min); 6805 }, 6806 6807 // @method contains(otherBounds: Bounds): Boolean 6808 // Returns `true` if the rectangle contains the given one. 6809 // @alternative 6810 // @method contains(point: Point): Boolean 6811 // Returns `true` if the rectangle contains the given point. 6812 contains: function (obj) { 6813 var min, max; 6814 6815 if (typeof obj[0] === 'number' || obj instanceof Point) { 6816 obj = toPoint(obj); 6817 } else { 6818 obj = toBounds(obj); 6819 } 6820 6821 if (obj instanceof Bounds) { 6822 min = obj.min; 6823 max = obj.max; 6824 } else { 6825 min = max = obj; 6826 } 6827 6828 return (min.x >= this.min.x) && 6829 (max.x <= this.max.x) && 6830 (min.y >= this.min.y) && 6831 (max.y <= this.max.y); 6832 }, 6833 6834 // @method intersects(otherBounds: Bounds): Boolean 6835 // Returns `true` if the rectangle intersects the given bounds. Two bounds 6836 // intersect if they have at least one point in common. 6837 intersects: function (bounds) { // (Bounds) -> Boolean 6838 bounds = toBounds(bounds); 6839 6840 var min = this.min, 6841 max = this.max, 6842 min2 = bounds.min, 6843 max2 = bounds.max, 6844 xIntersects = (max2.x >= min.x) && (min2.x <= max.x), 6845 yIntersects = (max2.y >= min.y) && (min2.y <= max.y); 6846 6847 return xIntersects && yIntersects; 6848 }, 6849 6850 // @method overlaps(otherBounds: Bounds): Boolean 6851 // Returns `true` if the rectangle overlaps the given bounds. Two bounds 6852 // overlap if their intersection is an area. 6853 overlaps: function (bounds) { // (Bounds) -> Boolean 6854 bounds = toBounds(bounds); 6855 6856 var min = this.min, 6857 max = this.max, 6858 min2 = bounds.min, 6859 max2 = bounds.max, 6860 xOverlaps = (max2.x > min.x) && (min2.x < max.x), 6861 yOverlaps = (max2.y > min.y) && (min2.y < max.y); 6862 6863 return xOverlaps && yOverlaps; 6864 }, 6865 6866 isValid: function () { 6867 return !!(this.min && this.max); 6868 }
vendor: 31,957 bytes, lines 6868-7775
6868 6869 }; 6870 6871 6872 // @factory L.bounds(corner1: Point, corner2: Point) 6873 // Creates a Bounds object from two corners coordinate pairs. 6874 // @alternative 6875 // @factory L.bounds(points: Point[]) 6876 // Creates a Bounds object from the given array of points. 6877 function toBounds(a, b) { 6878 if (!a || a instanceof Bounds) { 6879 return a; 6880 } 6881 return new Bounds(a, b); 6882 } 6883 6884 /* 6885 * @class LatLngBounds 6886 * @aka L.LatLngBounds 6887 * 6888 * Represents a rectangular geographical area on a map. 6889 * 6890 * @example 6891 * 6892 * ```js 6893 * var corner1 = L.latLng(40.712, -74.227), 6894 * corner2 = L.latLng(40.774, -74.125), 6895 * bounds = L.latLngBounds(corner1, corner2); 6896 * ``` 6897 * 6898 * All Leaflet methods that accept LatLngBounds objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this: 6899 * 6900 * ```js 6901 * map.fitBounds([ 6902 * [40.712, -74.227], 6903 * [40.774, -74.125] 6904 * ]); 6905 * ``` 6906 * 6907 * Caution: if the area crosses the antimeridian (often confused with the International Date Line), you must specify corners _outside_ the [-180, 180] degrees longitude range. 6908 * 6909 * Note that `LatLngBounds` does not inherit from Leaflet's `Class` object, 6910 * which means new classes can't inherit from it, and new methods 6911 * can't be added to it with the `include` function. 6912 */ 6913 6914 function LatLngBounds(corner1, corner2) { // (LatLng, LatLng) or (LatLng[]) 6915 if (!corner1) { return; } 6916 6917 var latlngs = corner2 ? [corner1, corner2] : corner1; 6918 6919 for (var i = 0, len = latlngs.length; i < len; i++) { 6920 this.extend(latlngs[i]); 6921 } 6922 } 6923 6924 LatLngBounds.prototype = { 6925 6926 // @method extend(latlng: LatLng): this 6927 // Extend the bounds to contain the given point 6928 6929 // @alternative 6930 // @method extend(otherBounds: LatLngBounds): this 6931 // Extend the bounds to contain the given bounds 6932 extend: function (obj) { 6933 var sw = this._southWest, 6934 ne = this._northEast, 6935 sw2, ne2; 6936 6937 if (obj instanceof LatLng) { 6938 sw2 = obj; 6939 ne2 = obj; 6940 6941 } else if (obj instanceof LatLngBounds) { 6942 sw2 = obj._southWest; 6943 ne2 = obj._northEast; 6944 6945 if (!sw2 || !ne2) { return this; } 6946 6947 } else { 6948 return obj ? this.extend(toLatLng(obj) || toLatLngBounds(obj)) : this; 6949 } 6950 6951 if (!sw && !ne) { 6952 this._southWest = new LatLng(sw2.lat, sw2.lng); 6953 this._northEast = new LatLng(ne2.lat, ne2.lng); 6954 } else { 6955 sw.lat = Math.min(sw2.lat, sw.lat); 6956 sw.lng = Math.min(sw2.lng, sw.lng); 6957 ne.lat = Math.max(ne2.lat, ne.lat); 6958 ne.lng = Math.max(ne2.lng, ne.lng); 6959 } 6960 6961 return this; 6962 }, 6963 6964 // @method pad(bufferRatio: Number): LatLngBounds 6965 // Returns bounds created by extending or retracting the current bounds by a given ratio in each direction. 6966 // For example, a ratio of 0.5 extends the bounds by 50% in each direction. 6967 // Negative values will retract the bounds. 6968 pad: function (bufferRatio) { 6969 var sw = this._southWest, 6970 ne = this._northEast, 6971 heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio, 6972 widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio; 6973 6974 return new LatLngBounds( 6975 new LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer), 6976 new LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer)); 6977 }, 6978 6979 // @method getCenter(): LatLng 6980 // Returns the center point of the bounds. 6981 getCenter: function () { 6982 return new LatLng( 6983 (this._southWest.lat + this._northEast.lat) / 2, 6984 (this._southWest.lng + this._northEast.lng) / 2); 6985 }, 6986 6987 // @method getSouthWest(): LatLng 6988 // Returns the south-west point of the bounds. 6989 getSouthWest: function () { 6990 return this._southWest; 6991 }, 6992 6993 // @method getNorthEast(): LatLng 6994 // Returns the north-east point of the bounds. 6995 getNorthEast: function () { 6996 return this._northEast; 6997 }, 6998 6999 // @method getNorthWest(): LatLng 7000 // Returns the north-west point of the bounds. 7001 getNorthWest: function () { 7002 return new LatLng(this.getNorth(), this.getWest()); 7003 }, 7004 7005 // @method getSouthEast(): LatLng 7006 // Returns the south-east point of the bounds. 7007 getSouthEast: function () { 7008 return new LatLng(this.getSouth(), this.getEast()); 7009 }, 7010 7011 // @method getWest(): Number 7012 // Returns the west longitude of the bounds 7013 getWest: function () { 7014 return this._southWest.lng; 7015 }, 7016 7017 // @method getSouth(): Number 7018 // Returns the south latitude of the bounds 7019 getSouth: function () { 7020 return this._southWest.lat; 7021 }, 7022 7023 // @method getEast(): Number 7024 // Returns the east longitude of the bounds 7025 getEast: function () { 7026 return this._northEast.lng; 7027 }, 7028 7029 // @method getNorth(): Number 7030 // Returns the north latitude of the bounds 7031 getNorth: function () { 7032 return this._northEast.lat; 7033 }, 7034 7035 // @method contains(otherBounds: LatLngBounds): Boolean 7036 // Returns `true` if the rectangle contains the given one. 7037 7038 // @alternative 7039 // @method contains (latlng: LatLng): Boolean 7040 // Returns `true` if the rectangle contains the given point. 7041 contains: function (obj) { // (LatLngBounds) or (LatLng) -> Boolean 7042 if (typeof obj[0] === 'number' || obj instanceof LatLng || 'lat' in obj) { 7043 obj = toLatLng(obj); 7044 } else { 7045 obj = toLatLngBounds(obj); 7046 } 7047 7048 var sw = this._southWest, 7049 ne = this._northEast, 7050 sw2, ne2; 7051 7052 if (obj instanceof LatLngBounds) { 7053 sw2 = obj.getSouthWest(); 7054 ne2 = obj.getNorthEast(); 7055 } else { 7056 sw2 = ne2 = obj; 7057 } 7058 7059 return (sw2.lat >= sw.lat) && (ne2.lat <= ne.lat) && 7060 (sw2.lng >= sw.lng) && (ne2.lng <= ne.lng); 7061 }, 7062 7063 // @method intersects(otherBounds: LatLngBounds): Boolean 7064 // Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common. 7065 intersects: function (bounds) { 7066 bounds = toLatLngBounds(bounds); 7067 7068 var sw = this._southWest, 7069 ne = this._northEast, 7070 sw2 = bounds.getSouthWest(), 7071 ne2 = bounds.getNorthEast(), 7072 7073 latIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat), 7074 lngIntersects = (ne2.lng >= sw.lng) && (sw2.lng <= ne.lng); 7075 7076 return latIntersects && lngIntersects; 7077 }, 7078 7079 // @method overlaps(otherBounds: LatLngBounds): Boolean 7080 // Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area. 7081 overlaps: function (bounds) { 7082 bounds = toLatLngBounds(bounds); 7083 7084 var sw = this._southWest, 7085 ne = this._northEast, 7086 sw2 = bounds.getSouthWest(), 7087 ne2 = bounds.getNorthEast(), 7088 7089 latOverlaps = (ne2.lat > sw.lat) && (sw2.lat < ne.lat), 7090 lngOverlaps = (ne2.lng > sw.lng) && (sw2.lng < ne.lng); 7091 7092 return latOverlaps && lngOverlaps; 7093 }, 7094 7095 // @method toBBoxString(): String 7096 // Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data. 7097 toBBoxString: function () { 7098 return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(','); 7099 }, 7100 7101 // @method equals(otherBounds: LatLngBounds, maxMargin?: Number): Boolean 7102 // Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds. The margin of error can be overridden by setting `maxMargin` to a small number. 7103 equals: function (bounds, maxMargin) { 7104 if (!bounds) { return false; } 7105 7106 bounds = toLatLngBounds(bounds); 7107 7108 return this._southWest.equals(bounds.getSouthWest(), maxMargin) && 7109 this._northEast.equals(bounds.getNorthEast(), maxMargin); 7110 }, 7111 7112 // @method isValid(): Boolean 7113 // Returns `true` if the bounds are properly initialized. 7114 isValid: function () { 7115 return !!(this._southWest && this._northEast); 7116 } 7117 }; 7118 7119 // TODO International date line? 7120 7121 // @factory L.latLngBounds(corner1: LatLng, corner2: LatLng) 7122 // Creates a `LatLngBounds` object by defining two diagonally opposite corners of the rectangle. 7123 7124 // @alternative 7125 // @factory L.latLngBounds(latlngs: LatLng[]) 7126 // Creates a `LatLngBounds` object defined by the geographical points it contains. Very useful for zooming the map to fit a particular set of locations with [`fitBounds`](#map-fitbounds). 7127 function toLatLngBounds(a, b) { 7128 if (a instanceof LatLngBounds) { 7129 return a; 7130 } 7131 return new LatLngBounds(a, b); 7132 } 7133 7134 /* @class LatLng 7135 * @aka L.LatLng 7136 * 7137 * Represents a geographical point with a certain latitude and longitude. 7138 * 7139 * @example 7140 * 7141 * ``` 7142 * var latlng = L.latLng(50.5, 30.5); 7143 * ``` 7144 * 7145 * All Leaflet methods that accept LatLng objects also accept them in a simple Array form and simple object form (unless noted otherwise), so these lines are equivalent: 7146 * 7147 * ``` 7148 * map.panTo([50, 30]); 7149 * map.panTo({lon: 30, lat: 50}); 7150 * map.panTo({lat: 50, lng: 30}); 7151 * map.panTo(L.latLng(50, 30)); 7152 * ``` 7153 * 7154 * Note that `LatLng` does not inherit from Leaflet's `Class` object, 7155 * which means new classes can't inherit from it, and new methods 7156 * can't be added to it with the `include` function. 7157 */ 7158 7159 function LatLng(lat, lng, alt) { 7160 if (isNaN(lat) || isNaN(lng)) { 7161 throw new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')'); 7162 } 7163 7164 // @property lat: Number 7165 // Latitude in degrees 7166 this.lat = +lat; 7167 7168 // @property lng: Number 7169 // Longitude in degrees 7170 this.lng = +lng; 7171 7172 // @property alt: Number 7173 // Altitude in meters (optional) 7174 if (alt !== undefined) { 7175 this.alt = +alt; 7176 } 7177 } 7178 7179 LatLng.prototype = { 7180 // @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean 7181 // Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overridden by setting `maxMargin` to a small number. 7182 equals: function (obj, maxMargin) { 7183 if (!obj) { return false; } 7184 7185 obj = toLatLng(obj); 7186 7187 var margin = Math.max( 7188 Math.abs(this.lat - obj.lat), 7189 Math.abs(this.lng - obj.lng)); 7190 7191 return margin <= (maxMargin === undefined ? 1.0E-9 : maxMargin); 7192 }, 7193 7194 // @method toString(): String 7195 // Returns a string representation of the point (for debugging purposes). 7196 toString: function (precision) { 7197 return 'LatLng(' + 7198 formatNum(this.lat, precision) + ', ' + 7199 formatNum(this.lng, precision) + ')'; 7200 }, 7201 7202 // @method distanceTo(otherLatLng: LatLng): Number 7203 // Returns the distance (in meters) to the given `LatLng` calculated using the [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines). 7204 distanceTo: function (other) { 7205 return Earth.distance(this, toLatLng(other)); 7206 }, 7207 7208 // @method wrap(): LatLng 7209 // Returns a new `LatLng` object with the longitude wrapped so it's always between -180 and +180 degrees. 7210 wrap: function () { 7211 return Earth.wrapLatLng(this); 7212 }, 7213 7214 // @method toBounds(sizeInMeters: Number): LatLngBounds 7215 // Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters/2` meters apart from the `LatLng`. 7216 toBounds: function (sizeInMeters) { 7217 var latAccuracy = 180 * sizeInMeters / 40075017, 7218 lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat); 7219 7220 return toLatLngBounds( 7221 [this.lat - latAccuracy, this.lng - lngAccuracy], 7222 [this.lat + latAccuracy, this.lng + lngAccuracy]); 7223 }, 7224 7225 clone: function () { 7226 return new LatLng(this.lat, this.lng, this.alt); 7227 } 7228 }; 7229 7230 7231 7232 // @factory L.latLng(latitude: Number, longitude: Number, altitude?: Number): LatLng 7233 // Creates an object representing a geographical point with the given latitude and longitude (and optionally altitude). 7234 7235 // @alternative 7236 // @factory L.latLng(coords: Array): LatLng 7237 // Expects an array of the form `[Number, Number]` or `[Number, Number, Number]` instead. 7238 7239 // @alternative 7240 // @factory L.latLng(coords: Object): LatLng 7241 // Expects an plain object of the form `{lat: Number, lng: Number}` or `{lat: Number, lng: Number, alt: Number}` instead. 7242 7243 function toLatLng(a, b, c) { 7244 if (a instanceof LatLng) { 7245 return a; 7246 } 7247 if (isArray(a) && typeof a[0] !== 'object') { 7248 if (a.length === 3) { 7249 return new LatLng(a[0], a[1], a[2]); 7250 } 7251 if (a.length === 2) { 7252 return new LatLng(a[0], a[1]); 7253 } 7254 return null; 7255 } 7256 if (a === undefined || a === null) { 7257 return a; 7258 } 7259 if (typeof a === 'object' && 'lat' in a) { 7260 return new LatLng(a.lat, 'lng' in a ? a.lng : a.lon, a.alt); 7261 } 7262 if (b === undefined) { 7263 return null; 7264 } 7265 return new LatLng(a, b, c); 7266 } 7267 7268 /* 7269 * @namespace CRS 7270 * @crs L.CRS.Base 7271 * Object that defines coordinate reference systems for projecting 7272 * geographical points into pixel (screen) coordinates and back (and to 7273 * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See 7274 * [spatial reference system](https://en.wikipedia.org/wiki/Spatial_reference_system). 7275 * 7276 * Leaflet defines the most usual CRSs by default. If you want to use a 7277 * CRS not defined by default, take a look at the 7278 * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin. 7279 * 7280 * Note that the CRS instances do not inherit from Leaflet's `Class` object, 7281 * and can't be instantiated. Also, new classes can't inherit from them, 7282 * and methods can't be added to them with the `include` function. 7283 */ 7284 7285 var CRS = { 7286 // @method latLngToPoint(latlng: LatLng, zoom: Number): Point 7287 // Projects geographical coordinates into pixel coordinates for a given zoom. 7288 latLngToPoint: function (latlng, zoom) { 7289 var projectedPoint = this.projection.project(latlng), 7290 scale = this.scale(zoom); 7291 7292 return this.transformation._transform(projectedPoint, scale); 7293 }, 7294 7295 // @method pointToLatLng(point: Point, zoom: Number): LatLng 7296 // The inverse of `latLngToPoint`. Projects pixel coordinates on a given 7297 // zoom into geographical coordinates. 7298 pointToLatLng: function (point, zoom) { 7299 var scale = this.scale(zoom), 7300 untransformedPoint = this.transformation.untransform(point, scale); 7301 7302 return this.projection.unproject(untransformedPoint); 7303 }, 7304 7305 // @method project(latlng: LatLng): Point 7306 // Projects geographical coordinates into coordinates in units accepted for 7307 // this CRS (e.g. meters for EPSG:3857, for passing it to WMS services). 7308 project: function (latlng) { 7309 return this.projection.project(latlng); 7310 }, 7311 7312 // @method unproject(point: Point): LatLng 7313 // Given a projected coordinate returns the corresponding LatLng. 7314 // The inverse of `project`. 7315 unproject: function (point) { 7316 return this.projection.unproject(point); 7317 }, 7318 7319 // @method scale(zoom: Number): Number 7320 // Returns the scale used when transforming projected coordinates into 7321 // pixel coordinates for a particular zoom. For example, it returns 7322 // `256 * 2^zoom` for Mercator-based CRS. 7323 scale: function (zoom) { 7324 return 256 * Math.pow(2, zoom); 7325 }, 7326 7327 // @method zoom(scale: Number): Number 7328 // Inverse of `scale()`, returns the zoom level corresponding to a scale 7329 // factor of `scale`. 7330 zoom: function (scale) { 7331 return Math.log(scale / 256) / Math.LN2; 7332 }, 7333 7334 // @method getProjectedBounds(zoom: Number): Bounds 7335 // Returns the projection's bounds scaled and transformed for the provided `zoom`. 7336 getProjectedBounds: function (zoom) { 7337 if (this.infinite) { return null; } 7338 7339 var b = this.projection.bounds, 7340 s = this.scale(zoom), 7341 min = this.transformation.transform(b.min, s), 7342 max = this.transformation.transform(b.max, s); 7343 7344 return new Bounds(min, max); 7345 }, 7346 7347 // @method distance(latlng1: LatLng, latlng2: LatLng): Number 7348 // Returns the distance between two geographical coordinates. 7349 7350 // @property code: String 7351 // Standard code name of the CRS passed into WMS services (e.g. `'EPSG:3857'`) 7352 // 7353 // @property wrapLng: Number[] 7354 // An array of two numbers defining whether the longitude (horizontal) coordinate 7355 // axis wraps around a given range and how. Defaults to `[-180, 180]` in most 7356 // geographical CRSs. If `undefined`, the longitude axis does not wrap around. 7357 // 7358 // @property wrapLat: Number[] 7359 // Like `wrapLng`, but for the latitude (vertical) axis. 7360 7361 // wrapLng: [min, max], 7362 // wrapLat: [min, max], 7363 7364 // @property infinite: Boolean 7365 // If true, the coordinate space will be unbounded (infinite in both axes) 7366 infinite: false, 7367 7368 // @method wrapLatLng(latlng: LatLng): LatLng 7369 // Returns a `LatLng` where lat and lng has been wrapped according to the 7370 // CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds. 7371 wrapLatLng: function (latlng) { 7372 var lng = this.wrapLng ? wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng, 7373 lat = this.wrapLat ? wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat, 7374 alt = latlng.alt; 7375 7376 return new LatLng(lat, lng, alt); 7377 }, 7378 7379 // @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds 7380 // Returns a `LatLngBounds` with the same size as the given one, ensuring 7381 // that its center is within the CRS's bounds. 7382 // Only accepts actual `L.LatLngBounds` instances, not arrays. 7383 wrapLatLngBounds: function (bounds) { 7384 var center = bounds.getCenter(), 7385 newCenter = this.wrapLatLng(center), 7386 latShift = center.lat - newCenter.lat, 7387 lngShift = center.lng - newCenter.lng; 7388 7389 if (latShift === 0 && lngShift === 0) { 7390 return bounds; 7391 } 7392 7393 var sw = bounds.getSouthWest(), 7394 ne = bounds.getNorthEast(), 7395 newSw = new LatLng(sw.lat - latShift, sw.lng - lngShift), 7396 newNe = new LatLng(ne.lat - latShift, ne.lng - lngShift); 7397 7398 return new LatLngBounds(newSw, newNe); 7399 } 7400 }; 7401 7402 /* 7403 * @namespace CRS 7404 * @crs L.CRS.Earth 7405 * 7406 * Serves as the base for CRS that are global such that they cover the earth. 7407 * Can only be used as the base for other CRS and cannot be used directly, 7408 * since it does not have a `code`, `projection` or `transformation`. `distance()` returns 7409 * meters. 7410 */ 7411 7412 var Earth = extend({}, CRS, { 7413 wrapLng: [-180, 180], 7414 7415 // Mean Earth Radius, as recommended for use by 7416 // the International Union of Geodesy and Geophysics, 7417 // see https://rosettacode.org/wiki/Haversine_formula 7418 R: 6371000, 7419 7420 // distance between two geographical points using spherical law of cosines approximation 7421 distance: function (latlng1, latlng2) { 7422 var rad = Math.PI / 180, 7423 lat1 = latlng1.lat * rad, 7424 lat2 = latlng2.lat * rad, 7425 sinDLat = Math.sin((latlng2.lat - latlng1.lat) * rad / 2), 7426 sinDLon = Math.sin((latlng2.lng - latlng1.lng) * rad / 2), 7427 a = sinDLat * sinDLat + Math.cos(lat1) * Math.cos(lat2) * sinDLon * sinDLon, 7428 c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); 7429 return this.R * c; 7430 } 7431 }); 7432 7433 /* 7434 * @namespace Projection 7435 * @projection L.Projection.SphericalMercator 7436 * 7437 * Spherical Mercator projection â the most common projection for online maps, 7438 * used by almost all free and commercial tile providers. Assumes that Earth is 7439 * a sphere. Used by the `EPSG:3857` CRS. 7440 */ 7441 7442 var earthRadius = 6378137; 7443 7444 var SphericalMercator = { 7445 7446 R: earthRadius, 7447 MAX_LATITUDE: 85.0511287798, 7448 7449 project: function (latlng) { 7450 var d = Math.PI / 180, 7451 max = this.MAX_LATITUDE, 7452 lat = Math.max(Math.min(max, latlng.lat), -max), 7453 sin = Math.sin(lat * d); 7454 7455 return new Point( 7456 this.R * latlng.lng * d, 7457 this.R * Math.log((1 + sin) / (1 - sin)) / 2); 7458 }, 7459 7460 unproject: function (point) { 7461 var d = 180 / Math.PI; 7462 7463 return new LatLng( 7464 (2 * Math.atan(Math.exp(point.y / this.R)) - (Math.PI / 2)) * d, 7465 point.x * d / this.R); 7466 }, 7467 7468 bounds: (function () { 7469 var d = earthRadius * Math.PI; 7470 return new Bounds([-d, -d], [d, d]); 7471 })() 7472 }; 7473 7474 /* 7475 * @class Transformation 7476 * @aka L.Transformation 7477 * 7478 * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d` 7479 * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing 7480 * the reverse. Used by Leaflet in its projections code. 7481 * 7482 * @example 7483 * 7484 * ```js 7485 * var transformation = L.transformation(2, 5, -1, 10), 7486 * p = L.point(1, 2), 7487 * p2 = transformation.transform(p), // L.point(7, 8) 7488 * p3 = transformation.untransform(p2); // L.point(1, 2) 7489 * ``` 7490 */ 7491 7492 7493 // factory new L.Transformation(a: Number, b: Number, c: Number, d: Number) 7494 // Creates a `Transformation` object with the given coefficients. 7495 function Transformation(a, b, c, d) { 7496 if (isArray(a)) { 7497 // use array properties 7498 this._a = a[0]; 7499 this._b = a[1]; 7500 this._c = a[2]; 7501 this._d = a[3]; 7502 return; 7503 } 7504 this._a = a; 7505 this._b = b; 7506 this._c = c; 7507 this._d = d; 7508 } 7509 7510 Transformation.prototype = { 7511 // @method transform(point: Point, scale?: Number): Point 7512 // Returns a transformed point, optionally multiplied by the given scale. 7513 // Only accepts actual `L.Point` instances, not arrays. 7514 transform: function (point, scale) { // (Point, Number) -> Point 7515 return this._transform(point.clone(), scale); 7516 }, 7517 7518 // destructive transform (faster) 7519 _transform: function (point, scale) { 7520 scale = scale || 1; 7521 point.x = scale * (this._a * point.x + this._b); 7522 point.y = scale * (this._c * point.y + this._d); 7523 return point; 7524 }, 7525 7526 // @method untransform(point: Point, scale?: Number): Point 7527 // Returns the reverse transformation of the given point, optionally divided 7528 // by the given scale. Only accepts actual `L.Point` instances, not arrays. 7529 untransform: function (point, scale) { 7530 scale = scale || 1; 7531 return new Point( 7532 (point.x / scale - this._b) / this._a, 7533 (point.y / scale - this._d) / this._c); 7534 } 7535 }; 7536 7537 // factory L.transformation(a: Number, b: Number, c: Number, d: Number) 7538 7539 // @factory L.transformation(a: Number, b: Number, c: Number, d: Number) 7540 // Instantiates a Transformation object with the given coefficients. 7541 7542 // @alternative 7543 // @factory L.transformation(coefficients: Array): Transformation 7544 // Expects an coefficients array of the form 7545 // `[a: Number, b: Number, c: Number, d: Number]`. 7546 7547 function toTransformation(a, b, c, d) { 7548 return new Transformation(a, b, c, d); 7549 } 7550 7551 /* 7552 * @namespace CRS 7553 * @crs L.CRS.EPSG3857 7554 * 7555 * The most common CRS for online maps, used by almost all free and commercial 7556 * tile providers. Uses Spherical Mercator projection. Set in by default in 7557 * Map's `crs` option. 7558 */ 7559 7560 var EPSG3857 = extend({}, Earth, { 7561 code: 'EPSG:3857', 7562 projection: SphericalMercator, 7563 7564 transformation: (function () { 7565 var scale = 0.5 / (Math.PI * SphericalMercator.R); 7566 return toTransformation(scale, 0.5, -scale, 0.5); 7567 }()) 7568 }); 7569 7570 var EPSG900913 = extend({}, EPSG3857, { 7571 code: 'EPSG:900913' 7572 }); 7573 7574 // @namespace SVG; @section 7575 // There are several static functions which can be called without instantiating L.SVG: 7576 7577 // @function create(name: String): SVGElement 7578 // Returns a instance of [SVGElement](https://developer.mozilla.org/docs/Web/API/SVGElement), 7579 // corresponding to the class name passed. For example, using 'line' will return 7580 // an instance of [SVGLineElement](https://developer.mozilla.org/docs/Web/API/SVGLineElement). 7581 function svgCreate(name) { 7582 return document.createElementNS('http://www.w3.org/2000/svg', name); 7583 } 7584 7585 // @function pointsToPath(rings: Point[], closed: Boolean): String 7586 // Generates a SVG path string for multiple rings, with each ring turning 7587 // into "M..L..L.." instructions 7588 function pointsToPath(rings, closed) { 7589 var str = '', 7590 i, j, len, len2, points, p; 7591 7592 for (i = 0, len = rings.length; i < len; i++) { 7593 points = rings[i]; 7594 7595 for (j = 0, len2 = points.length; j < len2; j++) { 7596 p = points[j]; 7597 str += (j ? 'L' : 'M') + p.x + ' ' + p.y; 7598 } 7599 7600 // closes the ring for polygons; "x" is VML syntax 7601 str += closed ? (Browser.svg ? 'z' : 'x') : ''; 7602 } 7603 7604 // SVG complains about empty path strings 7605 return str || 'M0 0'; 7606 } 7607 7608 /* 7609 * @namespace Browser 7610 * @aka L.Browser 7611 * 7612 * A namespace with static properties for browser/feature detection used by Leaflet internally. 7613 * 7614 * @example 7615 * 7616 * ```js 7617 * if (L.Browser.ielt9) { 7618 * alert('Upgrade your browser, dude!'); 7619 * } 7620 * ``` 7621 */ 7622 7623 var style = document.documentElement.style; 7624 7625 // @property ie: Boolean; `true` for all Internet Explorer versions (not Edge). 7626 var ie = 'ActiveXObject' in window; 7627 7628 // @property ielt9: Boolean; `true` for Internet Explorer versions less than 9. 7629 var ielt9 = ie && !document.addEventListener; 7630 7631 // @property edge: Boolean; `true` for the Edge web browser. 7632 var edge = 'msLaunchUri' in navigator && !('documentMode' in document); 7633 7634 // @property webkit: Boolean; 7635 // `true` for webkit-based browsers like Chrome and Safari (including mobile versions). 7636 var webkit = userAgentContains('webkit'); 7637 7638 // @property android: Boolean 7639 // **Deprecated.** `true` for any browser running on an Android platform. 7640 var android = userAgentContains('android'); 7641 7642 // @property android23: Boolean; **Deprecated.** `true` for browsers running on Android 2 or Android 3. 7643 var android23 = userAgentContains('android 2') || userAgentContains('android 3'); 7644 7645 /* See https://stackoverflow.com/a/17961266 for details on detecting stock Android */ 7646 var webkitVer = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10); // also matches AppleWebKit 7647 // @property androidStock: Boolean; **Deprecated.** `true` for the Android stock browser (i.e. not Chrome) 7648 var androidStock = android && userAgentContains('Google') && webkitVer < 537 && !('AudioNode' in window); 7649 7650 // @property opera: Boolean; `true` for the Opera browser 7651 var opera = !!window.opera; 7652 7653 // @property chrome: Boolean; `true` for the Chrome browser. 7654 var chrome = !edge && userAgentContains('chrome'); 7655 7656 // @property gecko: Boolean; `true` for gecko-based browsers like Firefox. 7657 var gecko = userAgentContains('gecko') && !webkit && !opera && !ie; 7658 7659 // @property safari: Boolean; `true` for the Safari browser. 7660 var safari = !chrome && userAgentContains('safari'); 7661 7662 var phantom = userAgentContains('phantom'); 7663 7664 // @property opera12: Boolean 7665 // `true` for the Opera browser supporting CSS transforms (version 12 or later). 7666 var opera12 = 'OTransition' in style; 7667 7668 // @property win: Boolean; `true` when the browser is running in a Windows platform 7669 var win = navigator.platform.indexOf('Win') === 0; 7670 7671 // @property ie3d: Boolean; `true` for all Internet Explorer versions supporting CSS transforms. 7672 var ie3d = ie && ('transition' in style); 7673 7674 // @property webkit3d: Boolean; `true` for webkit-based browsers supporting CSS transforms. 7675 var webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23; 7676 7677 // @property gecko3d: Boolean; `true` for gecko-based browsers supporting CSS transforms. 7678 var gecko3d = 'MozPerspective' in style; 7679 7680 // @property any3d: Boolean 7681 // `true` for all browsers supporting CSS transforms. 7682 var any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d) && !opera12 && !phantom; 7683 7684 // @property mobile: Boolean; `true` for all browsers running in a mobile device. 7685 var mobile = typeof orientation !== 'undefined' || userAgentContains('mobile'); 7686 7687 // @property mobileWebkit: Boolean; `true` for all webkit-based browsers in a mobile device. 7688 var mobileWebkit = mobile && webkit; 7689 7690 // @property mobileWebkit3d: Boolean 7691 // `true` for all webkit-based browsers in a mobile device supporting CSS transforms. 7692 var mobileWebkit3d = mobile && webkit3d; 7693 7694 // @property msPointer: Boolean 7695 // `true` for browsers implementing the Microsoft touch events model (notably IE10). 7696 var msPointer = !window.PointerEvent && window.MSPointerEvent; 7697 7698 // @property pointer: Boolean 7699 // `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx). 7700 var pointer = !!(window.PointerEvent || msPointer); 7701 7702 // @property touchNative: Boolean 7703 // `true` for all browsers supporting [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events). 7704 // **This does not necessarily mean** that the browser is running in a computer with 7705 // a touchscreen, it only means that the browser is capable of understanding 7706 // touch events. 7707 var touchNative = 'ontouchstart' in window || !!window.TouchEvent; 7708 7709 // @property touch: Boolean 7710 // `true` for all browsers supporting either [touch](#browser-touch) or [pointer](#browser-pointer) events. 7711 // Note: pointer events will be preferred (if available), and processed for all `touch*` listeners. 7712 var touch = !window.L_NO_TOUCH && (touchNative || pointer); 7713 7714 // @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device. 7715 var mobileOpera = mobile && opera; 7716 7717 // @property mobileGecko: Boolean 7718 // `true` for gecko-based browsers running in a mobile device. 7719 var mobileGecko = mobile && gecko; 7720 7721 // @property retina: Boolean 7722 // `true` for browsers on a high-resolution "retina" screen or on any screen when browser's display zoom is more than 100%. 7723 var retina = (window.devicePixelRatio || (window.screen.deviceXDPI / window.screen.logicalXDPI)) > 1; 7724 7725 // @property passiveEvents: Boolean 7726 // `true` for browsers that support passive events. 7727 var passiveEvents = (function () { 7728 var supportsPassiveOption = false; 7729 try { 7730 var opts = Object.defineProperty({}, 'passive', { 7731 get: function () { // eslint-disable-line getter-return 7732 supportsPassiveOption = true; 7733 } 7734 }); 7735 window.addEventListener('testPassiveEventSupport', falseFn, opts); 7736 window.removeEventListener('testPassiveEventSupport', falseFn, opts); 7737 } catch (e) { 7738 // Errors can safely be ignored since this is only a browser support test. 7739 } 7740 return supportsPassiveOption; 7741 }()); 7742 7743 // @property canvas: Boolean 7744 // `true` when the browser supports [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API). 7745 var canvas$1 = (function () { 7746 return !!document.createElement('canvas').getContext; 7747 }()); 7748 7749 // @property svg: Boolean 7750 // `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG). 7751 var svg$1 = !!(document.createElementNS && svgCreate('svg').createSVGRect); 7752 7753 var inlineSvg = !!svg$1 && (function () { 7754 var div = document.createElement('div'); 7755 div.innerHTML = '<svg/>'; 7756 return (div.firstChild && div.firstChild.namespaceURI) === 'http://www.w3.org/2000/svg'; 7757 })(); 7758 7759 // @property vml: Boolean 7760 // `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language). 7761 var vml = !svg$1 && (function () { 7762 try { 7763 var div = document.createElement('div'); 7764 div.innerHTML = '<v:shape adj="1"/>'; 7765 7766 var shape = div.firstChild; 7767 shape.style.behavior = 'url(#default#VML)'; 7768 7769 return shape && (typeof shape.adj === 'object'); 7770 7771 } catch (e) { 7772 return false; 7773 } 7774 }()); 7775
7776 function userAgentContains(str) { 7777 return navigator.userAgent.toLowerCase().indexOf(str) >= 0; 7778 } 7779 7780 7781 var Browser = { 7782 ie: ie, 7783 ielt9: ielt9, 7784 edge: edge, 7785 webkit: webkit, 7786 android: android, 7787 android23: android23, 7788 androidStock: androidStock, 7789 opera: opera, 7790 chrome: chrome, 7791 gecko: gecko, 7792 safari: safari, 7793 phantom: phantom, 7794 opera12: opera12, 7795 win: win, 7796 ie3d: ie3d, 7797 webkit3d: webkit3d, 7798 gecko3d: gecko3d, 7799 any3d: any3d, 7800 mobile: mobile, 7801 mobileWebkit: mobileWebkit, 7802 mobileWebkit3d: mobileWebkit3d, 7803 msPointer: msPointer, 7804 pointer: pointer, 7805 touch: touch, 7806 touchNative: touchNative, 7807 mobileOpera: mobileOpera, 7808 mobileGecko: mobileGecko, 7809 retina: retina, 7810 passiveEvents: passiveEvents, 7811 canvas: canvas$1, 7812 svg: svg$1, 7813 vml: vml, 7814 inlineSvg: inlineSvg 7815 }; 7816 7817 /* 7818 * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices. 7819 */ 7820 7821 var POINTER_DOWN = Browser.msPointer ? 'MSPointerDown' : 'pointerdown'; 7822 var POINTER_MOVE = Browser.msPointer ? 'MSPointerMove' : 'pointermove'; 7823 var POINTER_UP = Browser.msPointer ? 'MSPointerUp' : 'pointerup'; 7824 var POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel'; 7825 var pEvent = { 7826 touchstart : POINTER_DOWN, 7827 touchmove : POINTER_MOVE, 7828 touchend : POINTER_UP, 7829 touchcancel : POINTER_CANCEL 7830 }; 7831 var handle = { 7832 touchstart : _onPointerStart, 7833 touchmove : _handlePointer, 7834 touchend : _handlePointer, 7835 touchcancel : _handlePointer 7836 }; 7837 var _pointers = {}; 7838 var _pointerDocListener = false;
vendor: 3,601 bytes, lines 7839-7952
7839 7840 // Provides a touch events wrapper for (ms)pointer events. 7841 // ref https://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890 7842 7843 function addPointerListener(obj, type, handler) { 7844 if (type === 'touchstart') { 7845 _addPointerDocListener(); 7846 } 7847 if (!handle[type]) { 7848 console.warn('wrong event specified:', type); 7849 return L.Util.falseFn; 7850 } 7851 handler = handle[type].bind(this, handler); 7852 obj.addEventListener(pEvent[type], handler, false); 7853 return handler; 7854 } 7855 7856 function removePointerListener(obj, type, handler) { 7857 if (!pEvent[type]) { 7858 console.warn('wrong event specified:', type); 7859 return; 7860 } 7861 obj.removeEventListener(pEvent[type], handler, false); 7862 } 7863 7864 function _globalPointerDown(e) { 7865 _pointers[e.pointerId] = e; 7866 } 7867 7868 function _globalPointerMove(e) { 7869 if (_pointers[e.pointerId]) { 7870 _pointers[e.pointerId] = e; 7871 } 7872 } 7873 7874 function _globalPointerUp(e) { 7875 delete _pointers[e.pointerId]; 7876 } 7877 7878 function _addPointerDocListener() { 7879 // need to keep track of what pointers and how many are active to provide e.touches emulation 7880 if (!_pointerDocListener) { 7881 // we listen document as any drags that end by moving the touch off the screen get fired there 7882 document.addEventListener(POINTER_DOWN, _globalPointerDown, true); 7883 document.addEventListener(POINTER_MOVE, _globalPointerMove, true); 7884 document.addEventListener(POINTER_UP, _globalPointerUp, true); 7885 document.addEventListener(POINTER_CANCEL, _globalPointerUp, true); 7886 7887 _pointerDocListener = true; 7888 } 7889 } 7890 7891 function _handlePointer(handler, e) { 7892 if (e.pointerType === (e.MSPOINTER_TYPE_MOUSE || 'mouse')) { return; } 7893 7894 e.touches = []; 7895 for (var i in _pointers) { 7896 e.touches.push(_pointers[i]); 7897 } 7898 e.changedTouches = [e]; 7899 7900 handler(e); 7901 } 7902 7903 function _onPointerStart(handler, e) { 7904 // IE10 specific: MsTouch needs preventDefault. See #2000 7905 if (e.MSPOINTER_TYPE_TOUCH && e.pointerType === e.MSPOINTER_TYPE_TOUCH) { 7906 preventDefault(e); 7907 } 7908 _handlePointer(handler, e); 7909 } 7910 7911 /* 7912 * Extends the event handling code with double tap support for mobile browsers. 7913 * 7914 * Note: currently most browsers fire native dblclick, with only a few exceptions 7915 * (see https://github.com/Leaflet/Leaflet/issues/7012#issuecomment-595087386) 7916 */ 7917 7918 function makeDblclick(event) { 7919 // in modern browsers `type` cannot be just overridden: 7920 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only 7921 var newEvent = {}, 7922 prop, i; 7923 for (i in event) { 7924 prop = event[i]; 7925 newEvent[i] = prop && prop.bind ? prop.bind(event) : prop; 7926 } 7927 event = newEvent; 7928 newEvent.type = 'dblclick'; 7929 newEvent.detail = 2; 7930 newEvent.isTrusted = false; 7931 newEvent._simulated = true; // for debug purposes 7932 return newEvent; 7933 } 7934 7935 var delay = 200; 7936 function addDoubleTapListener(obj, handler) { 7937 // Most browsers handle double tap natively 7938 obj.addEventListener('dblclick', handler); 7939 7940 // On some platforms the browser doesn't fire native dblclicks for touch events. 7941 // It seems that in all such cases `detail` property of `click` event is always `1`. 7942 // So here we rely on that fact to avoid excessive 'dblclick' simulation when not needed. 7943 var last = 0, 7944 detail; 7945 function simDblclick(e) { 7946 if (e.detail !== 1) { 7947 detail = e.detail; // keep in sync to avoid false dblclick in some cases 7948 return; 7949 } 7950 7951 if (e.pointerType === 'mouse' || 7952 (e.sourceCapabilities && !e.sourceCapabilities.firesTouchEvents)) {
vendor: 11,362 bytes, lines 7953-8289
7953 7954 return; 7955 } 7956 7957 var now = Date.now(); 7958 if (now - last <= delay) { 7959 detail++; 7960 if (detail === 2) { 7961 handler(makeDblclick(e)); 7962 } 7963 } else { 7964 detail = 1; 7965 } 7966 last = now; 7967 } 7968 7969 obj.addEventListener('click', simDblclick); 7970 7971 return { 7972 dblclick: handler, 7973 simDblclick: simDblclick 7974 }; 7975 } 7976 7977 function removeDoubleTapListener(obj, handlers) { 7978 obj.removeEventListener('dblclick', handlers.dblclick); 7979 obj.removeEventListener('click', handlers.simDblclick); 7980 } 7981 7982 /* 7983 * @namespace DomUtil 7984 * 7985 * Utility functions to work with the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model) 7986 * tree, used by Leaflet internally. 7987 * 7988 * Most functions expecting or returning a `HTMLElement` also work for 7989 * SVG elements. The only difference is that classes refer to CSS classes 7990 * in HTML and SVG classes in SVG. 7991 */ 7992 7993 7994 // @property TRANSFORM: String 7995 // Vendor-prefixed transform style name (e.g. `'webkitTransform'` for WebKit). 7996 var TRANSFORM = testProp( 7997 ['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']); 7998 7999 // webkitTransition comes first because some browser versions that drop vendor prefix don't do 8000 // the same for the transitionend event, in particular the Android 4.1 stock browser 8001 8002 // @property TRANSITION: String 8003 // Vendor-prefixed transition style name. 8004 var TRANSITION = testProp( 8005 ['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']); 8006 8007 // @property TRANSITION_END: String 8008 // Vendor-prefixed transitionend event name. 8009 var TRANSITION_END = 8010 TRANSITION === 'webkitTransition' || TRANSITION === 'OTransition' ? TRANSITION + 'End' : 'transitionend'; 8011 8012 8013 // @function get(id: String|HTMLElement): HTMLElement 8014 // Returns an element given its DOM id, or returns the element itself 8015 // if it was passed directly. 8016 function get(id) { 8017 return typeof id === 'string' ? document.getElementById(id) : id; 8018 } 8019 8020 // @function getStyle(el: HTMLElement, styleAttrib: String): String 8021 // Returns the value for a certain style attribute on an element, 8022 // including computed values or values set through CSS. 8023 function getStyle(el, style) { 8024 var value = el.style[style] || (el.currentStyle && el.currentStyle[style]); 8025 8026 if ((!value || value === 'auto') && document.defaultView) { 8027 var css = document.defaultView.getComputedStyle(el, null); 8028 value = css ? css[style] : null; 8029 } 8030 return value === 'auto' ? null : value; 8031 } 8032 8033 // @function create(tagName: String, className?: String, container?: HTMLElement): HTMLElement 8034 // Creates an HTML element with `tagName`, sets its class to `className`, and optionally appends it to `container` element. 8035 function create$1(tagName, className, container) { 8036 var el = document.createElement(tagName); 8037 el.className = className || ''; 8038 8039 if (container) { 8040 container.appendChild(el); 8041 } 8042 return el; 8043 } 8044 8045 // @function remove(el: HTMLElement) 8046 // Removes `el` from its parent element 8047 function remove(el) { 8048 var parent = el.parentNode; 8049 if (parent) { 8050 parent.removeChild(el); 8051 } 8052 } 8053 8054 // @function empty(el: HTMLElement) 8055 // Removes all of `el`'s children elements from `el` 8056 function empty(el) { 8057 while (el.firstChild) { 8058 el.removeChild(el.firstChild); 8059 } 8060 } 8061 8062 // @function toFront(el: HTMLElement) 8063 // Makes `el` the last child of its parent, so it renders in front of the other children. 8064 function toFront(el) { 8065 var parent = el.parentNode; 8066 if (parent && parent.lastChild !== el) { 8067 parent.appendChild(el); 8068 } 8069 } 8070 8071 // @function toBack(el: HTMLElement) 8072 // Makes `el` the first child of its parent, so it renders behind the other children. 8073 function toBack(el) { 8074 var parent = el.parentNode; 8075 if (parent && parent.firstChild !== el) { 8076 parent.insertBefore(el, parent.firstChild); 8077 } 8078 } 8079 8080 // @function hasClass(el: HTMLElement, name: String): Boolean 8081 // Returns `true` if the element's class attribute contains `name`. 8082 function hasClass(el, name) { 8083 if (el.classList !== undefined) { 8084 return el.classList.contains(name); 8085 } 8086 var className = getClass(el); 8087 return className.length > 0 && new RegExp('(^|\\s)' + name + '(\\s|$)').test(className); 8088 } 8089 8090 // @function addClass(el: HTMLElement, name: String) 8091 // Adds `name` to the element's class attribute. 8092 function addClass(el, name) { 8093 if (el.classList !== undefined) { 8094 var classes = splitWords(name); 8095 for (var i = 0, len = classes.length; i < len; i++) { 8096 el.classList.add(classes[i]); 8097 } 8098 } else if (!hasClass(el, name)) { 8099 var className = getClass(el); 8100 setClass(el, (className ? className + ' ' : '') + name); 8101 } 8102 } 8103 8104 // @function removeClass(el: HTMLElement, name: String) 8105 // Removes `name` from the element's class attribute. 8106 function removeClass(el, name) { 8107 if (el.classList !== undefined) { 8108 el.classList.remove(name); 8109 } else { 8110 setClass(el, trim((' ' + getClass(el) + ' ').replace(' ' + name + ' ', ' '))); 8111 } 8112 } 8113 8114 // @function setClass(el: HTMLElement, name: String) 8115 // Sets the element's class. 8116 function setClass(el, name) { 8117 if (el.className.baseVal === undefined) { 8118 el.className = name; 8119 } else { 8120 // in case of SVG element 8121 el.className.baseVal = name; 8122 } 8123 } 8124 8125 // @function getClass(el: HTMLElement): String 8126 // Returns the element's class. 8127 function getClass(el) { 8128 // Check if the element is an SVGElementInstance and use the correspondingElement instead 8129 // (Required for linked SVG elements in IE11.) 8130 if (el.correspondingElement) { 8131 el = el.correspondingElement; 8132 } 8133 return el.className.baseVal === undefined ? el.className : el.className.baseVal; 8134 } 8135 8136 // @function setOpacity(el: HTMLElement, opacity: Number) 8137 // Set the opacity of an element (including old IE support). 8138 // `opacity` must be a number from `0` to `1`. 8139 function setOpacity(el, value) { 8140 if ('opacity' in el.style) { 8141 el.style.opacity = value; 8142 } else if ('filter' in el.style) { 8143 _setOpacityIE(el, value); 8144 } 8145 } 8146 8147 function _setOpacityIE(el, value) { 8148 var filter = false, 8149 filterName = 'DXImageTransform.Microsoft.Alpha'; 8150 8151 // filters collection throws an error if we try to retrieve a filter that doesn't exist 8152 try { 8153 filter = el.filters.item(filterName); 8154 } catch (e) { 8155 // don't set opacity to 1 if we haven't already set an opacity, 8156 // it isn't needed and breaks transparent pngs. 8157 if (value === 1) { return; } 8158 } 8159 8160 value = Math.round(value * 100); 8161 8162 if (filter) { 8163 filter.Enabled = (value !== 100); 8164 filter.Opacity = value; 8165 } else { 8166 el.style.filter += ' progid:' + filterName + '(opacity=' + value + ')'; 8167 } 8168 } 8169 8170 // @function testProp(props: String[]): String|false 8171 // Goes through the array of style names and returns the first name 8172 // that is a valid style name for an element. If no such name is found, 8173 // it returns false. Useful for vendor-prefixed styles like `transform`. 8174 function testProp(props) { 8175 var style = document.documentElement.style; 8176 8177 for (var i = 0; i < props.length; i++) { 8178 if (props[i] in style) { 8179 return props[i]; 8180 } 8181 } 8182 return false; 8183 } 8184 8185 // @function setTransform(el: HTMLElement, offset: Point, scale?: Number) 8186 // Resets the 3D CSS transform of `el` so it is translated by `offset` pixels 8187 // and optionally scaled by `scale`. Does not have an effect if the 8188 // browser doesn't support 3D CSS transforms. 8189 function setTransform(el, offset, scale) { 8190 var pos = offset || new Point(0, 0); 8191 8192 el.style[TRANSFORM] = 8193 (Browser.ie3d ? 8194 'translate(' + pos.x + 'px,' + pos.y + 'px)' : 8195 'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') + 8196 (scale ? ' scale(' + scale + ')' : ''); 8197 } 8198 8199 // @function setPosition(el: HTMLElement, position: Point) 8200 // Sets the position of `el` to coordinates specified by `position`, 8201 // using CSS translate or top/left positioning depending on the browser 8202 // (used by Leaflet internally to position its layers). 8203 function setPosition(el, point) { 8204 8205 /*eslint-disable */ 8206 el._leaflet_pos = point; 8207 /* eslint-enable */ 8208 8209 if (Browser.any3d) { 8210 setTransform(el, point); 8211 } else { 8212 el.style.left = point.x + 'px'; 8213 el.style.top = point.y + 'px'; 8214 } 8215 } 8216 8217 // @function getPosition(el: HTMLElement): Point 8218 // Returns the coordinates of an element previously positioned with setPosition. 8219 function getPosition(el) { 8220 // this method is only used for elements previously positioned using setPosition, 8221 // so it's safe to cache the position for performance 8222 8223 return el._leaflet_pos || new Point(0, 0); 8224 } 8225 8226 // @function disableTextSelection() 8227 // Prevents the user from generating `selectstart` DOM events, usually generated 8228 // when the user drags the mouse through a page with text. Used internally 8229 // by Leaflet to override the behaviour of any click-and-drag interaction on 8230 // the map. Affects drag interactions on the whole document. 8231 8232 // @function enableTextSelection() 8233 // Cancels the effects of a previous [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection). 8234 var disableTextSelection; 8235 var enableTextSelection; 8236 var _userSelect; 8237 if ('onselectstart' in document) { 8238 disableTextSelection = function () { 8239 on(window, 'selectstart', preventDefault); 8240 }; 8241 enableTextSelection = function () { 8242 off(window, 'selectstart', preventDefault); 8243 }; 8244 } else { 8245 var userSelectProperty = testProp( 8246 ['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']); 8247 8248 disableTextSelection = function () { 8249 if (userSelectProperty) { 8250 var style = document.documentElement.style; 8251 _userSelect = style[userSelectProperty]; 8252 style[userSelectProperty] = 'none'; 8253 } 8254 }; 8255 enableTextSelection = function () { 8256 if (userSelectProperty) { 8257 document.documentElement.style[userSelectProperty] = _userSelect; 8258 _userSelect = undefined; 8259 } 8260 }; 8261 } 8262 8263 // @function disableImageDrag() 8264 // As [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection), but 8265 // for `dragstart` DOM events, usually generated when the user drags an image. 8266 function disableImageDrag() { 8267 on(window, 'dragstart', preventDefault); 8268 } 8269 8270 // @function enableImageDrag() 8271 // Cancels the effects of a previous [`L.DomUtil.disableImageDrag`](#domutil-disabletextselection). 8272 function enableImageDrag() { 8273 off(window, 'dragstart', preventDefault); 8274 } 8275 8276 var _outlineElement, _outlineStyle; 8277 // @function preventOutline(el: HTMLElement) 8278 // Makes the [outline](https://developer.mozilla.org/docs/Web/CSS/outline) 8279 // of the element `el` invisible. Used internally by Leaflet to prevent 8280 // focusable elements from displaying an outline when the user performs a 8281 // drag interaction on them. 8282 function preventOutline(element) { 8283 while (element.tabIndex === -1) { 8284 element = element.parentNode; 8285 } 8286 if (!element.style) { return; } 8287 restoreOutline(); 8288 _outlineElement = element; 8289 _outlineStyle = element.style.outline
vendor: 12,313 bytes, lines 8289-8662
8289; 8290 element.style.outline = 'none'; 8291 on(window, 'keydown', restoreOutline); 8292 } 8293 8294 // @function restoreOutline() 8295 // Cancels the effects of a previous [`L.DomUtil.preventOutline`](). 8296 function restoreOutline() { 8297 if (!_outlineElement) { return; } 8298 _outlineElement.style.outline = _outlineStyle; 8299 _outlineElement = undefined; 8300 _outlineStyle = undefined; 8301 off(window, 'keydown', restoreOutline); 8302 } 8303 8304 // @function getSizedParentNode(el: HTMLElement): HTMLElement 8305 // Finds the closest parent node which size (width and height) is not null. 8306 function getSizedParentNode(element) { 8307 do { 8308 element = element.parentNode; 8309 } while ((!element.offsetWidth || !element.offsetHeight) && element !== document.body); 8310 return element; 8311 } 8312 8313 // @function getScale(el: HTMLElement): Object 8314 // Computes the CSS scale currently applied on the element. 8315 // Returns an object with `x` and `y` members as horizontal and vertical scales respectively, 8316 // and `boundingClientRect` as the result of [`getBoundingClientRect()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect). 8317 function getScale(element) { 8318 var rect = element.getBoundingClientRect(); // Read-only in old browsers. 8319 8320 return { 8321 x: rect.width / element.offsetWidth || 1, 8322 y: rect.height / element.offsetHeight || 1, 8323 boundingClientRect: rect 8324 }; 8325 } 8326 8327 var DomUtil = { 8328 __proto__: null, 8329 TRANSFORM: TRANSFORM, 8330 TRANSITION: TRANSITION, 8331 TRANSITION_END: TRANSITION_END, 8332 get: get, 8333 getStyle: getStyle, 8334 create: create$1, 8335 remove: remove, 8336 empty: empty, 8337 toFront: toFront, 8338 toBack: toBack, 8339 hasClass: hasClass, 8340 addClass: addClass, 8341 removeClass: removeClass, 8342 setClass: setClass, 8343 getClass: getClass, 8344 setOpacity: setOpacity, 8345 testProp: testProp, 8346 setTransform: setTransform, 8347 setPosition: setPosition, 8348 getPosition: getPosition, 8349 get disableTextSelection () { return disableTextSelection; }, 8350 get enableTextSelection () { return enableTextSelection; }, 8351 disableImageDrag: disableImageDrag, 8352 enableImageDrag: enableImageDrag, 8353 preventOutline: preventOutline, 8354 restoreOutline: restoreOutline, 8355 getSizedParentNode: getSizedParentNode, 8356 getScale: getScale 8357 }; 8358 8359 /* 8360 * @namespace DomEvent 8361 * Utility functions to work with the [DOM events](https://developer.mozilla.org/docs/Web/API/Event), used by Leaflet internally. 8362 */ 8363 8364 // Inspired by John Resig, Dean Edwards and YUI addEvent implementations. 8365 8366 // @function on(el: HTMLElement, types: String, fn: Function, context?: Object): this 8367 // Adds a listener function (`fn`) to a particular DOM event type of the 8368 // element `el`. You can optionally specify the context of the listener 8369 // (object the `this` keyword will point to). You can also pass several 8370 // space-separated types (e.g. `'click dblclick'`). 8371 8372 // @alternative 8373 // @function on(el: HTMLElement, eventMap: Object, context?: Object): this 8374 // Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}` 8375 function on(obj, types, fn, context) { 8376 8377 if (types && typeof types === 'object') { 8378 for (var type in types) { 8379 addOne(obj, type, types[type], fn); 8380 } 8381 } else { 8382 types = splitWords(types); 8383 8384 for (var i = 0, len = types.length; i < len; i++) { 8385 addOne(obj, types[i], fn, context); 8386 } 8387 } 8388 8389 return this; 8390 } 8391 8392 var eventsKey = '_leaflet_events'; 8393 8394 // @function off(el: HTMLElement, types: String, fn: Function, context?: Object): this 8395 // Removes a previously added listener function. 8396 // Note that if you passed a custom context to on, you must pass the same 8397 // context to `off` in order to remove the listener. 8398 8399 // @alternative 8400 // @function off(el: HTMLElement, eventMap: Object, context?: Object): this 8401 // Removes a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}` 8402 8403 // @alternative 8404 // @function off(el: HTMLElement, types: String): this 8405 // Removes all previously added listeners of given types. 8406 8407 // @alternative 8408 // @function off(el: HTMLElement): this 8409 // Removes all previously added listeners from given HTMLElement 8410 function off(obj, types, fn, context) { 8411 8412 if (arguments.length === 1) { 8413 batchRemove(obj); 8414 delete obj[eventsKey]; 8415 8416 } else if (types && typeof types === 'object') { 8417 for (var type in types) { 8418 removeOne(obj, type, types[type], fn); 8419 } 8420 8421 } else { 8422 types = splitWords(types); 8423 8424 if (arguments.length === 2) { 8425 batchRemove(obj, function (type) { 8426 return indexOf(types, type) !== -1; 8427 }); 8428 } else { 8429 for (var i = 0, len = types.length; i < len; i++) { 8430 removeOne(obj, types[i], fn, context); 8431 } 8432 } 8433 } 8434 8435 return this; 8436 } 8437 8438 function batchRemove(obj, filterFn) { 8439 for (var id in obj[eventsKey]) { 8440 var type = id.split(/\d/)[0]; 8441 if (!filterFn || filterFn(type)) { 8442 removeOne(obj, type, null, null, id); 8443 } 8444 } 8445 } 8446 8447 var mouseSubst = { 8448 mouseenter: 'mouseover', 8449 mouseleave: 'mouseout', 8450 wheel: !('onwheel' in window) && 'mousewheel' 8451 }; 8452 8453 function addOne(obj, type, fn, context) { 8454 var id = type + stamp(fn) + (context ? '_' + stamp(context) : ''); 8455 8456 if (obj[eventsKey] && obj[eventsKey][id]) { return this; } 8457 8458 var handler = function (e) { 8459 return fn.call(context || obj, e || window.event); 8460 }; 8461 8462 var originalHandler = handler; 8463 8464 if (!Browser.touchNative && Browser.pointer && type.indexOf('touch') === 0) { 8465 // Needs DomEvent.Pointer.js 8466 handler = addPointerListener(obj, type, handler); 8467 8468 } else if (Browser.touch && (type === 'dblclick')) { 8469 handler = addDoubleTapListener(obj, handler); 8470 8471 } else if ('addEventListener' in obj) { 8472 8473 if (type === 'touchstart' || type === 'touchmove' || type === 'wheel' || type === 'mousewheel') { 8474 obj.addEventListener(mouseSubst[type] || type, handler, Browser.passiveEvents ? {passive: false} : false); 8475 8476 } else if (type === 'mouseenter' || type === 'mouseleave') { 8477 handler = function (e) { 8478 e = e || window.event; 8479 if (isExternalTarget(obj, e)) { 8480 originalHandler(e); 8481 } 8482 }; 8483 obj.addEventListener(mouseSubst[type], handler, false); 8484 8485 } else { 8486 obj.addEventListener(type, originalHandler, false); 8487 } 8488 8489 } else { 8490 obj.attachEvent('on' + type, handler); 8491 } 8492 8493 obj[eventsKey] = obj[eventsKey] || {}; 8494 obj[eventsKey][id] = handler; 8495 } 8496 8497 function removeOne(obj, type, fn, context, id) { 8498 id = id || type + stamp(fn) + (context ? '_' + stamp(context) : ''); 8499 var handler = obj[eventsKey] && obj[eventsKey][id]; 8500 8501 if (!handler) { return this; } 8502 8503 if (!Browser.touchNative && Browser.pointer && type.indexOf('touch') === 0) { 8504 removePointerListener(obj, type, handler); 8505 8506 } else if (Browser.touch && (type === 'dblclick')) { 8507 removeDoubleTapListener(obj, handler); 8508 8509 } else if ('removeEventListener' in obj) { 8510 8511 obj.removeEventListener(mouseSubst[type] || type, handler, false); 8512 8513 } else { 8514 obj.detachEvent('on' + type, handler); 8515 } 8516 8517 obj[eventsKey][id] = null; 8518 } 8519 8520 // @function stopPropagation(ev: DOMEvent): this 8521 // Stop the given event from propagation to parent elements. Used inside the listener functions: 8522 // ```js 8523 // L.DomEvent.on(div, 'click', function (ev) { 8524 // L.DomEvent.stopPropagation(ev); 8525 // }); 8526 // ``` 8527 function stopPropagation(e) { 8528 8529 if (e.stopPropagation) { 8530 e.stopPropagation(); 8531 } else if (e.originalEvent) { // In case of Leaflet event. 8532 e.originalEvent._stopped = true; 8533 } else { 8534 e.cancelBubble = true; 8535 } 8536 8537 return this; 8538 } 8539 8540 // @function disableScrollPropagation(el: HTMLElement): this 8541 // Adds `stopPropagation` to the element's `'wheel'` events (plus browser variants). 8542 function disableScrollPropagation(el) { 8543 addOne(el, 'wheel', stopPropagation); 8544 return this; 8545 } 8546 8547 // @function disableClickPropagation(el: HTMLElement): this 8548 // Adds `stopPropagation` to the element's `'click'`, `'dblclick'`, `'contextmenu'`, 8549 // `'mousedown'` and `'touchstart'` events (plus browser variants). 8550 function disableClickPropagation(el) { 8551 on(el, 'mousedown touchstart dblclick contextmenu', stopPropagation); 8552 el['_leaflet_disable_click'] = true; 8553 return this; 8554 } 8555 8556 // @function preventDefault(ev: DOMEvent): this 8557 // Prevents the default action of the DOM Event `ev` from happening (such as 8558 // following a link in the href of the a element, or doing a POST request 8559 // with page reload when a `<form>` is submitted). 8560 // Use it inside listener functions. 8561 function preventDefault(e) { 8562 if (e.preventDefault) { 8563 e.preventDefault(); 8564 } else { 8565 e.returnValue = false; 8566 } 8567 return this; 8568 } 8569 8570 // @function stop(ev: DOMEvent): this 8571 // Does `stopPropagation` and `preventDefault` at the same time. 8572 function stop(e) { 8573 preventDefault(e); 8574 stopPropagation(e); 8575 return this; 8576 } 8577 8578 // @function getMousePosition(ev: DOMEvent, container?: HTMLElement): Point 8579 // Gets normalized mouse position from a DOM event relative to the 8580 // `container` (border excluded) or to the whole page if not specified. 8581 function getMousePosition(e, container) { 8582 if (!container) { 8583 return new Point(e.clientX, e.clientY); 8584 } 8585 8586 var scale = getScale(container), 8587 offset = scale.boundingClientRect; // left and top values are in page scale (like the event clientX/Y) 8588 8589 return new Point( 8590 // offset.left/top values are in page scale (like clientX/Y), 8591 // whereas clientLeft/Top (border width) values are the original values (before CSS scale applies). 8592 (e.clientX - offset.left) / scale.x - container.clientLeft, 8593 (e.clientY - offset.top) / scale.y - container.clientTop 8594 ); 8595 } 8596 8597 // Chrome on Win scrolls double the pixels as in other platforms (see #4538), 8598 // and Firefox scrolls device pixels, not CSS pixels 8599 var wheelPxFactor = 8600 (Browser.win && Browser.chrome) ? 2 * window.devicePixelRatio : 8601 Browser.gecko ? window.devicePixelRatio : 1; 8602 8603 // @function getWheelDelta(ev: DOMEvent): Number 8604 // Gets normalized wheel delta from a wheel DOM event, in vertical 8605 // pixels scrolled (negative if scrolling down). 8606 // Events from pointing devices without precise scrolling are mapped to 8607 // a best guess of 60 pixels. 8608 function getWheelDelta(e) { 8609 return (Browser.edge) ? e.wheelDeltaY / 2 : // Don't trust window-geometry-based delta 8610 (e.deltaY && e.deltaMode === 0) ? -e.deltaY / wheelPxFactor : // Pixels 8611 (e.deltaY && e.deltaMode === 1) ? -e.deltaY * 20 : // Lines 8612 (e.deltaY && e.deltaMode === 2) ? -e.deltaY * 60 : // Pages 8613 (e.deltaX || e.deltaZ) ? 0 : // Skip horizontal/depth wheel events 8614 e.wheelDelta ? (e.wheelDeltaY || e.wheelDelta) / 2 : // Legacy IE pixels 8615 (e.detail && Math.abs(e.detail) < 32765) ? -e.detail * 20 : // Legacy Moz lines 8616 e.detail ? e.detail / -32765 * 60 : // Legacy Moz pages 8617 0; 8618 } 8619 8620 // check if element really left/entered the event target (for mouseenter/mouseleave) 8621 function isExternalTarget(el, e) { 8622 8623 var related = e.relatedTarget; 8624 8625 if (!related) { return true; } 8626 8627 try { 8628 while (related && (related !== el)) { 8629 related = related.parentNode; 8630 } 8631 } catch (err) { 8632 return false; 8633 } 8634 return (related !== el); 8635 } 8636 8637 var DomEvent = { 8638 __proto__: null, 8639 on: on, 8640 off: off, 8641 stopPropagation: stopPropagation, 8642 disableScrollPropagation: disableScrollPropagation, 8643 disableClickPropagation: disableClickPropagation, 8644 preventDefault: preventDefault, 8645 stop: stop, 8646 getMousePosition: getMousePosition, 8647 getWheelDelta: getWheelDelta, 8648 isExternalTarget: isExternalTarget, 8649 addListener: on, 8650 removeListener: off 8651 }; 8652 8653 /* 8654 * @class PosAnimation 8655 * @aka L.PosAnimation 8656 * @inherits Evented 8657 * Used internally for panning animations, utilizing CSS3 Transitions for modern browsers and a timer fallback for IE6-9. 8658 * 8659 * @example 8660 * ```js 8661 * var fx = new L.PosAnimation(); 8662 * fx.run(el, [300, 500], 0.5);
vendor: 17,754 bytes, lines 8662-9185
8662 8663 * ``` 8664 * 8665 * @constructor L.PosAnimation() 8666 * Creates a `PosAnimation` object. 8667 * 8668 */ 8669 8670 var PosAnimation = Evented.extend({ 8671 8672 // @method run(el: HTMLElement, newPos: Point, duration?: Number, easeLinearity?: Number) 8673 // Run an animation of a given element to a new position, optionally setting 8674 // duration in seconds (`0.25` by default) and easing linearity factor (3rd 8675 // argument of the [cubic bezier curve](https://cubic-bezier.com/#0,0,.5,1), 8676 // `0.5` by default). 8677 run: function (el, newPos, duration, easeLinearity) { 8678 this.stop(); 8679 8680 this._el = el; 8681 this._inProgress = true; 8682 this._duration = duration || 0.25; 8683 this._easeOutPower = 1 / Math.max(easeLinearity || 0.5, 0.2); 8684 8685 this._startPos = getPosition(el); 8686 this._offset = newPos.subtract(this._startPos); 8687 this._startTime = +new Date(); 8688 8689 // @event start: Event 8690 // Fired when the animation starts 8691 this.fire('start'); 8692 8693 this._animate(); 8694 }, 8695 8696 // @method stop() 8697 // Stops the animation (if currently running). 8698 stop: function () { 8699 if (!this._inProgress) { return; } 8700 8701 this._step(true); 8702 this._complete(); 8703 }, 8704 8705 _animate: function () { 8706 // animation loop 8707 this._animId = requestAnimFrame(this._animate, this); 8708 this._step(); 8709 }, 8710 8711 _step: function (round) { 8712 var elapsed = (+new Date()) - this._startTime, 8713 duration = this._duration * 1000; 8714 8715 if (elapsed < duration) { 8716 this._runFrame(this._easeOut(elapsed / duration), round); 8717 } else { 8718 this._runFrame(1); 8719 this._complete(); 8720 } 8721 }, 8722 8723 _runFrame: function (progress, round) { 8724 var pos = this._startPos.add(this._offset.multiplyBy(progress)); 8725 if (round) { 8726 pos._round(); 8727 } 8728 setPosition(this._el, pos); 8729 8730 // @event step: Event 8731 // Fired continuously during the animation. 8732 this.fire('step'); 8733 }, 8734 8735 _complete: function () { 8736 cancelAnimFrame(this._animId); 8737 8738 this._inProgress = false; 8739 // @event end: Event 8740 // Fired when the animation ends. 8741 this.fire('end'); 8742 }, 8743 8744 _easeOut: function (t) { 8745 return 1 - Math.pow(1 - t, this._easeOutPower); 8746 } 8747 }); 8748 8749 /* 8750 * @class Map 8751 * @aka L.Map 8752 * @inherits Evented 8753 * 8754 * The central class of the API â it is used to create a map on a page and manipulate it. 8755 * 8756 * @example 8757 * 8758 * ```js 8759 * // initialize the map on the "map" div with a given center and zoom 8760 * var map = L.map('map', { 8761 * center: [51.505, -0.09], 8762 * zoom: 13 8763 * }); 8764 * ``` 8765 * 8766 */ 8767 8768 var Map = Evented.extend({ 8769 8770 options: { 8771 // @section Map State Options 8772 // @option crs: CRS = L.CRS.EPSG3857 8773 // The [Coordinate Reference System](#crs) to use. Don't change this if you're not 8774 // sure what it means. 8775 crs: EPSG3857, 8776 8777 // @option center: LatLng = undefined 8778 // Initial geographic center of the map 8779 center: undefined, 8780 8781 // @option zoom: Number = undefined 8782 // Initial map zoom level 8783 zoom: undefined, 8784 8785 // @option minZoom: Number = * 8786 // Minimum zoom level of the map. 8787 // If not specified and at least one `GridLayer` or `TileLayer` is in the map, 8788 // the lowest of their `minZoom` options will be used instead. 8789 minZoom: undefined, 8790 8791 // @option maxZoom: Number = * 8792 // Maximum zoom level of the map. 8793 // If not specified and at least one `GridLayer` or `TileLayer` is in the map, 8794 // the highest of their `maxZoom` options will be used instead. 8795 maxZoom: undefined, 8796 8797 // @option layers: Layer[] = [] 8798 // Array of layers that will be added to the map initially 8799 layers: [], 8800 8801 // @option maxBounds: LatLngBounds = null 8802 // When this option is set, the map restricts the view to the given 8803 // geographical bounds, bouncing the user back if the user tries to pan 8804 // outside the view. To set the restriction dynamically, use 8805 // [`setMaxBounds`](#map-setmaxbounds) method. 8806 maxBounds: undefined, 8807 8808 // @option renderer: Renderer = * 8809 // The default method for drawing vector layers on the map. `L.SVG` 8810 // or `L.Canvas` by default depending on browser support. 8811 renderer: undefined, 8812 8813 8814 // @section Animation Options 8815 // @option zoomAnimation: Boolean = true 8816 // Whether the map zoom animation is enabled. By default it's enabled 8817 // in all browsers that support CSS3 Transitions except Android. 8818 zoomAnimation: true, 8819 8820 // @option zoomAnimationThreshold: Number = 4 8821 // Won't animate zoom if the zoom difference exceeds this value. 8822 zoomAnimationThreshold: 4, 8823 8824 // @option fadeAnimation: Boolean = true 8825 // Whether the tile fade animation is enabled. By default it's enabled 8826 // in all browsers that support CSS3 Transitions except Android. 8827 fadeAnimation: true, 8828 8829 // @option markerZoomAnimation: Boolean = true 8830 // Whether markers animate their zoom with the zoom animation, if disabled 8831 // they will disappear for the length of the animation. By default it's 8832 // enabled in all browsers that support CSS3 Transitions except Android. 8833 markerZoomAnimation: true, 8834 8835 // @option transform3DLimit: Number = 2^23 8836 // Defines the maximum size of a CSS translation transform. The default 8837 // value should not be changed unless a web browser positions layers in 8838 // the wrong place after doing a large `panBy`. 8839 transform3DLimit: 8388608, // Precision limit of a 32-bit float 8840 8841 // @section Interaction Options 8842 // @option zoomSnap: Number = 1 8843 // Forces the map's zoom level to always be a multiple of this, particularly 8844 // right after a [`fitBounds()`](#map-fitbounds) or a pinch-zoom. 8845 // By default, the zoom level snaps to the nearest integer; lower values 8846 // (e.g. `0.5` or `0.1`) allow for greater granularity. A value of `0` 8847 // means the zoom level will not be snapped after `fitBounds` or a pinch-zoom. 8848 zoomSnap: 1, 8849 8850 // @option zoomDelta: Number = 1 8851 // Controls how much the map's zoom level will change after a 8852 // [`zoomIn()`](#map-zoomin), [`zoomOut()`](#map-zoomout), pressing `+` 8853 // or `-` on the keyboard, or using the [zoom controls](#control-zoom). 8854 // Values smaller than `1` (e.g. `0.5`) allow for greater granularity. 8855 zoomDelta: 1, 8856 8857 // @option trackResize: Boolean = true 8858 // Whether the map automatically handles browser window resize to update itself. 8859 trackResize: true 8860 }, 8861 8862 initialize: function (id, options) { // (HTMLElement or String, Object) 8863 options = setOptions(this, options); 8864 8865 // Make sure to assign internal flags at the beginning, 8866 // to avoid inconsistent state in some edge cases. 8867 this._handlers = []; 8868 this._layers = {}; 8869 this._zoomBoundLayers = {}; 8870 this._sizeChanged = true; 8871 8872 this._initContainer(id); 8873 this._initLayout(); 8874 8875 // hack for https://github.com/Leaflet/Leaflet/issues/1980 8876 this._onResize = bind(this._onResize, this); 8877 8878 this._initEvents(); 8879 8880 if (options.maxBounds) { 8881 this.setMaxBounds(options.maxBounds); 8882 } 8883 8884 if (options.zoom !== undefined) { 8885 this._zoom = this._limitZoom(options.zoom); 8886 } 8887 8888 if (options.center && options.zoom !== undefined) { 8889 this.setView(toLatLng(options.center), options.zoom, {reset: true}); 8890 } 8891 8892 this.callInitHooks(); 8893 8894 // don't animate on browsers without hardware-accelerated transitions or old Android/Opera 8895 this._zoomAnimated = TRANSITION && Browser.any3d && !Browser.mobileOpera && 8896 this.options.zoomAnimation; 8897 8898 // zoom transitions run with the same duration for all layers, so if one of transitionend events 8899 // happens after starting zoom animation (propagating to the map pane), we know that it ended globally 8900 if (this._zoomAnimated) { 8901 this._createAnimProxy(); 8902 on(this._proxy, TRANSITION_END, this._catchTransitionEnd, this); 8903 } 8904 8905 this._addLayers(this.options.layers); 8906 }, 8907 8908 8909 // @section Methods for modifying map state 8910 8911 // @method setView(center: LatLng, zoom: Number, options?: Zoom/pan options): this 8912 // Sets the view of the map (geographical center and zoom) with the given 8913 // animation options. 8914 setView: function (center, zoom, options) { 8915 8916 zoom = zoom === undefined ? this._zoom : this._limitZoom(zoom); 8917 center = this._limitCenter(toLatLng(center), zoom, this.options.maxBounds); 8918 options = options || {}; 8919 8920 this._stop(); 8921 8922 if (this._loaded && !options.reset && options !== true) { 8923 8924 if (options.animate !== undefined) { 8925 options.zoom = extend({animate: options.animate}, options.zoom); 8926 options.pan = extend({animate: options.animate, duration: options.duration}, options.pan); 8927 } 8928 8929 // try animating pan or zoom 8930 var moved = (this._zoom !== zoom) ? 8931 this._tryAnimatedZoom && this._tryAnimatedZoom(center, zoom, options.zoom) : 8932 this._tryAnimatedPan(center, options.pan); 8933 8934 if (moved) { 8935 // prevent resize handler call, the view will refresh after animation anyway 8936 clearTimeout(this._sizeTimer); 8937 return this; 8938 } 8939 } 8940 8941 // animation didn't start, just reset the map view 8942 this._resetView(center, zoom); 8943 8944 return this; 8945 }, 8946 8947 // @method setZoom(zoom: Number, options?: Zoom/pan options): this 8948 // Sets the zoom of the map. 8949 setZoom: function (zoom, options) { 8950 if (!this._loaded) { 8951 this._zoom = zoom; 8952 return this; 8953 } 8954 return this.setView(this.getCenter(), zoom, {zoom: options}); 8955 }, 8956 8957 // @method zoomIn(delta?: Number, options?: Zoom options): this 8958 // Increases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default). 8959 zoomIn: function (delta, options) { 8960 delta = delta || (Browser.any3d ? this.options.zoomDelta : 1); 8961 return this.setZoom(this._zoom + delta, options); 8962 }, 8963 8964 // @method zoomOut(delta?: Number, options?: Zoom options): this 8965 // Decreases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default). 8966 zoomOut: function (delta, options) { 8967 delta = delta || (Browser.any3d ? this.options.zoomDelta : 1); 8968 return this.setZoom(this._zoom - delta, options); 8969 }, 8970 8971 // @method setZoomAround(latlng: LatLng, zoom: Number, options: Zoom options): this 8972 // Zooms the map while keeping a specified geographical point on the map 8973 // stationary (e.g. used internally for scroll zoom and double-click zoom). 8974 // @alternative 8975 // @method setZoomAround(offset: Point, zoom: Number, options: Zoom options): this 8976 // Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary. 8977 setZoomAround: function (latlng, zoom, options) { 8978 var scale = this.getZoomScale(zoom), 8979 viewHalf = this.getSize().divideBy(2), 8980 containerPoint = latlng instanceof Point ? latlng : this.latLngToContainerPoint(latlng), 8981 8982 centerOffset = containerPoint.subtract(viewHalf).multiplyBy(1 - 1 / scale), 8983 newCenter = this.containerPointToLatLng(viewHalf.add(centerOffset)); 8984 8985 return this.setView(newCenter, zoom, {zoom: options}); 8986 }, 8987 8988 _getBoundsCenterZoom: function (bounds, options) { 8989 8990 options = options || {}; 8991 bounds = bounds.getBounds ? bounds.getBounds() : toLatLngBounds(bounds); 8992 8993 var paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]), 8994 paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]), 8995 8996 zoom = this.getBoundsZoom(bounds, false, paddingTL.add(paddingBR)); 8997 8998 zoom = (typeof options.maxZoom === 'number') ? Math.min(options.maxZoom, zoom) : zoom; 8999 9000 if (zoom === Infinity) { 9001 return { 9002 center: bounds.getCenter(), 9003 zoom: zoom 9004 }; 9005 } 9006 9007 var paddingOffset = paddingBR.subtract(paddingTL).divideBy(2), 9008 9009 swPoint = this.project(bounds.getSouthWest(), zoom), 9010 nePoint = this.project(bounds.getNorthEast(), zoom), 9011 center = this.unproject(swPoint.add(nePoint).divideBy(2).add(paddingOffset), zoom); 9012 9013 return { 9014 center: center, 9015 zoom: zoom 9016 }; 9017 }, 9018 9019 // @method fitBounds(bounds: LatLngBounds, options?: fitBounds options): this 9020 // Sets a map view that contains the given geographical bounds with the 9021 // maximum zoom level possible. 9022 fitBounds: function (bounds, options) { 9023 9024 bounds = toLatLngBounds(bounds); 9025 9026 if (!bounds.isValid()) { 9027 throw new Error('Bounds are not valid.'); 9028 } 9029 9030 var target = this._getBoundsCenterZoom(bounds, options); 9031 return this.setView(target.center, target.zoom, options); 9032 }, 9033 9034 // @method fitWorld(options?: fitBounds options): this 9035 // Sets a map view that mostly contains the whole world with the maximum 9036 // zoom level possible. 9037 fitWorld: function (options) { 9038 return this.fitBounds([[-90, -180], [90, 180]], options); 9039 }, 9040 9041 // @method panTo(latlng: LatLng, options?: Pan options): this 9042 // Pans the map to a given center. 9043 panTo: function (center, options) { // (LatLng) 9044 return this.setView(center, this._zoom, {pan: options}); 9045 }, 9046 9047 // @method panBy(offset: Point, options?: Pan options): this 9048 // Pans the map by a given number of pixels (animated). 9049 panBy: function (offset, options) { 9050 offset = toPoint(offset).round(); 9051 options = options || {}; 9052 9053 if (!offset.x && !offset.y) { 9054 return this.fire('moveend'); 9055 } 9056 // If we pan too far, Chrome gets issues with tiles 9057 // and makes them disappear or appear in the wrong place (slightly offset) #2602 9058 if (options.animate !== true && !this.getSize().contains(offset)) { 9059 this._resetView(this.unproject(this.project(this.getCenter()).add(offset)), this.getZoom()); 9060 return this; 9061 } 9062 9063 if (!this._panAnim) { 9064 this._panAnim = new PosAnimation(); 9065 9066 this._panAnim.on({ 9067 'step': this._onPanTransitionStep, 9068 'end': this._onPanTransitionEnd 9069 }, this); 9070 } 9071 9072 // don't fire movestart if animating inertia 9073 if (!options.noMoveStart) { 9074 this.fire('movestart'); 9075 } 9076 9077 // animate pan unless animate: false specified 9078 if (options.animate !== false) { 9079 addClass(this._mapPane, 'leaflet-pan-anim'); 9080 9081 var newPos = this._getMapPanePos().subtract(offset).round(); 9082 this._panAnim.run(this._mapPane, newPos, options.duration || 0.25, options.easeLinearity); 9083 } else { 9084 this._rawPanBy(offset); 9085 this.fire('move').fire('moveend'); 9086 } 9087 9088 return this; 9089 }, 9090 9091 // @method flyTo(latlng: LatLng, zoom?: Number, options?: Zoom/pan options): this 9092 // Sets the view of the map (geographical center and zoom) performing a smooth 9093 // pan-zoom animation. 9094 flyTo: function (targetCenter, targetZoom, options) { 9095 9096 options = options || {}; 9097 if (options.animate === false || !Browser.any3d) { 9098 return this.setView(targetCenter, targetZoom, options); 9099 } 9100 9101 this._stop(); 9102 9103 var from = this.project(this.getCenter()), 9104 to = this.project(targetCenter), 9105 size = this.getSize(), 9106 startZoom = this._zoom; 9107 9108 targetCenter = toLatLng(targetCenter); 9109 targetZoom = targetZoom === undefined ? startZoom : targetZoom; 9110 9111 var w0 = Math.max(size.x, size.y), 9112 w1 = w0 * this.getZoomScale(startZoom, targetZoom), 9113 u1 = (to.distanceTo(from)) || 1, 9114 rho = 1.42, 9115 rho2 = rho * rho; 9116 9117 function r(i) { 9118 var s1 = i ? -1 : 1, 9119 s2 = i ? w1 : w0, 9120 t1 = w1 * w1 - w0 * w0 + s1 * rho2 * rho2 * u1 * u1, 9121 b1 = 2 * s2 * rho2 * u1, 9122 b = t1 / b1, 9123 sq = Math.sqrt(b * b + 1) - b; 9124 9125 // workaround for floating point precision bug when sq = 0, log = -Infinite, 9126 // thus triggering an infinite loop in flyTo 9127 var log = sq < 0.000000001 ? -18 : Math.log(sq); 9128 9129 return log; 9130 } 9131 9132 function sinh(n) { return (Math.exp(n) - Math.exp(-n)) / 2; } 9133 function cosh(n) { return (Math.exp(n) + Math.exp(-n)) / 2; } 9134 function tanh(n) { return sinh(n) / cosh(n); } 9135 9136 var r0 = r(0); 9137 9138 function w(s) { return w0 * (cosh(r0) / cosh(r0 + rho * s)); } 9139 function u(s) { return w0 * (cosh(r0) * tanh(r0 + rho * s) - sinh(r0)) / rho2; } 9140 9141 function easeOut(t) { return 1 - Math.pow(1 - t, 1.5); } 9142 9143 var start = Date.now(), 9144 S = (r(1) - r0) / rho, 9145 duration = options.duration ? 1000 * options.duration : 1000 * S * 0.8; 9146 9147 function frame() { 9148 var t = (Date.now() - start) / duration, 9149 s = easeOut(t) * S; 9150 9151 if (t <= 1) { 9152 this._flyToFrame = requestAnimFrame(frame, this); 9153 9154 this._move( 9155 this.unproject(from.add(to.subtract(from).multiplyBy(u(s) / u1)), startZoom), 9156 this.getScaleZoom(w0 / w(s), startZoom), 9157 {flyTo: true}); 9158 9159 } else { 9160 this 9161 ._move(targetCenter, targetZoom) 9162 ._moveEnd(true); 9163 } 9164 } 9165 9166 this._moveStart(true, options.noMoveStart); 9167 9168 frame.call(this); 9169 return this; 9170 }, 9171 9172 // @method flyToBounds(bounds: LatLngBounds, options?: fitBounds options): this 9173 // Sets the view of the map with a smooth animation like [`flyTo`](#map-flyto), 9174 // but takes a bounds parameter like [`fitBounds`](#map-fitbounds). 9175 flyToBounds: function (bounds, options) { 9176 var target = this._getBoundsCenterZoom(bounds, options); 9177 return this.flyTo(target.center, target.zoom, options); 9178 }, 9179 9180 // @method setMaxBounds(bounds: LatLngBounds): this 9181 // Restricts the map view to the given bounds (see the [maxBounds](#map-maxbounds) option). 9182 setMaxBounds: function (bounds) { 9183 bounds = toLatLngBounds(bounds); 9184 9185 if (
9185!bounds.isValid()) { 9186 this.options.maxBounds = null; 9187 return this.off('moveend', this._panInsideMaxBounds); 9188 } else if (this.options.maxBounds) { 9189 this.off('moveend', this._panInsideMaxBounds)
vendor: 23,957 bytes, lines 9189-9849
9189; 9190 } 9191 9192 this.options.maxBounds = bounds; 9193 9194 if (this._loaded) { 9195 this._panInsideMaxBounds(); 9196 } 9197 9198 return this.on('moveend', this._panInsideMaxBounds); 9199 }, 9200 9201 // @method setMinZoom(zoom: Number): this 9202 // Sets the lower limit for the available zoom levels (see the [minZoom](#map-minzoom) option). 9203 setMinZoom: function (zoom) { 9204 var oldZoom = this.options.minZoom; 9205 this.options.minZoom = zoom; 9206 9207 if (this._loaded && oldZoom !== zoom) { 9208 this.fire('zoomlevelschange'); 9209 9210 if (this.getZoom() < this.options.minZoom) { 9211 return this.setZoom(zoom); 9212 } 9213 } 9214 9215 return this; 9216 }, 9217 9218 // @method setMaxZoom(zoom: Number): this 9219 // Sets the upper limit for the available zoom levels (see the [maxZoom](#map-maxzoom) option). 9220 setMaxZoom: function (zoom) { 9221 var oldZoom = this.options.maxZoom; 9222 this.options.maxZoom = zoom; 9223 9224 if (this._loaded && oldZoom !== zoom) { 9225 this.fire('zoomlevelschange'); 9226 9227 if (this.getZoom() > this.options.maxZoom) { 9228 return this.setZoom(zoom); 9229 } 9230 } 9231 9232 return this; 9233 }, 9234 9235 // @method panInsideBounds(bounds: LatLngBounds, options?: Pan options): this 9236 // Pans the map to the closest view that would lie inside the given bounds (if it's not already), controlling the animation using the options specific, if any. 9237 panInsideBounds: function (bounds, options) { 9238 this._enforcingBounds = true; 9239 var center = this.getCenter(), 9240 newCenter = this._limitCenter(center, this._zoom, toLatLngBounds(bounds)); 9241 9242 if (!center.equals(newCenter)) { 9243 this.panTo(newCenter, options); 9244 } 9245 9246 this._enforcingBounds = false; 9247 return this; 9248 }, 9249 9250 // @method panInside(latlng: LatLng, options?: padding options): this 9251 // Pans the map the minimum amount to make the `latlng` visible. Use 9252 // padding options to fit the display to more restricted bounds. 9253 // If `latlng` is already within the (optionally padded) display bounds, 9254 // the map will not be panned. 9255 panInside: function (latlng, options) { 9256 options = options || {}; 9257 9258 var paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]), 9259 paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]), 9260 pixelCenter = this.project(this.getCenter()), 9261 pixelPoint = this.project(latlng), 9262 pixelBounds = this.getPixelBounds(), 9263 paddedBounds = toBounds([pixelBounds.min.add(paddingTL), pixelBounds.max.subtract(paddingBR)]), 9264 paddedSize = paddedBounds.getSize(); 9265 9266 if (!paddedBounds.contains(pixelPoint)) { 9267 this._enforcingBounds = true; 9268 var centerOffset = pixelPoint.subtract(paddedBounds.getCenter()); 9269 var offset = paddedBounds.extend(pixelPoint).getSize().subtract(paddedSize); 9270 pixelCenter.x += centerOffset.x < 0 ? -offset.x : offset.x; 9271 pixelCenter.y += centerOffset.y < 0 ? -offset.y : offset.y; 9272 this.panTo(this.unproject(pixelCenter), options); 9273 this._enforcingBounds = false; 9274 } 9275 return this; 9276 }, 9277 9278 // @method invalidateSize(options: Zoom/pan options): this 9279 // Checks if the map container size changed and updates the map if so â 9280 // call it after you've changed the map size dynamically, also animating 9281 // pan by default. If `options.pan` is `false`, panning will not occur. 9282 // If `options.debounceMoveend` is `true`, it will delay `moveend` event so 9283 // that it doesn't happen often even if the method is called many 9284 // times in a row. 9285 9286 // @alternative 9287 // @method invalidateSize(animate: Boolean): this 9288 // Checks if the map container size changed and updates the map if so â 9289 // call it after you've changed the map size dynamically, also animating 9290 // pan by default. 9291 invalidateSize: function (options) { 9292 if (!this._loaded) { return this; } 9293 9294 options = extend({ 9295 animate: false, 9296 pan: true 9297 }, options === true ? {animate: true} : options); 9298 9299 var oldSize = this.getSize(); 9300 this._sizeChanged = true; 9301 this._lastCenter = null; 9302 9303 var newSize = this.getSize(), 9304 oldCenter = oldSize.divideBy(2).round(), 9305 newCenter = newSize.divideBy(2).round(), 9306 offset = oldCenter.subtract(newCenter); 9307 9308 if (!offset.x && !offset.y) { return this; } 9309 9310 if (options.animate && options.pan) { 9311 this.panBy(offset); 9312 9313 } else { 9314 if (options.pan) { 9315 this._rawPanBy(offset); 9316 } 9317 9318 this.fire('move'); 9319 9320 if (options.debounceMoveend) { 9321 clearTimeout(this._sizeTimer); 9322 this._sizeTimer = setTimeout(bind(this.fire, this, 'moveend'), 200); 9323 } else { 9324 this.fire('moveend'); 9325 } 9326 } 9327 9328 // @section Map state change events 9329 // @event resize: ResizeEvent 9330 // Fired when the map is resized. 9331 return this.fire('resize', { 9332 oldSize: oldSize, 9333 newSize: newSize 9334 }); 9335 }, 9336 9337 // @section Methods for modifying map state 9338 // @method stop(): this 9339 // Stops the currently running `panTo` or `flyTo` animation, if any. 9340 stop: function () { 9341 this.setZoom(this._limitZoom(this._zoom)); 9342 if (!this.options.zoomSnap) { 9343 this.fire('viewreset'); 9344 } 9345 return this._stop(); 9346 }, 9347 9348 // @section Geolocation methods 9349 // @method locate(options?: Locate options): this 9350 // Tries to locate the user using the Geolocation API, firing a [`locationfound`](#map-locationfound) 9351 // event with location data on success or a [`locationerror`](#map-locationerror) event on failure, 9352 // and optionally sets the map view to the user's location with respect to 9353 // detection accuracy (or to the world view if geolocation failed). 9354 // Note that, if your page doesn't use HTTPS, this method will fail in 9355 // modern browsers ([Chrome 50 and newer](https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins)) 9356 // See `Locate options` for more details. 9357 locate: function (options) { 9358 9359 options = this._locateOptions = extend({ 9360 timeout: 10000, 9361 watch: false 9362 // setView: false 9363 // maxZoom: <Number> 9364 // maximumAge: 0 9365 // enableHighAccuracy: false 9366 }, options); 9367 9368 if (!('geolocation' in navigator)) { 9369 this._handleGeolocationError({ 9370 code: 0, 9371 message: 'Geolocation not supported.' 9372 }); 9373 return this; 9374 } 9375 9376 var onResponse = bind(this._handleGeolocationResponse, this), 9377 onError = bind(this._handleGeolocationError, this); 9378 9379 if (options.watch) { 9380 this._locationWatchId = 9381 navigator.geolocation.watchPosition(onResponse, onError, options); 9382 } else { 9383 navigator.geolocation.getCurrentPosition(onResponse, onError, options); 9384 } 9385 return this; 9386 }, 9387 9388 // @method stopLocate(): this 9389 // Stops watching location previously initiated by `map.locate({watch: true})` 9390 // and aborts resetting the map view if map.locate was called with 9391 // `{setView: true}`. 9392 stopLocate: function () { 9393 if (navigator.geolocation && navigator.geolocation.clearWatch) { 9394 navigator.geolocation.clearWatch(this._locationWatchId); 9395 } 9396 if (this._locateOptions) { 9397 this._locateOptions.setView = false; 9398 } 9399 return this; 9400 }, 9401 9402 _handleGeolocationError: function (error) { 9403 if (!this._container._leaflet_id) { return; } 9404 9405 var c = error.code, 9406 message = error.message || 9407 (c === 1 ? 'permission denied' : 9408 (c === 2 ? 'position unavailable' : 'timeout')); 9409 9410 if (this._locateOptions.setView && !this._loaded) { 9411 this.fitWorld(); 9412 } 9413 9414 // @section Location events 9415 // @event locationerror: ErrorEvent 9416 // Fired when geolocation (using the [`locate`](#map-locate) method) failed. 9417 this.fire('locationerror', { 9418 code: c, 9419 message: 'Geolocation error: ' + message + '.' 9420 }); 9421 }, 9422 9423 _handleGeolocationResponse: function (pos) { 9424 if (!this._container._leaflet_id) { return; } 9425 9426 var lat = pos.coords.latitude, 9427 lng = pos.coords.longitude, 9428 latlng = new LatLng(lat, lng), 9429 bounds = latlng.toBounds(pos.coords.accuracy * 2), 9430 options = this._locateOptions; 9431 9432 if (options.setView) { 9433 var zoom = this.getBoundsZoom(bounds); 9434 this.setView(latlng, options.maxZoom ? Math.min(zoom, options.maxZoom) : zoom); 9435 } 9436 9437 var data = { 9438 latlng: latlng, 9439 bounds: bounds, 9440 timestamp: pos.timestamp 9441 }; 9442 9443 for (var i in pos.coords) { 9444 if (typeof pos.coords[i] === 'number') { 9445 data[i] = pos.coords[i]; 9446 } 9447 } 9448 9449 // @event locationfound: LocationEvent 9450 // Fired when geolocation (using the [`locate`](#map-locate) method) 9451 // went successfully. 9452 this.fire('locationfound', data); 9453 }, 9454 9455 // TODO Appropriate docs section? 9456 // @section Other Methods 9457 // @method addHandler(name: String, HandlerClass: Function): this 9458 // Adds a new `Handler` to the map, given its name and constructor function. 9459 addHandler: function (name, HandlerClass) { 9460 if (!HandlerClass) { return this; } 9461 9462 var handler = this[name] = new HandlerClass(this); 9463 9464 this._handlers.push(handler); 9465 9466 if (this.options[name]) { 9467 handler.enable(); 9468 } 9469 9470 return this; 9471 }, 9472 9473 // @method remove(): this 9474 // Destroys the map and clears all related event listeners. 9475 remove: function () { 9476 9477 this._initEvents(true); 9478 if (this.options.maxBounds) { this.off('moveend', this._panInsideMaxBounds); } 9479 9480 if (this._containerId !== this._container._leaflet_id) { 9481 throw new Error('Map container is being reused by another instance'); 9482 } 9483 9484 try { 9485 // throws error in IE6-8 9486 delete this._container._leaflet_id; 9487 delete this._containerId; 9488 } catch (e) { 9489 /*eslint-disable */ 9490 this._container._leaflet_id = undefined; 9491 /* eslint-enable */ 9492 this._containerId = undefined; 9493 } 9494 9495 if (this._locationWatchId !== undefined) { 9496 this.stopLocate(); 9497 } 9498 9499 this._stop(); 9500 9501 remove(this._mapPane); 9502 9503 if (this._clearControlPos) { 9504 this._clearControlPos(); 9505 } 9506 if (this._resizeRequest) { 9507 cancelAnimFrame(this._resizeRequest); 9508 this._resizeRequest = null; 9509 } 9510 9511 this._clearHandlers(); 9512 9513 if (this._loaded) { 9514 // @section Map state change events 9515 // @event unload: Event 9516 // Fired when the map is destroyed with [remove](#map-remove) method. 9517 this.fire('unload'); 9518 } 9519 9520 var i; 9521 for (i in this._layers) { 9522 this._layers[i].remove(); 9523 } 9524 for (i in this._panes) { 9525 remove(this._panes[i]); 9526 } 9527 9528 this._layers = []; 9529 this._panes = []; 9530 delete this._mapPane; 9531 delete this._renderer; 9532 9533 return this; 9534 }, 9535 9536 // @section Other Methods 9537 // @method createPane(name: String, container?: HTMLElement): HTMLElement 9538 // Creates a new [map pane](#map-pane) with the given name if it doesn't exist already, 9539 // then returns it. The pane is created as a child of `container`, or 9540 // as a child of the main map pane if not set. 9541 createPane: function (name, container) { 9542 var className = 'leaflet-pane' + (name ? ' leaflet-' + name.replace('Pane', '') + '-pane' : ''), 9543 pane = create$1('div', className, container || this._mapPane); 9544 9545 if (name) { 9546 this._panes[name] = pane; 9547 } 9548 return pane; 9549 }, 9550 9551 // @section Methods for Getting Map State 9552 9553 // @method getCenter(): LatLng 9554 // Returns the geographical center of the map view 9555 getCenter: function () { 9556 this._checkIfLoaded(); 9557 9558 if (this._lastCenter && !this._moved()) { 9559 return this._lastCenter; 9560 } 9561 return this.layerPointToLatLng(this._getCenterLayerPoint()); 9562 }, 9563 9564 // @method getZoom(): Number 9565 // Returns the current zoom level of the map view 9566 getZoom: function () { 9567 return this._zoom; 9568 }, 9569 9570 // @method getBounds(): LatLngBounds 9571 // Returns the geographical bounds visible in the current map view 9572 getBounds: function () { 9573 var bounds = this.getPixelBounds(), 9574 sw = this.unproject(bounds.getBottomLeft()), 9575 ne = this.unproject(bounds.getTopRight()); 9576 9577 return new LatLngBounds(sw, ne); 9578 }, 9579 9580 // @method getMinZoom(): Number 9581 // Returns the minimum zoom level of the map (if set in the `minZoom` option of the map or of any layers), or `0` by default. 9582 getMinZoom: function () { 9583 return this.options.minZoom === undefined ? this._layersMinZoom || 0 : this.options.minZoom; 9584 }, 9585 9586 // @method getMaxZoom(): Number 9587 // Returns the maximum zoom level of the map (if set in the `maxZoom` option of the map or of any layers). 9588 getMaxZoom: function () { 9589 return this.options.maxZoom === undefined ? 9590 (this._layersMaxZoom === undefined ? Infinity : this._layersMaxZoom) : 9591 this.options.maxZoom; 9592 }, 9593 9594 // @method getBoundsZoom(bounds: LatLngBounds, inside?: Boolean, padding?: Point): Number 9595 // Returns the maximum zoom level on which the given bounds fit to the map 9596 // view in its entirety. If `inside` (optional) is set to `true`, the method 9597 // instead returns the minimum zoom level on which the map view fits into 9598 // the given bounds in its entirety. 9599 getBoundsZoom: function (bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number 9600 bounds = toLatLngBounds(bounds); 9601 padding = toPoint(padding || [0, 0]); 9602 9603 var zoom = this.getZoom() || 0, 9604 min = this.getMinZoom(), 9605 max = this.getMaxZoom(), 9606 nw = bounds.getNorthWest(), 9607 se = bounds.getSouthEast(), 9608 size = this.getSize().subtract(padding), 9609 boundsSize = toBounds(this.project(se, zoom), this.project(nw, zoom)).getSize(), 9610 snap = Browser.any3d ? this.options.zoomSnap : 1, 9611 scalex = size.x / boundsSize.x, 9612 scaley = size.y / boundsSize.y, 9613 scale = inside ? Math.max(scalex, scaley) : Math.min(scalex, scaley); 9614 9615 zoom = this.getScaleZoom(scale, zoom); 9616 9617 if (snap) { 9618 zoom = Math.round(zoom / (snap / 100)) * (snap / 100); // don't jump if within 1% of a snap level 9619 zoom = inside ? Math.ceil(zoom / snap) * snap : Math.floor(zoom / snap) * snap; 9620 } 9621 9622 return Math.max(min, Math.min(max, zoom)); 9623 }, 9624 9625 // @method getSize(): Point 9626 // Returns the current size of the map container (in pixels). 9627 getSize: function () { 9628 if (!this._size || this._sizeChanged) { 9629 this._size = new Point( 9630 this._container.clientWidth || 0, 9631 this._container.clientHeight || 0); 9632 9633 this._sizeChanged = false; 9634 } 9635 return this._size.clone(); 9636 }, 9637 9638 // @method getPixelBounds(): Bounds 9639 // Returns the bounds of the current map view in projected pixel 9640 // coordinates (sometimes useful in layer and overlay implementations). 9641 getPixelBounds: function (center, zoom) { 9642 var topLeftPoint = this._getTopLeftPoint(center, zoom); 9643 return new Bounds(topLeftPoint, topLeftPoint.add(this.getSize())); 9644 }, 9645 9646 // TODO: Check semantics - isn't the pixel origin the 0,0 coord relative to 9647 // the map pane? "left point of the map layer" can be confusing, specially 9648 // since there can be negative offsets. 9649 // @method getPixelOrigin(): Point 9650 // Returns the projected pixel coordinates of the top left point of 9651 // the map layer (useful in custom layer and overlay implementations). 9652 getPixelOrigin: function () { 9653 this._checkIfLoaded(); 9654 return this._pixelOrigin; 9655 }, 9656 9657 // @method getPixelWorldBounds(zoom?: Number): Bounds 9658 // Returns the world's bounds in pixel coordinates for zoom level `zoom`. 9659 // If `zoom` is omitted, the map's current zoom level is used. 9660 getPixelWorldBounds: function (zoom) { 9661 return this.options.crs.getProjectedBounds(zoom === undefined ? this.getZoom() : zoom); 9662 }, 9663 9664 // @section Other Methods 9665 9666 // @method getPane(pane: String|HTMLElement): HTMLElement 9667 // Returns a [map pane](#map-pane), given its name or its HTML element (its identity). 9668 getPane: function (pane) { 9669 return typeof pane === 'string' ? this._panes[pane] : pane; 9670 }, 9671 9672 // @method getPanes(): Object 9673 // Returns a plain object containing the names of all [panes](#map-pane) as keys and 9674 // the panes as values. 9675 getPanes: function () { 9676 return this._panes; 9677 }, 9678 9679 // @method getContainer: HTMLElement 9680 // Returns the HTML element that contains the map. 9681 getContainer: function () { 9682 return this._container; 9683 }, 9684 9685 9686 // @section Conversion Methods 9687 9688 // @method getZoomScale(toZoom: Number, fromZoom: Number): Number 9689 // Returns the scale factor to be applied to a map transition from zoom level 9690 // `fromZoom` to `toZoom`. Used internally to help with zoom animations. 9691 getZoomScale: function (toZoom, fromZoom) { 9692 // TODO replace with universal implementation after refactoring projections 9693 var crs = this.options.crs; 9694 fromZoom = fromZoom === undefined ? this._zoom : fromZoom; 9695 return crs.scale(toZoom) / crs.scale(fromZoom); 9696 }, 9697 9698 // @method getScaleZoom(scale: Number, fromZoom: Number): Number 9699 // Returns the zoom level that the map would end up at, if it is at `fromZoom` 9700 // level and everything is scaled by a factor of `scale`. Inverse of 9701 // [`getZoomScale`](#map-getZoomScale). 9702 getScaleZoom: function (scale, fromZoom) { 9703 var crs = this.options.crs; 9704 fromZoom = fromZoom === undefined ? this._zoom : fromZoom; 9705 var zoom = crs.zoom(scale * crs.scale(fromZoom)); 9706 return isNaN(zoom) ? Infinity : zoom; 9707 }, 9708 9709 // @method project(latlng: LatLng, zoom: Number): Point 9710 // Projects a geographical coordinate `LatLng` according to the projection 9711 // of the map's CRS, then scales it according to `zoom` and the CRS's 9712 // `Transformation`. The result is pixel coordinate relative to 9713 // the CRS origin. 9714 project: function (latlng, zoom) { 9715 zoom = zoom === undefined ? this._zoom : zoom; 9716 return this.options.crs.latLngToPoint(toLatLng(latlng), zoom); 9717 }, 9718 9719 // @method unproject(point: Point, zoom: Number): LatLng 9720 // Inverse of [`project`](#map-project). 9721 unproject: function (point, zoom) { 9722 zoom = zoom === undefined ? this._zoom : zoom; 9723 return this.options.crs.pointToLatLng(toPoint(point), zoom); 9724 }, 9725 9726 // @method layerPointToLatLng(point: Point): LatLng 9727 // Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin), 9728 // returns the corresponding geographical coordinate (for the current zoom level). 9729 layerPointToLatLng: function (point) { 9730 var projectedPoint = toPoint(point).add(this.getPixelOrigin()); 9731 return this.unproject(projectedPoint); 9732 }, 9733 9734 // @method latLngToLayerPoint(latlng: LatLng): Point 9735 // Given a geographical coordinate, returns the corresponding pixel coordinate 9736 // relative to the [origin pixel](#map-getpixelorigin). 9737 latLngToLayerPoint: function (latlng) { 9738 var projectedPoint = this.project(toLatLng(latlng))._round(); 9739 return projectedPoint._subtract(this.getPixelOrigin()); 9740 }, 9741 9742 // @method wrapLatLng(latlng: LatLng): LatLng 9743 // Returns a `LatLng` where `lat` and `lng` has been wrapped according to the 9744 // map's CRS's `wrapLat` and `wrapLng` properties, if they are outside the 9745 // CRS's bounds. 9746 // By default this means longitude is wrapped around the dateline so its 9747 // value is between -180 and +180 degrees. 9748 wrapLatLng: function (latlng) { 9749 return this.options.crs.wrapLatLng(toLatLng(latlng)); 9750 }, 9751 9752 // @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds 9753 // Returns a `LatLngBounds` with the same size as the given one, ensuring that 9754 // its center is within the CRS's bounds. 9755 // By default this means the center longitude is wrapped around the dateline so its 9756 // value is between -180 and +180 degrees, and the majority of the bounds 9757 // overlaps the CRS's bounds. 9758 wrapLatLngBounds: function (latlng) { 9759 return this.options.crs.wrapLatLngBounds(toLatLngBounds(latlng)); 9760 }, 9761 9762 // @method distance(latlng1: LatLng, latlng2: LatLng): Number 9763 // Returns the distance between two geographical coordinates according to 9764 // the map's CRS. By default this measures distance in meters. 9765 distance: function (latlng1, latlng2) { 9766 return this.options.crs.distance(toLatLng(latlng1), toLatLng(latlng2)); 9767 }, 9768 9769 // @method containerPointToLayerPoint(point: Point): Point 9770 // Given a pixel coordinate relative to the map container, returns the corresponding 9771 // pixel coordinate relative to the [origin pixel](#map-getpixelorigin). 9772 containerPointToLayerPoint: function (point) { // (Point) 9773 return toPoint(point).subtract(this._getMapPanePos()); 9774 }, 9775 9776 // @method layerPointToContainerPoint(point: Point): Point 9777 // Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin), 9778 // returns the corresponding pixel coordinate relative to the map container. 9779 layerPointToContainerPoint: function (point) { // (Point) 9780 return toPoint(point).add(this._getMapPanePos()); 9781 }, 9782 9783 // @method containerPointToLatLng(point: Point): LatLng 9784 // Given a pixel coordinate relative to the map container, returns 9785 // the corresponding geographical coordinate (for the current zoom level). 9786 containerPointToLatLng: function (point) { 9787 var layerPoint = this.containerPointToLayerPoint(toPoint(point)); 9788 return this.layerPointToLatLng(layerPoint); 9789 }, 9790 9791 // @method latLngToContainerPoint(latlng: LatLng): Point 9792 // Given a geographical coordinate, returns the corresponding pixel coordinate 9793 // relative to the map container. 9794 latLngToContainerPoint: function (latlng) { 9795 return this.layerPointToContainerPoint(this.latLngToLayerPoint(toLatLng(latlng))); 9796 }, 9797 9798 // @method mouseEventToContainerPoint(ev: MouseEvent): Point 9799 // Given a MouseEvent object, returns the pixel coordinate relative to the 9800 // map container where the event took place. 9801 mouseEventToContainerPoint: function (e) { 9802 return getMousePosition(e, this._container); 9803 }, 9804 9805 // @method mouseEventToLayerPoint(ev: MouseEvent): Point 9806 // Given a MouseEvent object, returns the pixel coordinate relative to 9807 // the [origin pixel](#map-getpixelorigin) where the event took place. 9808 mouseEventToLayerPoint: function (e) { 9809 return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e)); 9810 }, 9811 9812 // @method mouseEventToLatLng(ev: MouseEvent): LatLng 9813 // Given a MouseEvent object, returns geographical coordinate where the 9814 // event took place. 9815 mouseEventToLatLng: function (e) { // (MouseEvent) 9816 return this.layerPointToLatLng(this.mouseEventToLayerPoint(e)); 9817 }, 9818 9819 9820 // map initialization methods 9821 9822 _initContainer: function (id) { 9823 var container = this._container = get(id); 9824 9825 if (!container) { 9826 throw new Error('Map container not found.'); 9827 } else if (container._leaflet_id) { 9828 throw new Error('Map container is already initialized.'); 9829 } 9830 9831 on(container, 'scroll', this._onScroll, this); 9832 this._containerId = stamp(container); 9833 }, 9834 9835 _initLayout: function () { 9836 var container = this._container; 9837 9838 this._fadeAnimated = this.options.fadeAnimation && Browser.any3d; 9839 9840 addClass(container, 'leaflet-container' + 9841 (Browser.touch ? ' leaflet-touch' : '') + 9842 (Browser.retina ? ' leaflet-retina' : '') + 9843 (Browser.ielt9 ? ' leaflet-oldie' : '') + 9844 (Browser.safari ? ' leaflet-safari' : '') + 9845 (this._fadeAnimated ? ' leaflet-fade-anim' : '')); 9846 9847 var position = getStyle(container, 'position'); 9848 9849 if (position !== 'absolute' && position !== 'relative' && position !== 'fixed'
vendor: 8,880 bytes, lines 9849-10116
9849) { 9850 container.style.position = 'relative'; 9851 } 9852 9853 this._initPanes(); 9854 9855 if (this._initControlPos) { 9856 this._initControlPos(); 9857 } 9858 }, 9859 9860 _initPanes: function () { 9861 var panes = this._panes = {}; 9862 this._paneRenderers = {}; 9863 9864 // @section 9865 // 9866 // Panes are DOM elements used to control the ordering of layers on the map. You 9867 // can access panes with [`map.getPane`](#map-getpane) or 9868 // [`map.getPanes`](#map-getpanes) methods. New panes can be created with the 9869 // [`map.createPane`](#map-createpane) method. 9870 // 9871 // Every map has the following default panes that differ only in zIndex. 9872 // 9873 // @pane mapPane: HTMLElement = 'auto' 9874 // Pane that contains all other map panes 9875 9876 this._mapPane = this.createPane('mapPane', this._container); 9877 setPosition(this._mapPane, new Point(0, 0)); 9878 9879 // @pane tilePane: HTMLElement = 200 9880 // Pane for `GridLayer`s and `TileLayer`s 9881 this.createPane('tilePane'); 9882 // @pane overlayPane: HTMLElement = 400 9883 // Pane for vectors (`Path`s, like `Polyline`s and `Polygon`s), `ImageOverlay`s and `VideoOverlay`s 9884 this.createPane('overlayPane'); 9885 // @pane shadowPane: HTMLElement = 500 9886 // Pane for overlay shadows (e.g. `Marker` shadows) 9887 this.createPane('shadowPane'); 9888 // @pane markerPane: HTMLElement = 600 9889 // Pane for `Icon`s of `Marker`s 9890 this.createPane('markerPane'); 9891 // @pane tooltipPane: HTMLElement = 650 9892 // Pane for `Tooltip`s. 9893 this.createPane('tooltipPane'); 9894 // @pane popupPane: HTMLElement = 700 9895 // Pane for `Popup`s. 9896 this.createPane('popupPane'); 9897 9898 if (!this.options.markerZoomAnimation) { 9899 addClass(panes.markerPane, 'leaflet-zoom-hide'); 9900 addClass(panes.shadowPane, 'leaflet-zoom-hide'); 9901 } 9902 }, 9903 9904 9905 // private methods that modify map state 9906 9907 // @section Map state change events 9908 _resetView: function (center, zoom) { 9909 setPosition(this._mapPane, new Point(0, 0)); 9910 9911 var loading = !this._loaded; 9912 this._loaded = true; 9913 zoom = this._limitZoom(zoom); 9914 9915 this.fire('viewprereset'); 9916 9917 var zoomChanged = this._zoom !== zoom; 9918 this 9919 ._moveStart(zoomChanged, false) 9920 ._move(center, zoom) 9921 ._moveEnd(zoomChanged); 9922 9923 // @event viewreset: Event 9924 // Fired when the map needs to redraw its content (this usually happens 9925 // on map zoom or load). Very useful for creating custom overlays. 9926 this.fire('viewreset'); 9927 9928 // @event load: Event 9929 // Fired when the map is initialized (when its center and zoom are set 9930 // for the first time). 9931 if (loading) { 9932 this.fire('load'); 9933 } 9934 }, 9935 9936 _moveStart: function (zoomChanged, noMoveStart) { 9937 // @event zoomstart: Event 9938 // Fired when the map zoom is about to change (e.g. before zoom animation). 9939 // @event movestart: Event 9940 // Fired when the view of the map starts changing (e.g. user starts dragging the map). 9941 if (zoomChanged) { 9942 this.fire('zoomstart'); 9943 } 9944 if (!noMoveStart) { 9945 this.fire('movestart'); 9946 } 9947 return this; 9948 }, 9949 9950 _move: function (center, zoom, data, supressEvent) { 9951 if (zoom === undefined) { 9952 zoom = this._zoom; 9953 } 9954 var zoomChanged = this._zoom !== zoom; 9955 9956 this._zoom = zoom; 9957 this._lastCenter = center; 9958 this._pixelOrigin = this._getNewPixelOrigin(center); 9959 9960 if (!supressEvent) { 9961 // @event zoom: Event 9962 // Fired repeatedly during any change in zoom level, 9963 // including zoom and fly animations. 9964 if (zoomChanged || (data && data.pinch)) { // Always fire 'zoom' if pinching because #3530 9965 this.fire('zoom', data); 9966 } 9967 9968 // @event move: Event 9969 // Fired repeatedly during any movement of the map, 9970 // including pan and fly animations. 9971 this.fire('move', data); 9972 } else if (data && data.pinch) { // Always fire 'zoom' if pinching because #3530 9973 this.fire('zoom', data); 9974 } 9975 return this; 9976 }, 9977 9978 _moveEnd: function (zoomChanged) { 9979 // @event zoomend: Event 9980 // Fired when the map zoom changed, after any animations. 9981 if (zoomChanged) { 9982 this.fire('zoomend'); 9983 } 9984 9985 // @event moveend: Event 9986 // Fired when the center of the map stops changing 9987 // (e.g. user stopped dragging the map or after non-centered zoom). 9988 return this.fire('moveend'); 9989 }, 9990 9991 _stop: function () { 9992 cancelAnimFrame(this._flyToFrame); 9993 if (this._panAnim) { 9994 this._panAnim.stop(); 9995 } 9996 return this; 9997 }, 9998 9999 _rawPanBy: function (offset) { 10000 setPosition(this._mapPane, this._getMapPanePos().subtract(offset)); 10001 }, 10002 10003 _getZoomSpan: function () { 10004 return this.getMaxZoom() - this.getMinZoom(); 10005 }, 10006 10007 _panInsideMaxBounds: function () { 10008 if (!this._enforcingBounds) { 10009 this.panInsideBounds(this.options.maxBounds); 10010 } 10011 }, 10012 10013 _checkIfLoaded: function () { 10014 if (!this._loaded) { 10015 throw new Error('Set map center and zoom first.'); 10016 } 10017 }, 10018 10019 // DOM event handling 10020 10021 // @section Interaction events 10022 _initEvents: function (remove) { 10023 this._targets = {}; 10024 this._targets[stamp(this._container)] = this; 10025 10026 var onOff = remove ? off : on; 10027 10028 // @event click: MouseEvent 10029 // Fired when the user clicks (or taps) the map. 10030 // @event dblclick: MouseEvent 10031 // Fired when the user double-clicks (or double-taps) the map. 10032 // @event mousedown: MouseEvent 10033 // Fired when the user pushes the mouse button on the map. 10034 // @event mouseup: MouseEvent 10035 // Fired when the user releases the mouse button on the map. 10036 // @event mouseover: MouseEvent 10037 // Fired when the mouse enters the map. 10038 // @event mouseout: MouseEvent 10039 // Fired when the mouse leaves the map. 10040 // @event mousemove: MouseEvent 10041 // Fired while the mouse moves over the map. 10042 // @event contextmenu: MouseEvent 10043 // Fired when the user pushes the right mouse button on the map, prevents 10044 // default browser context menu from showing if there are listeners on 10045 // this event. Also fired on mobile when the user holds a single touch 10046 // for a second (also called long press). 10047 // @event keypress: KeyboardEvent 10048 // Fired when the user presses a key from the keyboard that produces a character value while the map is focused. 10049 // @event keydown: KeyboardEvent 10050 // Fired when the user presses a key from the keyboard while the map is focused. Unlike the `keypress` event, 10051 // the `keydown` event is fired for keys that produce a character value and for keys 10052 // that do not produce a character value. 10053 // @event keyup: KeyboardEvent 10054 // Fired when the user releases a key from the keyboard while the map is focused. 10055 onOff(this._container, 'click dblclick mousedown mouseup ' + 10056 'mouseover mouseout mousemove contextmenu keypress keydown keyup', this._handleDOMEvent, this); 10057 10058 if (this.options.trackResize) { 10059 onOff(window, 'resize', this._onResize, this); 10060 } 10061 10062 if (Browser.any3d && this.options.transform3DLimit) { 10063 (remove ? this.off : this.on).call(this, 'moveend', this._onMoveEnd); 10064 } 10065 }, 10066 10067 _onResize: function () { 10068 cancelAnimFrame(this._resizeRequest); 10069 this._resizeRequest = requestAnimFrame( 10070 function () { this.invalidateSize({debounceMoveend: true}); }, this); 10071 }, 10072 10073 _onScroll: function () { 10074 this._container.scrollTop = 0; 10075 this._container.scrollLeft = 0; 10076 }, 10077 10078 _onMoveEnd: function () { 10079 var pos = this._getMapPanePos(); 10080 if (Math.max(Math.abs(pos.x), Math.abs(pos.y)) >= this.options.transform3DLimit) { 10081 // https://bugzilla.mozilla.org/show_bug.cgi?id=1203873 but Webkit also have 10082 // a pixel offset on very high values, see: https://jsfiddle.net/dg6r5hhb/ 10083 this._resetView(this.getCenter(), this.getZoom()); 10084 } 10085 }, 10086 10087 _findEventTargets: function (e, type) { 10088 var targets = [], 10089 target, 10090 isHover = type === 'mouseout' || type === 'mouseover', 10091 src = e.target || e.srcElement, 10092 dragging = false; 10093 10094 while (src) { 10095 target = this._targets[stamp(src)]; 10096 if (target && (type === 'click' || type === 'preclick') && this._draggableMoved(target)) { 10097 // Prevent firing click after you just dragged an object. 10098 dragging = true; 10099 break; 10100 } 10101 if (target && target.listens(type, true)) { 10102 if (isHover && !isExternalTarget(src, e)) { break; } 10103 targets.push(target); 10104 if (isHover) { break; } 10105 } 10106 if (src === this._container) { break; } 10107 src = src.parentNode; 10108 } 10109 if (!targets.length && !dragging && !isHover && this.listens(type, true)) { 10110 targets = [this]; 10111 } 10112 return targets; 10113 }, 10114 10115 _isClickDisabled: function (el) { 10116 while (
vendor: 5,684 bytes, lines 10116-10280
10116el !== this._container) { 10117 if (el['_leaflet_disable_click']) { return true; } 10118 el = el.parentNode; 10119 } 10120 }, 10121 10122 _handleDOMEvent: function (e) { 10123 var el = (e.target || e.srcElement); 10124 if (!this._loaded || el['_leaflet_disable_events'] || e.type === 'click' && this._isClickDisabled(el)) { 10125 return; 10126 } 10127 10128 var type = e.type; 10129 10130 if (type === 'mousedown') { 10131 // prevents outline when clicking on keyboard-focusable element 10132 preventOutline(el); 10133 } 10134 10135 this._fireDOMEvent(e, type); 10136 }, 10137 10138 _mouseEvents: ['click', 'dblclick', 'mouseover', 'mouseout', 'contextmenu'], 10139 10140 _fireDOMEvent: function (e, type, canvasTargets) { 10141 10142 if (e.type === 'click') { 10143 // Fire a synthetic 'preclick' event which propagates up (mainly for closing popups). 10144 // @event preclick: MouseEvent 10145 // Fired before mouse click on the map (sometimes useful when you 10146 // want something to happen on click before any existing click 10147 // handlers start running). 10148 var synth = extend({}, e); 10149 synth.type = 'preclick'; 10150 this._fireDOMEvent(synth, synth.type, canvasTargets); 10151 } 10152 10153 // Find the layer the event is propagating from and its parents. 10154 var targets = this._findEventTargets(e, type); 10155 10156 if (canvasTargets) { 10157 var filtered = []; // pick only targets with listeners 10158 for (var i = 0; i < canvasTargets.length; i++) { 10159 if (canvasTargets[i].listens(type, true)) { 10160 filtered.push(canvasTargets[i]); 10161 } 10162 } 10163 targets = filtered.concat(targets); 10164 } 10165 10166 if (!targets.length) { return; } 10167 10168 if (type === 'contextmenu') { 10169 preventDefault(e); 10170 } 10171 10172 var target = targets[0]; 10173 var data = { 10174 originalEvent: e 10175 }; 10176 10177 if (e.type !== 'keypress' && e.type !== 'keydown' && e.type !== 'keyup') { 10178 var isMarker = target.getLatLng && (!target._radius || target._radius <= 10); 10179 data.containerPoint = isMarker ? 10180 this.latLngToContainerPoint(target.getLatLng()) : this.mouseEventToContainerPoint(e); 10181 data.layerPoint = this.containerPointToLayerPoint(data.containerPoint); 10182 data.latlng = isMarker ? target.getLatLng() : this.layerPointToLatLng(data.layerPoint); 10183 } 10184 10185 for (i = 0; i < targets.length; i++) { 10186 targets[i].fire(type, data, true); 10187 if (data.originalEvent._stopped || 10188 (targets[i].options.bubblingMouseEvents === false && indexOf(this._mouseEvents, type) !== -1)) { return; } 10189 } 10190 }, 10191 10192 _draggableMoved: function (obj) { 10193 obj = obj.dragging && obj.dragging.enabled() ? obj : this; 10194 return (obj.dragging && obj.dragging.moved()) || (this.boxZoom && this.boxZoom.moved()); 10195 }, 10196 10197 _clearHandlers: function () { 10198 for (var i = 0, len = this._handlers.length; i < len; i++) { 10199 this._handlers[i].disable(); 10200 } 10201 }, 10202 10203 // @section Other Methods 10204 10205 // @method whenReady(fn: Function, context?: Object): this 10206 // Runs the given function `fn` when the map gets initialized with 10207 // a view (center and zoom) and at least one layer, or immediately 10208 // if it's already initialized, optionally passing a function context. 10209 whenReady: function (callback, context) { 10210 if (this._loaded) { 10211 callback.call(context || this, {target: this}); 10212 } else { 10213 this.on('load', callback, context); 10214 } 10215 return this; 10216 }, 10217 10218 10219 // private methods for getting map state 10220 10221 _getMapPanePos: function () { 10222 return getPosition(this._mapPane) || new Point(0, 0); 10223 }, 10224 10225 _moved: function () { 10226 var pos = this._getMapPanePos(); 10227 return pos && !pos.equals([0, 0]); 10228 }, 10229 10230 _getTopLeftPoint: function (center, zoom) { 10231 var pixelOrigin = center && zoom !== undefined ? 10232 this._getNewPixelOrigin(center, zoom) : 10233 this.getPixelOrigin(); 10234 return pixelOrigin.subtract(this._getMapPanePos()); 10235 }, 10236 10237 _getNewPixelOrigin: function (center, zoom) { 10238 var viewHalf = this.getSize()._divideBy(2); 10239 return this.project(center, zoom)._subtract(viewHalf)._add(this._getMapPanePos())._round(); 10240 }, 10241 10242 _latLngToNewLayerPoint: function (latlng, zoom, center) { 10243 var topLeft = this._getNewPixelOrigin(center, zoom); 10244 return this.project(latlng, zoom)._subtract(topLeft); 10245 }, 10246 10247 _latLngBoundsToNewLayerBounds: function (latLngBounds, zoom, center) { 10248 var topLeft = this._getNewPixelOrigin(center, zoom); 10249 return toBounds([ 10250 this.project(latLngBounds.getSouthWest(), zoom)._subtract(topLeft), 10251 this.project(latLngBounds.getNorthWest(), zoom)._subtract(topLeft), 10252 this.project(latLngBounds.getSouthEast(), zoom)._subtract(topLeft), 10253 this.project(latLngBounds.getNorthEast(), zoom)._subtract(topLeft) 10254 ]); 10255 }, 10256 10257 // layer point of the current center 10258 _getCenterLayerPoint: function () { 10259 return this.containerPointToLayerPoint(this.getSize()._divideBy(2)); 10260 }, 10261 10262 // offset of the specified place to the current center in pixels 10263 _getCenterOffset: function (latlng) { 10264 return this.latLngToLayerPoint(latlng).subtract(this._getCenterLayerPoint()); 10265 }, 10266 10267 // adjust center for view to get inside bounds 10268 _limitCenter: function (center, zoom, bounds) { 10269 10270 if (!bounds) { return center; } 10271 10272 var centerPoint = this.project(center, zoom), 10273 viewHalf = this.getSize().divideBy(2), 10274 viewBounds = new Bounds(centerPoint.subtract(viewHalf), centerPoint.add(viewHalf)), 10275 offset = this._getBoundsOffset(viewBounds, bounds, zoom); 10276 10277 // If offset is less than a pixel, ignore. 10278 // This prevents unstable projections from getting into 10279 // an infinite loop of tiny offsets. 10280 if (
10280offset.round().equals([0, 0])) { 10281 return center; 10282 } 10283 10284 return this.unproject(centerPoint.add(offset), zoom); 10285 }, 10286 10287 // adjust offset for view to get inside bounds 10288 _limitOffset: function (offset, bounds) { 10289 if (!bounds) { return offset; } 10290 10291 var viewBounds = this.getPixelBounds(), 10292 newBounds = new Bounds(viewBounds.min.add(offset), viewBounds.max.add(offset)); 10293 10294 return offset.add(this._getBoundsOffset(newBounds, bounds)); 10295 }, 10296 10297 // returns offset needed for pxBounds to get inside maxBounds at a specified zoom 10298 _getBoundsOffset: function (pxBounds, maxBounds, zoom) { 10299 var projectedMaxBounds = toBounds( 10300 this.project(maxBounds.getNorthEast(), zoom),
vendor: 3,697 bytes, lines 10301-10412
10301 this.project(maxBounds.getSouthWest(), zoom) 10302 ), 10303 minOffset = projectedMaxBounds.min.subtract(pxBounds.min), 10304 maxOffset = projectedMaxBounds.max.subtract(pxBounds.max), 10305 10306 dx = this._rebound(minOffset.x, -maxOffset.x), 10307 dy = this._rebound(minOffset.y, -maxOffset.y); 10308 10309 return new Point(dx, dy); 10310 }, 10311 10312 _rebound: function (left, right) { 10313 return left + right > 0 ? 10314 Math.round(left - right) / 2 : 10315 Math.max(0, Math.ceil(left)) - Math.max(0, Math.floor(right)); 10316 }, 10317 10318 _limitZoom: function (zoom) { 10319 var min = this.getMinZoom(), 10320 max = this.getMaxZoom(), 10321 snap = Browser.any3d ? this.options.zoomSnap : 1; 10322 if (snap) { 10323 zoom = Math.round(zoom / snap) * snap; 10324 } 10325 return Math.max(min, Math.min(max, zoom)); 10326 }, 10327 10328 _onPanTransitionStep: function () { 10329 this.fire('move'); 10330 }, 10331 10332 _onPanTransitionEnd: function () { 10333 removeClass(this._mapPane, 'leaflet-pan-anim'); 10334 this.fire('moveend'); 10335 }, 10336 10337 _tryAnimatedPan: function (center, options) { 10338 // difference between the new and current centers in pixels 10339 var offset = this._getCenterOffset(center)._trunc(); 10340 10341 // don't animate too far unless animate: true specified in options 10342 if ((options && options.animate) !== true && !this.getSize().contains(offset)) { return false; } 10343 10344 this.panBy(offset, options); 10345 10346 return true; 10347 }, 10348 10349 _createAnimProxy: function () { 10350 10351 var proxy = this._proxy = create$1('div', 'leaflet-proxy leaflet-zoom-animated'); 10352 this._panes.mapPane.appendChild(proxy); 10353 10354 this.on('zoomanim', function (e) { 10355 var prop = TRANSFORM, 10356 transform = this._proxy.style[prop]; 10357 10358 setTransform(this._proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1)); 10359 10360 // workaround for case when transform is the same and so transitionend event is not fired 10361 if (transform === this._proxy.style[prop] && this._animatingZoom) { 10362 this._onZoomTransitionEnd(); 10363 } 10364 }, this); 10365 10366 this.on('load moveend', this._animMoveEnd, this); 10367 10368 this._on('unload', this._destroyAnimProxy, this); 10369 }, 10370 10371 _destroyAnimProxy: function () { 10372 remove(this._proxy); 10373 this.off('load moveend', this._animMoveEnd, this); 10374 delete this._proxy; 10375 }, 10376 10377 _animMoveEnd: function () { 10378 var c = this.getCenter(), 10379 z = this.getZoom(); 10380 setTransform(this._proxy, this.project(c, z), this.getZoomScale(z, 1)); 10381 }, 10382 10383 _catchTransitionEnd: function (e) { 10384 if (this._animatingZoom && e.propertyName.indexOf('transform') >= 0) { 10385 this._onZoomTransitionEnd(); 10386 } 10387 }, 10388 10389 _nothingToAnimate: function () { 10390 return !this._container.getElementsByClassName('leaflet-zoom-animated').length; 10391 }, 10392 10393 _tryAnimatedZoom: function (center, zoom, options) { 10394 10395 if (this._animatingZoom) { return true; } 10396 10397 options = options || {}; 10398 10399 // don't animate if disabled, not supported or zoom difference is too large 10400 if (!this._zoomAnimated || options.animate === false || this._nothingToAnimate() || 10401 Math.abs(zoom - this._zoom) > this.options.zoomAnimationThreshold) { return false; } 10402 10403 // offset is the pixel coords of the zoom origin relative to the current center 10404 var scale = this.getZoomScale(zoom), 10405 offset = this._getCenterOffset(center)._divideBy(1 - 1 / scale); 10406 10407 // don't animate if the zoom origin isn't within one screen from the current center, unless forced 10408 if (options.animate !== true && !this.getSize().contains(offset)) { return false; } 10409 10410 requestAnimFrame(function () { 10411 this 10412 ._moveStart(true,
vendor: 9,309 bytes, lines 10412-10734
10412 false) 10413 ._animateZoom(center, zoom, true); 10414 }, this); 10415 10416 return true; 10417 }, 10418 10419 _animateZoom: function (center, zoom, startAnim, noUpdate) { 10420 if (!this._mapPane) { return; } 10421 10422 if (startAnim) { 10423 this._animatingZoom = true; 10424 10425 // remember what center/zoom to set after animation 10426 this._animateToCenter = center; 10427 this._animateToZoom = zoom; 10428 10429 addClass(this._mapPane, 'leaflet-zoom-anim'); 10430 } 10431 10432 // @section Other Events 10433 // @event zoomanim: ZoomAnimEvent 10434 // Fired at least once per zoom animation. For continuous zoom, like pinch zooming, fired once per frame during zoom. 10435 this.fire('zoomanim', { 10436 center: center, 10437 zoom: zoom, 10438 noUpdate: noUpdate 10439 }); 10440 10441 if (!this._tempFireZoomEvent) { 10442 this._tempFireZoomEvent = this._zoom !== this._animateToZoom; 10443 } 10444 10445 this._move(this._animateToCenter, this._animateToZoom, undefined, true); 10446 10447 // Work around webkit not firing 'transitionend', see https://github.com/Leaflet/Leaflet/issues/3689, 2693 10448 setTimeout(bind(this._onZoomTransitionEnd, this), 250); 10449 }, 10450 10451 _onZoomTransitionEnd: function () { 10452 if (!this._animatingZoom) { return; } 10453 10454 if (this._mapPane) { 10455 removeClass(this._mapPane, 'leaflet-zoom-anim'); 10456 } 10457 10458 this._animatingZoom = false; 10459 10460 this._move(this._animateToCenter, this._animateToZoom, undefined, true); 10461 10462 if (this._tempFireZoomEvent) { 10463 this.fire('zoom'); 10464 } 10465 delete this._tempFireZoomEvent; 10466 10467 this.fire('move'); 10468 10469 this._moveEnd(true); 10470 } 10471 }); 10472 10473 // @section 10474 10475 // @factory L.map(id: String, options?: Map options) 10476 // Instantiates a map object given the DOM ID of a `<div>` element 10477 // and optionally an object literal with `Map options`. 10478 // 10479 // @alternative 10480 // @factory L.map(el: HTMLElement, options?: Map options) 10481 // Instantiates a map object given an instance of a `<div>` HTML element 10482 // and optionally an object literal with `Map options`. 10483 function createMap(id, options) { 10484 return new Map(id, options); 10485 } 10486 10487 /* 10488 * @class Control 10489 * @aka L.Control 10490 * @inherits Class 10491 * 10492 * L.Control is a base class for implementing map controls. Handles positioning. 10493 * All other controls extend from this class. 10494 */ 10495 10496 var Control = Class.extend({ 10497 // @section 10498 // @aka Control Options 10499 options: { 10500 // @option position: String = 'topright' 10501 // The position of the control (one of the map corners). Possible values are `'topleft'`, 10502 // `'topright'`, `'bottomleft'` or `'bottomright'` 10503 position: 'topright' 10504 }, 10505 10506 initialize: function (options) { 10507 setOptions(this, options); 10508 }, 10509 10510 /* @section 10511 * Classes extending L.Control will inherit the following methods: 10512 * 10513 * @method getPosition: string 10514 * Returns the position of the control. 10515 */ 10516 getPosition: function () { 10517 return this.options.position; 10518 }, 10519 10520 // @method setPosition(position: string): this 10521 // Sets the position of the control. 10522 setPosition: function (position) { 10523 var map = this._map; 10524 10525 if (map) { 10526 map.removeControl(this); 10527 } 10528 10529 this.options.position = position; 10530 10531 if (map) { 10532 map.addControl(this); 10533 } 10534 10535 return this; 10536 }, 10537 10538 // @method getContainer: HTMLElement 10539 // Returns the HTMLElement that contains the control. 10540 getContainer: function () { 10541 return this._container; 10542 }, 10543 10544 // @method addTo(map: Map): this 10545 // Adds the control to the given map. 10546 addTo: function (map) { 10547 this.remove(); 10548 this._map = map; 10549 10550 var container = this._container = this.onAdd(map), 10551 pos = this.getPosition(), 10552 corner = map._controlCorners[pos]; 10553 10554 addClass(container, 'leaflet-control'); 10555 10556 if (pos.indexOf('bottom') !== -1) { 10557 corner.insertBefore(container, corner.firstChild); 10558 } else { 10559 corner.appendChild(container); 10560 } 10561 10562 this._map.on('unload', this.remove, this); 10563 10564 return this; 10565 }, 10566 10567 // @method remove: this 10568 // Removes the control from the map it is currently active on. 10569 remove: function () { 10570 if (!this._map) { 10571 return this; 10572 } 10573 10574 remove(this._container); 10575 10576 if (this.onRemove) { 10577 this.onRemove(this._map); 10578 } 10579 10580 this._map.off('unload', this.remove, this); 10581 this._map = null; 10582 10583 return this; 10584 }, 10585 10586 _refocusOnMap: function (e) { 10587 // if map exists and event is not a keyboard event 10588 if (this._map && e && e.screenX > 0 && e.screenY > 0) { 10589 this._map.getContainer().focus(); 10590 } 10591 } 10592 }); 10593 10594 var control = function (options) { 10595 return new Control(options); 10596 }; 10597 10598 /* @section Extension methods 10599 * @uninheritable 10600 * 10601 * Every control should extend from `L.Control` and (re-)implement the following methods. 10602 * 10603 * @method onAdd(map: Map): HTMLElement 10604 * Should return the container DOM element for the control and add listeners on relevant map events. Called on [`control.addTo(map)`](#control-addTo). 10605 * 10606 * @method onRemove(map: Map) 10607 * Optional method. Should contain all clean up code that removes the listeners previously added in [`onAdd`](#control-onadd). Called on [`control.remove()`](#control-remove). 10608 */ 10609 10610 /* @namespace Map 10611 * @section Methods for Layers and Controls 10612 */ 10613 Map.include({ 10614 // @method addControl(control: Control): this 10615 // Adds the given control to the map 10616 addControl: function (control) { 10617 control.addTo(this); 10618 return this; 10619 }, 10620 10621 // @method removeControl(control: Control): this 10622 // Removes the given control from the map 10623 removeControl: function (control) { 10624 control.remove(); 10625 return this; 10626 }, 10627 10628 _initControlPos: function () { 10629 var corners = this._controlCorners = {}, 10630 l = 'leaflet-', 10631 container = this._controlContainer = 10632 create$1('div', l + 'control-container', this._container); 10633 10634 function createCorner(vSide, hSide) { 10635 var className = l + vSide + ' ' + l + hSide; 10636 10637 corners[vSide + hSide] = create$1('div', className, container); 10638 } 10639 10640 createCorner('top', 'left'); 10641 createCorner('top', 'right'); 10642 createCorner('bottom', 'left'); 10643 createCorner('bottom', 'right'); 10644 }, 10645 10646 _clearControlPos: function () { 10647 for (var i in this._controlCorners) { 10648 remove(this._controlCorners[i]); 10649 } 10650 remove(this._controlContainer); 10651 delete this._controlCorners; 10652 delete this._controlContainer; 10653 } 10654 }); 10655 10656 /* 10657 * @class Control.Layers 10658 * @aka L.Control.Layers 10659 * @inherits Control 10660 * 10661 * The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](https://leafletjs.com/examples/layers-control/)). Extends `Control`. 10662 * 10663 * @example 10664 * 10665 * ```js 10666 * var baseLayers = { 10667 * "Mapbox": mapbox, 10668 * "OpenStreetMap": osm 10669 * }; 10670 * 10671 * var overlays = { 10672 * "Marker": marker, 10673 * "Roads": roadsLayer 10674 * }; 10675 * 10676 * L.control.layers(baseLayers, overlays).addTo(map); 10677 * ``` 10678 * 10679 * The `baseLayers` and `overlays` parameters are object literals with layer names as keys and `Layer` objects as values: 10680 * 10681 * ```js 10682 * { 10683 * "<someName1>": layer1, 10684 * "<someName2>": layer2 10685 * } 10686 * ``` 10687 * 10688 * The layer names can contain HTML, which allows you to add additional styling to the items: 10689 * 10690 * ```js 10691 * {"<img src='my-layer-icon' /> <span class='my-layer-item'>My Layer</span>": myLayer} 10692 * ``` 10693 */ 10694 10695 var Layers = Control.extend({ 10696 // @section 10697 // @aka Control.Layers options 10698 options: { 10699 // @option collapsed: Boolean = true 10700 // If `true`, the control will be collapsed into an icon and expanded on mouse hover, touch, or keyboard activation. 10701 collapsed: true, 10702 position: 'topright', 10703 10704 // @option autoZIndex: Boolean = true 10705 // If `true`, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off. 10706 autoZIndex: true, 10707 10708 // @option hideSingleBase: Boolean = false 10709 // If `true`, the base layers in the control will be hidden when there is only one. 10710 hideSingleBase: false, 10711 10712 // @option sortLayers: Boolean = false 10713 // Whether to sort the layers. When `false`, layers will keep the order 10714 // in which they were added to the control. 10715 sortLayers: false, 10716 10717 // @option sortFunction: Function = * 10718 // A [compare function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) 10719 // that will be used for sorting the layers, when `sortLayers` is `true`. 10720 // The function receives both the `L.Layer` instances and their names, as in 10721 // `sortFunction(layerA, layerB, nameA, nameB)`. 10722 // By default, it sorts layers alphabetically by their name. 10723 sortFunction: function (layerA, layerB, nameA, nameB) { 10724 return nameA < nameB ? -1 : (nameB < nameA ? 1 : 0); 10725 } 10726 }, 10727 10728 initialize: function (baseLayers, overlays, options) { 10729 setOptions(this, options); 10730 10731 this._layerControlInputs = []; 10732 this._layers = []; 10733 this._lastZIndex = 0; 10734 this._handlingClick = false;
10735 10736 for (var i in baseLayers) { 10737 this._addLayer(baseLayers[i], i); 10738 } 10739 10740 for (i in overlays) { 10741 this._addLayer(overlays[i], i, true); 10742 } 10743 }, 10744 10745 onAdd: function (map) { 10746 this._initLayout(); 10747 this._update(); 10748 10749 this._map = map; 10750 map.on('zoomend', this._checkDisabledLayers, this); 10751 10752 for (var i = 0; i < this._layers.length; i++) { 10753 this._layers[i].layer.on('add remove', this._onLayerChange, this); 10754 } 10755 10756 return this._container; 10757 }, 10758 10759 addTo: function (map) { 10760 Control.prototype.addTo.call(this, map);
vendor: 9,438 bytes, lines 10761-11060
10761 // Trigger expand after Layers Control has been inserted into DOM so that is now has an actual height. 10762 return this._expandIfNotCollapsed(); 10763 }, 10764 10765 onRemove: function () { 10766 this._map.off('zoomend', this._checkDisabledLayers, this); 10767 10768 for (var i = 0; i < this._layers.length; i++) { 10769 this._layers[i].layer.off('add remove', this._onLayerChange, this); 10770 } 10771 }, 10772 10773 // @method addBaseLayer(layer: Layer, name: String): this 10774 // Adds a base layer (radio button entry) with the given name to the control. 10775 addBaseLayer: function (layer, name) { 10776 this._addLayer(layer, name); 10777 return (this._map) ? this._update() : this; 10778 }, 10779 10780 // @method addOverlay(layer: Layer, name: String): this 10781 // Adds an overlay (checkbox entry) with the given name to the control. 10782 addOverlay: function (layer, name) { 10783 this._addLayer(layer, name, true); 10784 return (this._map) ? this._update() : this; 10785 }, 10786 10787 // @method removeLayer(layer: Layer): this 10788 // Remove the given layer from the control. 10789 removeLayer: function (layer) { 10790 layer.off('add remove', this._onLayerChange, this); 10791 10792 var obj = this._getLayer(stamp(layer)); 10793 if (obj) { 10794 this._layers.splice(this._layers.indexOf(obj), 1); 10795 } 10796 return (this._map) ? this._update() : this; 10797 }, 10798 10799 // @method expand(): this 10800 // Expand the control container if collapsed. 10801 expand: function () { 10802 addClass(this._container, 'leaflet-control-layers-expanded'); 10803 this._section.style.height = null; 10804 var acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50); 10805 if (acceptableHeight < this._section.clientHeight) { 10806 addClass(this._section, 'leaflet-control-layers-scrollbar'); 10807 this._section.style.height = acceptableHeight + 'px'; 10808 } else { 10809 removeClass(this._section, 'leaflet-control-layers-scrollbar'); 10810 } 10811 this._checkDisabledLayers(); 10812 return this; 10813 }, 10814 10815 // @method collapse(): this 10816 // Collapse the control container if expanded. 10817 collapse: function () { 10818 removeClass(this._container, 'leaflet-control-layers-expanded'); 10819 return this; 10820 }, 10821 10822 _initLayout: function () { 10823 var className = 'leaflet-control-layers', 10824 container = this._container = create$1('div', className), 10825 collapsed = this.options.collapsed; 10826 10827 // makes this work on IE touch devices by stopping it from firing a mouseout event when the touch is released 10828 container.setAttribute('aria-haspopup', true); 10829 10830 disableClickPropagation(container); 10831 disableScrollPropagation(container); 10832 10833 var section = this._section = create$1('section', className + '-list'); 10834 10835 if (collapsed) { 10836 this._map.on('click', this.collapse, this); 10837 10838 on(container, { 10839 mouseenter: function () { 10840 on(section, 'click', preventDefault); 10841 this.expand(); 10842 setTimeout(function () { 10843 off(section, 'click', preventDefault); 10844 }); 10845 }, 10846 mouseleave: this.collapse 10847 }, this); 10848 } 10849 10850 var link = this._layersLink = create$1('a', className + '-toggle', container); 10851 link.href = '#'; 10852 link.title = 'Layers'; 10853 link.setAttribute('role', 'button'); 10854 10855 on(link, 'click', preventDefault); // prevent link function 10856 on(link, 'focus', this.expand, this); 10857 10858 if (!collapsed) { 10859 this.expand(); 10860 } 10861 10862 this._baseLayersList = create$1('div', className + '-base', section); 10863 this._separator = create$1('div', className + '-separator', section); 10864 this._overlaysList = create$1('div', className + '-overlays', section); 10865 10866 container.appendChild(section); 10867 }, 10868 10869 _getLayer: function (id) { 10870 for (var i = 0; i < this._layers.length; i++) { 10871 10872 if (this._layers[i] && stamp(this._layers[i].layer) === id) { 10873 return this._layers[i]; 10874 } 10875 } 10876 }, 10877 10878 _addLayer: function (layer, name, overlay) { 10879 if (this._map) { 10880 layer.on('add remove', this._onLayerChange, this); 10881 } 10882 10883 this._layers.push({ 10884 layer: layer, 10885 name: name, 10886 overlay: overlay 10887 }); 10888 10889 if (this.options.sortLayers) { 10890 this._layers.sort(bind(function (a, b) { 10891 return this.options.sortFunction(a.layer, b.layer, a.name, b.name); 10892 }, this)); 10893 } 10894 10895 if (this.options.autoZIndex && layer.setZIndex) { 10896 this._lastZIndex++; 10897 layer.setZIndex(this._lastZIndex); 10898 } 10899 10900 this._expandIfNotCollapsed(); 10901 }, 10902 10903 _update: function () { 10904 if (!this._container) { return this; } 10905 10906 empty(this._baseLayersList); 10907 empty(this._overlaysList); 10908 10909 this._layerControlInputs = []; 10910 var baseLayersPresent, overlaysPresent, i, obj, baseLayersCount = 0; 10911 10912 for (i = 0; i < this._layers.length; i++) { 10913 obj = this._layers[i]; 10914 this._addItem(obj); 10915 overlaysPresent = overlaysPresent || obj.overlay; 10916 baseLayersPresent = baseLayersPresent || !obj.overlay; 10917 baseLayersCount += !obj.overlay ? 1 : 0; 10918 } 10919 10920 // Hide base layers section if there's only one layer. 10921 if (this.options.hideSingleBase) { 10922 baseLayersPresent = baseLayersPresent && baseLayersCount > 1; 10923 this._baseLayersList.style.display = baseLayersPresent ? '' : 'none'; 10924 } 10925 10926 this._separator.style.display = overlaysPresent && baseLayersPresent ? '' : 'none'; 10927 10928 return this; 10929 }, 10930 10931 _onLayerChange: function (e) { 10932 if (!this._handlingClick) { 10933 this._update(); 10934 } 10935 10936 var obj = this._getLayer(stamp(e.target)); 10937 10938 // @namespace Map 10939 // @section Layer events 10940 // @event baselayerchange: LayersControlEvent 10941 // Fired when the base layer is changed through the [layers control](#control-layers). 10942 // @event overlayadd: LayersControlEvent 10943 // Fired when an overlay is selected through the [layers control](#control-layers). 10944 // @event overlayremove: LayersControlEvent 10945 // Fired when an overlay is deselected through the [layers control](#control-layers). 10946 // @namespace Control.Layers 10947 var type = obj.overlay ? 10948 (e.type === 'add' ? 'overlayadd' : 'overlayremove') : 10949 (e.type === 'add' ? 'baselayerchange' : null); 10950 10951 if (type) { 10952 this._map.fire(type, obj); 10953 } 10954 }, 10955 10956 // IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see https://stackoverflow.com/a/119079) 10957 _createRadioElement: function (name, checked) { 10958 10959 var radioHtml = '<input type="radio" class="leaflet-control-layers-selector" name="' + 10960 name + '"' + (checked ? ' checked="checked"' : '') + '/>'; 10961 10962 var radioFragment = document.createElement('div'); 10963 radioFragment.innerHTML = radioHtml; 10964 10965 return radioFragment.firstChild; 10966 }, 10967 10968 _addItem: function (obj) { 10969 var label = document.createElement('label'), 10970 checked = this._map.hasLayer(obj.layer), 10971 input; 10972 10973 if (obj.overlay) { 10974 input = document.createElement('input'); 10975 input.type = 'checkbox'; 10976 input.className = 'leaflet-control-layers-selector'; 10977 input.defaultChecked = checked; 10978 } else { 10979 input = this._createRadioElement('leaflet-base-layers_' + stamp(this), checked); 10980 } 10981 10982 this._layerControlInputs.push(input); 10983 input.layerId = stamp(obj.layer); 10984 10985 on(input, 'click', this._onInputClick, this); 10986 10987 var name = document.createElement('span'); 10988 name.innerHTML = ' ' + obj.name; 10989 10990 // Helps from preventing layer control flicker when checkboxes are disabled 10991 // https://github.com/Leaflet/Leaflet/issues/2771 10992 var holder = document.createElement('span'); 10993 10994 label.appendChild(holder); 10995 holder.appendChild(input); 10996 holder.appendChild(name); 10997 10998 var container = obj.overlay ? this._overlaysList : this._baseLayersList; 10999 container.appendChild(label); 11000 11001 this._checkDisabledLayers(); 11002 return label; 11003 }, 11004 11005 _onInputClick: function () { 11006 var inputs = this._layerControlInputs, 11007 input, layer; 11008 var addedLayers = [], 11009 removedLayers = []; 11010 11011 this._handlingClick = true; 11012 11013 for (var i = inputs.length - 1; i >= 0; i--) { 11014 input = inputs[i]; 11015 layer = this._getLayer(input.layerId).layer; 11016 11017 if (input.checked) { 11018 addedLayers.push(layer); 11019 } else if (!input.checked) { 11020 removedLayers.push(layer); 11021 } 11022 } 11023 11024 // Bugfix issue 2318: Should remove all old layers before readding new ones 11025 for (i = 0; i < removedLayers.length; i++) { 11026 if (this._map.hasLayer(removedLayers[i])) { 11027 this._map.removeLayer(removedLayers[i]); 11028 } 11029 } 11030 for (i = 0; i < addedLayers.length; i++) { 11031 if (!this._map.hasLayer(addedLayers[i])) { 11032 this._map.addLayer(addedLayers[i]); 11033 } 11034 } 11035 11036 this._handlingClick = false; 11037 11038 this._refocusOnMap(); 11039 }, 11040 11041 _checkDisabledLayers: function () { 11042 var inputs = this._layerControlInputs, 11043 input, 11044 layer, 11045 zoom = this._map.getZoom(); 11046 11047 for (var i = inputs.length - 1; i >= 0; i--) { 11048 input = inputs[i]; 11049 layer = this._getLayer(input.layerId).layer; 11050 input.disabled = (layer.options.minZoom !== undefined && zoom < layer.options.minZoom) || 11051 (layer.options.maxZoom !== undefined && zoom > layer.options.maxZoom); 11052 11053 } 11054 }, 11055 11056 _expandIfNotCollapsed: function () { 11057 if (this._map && !this.options.collapsed) { 11058 this.expand(); 11059 } 11060 return this
vendor: 8,566 bytes, lines 11060-11342
11060; 11061 } 11062 11063 }); 11064 11065 11066 // @factory L.control.layers(baselayers?: Object, overlays?: Object, options?: Control.Layers options) 11067 // Creates a layers control with the given layers. Base layers will be switched with radio buttons, while overlays will be switched with checkboxes. Note that all base layers should be passed in the base layers object, but only one should be added to the map during map instantiation. 11068 var layers = function (baseLayers, overlays, options) { 11069 return new Layers(baseLayers, overlays, options); 11070 }; 11071 11072 /* 11073 * @class Control.Zoom 11074 * @aka L.Control.Zoom 11075 * @inherits Control 11076 * 11077 * A basic zoom control with two buttons (zoom in and zoom out). It is put on the map by default unless you set its [`zoomControl` option](#map-zoomcontrol) to `false`. Extends `Control`. 11078 */ 11079 11080 var Zoom = Control.extend({ 11081 // @section 11082 // @aka Control.Zoom options 11083 options: { 11084 position: 'topleft', 11085 11086 // @option zoomInText: String = '<span aria-hidden="true">+</span>' 11087 // The text set on the 'zoom in' button. 11088 zoomInText: '<span aria-hidden="true">+</span>', 11089 11090 // @option zoomInTitle: String = 'Zoom in' 11091 // The title set on the 'zoom in' button. 11092 zoomInTitle: 'Zoom in', 11093 11094 // @option zoomOutText: String = '<span aria-hidden="true">−</span>' 11095 // The text set on the 'zoom out' button. 11096 zoomOutText: '<span aria-hidden="true">−</span>', 11097 11098 // @option zoomOutTitle: String = 'Zoom out' 11099 // The title set on the 'zoom out' button. 11100 zoomOutTitle: 'Zoom out' 11101 }, 11102 11103 onAdd: function (map) { 11104 var zoomName = 'leaflet-control-zoom', 11105 container = create$1('div', zoomName + ' leaflet-bar'), 11106 options = this.options; 11107 11108 this._zoomInButton = this._createButton(options.zoomInText, options.zoomInTitle, 11109 zoomName + '-in', container, this._zoomIn); 11110 this._zoomOutButton = this._createButton(options.zoomOutText, options.zoomOutTitle, 11111 zoomName + '-out', container, this._zoomOut); 11112 11113 this._updateDisabled(); 11114 map.on('zoomend zoomlevelschange', this._updateDisabled, this); 11115 11116 return container; 11117 }, 11118 11119 onRemove: function (map) { 11120 map.off('zoomend zoomlevelschange', this._updateDisabled, this); 11121 }, 11122 11123 disable: function () { 11124 this._disabled = true; 11125 this._updateDisabled(); 11126 return this; 11127 }, 11128 11129 enable: function () { 11130 this._disabled = false; 11131 this._updateDisabled(); 11132 return this; 11133 }, 11134 11135 _zoomIn: function (e) { 11136 if (!this._disabled && this._map._zoom < this._map.getMaxZoom()) { 11137 this._map.zoomIn(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1)); 11138 } 11139 }, 11140 11141 _zoomOut: function (e) { 11142 if (!this._disabled && this._map._zoom > this._map.getMinZoom()) { 11143 this._map.zoomOut(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1)); 11144 } 11145 }, 11146 11147 _createButton: function (html, title, className, container, fn) { 11148 var link = create$1('a', className, container); 11149 link.innerHTML = html; 11150 link.href = '#'; 11151 link.title = title; 11152 11153 /* 11154 * Will force screen readers like VoiceOver to read this as "Zoom in - button" 11155 */ 11156 link.setAttribute('role', 'button'); 11157 link.setAttribute('aria-label', title); 11158 11159 disableClickPropagation(link); 11160 on(link, 'click', stop); 11161 on(link, 'click', fn, this); 11162 on(link, 'click', this._refocusOnMap, this); 11163 11164 return link; 11165 }, 11166 11167 _updateDisabled: function () { 11168 var map = this._map, 11169 className = 'leaflet-disabled'; 11170 11171 removeClass(this._zoomInButton, className); 11172 removeClass(this._zoomOutButton, className); 11173 this._zoomInButton.setAttribute('aria-disabled', 'false'); 11174 this._zoomOutButton.setAttribute('aria-disabled', 'false'); 11175 11176 if (this._disabled || map._zoom === map.getMinZoom()) { 11177 addClass(this._zoomOutButton, className); 11178 this._zoomOutButton.setAttribute('aria-disabled', 'true'); 11179 } 11180 if (this._disabled || map._zoom === map.getMaxZoom()) { 11181 addClass(this._zoomInButton, className); 11182 this._zoomInButton.setAttribute('aria-disabled', 'true'); 11183 } 11184 } 11185 }); 11186 11187 // @namespace Map 11188 // @section Control options 11189 // @option zoomControl: Boolean = true 11190 // Whether a [zoom control](#control-zoom) is added to the map by default. 11191 Map.mergeOptions({ 11192 zoomControl: true 11193 }); 11194 11195 Map.addInitHook(function () { 11196 if (this.options.zoomControl) { 11197 // @section Controls 11198 // @property zoomControl: Control.Zoom 11199 // The default zoom control (only available if the 11200 // [`zoomControl` option](#map-zoomcontrol) was `true` when creating the map). 11201 this.zoomControl = new Zoom(); 11202 this.addControl(this.zoomControl); 11203 } 11204 }); 11205 11206 // @namespace Control.Zoom 11207 // @factory L.control.zoom(options: Control.Zoom options) 11208 // Creates a zoom control 11209 var zoom = function (options) { 11210 return new Zoom(options); 11211 }; 11212 11213 /* 11214 * @class Control.Scale 11215 * @aka L.Control.Scale 11216 * @inherits Control 11217 * 11218 * A simple scale control that shows the scale of the current center of screen in metric (m/km) and imperial (mi/ft) systems. Extends `Control`. 11219 * 11220 * @example 11221 * 11222 * ```js 11223 * L.control.scale().addTo(map); 11224 * ``` 11225 */ 11226 11227 var Scale = Control.extend({ 11228 // @section 11229 // @aka Control.Scale options 11230 options: { 11231 position: 'bottomleft', 11232 11233 // @option maxWidth: Number = 100 11234 // Maximum width of the control in pixels. The width is set dynamically to show round values (e.g. 100, 200, 500). 11235 maxWidth: 100, 11236 11237 // @option metric: Boolean = True 11238 // Whether to show the metric scale line (m/km). 11239 metric: true, 11240 11241 // @option imperial: Boolean = True 11242 // Whether to show the imperial scale line (mi/ft). 11243 imperial: true 11244 11245 // @option updateWhenIdle: Boolean = false 11246 // If `true`, the control is updated on [`moveend`](#map-moveend), otherwise it's always up-to-date (updated on [`move`](#map-move)). 11247 }, 11248 11249 onAdd: function (map) { 11250 var className = 'leaflet-control-scale', 11251 container = create$1('div', className), 11252 options = this.options; 11253 11254 this._addScales(options, className + '-line', container); 11255 11256 map.on(options.updateWhenIdle ? 'moveend' : 'move', this._update, this); 11257 map.whenReady(this._update, this); 11258 11259 return container; 11260 }, 11261 11262 onRemove: function (map) { 11263 map.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this); 11264 }, 11265 11266 _addScales: function (options, className, container) { 11267 if (options.metric) { 11268 this._mScale = create$1('div', className, container); 11269 } 11270 if (options.imperial) { 11271 this._iScale = create$1('div', className, container); 11272 } 11273 }, 11274 11275 _update: function () { 11276 var map = this._map, 11277 y = map.getSize().y / 2; 11278 11279 var maxMeters = map.distance( 11280 map.containerPointToLatLng([0, y]), 11281 map.containerPointToLatLng([this.options.maxWidth, y])); 11282 11283 this._updateScales(maxMeters); 11284 }, 11285 11286 _updateScales: function (maxMeters) { 11287 if (this.options.metric && maxMeters) { 11288 this._updateMetric(maxMeters); 11289 } 11290 if (this.options.imperial && maxMeters) { 11291 this._updateImperial(maxMeters); 11292 } 11293 }, 11294 11295 _updateMetric: function (maxMeters) { 11296 var meters = this._getRoundNum(maxMeters), 11297 label = meters < 1000 ? meters + ' m' : (meters / 1000) + ' km'; 11298 11299 this._updateScale(this._mScale, label, meters / maxMeters); 11300 }, 11301 11302 _updateImperial: function (maxMeters) { 11303 var maxFeet = maxMeters * 3.2808399, 11304 maxMiles, miles, feet; 11305 11306 if (maxFeet > 5280) { 11307 maxMiles = maxFeet / 5280; 11308 miles = this._getRoundNum(maxMiles); 11309 this._updateScale(this._iScale, miles + ' mi', miles / maxMiles); 11310 11311 } else { 11312 feet = this._getRoundNum(maxFeet); 11313 this._updateScale(this._iScale, feet + ' ft', feet / maxFeet); 11314 } 11315 }, 11316 11317 _updateScale: function (scale, text, ratio) { 11318 scale.style.width = Math.round(this.options.maxWidth * ratio) + 'px'; 11319 scale.innerHTML = text; 11320 }, 11321 11322 _getRoundNum: function (num) { 11323 var pow10 = Math.pow(10, (Math.floor(num) + '').length - 1), 11324 d = num / pow10; 11325 11326 d = d >= 10 ? 10 : 11327 d >= 5 ? 5 : 11328 d >= 3 ? 3 : 11329 d >= 2 ? 2 : 1; 11330 11331 return pow10 * d; 11332 } 11333 }); 11334 11335 11336 // @factory L.control.scale(options?: Control.Scale options) 11337 // Creates an scale control with the given options. 11338 var scale = function (options) { 11339 return new Scale(options); 11340 }; 11341 11342 var ukrainianFlag = '<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8"
vendor: 2,345 bytes, lines 11342-11411
11342><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>'; 11343 11344 11345 /* 11346 * @class Control.Attribution 11347 * @aka L.Control.Attribution 11348 * @inherits Control 11349 * 11350 * The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its [`attributionControl` option](#map-attributioncontrol) to `false`, and it fetches attribution texts from layers with the [`getAttribution` method](#layer-getattribution) automatically. Extends Control. 11351 */ 11352 11353 var Attribution = Control.extend({ 11354 // @section 11355 // @aka Control.Attribution options 11356 options: { 11357 position: 'bottomright', 11358 11359 // @option prefix: String|false = 'Leaflet' 11360 // The HTML text shown before the attributions. Pass `false` to disable. 11361 prefix: '<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">' + (Browser.inlineSvg ? ukrainianFlag + ' ' : '') + 'Leaflet</a>' 11362 }, 11363 11364 initialize: function (options) { 11365 setOptions(this, options); 11366 11367 this._attributions = {}; 11368 }, 11369 11370 onAdd: function (map) { 11371 map.attributionControl = this; 11372 this._container = create$1('div', 'leaflet-control-attribution'); 11373 disableClickPropagation(this._container); 11374 11375 // TODO ugly, refactor 11376 for (var i in map._layers) { 11377 if (map._layers[i].getAttribution) { 11378 this.addAttribution(map._layers[i].getAttribution()); 11379 } 11380 } 11381 11382 this._update(); 11383 11384 map.on('layeradd', this._addAttribution, this); 11385 11386 return this._container; 11387 }, 11388 11389 onRemove: function (map) { 11390 map.off('layeradd', this._addAttribution, this); 11391 }, 11392 11393 _addAttribution: function (ev) { 11394 if (ev.layer.getAttribution) { 11395 this.addAttribution(ev.layer.getAttribution()); 11396 ev.layer.once('remove', function () { 11397 this.removeAttribution(ev.layer.getAttribution()); 11398 }, this); 11399 } 11400 }, 11401 11402 // @method setPrefix(prefix: String|false): this 11403 // The HTML text shown before the attributions. Pass `false` to disable. 11404 setPrefix: function (prefix) { 11405 this.options.prefix = prefix; 11406 this._update(); 11407 return this; 11408 }, 11409 11410 // @method addAttribution(text: String): this 11411 // Adds an attribution text (e.g. `'Vector data © Mapbox
vendor: 9,703 bytes, lines 11411-11748
11411'`). 11412 addAttribution: function (text) { 11413 if (!text) { return this; } 11414 11415 if (!this._attributions[text]) { 11416 this._attributions[text] = 0; 11417 } 11418 this._attributions[text]++; 11419 11420 this._update(); 11421 11422 return this; 11423 }, 11424 11425 // @method removeAttribution(text: String): this 11426 // Removes an attribution text. 11427 removeAttribution: function (text) { 11428 if (!text) { return this; } 11429 11430 if (this._attributions[text]) { 11431 this._attributions[text]--; 11432 this._update(); 11433 } 11434 11435 return this; 11436 }, 11437 11438 _update: function () { 11439 if (!this._map) { return; } 11440 11441 var attribs = []; 11442 11443 for (var i in this._attributions) { 11444 if (this._attributions[i]) { 11445 attribs.push(i); 11446 } 11447 } 11448 11449 var prefixAndAttribs = []; 11450 11451 if (this.options.prefix) { 11452 prefixAndAttribs.push(this.options.prefix); 11453 } 11454 if (attribs.length) { 11455 prefixAndAttribs.push(attribs.join(', ')); 11456 } 11457 11458 this._container.innerHTML = prefixAndAttribs.join(' <span aria-hidden="true">|</span> '); 11459 } 11460 }); 11461 11462 // @namespace Map 11463 // @section Control options 11464 // @option attributionControl: Boolean = true 11465 // Whether a [attribution control](#control-attribution) is added to the map by default. 11466 Map.mergeOptions({ 11467 attributionControl: true 11468 }); 11469 11470 Map.addInitHook(function () { 11471 if (this.options.attributionControl) { 11472 new Attribution().addTo(this); 11473 } 11474 }); 11475 11476 // @namespace Control.Attribution 11477 // @factory L.control.attribution(options: Control.Attribution options) 11478 // Creates an attribution control. 11479 var attribution = function (options) { 11480 return new Attribution(options); 11481 }; 11482 11483 Control.Layers = Layers; 11484 Control.Zoom = Zoom; 11485 Control.Scale = Scale; 11486 Control.Attribution = Attribution; 11487 11488 control.layers = layers; 11489 control.zoom = zoom; 11490 control.scale = scale; 11491 control.attribution = attribution; 11492 11493 /* 11494 L.Handler is a base class for handler classes that are used internally to inject 11495 interaction features like dragging to classes like Map and Marker. 11496 */ 11497 11498 // @class Handler 11499 // @aka L.Handler 11500 // Abstract class for map interaction handlers 11501 11502 var Handler = Class.extend({ 11503 initialize: function (map) { 11504 this._map = map; 11505 }, 11506 11507 // @method enable(): this 11508 // Enables the handler 11509 enable: function () { 11510 if (this._enabled) { return this; } 11511 11512 this._enabled = true; 11513 this.addHooks(); 11514 return this; 11515 }, 11516 11517 // @method disable(): this 11518 // Disables the handler 11519 disable: function () { 11520 if (!this._enabled) { return this; } 11521 11522 this._enabled = false; 11523 this.removeHooks(); 11524 return this; 11525 }, 11526 11527 // @method enabled(): Boolean 11528 // Returns `true` if the handler is enabled 11529 enabled: function () { 11530 return !!this._enabled; 11531 } 11532 11533 // @section Extension methods 11534 // Classes inheriting from `Handler` must implement the two following methods: 11535 // @method addHooks() 11536 // Called when the handler is enabled, should add event hooks. 11537 // @method removeHooks() 11538 // Called when the handler is disabled, should remove the event hooks added previously. 11539 }); 11540 11541 // @section There is static function which can be called without instantiating L.Handler: 11542 // @function addTo(map: Map, name: String): this 11543 // Adds a new Handler to the given map with the given name. 11544 Handler.addTo = function (map, name) { 11545 map.addHandler(name, this); 11546 return this; 11547 }; 11548 11549 var Mixin = {Events: Events}; 11550 11551 /* 11552 * @class Draggable 11553 * @aka L.Draggable 11554 * @inherits Evented 11555 * 11556 * A class for making DOM elements draggable (including touch support). 11557 * Used internally for map and marker dragging. Only works for elements 11558 * that were positioned with [`L.DomUtil.setPosition`](#domutil-setposition). 11559 * 11560 * @example 11561 * ```js 11562 * var draggable = new L.Draggable(elementToDrag); 11563 * draggable.enable(); 11564 * ``` 11565 */ 11566 11567 var START = Browser.touch ? 'touchstart mousedown' : 'mousedown'; 11568 11569 var Draggable = Evented.extend({ 11570 11571 options: { 11572 // @section 11573 // @aka Draggable options 11574 // @option clickTolerance: Number = 3 11575 // The max number of pixels a user can shift the mouse pointer during a click 11576 // for it to be considered a valid click (as opposed to a mouse drag). 11577 clickTolerance: 3 11578 }, 11579 11580 // @constructor L.Draggable(el: HTMLElement, dragHandle?: HTMLElement, preventOutline?: Boolean, options?: Draggable options) 11581 // Creates a `Draggable` object for moving `el` when you start dragging the `dragHandle` element (equals `el` itself by default). 11582 initialize: function (element, dragStartTarget, preventOutline, options) { 11583 setOptions(this, options); 11584 11585 this._element = element; 11586 this._dragStartTarget = dragStartTarget || element; 11587 this._preventOutline = preventOutline; 11588 }, 11589 11590 // @method enable() 11591 // Enables the dragging ability 11592 enable: function () { 11593 if (this._enabled) { return; } 11594 11595 on(this._dragStartTarget, START, this._onDown, this); 11596 11597 this._enabled = true; 11598 }, 11599 11600 // @method disable() 11601 // Disables the dragging ability 11602 disable: function () { 11603 if (!this._enabled) { return; } 11604 11605 // If we're currently dragging this draggable, 11606 // disabling it counts as first ending the drag. 11607 if (Draggable._dragging === this) { 11608 this.finishDrag(true); 11609 } 11610 11611 off(this._dragStartTarget, START, this._onDown, this); 11612 11613 this._enabled = false; 11614 this._moved = false; 11615 }, 11616 11617 _onDown: function (e) { 11618 // Ignore the event if disabled; this happens in IE11 11619 // under some circumstances, see #3666. 11620 if (!this._enabled) { return; } 11621 11622 this._moved = false; 11623 11624 if (hasClass(this._element, 'leaflet-zoom-anim')) { return; } 11625 11626 if (e.touches && e.touches.length !== 1) { 11627 // Finish dragging to avoid conflict with touchZoom 11628 if (Draggable._dragging === this) { 11629 this.finishDrag(); 11630 } 11631 return; 11632 } 11633 11634 if (Draggable._dragging || e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { return; } 11635 Draggable._dragging = this; // Prevent dragging multiple objects at once. 11636 11637 if (this._preventOutline) { 11638 preventOutline(this._element); 11639 } 11640 11641 disableImageDrag(); 11642 disableTextSelection(); 11643 11644 if (this._moving) { return; } 11645 11646 // @event down: Event 11647 // Fired when a drag is about to start. 11648 this.fire('down'); 11649 11650 var first = e.touches ? e.touches[0] : e, 11651 sizedParent = getSizedParentNode(this._element); 11652 11653 this._startPoint = new Point(first.clientX, first.clientY); 11654 this._startPos = getPosition(this._element); 11655 11656 // Cache the scale, so that we can continuously compensate for it during drag (_onMove). 11657 this._parentScale = getScale(sizedParent); 11658 11659 var mouseevent = e.type === 'mousedown'; 11660 on(document, mouseevent ? 'mousemove' : 'touchmove', this._onMove, this); 11661 on(document, mouseevent ? 'mouseup' : 'touchend touchcancel', this._onUp, this); 11662 }, 11663 11664 _onMove: function (e) { 11665 // Ignore the event if disabled; this happens in IE11 11666 // under some circumstances, see #3666. 11667 if (!this._enabled) { return; } 11668 11669 if (e.touches && e.touches.length > 1) { 11670 this._moved = true; 11671 return; 11672 } 11673 11674 var first = (e.touches && e.touches.length === 1 ? e.touches[0] : e), 11675 offset = new Point(first.clientX, first.clientY)._subtract(this._startPoint); 11676 11677 if (!offset.x && !offset.y) { return; } 11678 if (Math.abs(offset.x) + Math.abs(offset.y) < this.options.clickTolerance) { return; } 11679 11680 // We assume that the parent container's position, border and scale do not change for the duration of the drag. 11681 // Therefore there is no need to account for the position and border (they are eliminated by the subtraction) 11682 // and we can use the cached value for the scale. 11683 offset.x /= this._parentScale.x; 11684 offset.y /= this._parentScale.y; 11685 11686 preventDefault(e); 11687 11688 if (!this._moved) { 11689 // @event dragstart: Event 11690 // Fired when a drag starts 11691 this.fire('dragstart'); 11692 11693 this._moved = true; 11694 11695 addClass(document.body, 'leaflet-dragging'); 11696 11697 this._lastTarget = e.target || e.srcElement; 11698 // IE and Edge do not give the <use> element, so fetch it 11699 // if necessary 11700 if (window.SVGElementInstance && this._lastTarget instanceof window.SVGElementInstance) { 11701 this._lastTarget = this._lastTarget.correspondingUseElement; 11702 } 11703 addClass(this._lastTarget, 'leaflet-drag-target'); 11704 } 11705 11706 this._newPos = this._startPos.add(offset); 11707 this._moving = true; 11708 11709 this._lastEvent = e; 11710 this._updatePosition(); 11711 }, 11712 11713 _updatePosition: function () { 11714 var e = {originalEvent: this._lastEvent}; 11715 11716 // @event predrag: Event 11717 // Fired continuously during dragging *before* each corresponding 11718 // update of the element's position. 11719 this.fire('predrag', e); 11720 setPosition(this._element, this._newPos); 11721 11722 // @event drag: Event 11723 // Fired continuously during dragging. 11724 this.fire('drag', e); 11725 }, 11726 11727 _onUp: function () { 11728 // Ignore the event if disabled; this happens in IE11 11729 // under some circumstances, see #3666. 11730 if (!this._enabled) { return; } 11731 this.finishDrag(); 11732 }, 11733 11734 finishDrag: function (noInertia) { 11735 removeClass(document.body, 'leaflet-dragging'); 11736 11737 if (this._lastTarget) { 11738 removeClass(this._lastTarget, 'leaflet-drag-target'); 11739 this._lastTarget = null; 11740 } 11741 11742 off(document, 'mousemove touchmove', this._onMove, this); 11743 off(document, 'mouseup touchend touchcancel', this._onUp, this); 11744 11745 enableImageDrag(); 11746 enableTextSelection(); 11747 11748
11748if (this._moved && this._moving) { 11749 11750 // @event dragend: DragEndEvent 11751 // Fired when the drag ends. 11752 this.fire('dragend', { 11753 noInertia: noInertia, 11754 distance: this._newPos.distanceTo(this._startPos) 11755 });
vendor: 9,245 bytes, lines 11756-12072
11756 } 11757 11758 this._moving = false; 11759 Draggable._dragging = false; 11760 } 11761 11762 }); 11763 11764 /* 11765 * @namespace LineUtil 11766 * 11767 * Various utility functions for polyline points processing, used by Leaflet internally to make polylines lightning-fast. 11768 */ 11769 11770 // Simplify polyline with vertex reduction and Douglas-Peucker simplification. 11771 // Improves rendering performance dramatically by lessening the number of points to draw. 11772 11773 // @function simplify(points: Point[], tolerance: Number): Point[] 11774 // Dramatically reduces the number of points in a polyline while retaining 11775 // its shape and returns a new array of simplified points, using the 11776 // [Ramer-Douglas-Peucker algorithm](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm). 11777 // Used for a huge performance boost when processing/displaying Leaflet polylines for 11778 // each zoom level and also reducing visual noise. tolerance affects the amount of 11779 // simplification (lesser value means higher quality but slower and with more points). 11780 // Also released as a separated micro-library [Simplify.js](https://mourner.github.io/simplify-js/). 11781 function simplify(points, tolerance) { 11782 if (!tolerance || !points.length) { 11783 return points.slice(); 11784 } 11785 11786 var sqTolerance = tolerance * tolerance; 11787 11788 // stage 1: vertex reduction 11789 points = _reducePoints(points, sqTolerance); 11790 11791 // stage 2: Douglas-Peucker simplification 11792 points = _simplifyDP(points, sqTolerance); 11793 11794 return points; 11795 } 11796 11797 // @function pointToSegmentDistance(p: Point, p1: Point, p2: Point): Number 11798 // Returns the distance between point `p` and segment `p1` to `p2`. 11799 function pointToSegmentDistance(p, p1, p2) { 11800 return Math.sqrt(_sqClosestPointOnSegment(p, p1, p2, true)); 11801 } 11802 11803 // @function closestPointOnSegment(p: Point, p1: Point, p2: Point): Number 11804 // Returns the closest point from a point `p` on a segment `p1` to `p2`. 11805 function closestPointOnSegment(p, p1, p2) { 11806 return _sqClosestPointOnSegment(p, p1, p2); 11807 } 11808 11809 // Ramer-Douglas-Peucker simplification, see https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm 11810 function _simplifyDP(points, sqTolerance) { 11811 11812 var len = points.length, 11813 ArrayConstructor = typeof Uint8Array !== undefined + '' ? Uint8Array : Array, 11814 markers = new ArrayConstructor(len); 11815 11816 markers[0] = markers[len - 1] = 1; 11817 11818 _simplifyDPStep(points, markers, sqTolerance, 0, len - 1); 11819 11820 var i, 11821 newPoints = []; 11822 11823 for (i = 0; i < len; i++) { 11824 if (markers[i]) { 11825 newPoints.push(points[i]); 11826 } 11827 } 11828 11829 return newPoints; 11830 } 11831 11832 function _simplifyDPStep(points, markers, sqTolerance, first, last) { 11833 11834 var maxSqDist = 0, 11835 index, i, sqDist; 11836 11837 for (i = first + 1; i <= last - 1; i++) { 11838 sqDist = _sqClosestPointOnSegment(points[i], points[first], points[last], true); 11839 11840 if (sqDist > maxSqDist) { 11841 index = i; 11842 maxSqDist = sqDist; 11843 } 11844 } 11845 11846 if (maxSqDist > sqTolerance) { 11847 markers[index] = 1; 11848 11849 _simplifyDPStep(points, markers, sqTolerance, first, index); 11850 _simplifyDPStep(points, markers, sqTolerance, index, last); 11851 } 11852 } 11853 11854 // reduce points that are too close to each other to a single point 11855 function _reducePoints(points, sqTolerance) { 11856 var reducedPoints = [points[0]]; 11857 11858 for (var i = 1, prev = 0, len = points.length; i < len; i++) { 11859 if (_sqDist(points[i], points[prev]) > sqTolerance) { 11860 reducedPoints.push(points[i]); 11861 prev = i; 11862 } 11863 } 11864 if (prev < len - 1) { 11865 reducedPoints.push(points[len - 1]); 11866 } 11867 return reducedPoints; 11868 } 11869 11870 var _lastCode; 11871 11872 // @function clipSegment(a: Point, b: Point, bounds: Bounds, useLastCode?: Boolean, round?: Boolean): Point[]|Boolean 11873 // Clips the segment a to b by rectangular bounds with the 11874 // [Cohen-Sutherland algorithm](https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm) 11875 // (modifying the segment points directly!). Used by Leaflet to only show polyline 11876 // points that are on the screen or near, increasing performance. 11877 function clipSegment(a, b, bounds, useLastCode, round) { 11878 var codeA = useLastCode ? _lastCode : _getBitCode(a, bounds), 11879 codeB = _getBitCode(b, bounds), 11880 11881 codeOut, p, newCode; 11882 11883 // save 2nd code to avoid calculating it on the next segment 11884 _lastCode = codeB; 11885 11886 while (true) { 11887 // if a,b is inside the clip window (trivial accept) 11888 if (!(codeA | codeB)) { 11889 return [a, b]; 11890 } 11891 11892 // if a,b is outside the clip window (trivial reject) 11893 if (codeA & codeB) { 11894 return false; 11895 } 11896 11897 // other cases 11898 codeOut = codeA || codeB; 11899 p = _getEdgeIntersection(a, b, codeOut, bounds, round); 11900 newCode = _getBitCode(p, bounds); 11901 11902 if (codeOut === codeA) { 11903 a = p; 11904 codeA = newCode; 11905 } else { 11906 b = p; 11907 codeB = newCode; 11908 } 11909 } 11910 } 11911 11912 function _getEdgeIntersection(a, b, code, bounds, round) { 11913 var dx = b.x - a.x, 11914 dy = b.y - a.y, 11915 min = bounds.min, 11916 max = bounds.max, 11917 x, y; 11918 11919 if (code & 8) { // top 11920 x = a.x + dx * (max.y - a.y) / dy; 11921 y = max.y; 11922 11923 } else if (code & 4) { // bottom 11924 x = a.x + dx * (min.y - a.y) / dy; 11925 y = min.y; 11926 11927 } else if (code & 2) { // right 11928 x = max.x; 11929 y = a.y + dy * (max.x - a.x) / dx; 11930 11931 } else if (code & 1) { // left 11932 x = min.x; 11933 y = a.y + dy * (min.x - a.x) / dx; 11934 } 11935 11936 return new Point(x, y, round); 11937 } 11938 11939 function _getBitCode(p, bounds) { 11940 var code = 0; 11941 11942 if (p.x < bounds.min.x) { // left 11943 code |= 1; 11944 } else if (p.x > bounds.max.x) { // right 11945 code |= 2; 11946 } 11947 11948 if (p.y < bounds.min.y) { // bottom 11949 code |= 4; 11950 } else if (p.y > bounds.max.y) { // top 11951 code |= 8; 11952 } 11953 11954 return code; 11955 } 11956 11957 // square distance (to avoid unnecessary Math.sqrt calls) 11958 function _sqDist(p1, p2) { 11959 var dx = p2.x - p1.x, 11960 dy = p2.y - p1.y; 11961 return dx * dx + dy * dy; 11962 } 11963 11964 // return closest point on segment or distance to that point 11965 function _sqClosestPointOnSegment(p, p1, p2, sqDist) { 11966 var x = p1.x, 11967 y = p1.y, 11968 dx = p2.x - x, 11969 dy = p2.y - y, 11970 dot = dx * dx + dy * dy, 11971 t; 11972 11973 if (dot > 0) { 11974 t = ((p.x - x) * dx + (p.y - y) * dy) / dot; 11975 11976 if (t > 1) { 11977 x = p2.x; 11978 y = p2.y; 11979 } else if (t > 0) { 11980 x += dx * t; 11981 y += dy * t; 11982 } 11983 } 11984 11985 dx = p.x - x; 11986 dy = p.y - y; 11987 11988 return sqDist ? dx * dx + dy * dy : new Point(x, y); 11989 } 11990 11991 11992 // @function isFlat(latlngs: LatLng[]): Boolean 11993 // Returns true if `latlngs` is a flat array, false is nested. 11994 function isFlat(latlngs) { 11995 return !isArray(latlngs[0]) || (typeof latlngs[0][0] !== 'object' && typeof latlngs[0][0] !== 'undefined'); 11996 } 11997 11998 function _flat(latlngs) { 11999 console.warn('Deprecated use of _flat, please use L.LineUtil.isFlat instead.'); 12000 return isFlat(latlngs); 12001 } 12002 12003 var LineUtil = { 12004 __proto__: null, 12005 simplify: simplify, 12006 pointToSegmentDistance: pointToSegmentDistance, 12007 closestPointOnSegment: closestPointOnSegment, 12008 clipSegment: clipSegment, 12009 _getEdgeIntersection: _getEdgeIntersection, 12010 _getBitCode: _getBitCode, 12011 _sqClosestPointOnSegment: _sqClosestPointOnSegment, 12012 isFlat: isFlat, 12013 _flat: _flat 12014 }; 12015 12016 /* 12017 * @namespace PolyUtil 12018 * Various utility functions for polygon geometries. 12019 */ 12020 12021 /* @function clipPolygon(points: Point[], bounds: Bounds, round?: Boolean): Point[] 12022 * Clips the polygon geometry defined by the given `points` by the given bounds (using the [Sutherland-Hodgman algorithm](https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm)). 12023 * Used by Leaflet to only show polygon points that are on the screen or near, increasing 12024 * performance. Note that polygon points needs different algorithm for clipping 12025 * than polyline, so there's a separate method for it. 12026 */ 12027 function clipPolygon(points, bounds, round) { 12028 var clippedPoints, 12029 edges = [1, 4, 2, 8], 12030 i, j, k, 12031 a, b, 12032 len, edge, p; 12033 12034 for (i = 0, len = points.length; i < len; i++) { 12035 points[i]._code = _getBitCode(points[i], bounds); 12036 } 12037 12038 // for each edge (left, bottom, right, top) 12039 for (k = 0; k < 4; k++) { 12040 edge = edges[k]; 12041 clippedPoints = []; 12042 12043 for (i = 0, len = points.length, j = len - 1; i < len; j = i++) { 12044 a = points[i]; 12045 b = points[j]; 12046 12047 // if a is inside the clip window 12048 if (!(a._code & edge)) { 12049 // if b is outside the clip window (a->b goes out of screen) 12050 if (b._code & edge) { 12051 p = _getEdgeIntersection(b, a, edge, bounds, round); 12052 p._code = _getBitCode(p, bounds); 12053 clippedPoints.push(p); 12054 } 12055 clippedPoints.push(a); 12056 12057 // else if b is inside the clip window (a->b enters the screen) 12058 } else if (!(b._code & edge)) { 12059 p = _getEdgeIntersection(b, a, edge, bounds, round); 12060 p._code = _getBitCode(p, bounds); 12061 clippedPoints.push(p); 12062 } 12063 } 12064 points = clippedPoints; 12065 } 12066 12067 return points; 12068 } 12069 12070 var PolyUtil = { 12071 __proto__: null, 12072 clipPolygon: clipPolygon
vendor: 57,538 bytes, lines 12072-14030
12072 12073 }; 12074 12075 /* 12076 * @namespace Projection 12077 * @section 12078 * Leaflet comes with a set of already defined Projections out of the box: 12079 * 12080 * @projection L.Projection.LonLat 12081 * 12082 * Equirectangular, or Plate Carree projection â the most simple projection, 12083 * mostly used by GIS enthusiasts. Directly maps `x` as longitude, and `y` as 12084 * latitude. Also suitable for flat worlds, e.g. game maps. Used by the 12085 * `EPSG:4326` and `Simple` CRS. 12086 */ 12087 12088 var LonLat = { 12089 project: function (latlng) { 12090 return new Point(latlng.lng, latlng.lat); 12091 }, 12092 12093 unproject: function (point) { 12094 return new LatLng(point.y, point.x); 12095 }, 12096 12097 bounds: new Bounds([-180, -90], [180, 90]) 12098 }; 12099 12100 /* 12101 * @namespace Projection 12102 * @projection L.Projection.Mercator 12103 * 12104 * Elliptical Mercator projection â more complex than Spherical Mercator. Assumes that Earth is an ellipsoid. Used by the EPSG:3395 CRS. 12105 */ 12106 12107 var Mercator = { 12108 R: 6378137, 12109 R_MINOR: 6356752.314245179, 12110 12111 bounds: new Bounds([-20037508.34279, -15496570.73972], [20037508.34279, 18764656.23138]), 12112 12113 project: function (latlng) { 12114 var d = Math.PI / 180, 12115 r = this.R, 12116 y = latlng.lat * d, 12117 tmp = this.R_MINOR / r, 12118 e = Math.sqrt(1 - tmp * tmp), 12119 con = e * Math.sin(y); 12120 12121 var ts = Math.tan(Math.PI / 4 - y / 2) / Math.pow((1 - con) / (1 + con), e / 2); 12122 y = -r * Math.log(Math.max(ts, 1E-10)); 12123 12124 return new Point(latlng.lng * d * r, y); 12125 }, 12126 12127 unproject: function (point) { 12128 var d = 180 / Math.PI, 12129 r = this.R, 12130 tmp = this.R_MINOR / r, 12131 e = Math.sqrt(1 - tmp * tmp), 12132 ts = Math.exp(-point.y / r), 12133 phi = Math.PI / 2 - 2 * Math.atan(ts); 12134 12135 for (var i = 0, dphi = 0.1, con; i < 15 && Math.abs(dphi) > 1e-7; i++) { 12136 con = e * Math.sin(phi); 12137 con = Math.pow((1 - con) / (1 + con), e / 2); 12138 dphi = Math.PI / 2 - 2 * Math.atan(ts * con) - phi; 12139 phi += dphi; 12140 } 12141 12142 return new LatLng(phi * d, point.x * d / r); 12143 } 12144 }; 12145 12146 /* 12147 * @class Projection 12148 12149 * An object with methods for projecting geographical coordinates of the world onto 12150 * a flat surface (and back). See [Map projection](https://en.wikipedia.org/wiki/Map_projection). 12151 12152 * @property bounds: Bounds 12153 * The bounds (specified in CRS units) where the projection is valid 12154 12155 * @method project(latlng: LatLng): Point 12156 * Projects geographical coordinates into a 2D point. 12157 * Only accepts actual `L.LatLng` instances, not arrays. 12158 12159 * @method unproject(point: Point): LatLng 12160 * The inverse of `project`. Projects a 2D point into a geographical location. 12161 * Only accepts actual `L.Point` instances, not arrays. 12162 12163 * Note that the projection instances do not inherit from Leaflet's `Class` object, 12164 * and can't be instantiated. Also, new classes can't inherit from them, 12165 * and methods can't be added to them with the `include` function. 12166 12167 */ 12168 12169 var index = { 12170 __proto__: null, 12171 LonLat: LonLat, 12172 Mercator: Mercator, 12173 SphericalMercator: SphericalMercator 12174 }; 12175 12176 /* 12177 * @namespace CRS 12178 * @crs L.CRS.EPSG3395 12179 * 12180 * Rarely used by some commercial tile providers. Uses Elliptical Mercator projection. 12181 */ 12182 var EPSG3395 = extend({}, Earth, { 12183 code: 'EPSG:3395', 12184 projection: Mercator, 12185 12186 transformation: (function () { 12187 var scale = 0.5 / (Math.PI * Mercator.R); 12188 return toTransformation(scale, 0.5, -scale, 0.5); 12189 }()) 12190 }); 12191 12192 /* 12193 * @namespace CRS 12194 * @crs L.CRS.EPSG4326 12195 * 12196 * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection. 12197 * 12198 * Leaflet 1.0.x complies with the [TMS coordinate scheme for EPSG:4326](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic), 12199 * which is a breaking change from 0.7.x behaviour. If you are using a `TileLayer` 12200 * with this CRS, ensure that there are two 256x256 pixel tiles covering the 12201 * whole earth at zoom level zero, and that the tile coordinate origin is (-180,+90), 12202 * or (-180,-90) for `TileLayer`s with [the `tms` option](#tilelayer-tms) set. 12203 */ 12204 12205 var EPSG4326 = extend({}, Earth, { 12206 code: 'EPSG:4326', 12207 projection: LonLat, 12208 transformation: toTransformation(1 / 180, 1, -1 / 180, 0.5) 12209 }); 12210 12211 /* 12212 * @namespace CRS 12213 * @crs L.CRS.Simple 12214 * 12215 * A simple CRS that maps longitude and latitude into `x` and `y` directly. 12216 * May be used for maps of flat surfaces (e.g. game maps). Note that the `y` 12217 * axis should still be inverted (going from bottom to top). `distance()` returns 12218 * simple euclidean distance. 12219 */ 12220 12221 var Simple = extend({}, CRS, { 12222 projection: LonLat, 12223 transformation: toTransformation(1, 0, -1, 0), 12224 12225 scale: function (zoom) { 12226 return Math.pow(2, zoom); 12227 }, 12228 12229 zoom: function (scale) { 12230 return Math.log(scale) / Math.LN2; 12231 }, 12232 12233 distance: function (latlng1, latlng2) { 12234 var dx = latlng2.lng - latlng1.lng, 12235 dy = latlng2.lat - latlng1.lat; 12236 12237 return Math.sqrt(dx * dx + dy * dy); 12238 }, 12239 12240 infinite: true 12241 }); 12242 12243 CRS.Earth = Earth; 12244 CRS.EPSG3395 = EPSG3395; 12245 CRS.EPSG3857 = EPSG3857; 12246 CRS.EPSG900913 = EPSG900913; 12247 CRS.EPSG4326 = EPSG4326; 12248 CRS.Simple = Simple; 12249 12250 /* 12251 * @class Layer 12252 * @inherits Evented 12253 * @aka L.Layer 12254 * @aka ILayer 12255 * 12256 * A set of methods from the Layer base class that all Leaflet layers use. 12257 * Inherits all methods, options and events from `L.Evented`. 12258 * 12259 * @example 12260 * 12261 * ```js 12262 * var layer = L.marker(latlng).addTo(map); 12263 * layer.addTo(map); 12264 * layer.remove(); 12265 * ``` 12266 * 12267 * @event add: Event 12268 * Fired after the layer is added to a map 12269 * 12270 * @event remove: Event 12271 * Fired after the layer is removed from a map 12272 */ 12273 12274 12275 var Layer = Evented.extend({ 12276 12277 // Classes extending `L.Layer` will inherit the following options: 12278 options: { 12279 // @option pane: String = 'overlayPane' 12280 // By default the layer will be added to the map's [overlay pane](#map-overlaypane). Overriding this option will cause the layer to be placed on another pane by default. 12281 pane: 'overlayPane', 12282 12283 // @option attribution: String = null 12284 // String to be shown in the attribution control, e.g. "© OpenStreetMap contributors". It describes the layer data and is often a legal obligation towards copyright holders and tile providers. 12285 attribution: null, 12286 12287 bubblingMouseEvents: true 12288 }, 12289 12290 /* @section 12291 * Classes extending `L.Layer` will inherit the following methods: 12292 * 12293 * @method addTo(map: Map|LayerGroup): this 12294 * Adds the layer to the given map or layer group. 12295 */ 12296 addTo: function (map) { 12297 map.addLayer(this); 12298 return this; 12299 }, 12300 12301 // @method remove: this 12302 // Removes the layer from the map it is currently active on. 12303 remove: function () { 12304 return this.removeFrom(this._map || this._mapToAdd); 12305 }, 12306 12307 // @method removeFrom(map: Map): this 12308 // Removes the layer from the given map 12309 // 12310 // @alternative 12311 // @method removeFrom(group: LayerGroup): this 12312 // Removes the layer from the given `LayerGroup` 12313 removeFrom: function (obj) { 12314 if (obj) { 12315 obj.removeLayer(this); 12316 } 12317 return this; 12318 }, 12319 12320 // @method getPane(name? : String): HTMLElement 12321 // Returns the `HTMLElement` representing the named pane on the map. If `name` is omitted, returns the pane for this layer. 12322 getPane: function (name) { 12323 return this._map.getPane(name ? (this.options[name] || name) : this.options.pane); 12324 }, 12325 12326 addInteractiveTarget: function (targetEl) { 12327 this._map._targets[stamp(targetEl)] = this; 12328 return this; 12329 }, 12330 12331 removeInteractiveTarget: function (targetEl) { 12332 delete this._map._targets[stamp(targetEl)]; 12333 return this; 12334 }, 12335 12336 // @method getAttribution: String 12337 // Used by the `attribution control`, returns the [attribution option](#gridlayer-attribution). 12338 getAttribution: function () { 12339 return this.options.attribution; 12340 }, 12341 12342 _layerAdd: function (e) { 12343 var map = e.target; 12344 12345 // check in case layer gets added and then removed before the map is ready 12346 if (!map.hasLayer(this)) { return; } 12347 12348 this._map = map; 12349 this._zoomAnimated = map._zoomAnimated; 12350 12351 if (this.getEvents) { 12352 var events = this.getEvents(); 12353 map.on(events, this); 12354 this.once('remove', function () { 12355 map.off(events, this); 12356 }, this); 12357 } 12358 12359 this.onAdd(map); 12360 12361 this.fire('add'); 12362 map.fire('layeradd', {layer: this}); 12363 } 12364 }); 12365 12366 /* @section Extension methods 12367 * @uninheritable 12368 * 12369 * Every layer should extend from `L.Layer` and (re-)implement the following methods. 12370 * 12371 * @method onAdd(map: Map): this 12372 * Should contain code that creates DOM elements for the layer, adds them to `map panes` where they should belong and puts listeners on relevant map events. Called on [`map.addLayer(layer)`](#map-addlayer). 12373 * 12374 * @method onRemove(map: Map): this 12375 * Should contain all clean up code that removes the layer's elements from the DOM and removes listeners previously added in [`onAdd`](#layer-onadd). Called on [`map.removeLayer(layer)`](#map-removelayer). 12376 * 12377 * @method getEvents(): Object 12378 * This optional method should return an object like `{ viewreset: this._reset }` for [`addEventListener`](#evented-addeventlistener). The event handlers in this object will be automatically added and removed from the map with your layer. 12379 * 12380 * @method getAttribution(): String 12381 * This optional method should return a string containing HTML to be shown on the `Attribution control` whenever the layer is visible. 12382 * 12383 * @method beforeAdd(map: Map): this 12384 * Optional method. Called on [`map.addLayer(layer)`](#map-addlayer), before the layer is added to the map, before events are initialized, without waiting until the map is in a usable state. Use for early initialization only. 12385 */ 12386 12387 12388 /* @namespace Map 12389 * @section Layer events 12390 * 12391 * @event layeradd: LayerEvent 12392 * Fired when a new layer is added to the map. 12393 * 12394 * @event layerremove: LayerEvent 12395 * Fired when some layer is removed from the map 12396 * 12397 * @section Methods for Layers and Controls 12398 */ 12399 Map.include({ 12400 // @method addLayer(layer: Layer): this 12401 // Adds the given layer to the map 12402 addLayer: function (layer) { 12403 if (!layer._layerAdd) { 12404 throw new Error('The provided object is not a Layer.'); 12405 } 12406 12407 var id = stamp(layer); 12408 if (this._layers[id]) { return this; } 12409 this._layers[id] = layer; 12410 12411 layer._mapToAdd = this; 12412 12413 if (layer.beforeAdd) { 12414 layer.beforeAdd(this); 12415 } 12416 12417 this.whenReady(layer._layerAdd, layer); 12418 12419 return this; 12420 }, 12421 12422 // @method removeLayer(layer: Layer): this 12423 // Removes the given layer from the map. 12424 removeLayer: function (layer) { 12425 var id = stamp(layer); 12426 12427 if (!this._layers[id]) { return this; } 12428 12429 if (this._loaded) { 12430 layer.onRemove(this); 12431 } 12432 12433 delete this._layers[id]; 12434 12435 if (this._loaded) { 12436 this.fire('layerremove', {layer: layer}); 12437 layer.fire('remove'); 12438 } 12439 12440 layer._map = layer._mapToAdd = null; 12441 12442 return this; 12443 }, 12444 12445 // @method hasLayer(layer: Layer): Boolean 12446 // Returns `true` if the given layer is currently added to the map 12447 hasLayer: function (layer) { 12448 return stamp(layer) in this._layers; 12449 }, 12450 12451 /* @method eachLayer(fn: Function, context?: Object): this 12452 * Iterates over the layers of the map, optionally specifying context of the iterator function. 12453 * ``` 12454 * map.eachLayer(function(layer){ 12455 * layer.bindPopup('Hello'); 12456 * }); 12457 * ``` 12458 */ 12459 eachLayer: function (method, context) { 12460 for (var i in this._layers) { 12461 method.call(context, this._layers[i]); 12462 } 12463 return this; 12464 }, 12465 12466 _addLayers: function (layers) { 12467 layers = layers ? (isArray(layers) ? layers : [layers]) : []; 12468 12469 for (var i = 0, len = layers.length; i < len; i++) { 12470 this.addLayer(layers[i]); 12471 } 12472 }, 12473 12474 _addZoomLimit: function (layer) { 12475 if (!isNaN(layer.options.maxZoom) || !isNaN(layer.options.minZoom)) { 12476 this._zoomBoundLayers[stamp(layer)] = layer; 12477 this._updateZoomLevels(); 12478 } 12479 }, 12480 12481 _removeZoomLimit: function (layer) { 12482 var id = stamp(layer); 12483 12484 if (this._zoomBoundLayers[id]) { 12485 delete this._zoomBoundLayers[id]; 12486 this._updateZoomLevels(); 12487 } 12488 }, 12489 12490 _updateZoomLevels: function () { 12491 var minZoom = Infinity, 12492 maxZoom = -Infinity, 12493 oldZoomSpan = this._getZoomSpan(); 12494 12495 for (var i in this._zoomBoundLayers) { 12496 var options = this._zoomBoundLayers[i].options; 12497 12498 minZoom = options.minZoom === undefined ? minZoom : Math.min(minZoom, options.minZoom); 12499 maxZoom = options.maxZoom === undefined ? maxZoom : Math.max(maxZoom, options.maxZoom); 12500 } 12501 12502 this._layersMaxZoom = maxZoom === -Infinity ? undefined : maxZoom; 12503 this._layersMinZoom = minZoom === Infinity ? undefined : minZoom; 12504 12505 // @section Map state change events 12506 // @event zoomlevelschange: Event 12507 // Fired when the number of zoomlevels on the map is changed due 12508 // to adding or removing a layer. 12509 if (oldZoomSpan !== this._getZoomSpan()) { 12510 this.fire('zoomlevelschange'); 12511 } 12512 12513 if (this.options.maxZoom === undefined && this._layersMaxZoom && this.getZoom() > this._layersMaxZoom) { 12514 this.setZoom(this._layersMaxZoom); 12515 } 12516 if (this.options.minZoom === undefined && this._layersMinZoom && this.getZoom() < this._layersMinZoom) { 12517 this.setZoom(this._layersMinZoom); 12518 } 12519 } 12520 }); 12521 12522 /* 12523 * @class LayerGroup 12524 * @aka L.LayerGroup 12525 * @inherits Interactive layer 12526 * 12527 * Used to group several layers and handle them as one. If you add it to the map, 12528 * any layers added or removed from the group will be added/removed on the map as 12529 * well. Extends `Layer`. 12530 * 12531 * @example 12532 * 12533 * ```js 12534 * L.layerGroup([marker1, marker2]) 12535 * .addLayer(polyline) 12536 * .addTo(map); 12537 * ``` 12538 */ 12539 12540 var LayerGroup = Layer.extend({ 12541 12542 initialize: function (layers, options) { 12543 setOptions(this, options); 12544 12545 this._layers = {}; 12546 12547 var i, len; 12548 12549 if (layers) { 12550 for (i = 0, len = layers.length; i < len; i++) { 12551 this.addLayer(layers[i]); 12552 } 12553 } 12554 }, 12555 12556 // @method addLayer(layer: Layer): this 12557 // Adds the given layer to the group. 12558 addLayer: function (layer) { 12559 var id = this.getLayerId(layer); 12560 12561 this._layers[id] = layer; 12562 12563 if (this._map) { 12564 this._map.addLayer(layer); 12565 } 12566 12567 return this; 12568 }, 12569 12570 // @method removeLayer(layer: Layer): this 12571 // Removes the given layer from the group. 12572 // @alternative 12573 // @method removeLayer(id: Number): this 12574 // Removes the layer with the given internal ID from the group. 12575 removeLayer: function (layer) { 12576 var id = layer in this._layers ? layer : this.getLayerId(layer); 12577 12578 if (this._map && this._layers[id]) { 12579 this._map.removeLayer(this._layers[id]); 12580 } 12581 12582 delete this._layers[id]; 12583 12584 return this; 12585 }, 12586 12587 // @method hasLayer(layer: Layer): Boolean 12588 // Returns `true` if the given layer is currently added to the group. 12589 // @alternative 12590 // @method hasLayer(id: Number): Boolean 12591 // Returns `true` if the given internal ID is currently added to the group. 12592 hasLayer: function (layer) { 12593 var layerId = typeof layer === 'number' ? layer : this.getLayerId(layer); 12594 return layerId in this._layers; 12595 }, 12596 12597 // @method clearLayers(): this 12598 // Removes all the layers from the group. 12599 clearLayers: function () { 12600 return this.eachLayer(this.removeLayer, this); 12601 }, 12602 12603 // @method invoke(methodName: String, â¦): this 12604 // Calls `methodName` on every layer contained in this group, passing any 12605 // additional parameters. Has no effect if the layers contained do not 12606 // implement `methodName`. 12607 invoke: function (methodName) { 12608 var args = Array.prototype.slice.call(arguments, 1), 12609 i, layer; 12610 12611 for (i in this._layers) { 12612 layer = this._layers[i]; 12613 12614 if (layer[methodName]) { 12615 layer[methodName].apply(layer, args); 12616 } 12617 } 12618 12619 return this; 12620 }, 12621 12622 onAdd: function (map) { 12623 this.eachLayer(map.addLayer, map); 12624 }, 12625 12626 onRemove: function (map) { 12627 this.eachLayer(map.removeLayer, map); 12628 }, 12629 12630 // @method eachLayer(fn: Function, context?: Object): this 12631 // Iterates over the layers of the group, optionally specifying context of the iterator function. 12632 // ```js 12633 // group.eachLayer(function (layer) { 12634 // layer.bindPopup('Hello'); 12635 // }); 12636 // ``` 12637 eachLayer: function (method, context) { 12638 for (var i in this._layers) { 12639 method.call(context, this._layers[i]); 12640 } 12641 return this; 12642 }, 12643 12644 // @method getLayer(id: Number): Layer 12645 // Returns the layer with the given internal ID. 12646 getLayer: function (id) { 12647 return this._layers[id]; 12648 }, 12649 12650 // @method getLayers(): Layer[] 12651 // Returns an array of all the layers added to the group. 12652 getLayers: function () { 12653 var layers = []; 12654 this.eachLayer(layers.push, layers); 12655 return layers; 12656 }, 12657 12658 // @method setZIndex(zIndex: Number): this 12659 // Calls `setZIndex` on every layer contained in this group, passing the z-index. 12660 setZIndex: function (zIndex) { 12661 return this.invoke('setZIndex', zIndex); 12662 }, 12663 12664 // @method getLayerId(layer: Layer): Number 12665 // Returns the internal ID for a layer 12666 getLayerId: function (layer) { 12667 return stamp(layer); 12668 } 12669 }); 12670 12671 12672 // @factory L.layerGroup(layers?: Layer[], options?: Object) 12673 // Create a layer group, optionally given an initial set of layers and an `options` object. 12674 var layerGroup = function (layers, options) { 12675 return new LayerGroup(layers, options); 12676 }; 12677 12678 /* 12679 * @class FeatureGroup 12680 * @aka L.FeatureGroup 12681 * @inherits LayerGroup 12682 * 12683 * Extended `LayerGroup` that makes it easier to do the same thing to all its member layers: 12684 * * [`bindPopup`](#layer-bindpopup) binds a popup to all of the layers at once (likewise with [`bindTooltip`](#layer-bindtooltip)) 12685 * * Events are propagated to the `FeatureGroup`, so if the group has an event 12686 * handler, it will handle events from any of the layers. This includes mouse events 12687 * and custom events. 12688 * * Has `layeradd` and `layerremove` events 12689 * 12690 * @example 12691 * 12692 * ```js 12693 * L.featureGroup([marker1, marker2, polyline]) 12694 * .bindPopup('Hello world!') 12695 * .on('click', function() { alert('Clicked on a member of the group!'); }) 12696 * .addTo(map); 12697 * ``` 12698 */ 12699 12700 var FeatureGroup = LayerGroup.extend({ 12701 12702 addLayer: function (layer) { 12703 if (this.hasLayer(layer)) { 12704 return this; 12705 } 12706 12707 layer.addEventParent(this); 12708 12709 LayerGroup.prototype.addLayer.call(this, layer); 12710 12711 // @event layeradd: LayerEvent 12712 // Fired when a layer is added to this `FeatureGroup` 12713 return this.fire('layeradd', {layer: layer}); 12714 }, 12715 12716 removeLayer: function (layer) { 12717 if (!this.hasLayer(layer)) { 12718 return this; 12719 } 12720 if (layer in this._layers) { 12721 layer = this._layers[layer]; 12722 } 12723 12724 layer.removeEventParent(this); 12725 12726 LayerGroup.prototype.removeLayer.call(this, layer); 12727 12728 // @event layerremove: LayerEvent 12729 // Fired when a layer is removed from this `FeatureGroup` 12730 return this.fire('layerremove', {layer: layer}); 12731 }, 12732 12733 // @method setStyle(style: Path options): this 12734 // Sets the given path options to each layer of the group that has a `setStyle` method. 12735 setStyle: function (style) { 12736 return this.invoke('setStyle', style); 12737 }, 12738 12739 // @method bringToFront(): this 12740 // Brings the layer group to the top of all other layers 12741 bringToFront: function () { 12742 return this.invoke('bringToFront'); 12743 }, 12744 12745 // @method bringToBack(): this 12746 // Brings the layer group to the back of all other layers 12747 bringToBack: function () { 12748 return this.invoke('bringToBack'); 12749 }, 12750 12751 // @method getBounds(): LatLngBounds 12752 // Returns the LatLngBounds of the Feature Group (created from bounds and coordinates of its children). 12753 getBounds: function () { 12754 var bounds = new LatLngBounds(); 12755 12756 for (var id in this._layers) { 12757 var layer = this._layers[id]; 12758 bounds.extend(layer.getBounds ? layer.getBounds() : layer.getLatLng()); 12759 } 12760 return bounds; 12761 } 12762 }); 12763 12764 // @factory L.featureGroup(layers?: Layer[], options?: Object) 12765 // Create a feature group, optionally given an initial set of layers and an `options` object. 12766 var featureGroup = function (layers, options) { 12767 return new FeatureGroup(layers, options); 12768 }; 12769 12770 /* 12771 * @class Icon 12772 * @aka L.Icon 12773 * 12774 * Represents an icon to provide when creating a marker. 12775 * 12776 * @example 12777 * 12778 * ```js 12779 * var myIcon = L.icon({ 12780 * iconUrl: 'my-icon.png', 12781 * iconRetinaUrl: '[email protected]', 12782 * iconSize: [38, 95], 12783 * iconAnchor: [22, 94], 12784 * popupAnchor: [-3, -76], 12785 * shadowUrl: 'my-icon-shadow.png', 12786 * shadowRetinaUrl: '[email protected]', 12787 * shadowSize: [68, 95], 12788 * shadowAnchor: [22, 94] 12789 * }); 12790 * 12791 * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map); 12792 * ``` 12793 * 12794 * `L.Icon.Default` extends `L.Icon` and is the blue icon Leaflet uses for markers by default. 12795 * 12796 */ 12797 12798 var Icon = Class.extend({ 12799 12800 /* @section 12801 * @aka Icon options 12802 * 12803 * @option iconUrl: String = null 12804 * **(required)** The URL to the icon image (absolute or relative to your script path). 12805 * 12806 * @option iconRetinaUrl: String = null 12807 * The URL to a retina sized version of the icon image (absolute or relative to your 12808 * script path). Used for Retina screen devices. 12809 * 12810 * @option iconSize: Point = null 12811 * Size of the icon image in pixels. 12812 * 12813 * @option iconAnchor: Point = null 12814 * The coordinates of the "tip" of the icon (relative to its top left corner). The icon 12815 * will be aligned so that this point is at the marker's geographical location. Centered 12816 * by default if size is specified, also can be set in CSS with negative margins. 12817 * 12818 * @option popupAnchor: Point = [0, 0] 12819 * The coordinates of the point from which popups will "open", relative to the icon anchor. 12820 * 12821 * @option tooltipAnchor: Point = [0, 0] 12822 * The coordinates of the point from which tooltips will "open", relative to the icon anchor. 12823 * 12824 * @option shadowUrl: String = null 12825 * The URL to the icon shadow image. If not specified, no shadow image will be created. 12826 * 12827 * @option shadowRetinaUrl: String = null 12828 * 12829 * @option shadowSize: Point = null 12830 * Size of the shadow image in pixels. 12831 * 12832 * @option shadowAnchor: Point = null 12833 * The coordinates of the "tip" of the shadow (relative to its top left corner) (the same 12834 * as iconAnchor if not specified). 12835 * 12836 * @option className: String = '' 12837 * A custom class name to assign to both icon and shadow images. Empty by default. 12838 */ 12839 12840 options: { 12841 popupAnchor: [0, 0], 12842 tooltipAnchor: [0, 0], 12843 12844 // @option crossOrigin: Boolean|String = false 12845 // Whether the crossOrigin attribute will be added to the tiles. 12846 // If a String is provided, all tiles will have their crossOrigin attribute set to the String provided. This is needed if you want to access tile pixel data. 12847 // Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values. 12848 crossOrigin: false 12849 }, 12850 12851 initialize: function (options) { 12852 setOptions(this, options); 12853 }, 12854 12855 // @method createIcon(oldIcon?: HTMLElement): HTMLElement 12856 // Called internally when the icon has to be shown, returns a `<img>` HTML element 12857 // styled according to the options. 12858 createIcon: function (oldIcon) { 12859 return this._createIcon('icon', oldIcon); 12860 }, 12861 12862 // @method createShadow(oldIcon?: HTMLElement): HTMLElement 12863 // As `createIcon`, but for the shadow beneath it. 12864 createShadow: function (oldIcon) { 12865 return this._createIcon('shadow', oldIcon); 12866 }, 12867 12868 _createIcon: function (name, oldIcon) { 12869 var src = this._getIconUrl(name); 12870 12871 if (!src) { 12872 if (name === 'icon') { 12873 throw new Error('iconUrl not set in Icon options (see the docs).'); 12874 } 12875 return null; 12876 } 12877 12878 var img = this._createImg(src, oldIcon && oldIcon.tagName === 'IMG' ? oldIcon : null); 12879 this._setIconStyles(img, name); 12880 12881 if (this.options.crossOrigin || this.options.crossOrigin === '') { 12882 img.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin; 12883 } 12884 12885 return img; 12886 }, 12887 12888 _setIconStyles: function (img, name) { 12889 var options = this.options; 12890 var sizeOption = options[name + 'Size']; 12891 12892 if (typeof sizeOption === 'number') { 12893 sizeOption = [sizeOption, sizeOption]; 12894 } 12895 12896 var size = toPoint(sizeOption), 12897 anchor = toPoint(name === 'shadow' && options.shadowAnchor || options.iconAnchor || 12898 size && size.divideBy(2, true)); 12899 12900 img.className = 'leaflet-marker-' + name + ' ' + (options.className || ''); 12901 12902 if (anchor) { 12903 img.style.marginLeft = (-anchor.x) + 'px'; 12904 img.style.marginTop = (-anchor.y) + 'px'; 12905 } 12906 12907 if (size) { 12908 img.style.width = size.x + 'px'; 12909 img.style.height = size.y + 'px'; 12910 } 12911 }, 12912 12913 _createImg: function (src, el) { 12914 el = el || document.createElement('img'); 12915 el.src = src; 12916 return el; 12917 }, 12918 12919 _getIconUrl: function (name) { 12920 return Browser.retina && this.options[name + 'RetinaUrl'] || this.options[name + 'Url']; 12921 } 12922 }); 12923 12924 12925 // @factory L.icon(options: Icon options) 12926 // Creates an icon instance with the given options. 12927 function icon(options) { 12928 return new Icon(options); 12929 } 12930 12931 /* 12932 * @miniclass Icon.Default (Icon) 12933 * @aka L.Icon.Default 12934 * @section 12935 * 12936 * A trivial subclass of `Icon`, represents the icon to use in `Marker`s when 12937 * no icon is specified. Points to the blue marker image distributed with Leaflet 12938 * releases. 12939 * 12940 * In order to customize the default icon, just change the properties of `L.Icon.Default.prototype.options` 12941 * (which is a set of `Icon options`). 12942 * 12943 * If you want to _completely_ replace the default icon, override the 12944 * `L.Marker.prototype.options.icon` with your own icon instead. 12945 */ 12946 12947 var IconDefault = Icon.extend({ 12948 12949 options: { 12950 iconUrl: 'marker-icon.png', 12951 iconRetinaUrl: 'marker-icon-2x.png', 12952 shadowUrl: 'marker-shadow.png', 12953 iconSize: [25, 41], 12954 iconAnchor: [12, 41], 12955 popupAnchor: [1, -34], 12956 tooltipAnchor: [16, -28], 12957 shadowSize: [41, 41] 12958 }, 12959 12960 _getIconUrl: function (name) { 12961 if (typeof IconDefault.imagePath !== 'string') { // Deprecated, backwards-compatibility only 12962 IconDefault.imagePath = this._detectIconPath(); 12963 } 12964 12965 // @option imagePath: String 12966 // `Icon.Default` will try to auto-detect the location of the 12967 // blue icon images. If you are placing these images in a non-standard 12968 // way, set this option to point to the right path. 12969 return (this.options.imagePath || IconDefault.imagePath) + Icon.prototype._getIconUrl.call(this, name); 12970 }, 12971 12972 _stripUrl: function (path) { // separate function to use in tests 12973 var strip = function (str, re, idx) { 12974 var match = re.exec(str); 12975 return match && match[idx]; 12976 }; 12977 path = strip(path, /^url\((['"])?(.+)\1\)$/, 2); 12978 return path && strip(path, /^(.*)marker-icon\.png$/, 1); 12979 }, 12980 12981 _detectIconPath: function () { 12982 var el = create$1('div', 'leaflet-default-icon-path', document.body); 12983 var path = getStyle(el, 'background-image') || 12984 getStyle(el, 'backgroundImage'); // IE8 12985 12986 document.body.removeChild(el); 12987 path = this._stripUrl(path); 12988 if (path) { return path; } 12989 var link = document.querySelector('link[href$="leaflet.css"]'); 12990 if (!link) { return ''; } 12991 return link.href.substring(0, link.href.length - 'leaflet.css'.length - 1); 12992 } 12993 }); 12994 12995 /* 12996 * L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable. 12997 */ 12998 12999 13000 /* @namespace Marker 13001 * @section Interaction handlers 13002 * 13003 * Interaction handlers are properties of a marker instance that allow you to control interaction behavior in runtime, enabling or disabling certain features such as dragging (see `Handler` methods). Example: 13004 * 13005 * ```js 13006 * marker.dragging.disable(); 13007 * ``` 13008 * 13009 * @property dragging: Handler 13010 * Marker dragging handler (by both mouse and touch). Only valid when the marker is on the map (Otherwise set [`marker.options.draggable`](#marker-draggable)). 13011 */ 13012 13013 var MarkerDrag = Handler.extend({ 13014 initialize: function (marker) { 13015 this._marker = marker; 13016 }, 13017 13018 addHooks: function () { 13019 var icon = this._marker._icon; 13020 13021 if (!this._draggable) { 13022 this._draggable = new Draggable(icon, icon, true); 13023 } 13024 13025 this._draggable.on({ 13026 dragstart: this._onDragStart, 13027 predrag: this._onPreDrag, 13028 drag: this._onDrag, 13029 dragend: this._onDragEnd 13030 }, this).enable(); 13031 13032 addClass(icon, 'leaflet-marker-draggable'); 13033 }, 13034 13035 removeHooks: function () { 13036 this._draggable.off({ 13037 dragstart: this._onDragStart, 13038 predrag: this._onPreDrag, 13039 drag: this._onDrag, 13040 dragend: this._onDragEnd 13041 }, this).disable(); 13042 13043 if (this._marker._icon) { 13044 removeClass(this._marker._icon, 'leaflet-marker-draggable'); 13045 } 13046 }, 13047 13048 moved: function () { 13049 return this._draggable && this._draggable._moved; 13050 }, 13051 13052 _adjustPan: function (e) { 13053 var marker = this._marker, 13054 map = marker._map, 13055 speed = this._marker.options.autoPanSpeed, 13056 padding = this._marker.options.autoPanPadding, 13057 iconPos = getPosition(marker._icon), 13058 bounds = map.getPixelBounds(), 13059 origin = map.getPixelOrigin(); 13060 13061 var panBounds = toBounds( 13062 bounds.min._subtract(origin).add(padding), 13063 bounds.max._subtract(origin).subtract(padding) 13064 ); 13065 13066 if (!panBounds.contains(iconPos)) { 13067 // Compute incremental movement 13068 var movement = toPoint( 13069 (Math.max(panBounds.max.x, iconPos.x) - panBounds.max.x) / (bounds.max.x - panBounds.max.x) - 13070 (Math.min(panBounds.min.x, iconPos.x) - panBounds.min.x) / (bounds.min.x - panBounds.min.x), 13071 13072 (Math.max(panBounds.max.y, iconPos.y) - panBounds.max.y) / (bounds.max.y - panBounds.max.y) - 13073 (Math.min(panBounds.min.y, iconPos.y) - panBounds.min.y) / (bounds.min.y - panBounds.min.y) 13074 ).multiplyBy(speed); 13075 13076 map.panBy(movement, {animate: false}); 13077 13078 this._draggable._newPos._add(movement); 13079 this._draggable._startPos._add(movement); 13080 13081 setPosition(marker._icon, this._draggable._newPos); 13082 this._onDrag(e); 13083 13084 this._panRequest = requestAnimFrame(this._adjustPan.bind(this, e)); 13085 } 13086 }, 13087 13088 _onDragStart: function () { 13089 // @section Dragging events 13090 // @event dragstart: Event 13091 // Fired when the user starts dragging the marker. 13092 13093 // @event movestart: Event 13094 // Fired when the marker starts moving (because of dragging). 13095 13096 this._oldLatLng = this._marker.getLatLng(); 13097 13098 // When using ES6 imports it could not be set when `Popup` was not imported as well 13099 this._marker.closePopup && this._marker.closePopup(); 13100 13101 this._marker 13102 .fire('movestart') 13103 .fire('dragstart'); 13104 }, 13105 13106 _onPreDrag: function (e) { 13107 if (this._marker.options.autoPan) { 13108 cancelAnimFrame(this._panRequest); 13109 this._panRequest = requestAnimFrame(this._adjustPan.bind(this, e)); 13110 } 13111 }, 13112 13113 _onDrag: function (e) { 13114 var marker = this._marker, 13115 shadow = marker._shadow, 13116 iconPos = getPosition(marker._icon), 13117 latlng = marker._map.layerPointToLatLng(iconPos); 13118 13119 // update shadow position 13120 if (shadow) { 13121 setPosition(shadow, iconPos); 13122 } 13123 13124 marker._latlng = latlng; 13125 e.latlng = latlng; 13126 e.oldLatLng = this._oldLatLng; 13127 13128 // @event drag: Event 13129 // Fired repeatedly while the user drags the marker. 13130 marker 13131 .fire('move', e) 13132 .fire('drag', e); 13133 }, 13134 13135 _onDragEnd: function (e) { 13136 // @event dragend: DragEndEvent 13137 // Fired when the user stops dragging the marker. 13138 13139 cancelAnimFrame(this._panRequest); 13140 13141 // @event moveend: Event 13142 // Fired when the marker stops moving (because of dragging). 13143 delete this._oldLatLng; 13144 this._marker 13145 .fire('moveend') 13146 .fire('dragend', e); 13147 } 13148 }); 13149 13150 /* 13151 * @class Marker 13152 * @inherits Interactive layer 13153 * @aka L.Marker 13154 * L.Marker is used to display clickable/draggable icons on the map. Extends `Layer`. 13155 * 13156 * @example 13157 * 13158 * ```js 13159 * L.marker([50.5, 30.5]).addTo(map); 13160 * ``` 13161 */ 13162 13163 var Marker = Layer.extend({ 13164 13165 // @section 13166 // @aka Marker options 13167 options: { 13168 // @option icon: Icon = * 13169 // Icon instance to use for rendering the marker. 13170 // See [Icon documentation](#L.Icon) for details on how to customize the marker icon. 13171 // If not specified, a common instance of `L.Icon.Default` is used. 13172 icon: new IconDefault(), 13173 13174 // Option inherited from "Interactive layer" abstract class 13175 interactive: true, 13176 13177 // @option keyboard: Boolean = true 13178 // Whether the marker can be tabbed to with a keyboard and clicked by pressing enter. 13179 keyboard: true, 13180 13181 // @option title: String = '' 13182 // Text for the browser tooltip that appear on marker hover (no tooltip by default). 13183 // [Useful for accessibility](https://leafletjs.com/examples/accessibility/#markers-must-be-labelled). 13184 title: '', 13185 13186 // @option alt: String = 'Marker' 13187 // Text for the `alt` attribute of the icon image. 13188 // [Useful for accessibility](https://leafletjs.com/examples/accessibility/#markers-must-be-labelled). 13189 alt: 'Marker', 13190 13191 // @option zIndexOffset: Number = 0 13192 // By default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like `1000` (or high negative value, respectively). 13193 zIndexOffset: 0, 13194 13195 // @option opacity: Number = 1.0 13196 // The opacity of the marker. 13197 opacity: 1, 13198 13199 // @option riseOnHover: Boolean = false 13200 // If `true`, the marker will get on top of others when you hover the mouse over it. 13201 riseOnHover: false, 13202 13203 // @option riseOffset: Number = 250 13204 // The z-index offset used for the `riseOnHover` feature. 13205 riseOffset: 250, 13206 13207 // @option pane: String = 'markerPane' 13208 // `Map pane` where the markers icon will be added. 13209 pane: 'markerPane', 13210 13211 // @option shadowPane: String = 'shadowPane' 13212 // `Map pane` where the markers shadow will be added. 13213 shadowPane: 'shadowPane', 13214 13215 // @option bubblingMouseEvents: Boolean = false 13216 // When `true`, a mouse event on this marker will trigger the same event on the map 13217 // (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used). 13218 bubblingMouseEvents: false, 13219 13220 // @option autoPanOnFocus: Boolean = true 13221 // When `true`, the map will pan whenever the marker is focused (via 13222 // e.g. pressing `tab` on the keyboard) to ensure the marker is 13223 // visible within the map's bounds 13224 autoPanOnFocus: true, 13225 13226 // @section Draggable marker options 13227 // @option draggable: Boolean = false 13228 // Whether the marker is draggable with mouse/touch or not. 13229 draggable: false, 13230 13231 // @option autoPan: Boolean = false 13232 // Whether to pan the map when dragging this marker near its edge or not. 13233 autoPan: false, 13234 13235 // @option autoPanPadding: Point = Point(50, 50) 13236 // Distance (in pixels to the left/right and to the top/bottom) of the 13237 // map edge to start panning the map. 13238 autoPanPadding: [50, 50], 13239 13240 // @option autoPanSpeed: Number = 10 13241 // Number of pixels the map should pan by. 13242 autoPanSpeed: 10 13243 }, 13244 13245 /* @section 13246 * 13247 * In addition to [shared layer methods](#Layer) like `addTo()` and `remove()` and [popup methods](#Popup) like bindPopup() you can also use the following methods: 13248 */ 13249 13250 initialize: function (latlng, options) { 13251 setOptions(this, options); 13252 this._latlng = toLatLng(latlng); 13253 }, 13254 13255 onAdd: function (map) { 13256 this._zoomAnimated = this._zoomAnimated && map.options.markerZoomAnimation; 13257 13258 if (this._zoomAnimated) { 13259 map.on('zoomanim', this._animateZoom, this); 13260 } 13261 13262 this._initIcon(); 13263 this.update(); 13264 }, 13265 13266 onRemove: function (map) { 13267 if (this.dragging && this.dragging.enabled()) { 13268 this.options.draggable = true; 13269 this.dragging.removeHooks(); 13270 } 13271 delete this.dragging; 13272 13273 if (this._zoomAnimated) { 13274 map.off('zoomanim', this._animateZoom, this); 13275 } 13276 13277 this._removeIcon(); 13278 this._removeShadow(); 13279 }, 13280 13281 getEvents: function () { 13282 return { 13283 zoom: this.update, 13284 viewreset: this.update 13285 }; 13286 }, 13287 13288 // @method getLatLng: LatLng 13289 // Returns the current geographical position of the marker. 13290 getLatLng: function () { 13291 return this._latlng; 13292 }, 13293 13294 // @method setLatLng(latlng: LatLng): this 13295 // Changes the marker position to the given point. 13296 setLatLng: function (latlng) { 13297 var oldLatLng = this._latlng; 13298 this._latlng = toLatLng(latlng); 13299 this.update(); 13300 13301 // @event move: Event 13302 // Fired when the marker is moved via [`setLatLng`](#marker-setlatlng) or by [dragging](#marker-dragging). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`. 13303 return this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng}); 13304 }, 13305 13306 // @method setZIndexOffset(offset: Number): this 13307 // Changes the [zIndex offset](#marker-zindexoffset) of the marker. 13308 setZIndexOffset: function (offset) { 13309 this.options.zIndexOffset = offset; 13310 return this.update(); 13311 }, 13312 13313 // @method getIcon: Icon 13314 // Returns the current icon used by the marker 13315 getIcon: function () { 13316 return this.options.icon; 13317 }, 13318 13319 // @method setIcon(icon: Icon): this 13320 // Changes the marker icon. 13321 setIcon: function (icon) { 13322 13323 this.options.icon = icon; 13324 13325 if (this._map) { 13326 this._initIcon(); 13327 this.update(); 13328 } 13329 13330 if (this._popup) { 13331 this.bindPopup(this._popup, this._popup.options); 13332 } 13333 13334 return this; 13335 }, 13336 13337 getElement: function () { 13338 return this._icon; 13339 }, 13340 13341 update: function () { 13342 13343 if (this._icon && this._map) { 13344 var pos = this._map.latLngToLayerPoint(this._latlng).round(); 13345 this._setPos(pos); 13346 } 13347 13348 return this; 13349 }, 13350 13351 _initIcon: function () { 13352 var options = this.options, 13353 classToAdd = 'leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide'); 13354 13355 var icon = options.icon.createIcon(this._icon), 13356 addIcon = false; 13357 13358 // if we're not reusing the icon, remove the old one and init new one 13359 if (icon !== this._icon) { 13360 if (this._icon) { 13361 this._removeIcon(); 13362 } 13363 addIcon = true; 13364 13365 if (options.title) { 13366 icon.title = options.title; 13367 } 13368 13369 if (icon.tagName === 'IMG') { 13370 icon.alt = options.alt || ''; 13371 } 13372 } 13373 13374 addClass(icon, classToAdd); 13375 13376 if (options.keyboard) { 13377 icon.tabIndex = '0'; 13378 icon.setAttribute('role', 'button'); 13379 } 13380 13381 this._icon = icon; 13382 13383 if (options.riseOnHover) { 13384 this.on({ 13385 mouseover: this._bringToFront, 13386 mouseout: this._resetZIndex 13387 }); 13388 } 13389 13390 if (this.options.autoPanOnFocus) { 13391 on(icon, 'focus', this._panOnFocus, this); 13392 } 13393 13394 var newShadow = options.icon.createShadow(this._shadow), 13395 addShadow = false; 13396 13397 if (newShadow !== this._shadow) { 13398 this._removeShadow(); 13399 addShadow = true; 13400 } 13401 13402 if (newShadow) { 13403 addClass(newShadow, classToAdd); 13404 newShadow.alt = ''; 13405 } 13406 this._shadow = newShadow; 13407 13408 13409 if (options.opacity < 1) { 13410 this._updateOpacity(); 13411 } 13412 13413 13414 if (addIcon) { 13415 this.getPane().appendChild(this._icon); 13416 } 13417 this._initInteraction(); 13418 if (newShadow && addShadow) { 13419 this.getPane(options.shadowPane).appendChild(this._shadow); 13420 } 13421 }, 13422 13423 _removeIcon: function () { 13424 if (this.options.riseOnHover) { 13425 this.off({ 13426 mouseover: this._bringToFront, 13427 mouseout: this._resetZIndex 13428 }); 13429 } 13430 13431 if (this.options.autoPanOnFocus) { 13432 off(this._icon, 'focus', this._panOnFocus, this); 13433 } 13434 13435 remove(this._icon); 13436 this.removeInteractiveTarget(this._icon); 13437 13438 this._icon = null; 13439 }, 13440 13441 _removeShadow: function () { 13442 if (this._shadow) { 13443 remove(this._shadow); 13444 } 13445 this._shadow = null; 13446 }, 13447 13448 _setPos: function (pos) { 13449 13450 if (this._icon) { 13451 setPosition(this._icon, pos); 13452 } 13453 13454 if (this._shadow) { 13455 setPosition(this._shadow, pos); 13456 } 13457 13458 this._zIndex = pos.y + this.options.zIndexOffset; 13459 13460 this._resetZIndex(); 13461 }, 13462 13463 _updateZIndex: function (offset) { 13464 if (this._icon) { 13465 this._icon.style.zIndex = this._zIndex + offset; 13466 } 13467 }, 13468 13469 _animateZoom: function (opt) { 13470 var pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round(); 13471 13472 this._setPos(pos); 13473 }, 13474 13475 _initInteraction: function () { 13476 13477 if (!this.options.interactive) { return; } 13478 13479 addClass(this._icon, 'leaflet-interactive'); 13480 13481 this.addInteractiveTarget(this._icon); 13482 13483 if (MarkerDrag) { 13484 var draggable = this.options.draggable; 13485 if (this.dragging) { 13486 draggable = this.dragging.enabled(); 13487 this.dragging.disable(); 13488 } 13489 13490 this.dragging = new MarkerDrag(this); 13491 13492 if (draggable) { 13493 this.dragging.enable(); 13494 } 13495 } 13496 }, 13497 13498 // @method setOpacity(opacity: Number): this 13499 // Changes the opacity of the marker. 13500 setOpacity: function (opacity) { 13501 this.options.opacity = opacity; 13502 if (this._map) { 13503 this._updateOpacity(); 13504 } 13505 13506 return this; 13507 }, 13508 13509 _updateOpacity: function () { 13510 var opacity = this.options.opacity; 13511 13512 if (this._icon) { 13513 setOpacity(this._icon, opacity); 13514 } 13515 13516 if (this._shadow) { 13517 setOpacity(this._shadow, opacity); 13518 } 13519 }, 13520 13521 _bringToFront: function () { 13522 this._updateZIndex(this.options.riseOffset); 13523 }, 13524 13525 _resetZIndex: function () { 13526 this._updateZIndex(0); 13527 }, 13528 13529 _panOnFocus: function () { 13530 var map = this._map; 13531 if (!map) { return; } 13532 13533 var iconOpts = this.options.icon.options; 13534 var size = iconOpts.iconSize ? toPoint(iconOpts.iconSize) : toPoint(0, 0); 13535 var anchor = iconOpts.iconAnchor ? toPoint(iconOpts.iconAnchor) : toPoint(0, 0); 13536 13537 map.panInside(this._latlng, { 13538 paddingTopLeft: anchor, 13539 paddingBottomRight: size.subtract(anchor) 13540 }); 13541 }, 13542 13543 _getPopupAnchor: function () { 13544 return this.options.icon.options.popupAnchor; 13545 }, 13546 13547 _getTooltipAnchor: function () { 13548 return this.options.icon.options.tooltipAnchor; 13549 } 13550 }); 13551 13552 13553 // factory L.marker(latlng: LatLng, options? : Marker options) 13554 13555 // @factory L.marker(latlng: LatLng, options? : Marker options) 13556 // Instantiates a Marker object given a geographical point and optionally an options object. 13557 function marker(latlng, options) { 13558 return new Marker(latlng, options); 13559 } 13560 13561 /* 13562 * @class Path 13563 * @aka L.Path 13564 * @inherits Interactive layer 13565 * 13566 * An abstract class that contains options and constants shared between vector 13567 * overlays (Polygon, Polyline, Circle). Do not use it directly. Extends `Layer`. 13568 */ 13569 13570 var Path = Layer.extend({ 13571 13572 // @section 13573 // @aka Path options 13574 options: { 13575 // @option stroke: Boolean = true 13576 // Whether to draw stroke along the path. Set it to `false` to disable borders on polygons or circles. 13577 stroke: true, 13578 13579 // @option color: String = '#3388ff' 13580 // Stroke color 13581 color: '#3388ff', 13582 13583 // @option weight: Number = 3 13584 // Stroke width in pixels 13585 weight: 3, 13586 13587 // @option opacity: Number = 1.0 13588 // Stroke opacity 13589 opacity: 1, 13590 13591 // @option lineCap: String= 'round' 13592 // A string that defines [shape to be used at the end](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linecap) of the stroke. 13593 lineCap: 'round', 13594 13595 // @option lineJoin: String = 'round' 13596 // A string that defines [shape to be used at the corners](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linejoin) of the stroke. 13597 lineJoin: 'round', 13598 13599 // @option dashArray: String = null 13600 // A string that defines the stroke [dash pattern](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dasharray). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility). 13601 dashArray: null, 13602 13603 // @option dashOffset: String = null 13604 // A string that defines the [distance into the dash pattern to start the dash](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dashoffset). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility). 13605 dashOffset: null, 13606 13607 // @option fill: Boolean = depends 13608 // Whether to fill the path with color. Set it to `false` to disable filling on polygons or circles. 13609 fill: false, 13610 13611 // @option fillColor: String = * 13612 // Fill color. Defaults to the value of the [`color`](#path-color) option 13613 fillColor: null, 13614 13615 // @option fillOpacity: Number = 0.2 13616 // Fill opacity. 13617 fillOpacity: 0.2, 13618 13619 // @option fillRule: String = 'evenodd' 13620 // A string that defines [how the inside of a shape](https://developer.mozilla.org/docs/Web/SVG/Attribute/fill-rule) is determined. 13621 fillRule: 'evenodd', 13622 13623 // className: '', 13624 13625 // Option inherited from "Interactive layer" abstract class 13626 interactive: true, 13627 13628 // @option bubblingMouseEvents: Boolean = true 13629 // When `true`, a mouse event on this path will trigger the same event on the map 13630 // (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used). 13631 bubblingMouseEvents: true 13632 }, 13633 13634 beforeAdd: function (map) { 13635 // Renderer is set here because we need to call renderer.getEvents 13636 // before this.getEvents. 13637 this._renderer = map.getRenderer(this); 13638 }, 13639 13640 onAdd: function () { 13641 this._renderer._initPath(this); 13642 this._reset(); 13643 this._renderer._addPath(this); 13644 }, 13645 13646 onRemove: function () { 13647 this._renderer._removePath(this); 13648 }, 13649 13650 // @method redraw(): this 13651 // Redraws the layer. Sometimes useful after you changed the coordinates that the path uses. 13652 redraw: function () { 13653 if (this._map) { 13654 this._renderer._updatePath(this); 13655 } 13656 return this; 13657 }, 13658 13659 // @method setStyle(style: Path options): this 13660 // Changes the appearance of a Path based on the options in the `Path options` object. 13661 setStyle: function (style) { 13662 setOptions(this, style); 13663 if (this._renderer) { 13664 this._renderer._updateStyle(this); 13665 if (this.options.stroke && style && Object.prototype.hasOwnProperty.call(style, 'weight')) { 13666 this._updateBounds(); 13667 } 13668 } 13669 return this; 13670 }, 13671 13672 // @method bringToFront(): this 13673 // Brings the layer to the top of all path layers. 13674 bringToFront: function () { 13675 if (this._renderer) { 13676 this._renderer._bringToFront(this); 13677 } 13678 return this; 13679 }, 13680 13681 // @method bringToBack(): this 13682 // Brings the layer to the bottom of all path layers. 13683 bringToBack: function () { 13684 if (this._renderer) { 13685 this._renderer._bringToBack(this); 13686 } 13687 return this; 13688 }, 13689 13690 getElement: function () { 13691 return this._path; 13692 }, 13693 13694 _reset: function () { 13695 // defined in child classes 13696 this._project(); 13697 this._update(); 13698 }, 13699 13700 _clickTolerance: function () { 13701 // used when doing hit detection for Canvas layers 13702 return (this.options.stroke ? this.options.weight / 2 : 0) + 13703 (this._renderer.options.tolerance || 0); 13704 } 13705 }); 13706 13707 /* 13708 * @class CircleMarker 13709 * @aka L.CircleMarker 13710 * @inherits Path 13711 * 13712 * A circle of a fixed size with radius specified in pixels. Extends `Path`. 13713 */ 13714 13715 var CircleMarker = Path.extend({ 13716 13717 // @section 13718 // @aka CircleMarker options 13719 options: { 13720 fill: true, 13721 13722 // @option radius: Number = 10 13723 // Radius of the circle marker, in pixels 13724 radius: 10 13725 }, 13726 13727 initialize: function (latlng, options) { 13728 setOptions(this, options); 13729 this._latlng = toLatLng(latlng); 13730 this._radius = this.options.radius; 13731 }, 13732 13733 // @method setLatLng(latLng: LatLng): this 13734 // Sets the position of a circle marker to a new location. 13735 setLatLng: function (latlng) { 13736 var oldLatLng = this._latlng; 13737 this._latlng = toLatLng(latlng); 13738 this.redraw(); 13739 13740 // @event move: Event 13741 // Fired when the marker is moved via [`setLatLng`](#circlemarker-setlatlng). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`. 13742 return this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng}); 13743 }, 13744 13745 // @method getLatLng(): LatLng 13746 // Returns the current geographical position of the circle marker 13747 getLatLng: function () { 13748 return this._latlng; 13749 }, 13750 13751 // @method setRadius(radius: Number): this 13752 // Sets the radius of a circle marker. Units are in pixels. 13753 setRadius: function (radius) { 13754 this.options.radius = this._radius = radius; 13755 return this.redraw(); 13756 }, 13757 13758 // @method getRadius(): Number 13759 // Returns the current radius of the circle 13760 getRadius: function () { 13761 return this._radius; 13762 }, 13763 13764 setStyle : function (options) { 13765 var radius = options && options.radius || this._radius; 13766 Path.prototype.setStyle.call(this, options); 13767 this.setRadius(radius); 13768 return this; 13769 }, 13770 13771 _project: function () { 13772 this._point = this._map.latLngToLayerPoint(this._latlng); 13773 this._updateBounds(); 13774 }, 13775 13776 _updateBounds: function () { 13777 var r = this._radius, 13778 r2 = this._radiusY || r, 13779 w = this._clickTolerance(), 13780 p = [r + w, r2 + w]; 13781 this._pxBounds = new Bounds(this._point.subtract(p), this._point.add(p)); 13782 }, 13783 13784 _update: function () { 13785 if (this._map) { 13786 this._updatePath(); 13787 } 13788 }, 13789 13790 _updatePath: function () { 13791 this._renderer._updateCircle(this); 13792 }, 13793 13794 _empty: function () { 13795 return this._radius && !this._renderer._bounds.intersects(this._pxBounds); 13796 }, 13797 13798 // Needed by the `Canvas` renderer for interactivity 13799 _containsPoint: function (p) { 13800 return p.distanceTo(this._point) <= this._radius + this._clickTolerance(); 13801 } 13802 }); 13803 13804 13805 // @factory L.circleMarker(latlng: LatLng, options?: CircleMarker options) 13806 // Instantiates a circle marker object given a geographical point, and an optional options object. 13807 function circleMarker(latlng, options) { 13808 return new CircleMarker(latlng, options); 13809 } 13810 13811 /* 13812 * @class Circle 13813 * @aka L.Circle 13814 * @inherits CircleMarker 13815 * 13816 * A class for drawing circle overlays on a map. Extends `CircleMarker`. 13817 * 13818 * It's an approximation and starts to diverge from a real circle closer to poles (due to projection distortion). 13819 * 13820 * @example 13821 * 13822 * ```js 13823 * L.circle([50.5, 30.5], {radius: 200}).addTo(map); 13824 * ``` 13825 */ 13826 13827 var Circle = CircleMarker.extend({ 13828 13829 initialize: function (latlng, options, legacyOptions) { 13830 if (typeof options === 'number') { 13831 // Backwards compatibility with 0.7.x factory (latlng, radius, options?) 13832 options = extend({}, legacyOptions, {radius: options}); 13833 } 13834 setOptions(this, options); 13835 this._latlng = toLatLng(latlng); 13836 13837 if (isNaN(this.options.radius)) { throw new Error('Circle radius cannot be NaN'); } 13838 13839 // @section 13840 // @aka Circle options 13841 // @option radius: Number; Radius of the circle, in meters. 13842 this._mRadius = this.options.radius; 13843 }, 13844 13845 // @method setRadius(radius: Number): this 13846 // Sets the radius of a circle. Units are in meters. 13847 setRadius: function (radius) { 13848 this._mRadius = radius; 13849 return this.redraw(); 13850 }, 13851 13852 // @method getRadius(): Number 13853 // Returns the current radius of a circle. Units are in meters. 13854 getRadius: function () { 13855 return this._mRadius; 13856 }, 13857 13858 // @method getBounds(): LatLngBounds 13859 // Returns the `LatLngBounds` of the path. 13860 getBounds: function () { 13861 var half = [this._radius, this._radiusY || this._radius]; 13862 13863 return new LatLngBounds( 13864 this._map.layerPointToLatLng(this._point.subtract(half)), 13865 this._map.layerPointToLatLng(this._point.add(half))); 13866 }, 13867 13868 setStyle: Path.prototype.setStyle, 13869 13870 _project: function () { 13871 13872 var lng = this._latlng.lng, 13873 lat = this._latlng.lat, 13874 map = this._map, 13875 crs = map.options.crs; 13876 13877 if (crs.distance === Earth.distance) { 13878 var d = Math.PI / 180, 13879 latR = (this._mRadius / Earth.R) / d, 13880 top = map.project([lat + latR, lng]), 13881 bottom = map.project([lat - latR, lng]), 13882 p = top.add(bottom).divideBy(2), 13883 lat2 = map.unproject(p).lat, 13884 lngR = Math.acos((Math.cos(latR * d) - Math.sin(lat * d) * Math.sin(lat2 * d)) / 13885 (Math.cos(lat * d) * Math.cos(lat2 * d))) / d; 13886 13887 if (isNaN(lngR) || lngR === 0) { 13888 lngR = latR / Math.cos(Math.PI / 180 * lat); // Fallback for edge case, #2425 13889 } 13890 13891 this._point = p.subtract(map.getPixelOrigin()); 13892 this._radius = isNaN(lngR) ? 0 : p.x - map.project([lat2, lng - lngR]).x; 13893 this._radiusY = p.y - top.y; 13894 13895 } else { 13896 var latlng2 = crs.unproject(crs.project(this._latlng).subtract([this._mRadius, 0])); 13897 13898 this._point = map.latLngToLayerPoint(this._latlng); 13899 this._radius = this._point.x - map.latLngToLayerPoint(latlng2).x; 13900 } 13901 13902 this._updateBounds(); 13903 } 13904 }); 13905 13906 // @factory L.circle(latlng: LatLng, options?: Circle options) 13907 // Instantiates a circle object given a geographical point, and an options object 13908 // which contains the circle radius. 13909 // @alternative 13910 // @factory L.circle(latlng: LatLng, radius: Number, options?: Circle options) 13911 // Obsolete way of instantiating a circle, for compatibility with 0.7.x code. 13912 // Do not use in new applications or plugins. 13913 function circle(latlng, options, legacyOptions) { 13914 return new Circle(latlng, options, legacyOptions); 13915 } 13916 13917 /* 13918 * @class Polyline 13919 * @aka L.Polyline 13920 * @inherits Path 13921 * 13922 * A class for drawing polyline overlays on a map. Extends `Path`. 13923 * 13924 * @example 13925 * 13926 * ```js 13927 * // create a red polyline from an array of LatLng points 13928 * var latlngs = [ 13929 * [45.51, -122.68], 13930 * [37.77, -122.43], 13931 * [34.04, -118.2] 13932 * ]; 13933 * 13934 * var polyline = L.polyline(latlngs, {color: 'red'}).addTo(map); 13935 * 13936 * // zoom the map to the polyline 13937 * map.fitBounds(polyline.getBounds()); 13938 * ``` 13939 * 13940 * You can also pass a multi-dimensional array to represent a `MultiPolyline` shape: 13941 * 13942 * ```js 13943 * // create a red polyline from an array of arrays of LatLng points 13944 * var latlngs = [ 13945 * [[45.51, -122.68], 13946 * [37.77, -122.43], 13947 * [34.04, -118.2]], 13948 * [[40.78, -73.91], 13949 * [41.83, -87.62], 13950 * [32.76, -96.72]] 13951 * ]; 13952 * ``` 13953 */ 13954 13955 13956 var Polyline = Path.extend({ 13957 13958 // @section 13959 // @aka Polyline options 13960 options: { 13961 // @option smoothFactor: Number = 1.0 13962 // How much to simplify the polyline on each zoom level. More means 13963 // better performance and smoother look, and less means more accurate representation. 13964 smoothFactor: 1.0, 13965 13966 // @option noClip: Boolean = false 13967 // Disable polyline clipping. 13968 noClip: false 13969 }, 13970 13971 initialize: function (latlngs, options) { 13972 setOptions(this, options); 13973 this._setLatLngs(latlngs); 13974 }, 13975 13976 // @method getLatLngs(): LatLng[] 13977 // Returns an array of the points in the path, or nested arrays of points in case of multi-polyline. 13978 getLatLngs: function () { 13979 return this._latlngs; 13980 }, 13981 13982 // @method setLatLngs(latlngs: LatLng[]): this 13983 // Replaces all the points in the polyline with the given array of geographical points. 13984 setLatLngs: function (latlngs) { 13985 this._setLatLngs(latlngs); 13986 return this.redraw(); 13987 }, 13988 13989 // @method isEmpty(): Boolean 13990 // Returns `true` if the Polyline has no LatLngs. 13991 isEmpty: function () { 13992 return !this._latlngs.length; 13993 }, 13994 13995 // @method closestLayerPoint(p: Point): Point 13996 // Returns the point closest to `p` on the Polyline. 13997 closestLayerPoint: function (p) { 13998 var minDistance = Infinity, 13999 minPoint = null, 14000 closest = _sqClosestPointOnSegment, 14001 p1, p2; 14002 14003 for (var j = 0, jLen = this._parts.length; j < jLen; j++) { 14004 var points = this._parts[j]; 14005 14006 for (var i = 1, len = points.length; i < len; i++) { 14007 p1 = points[i - 1]; 14008 p2 = points[i]; 14009 14010 var sqDist = closest(p, p1, p2, true); 14011 14012 if (sqDist < minDistance) { 14013 minDistance = sqDist; 14014 minPoint = closest(p, p1, p2); 14015 } 14016 } 14017 } 14018 if (minPoint) { 14019 minPoint.distance = Math.sqrt(minDistance); 14020 } 14021 return minPoint; 14022 }, 14023 14024 // @method getCenter(): LatLng 14025 // Returns the center ([centroid](https://en.wikipedia.org/wiki/Centroid)) of the polyline. 14026 getCenter: function () { 14027 // throws error when not yet added to map as this center calculation requires projected coordinates 14028 if (!this._map) { 14029 throw new Error('Must add layer to map before using getCenter()'); 14030 }
14031 14032 var i, halfDist, segDist, dist, p1, p2, ratio, 14033 points = this._rings[0], 14034 len = points.length; 14035 14036 if (!len) { return null; } 14037 14038 // polyline centroid algorithm; only uses the first ring if there are multiple 14039 14040 for (i = 0, halfDist = 0; i < len - 1; i++) { 14041 halfDist += points[i].distanceTo(points[i + 1]) / 2; 14042 } 14043 14044 // The line is so small in the current view that all points are on the same pixel. 14045 if (halfDist === 0) { 14046 return this._map.layerPointToLatLng(points[0]); 14047 } 14048 14049 for (i = 0, dist = 0; i < len - 1; i++) { 14050 p1 = points[i]; 14051 p2 = points[i + 1]; 14052 segDist = p1.distanceTo(p2); 14053 dist += segDist; 14054 14055 if (dist > halfDist) { 14056 ratio = (dist - halfDist) / segDist; 14057 return this._map.layerPointToLatLng([ 14058 p2.x - ratio * (p2.x - p1.x), 14059 p2.y - ratio * (p2.y - p1.y) 14060 ]); 14061 } 14062 } 14063 }, 14064 14065 // @method getBounds(): LatLngBounds 14066 // Returns the `LatLngBounds` of the path.
vendor: 7,633 bytes, lines 14067-14336
14067 getBounds: function () { 14068 return this._bounds; 14069 }, 14070 14071 // @method addLatLng(latlng: LatLng, latlngs?: LatLng[]): this 14072 // Adds a given point to the polyline. By default, adds to the first ring of 14073 // the polyline in case of a multi-polyline, but can be overridden by passing 14074 // a specific ring as a LatLng array (that you can earlier access with [`getLatLngs`](#polyline-getlatlngs)). 14075 addLatLng: function (latlng, latlngs) { 14076 latlngs = latlngs || this._defaultShape(); 14077 latlng = toLatLng(latlng); 14078 latlngs.push(latlng); 14079 this._bounds.extend(latlng); 14080 return this.redraw(); 14081 }, 14082 14083 _setLatLngs: function (latlngs) { 14084 this._bounds = new LatLngBounds(); 14085 this._latlngs = this._convertLatLngs(latlngs); 14086 }, 14087 14088 _defaultShape: function () { 14089 return isFlat(this._latlngs) ? this._latlngs : this._latlngs[0]; 14090 }, 14091 14092 // recursively convert latlngs input into actual LatLng instances; calculate bounds along the way 14093 _convertLatLngs: function (latlngs) { 14094 var result = [], 14095 flat = isFlat(latlngs); 14096 14097 for (var i = 0, len = latlngs.length; i < len; i++) { 14098 if (flat) { 14099 result[i] = toLatLng(latlngs[i]); 14100 this._bounds.extend(result[i]); 14101 } else { 14102 result[i] = this._convertLatLngs(latlngs[i]); 14103 } 14104 } 14105 14106 return result; 14107 }, 14108 14109 _project: function () { 14110 var pxBounds = new Bounds(); 14111 this._rings = []; 14112 this._projectLatlngs(this._latlngs, this._rings, pxBounds); 14113 14114 if (this._bounds.isValid() && pxBounds.isValid()) { 14115 this._rawPxBounds = pxBounds; 14116 this._updateBounds(); 14117 } 14118 }, 14119 14120 _updateBounds: function () { 14121 var w = this._clickTolerance(), 14122 p = new Point(w, w); 14123 14124 if (!this._rawPxBounds) { 14125 return; 14126 } 14127 14128 this._pxBounds = new Bounds([ 14129 this._rawPxBounds.min.subtract(p), 14130 this._rawPxBounds.max.add(p) 14131 ]); 14132 }, 14133 14134 // recursively turns latlngs into a set of rings with projected coordinates 14135 _projectLatlngs: function (latlngs, result, projectedBounds) { 14136 var flat = latlngs[0] instanceof LatLng, 14137 len = latlngs.length, 14138 i, ring; 14139 14140 if (flat) { 14141 ring = []; 14142 for (i = 0; i < len; i++) { 14143 ring[i] = this._map.latLngToLayerPoint(latlngs[i]); 14144 projectedBounds.extend(ring[i]); 14145 } 14146 result.push(ring); 14147 } else { 14148 for (i = 0; i < len; i++) { 14149 this._projectLatlngs(latlngs[i], result, projectedBounds); 14150 } 14151 } 14152 }, 14153 14154 // clip polyline by renderer bounds so that we have less to render for performance 14155 _clipPoints: function () { 14156 var bounds = this._renderer._bounds; 14157 14158 this._parts = []; 14159 if (!this._pxBounds || !this._pxBounds.intersects(bounds)) { 14160 return; 14161 } 14162 14163 if (this.options.noClip) { 14164 this._parts = this._rings; 14165 return; 14166 } 14167 14168 var parts = this._parts, 14169 i, j, k, len, len2, segment, points; 14170 14171 for (i = 0, k = 0, len = this._rings.length; i < len; i++) { 14172 points = this._rings[i]; 14173 14174 for (j = 0, len2 = points.length; j < len2 - 1; j++) { 14175 segment = clipSegment(points[j], points[j + 1], bounds, j, true); 14176 14177 if (!segment) { continue; } 14178 14179 parts[k] = parts[k] || []; 14180 parts[k].push(segment[0]); 14181 14182 // if segment goes out of screen, or it's the last one, it's the end of the line part 14183 if ((segment[1] !== points[j + 1]) || (j === len2 - 2)) { 14184 parts[k].push(segment[1]); 14185 k++; 14186 } 14187 } 14188 } 14189 }, 14190 14191 // simplify each clipped part of the polyline for performance 14192 _simplifyPoints: function () { 14193 var parts = this._parts, 14194 tolerance = this.options.smoothFactor; 14195 14196 for (var i = 0, len = parts.length; i < len; i++) { 14197 parts[i] = simplify(parts[i], tolerance); 14198 } 14199 }, 14200 14201 _update: function () { 14202 if (!this._map) { return; } 14203 14204 this._clipPoints(); 14205 this._simplifyPoints(); 14206 this._updatePath(); 14207 }, 14208 14209 _updatePath: function () { 14210 this._renderer._updatePoly(this); 14211 }, 14212 14213 // Needed by the `Canvas` renderer for interactivity 14214 _containsPoint: function (p, closed) { 14215 var i, j, k, len, len2, part, 14216 w = this._clickTolerance(); 14217 14218 if (!this._pxBounds || !this._pxBounds.contains(p)) { return false; } 14219 14220 // hit detection for polylines 14221 for (i = 0, len = this._parts.length; i < len; i++) { 14222 part = this._parts[i]; 14223 14224 for (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) { 14225 if (!closed && (j === 0)) { continue; } 14226 14227 if (pointToSegmentDistance(p, part[k], part[j]) <= w) { 14228 return true; 14229 } 14230 } 14231 } 14232 return false; 14233 } 14234 }); 14235 14236 // @factory L.polyline(latlngs: LatLng[], options?: Polyline options) 14237 // Instantiates a polyline object given an array of geographical points and 14238 // optionally an options object. You can create a `Polyline` object with 14239 // multiple separate lines (`MultiPolyline`) by passing an array of arrays 14240 // of geographic points. 14241 function polyline(latlngs, options) { 14242 return new Polyline(latlngs, options); 14243 } 14244 14245 // Retrocompat. Allow plugins to support Leaflet versions before and after 1.1. 14246 Polyline._flat = _flat; 14247 14248 /* 14249 * @class Polygon 14250 * @aka L.Polygon 14251 * @inherits Polyline 14252 * 14253 * A class for drawing polygon overlays on a map. Extends `Polyline`. 14254 * 14255 * Note that points you pass when creating a polygon shouldn't have an additional last point equal to the first one â it's better to filter out such points. 14256 * 14257 * 14258 * @example 14259 * 14260 * ```js 14261 * // create a red polygon from an array of LatLng points 14262 * var latlngs = [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]]; 14263 * 14264 * var polygon = L.polygon(latlngs, {color: 'red'}).addTo(map); 14265 * 14266 * // zoom the map to the polygon 14267 * map.fitBounds(polygon.getBounds()); 14268 * ``` 14269 * 14270 * You can also pass an array of arrays of latlngs, with the first array representing the outer shape and the other arrays representing holes in the outer shape: 14271 * 14272 * ```js 14273 * var latlngs = [ 14274 * [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring 14275 * [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole 14276 * ]; 14277 * ``` 14278 * 14279 * Additionally, you can pass a multi-dimensional array to represent a MultiPolygon shape. 14280 * 14281 * ```js 14282 * var latlngs = [ 14283 * [ // first polygon 14284 * [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring 14285 * [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole 14286 * ], 14287 * [ // second polygon 14288 * [[41, -111.03],[45, -111.04],[45, -104.05],[41, -104.05]] 14289 * ] 14290 * ]; 14291 * ``` 14292 */ 14293 14294 var Polygon = Polyline.extend({ 14295 14296 options: { 14297 fill: true 14298 }, 14299 14300 isEmpty: function () { 14301 return !this._latlngs.length || !this._latlngs[0].length; 14302 }, 14303 14304 getCenter: function () { 14305 // throws error when not yet added to map as this center calculation requires projected coordinates 14306 if (!this._map) { 14307 throw new Error('Must add layer to map before using getCenter()'); 14308 } 14309 14310 var i, j, p1, p2, f, area, x, y, center, 14311 points = this._rings[0], 14312 len = points.length; 14313 14314 if (!len) { return null; } 14315 14316 // polygon centroid algorithm; only uses the first ring if there are multiple 14317 14318 area = x = y = 0; 14319 14320 for (i = 0, j = len - 1; i < len; j = i++) { 14321 p1 = points[i]; 14322 p2 = points[j]; 14323 14324 f = p1.y * p2.x - p2.y * p1.x; 14325 x += (p1.x + p2.x) * f; 14326 y += (p1.y + p2.y) * f; 14327 area += f * 3; 14328 } 14329 14330 if (area === 0) { 14331 // Polygon is so small that all points are on same pixel. 14332 center = points[0]; 14333 } else { 14334 center = [x / area, y / area]; 14335 } 14336 return this._map.layerPointToLatLng(center
vendor: 8,784 bytes, lines 14336-14621
14336); 14337 }, 14338 14339 _convertLatLngs: function (latlngs) { 14340 var result = Polyline.prototype._convertLatLngs.call(this, latlngs), 14341 len = result.length; 14342 14343 // remove last point if it equals first one 14344 if (len >= 2 && result[0] instanceof LatLng && result[0].equals(result[len - 1])) { 14345 result.pop(); 14346 } 14347 return result; 14348 }, 14349 14350 _setLatLngs: function (latlngs) { 14351 Polyline.prototype._setLatLngs.call(this, latlngs); 14352 if (isFlat(this._latlngs)) { 14353 this._latlngs = [this._latlngs]; 14354 } 14355 }, 14356 14357 _defaultShape: function () { 14358 return isFlat(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0]; 14359 }, 14360 14361 _clipPoints: function () { 14362 // polygons need a different clipping algorithm so we redefine that 14363 14364 var bounds = this._renderer._bounds, 14365 w = this.options.weight, 14366 p = new Point(w, w); 14367 14368 // increase clip padding by stroke width to avoid stroke on clip edges 14369 bounds = new Bounds(bounds.min.subtract(p), bounds.max.add(p)); 14370 14371 this._parts = []; 14372 if (!this._pxBounds || !this._pxBounds.intersects(bounds)) { 14373 return; 14374 } 14375 14376 if (this.options.noClip) { 14377 this._parts = this._rings; 14378 return; 14379 } 14380 14381 for (var i = 0, len = this._rings.length, clipped; i < len; i++) { 14382 clipped = clipPolygon(this._rings[i], bounds, true); 14383 if (clipped.length) { 14384 this._parts.push(clipped); 14385 } 14386 } 14387 }, 14388 14389 _updatePath: function () { 14390 this._renderer._updatePoly(this, true); 14391 }, 14392 14393 // Needed by the `Canvas` renderer for interactivity 14394 _containsPoint: function (p) { 14395 var inside = false, 14396 part, p1, p2, i, j, k, len, len2; 14397 14398 if (!this._pxBounds || !this._pxBounds.contains(p)) { return false; } 14399 14400 // ray casting algorithm for detecting if point is in polygon 14401 for (i = 0, len = this._parts.length; i < len; i++) { 14402 part = this._parts[i]; 14403 14404 for (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) { 14405 p1 = part[j]; 14406 p2 = part[k]; 14407 14408 if (((p1.y > p.y) !== (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) { 14409 inside = !inside; 14410 } 14411 } 14412 } 14413 14414 // also check if it's on polygon stroke 14415 return inside || Polyline.prototype._containsPoint.call(this, p, true); 14416 } 14417 14418 }); 14419 14420 14421 // @factory L.polygon(latlngs: LatLng[], options?: Polyline options) 14422 function polygon(latlngs, options) { 14423 return new Polygon(latlngs, options); 14424 } 14425 14426 /* 14427 * @class GeoJSON 14428 * @aka L.GeoJSON 14429 * @inherits FeatureGroup 14430 * 14431 * Represents a GeoJSON object or an array of GeoJSON objects. Allows you to parse 14432 * GeoJSON data and display it on the map. Extends `FeatureGroup`. 14433 * 14434 * @example 14435 * 14436 * ```js 14437 * L.geoJSON(data, { 14438 * style: function (feature) { 14439 * return {color: feature.properties.color}; 14440 * } 14441 * }).bindPopup(function (layer) { 14442 * return layer.feature.properties.description; 14443 * }).addTo(map); 14444 * ``` 14445 */ 14446 14447 var GeoJSON = FeatureGroup.extend({ 14448 14449 /* @section 14450 * @aka GeoJSON options 14451 * 14452 * @option pointToLayer: Function = * 14453 * A `Function` defining how GeoJSON points spawn Leaflet layers. It is internally 14454 * called when data is added, passing the GeoJSON point feature and its `LatLng`. 14455 * The default is to spawn a default `Marker`: 14456 * ```js 14457 * function(geoJsonPoint, latlng) { 14458 * return L.marker(latlng); 14459 * } 14460 * ``` 14461 * 14462 * @option style: Function = * 14463 * A `Function` defining the `Path options` for styling GeoJSON lines and polygons, 14464 * called internally when data is added. 14465 * The default value is to not override any defaults: 14466 * ```js 14467 * function (geoJsonFeature) { 14468 * return {} 14469 * } 14470 * ``` 14471 * 14472 * @option onEachFeature: Function = * 14473 * A `Function` that will be called once for each created `Feature`, after it has 14474 * been created and styled. Useful for attaching events and popups to features. 14475 * The default is to do nothing with the newly created layers: 14476 * ```js 14477 * function (feature, layer) {} 14478 * ``` 14479 * 14480 * @option filter: Function = * 14481 * A `Function` that will be used to decide whether to include a feature or not. 14482 * The default is to include all features: 14483 * ```js 14484 * function (geoJsonFeature) { 14485 * return true; 14486 * } 14487 * ``` 14488 * Note: dynamically changing the `filter` option will have effect only on newly 14489 * added data. It will _not_ re-evaluate already included features. 14490 * 14491 * @option coordsToLatLng: Function = * 14492 * A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s. 14493 * The default is the `coordsToLatLng` static method. 14494 * 14495 * @option markersInheritOptions: Boolean = false 14496 * Whether default Markers for "Point" type Features inherit from group options. 14497 */ 14498 14499 initialize: function (geojson, options) { 14500 setOptions(this, options); 14501 14502 this._layers = {}; 14503 14504 if (geojson) { 14505 this.addData(geojson); 14506 } 14507 }, 14508 14509 // @method addData( <GeoJSON> data ): this 14510 // Adds a GeoJSON object to the layer. 14511 addData: function (geojson) { 14512 var features = isArray(geojson) ? geojson : geojson.features, 14513 i, len, feature; 14514 14515 if (features) { 14516 for (i = 0, len = features.length; i < len; i++) { 14517 // only add this if geometry or geometries are set and not null 14518 feature = features[i]; 14519 if (feature.geometries || feature.geometry || feature.features || feature.coordinates) { 14520 this.addData(feature); 14521 } 14522 } 14523 return this; 14524 } 14525 14526 var options = this.options; 14527 14528 if (options.filter && !options.filter(geojson)) { return this; } 14529 14530 var layer = geometryToLayer(geojson, options); 14531 if (!layer) { 14532 return this; 14533 } 14534 layer.feature = asFeature(geojson); 14535 14536 layer.defaultOptions = layer.options; 14537 this.resetStyle(layer); 14538 14539 if (options.onEachFeature) { 14540 options.onEachFeature(geojson, layer); 14541 } 14542 14543 return this.addLayer(layer); 14544 }, 14545 14546 // @method resetStyle( <Path> layer? ): this 14547 // Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events. 14548 // If `layer` is omitted, the style of all features in the current layer is reset. 14549 resetStyle: function (layer) { 14550 if (layer === undefined) { 14551 return this.eachLayer(this.resetStyle, this); 14552 } 14553 // reset any custom styles 14554 layer.options = extend({}, layer.defaultOptions); 14555 this._setLayerStyle(layer, this.options.style); 14556 return this; 14557 }, 14558 14559 // @method setStyle( <Function> style ): this 14560 // Changes styles of GeoJSON vector layers with the given style function. 14561 setStyle: function (style) { 14562 return this.eachLayer(function (layer) { 14563 this._setLayerStyle(layer, style); 14564 }, this); 14565 }, 14566 14567 _setLayerStyle: function (layer, style) { 14568 if (layer.setStyle) { 14569 if (typeof style === 'function') { 14570 style = style(layer.feature); 14571 } 14572 layer.setStyle(style); 14573 } 14574 } 14575 }); 14576 14577 // @section 14578 // There are several static functions which can be called without instantiating L.GeoJSON: 14579 14580 // @function geometryToLayer(featureData: Object, options?: GeoJSON options): Layer 14581 // Creates a `Layer` from a given GeoJSON feature. Can use a custom 14582 // [`pointToLayer`](#geojson-pointtolayer) and/or [`coordsToLatLng`](#geojson-coordstolatlng) 14583 // functions if provided as options. 14584 function geometryToLayer(geojson, options) { 14585 14586 var geometry = geojson.type === 'Feature' ? geojson.geometry : geojson, 14587 coords = geometry ? geometry.coordinates : null, 14588 layers = [], 14589 pointToLayer = options && options.pointToLayer, 14590 _coordsToLatLng = options && options.coordsToLatLng || coordsToLatLng, 14591 latlng, latlngs, i, len; 14592 14593 if (!coords && !geometry) { 14594 return null; 14595 } 14596 14597 switch (geometry.type) { 14598 case 'Point': 14599 latlng = _coordsToLatLng(coords); 14600 return _pointToLayer(pointToLayer, geojson, latlng, options); 14601 14602 case 'MultiPoint': 14603 for (i = 0, len = coords.length; i < len; i++) { 14604 latlng = _coordsToLatLng(coords[i]); 14605 layers.push(_pointToLayer(pointToLayer, geojson, latlng, options)); 14606 } 14607 return new FeatureGroup(layers); 14608 14609 case 'LineString': 14610 case 'MultiLineString': 14611 latlngs = coordsToLatLngs(coords, geometry.type === 'LineString' ? 0 : 1, _coordsToLatLng); 14612 return new Polyline(latlngs, options); 14613 14614 case 'Polygon': 14615 case 'MultiPolygon': 14616 latlngs = coordsToLatLngs(coords, geometry.type === 'Polygon' ? 1 : 2, _coordsToLatLng); 14617 return new Polygon(latlngs, options); 14618 14619 case 'GeometryCollection': 14620 for (i = 0, len = geometry.geometries.length; i < len; i++) { 14621 var
vendor: 2,232 bytes, lines 14621-14679
14621layer = geometryToLayer({ 14622 geometry: geometry.geometries[i], 14623 type: 'Feature', 14624 properties: geojson.properties 14625 }, options); 14626 14627 if (layer) { 14628 layers.push(layer); 14629 } 14630 } 14631 return new FeatureGroup(layers); 14632 14633 default: 14634 throw new Error('Invalid GeoJSON object.'); 14635 } 14636 } 14637 14638 function _pointToLayer(pointToLayerFn, geojson, latlng, options) { 14639 return pointToLayerFn ? 14640 pointToLayerFn(geojson, latlng) : 14641 new Marker(latlng, options && options.markersInheritOptions && options); 14642 } 14643 14644 // @function coordsToLatLng(coords: Array): LatLng 14645 // Creates a `LatLng` object from an array of 2 numbers (longitude, latitude) 14646 // or 3 numbers (longitude, latitude, altitude) used in GeoJSON for points. 14647 function coordsToLatLng(coords) { 14648 return new LatLng(coords[1], coords[0], coords[2]); 14649 } 14650 14651 // @function coordsToLatLngs(coords: Array, levelsDeep?: Number, coordsToLatLng?: Function): Array 14652 // Creates a multidimensional array of `LatLng`s from a GeoJSON coordinates array. 14653 // `levelsDeep` specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default). 14654 // Can use a custom [`coordsToLatLng`](#geojson-coordstolatlng) function. 14655 function coordsToLatLngs(coords, levelsDeep, _coordsToLatLng) { 14656 var latlngs = []; 14657 14658 for (var i = 0, len = coords.length, latlng; i < len; i++) { 14659 latlng = levelsDeep ? 14660 coordsToLatLngs(coords[i], levelsDeep - 1, _coordsToLatLng) : 14661 (_coordsToLatLng || coordsToLatLng)(coords[i]); 14662 14663 latlngs.push(latlng); 14664 } 14665 14666 return latlngs; 14667 } 14668 14669 // @function latLngToCoords(latlng: LatLng, precision?: Number|false): Array 14670 // Reverse of [`coordsToLatLng`](#geojson-coordstolatlng) 14671 // Coordinates values are rounded with [`formatNum`](#util-formatnum) function. 14672 function latLngToCoords(latlng, precision) { 14673 latlng = toLatLng(latlng); 14674 return latlng.alt !== undefined ? 14675 [formatNum(latlng.lng, precision), formatNum(latlng.lat, precision), formatNum(latlng.alt, precision)] : 14676 [formatNum(latlng.lng, precision), formatNum(latlng.lat, precision)]; 14677 } 14678 14679 // @function latLngsToCoords(latlngs: Array, levelsDeep?: Number,
14679closed?: Boolean, precision?: Number|false): Array 14680 // Reverse of [`coordsToLatLngs`](#geojson-coordstolatlngs) 14681 // `closed` determines whether the first point should be appended to the end of the array to close the feature, only used when `levelsDeep` is 0. False by default. 14682 // Coordinates values are rounded with [`formatNum`](#util-formatnum) function. 14683 function latLngsToCoords(latlngs, levelsDeep, closed, precision) { 14684 var coords = []; 14685 14686 for (var i = 0, len = latlngs.length; i < len; i++) { 14687 coords.push(levelsDeep ? 14688 latLngsToCoords(latlngs[i], levelsDeep - 1, closed, precision) : 14689 latLngToCoords(latlngs[i], precision)); 14690 } 14691 14692 if (!levelsDeep && closed) { 14693 coords.push(coords[0]
vendor: 18,963 bytes, lines 14693-15297
14693); 14694 } 14695 14696 return coords; 14697 } 14698 14699 function getFeature(layer, newGeometry) { 14700 return layer.feature ? 14701 extend({}, layer.feature, {geometry: newGeometry}) : 14702 asFeature(newGeometry); 14703 } 14704 14705 // @function asFeature(geojson: Object): Object 14706 // Normalize GeoJSON geometries/features into GeoJSON features. 14707 function asFeature(geojson) { 14708 if (geojson.type === 'Feature' || geojson.type === 'FeatureCollection') { 14709 return geojson; 14710 } 14711 14712 return { 14713 type: 'Feature', 14714 properties: {}, 14715 geometry: geojson 14716 }; 14717 } 14718 14719 var PointToGeoJSON = { 14720 toGeoJSON: function (precision) { 14721 return getFeature(this, { 14722 type: 'Point', 14723 coordinates: latLngToCoords(this.getLatLng(), precision) 14724 }); 14725 } 14726 }; 14727 14728 // @namespace Marker 14729 // @section Other methods 14730 // @method toGeoJSON(precision?: Number|false): Object 14731 // Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`. 14732 // Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the marker (as a GeoJSON `Point` Feature). 14733 Marker.include(PointToGeoJSON); 14734 14735 // @namespace CircleMarker 14736 // @method toGeoJSON(precision?: Number|false): Object 14737 // Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`. 14738 // Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the circle marker (as a GeoJSON `Point` Feature). 14739 Circle.include(PointToGeoJSON); 14740 CircleMarker.include(PointToGeoJSON); 14741 14742 14743 // @namespace Polyline 14744 // @method toGeoJSON(precision?: Number|false): Object 14745 // Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`. 14746 // Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the polyline (as a GeoJSON `LineString` or `MultiLineString` Feature). 14747 Polyline.include({ 14748 toGeoJSON: function (precision) { 14749 var multi = !isFlat(this._latlngs); 14750 14751 var coords = latLngsToCoords(this._latlngs, multi ? 1 : 0, false, precision); 14752 14753 return getFeature(this, { 14754 type: (multi ? 'Multi' : '') + 'LineString', 14755 coordinates: coords 14756 }); 14757 } 14758 }); 14759 14760 // @namespace Polygon 14761 // @method toGeoJSON(precision?: Number|false): Object 14762 // Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`. 14763 // Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the polygon (as a GeoJSON `Polygon` or `MultiPolygon` Feature). 14764 Polygon.include({ 14765 toGeoJSON: function (precision) { 14766 var holes = !isFlat(this._latlngs), 14767 multi = holes && !isFlat(this._latlngs[0]); 14768 14769 var coords = latLngsToCoords(this._latlngs, multi ? 2 : holes ? 1 : 0, true, precision); 14770 14771 if (!holes) { 14772 coords = [coords]; 14773 } 14774 14775 return getFeature(this, { 14776 type: (multi ? 'Multi' : '') + 'Polygon', 14777 coordinates: coords 14778 }); 14779 } 14780 }); 14781 14782 14783 // @namespace LayerGroup 14784 LayerGroup.include({ 14785 toMultiPoint: function (precision) { 14786 var coords = []; 14787 14788 this.eachLayer(function (layer) { 14789 coords.push(layer.toGeoJSON(precision).geometry.coordinates); 14790 }); 14791 14792 return getFeature(this, { 14793 type: 'MultiPoint', 14794 coordinates: coords 14795 }); 14796 }, 14797 14798 // @method toGeoJSON(precision?: Number|false): Object 14799 // Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`. 14800 // Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the layer group (as a GeoJSON `FeatureCollection`, `GeometryCollection`, or `MultiPoint`). 14801 toGeoJSON: function (precision) { 14802 14803 var type = this.feature && this.feature.geometry && this.feature.geometry.type; 14804 14805 if (type === 'MultiPoint') { 14806 return this.toMultiPoint(precision); 14807 } 14808 14809 var isGeometryCollection = type === 'GeometryCollection', 14810 jsons = []; 14811 14812 this.eachLayer(function (layer) { 14813 if (layer.toGeoJSON) { 14814 var json = layer.toGeoJSON(precision); 14815 if (isGeometryCollection) { 14816 jsons.push(json.geometry); 14817 } else { 14818 var feature = asFeature(json); 14819 // Squash nested feature collections 14820 if (feature.type === 'FeatureCollection') { 14821 jsons.push.apply(jsons, feature.features); 14822 } else { 14823 jsons.push(feature); 14824 } 14825 } 14826 } 14827 }); 14828 14829 if (isGeometryCollection) { 14830 return getFeature(this, { 14831 geometries: jsons, 14832 type: 'GeometryCollection' 14833 }); 14834 } 14835 14836 return { 14837 type: 'FeatureCollection', 14838 features: jsons 14839 }; 14840 } 14841 }); 14842 14843 // @namespace GeoJSON 14844 // @factory L.geoJSON(geojson?: Object, options?: GeoJSON options) 14845 // Creates a GeoJSON layer. Optionally accepts an object in 14846 // [GeoJSON format](https://tools.ietf.org/html/rfc7946) to display on the map 14847 // (you can alternatively add it later with `addData` method) and an `options` object. 14848 function geoJSON(geojson, options) { 14849 return new GeoJSON(geojson, options); 14850 } 14851 14852 // Backward compatibility. 14853 var geoJson = geoJSON; 14854 14855 /* 14856 * @class ImageOverlay 14857 * @aka L.ImageOverlay 14858 * @inherits Interactive layer 14859 * 14860 * Used to load and display a single image over specific bounds of the map. Extends `Layer`. 14861 * 14862 * @example 14863 * 14864 * ```js 14865 * var imageUrl = 'https://maps.lib.utexas.edu/maps/historical/newark_nj_1922.jpg', 14866 * imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]]; 14867 * L.imageOverlay(imageUrl, imageBounds).addTo(map); 14868 * ``` 14869 */ 14870 14871 var ImageOverlay = Layer.extend({ 14872 14873 // @section 14874 // @aka ImageOverlay options 14875 options: { 14876 // @option opacity: Number = 1.0 14877 // The opacity of the image overlay. 14878 opacity: 1, 14879 14880 // @option alt: String = '' 14881 // Text for the `alt` attribute of the image (useful for accessibility). 14882 alt: '', 14883 14884 // @option interactive: Boolean = false 14885 // If `true`, the image overlay will emit [mouse events](#interactive-layer) when clicked or hovered. 14886 interactive: false, 14887 14888 // @option crossOrigin: Boolean|String = false 14889 // Whether the crossOrigin attribute will be added to the image. 14890 // If a String is provided, the image will have its crossOrigin attribute set to the String provided. This is needed if you want to access image pixel data. 14891 // Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values. 14892 crossOrigin: false, 14893 14894 // @option errorOverlayUrl: String = '' 14895 // URL to the overlay image to show in place of the overlay that failed to load. 14896 errorOverlayUrl: '', 14897 14898 // @option zIndex: Number = 1 14899 // The explicit [zIndex](https://developer.mozilla.org/docs/Web/CSS/CSS_Positioning/Understanding_z_index) of the overlay layer. 14900 zIndex: 1, 14901 14902 // @option className: String = '' 14903 // A custom class name to assign to the image. Empty by default. 14904 className: '' 14905 }, 14906 14907 initialize: function (url, bounds, options) { // (String, LatLngBounds, Object) 14908 this._url = url; 14909 this._bounds = toLatLngBounds(bounds); 14910 14911 setOptions(this, options); 14912 }, 14913 14914 onAdd: function () { 14915 if (!this._image) { 14916 this._initImage(); 14917 14918 if (this.options.opacity < 1) { 14919 this._updateOpacity(); 14920 } 14921 } 14922 14923 if (this.options.interactive) { 14924 addClass(this._image, 'leaflet-interactive'); 14925 this.addInteractiveTarget(this._image); 14926 } 14927 14928 this.getPane().appendChild(this._image); 14929 this._reset(); 14930 }, 14931 14932 onRemove: function () { 14933 remove(this._image); 14934 if (this.options.interactive) { 14935 this.removeInteractiveTarget(this._image); 14936 } 14937 }, 14938 14939 // @method setOpacity(opacity: Number): this 14940 // Sets the opacity of the overlay. 14941 setOpacity: function (opacity) { 14942 this.options.opacity = opacity; 14943 14944 if (this._image) { 14945 this._updateOpacity(); 14946 } 14947 return this; 14948 }, 14949 14950 setStyle: function (styleOpts) { 14951 if (styleOpts.opacity) { 14952 this.setOpacity(styleOpts.opacity); 14953 } 14954 return this; 14955 }, 14956 14957 // @method bringToFront(): this 14958 // Brings the layer to the top of all overlays. 14959 bringToFront: function () { 14960 if (this._map) { 14961 toFront(this._image); 14962 } 14963 return this; 14964 }, 14965 14966 // @method bringToBack(): this 14967 // Brings the layer to the bottom of all overlays. 14968 bringToBack: function () { 14969 if (this._map) { 14970 toBack(this._image); 14971 } 14972 return this; 14973 }, 14974 14975 // @method setUrl(url: String): this 14976 // Changes the URL of the image. 14977 setUrl: function (url) { 14978 this._url = url; 14979 14980 if (this._image) { 14981 this._image.src = url; 14982 } 14983 return this; 14984 }, 14985 14986 // @method setBounds(bounds: LatLngBounds): this 14987 // Update the bounds that this ImageOverlay covers 14988 setBounds: function (bounds) { 14989 this._bounds = toLatLngBounds(bounds); 14990 14991 if (this._map) { 14992 this._reset(); 14993 } 14994 return this; 14995 }, 14996 14997 getEvents: function () { 14998 var events = { 14999 zoom: this._reset, 15000 viewreset: this._reset 15001 }; 15002 15003 if (this._zoomAnimated) { 15004 events.zoomanim = this._animateZoom; 15005 } 15006 15007 return events; 15008 }, 15009 15010 // @method setZIndex(value: Number): this 15011 // Changes the [zIndex](#imageoverlay-zindex) of the image overlay. 15012 setZIndex: function (value) { 15013 this.options.zIndex = value; 15014 this._updateZIndex(); 15015 return this; 15016 }, 15017 15018 // @method getBounds(): LatLngBounds 15019 // Get the bounds that this ImageOverlay covers 15020 getBounds: function () { 15021 return this._bounds; 15022 }, 15023 15024 // @method getElement(): HTMLElement 15025 // Returns the instance of [`HTMLImageElement`](https://developer.mozilla.org/docs/Web/API/HTMLImageElement) 15026 // used by this overlay. 15027 getElement: function () { 15028 return this._image; 15029 }, 15030 15031 _initImage: function () { 15032 var wasElementSupplied = this._url.tagName === 'IMG'; 15033 var img = this._image = wasElementSupplied ? this._url : create$1('img'); 15034 15035 addClass(img, 'leaflet-image-layer'); 15036 if (this._zoomAnimated) { addClass(img, 'leaflet-zoom-animated'); } 15037 if (this.options.className) { addClass(img, this.options.className); } 15038 15039 img.onselectstart = falseFn; 15040 img.onmousemove = falseFn; 15041 15042 // @event load: Event 15043 // Fired when the ImageOverlay layer has loaded its image 15044 img.onload = bind(this.fire, this, 'load'); 15045 img.onerror = bind(this._overlayOnError, this, 'error'); 15046 15047 if (this.options.crossOrigin || this.options.crossOrigin === '') { 15048 img.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin; 15049 } 15050 15051 if (this.options.zIndex) { 15052 this._updateZIndex(); 15053 } 15054 15055 if (wasElementSupplied) { 15056 this._url = img.src; 15057 return; 15058 } 15059 15060 img.src = this._url; 15061 img.alt = this.options.alt; 15062 }, 15063 15064 _animateZoom: function (e) { 15065 var scale = this._map.getZoomScale(e.zoom), 15066 offset = this._map._latLngBoundsToNewLayerBounds(this._bounds, e.zoom, e.center).min; 15067 15068 setTransform(this._image, offset, scale); 15069 }, 15070 15071 _reset: function () { 15072 var image = this._image, 15073 bounds = new Bounds( 15074 this._map.latLngToLayerPoint(this._bounds.getNorthWest()), 15075 this._map.latLngToLayerPoint(this._bounds.getSouthEast())), 15076 size = bounds.getSize(); 15077 15078 setPosition(image, bounds.min); 15079 15080 image.style.width = size.x + 'px'; 15081 image.style.height = size.y + 'px'; 15082 }, 15083 15084 _updateOpacity: function () { 15085 setOpacity(this._image, this.options.opacity); 15086 }, 15087 15088 _updateZIndex: function () { 15089 if (this._image && this.options.zIndex !== undefined && this.options.zIndex !== null) { 15090 this._image.style.zIndex = this.options.zIndex; 15091 } 15092 }, 15093 15094 _overlayOnError: function () { 15095 // @event error: Event 15096 // Fired when the ImageOverlay layer fails to load its image 15097 this.fire('error'); 15098 15099 var errorUrl = this.options.errorOverlayUrl; 15100 if (errorUrl && this._url !== errorUrl) { 15101 this._url = errorUrl; 15102 this._image.src = errorUrl; 15103 } 15104 }, 15105 15106 // @method getCenter(): LatLng 15107 // Returns the center of the ImageOverlay. 15108 getCenter: function () { 15109 return this._bounds.getCenter(); 15110 } 15111 }); 15112 15113 // @factory L.imageOverlay(imageUrl: String, bounds: LatLngBounds, options?: ImageOverlay options) 15114 // Instantiates an image overlay object given the URL of the image and the 15115 // geographical bounds it is tied to. 15116 var imageOverlay = function (url, bounds, options) { 15117 return new ImageOverlay(url, bounds, options); 15118 }; 15119 15120 /* 15121 * @class VideoOverlay 15122 * @aka L.VideoOverlay 15123 * @inherits ImageOverlay 15124 * 15125 * Used to load and display a video player over specific bounds of the map. Extends `ImageOverlay`. 15126 * 15127 * A video overlay uses the [`<video>`](https://developer.mozilla.org/docs/Web/HTML/Element/video) 15128 * HTML5 element. 15129 * 15130 * @example 15131 * 15132 * ```js 15133 * var videoUrl = 'https://www.mapbox.com/bites/00188/patricia_nasa.webm', 15134 * videoBounds = [[ 32, -130], [ 13, -100]]; 15135 * L.videoOverlay(videoUrl, videoBounds ).addTo(map); 15136 * ``` 15137 */ 15138 15139 var VideoOverlay = ImageOverlay.extend({ 15140 15141 // @section 15142 // @aka VideoOverlay options 15143 options: { 15144 // @option autoplay: Boolean = true 15145 // Whether the video starts playing automatically when loaded. 15146 // On some browsers autoplay will only work with `muted: true` 15147 autoplay: true, 15148 15149 // @option loop: Boolean = true 15150 // Whether the video will loop back to the beginning when played. 15151 loop: true, 15152 15153 // @option keepAspectRatio: Boolean = true 15154 // Whether the video will save aspect ratio after the projection. 15155 // Relevant for supported browsers. See [browser compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) 15156 keepAspectRatio: true, 15157 15158 // @option muted: Boolean = false 15159 // Whether the video starts on mute when loaded. 15160 muted: false, 15161 15162 // @option playsInline: Boolean = true 15163 // Mobile browsers will play the video right where it is instead of open it up in fullscreen mode. 15164 playsInline: true 15165 }, 15166 15167 _initImage: function () { 15168 var wasElementSupplied = this._url.tagName === 'VIDEO'; 15169 var vid = this._image = wasElementSupplied ? this._url : create$1('video'); 15170 15171 addClass(vid, 'leaflet-image-layer'); 15172 if (this._zoomAnimated) { addClass(vid, 'leaflet-zoom-animated'); } 15173 if (this.options.className) { addClass(vid, this.options.className); } 15174 15175 vid.onselectstart = falseFn; 15176 vid.onmousemove = falseFn; 15177 15178 // @event load: Event 15179 // Fired when the video has finished loading the first frame 15180 vid.onloadeddata = bind(this.fire, this, 'load'); 15181 15182 if (wasElementSupplied) { 15183 var sourceElements = vid.getElementsByTagName('source'); 15184 var sources = []; 15185 for (var j = 0; j < sourceElements.length; j++) { 15186 sources.push(sourceElements[j].src); 15187 } 15188 15189 this._url = (sourceElements.length > 0) ? sources : [vid.src]; 15190 return; 15191 } 15192 15193 if (!isArray(this._url)) { this._url = [this._url]; } 15194 15195 if (!this.options.keepAspectRatio && Object.prototype.hasOwnProperty.call(vid.style, 'objectFit')) { 15196 vid.style['objectFit'] = 'fill'; 15197 } 15198 vid.autoplay = !!this.options.autoplay; 15199 vid.loop = !!this.options.loop; 15200 vid.muted = !!this.options.muted; 15201 vid.playsInline = !!this.options.playsInline; 15202 for (var i = 0; i < this._url.length; i++) { 15203 var source = create$1('source'); 15204 source.src = this._url[i]; 15205 vid.appendChild(source); 15206 } 15207 } 15208 15209 // @method getElement(): HTMLVideoElement 15210 // Returns the instance of [`HTMLVideoElement`](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement) 15211 // used by this overlay. 15212 }); 15213 15214 15215 // @factory L.videoOverlay(video: String|Array|HTMLVideoElement, bounds: LatLngBounds, options?: VideoOverlay options) 15216 // Instantiates an image overlay object given the URL of the video (or array of URLs, or even a video element) and the 15217 // geographical bounds it is tied to. 15218 15219 function videoOverlay(video, bounds, options) { 15220 return new VideoOverlay(video, bounds, options); 15221 } 15222 15223 /* 15224 * @class SVGOverlay 15225 * @aka L.SVGOverlay 15226 * @inherits ImageOverlay 15227 * 15228 * Used to load, display and provide DOM access to an SVG file over specific bounds of the map. Extends `ImageOverlay`. 15229 * 15230 * An SVG overlay uses the [`<svg>`](https://developer.mozilla.org/docs/Web/SVG/Element/svg) element. 15231 * 15232 * @example 15233 * 15234 * ```js 15235 * var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"); 15236 * svgElement.setAttribute('xmlns', "http://www.w3.org/2000/svg"); 15237 * svgElement.setAttribute('viewBox', "0 0 200 200"); 15238 * svgElement.innerHTML = '<rect width="200" height="200"/><rect x="75" y="23" width="50" height="50" style="fill:red"/><rect x="75" y="123" width="50" height="50" style="fill:#0013ff"/>'; 15239 * var svgElementBounds = [ [ 32, -130 ], [ 13, -100 ] ]; 15240 * L.svgOverlay(svgElement, svgElementBounds).addTo(map); 15241 * ``` 15242 */ 15243 15244 var SVGOverlay = ImageOverlay.extend({ 15245 _initImage: function () { 15246 var el = this._image = this._url; 15247 15248 addClass(el, 'leaflet-image-layer'); 15249 if (this._zoomAnimated) { addClass(el, 'leaflet-zoom-animated'); } 15250 if (this.options.className) { addClass(el, this.options.className); } 15251 15252 el.onselectstart = falseFn; 15253 el.onmousemove = falseFn; 15254 } 15255 15256 // @method getElement(): SVGElement 15257 // Returns the instance of [`SVGElement`](https://developer.mozilla.org/docs/Web/API/SVGElement) 15258 // used by this overlay. 15259 }); 15260 15261 15262 // @factory L.svgOverlay(svg: String|SVGElement, bounds: LatLngBounds, options?: SVGOverlay options) 15263 // Instantiates an image overlay object given an SVG element and the geographical bounds it is tied to. 15264 // A viewBox attribute is required on the SVG element to zoom in and out properly. 15265 15266 function svgOverlay(el, bounds, options) { 15267 return new SVGOverlay(el, bounds, options); 15268 } 15269 15270 /* 15271 * @class DivOverlay 15272 * @inherits Interactive layer 15273 * @aka L.DivOverlay 15274 * Base model for L.Popup and L.Tooltip. Inherit from it for custom overlays like plugins. 15275 */ 15276 15277 // @namespace DivOverlay 15278 var DivOverlay = Layer.extend({ 15279 15280 // @section 15281 // @aka DivOverlay options 15282 options: { 15283 // @option interactive: Boolean = false 15284 // If true, the popup/tooltip will listen to the mouse events. 15285 interactive: false, 15286 15287 // @option offset: Point = Point(0, 0) 15288 // The offset of the overlay position. 15289 offset: [0, 0], 15290 15291 // @option className: String = '' 15292 // A custom CSS class name to assign to the overlay. 15293 className: '', 15294 15295 // @option pane: String = undefined 15296 // `Map pane` where the overlay will be added. 15297 pane: undefined
vendor: 33,725 bytes, lines 15297-16406
15297 15298 }, 15299 15300 initialize: function (options, source) { 15301 setOptions(this, options); 15302 15303 this._source = source; 15304 }, 15305 15306 // @method openOn(map: Map): this 15307 // Adds the overlay to the map. 15308 // Alternative to `map.openPopup(popup)`/`.openTooltip(tooltip)`. 15309 openOn: function (map) { 15310 map = arguments.length ? map : this._source._map; // experimental, not the part of public api 15311 if (!map.hasLayer(this)) { 15312 map.addLayer(this); 15313 } 15314 return this; 15315 }, 15316 15317 // @method close(): this 15318 // Closes the overlay. 15319 // Alternative to `map.closePopup(popup)`/`.closeTooltip(tooltip)` 15320 // and `layer.closePopup()`/`.closeTooltip()`. 15321 close: function () { 15322 if (this._map) { 15323 this._map.removeLayer(this); 15324 } 15325 return this; 15326 }, 15327 15328 // @method toggle(layer?: Layer): this 15329 // Opens or closes the overlay bound to layer depending on its current state. 15330 // Argument may be omitted only for overlay bound to layer. 15331 // Alternative to `layer.togglePopup()`/`.toggleTooltip()`. 15332 toggle: function (layer) { 15333 if (this._map) { 15334 this.close(); 15335 } else { 15336 if (arguments.length) { 15337 this._source = layer; 15338 } else { 15339 layer = this._source; 15340 } 15341 this._prepareOpen(); 15342 15343 // open the overlay on the map 15344 this.openOn(layer._map); 15345 } 15346 return this; 15347 }, 15348 15349 onAdd: function (map) { 15350 this._zoomAnimated = map._zoomAnimated; 15351 15352 if (!this._container) { 15353 this._initLayout(); 15354 } 15355 15356 if (map._fadeAnimated) { 15357 setOpacity(this._container, 0); 15358 } 15359 15360 clearTimeout(this._removeTimeout); 15361 this.getPane().appendChild(this._container); 15362 this.update(); 15363 15364 if (map._fadeAnimated) { 15365 setOpacity(this._container, 1); 15366 } 15367 15368 this.bringToFront(); 15369 15370 if (this.options.interactive) { 15371 addClass(this._container, 'leaflet-interactive'); 15372 this.addInteractiveTarget(this._container); 15373 } 15374 }, 15375 15376 onRemove: function (map) { 15377 if (map._fadeAnimated) { 15378 setOpacity(this._container, 0); 15379 this._removeTimeout = setTimeout(bind(remove, undefined, this._container), 200); 15380 } else { 15381 remove(this._container); 15382 } 15383 15384 if (this.options.interactive) { 15385 removeClass(this._container, 'leaflet-interactive'); 15386 this.removeInteractiveTarget(this._container); 15387 } 15388 }, 15389 15390 // @namespace DivOverlay 15391 // @method getLatLng: LatLng 15392 // Returns the geographical point of the overlay. 15393 getLatLng: function () { 15394 return this._latlng; 15395 }, 15396 15397 // @method setLatLng(latlng: LatLng): this 15398 // Sets the geographical point where the overlay will open. 15399 setLatLng: function (latlng) { 15400 this._latlng = toLatLng(latlng); 15401 if (this._map) { 15402 this._updatePosition(); 15403 this._adjustPan(); 15404 } 15405 return this; 15406 }, 15407 15408 // @method getContent: String|HTMLElement 15409 // Returns the content of the overlay. 15410 getContent: function () { 15411 return this._content; 15412 }, 15413 15414 // @method setContent(htmlContent: String|HTMLElement|Function): this 15415 // Sets the HTML content of the overlay. If a function is passed the source layer will be passed to the function. 15416 // The function should return a `String` or `HTMLElement` to be used in the overlay. 15417 setContent: function (content) { 15418 this._content = content; 15419 this.update(); 15420 return this; 15421 }, 15422 15423 // @method getElement: String|HTMLElement 15424 // Returns the HTML container of the overlay. 15425 getElement: function () { 15426 return this._container; 15427 }, 15428 15429 // @method update: null 15430 // Updates the overlay content, layout and position. Useful for updating the overlay after something inside changed, e.g. image loaded. 15431 update: function () { 15432 if (!this._map) { return; } 15433 15434 this._container.style.visibility = 'hidden'; 15435 15436 this._updateContent(); 15437 this._updateLayout(); 15438 this._updatePosition(); 15439 15440 this._container.style.visibility = ''; 15441 15442 this._adjustPan(); 15443 }, 15444 15445 getEvents: function () { 15446 var events = { 15447 zoom: this._updatePosition, 15448 viewreset: this._updatePosition 15449 }; 15450 15451 if (this._zoomAnimated) { 15452 events.zoomanim = this._animateZoom; 15453 } 15454 return events; 15455 }, 15456 15457 // @method isOpen: Boolean 15458 // Returns `true` when the overlay is visible on the map. 15459 isOpen: function () { 15460 return !!this._map && this._map.hasLayer(this); 15461 }, 15462 15463 // @method bringToFront: this 15464 // Brings this overlay in front of other overlays (in the same map pane). 15465 bringToFront: function () { 15466 if (this._map) { 15467 toFront(this._container); 15468 } 15469 return this; 15470 }, 15471 15472 // @method bringToBack: this 15473 // Brings this overlay to the back of other overlays (in the same map pane). 15474 bringToBack: function () { 15475 if (this._map) { 15476 toBack(this._container); 15477 } 15478 return this; 15479 }, 15480 15481 // prepare bound overlay to open: update latlng pos / content source (for FeatureGroup) 15482 _prepareOpen: function (latlng) { 15483 var source = this._source; 15484 if (!source._map) { return false; } 15485 15486 if (source instanceof FeatureGroup) { 15487 source = null; 15488 var layers = this._source._layers; 15489 for (var id in layers) { 15490 if (layers[id]._map) { 15491 source = layers[id]; 15492 break; 15493 } 15494 } 15495 if (!source) { return false; } // Unable to get source layer. 15496 15497 // set overlay source to this layer 15498 this._source = source; 15499 } 15500 15501 if (!latlng) { 15502 if (source.getCenter) { 15503 latlng = source.getCenter(); 15504 } else if (source.getLatLng) { 15505 latlng = source.getLatLng(); 15506 } else if (source.getBounds) { 15507 latlng = source.getBounds().getCenter(); 15508 } else { 15509 throw new Error('Unable to get source layer LatLng.'); 15510 } 15511 } 15512 this.setLatLng(latlng); 15513 15514 if (this._map) { 15515 // update the overlay (content, layout, etc...) 15516 this.update(); 15517 } 15518 15519 return true; 15520 }, 15521 15522 _updateContent: function () { 15523 if (!this._content) { return; } 15524 15525 var node = this._contentNode; 15526 var content = (typeof this._content === 'function') ? this._content(this._source || this) : this._content; 15527 15528 if (typeof content === 'string') { 15529 node.innerHTML = content; 15530 } else { 15531 while (node.hasChildNodes()) { 15532 node.removeChild(node.firstChild); 15533 } 15534 node.appendChild(content); 15535 } 15536 15537 // @namespace DivOverlay 15538 // @section DivOverlay events 15539 // @event contentupdate: Event 15540 // Fired when the content of the overlay is updated 15541 this.fire('contentupdate'); 15542 }, 15543 15544 _updatePosition: function () { 15545 if (!this._map) { return; } 15546 15547 var pos = this._map.latLngToLayerPoint(this._latlng), 15548 offset = toPoint(this.options.offset), 15549 anchor = this._getAnchor(); 15550 15551 if (this._zoomAnimated) { 15552 setPosition(this._container, pos.add(anchor)); 15553 } else { 15554 offset = offset.add(pos).add(anchor); 15555 } 15556 15557 var bottom = this._containerBottom = -offset.y, 15558 left = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x; 15559 15560 // bottom position the overlay in case the height of the overlay changes (images loading etc) 15561 this._container.style.bottom = bottom + 'px'; 15562 this._container.style.left = left + 'px'; 15563 }, 15564 15565 _getAnchor: function () { 15566 return [0, 0]; 15567 } 15568 15569 }); 15570 15571 Map.include({ 15572 _initOverlay: function (OverlayClass, content, latlng, options) { 15573 var overlay = content; 15574 if (!(overlay instanceof OverlayClass)) { 15575 overlay = new OverlayClass(options).setContent(content); 15576 } 15577 if (latlng) { 15578 overlay.setLatLng(latlng); 15579 } 15580 return overlay; 15581 } 15582 }); 15583 15584 15585 Layer.include({ 15586 _initOverlay: function (OverlayClass, old, content, options) { 15587 var overlay = content; 15588 if (overlay instanceof OverlayClass) { 15589 setOptions(overlay, options); 15590 overlay._source = this; 15591 } else { 15592 overlay = (old && !options) ? old : new OverlayClass(options, this); 15593 overlay.setContent(content); 15594 } 15595 return overlay; 15596 } 15597 }); 15598 15599 /* 15600 * @class Popup 15601 * @inherits DivOverlay 15602 * @aka L.Popup 15603 * Used to open popups in certain places of the map. Use [Map.openPopup](#map-openpopup) to 15604 * open popups while making sure that only one popup is open at one time 15605 * (recommended for usability), or use [Map.addLayer](#map-addlayer) to open as many as you want. 15606 * 15607 * @example 15608 * 15609 * If you want to just bind a popup to marker click and then open it, it's really easy: 15610 * 15611 * ```js 15612 * marker.bindPopup(popupContent).openPopup(); 15613 * ``` 15614 * Path overlays like polylines also have a `bindPopup` method. 15615 * Here's a more complicated way to open a popup on a map: 15616 * 15617 * ```js 15618 * var popup = L.popup() 15619 * .setLatLng(latlng) 15620 * .setContent('<p>Hello world!<br />This is a nice popup.</p>') 15621 * .openOn(map); 15622 * ``` 15623 */ 15624 15625 15626 // @namespace Popup 15627 var Popup = DivOverlay.extend({ 15628 15629 // @section 15630 // @aka Popup options 15631 options: { 15632 // @option pane: String = 'popupPane' 15633 // `Map pane` where the popup will be added. 15634 pane: 'popupPane', 15635 15636 // @option offset: Point = Point(0, 7) 15637 // The offset of the popup position. 15638 offset: [0, 7], 15639 15640 // @option maxWidth: Number = 300 15641 // Max width of the popup, in pixels. 15642 maxWidth: 300, 15643 15644 // @option minWidth: Number = 50 15645 // Min width of the popup, in pixels. 15646 minWidth: 50, 15647 15648 // @option maxHeight: Number = null 15649 // If set, creates a scrollable container of the given height 15650 // inside a popup if its content exceeds it. 15651 maxHeight: null, 15652 15653 // @option autoPan: Boolean = true 15654 // Set it to `false` if you don't want the map to do panning animation 15655 // to fit the opened popup. 15656 autoPan: true, 15657 15658 // @option autoPanPaddingTopLeft: Point = null 15659 // The margin between the popup and the top left corner of the map 15660 // view after autopanning was performed. 15661 autoPanPaddingTopLeft: null, 15662 15663 // @option autoPanPaddingBottomRight: Point = null 15664 // The margin between the popup and the bottom right corner of the map 15665 // view after autopanning was performed. 15666 autoPanPaddingBottomRight: null, 15667 15668 // @option autoPanPadding: Point = Point(5, 5) 15669 // Equivalent of setting both top left and bottom right autopan padding to the same value. 15670 autoPanPadding: [5, 5], 15671 15672 // @option keepInView: Boolean = false 15673 // Set it to `true` if you want to prevent users from panning the popup 15674 // off of the screen while it is open. 15675 keepInView: false, 15676 15677 // @option closeButton: Boolean = true 15678 // Controls the presence of a close button in the popup. 15679 closeButton: true, 15680 15681 // @option autoClose: Boolean = true 15682 // Set it to `false` if you want to override the default behavior of 15683 // the popup closing when another popup is opened. 15684 autoClose: true, 15685 15686 // @option closeOnEscapeKey: Boolean = true 15687 // Set it to `false` if you want to override the default behavior of 15688 // the ESC key for closing of the popup. 15689 closeOnEscapeKey: true, 15690 15691 // @option closeOnClick: Boolean = * 15692 // Set it if you want to override the default behavior of the popup closing when user clicks 15693 // on the map. Defaults to the map's [`closePopupOnClick`](#map-closepopuponclick) option. 15694 15695 // @option className: String = '' 15696 // A custom CSS class name to assign to the popup. 15697 className: '' 15698 }, 15699 15700 // @namespace Popup 15701 // @method openOn(map: Map): this 15702 // Alternative to `map.openPopup(popup)`. 15703 // Adds the popup to the map and closes the previous one. 15704 openOn: function (map) { 15705 map = arguments.length ? map : this._source._map; // experimental, not the part of public api 15706 15707 if (!map.hasLayer(this) && map._popup && map._popup.options.autoClose) { 15708 map.removeLayer(map._popup); 15709 } 15710 map._popup = this; 15711 15712 return DivOverlay.prototype.openOn.call(this, map); 15713 }, 15714 15715 onAdd: function (map) { 15716 DivOverlay.prototype.onAdd.call(this, map); 15717 15718 // @namespace Map 15719 // @section Popup events 15720 // @event popupopen: PopupEvent 15721 // Fired when a popup is opened in the map 15722 map.fire('popupopen', {popup: this}); 15723 15724 if (this._source) { 15725 // @namespace Layer 15726 // @section Popup events 15727 // @event popupopen: PopupEvent 15728 // Fired when a popup bound to this layer is opened 15729 this._source.fire('popupopen', {popup: this}, true); 15730 // For non-path layers, we toggle the popup when clicking 15731 // again the layer, so prevent the map to reopen it. 15732 if (!(this._source instanceof Path)) { 15733 this._source.on('preclick', stopPropagation); 15734 } 15735 } 15736 }, 15737 15738 onRemove: function (map) { 15739 DivOverlay.prototype.onRemove.call(this, map); 15740 15741 // @namespace Map 15742 // @section Popup events 15743 // @event popupclose: PopupEvent 15744 // Fired when a popup in the map is closed 15745 map.fire('popupclose', {popup: this}); 15746 15747 if (this._source) { 15748 // @namespace Layer 15749 // @section Popup events 15750 // @event popupclose: PopupEvent 15751 // Fired when a popup bound to this layer is closed 15752 this._source.fire('popupclose', {popup: this}, true); 15753 if (!(this._source instanceof Path)) { 15754 this._source.off('preclick', stopPropagation); 15755 } 15756 } 15757 }, 15758 15759 getEvents: function () { 15760 var events = DivOverlay.prototype.getEvents.call(this); 15761 15762 if (this.options.closeOnClick !== undefined ? this.options.closeOnClick : this._map.options.closePopupOnClick) { 15763 events.preclick = this.close; 15764 } 15765 15766 if (this.options.keepInView) { 15767 events.moveend = this._adjustPan; 15768 } 15769 15770 return events; 15771 }, 15772 15773 _initLayout: function () { 15774 var prefix = 'leaflet-popup', 15775 container = this._container = create$1('div', 15776 prefix + ' ' + (this.options.className || '') + 15777 ' leaflet-zoom-animated'); 15778 15779 var wrapper = this._wrapper = create$1('div', prefix + '-content-wrapper', container); 15780 this._contentNode = create$1('div', prefix + '-content', wrapper); 15781 15782 disableClickPropagation(container); 15783 disableScrollPropagation(this._contentNode); 15784 on(container, 'contextmenu', stopPropagation); 15785 15786 this._tipContainer = create$1('div', prefix + '-tip-container', container); 15787 this._tip = create$1('div', prefix + '-tip', this._tipContainer); 15788 15789 if (this.options.closeButton) { 15790 var closeButton = this._closeButton = create$1('a', prefix + '-close-button', container); 15791 closeButton.setAttribute('role', 'button'); // overrides the implicit role=link of <a> elements #7399 15792 closeButton.setAttribute('aria-label', 'Close popup'); 15793 closeButton.href = '#close'; 15794 closeButton.innerHTML = '<span aria-hidden="true">×</span>'; 15795 15796 on(closeButton, 'click', this.close, this); 15797 } 15798 }, 15799 15800 _updateLayout: function () { 15801 var container = this._contentNode, 15802 style = container.style; 15803 15804 style.width = ''; 15805 style.whiteSpace = 'nowrap'; 15806 15807 var width = container.offsetWidth; 15808 width = Math.min(width, this.options.maxWidth); 15809 width = Math.max(width, this.options.minWidth); 15810 15811 style.width = (width + 1) + 'px'; 15812 style.whiteSpace = ''; 15813 15814 style.height = ''; 15815 15816 var height = container.offsetHeight, 15817 maxHeight = this.options.maxHeight, 15818 scrolledClass = 'leaflet-popup-scrolled'; 15819 15820 if (maxHeight && height > maxHeight) { 15821 style.height = maxHeight + 'px'; 15822 addClass(container, scrolledClass); 15823 } else { 15824 removeClass(container, scrolledClass); 15825 } 15826 15827 this._containerWidth = this._container.offsetWidth; 15828 }, 15829 15830 _animateZoom: function (e) { 15831 var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center), 15832 anchor = this._getAnchor(); 15833 setPosition(this._container, pos.add(anchor)); 15834 }, 15835 15836 _adjustPan: function (e) { 15837 if (!this.options.autoPan) { return; } 15838 if (this._map._panAnim) { this._map._panAnim.stop(); } 15839 15840 var map = this._map, 15841 marginBottom = parseInt(getStyle(this._container, 'marginBottom'), 10) || 0, 15842 containerHeight = this._container.offsetHeight + marginBottom, 15843 containerWidth = this._containerWidth, 15844 layerPos = new Point(this._containerLeft, -containerHeight - this._containerBottom); 15845 15846 layerPos._add(getPosition(this._container)); 15847 15848 var containerPos = map.layerPointToContainerPoint(layerPos), 15849 padding = toPoint(this.options.autoPanPadding), 15850 paddingTL = toPoint(this.options.autoPanPaddingTopLeft || padding), 15851 paddingBR = toPoint(this.options.autoPanPaddingBottomRight || padding), 15852 size = map.getSize(), 15853 dx = 0, 15854 dy = 0; 15855 15856 if (containerPos.x + containerWidth + paddingBR.x > size.x) { // right 15857 dx = containerPos.x + containerWidth - size.x + paddingBR.x; 15858 } 15859 if (containerPos.x - dx - paddingTL.x < 0) { // left 15860 dx = containerPos.x - paddingTL.x; 15861 } 15862 if (containerPos.y + containerHeight + paddingBR.y > size.y) { // bottom 15863 dy = containerPos.y + containerHeight - size.y + paddingBR.y; 15864 } 15865 if (containerPos.y - dy - paddingTL.y < 0) { // top 15866 dy = containerPos.y - paddingTL.y; 15867 } 15868 15869 // @namespace Map 15870 // @section Popup events 15871 // @event autopanstart: Event 15872 // Fired when the map starts autopanning when opening a popup. 15873 if (dx || dy) { 15874 map 15875 .fire('autopanstart') 15876 .panBy([dx, dy], {animate: e && e.type === 'moveend'}); 15877 } 15878 }, 15879 15880 _getAnchor: function () { 15881 // Where should we anchor the popup on the source layer? 15882 return toPoint(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]); 15883 } 15884 15885 }); 15886 15887 // @namespace Popup 15888 // @factory L.popup(options?: Popup options, source?: Layer) 15889 // Instantiates a `Popup` object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the popup with a reference to the Layer to which it refers. 15890 var popup = function (options, source) { 15891 return new Popup(options, source); 15892 }; 15893 15894 15895 /* @namespace Map 15896 * @section Interaction Options 15897 * @option closePopupOnClick: Boolean = true 15898 * Set it to `false` if you don't want popups to close when user clicks the map. 15899 */ 15900 Map.mergeOptions({ 15901 closePopupOnClick: true 15902 }); 15903 15904 15905 // @namespace Map 15906 // @section Methods for Layers and Controls 15907 Map.include({ 15908 // @method openPopup(popup: Popup): this 15909 // Opens the specified popup while closing the previously opened (to make sure only one is opened at one time for usability). 15910 // @alternative 15911 // @method openPopup(content: String|HTMLElement, latlng: LatLng, options?: Popup options): this 15912 // Creates a popup with the specified content and options and opens it in the given point on a map. 15913 openPopup: function (popup, latlng, options) { 15914 this._initOverlay(Popup, popup, latlng, options) 15915 .openOn(this); 15916 15917 return this; 15918 }, 15919 15920 // @method closePopup(popup?: Popup): this 15921 // Closes the popup previously opened with [openPopup](#map-openpopup) (or the given one). 15922 closePopup: function (popup) { 15923 popup = arguments.length ? popup : this._popup; 15924 if (popup) { 15925 popup.close(); 15926 } 15927 return this; 15928 } 15929 }); 15930 15931 /* 15932 * @namespace Layer 15933 * @section Popup methods example 15934 * 15935 * All layers share a set of methods convenient for binding popups to it. 15936 * 15937 * ```js 15938 * var layer = L.Polygon(latlngs).bindPopup('Hi There!').addTo(map); 15939 * layer.openPopup(); 15940 * layer.closePopup(); 15941 * ``` 15942 * 15943 * Popups will also be automatically opened when the layer is clicked on and closed when the layer is removed from the map or another popup is opened. 15944 */ 15945 15946 // @section Popup methods 15947 Layer.include({ 15948 15949 // @method bindPopup(content: String|HTMLElement|Function|Popup, options?: Popup options): this 15950 // Binds a popup to the layer with the passed `content` and sets up the 15951 // necessary event listeners. If a `Function` is passed it will receive 15952 // the layer as the first argument and should return a `String` or `HTMLElement`. 15953 bindPopup: function (content, options) { 15954 this._popup = this._initOverlay(Popup, this._popup, content, options); 15955 if (!this._popupHandlersAdded) { 15956 this.on({ 15957 click: this._openPopup, 15958 keypress: this._onKeyPress, 15959 remove: this.closePopup, 15960 move: this._movePopup 15961 }); 15962 this._popupHandlersAdded = true; 15963 } 15964 15965 return this; 15966 }, 15967 15968 // @method unbindPopup(): this 15969 // Removes the popup previously bound with `bindPopup`. 15970 unbindPopup: function () { 15971 if (this._popup) { 15972 this.off({ 15973 click: this._openPopup, 15974 keypress: this._onKeyPress, 15975 remove: this.closePopup, 15976 move: this._movePopup 15977 }); 15978 this._popupHandlersAdded = false; 15979 this._popup = null; 15980 } 15981 return this; 15982 }, 15983 15984 // @method openPopup(latlng?: LatLng): this 15985 // Opens the bound popup at the specified `latlng` or at the default popup anchor if no `latlng` is passed. 15986 openPopup: function (latlng) { 15987 if (this._popup && this._popup._prepareOpen(latlng)) { 15988 // open the popup on the map 15989 this._popup.openOn(this._map); 15990 } 15991 return this; 15992 }, 15993 15994 // @method closePopup(): this 15995 // Closes the popup bound to this layer if it is open. 15996 closePopup: function () { 15997 if (this._popup) { 15998 this._popup.close(); 15999 } 16000 return this; 16001 }, 16002 16003 // @method togglePopup(): this 16004 // Opens or closes the popup bound to this layer depending on its current state. 16005 togglePopup: function () { 16006 if (this._popup) { 16007 this._popup.toggle(this); 16008 } 16009 return this; 16010 }, 16011 16012 // @method isPopupOpen(): boolean 16013 // Returns `true` if the popup bound to this layer is currently open. 16014 isPopupOpen: function () { 16015 return (this._popup ? this._popup.isOpen() : false); 16016 }, 16017 16018 // @method setPopupContent(content: String|HTMLElement|Popup): this 16019 // Sets the content of the popup bound to this layer. 16020 setPopupContent: function (content) { 16021 if (this._popup) { 16022 this._popup.setContent(content); 16023 } 16024 return this; 16025 }, 16026 16027 // @method getPopup(): Popup 16028 // Returns the popup bound to this layer. 16029 getPopup: function () { 16030 return this._popup; 16031 }, 16032 16033 _openPopup: function (e) { 16034 if (!this._popup || !this._map) { 16035 return; 16036 } 16037 // prevent map click 16038 stop(e); 16039 16040 var target = e.layer || e.target; 16041 if (this._popup._source === target && !(target instanceof Path)) { 16042 // treat it like a marker and figure out 16043 // if we should toggle it open/closed 16044 if (this._map.hasLayer(this._popup)) { 16045 this.closePopup(); 16046 } else { 16047 this.openPopup(e.latlng); 16048 } 16049 return; 16050 } 16051 this._popup._source = target; 16052 this.openPopup(e.latlng); 16053 }, 16054 16055 _movePopup: function (e) { 16056 this._popup.setLatLng(e.latlng); 16057 }, 16058 16059 _onKeyPress: function (e) { 16060 if (e.originalEvent.keyCode === 13) { 16061 this._openPopup(e); 16062 } 16063 } 16064 }); 16065 16066 /* 16067 * @class Tooltip 16068 * @inherits DivOverlay 16069 * @aka L.Tooltip 16070 * Used to display small texts on top of map layers. 16071 * 16072 * @example 16073 * 16074 * ```js 16075 * marker.bindTooltip("my tooltip text").openTooltip(); 16076 * ``` 16077 * Note about tooltip offset. Leaflet takes two options in consideration 16078 * for computing tooltip offsetting: 16079 * - the `offset` Tooltip option: it defaults to [0, 0], and it's specific to one tooltip. 16080 * Add a positive x offset to move the tooltip to the right, and a positive y offset to 16081 * move it to the bottom. Negatives will move to the left and top. 16082 * - the `tooltipAnchor` Icon option: this will only be considered for Marker. You 16083 * should adapt this value if you use a custom icon. 16084 */ 16085 16086 16087 // @namespace Tooltip 16088 var Tooltip = DivOverlay.extend({ 16089 16090 // @section 16091 // @aka Tooltip options 16092 options: { 16093 // @option pane: String = 'tooltipPane' 16094 // `Map pane` where the tooltip will be added. 16095 pane: 'tooltipPane', 16096 16097 // @option offset: Point = Point(0, 0) 16098 // Optional offset of the tooltip position. 16099 offset: [0, 0], 16100 16101 // @option direction: String = 'auto' 16102 // Direction where to open the tooltip. Possible values are: `right`, `left`, 16103 // `top`, `bottom`, `center`, `auto`. 16104 // `auto` will dynamically switch between `right` and `left` according to the tooltip 16105 // position on the map. 16106 direction: 'auto', 16107 16108 // @option permanent: Boolean = false 16109 // Whether to open the tooltip permanently or only on mouseover. 16110 permanent: false, 16111 16112 // @option sticky: Boolean = false 16113 // If true, the tooltip will follow the mouse instead of being fixed at the feature center. 16114 sticky: false, 16115 16116 // @option opacity: Number = 0.9 16117 // Tooltip container opacity. 16118 opacity: 0.9 16119 }, 16120 16121 onAdd: function (map) { 16122 DivOverlay.prototype.onAdd.call(this, map); 16123 this.setOpacity(this.options.opacity); 16124 16125 // @namespace Map 16126 // @section Tooltip events 16127 // @event tooltipopen: TooltipEvent 16128 // Fired when a tooltip is opened in the map. 16129 map.fire('tooltipopen', {tooltip: this}); 16130 16131 if (this._source) { 16132 this.addEventParent(this._source); 16133 16134 // @namespace Layer 16135 // @section Tooltip events 16136 // @event tooltipopen: TooltipEvent 16137 // Fired when a tooltip bound to this layer is opened. 16138 this._source.fire('tooltipopen', {tooltip: this}, true); 16139 } 16140 }, 16141 16142 onRemove: function (map) { 16143 DivOverlay.prototype.onRemove.call(this, map); 16144 16145 // @namespace Map 16146 // @section Tooltip events 16147 // @event tooltipclose: TooltipEvent 16148 // Fired when a tooltip in the map is closed. 16149 map.fire('tooltipclose', {tooltip: this}); 16150 16151 if (this._source) { 16152 this.removeEventParent(this._source); 16153 16154 // @namespace Layer 16155 // @section Tooltip events 16156 // @event tooltipclose: TooltipEvent 16157 // Fired when a tooltip bound to this layer is closed. 16158 this._source.fire('tooltipclose', {tooltip: this}, true); 16159 } 16160 }, 16161 16162 getEvents: function () { 16163 var events = DivOverlay.prototype.getEvents.call(this); 16164 16165 if (!this.options.permanent) { 16166 events.preclick = this.close; 16167 } 16168 16169 return events; 16170 }, 16171 16172 _initLayout: function () { 16173 var prefix = 'leaflet-tooltip', 16174 className = prefix + ' ' + (this.options.className || '') + ' leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide'); 16175 16176 this._contentNode = this._container = create$1('div', className); 16177 }, 16178 16179 _updateLayout: function () {}, 16180 16181 _adjustPan: function () {}, 16182 16183 _setPosition: function (pos) { 16184 var subX, subY, 16185 map = this._map, 16186 container = this._container, 16187 centerPoint = map.latLngToContainerPoint(map.getCenter()), 16188 tooltipPoint = map.layerPointToContainerPoint(pos), 16189 direction = this.options.direction, 16190 tooltipWidth = container.offsetWidth, 16191 tooltipHeight = container.offsetHeight, 16192 offset = toPoint(this.options.offset), 16193 anchor = this._getAnchor(); 16194 16195 if (direction === 'top') { 16196 subX = tooltipWidth / 2; 16197 subY = tooltipHeight; 16198 } else if (direction === 'bottom') { 16199 subX = tooltipWidth / 2; 16200 subY = 0; 16201 } else if (direction === 'center') { 16202 subX = tooltipWidth / 2; 16203 subY = tooltipHeight / 2; 16204 } else if (direction === 'right') { 16205 subX = 0; 16206 subY = tooltipHeight / 2; 16207 } else if (direction === 'left') { 16208 subX = tooltipWidth; 16209 subY = tooltipHeight / 2; 16210 } else if (tooltipPoint.x < centerPoint.x) { 16211 direction = 'right'; 16212 subX = 0; 16213 subY = tooltipHeight / 2; 16214 } else { 16215 direction = 'left'; 16216 subX = tooltipWidth + (offset.x + anchor.x) * 2; 16217 subY = tooltipHeight / 2; 16218 } 16219 16220 pos = pos.subtract(toPoint(subX, subY, true)).add(offset).add(anchor); 16221 16222 removeClass(container, 'leaflet-tooltip-right'); 16223 removeClass(container, 'leaflet-tooltip-left'); 16224 removeClass(container, 'leaflet-tooltip-top'); 16225 removeClass(container, 'leaflet-tooltip-bottom'); 16226 addClass(container, 'leaflet-tooltip-' + direction); 16227 setPosition(container, pos); 16228 }, 16229 16230 _updatePosition: function () { 16231 var pos = this._map.latLngToLayerPoint(this._latlng); 16232 this._setPosition(pos); 16233 }, 16234 16235 setOpacity: function (opacity) { 16236 this.options.opacity = opacity; 16237 16238 if (this._container) { 16239 setOpacity(this._container, opacity); 16240 } 16241 }, 16242 16243 _animateZoom: function (e) { 16244 var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center); 16245 this._setPosition(pos); 16246 }, 16247 16248 _getAnchor: function () { 16249 // Where should we anchor the tooltip on the source layer? 16250 return toPoint(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]); 16251 } 16252 16253 }); 16254 16255 // @namespace Tooltip 16256 // @factory L.tooltip(options?: Tooltip options, source?: Layer) 16257 // Instantiates a Tooltip object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the tooltip with a reference to the Layer to which it refers. 16258 var tooltip = function (options, source) { 16259 return new Tooltip(options, source); 16260 }; 16261 16262 // @namespace Map 16263 // @section Methods for Layers and Controls 16264 Map.include({ 16265 16266 // @method openTooltip(tooltip: Tooltip): this 16267 // Opens the specified tooltip. 16268 // @alternative 16269 // @method openTooltip(content: String|HTMLElement, latlng: LatLng, options?: Tooltip options): this 16270 // Creates a tooltip with the specified content and options and open it. 16271 openTooltip: function (tooltip, latlng, options) { 16272 this._initOverlay(Tooltip, tooltip, latlng, options) 16273 .openOn(this); 16274 16275 return this; 16276 }, 16277 16278 // @method closeTooltip(tooltip: Tooltip): this 16279 // Closes the tooltip given as parameter. 16280 closeTooltip: function (tooltip) { 16281 tooltip.close(); 16282 return this; 16283 } 16284 16285 }); 16286 16287 /* 16288 * @namespace Layer 16289 * @section Tooltip methods example 16290 * 16291 * All layers share a set of methods convenient for binding tooltips to it. 16292 * 16293 * ```js 16294 * var layer = L.Polygon(latlngs).bindTooltip('Hi There!').addTo(map); 16295 * layer.openTooltip(); 16296 * layer.closeTooltip(); 16297 * ``` 16298 */ 16299 16300 // @section Tooltip methods 16301 Layer.include({ 16302 16303 // @method bindTooltip(content: String|HTMLElement|Function|Tooltip, options?: Tooltip options): this 16304 // Binds a tooltip to the layer with the passed `content` and sets up the 16305 // necessary event listeners. If a `Function` is passed it will receive 16306 // the layer as the first argument and should return a `String` or `HTMLElement`. 16307 bindTooltip: function (content, options) { 16308 16309 if (this._tooltip && this.isTooltipOpen()) { 16310 this.unbindTooltip(); 16311 } 16312 16313 this._tooltip = this._initOverlay(Tooltip, this._tooltip, content, options); 16314 this._initTooltipInteractions(); 16315 16316 if (this._tooltip.options.permanent && this._map && this._map.hasLayer(this)) { 16317 this.openTooltip(); 16318 } 16319 16320 return this; 16321 }, 16322 16323 // @method unbindTooltip(): this 16324 // Removes the tooltip previously bound with `bindTooltip`. 16325 unbindTooltip: function () { 16326 if (this._tooltip) { 16327 this._initTooltipInteractions(true); 16328 this.closeTooltip(); 16329 this._tooltip = null; 16330 } 16331 return this; 16332 }, 16333 16334 _initTooltipInteractions: function (remove) { 16335 if (!remove && this._tooltipHandlersAdded) { return; } 16336 var onOff = remove ? 'off' : 'on', 16337 events = { 16338 remove: this.closeTooltip, 16339 move: this._moveTooltip 16340 }; 16341 if (!this._tooltip.options.permanent) { 16342 events.mouseover = this._openTooltip; 16343 events.mouseout = this.closeTooltip; 16344 events.click = this._openTooltip; 16345 } else { 16346 events.add = this._openTooltip; 16347 } 16348 if (this._tooltip.options.sticky) { 16349 events.mousemove = this._moveTooltip; 16350 } 16351 this[onOff](events); 16352 this._tooltipHandlersAdded = !remove; 16353 }, 16354 16355 // @method openTooltip(latlng?: LatLng): this 16356 // Opens the bound tooltip at the specified `latlng` or at the default tooltip anchor if no `latlng` is passed. 16357 openTooltip: function (latlng) { 16358 if (this._tooltip && this._tooltip._prepareOpen(latlng)) { 16359 // open the tooltip on the map 16360 this._tooltip.openOn(this._map); 16361 } 16362 return this; 16363 }, 16364 16365 // @method closeTooltip(): this 16366 // Closes the tooltip bound to this layer if it is open. 16367 closeTooltip: function () { 16368 if (this._tooltip) { 16369 return this._tooltip.close(); 16370 } 16371 }, 16372 16373 // @method toggleTooltip(): this 16374 // Opens or closes the tooltip bound to this layer depending on its current state. 16375 toggleTooltip: function () { 16376 if (this._tooltip) { 16377 this._tooltip.toggle(this); 16378 } 16379 return this; 16380 }, 16381 16382 // @method isTooltipOpen(): boolean 16383 // Returns `true` if the tooltip bound to this layer is currently open. 16384 isTooltipOpen: function () { 16385 return this._tooltip.isOpen(); 16386 }, 16387 16388 // @method setTooltipContent(content: String|HTMLElement|Tooltip): this 16389 // Sets the content of the tooltip bound to this layer. 16390 setTooltipContent: function (content) { 16391 if (this._tooltip) { 16392 this._tooltip.setContent(content); 16393 } 16394 return this; 16395 }, 16396 16397 // @method getTooltip(): Tooltip 16398 // Returns the tooltip bound to this layer. 16399 getTooltip: function () { 16400 return this._tooltip; 16401 }, 16402 16403 _openTooltip: function (e) { 16404 if (!this._tooltip || !this._map || (this._map.dragging && this._map.dragging.moving())) { 16405 return; 16406 }
vendor: 29,458 bytes, lines 16406-17421
16406 16407 this._tooltip._source = e.layer || e.target; 16408 16409 this.openTooltip(this._tooltip.options.sticky ? e.latlng : undefined); 16410 }, 16411 16412 _moveTooltip: function (e) { 16413 var latlng = e.latlng, containerPoint, layerPoint; 16414 if (this._tooltip.options.sticky && e.originalEvent) { 16415 containerPoint = this._map.mouseEventToContainerPoint(e.originalEvent); 16416 layerPoint = this._map.containerPointToLayerPoint(containerPoint); 16417 latlng = this._map.layerPointToLatLng(layerPoint); 16418 } 16419 this._tooltip.setLatLng(latlng); 16420 } 16421 }); 16422 16423 /* 16424 * @class DivIcon 16425 * @aka L.DivIcon 16426 * @inherits Icon 16427 * 16428 * Represents a lightweight icon for markers that uses a simple `<div>` 16429 * element instead of an image. Inherits from `Icon` but ignores the `iconUrl` and shadow options. 16430 * 16431 * @example 16432 * ```js 16433 * var myIcon = L.divIcon({className: 'my-div-icon'}); 16434 * // you can set .my-div-icon styles in CSS 16435 * 16436 * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map); 16437 * ``` 16438 * 16439 * By default, it has a 'leaflet-div-icon' CSS class and is styled as a little white square with a shadow. 16440 */ 16441 16442 var DivIcon = Icon.extend({ 16443 options: { 16444 // @section 16445 // @aka DivIcon options 16446 iconSize: [12, 12], // also can be set through CSS 16447 16448 // iconAnchor: (Point), 16449 // popupAnchor: (Point), 16450 16451 // @option html: String|HTMLElement = '' 16452 // Custom HTML code to put inside the div element, empty by default. Alternatively, 16453 // an instance of `HTMLElement`. 16454 html: false, 16455 16456 // @option bgPos: Point = [0, 0] 16457 // Optional relative position of the background, in pixels 16458 bgPos: null, 16459 16460 className: 'leaflet-div-icon' 16461 }, 16462 16463 createIcon: function (oldIcon) { 16464 var div = (oldIcon && oldIcon.tagName === 'DIV') ? oldIcon : document.createElement('div'), 16465 options = this.options; 16466 16467 if (options.html instanceof Element) { 16468 empty(div); 16469 div.appendChild(options.html); 16470 } else { 16471 div.innerHTML = options.html !== false ? options.html : ''; 16472 } 16473 16474 if (options.bgPos) { 16475 var bgPos = toPoint(options.bgPos); 16476 div.style.backgroundPosition = (-bgPos.x) + 'px ' + (-bgPos.y) + 'px'; 16477 } 16478 this._setIconStyles(div, 'icon'); 16479 16480 return div; 16481 }, 16482 16483 createShadow: function () { 16484 return null; 16485 } 16486 }); 16487 16488 // @factory L.divIcon(options: DivIcon options) 16489 // Creates a `DivIcon` instance with the given options. 16490 function divIcon(options) { 16491 return new DivIcon(options); 16492 } 16493 16494 Icon.Default = IconDefault; 16495 16496 /* 16497 * @class GridLayer 16498 * @inherits Layer 16499 * @aka L.GridLayer 16500 * 16501 * Generic class for handling a tiled grid of HTML elements. This is the base class for all tile layers and replaces `TileLayer.Canvas`. 16502 * GridLayer can be extended to create a tiled grid of HTML elements like `<canvas>`, `<img>` or `<div>`. GridLayer will handle creating and animating these DOM elements for you. 16503 * 16504 * 16505 * @section Synchronous usage 16506 * @example 16507 * 16508 * To create a custom layer, extend GridLayer and implement the `createTile()` method, which will be passed a `Point` object with the `x`, `y`, and `z` (zoom level) coordinates to draw your tile. 16509 * 16510 * ```js 16511 * var CanvasLayer = L.GridLayer.extend({ 16512 * createTile: function(coords){ 16513 * // create a <canvas> element for drawing 16514 * var tile = L.DomUtil.create('canvas', 'leaflet-tile'); 16515 * 16516 * // setup tile width and height according to the options 16517 * var size = this.getTileSize(); 16518 * tile.width = size.x; 16519 * tile.height = size.y; 16520 * 16521 * // get a canvas context and draw something on it using coords.x, coords.y and coords.z 16522 * var ctx = tile.getContext('2d'); 16523 * 16524 * // return the tile so it can be rendered on screen 16525 * return tile; 16526 * } 16527 * }); 16528 * ``` 16529 * 16530 * @section Asynchronous usage 16531 * @example 16532 * 16533 * Tile creation can also be asynchronous, this is useful when using a third-party drawing library. Once the tile is finished drawing it can be passed to the `done()` callback. 16534 * 16535 * ```js 16536 * var CanvasLayer = L.GridLayer.extend({ 16537 * createTile: function(coords, done){ 16538 * var error; 16539 * 16540 * // create a <canvas> element for drawing 16541 * var tile = L.DomUtil.create('canvas', 'leaflet-tile'); 16542 * 16543 * // setup tile width and height according to the options 16544 * var size = this.getTileSize(); 16545 * tile.width = size.x; 16546 * tile.height = size.y; 16547 * 16548 * // draw something asynchronously and pass the tile to the done() callback 16549 * setTimeout(function() { 16550 * done(error, tile); 16551 * }, 1000); 16552 * 16553 * return tile; 16554 * } 16555 * }); 16556 * ``` 16557 * 16558 * @section 16559 */ 16560 16561 16562 var GridLayer = Layer.extend({ 16563 16564 // @section 16565 // @aka GridLayer options 16566 options: { 16567 // @option tileSize: Number|Point = 256 16568 // Width and height of tiles in the grid. Use a number if width and height are equal, or `L.point(width, height)` otherwise. 16569 tileSize: 256, 16570 16571 // @option opacity: Number = 1.0 16572 // Opacity of the tiles. Can be used in the `createTile()` function. 16573 opacity: 1, 16574 16575 // @option updateWhenIdle: Boolean = (depends) 16576 // Load new tiles only when panning ends. 16577 // `true` by default on mobile browsers, in order to avoid too many requests and keep smooth navigation. 16578 // `false` otherwise in order to display new tiles _during_ panning, since it is easy to pan outside the 16579 // [`keepBuffer`](#gridlayer-keepbuffer) option in desktop browsers. 16580 updateWhenIdle: Browser.mobile, 16581 16582 // @option updateWhenZooming: Boolean = true 16583 // By default, a smooth zoom animation (during a [touch zoom](#map-touchzoom) or a [`flyTo()`](#map-flyto)) will update grid layers every integer zoom level. Setting this option to `false` will update the grid layer only when the smooth animation ends. 16584 updateWhenZooming: true, 16585 16586 // @option updateInterval: Number = 200 16587 // Tiles will not update more than once every `updateInterval` milliseconds when panning. 16588 updateInterval: 200, 16589 16590 // @option zIndex: Number = 1 16591 // The explicit zIndex of the tile layer. 16592 zIndex: 1, 16593 16594 // @option bounds: LatLngBounds = undefined 16595 // If set, tiles will only be loaded inside the set `LatLngBounds`. 16596 bounds: null, 16597 16598 // @option minZoom: Number = 0 16599 // The minimum zoom level down to which this layer will be displayed (inclusive). 16600 minZoom: 0, 16601 16602 // @option maxZoom: Number = undefined 16603 // The maximum zoom level up to which this layer will be displayed (inclusive). 16604 maxZoom: undefined, 16605 16606 // @option maxNativeZoom: Number = undefined 16607 // Maximum zoom number the tile source has available. If it is specified, 16608 // the tiles on all zoom levels higher than `maxNativeZoom` will be loaded 16609 // from `maxNativeZoom` level and auto-scaled. 16610 maxNativeZoom: undefined, 16611 16612 // @option minNativeZoom: Number = undefined 16613 // Minimum zoom number the tile source has available. If it is specified, 16614 // the tiles on all zoom levels lower than `minNativeZoom` will be loaded 16615 // from `minNativeZoom` level and auto-scaled. 16616 minNativeZoom: undefined, 16617 16618 // @option noWrap: Boolean = false 16619 // Whether the layer is wrapped around the antimeridian. If `true`, the 16620 // GridLayer will only be displayed once at low zoom levels. Has no 16621 // effect when the [map CRS](#map-crs) doesn't wrap around. Can be used 16622 // in combination with [`bounds`](#gridlayer-bounds) to prevent requesting 16623 // tiles outside the CRS limits. 16624 noWrap: false, 16625 16626 // @option pane: String = 'tilePane' 16627 // `Map pane` where the grid layer will be added. 16628 pane: 'tilePane', 16629 16630 // @option className: String = '' 16631 // A custom class name to assign to the tile layer. Empty by default. 16632 className: '', 16633 16634 // @option keepBuffer: Number = 2 16635 // When panning the map, keep this many rows and columns of tiles before unloading them. 16636 keepBuffer: 2 16637 }, 16638 16639 initialize: function (options) { 16640 setOptions(this, options); 16641 }, 16642 16643 onAdd: function () { 16644 this._initContainer(); 16645 16646 this._levels = {}; 16647 this._tiles = {}; 16648 16649 this._resetView(); // implicit _update() call 16650 }, 16651 16652 beforeAdd: function (map) { 16653 map._addZoomLimit(this); 16654 }, 16655 16656 onRemove: function (map) { 16657 this._removeAllTiles(); 16658 remove(this._container); 16659 map._removeZoomLimit(this); 16660 this._container = null; 16661 this._tileZoom = undefined; 16662 }, 16663 16664 // @method bringToFront: this 16665 // Brings the tile layer to the top of all tile layers. 16666 bringToFront: function () { 16667 if (this._map) { 16668 toFront(this._container); 16669 this._setAutoZIndex(Math.max); 16670 } 16671 return this; 16672 }, 16673 16674 // @method bringToBack: this 16675 // Brings the tile layer to the bottom of all tile layers. 16676 bringToBack: function () { 16677 if (this._map) { 16678 toBack(this._container); 16679 this._setAutoZIndex(Math.min); 16680 } 16681 return this; 16682 }, 16683 16684 // @method getContainer: HTMLElement 16685 // Returns the HTML element that contains the tiles for this layer. 16686 getContainer: function () { 16687 return this._container; 16688 }, 16689 16690 // @method setOpacity(opacity: Number): this 16691 // Changes the [opacity](#gridlayer-opacity) of the grid layer. 16692 setOpacity: function (opacity) { 16693 this.options.opacity = opacity; 16694 this._updateOpacity(); 16695 return this; 16696 }, 16697 16698 // @method setZIndex(zIndex: Number): this 16699 // Changes the [zIndex](#gridlayer-zindex) of the grid layer. 16700 setZIndex: function (zIndex) { 16701 this.options.zIndex = zIndex; 16702 this._updateZIndex(); 16703 16704 return this; 16705 }, 16706 16707 // @method isLoading: Boolean 16708 // Returns `true` if any tile in the grid layer has not finished loading. 16709 isLoading: function () { 16710 return this._loading; 16711 }, 16712 16713 // @method redraw: this 16714 // Causes the layer to clear all the tiles and request them again. 16715 redraw: function () { 16716 if (this._map) { 16717 this._removeAllTiles(); 16718 var tileZoom = this._clampZoom(this._map.getZoom()); 16719 if (tileZoom !== this._tileZoom) { 16720 this._tileZoom = tileZoom; 16721 this._updateLevels(); 16722 } 16723 this._update(); 16724 } 16725 return this; 16726 }, 16727 16728 getEvents: function () { 16729 var events = { 16730 viewprereset: this._invalidateAll, 16731 viewreset: this._resetView, 16732 zoom: this._resetView, 16733 moveend: this._onMoveEnd 16734 }; 16735 16736 if (!this.options.updateWhenIdle) { 16737 // update tiles on move, but not more often than once per given interval 16738 if (!this._onMove) { 16739 this._onMove = throttle(this._onMoveEnd, this.options.updateInterval, this); 16740 } 16741 16742 events.move = this._onMove; 16743 } 16744 16745 if (this._zoomAnimated) { 16746 events.zoomanim = this._animateZoom; 16747 } 16748 16749 return events; 16750 }, 16751 16752 // @section Extension methods 16753 // Layers extending `GridLayer` shall reimplement the following method. 16754 // @method createTile(coords: Object, done?: Function): HTMLElement 16755 // Called only internally, must be overridden by classes extending `GridLayer`. 16756 // Returns the `HTMLElement` corresponding to the given `coords`. If the `done` callback 16757 // is specified, it must be called when the tile has finished loading and drawing. 16758 createTile: function () { 16759 return document.createElement('div'); 16760 }, 16761 16762 // @section 16763 // @method getTileSize: Point 16764 // Normalizes the [tileSize option](#gridlayer-tilesize) into a point. Used by the `createTile()` method. 16765 getTileSize: function () { 16766 var s = this.options.tileSize; 16767 return s instanceof Point ? s : new Point(s, s); 16768 }, 16769 16770 _updateZIndex: function () { 16771 if (this._container && this.options.zIndex !== undefined && this.options.zIndex !== null) { 16772 this._container.style.zIndex = this.options.zIndex; 16773 } 16774 }, 16775 16776 _setAutoZIndex: function (compare) { 16777 // go through all other layers of the same pane, set zIndex to max + 1 (front) or min - 1 (back) 16778 16779 var layers = this.getPane().children, 16780 edgeZIndex = -compare(-Infinity, Infinity); // -Infinity for max, Infinity for min 16781 16782 for (var i = 0, len = layers.length, zIndex; i < len; i++) { 16783 16784 zIndex = layers[i].style.zIndex; 16785 16786 if (layers[i] !== this._container && zIndex) { 16787 edgeZIndex = compare(edgeZIndex, +zIndex); 16788 } 16789 } 16790 16791 if (isFinite(edgeZIndex)) { 16792 this.options.zIndex = edgeZIndex + compare(-1, 1); 16793 this._updateZIndex(); 16794 } 16795 }, 16796 16797 _updateOpacity: function () { 16798 if (!this._map) { return; } 16799 16800 // IE doesn't inherit filter opacity properly, so we're forced to set it on tiles 16801 if (Browser.ielt9) { return; } 16802 16803 setOpacity(this._container, this.options.opacity); 16804 16805 var now = +new Date(), 16806 nextFrame = false, 16807 willPrune = false; 16808 16809 for (var key in this._tiles) { 16810 var tile = this._tiles[key]; 16811 if (!tile.current || !tile.loaded) { continue; } 16812 16813 var fade = Math.min(1, (now - tile.loaded) / 200); 16814 16815 setOpacity(tile.el, fade); 16816 if (fade < 1) { 16817 nextFrame = true; 16818 } else { 16819 if (tile.active) { 16820 willPrune = true; 16821 } else { 16822 this._onOpaqueTile(tile); 16823 } 16824 tile.active = true; 16825 } 16826 } 16827 16828 if (willPrune && !this._noPrune) { this._pruneTiles(); } 16829 16830 if (nextFrame) { 16831 cancelAnimFrame(this._fadeFrame); 16832 this._fadeFrame = requestAnimFrame(this._updateOpacity, this); 16833 } 16834 }, 16835 16836 _onOpaqueTile: falseFn, 16837 16838 _initContainer: function () { 16839 if (this._container) { return; } 16840 16841 this._container = create$1('div', 'leaflet-layer ' + (this.options.className || '')); 16842 this._updateZIndex(); 16843 16844 if (this.options.opacity < 1) { 16845 this._updateOpacity(); 16846 } 16847 16848 this.getPane().appendChild(this._container); 16849 }, 16850 16851 _updateLevels: function () { 16852 16853 var zoom = this._tileZoom, 16854 maxZoom = this.options.maxZoom; 16855 16856 if (zoom === undefined) { return undefined; } 16857 16858 for (var z in this._levels) { 16859 z = Number(z); 16860 if (this._levels[z].el.children.length || z === zoom) { 16861 this._levels[z].el.style.zIndex = maxZoom - Math.abs(zoom - z); 16862 this._onUpdateLevel(z); 16863 } else { 16864 remove(this._levels[z].el); 16865 this._removeTilesAtZoom(z); 16866 this._onRemoveLevel(z); 16867 delete this._levels[z]; 16868 } 16869 } 16870 16871 var level = this._levels[zoom], 16872 map = this._map; 16873 16874 if (!level) { 16875 level = this._levels[zoom] = {}; 16876 16877 level.el = create$1('div', 'leaflet-tile-container leaflet-zoom-animated', this._container); 16878 level.el.style.zIndex = maxZoom; 16879 16880 level.origin = map.project(map.unproject(map.getPixelOrigin()), zoom).round(); 16881 level.zoom = zoom; 16882 16883 this._setZoomTransform(level, map.getCenter(), map.getZoom()); 16884 16885 // force the browser to consider the newly added element for transition 16886 falseFn(level.el.offsetWidth); 16887 16888 this._onCreateLevel(level); 16889 } 16890 16891 this._level = level; 16892 16893 return level; 16894 }, 16895 16896 _onUpdateLevel: falseFn, 16897 16898 _onRemoveLevel: falseFn, 16899 16900 _onCreateLevel: falseFn, 16901 16902 _pruneTiles: function () { 16903 if (!this._map) { 16904 return; 16905 } 16906 16907 var key, tile; 16908 16909 var zoom = this._map.getZoom(); 16910 if (zoom > this.options.maxZoom || 16911 zoom < this.options.minZoom) { 16912 this._removeAllTiles(); 16913 return; 16914 } 16915 16916 for (key in this._tiles) { 16917 tile = this._tiles[key]; 16918 tile.retain = tile.current; 16919 } 16920 16921 for (key in this._tiles) { 16922 tile = this._tiles[key]; 16923 if (tile.current && !tile.active) { 16924 var coords = tile.coords; 16925 if (!this._retainParent(coords.x, coords.y, coords.z, coords.z - 5)) { 16926 this._retainChildren(coords.x, coords.y, coords.z, coords.z + 2); 16927 } 16928 } 16929 } 16930 16931 for (key in this._tiles) { 16932 if (!this._tiles[key].retain) { 16933 this._removeTile(key); 16934 } 16935 } 16936 }, 16937 16938 _removeTilesAtZoom: function (zoom) { 16939 for (var key in this._tiles) { 16940 if (this._tiles[key].coords.z !== zoom) { 16941 continue; 16942 } 16943 this._removeTile(key); 16944 } 16945 }, 16946 16947 _removeAllTiles: function () { 16948 for (var key in this._tiles) { 16949 this._removeTile(key); 16950 } 16951 }, 16952 16953 _invalidateAll: function () { 16954 for (var z in this._levels) { 16955 remove(this._levels[z].el); 16956 this._onRemoveLevel(Number(z)); 16957 delete this._levels[z]; 16958 } 16959 this._removeAllTiles(); 16960 16961 this._tileZoom = undefined; 16962 }, 16963 16964 _retainParent: function (x, y, z, minZoom) { 16965 var x2 = Math.floor(x / 2), 16966 y2 = Math.floor(y / 2), 16967 z2 = z - 1, 16968 coords2 = new Point(+x2, +y2); 16969 coords2.z = +z2; 16970 16971 var key = this._tileCoordsToKey(coords2), 16972 tile = this._tiles[key]; 16973 16974 if (tile && tile.active) { 16975 tile.retain = true; 16976 return true; 16977 16978 } else if (tile && tile.loaded) { 16979 tile.retain = true; 16980 } 16981 16982 if (z2 > minZoom) { 16983 return this._retainParent(x2, y2, z2, minZoom); 16984 } 16985 16986 return false; 16987 }, 16988 16989 _retainChildren: function (x, y, z, maxZoom) { 16990 16991 for (var i = 2 * x; i < 2 * x + 2; i++) { 16992 for (var j = 2 * y; j < 2 * y + 2; j++) { 16993 16994 var coords = new Point(i, j); 16995 coords.z = z + 1; 16996 16997 var key = this._tileCoordsToKey(coords), 16998 tile = this._tiles[key]; 16999 17000 if (tile && tile.active) { 17001 tile.retain = true; 17002 continue; 17003 17004 } else if (tile && tile.loaded) { 17005 tile.retain = true; 17006 } 17007 17008 if (z + 1 < maxZoom) { 17009 this._retainChildren(i, j, z + 1, maxZoom); 17010 } 17011 } 17012 } 17013 }, 17014 17015 _resetView: function (e) { 17016 var animating = e && (e.pinch || e.flyTo); 17017 this._setView(this._map.getCenter(), this._map.getZoom(), animating, animating); 17018 }, 17019 17020 _animateZoom: function (e) { 17021 this._setView(e.center, e.zoom, true, e.noUpdate); 17022 }, 17023 17024 _clampZoom: function (zoom) { 17025 var options = this.options; 17026 17027 if (undefined !== options.minNativeZoom && zoom < options.minNativeZoom) { 17028 return options.minNativeZoom; 17029 } 17030 17031 if (undefined !== options.maxNativeZoom && options.maxNativeZoom < zoom) { 17032 return options.maxNativeZoom; 17033 } 17034 17035 return zoom; 17036 }, 17037 17038 _setView: function (center, zoom, noPrune, noUpdate) { 17039 var tileZoom = Math.round(zoom); 17040 if ((this.options.maxZoom !== undefined && tileZoom > this.options.maxZoom) || 17041 (this.options.minZoom !== undefined && tileZoom < this.options.minZoom)) { 17042 tileZoom = undefined; 17043 } else { 17044 tileZoom = this._clampZoom(tileZoom); 17045 } 17046 17047 var tileZoomChanged = this.options.updateWhenZooming && (tileZoom !== this._tileZoom); 17048 17049 if (!noUpdate || tileZoomChanged) { 17050 17051 this._tileZoom = tileZoom; 17052 17053 if (this._abortLoading) { 17054 this._abortLoading(); 17055 } 17056 17057 this._updateLevels(); 17058 this._resetGrid(); 17059 17060 if (tileZoom !== undefined) { 17061 this._update(center); 17062 } 17063 17064 if (!noPrune) { 17065 this._pruneTiles(); 17066 } 17067 17068 // Flag to prevent _updateOpacity from pruning tiles during 17069 // a zoom anim or a pinch gesture 17070 this._noPrune = !!noPrune; 17071 } 17072 17073 this._setZoomTransforms(center, zoom); 17074 }, 17075 17076 _setZoomTransforms: function (center, zoom) { 17077 for (var i in this._levels) { 17078 this._setZoomTransform(this._levels[i], center, zoom); 17079 } 17080 }, 17081 17082 _setZoomTransform: function (level, center, zoom) { 17083 var scale = this._map.getZoomScale(zoom, level.zoom), 17084 translate = level.origin.multiplyBy(scale) 17085 .subtract(this._map._getNewPixelOrigin(center, zoom)).round(); 17086 17087 if (Browser.any3d) { 17088 setTransform(level.el, translate, scale); 17089 } else { 17090 setPosition(level.el, translate); 17091 } 17092 }, 17093 17094 _resetGrid: function () { 17095 var map = this._map, 17096 crs = map.options.crs, 17097 tileSize = this._tileSize = this.getTileSize(), 17098 tileZoom = this._tileZoom; 17099 17100 var bounds = this._map.getPixelWorldBounds(this._tileZoom); 17101 if (bounds) { 17102 this._globalTileRange = this._pxBoundsToTileRange(bounds); 17103 } 17104 17105 this._wrapX = crs.wrapLng && !this.options.noWrap && [ 17106 Math.floor(map.project([0, crs.wrapLng[0]], tileZoom).x / tileSize.x), 17107 Math.ceil(map.project([0, crs.wrapLng[1]], tileZoom).x / tileSize.y) 17108 ]; 17109 this._wrapY = crs.wrapLat && !this.options.noWrap && [ 17110 Math.floor(map.project([crs.wrapLat[0], 0], tileZoom).y / tileSize.x), 17111 Math.ceil(map.project([crs.wrapLat[1], 0], tileZoom).y / tileSize.y) 17112 ]; 17113 }, 17114 17115 _onMoveEnd: function () { 17116 if (!this._map || this._map._animatingZoom) { return; } 17117 17118 this._update(); 17119 }, 17120 17121 _getTiledPixelBounds: function (center) { 17122 var map = this._map, 17123 mapZoom = map._animatingZoom ? Math.max(map._animateToZoom, map.getZoom()) : map.getZoom(), 17124 scale = map.getZoomScale(mapZoom, this._tileZoom), 17125 pixelCenter = map.project(center, this._tileZoom).floor(), 17126 halfSize = map.getSize().divideBy(scale * 2); 17127 17128 return new Bounds(pixelCenter.subtract(halfSize), pixelCenter.add(halfSize)); 17129 }, 17130 17131 // Private method to load tiles in the grid's active zoom level according to map bounds 17132 _update: function (center) { 17133 var map = this._map; 17134 if (!map) { return; } 17135 var zoom = this._clampZoom(map.getZoom()); 17136 17137 if (center === undefined) { center = map.getCenter(); } 17138 if (this._tileZoom === undefined) { return; } // if out of minzoom/maxzoom 17139 17140 var pixelBounds = this._getTiledPixelBounds(center), 17141 tileRange = this._pxBoundsToTileRange(pixelBounds), 17142 tileCenter = tileRange.getCenter(), 17143 queue = [], 17144 margin = this.options.keepBuffer, 17145 noPruneRange = new Bounds(tileRange.getBottomLeft().subtract([margin, -margin]), 17146 tileRange.getTopRight().add([margin, -margin])); 17147 17148 // Sanity check: panic if the tile range contains Infinity somewhere. 17149 if (!(isFinite(tileRange.min.x) && 17150 isFinite(tileRange.min.y) && 17151 isFinite(tileRange.max.x) && 17152 isFinite(tileRange.max.y))) { throw new Error('Attempted to load an infinite number of tiles'); } 17153 17154 for (var key in this._tiles) { 17155 var c = this._tiles[key].coords; 17156 if (c.z !== this._tileZoom || !noPruneRange.contains(new Point(c.x, c.y))) { 17157 this._tiles[key].current = false; 17158 } 17159 } 17160 17161 // _update just loads more tiles. If the tile zoom level differs too much 17162 // from the map's, let _setView reset levels and prune old tiles. 17163 if (Math.abs(zoom - this._tileZoom) > 1) { this._setView(center, zoom); return; } 17164 17165 // create a queue of coordinates to load tiles from 17166 for (var j = tileRange.min.y; j <= tileRange.max.y; j++) { 17167 for (var i = tileRange.min.x; i <= tileRange.max.x; i++) { 17168 var coords = new Point(i, j); 17169 coords.z = this._tileZoom; 17170 17171 if (!this._isValidTile(coords)) { continue; } 17172 17173 var tile = this._tiles[this._tileCoordsToKey(coords)]; 17174 if (tile) { 17175 tile.current = true; 17176 } else { 17177 queue.push(coords); 17178 } 17179 } 17180 } 17181 17182 // sort tile queue to load tiles in order of their distance to center 17183 queue.sort(function (a, b) { 17184 return a.distanceTo(tileCenter) - b.distanceTo(tileCenter); 17185 }); 17186 17187 if (queue.length !== 0) { 17188 // if it's the first batch of tiles to load 17189 if (!this._loading) { 17190 this._loading = true; 17191 // @event loading: Event 17192 // Fired when the grid layer starts loading tiles. 17193 this.fire('loading'); 17194 } 17195 17196 // create DOM fragment to append tiles in one batch 17197 var fragment = document.createDocumentFragment(); 17198 17199 for (i = 0; i < queue.length; i++) { 17200 this._addTile(queue[i], fragment); 17201 } 17202 17203 this._level.el.appendChild(fragment); 17204 } 17205 }, 17206 17207 _isValidTile: function (coords) { 17208 var crs = this._map.options.crs; 17209 17210 if (!crs.infinite) { 17211 // don't load tile if it's out of bounds and not wrapped 17212 var bounds = this._globalTileRange; 17213 if ((!crs.wrapLng && (coords.x < bounds.min.x || coords.x > bounds.max.x)) || 17214 (!crs.wrapLat && (coords.y < bounds.min.y || coords.y > bounds.max.y))) { return false; } 17215 } 17216 17217 if (!this.options.bounds) { return true; } 17218 17219 // don't load tile if it doesn't intersect the bounds in options 17220 var tileBounds = this._tileCoordsToBounds(coords); 17221 return toLatLngBounds(this.options.bounds).overlaps(tileBounds); 17222 }, 17223 17224 _keyToBounds: function (key) { 17225 return this._tileCoordsToBounds(this._keyToTileCoords(key)); 17226 }, 17227 17228 _tileCoordsToNwSe: function (coords) { 17229 var map = this._map, 17230 tileSize = this.getTileSize(), 17231 nwPoint = coords.scaleBy(tileSize), 17232 sePoint = nwPoint.add(tileSize), 17233 nw = map.unproject(nwPoint, coords.z), 17234 se = map.unproject(sePoint, coords.z); 17235 return [nw, se]; 17236 }, 17237 17238 // converts tile coordinates to its geographical bounds 17239 _tileCoordsToBounds: function (coords) { 17240 var bp = this._tileCoordsToNwSe(coords), 17241 bounds = new LatLngBounds(bp[0], bp[1]); 17242 17243 if (!this.options.noWrap) { 17244 bounds = this._map.wrapLatLngBounds(bounds); 17245 } 17246 return bounds; 17247 }, 17248 // converts tile coordinates to key for the tile cache 17249 _tileCoordsToKey: function (coords) { 17250 return coords.x + ':' + coords.y + ':' + coords.z; 17251 }, 17252 17253 // converts tile cache key to coordinates 17254 _keyToTileCoords: function (key) { 17255 var k = key.split(':'), 17256 coords = new Point(+k[0], +k[1]); 17257 coords.z = +k[2]; 17258 return coords; 17259 }, 17260 17261 _removeTile: function (key) { 17262 var tile = this._tiles[key]; 17263 if (!tile) { return; } 17264 17265 remove(tile.el); 17266 17267 delete this._tiles[key]; 17268 17269 // @event tileunload: TileEvent 17270 // Fired when a tile is removed (e.g. when a tile goes off the screen). 17271 this.fire('tileunload', { 17272 tile: tile.el, 17273 coords: this._keyToTileCoords(key) 17274 }); 17275 }, 17276 17277 _initTile: function (tile) { 17278 addClass(tile, 'leaflet-tile'); 17279 17280 var tileSize = this.getTileSize(); 17281 tile.style.width = tileSize.x + 'px'; 17282 tile.style.height = tileSize.y + 'px'; 17283 17284 tile.onselectstart = falseFn; 17285 tile.onmousemove = falseFn; 17286 17287 // update opacity on tiles in IE7-8 because of filter inheritance problems 17288 if (Browser.ielt9 && this.options.opacity < 1) { 17289 setOpacity(tile, this.options.opacity); 17290 } 17291 }, 17292 17293 _addTile: function (coords, container) { 17294 var tilePos = this._getTilePos(coords), 17295 key = this._tileCoordsToKey(coords); 17296 17297 var tile = this.createTile(this._wrapCoords(coords), bind(this._tileReady, this, coords)); 17298 17299 this._initTile(tile); 17300 17301 // if createTile is defined with a second argument ("done" callback), 17302 // we know that tile is async and will be ready later; otherwise 17303 if (this.createTile.length < 2) { 17304 // mark tile as ready, but delay one frame for opacity animation to happen 17305 requestAnimFrame(bind(this._tileReady, this, coords, null, tile)); 17306 } 17307 17308 setPosition(tile, tilePos); 17309 17310 // save tile in cache 17311 this._tiles[key] = { 17312 el: tile, 17313 coords: coords, 17314 current: true 17315 }; 17316 17317 container.appendChild(tile); 17318 // @event tileloadstart: TileEvent 17319 // Fired when a tile is requested and starts loading. 17320 this.fire('tileloadstart', { 17321 tile: tile, 17322 coords: coords 17323 }); 17324 }, 17325 17326 _tileReady: function (coords, err, tile) { 17327 if (err) { 17328 // @event tileerror: TileErrorEvent 17329 // Fired when there is an error loading a tile. 17330 this.fire('tileerror', { 17331 error: err, 17332 tile: tile, 17333 coords: coords 17334 }); 17335 } 17336 17337 var key = this._tileCoordsToKey(coords); 17338 17339 tile = this._tiles[key]; 17340 if (!tile) { return; } 17341 17342 tile.loaded = +new Date(); 17343 if (this._map._fadeAnimated) { 17344 setOpacity(tile.el, 0); 17345 cancelAnimFrame(this._fadeFrame); 17346 this._fadeFrame = requestAnimFrame(this._updateOpacity, this); 17347 } else { 17348 tile.active = true; 17349 this._pruneTiles(); 17350 } 17351 17352 if (!err) { 17353 addClass(tile.el, 'leaflet-tile-loaded'); 17354 17355 // @event tileload: TileEvent 17356 // Fired when a tile loads. 17357 this.fire('tileload', { 17358 tile: tile.el, 17359 coords: coords 17360 }); 17361 } 17362 17363 if (this._noTilesToLoad()) { 17364 this._loading = false; 17365 // @event load: Event 17366 // Fired when the grid layer loaded all visible tiles. 17367 this.fire('load'); 17368 17369 if (Browser.ielt9 || !this._map._fadeAnimated) { 17370 requestAnimFrame(this._pruneTiles, this); 17371 } else { 17372 // Wait a bit more than 0.2 secs (the duration of the tile fade-in) 17373 // to trigger a pruning. 17374 setTimeout(bind(this._pruneTiles, this), 250); 17375 } 17376 } 17377 }, 17378 17379 _getTilePos: function (coords) { 17380 return coords.scaleBy(this.getTileSize()).subtract(this._level.origin); 17381 }, 17382 17383 _wrapCoords: function (coords) { 17384 var newCoords = new Point( 17385 this._wrapX ? wrapNum(coords.x, this._wrapX) : coords.x, 17386 this._wrapY ? wrapNum(coords.y, this._wrapY) : coords.y); 17387 newCoords.z = coords.z; 17388 return newCoords; 17389 }, 17390 17391 _pxBoundsToTileRange: function (bounds) { 17392 var tileSize = this.getTileSize(); 17393 return new Bounds( 17394 bounds.min.unscaleBy(tileSize).floor(), 17395 bounds.max.unscaleBy(tileSize).ceil().subtract([1, 1])); 17396 }, 17397 17398 _noTilesToLoad: function () { 17399 for (var key in this._tiles) { 17400 if (!this._tiles[key].loaded) { return false; } 17401 } 17402 return true; 17403 } 17404 }); 17405 17406 // @factory L.gridLayer(options?: GridLayer options) 17407 // Creates a new instance of GridLayer with the supplied options. 17408 function gridLayer(options) { 17409 return new GridLayer(options); 17410 } 17411 17412 /* 17413 * @class TileLayer 17414 * @inherits GridLayer 17415 * @aka L.TileLayer 17416 * Used to load and display tile layers on the map. Note that most tile servers require attribution, which you can set under `Layer`. Extends `GridLayer`. 17417 * 17418 * @example 17419 * 17420 * ```js 17421 * L.tileLayer('https://
17421{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar', attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(map); 17422 * ``` 17423 * 17424 * @section URL template 17425 * @example 17426 * 17427 * A string of the following form: 17428 * 17429 * ``` 17430 * 'https://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png' 17431 * ``` 17432 * 17433 * `{s}` means one of the available subdomains (used sequentially to help with browser parallel requests per domain limitation; subdomain values are specified in options; `a`, `b` or `c` by default, can be omitted), `{z}` â zoom level, `{x}` and `{y}` â tile coordinates. `{r}` can be used to add "@2x" to the URL to load retina tiles. 17434 * 17435 * You can use custom keys in the template, which will be [evaluated](#util-template) from TileLayer options, like this: 17436 * 17437 * ``` 17438 * L.tileLayer('https://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png', {foo: 'bar'}); 17439 * ``` 17440 */ 17441 17442 17443 var TileLayer = GridLayer.extend({ 17444 17445 // @section 17446 // @aka TileLayer options 17447 options: { 17448 // @option minZoom: Number = 0 17449 // The minimum zoom level down to which this layer will be displayed (inclusive). 17450 minZoom: 0, 17451 17452 // @option maxZoom: Number = 18 17453 // The maximum zoom level up to which this layer will be displayed (inclusive). 17454 maxZoom: 18, 17455 17456 // @option subdomains: String|String[] = 'abc' 17457 // Subdomains of the tile service. Can be passed in the form of one string (where each letter is a subdomain name) or an array of str
vendor: 4,575 bytes, lines 17457-17571
17457ings. 17458 subdomains: 'abc', 17459 17460 // @option errorTileUrl: String = '' 17461 // URL to the tile image to show in place of the tile that failed to load. 17462 errorTileUrl: '', 17463 17464 // @option zoomOffset: Number = 0 17465 // The zoom number used in tile URLs will be offset with this value. 17466 zoomOffset: 0, 17467 17468 // @option tms: Boolean = false 17469 // If `true`, inverses Y axis numbering for tiles (turn this on for [TMS](https://en.wikipedia.org/wiki/Tile_Map_Service) services). 17470 tms: false, 17471 17472 // @option zoomReverse: Boolean = false 17473 // If set to true, the zoom number used in tile URLs will be reversed (`maxZoom - zoom` instead of `zoom`) 17474 zoomReverse: false, 17475 17476 // @option detectRetina: Boolean = false 17477 // If `true` and user is on a retina display, it will request four tiles of half the specified size and a bigger zoom level in place of one to utilize the high resolution. 17478 detectRetina: false, 17479 17480 // @option crossOrigin: Boolean|String = false 17481 // Whether the crossOrigin attribute will be added to the tiles. 17482 // If a String is provided, all tiles will have their crossOrigin attribute set to the String provided. This is needed if you want to access tile pixel data. 17483 // Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values. 17484 crossOrigin: false, 17485 17486 // @option referrerPolicy: Boolean|String = false 17487 // Whether the referrerPolicy attribute will be added to the tiles. 17488 // If a String is provided, all tiles will have their referrerPolicy attribute set to the String provided. 17489 // This may be needed if your map's rendering context has a strict default but your tile provider expects a valid referrer 17490 // (e.g. to validate an API token). 17491 // Refer to [HTMLImageElement.referrerPolicy](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy) for valid String values. 17492 referrerPolicy: false 17493 }, 17494 17495 initialize: function (url, options) { 17496 17497 this._url = url; 17498 17499 options = setOptions(this, options); 17500 17501 // detecting retina displays, adjusting tileSize and zoom levels 17502 if (options.detectRetina && Browser.retina && options.maxZoom > 0) { 17503 17504 options.tileSize = Math.floor(options.tileSize / 2); 17505 17506 if (!options.zoomReverse) { 17507 options.zoomOffset++; 17508 options.maxZoom--; 17509 } else { 17510 options.zoomOffset--; 17511 options.minZoom++; 17512 } 17513 17514 options.minZoom = Math.max(0, options.minZoom); 17515 } 17516 17517 if (typeof options.subdomains === 'string') { 17518 options.subdomains = options.subdomains.split(''); 17519 } 17520 17521 this.on('tileunload', this._onTileRemove); 17522 }, 17523 17524 // @method setUrl(url: String, noRedraw?: Boolean): this 17525 // Updates the layer's URL template and redraws it (unless `noRedraw` is set to `true`). 17526 // If the URL does not change, the layer will not be redrawn unless 17527 // the noRedraw parameter is set to false. 17528 setUrl: function (url, noRedraw) { 17529 if (this._url === url && noRedraw === undefined) { 17530 noRedraw = true; 17531 } 17532 17533 this._url = url; 17534 17535 if (!noRedraw) { 17536 this.redraw(); 17537 } 17538 return this; 17539 }, 17540 17541 // @method createTile(coords: Object, done?: Function): HTMLElement 17542 // Called only internally, overrides GridLayer's [`createTile()`](#gridlayer-createtile) 17543 // to return an `<img>` HTML element with the appropriate image URL given `coords`. The `done` 17544 // callback is called when the tile has been loaded. 17545 createTile: function (coords, done) { 17546 var tile = document.createElement('img'); 17547 17548 on(tile, 'load', bind(this._tileOnLoad, this, done, tile)); 17549 on(tile, 'error', bind(this._tileOnError, this, done, tile)); 17550 17551 if (this.options.crossOrigin || this.options.crossOrigin === '') { 17552 tile.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin; 17553 } 17554 17555 // for this new option we follow the documented behavior 17556 // more closely by only setting the property when string 17557 if (typeof this.options.referrerPolicy === 'string') { 17558 tile.referrerPolicy = this.options.referrerPolicy; 17559 } 17560 17561 /* 17562 Alt tag is set to empty string to keep screen readers from reading URL and for compliance reasons 17563 https://www.w3.org/TR/WCAG20-TECHS/H67 17564 */ 17565 tile.alt = ''; 17566 17567 /* 17568 Set role="presentation" to force screen readers to ignore this 17569 https://www.w3.org/TR/wai-aria/roles#textalternativecomputation 17570 */ 17571 tile.setAttribute('role', 'presentation')
vendor: 8,965 bytes, lines 17571-17871
17571; 17572 17573 tile.src = this.getTileUrl(coords); 17574 17575 return tile; 17576 }, 17577 17578 // @section Extension methods 17579 // @uninheritable 17580 // Layers extending `TileLayer` might reimplement the following method. 17581 // @method getTileUrl(coords: Object): String 17582 // Called only internally, returns the URL for a tile given its coordinates. 17583 // Classes extending `TileLayer` can override this function to provide custom tile URL naming schemes. 17584 getTileUrl: function (coords) { 17585 var data = { 17586 r: Browser.retina ? '@2x' : '', 17587 s: this._getSubdomain(coords), 17588 x: coords.x, 17589 y: coords.y, 17590 z: this._getZoomForUrl() 17591 }; 17592 if (this._map && !this._map.options.crs.infinite) { 17593 var invertedY = this._globalTileRange.max.y - coords.y; 17594 if (this.options.tms) { 17595 data['y'] = invertedY; 17596 } 17597 data['-y'] = invertedY; 17598 } 17599 17600 return template(this._url, extend(data, this.options)); 17601 }, 17602 17603 _tileOnLoad: function (done, tile) { 17604 // For https://github.com/Leaflet/Leaflet/issues/3332 17605 if (Browser.ielt9) { 17606 setTimeout(bind(done, this, null, tile), 0); 17607 } else { 17608 done(null, tile); 17609 } 17610 }, 17611 17612 _tileOnError: function (done, tile, e) { 17613 var errorUrl = this.options.errorTileUrl; 17614 if (errorUrl && tile.getAttribute('src') !== errorUrl) { 17615 tile.src = errorUrl; 17616 } 17617 done(e, tile); 17618 }, 17619 17620 _onTileRemove: function (e) { 17621 e.tile.onload = null; 17622 }, 17623 17624 _getZoomForUrl: function () { 17625 var zoom = this._tileZoom, 17626 maxZoom = this.options.maxZoom, 17627 zoomReverse = this.options.zoomReverse, 17628 zoomOffset = this.options.zoomOffset; 17629 17630 if (zoomReverse) { 17631 zoom = maxZoom - zoom; 17632 } 17633 17634 return zoom + zoomOffset; 17635 }, 17636 17637 _getSubdomain: function (tilePoint) { 17638 var index = Math.abs(tilePoint.x + tilePoint.y) % this.options.subdomains.length; 17639 return this.options.subdomains[index]; 17640 }, 17641 17642 // stops loading all tiles in the background layer 17643 _abortLoading: function () { 17644 var i, tile; 17645 for (i in this._tiles) { 17646 if (this._tiles[i].coords.z !== this._tileZoom) { 17647 tile = this._tiles[i].el; 17648 17649 tile.onload = falseFn; 17650 tile.onerror = falseFn; 17651 17652 if (!tile.complete) { 17653 tile.src = emptyImageUrl; 17654 var coords = this._tiles[i].coords; 17655 remove(tile); 17656 delete this._tiles[i]; 17657 // @event tileabort: TileEvent 17658 // Fired when a tile was loading but is now not wanted. 17659 this.fire('tileabort', { 17660 tile: tile, 17661 coords: coords 17662 }); 17663 } 17664 } 17665 } 17666 }, 17667 17668 _removeTile: function (key) { 17669 var tile = this._tiles[key]; 17670 if (!tile) { return; } 17671 17672 // Cancels any pending http requests associated with the tile 17673 tile.el.setAttribute('src', emptyImageUrl); 17674 17675 return GridLayer.prototype._removeTile.call(this, key); 17676 }, 17677 17678 _tileReady: function (coords, err, tile) { 17679 if (!this._map || (tile && tile.getAttribute('src') === emptyImageUrl)) { 17680 return; 17681 } 17682 17683 return GridLayer.prototype._tileReady.call(this, coords, err, tile); 17684 } 17685 }); 17686 17687 17688 // @factory L.tilelayer(urlTemplate: String, options?: TileLayer options) 17689 // Instantiates a tile layer object given a `URL template` and optionally an options object. 17690 17691 function tileLayer(url, options) { 17692 return new TileLayer(url, options); 17693 } 17694 17695 /* 17696 * @class TileLayer.WMS 17697 * @inherits TileLayer 17698 * @aka L.TileLayer.WMS 17699 * Used to display [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services as tile layers on the map. Extends `TileLayer`. 17700 * 17701 * @example 17702 * 17703 * ```js 17704 * var nexrad = L.tileLayer.wms("http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi", { 17705 * layers: 'nexrad-n0r-900913', 17706 * format: 'image/png', 17707 * transparent: true, 17708 * attribution: "Weather data © 2012 IEM Nexrad" 17709 * }); 17710 * ``` 17711 */ 17712 17713 var TileLayerWMS = TileLayer.extend({ 17714 17715 // @section 17716 // @aka TileLayer.WMS options 17717 // If any custom options not documented here are used, they will be sent to the 17718 // WMS server as extra parameters in each request URL. This can be useful for 17719 // [non-standard vendor WMS parameters](https://docs.geoserver.org/stable/en/user/services/wms/vendor.html). 17720 defaultWmsParams: { 17721 service: 'WMS', 17722 request: 'GetMap', 17723 17724 // @option layers: String = '' 17725 // **(required)** Comma-separated list of WMS layers to show. 17726 layers: '', 17727 17728 // @option styles: String = '' 17729 // Comma-separated list of WMS styles. 17730 styles: '', 17731 17732 // @option format: String = 'image/jpeg' 17733 // WMS image format (use `'image/png'` for layers with transparency). 17734 format: 'image/jpeg', 17735 17736 // @option transparent: Boolean = false 17737 // If `true`, the WMS service will return images with transparency. 17738 transparent: false, 17739 17740 // @option version: String = '1.1.1' 17741 // Version of the WMS service to use 17742 version: '1.1.1' 17743 }, 17744 17745 options: { 17746 // @option crs: CRS = null 17747 // Coordinate Reference System to use for the WMS requests, defaults to 17748 // map CRS. Don't change this if you're not sure what it means. 17749 crs: null, 17750 17751 // @option uppercase: Boolean = false 17752 // If `true`, WMS request parameter keys will be uppercase. 17753 uppercase: false 17754 }, 17755 17756 initialize: function (url, options) { 17757 17758 this._url = url; 17759 17760 var wmsParams = extend({}, this.defaultWmsParams); 17761 17762 // all keys that are not TileLayer options go to WMS params 17763 for (var i in options) { 17764 if (!(i in this.options)) { 17765 wmsParams[i] = options[i]; 17766 } 17767 } 17768 17769 options = setOptions(this, options); 17770 17771 var realRetina = options.detectRetina && Browser.retina ? 2 : 1; 17772 var tileSize = this.getTileSize(); 17773 wmsParams.width = tileSize.x * realRetina; 17774 wmsParams.height = tileSize.y * realRetina; 17775 17776 this.wmsParams = wmsParams; 17777 }, 17778 17779 onAdd: function (map) { 17780 17781 this._crs = this.options.crs || map.options.crs; 17782 this._wmsVersion = parseFloat(this.wmsParams.version); 17783 17784 var projectionKey = this._wmsVersion >= 1.3 ? 'crs' : 'srs'; 17785 this.wmsParams[projectionKey] = this._crs.code; 17786 17787 TileLayer.prototype.onAdd.call(this, map); 17788 }, 17789 17790 getTileUrl: function (coords) { 17791 17792 var tileBounds = this._tileCoordsToNwSe(coords), 17793 crs = this._crs, 17794 bounds = toBounds(crs.project(tileBounds[0]), crs.project(tileBounds[1])), 17795 min = bounds.min, 17796 max = bounds.max, 17797 bbox = (this._wmsVersion >= 1.3 && this._crs === EPSG4326 ? 17798 [min.y, min.x, max.y, max.x] : 17799 [min.x, min.y, max.x, max.y]).join(','), 17800 url = TileLayer.prototype.getTileUrl.call(this, coords); 17801 return url + 17802 getParamString(this.wmsParams, url, this.options.uppercase) + 17803 (this.options.uppercase ? '&BBOX=' : '&bbox=') + bbox; 17804 }, 17805 17806 // @method setParams(params: Object, noRedraw?: Boolean): this 17807 // Merges an object with the new parameters and re-requests tiles on the current screen (unless `noRedraw` was set to true). 17808 setParams: function (params, noRedraw) { 17809 17810 extend(this.wmsParams, params); 17811 17812 if (!noRedraw) { 17813 this.redraw(); 17814 } 17815 17816 return this; 17817 } 17818 }); 17819 17820 17821 // @factory L.tileLayer.wms(baseUrl: String, options: TileLayer.WMS options) 17822 // Instantiates a WMS tile layer object given a base URL of the WMS service and a WMS parameters/options object. 17823 function tileLayerWMS(url, options) { 17824 return new TileLayerWMS(url, options); 17825 } 17826 17827 TileLayer.WMS = TileLayerWMS; 17828 tileLayer.wms = tileLayerWMS; 17829 17830 /* 17831 * @class Renderer 17832 * @inherits Layer 17833 * @aka L.Renderer 17834 * 17835 * Base class for vector renderer implementations (`SVG`, `Canvas`). Handles the 17836 * DOM container of the renderer, its bounds, and its zoom animation. 17837 * 17838 * A `Renderer` works as an implicit layer group for all `Path`s - the renderer 17839 * itself can be added or removed to the map. All paths use a renderer, which can 17840 * be implicit (the map will decide the type of renderer and use it automatically) 17841 * or explicit (using the [`renderer`](#path-renderer) option of the path). 17842 * 17843 * Do not use this class directly, use `SVG` and `Canvas` instead. 17844 * 17845 * @event update: Event 17846 * Fired when the renderer updates its bounds, center and zoom, for example when 17847 * its map has moved 17848 */ 17849 17850 var Renderer = Layer.extend({ 17851 17852 // @section 17853 // @aka Renderer options 17854 options: { 17855 // @option padding: Number = 0.1 17856 // How much to extend the clip area around the map view (relative to its size) 17857 // e.g. 0.1 would be 10% of map view in each direction 17858 padding: 0.1 17859 }, 17860 17861 initialize: function (options) { 17862 setOptions(this, options); 17863 stamp(this); 17864 this._layers = this._layers || {}; 17865 }, 17866 17867 onAdd: function () { 17868 if (!this._container) { 17869 this._initContainer(); // defined by renderer implementations 17870 17871
17871if (this._zoomAnimated) { 17872 addClass(this._container, 'leaflet-zoom-animated'); 17873 }
vendor: 43,109 bytes, lines 17873-19464
17873 17874 } 17875 17876 this.getPane().appendChild(this._container); 17877 this._update(); 17878 this.on('update', this._updatePaths, this); 17879 }, 17880 17881 onRemove: function () { 17882 this.off('update', this._updatePaths, this); 17883 this._destroyContainer(); 17884 }, 17885 17886 getEvents: function () { 17887 var events = { 17888 viewreset: this._reset, 17889 zoom: this._onZoom, 17890 moveend: this._update, 17891 zoomend: this._onZoomEnd 17892 }; 17893 if (this._zoomAnimated) { 17894 events.zoomanim = this._onAnimZoom; 17895 } 17896 return events; 17897 }, 17898 17899 _onAnimZoom: function (ev) { 17900 this._updateTransform(ev.center, ev.zoom); 17901 }, 17902 17903 _onZoom: function () { 17904 this._updateTransform(this._map.getCenter(), this._map.getZoom()); 17905 }, 17906 17907 _updateTransform: function (center, zoom) { 17908 var scale = this._map.getZoomScale(zoom, this._zoom), 17909 viewHalf = this._map.getSize().multiplyBy(0.5 + this.options.padding), 17910 currentCenterPoint = this._map.project(this._center, zoom), 17911 17912 topLeftOffset = viewHalf.multiplyBy(-scale).add(currentCenterPoint) 17913 .subtract(this._map._getNewPixelOrigin(center, zoom)); 17914 17915 if (Browser.any3d) { 17916 setTransform(this._container, topLeftOffset, scale); 17917 } else { 17918 setPosition(this._container, topLeftOffset); 17919 } 17920 }, 17921 17922 _reset: function () { 17923 this._update(); 17924 this._updateTransform(this._center, this._zoom); 17925 17926 for (var id in this._layers) { 17927 this._layers[id]._reset(); 17928 } 17929 }, 17930 17931 _onZoomEnd: function () { 17932 for (var id in this._layers) { 17933 this._layers[id]._project(); 17934 } 17935 }, 17936 17937 _updatePaths: function () { 17938 for (var id in this._layers) { 17939 this._layers[id]._update(); 17940 } 17941 }, 17942 17943 _update: function () { 17944 // Update pixel bounds of renderer container (for positioning/sizing/clipping later) 17945 // Subclasses are responsible of firing the 'update' event. 17946 var p = this.options.padding, 17947 size = this._map.getSize(), 17948 min = this._map.containerPointToLayerPoint(size.multiplyBy(-p)).round(); 17949 17950 this._bounds = new Bounds(min, min.add(size.multiplyBy(1 + p * 2)).round()); 17951 17952 this._center = this._map.getCenter(); 17953 this._zoom = this._map.getZoom(); 17954 } 17955 }); 17956 17957 /* 17958 * @class Canvas 17959 * @inherits Renderer 17960 * @aka L.Canvas 17961 * 17962 * Allows vector layers to be displayed with [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API). 17963 * Inherits `Renderer`. 17964 * 17965 * Due to [technical limitations](https://caniuse.com/canvas), Canvas is not 17966 * available in all web browsers, notably IE8, and overlapping geometries might 17967 * not display properly in some edge cases. 17968 * 17969 * @example 17970 * 17971 * Use Canvas by default for all paths in the map: 17972 * 17973 * ```js 17974 * var map = L.map('map', { 17975 * renderer: L.canvas() 17976 * }); 17977 * ``` 17978 * 17979 * Use a Canvas renderer with extra padding for specific vector geometries: 17980 * 17981 * ```js 17982 * var map = L.map('map'); 17983 * var myRenderer = L.canvas({ padding: 0.5 }); 17984 * var line = L.polyline( coordinates, { renderer: myRenderer } ); 17985 * var circle = L.circle( center, { renderer: myRenderer } ); 17986 * ``` 17987 */ 17988 17989 var Canvas = Renderer.extend({ 17990 17991 // @section 17992 // @aka Canvas options 17993 options: { 17994 // @option tolerance: Number = 0 17995 // How much to extend the click tolerance around a path/object on the map. 17996 tolerance: 0 17997 }, 17998 17999 getEvents: function () { 18000 var events = Renderer.prototype.getEvents.call(this); 18001 events.viewprereset = this._onViewPreReset; 18002 return events; 18003 }, 18004 18005 _onViewPreReset: function () { 18006 // Set a flag so that a viewprereset+moveend+viewreset only updates&redraws once 18007 this._postponeUpdatePaths = true; 18008 }, 18009 18010 onAdd: function () { 18011 Renderer.prototype.onAdd.call(this); 18012 18013 // Redraw vectors since canvas is cleared upon removal, 18014 // in case of removing the renderer itself from the map. 18015 this._draw(); 18016 }, 18017 18018 _initContainer: function () { 18019 var container = this._container = document.createElement('canvas'); 18020 18021 on(container, 'mousemove', this._onMouseMove, this); 18022 on(container, 'click dblclick mousedown mouseup contextmenu', this._onClick, this); 18023 on(container, 'mouseout', this._handleMouseOut, this); 18024 container['_leaflet_disable_events'] = true; 18025 18026 this._ctx = container.getContext('2d'); 18027 }, 18028 18029 _destroyContainer: function () { 18030 cancelAnimFrame(this._redrawRequest); 18031 delete this._ctx; 18032 remove(this._container); 18033 off(this._container); 18034 delete this._container; 18035 }, 18036 18037 _updatePaths: function () { 18038 if (this._postponeUpdatePaths) { return; } 18039 18040 var layer; 18041 this._redrawBounds = null; 18042 for (var id in this._layers) { 18043 layer = this._layers[id]; 18044 layer._update(); 18045 } 18046 this._redraw(); 18047 }, 18048 18049 _update: function () { 18050 if (this._map._animatingZoom && this._bounds) { return; } 18051 18052 Renderer.prototype._update.call(this); 18053 18054 var b = this._bounds, 18055 container = this._container, 18056 size = b.getSize(), 18057 m = Browser.retina ? 2 : 1; 18058 18059 setPosition(container, b.min); 18060 18061 // set canvas size (also clearing it); use double size on retina 18062 container.width = m * size.x; 18063 container.height = m * size.y; 18064 container.style.width = size.x + 'px'; 18065 container.style.height = size.y + 'px'; 18066 18067 if (Browser.retina) { 18068 this._ctx.scale(2, 2); 18069 } 18070 18071 // translate so we use the same path coordinates after canvas element moves 18072 this._ctx.translate(-b.min.x, -b.min.y); 18073 18074 // Tell paths to redraw themselves 18075 this.fire('update'); 18076 }, 18077 18078 _reset: function () { 18079 Renderer.prototype._reset.call(this); 18080 18081 if (this._postponeUpdatePaths) { 18082 this._postponeUpdatePaths = false; 18083 this._updatePaths(); 18084 } 18085 }, 18086 18087 _initPath: function (layer) { 18088 this._updateDashArray(layer); 18089 this._layers[stamp(layer)] = layer; 18090 18091 var order = layer._order = { 18092 layer: layer, 18093 prev: this._drawLast, 18094 next: null 18095 }; 18096 if (this._drawLast) { this._drawLast.next = order; } 18097 this._drawLast = order; 18098 this._drawFirst = this._drawFirst || this._drawLast; 18099 }, 18100 18101 _addPath: function (layer) { 18102 this._requestRedraw(layer); 18103 }, 18104 18105 _removePath: function (layer) { 18106 var order = layer._order; 18107 var next = order.next; 18108 var prev = order.prev; 18109 18110 if (next) { 18111 next.prev = prev; 18112 } else { 18113 this._drawLast = prev; 18114 } 18115 if (prev) { 18116 prev.next = next; 18117 } else { 18118 this._drawFirst = next; 18119 } 18120 18121 delete layer._order; 18122 18123 delete this._layers[stamp(layer)]; 18124 18125 this._requestRedraw(layer); 18126 }, 18127 18128 _updatePath: function (layer) { 18129 // Redraw the union of the layer's old pixel 18130 // bounds and the new pixel bounds. 18131 this._extendRedrawBounds(layer); 18132 layer._project(); 18133 layer._update(); 18134 // The redraw will extend the redraw bounds 18135 // with the new pixel bounds. 18136 this._requestRedraw(layer); 18137 }, 18138 18139 _updateStyle: function (layer) { 18140 this._updateDashArray(layer); 18141 this._requestRedraw(layer); 18142 }, 18143 18144 _updateDashArray: function (layer) { 18145 if (typeof layer.options.dashArray === 'string') { 18146 var parts = layer.options.dashArray.split(/[, ]+/), 18147 dashArray = [], 18148 dashValue, 18149 i; 18150 for (i = 0; i < parts.length; i++) { 18151 dashValue = Number(parts[i]); 18152 // Ignore dash array containing invalid lengths 18153 if (isNaN(dashValue)) { return; } 18154 dashArray.push(dashValue); 18155 } 18156 layer.options._dashArray = dashArray; 18157 } else { 18158 layer.options._dashArray = layer.options.dashArray; 18159 } 18160 }, 18161 18162 _requestRedraw: function (layer) { 18163 if (!this._map) { return; } 18164 18165 this._extendRedrawBounds(layer); 18166 this._redrawRequest = this._redrawRequest || requestAnimFrame(this._redraw, this); 18167 }, 18168 18169 _extendRedrawBounds: function (layer) { 18170 if (layer._pxBounds) { 18171 var padding = (layer.options.weight || 0) + 1; 18172 this._redrawBounds = this._redrawBounds || new Bounds(); 18173 this._redrawBounds.extend(layer._pxBounds.min.subtract([padding, padding])); 18174 this._redrawBounds.extend(layer._pxBounds.max.add([padding, padding])); 18175 } 18176 }, 18177 18178 _redraw: function () { 18179 this._redrawRequest = null; 18180 18181 if (this._redrawBounds) { 18182 this._redrawBounds.min._floor(); 18183 this._redrawBounds.max._ceil(); 18184 } 18185 18186 this._clear(); // clear layers in redraw bounds 18187 this._draw(); // draw layers 18188 18189 this._redrawBounds = null; 18190 }, 18191 18192 _clear: function () { 18193 var bounds = this._redrawBounds; 18194 if (bounds) { 18195 var size = bounds.getSize(); 18196 this._ctx.clearRect(bounds.min.x, bounds.min.y, size.x, size.y); 18197 } else { 18198 this._ctx.save(); 18199 this._ctx.setTransform(1, 0, 0, 1, 0, 0); 18200 this._ctx.clearRect(0, 0, this._container.width, this._container.height); 18201 this._ctx.restore(); 18202 } 18203 }, 18204 18205 _draw: function () { 18206 var layer, bounds = this._redrawBounds; 18207 this._ctx.save(); 18208 if (bounds) { 18209 var size = bounds.getSize(); 18210 this._ctx.beginPath(); 18211 this._ctx.rect(bounds.min.x, bounds.min.y, size.x, size.y); 18212 this._ctx.clip(); 18213 } 18214 18215 this._drawing = true; 18216 18217 for (var order = this._drawFirst; order; order = order.next) { 18218 layer = order.layer; 18219 if (!bounds || (layer._pxBounds && layer._pxBounds.intersects(bounds))) { 18220 layer._updatePath(); 18221 } 18222 } 18223 18224 this._drawing = false; 18225 18226 this._ctx.restore(); // Restore state before clipping. 18227 }, 18228 18229 _updatePoly: function (layer, closed) { 18230 if (!this._drawing) { return; } 18231 18232 var i, j, len2, p, 18233 parts = layer._parts, 18234 len = parts.length, 18235 ctx = this._ctx; 18236 18237 if (!len) { return; } 18238 18239 ctx.beginPath(); 18240 18241 for (i = 0; i < len; i++) { 18242 for (j = 0, len2 = parts[i].length; j < len2; j++) { 18243 p = parts[i][j]; 18244 ctx[j ? 'lineTo' : 'moveTo'](p.x, p.y); 18245 } 18246 if (closed) { 18247 ctx.closePath(); 18248 } 18249 } 18250 18251 this._fillStroke(ctx, layer); 18252 18253 // TODO optimization: 1 fill/stroke for all features with equal style instead of 1 for each feature 18254 }, 18255 18256 _updateCircle: function (layer) { 18257 18258 if (!this._drawing || layer._empty()) { return; } 18259 18260 var p = layer._point, 18261 ctx = this._ctx, 18262 r = Math.max(Math.round(layer._radius), 1), 18263 s = (Math.max(Math.round(layer._radiusY), 1) || r) / r; 18264 18265 if (s !== 1) { 18266 ctx.save(); 18267 ctx.scale(1, s); 18268 } 18269 18270 ctx.beginPath(); 18271 ctx.arc(p.x, p.y / s, r, 0, Math.PI * 2, false); 18272 18273 if (s !== 1) { 18274 ctx.restore(); 18275 } 18276 18277 this._fillStroke(ctx, layer); 18278 }, 18279 18280 _fillStroke: function (ctx, layer) { 18281 var options = layer.options; 18282 18283 if (options.fill) { 18284 ctx.globalAlpha = options.fillOpacity; 18285 ctx.fillStyle = options.fillColor || options.color; 18286 ctx.fill(options.fillRule || 'evenodd'); 18287 } 18288 18289 if (options.stroke && options.weight !== 0) { 18290 if (ctx.setLineDash) { 18291 ctx.setLineDash(layer.options && layer.options._dashArray || []); 18292 } 18293 ctx.globalAlpha = options.opacity; 18294 ctx.lineWidth = options.weight; 18295 ctx.strokeStyle = options.color; 18296 ctx.lineCap = options.lineCap; 18297 ctx.lineJoin = options.lineJoin; 18298 ctx.stroke(); 18299 } 18300 }, 18301 18302 // Canvas obviously doesn't have mouse events for individual drawn objects, 18303 // so we emulate that by calculating what's under the mouse on mousemove/click manually 18304 18305 _onClick: function (e) { 18306 var point = this._map.mouseEventToLayerPoint(e), layer, clickedLayer; 18307 18308 for (var order = this._drawFirst; order; order = order.next) { 18309 layer = order.layer; 18310 if (layer.options.interactive && layer._containsPoint(point)) { 18311 if (!(e.type === 'click' || e.type === 'preclick') || !this._map._draggableMoved(layer)) { 18312 clickedLayer = layer; 18313 } 18314 } 18315 } 18316 this._fireEvent(clickedLayer ? [clickedLayer] : false, e); 18317 }, 18318 18319 _onMouseMove: function (e) { 18320 if (!this._map || this._map.dragging.moving() || this._map._animatingZoom) { return; } 18321 18322 var point = this._map.mouseEventToLayerPoint(e); 18323 this._handleMouseHover(e, point); 18324 }, 18325 18326 18327 _handleMouseOut: function (e) { 18328 var layer = this._hoveredLayer; 18329 if (layer) { 18330 // if we're leaving the layer, fire mouseout 18331 removeClass(this._container, 'leaflet-interactive'); 18332 this._fireEvent([layer], e, 'mouseout'); 18333 this._hoveredLayer = null; 18334 this._mouseHoverThrottled = false; 18335 } 18336 }, 18337 18338 _handleMouseHover: function (e, point) { 18339 if (this._mouseHoverThrottled) { 18340 return; 18341 } 18342 18343 var layer, candidateHoveredLayer; 18344 18345 for (var order = this._drawFirst; order; order = order.next) { 18346 layer = order.layer; 18347 if (layer.options.interactive && layer._containsPoint(point)) { 18348 candidateHoveredLayer = layer; 18349 } 18350 } 18351 18352 if (candidateHoveredLayer !== this._hoveredLayer) { 18353 this._handleMouseOut(e); 18354 18355 if (candidateHoveredLayer) { 18356 addClass(this._container, 'leaflet-interactive'); // change cursor 18357 this._fireEvent([candidateHoveredLayer], e, 'mouseover'); 18358 this._hoveredLayer = candidateHoveredLayer; 18359 } 18360 } 18361 18362 this._fireEvent(this._hoveredLayer ? [this._hoveredLayer] : false, e); 18363 18364 this._mouseHoverThrottled = true; 18365 setTimeout(bind(function () { 18366 this._mouseHoverThrottled = false; 18367 }, this), 32); 18368 }, 18369 18370 _fireEvent: function (layers, e, type) { 18371 this._map._fireDOMEvent(e, type || e.type, layers); 18372 }, 18373 18374 _bringToFront: function (layer) { 18375 var order = layer._order; 18376 18377 if (!order) { return; } 18378 18379 var next = order.next; 18380 var prev = order.prev; 18381 18382 if (next) { 18383 next.prev = prev; 18384 } else { 18385 // Already last 18386 return; 18387 } 18388 if (prev) { 18389 prev.next = next; 18390 } else if (next) { 18391 // Update first entry unless this is the 18392 // single entry 18393 this._drawFirst = next; 18394 } 18395 18396 order.prev = this._drawLast; 18397 this._drawLast.next = order; 18398 18399 order.next = null; 18400 this._drawLast = order; 18401 18402 this._requestRedraw(layer); 18403 }, 18404 18405 _bringToBack: function (layer) { 18406 var order = layer._order; 18407 18408 if (!order) { return; } 18409 18410 var next = order.next; 18411 var prev = order.prev; 18412 18413 if (prev) { 18414 prev.next = next; 18415 } else { 18416 // Already first 18417 return; 18418 } 18419 if (next) { 18420 next.prev = prev; 18421 } else if (prev) { 18422 // Update last entry unless this is the 18423 // single entry 18424 this._drawLast = prev; 18425 } 18426 18427 order.prev = null; 18428 18429 order.next = this._drawFirst; 18430 this._drawFirst.prev = order; 18431 this._drawFirst = order; 18432 18433 this._requestRedraw(layer); 18434 } 18435 }); 18436 18437 // @factory L.canvas(options?: Renderer options) 18438 // Creates a Canvas renderer with the given options. 18439 function canvas(options) { 18440 return Browser.canvas ? new Canvas(options) : null; 18441 } 18442 18443 /* 18444 * Thanks to Dmitry Baranovsky and his Raphael library for inspiration! 18445 */ 18446 18447 18448 var vmlCreate = (function () { 18449 try { 18450 document.namespaces.add('lvml', 'urn:schemas-microsoft-com:vml'); 18451 return function (name) { 18452 return document.createElement('<lvml:' + name + ' class="lvml">'); 18453 }; 18454 } catch (e) { 18455 // Do not return fn from catch block so `e` can be garbage collected 18456 // See https://github.com/Leaflet/Leaflet/pull/7279 18457 } 18458 return function (name) { 18459 return document.createElement('<' + name + ' xmlns="urn:schemas-microsoft.com:vml" class="lvml">'); 18460 }; 18461 })(); 18462 18463 18464 /* 18465 * @class SVG 18466 * 18467 * 18468 * VML was deprecated in 2012, which means VML functionality exists only for backwards compatibility 18469 * with old versions of Internet Explorer. 18470 */ 18471 18472 // mixin to redefine some SVG methods to handle VML syntax which is similar but with some differences 18473 var vmlMixin = { 18474 18475 _initContainer: function () { 18476 this._container = create$1('div', 'leaflet-vml-container'); 18477 }, 18478 18479 _update: function () { 18480 if (this._map._animatingZoom) { return; } 18481 Renderer.prototype._update.call(this); 18482 this.fire('update'); 18483 }, 18484 18485 _initPath: function (layer) { 18486 var container = layer._container = vmlCreate('shape'); 18487 18488 addClass(container, 'leaflet-vml-shape ' + (this.options.className || '')); 18489 18490 container.coordsize = '1 1'; 18491 18492 layer._path = vmlCreate('path'); 18493 container.appendChild(layer._path); 18494 18495 this._updateStyle(layer); 18496 this._layers[stamp(layer)] = layer; 18497 }, 18498 18499 _addPath: function (layer) { 18500 var container = layer._container; 18501 this._container.appendChild(container); 18502 18503 if (layer.options.interactive) { 18504 layer.addInteractiveTarget(container); 18505 } 18506 }, 18507 18508 _removePath: function (layer) { 18509 var container = layer._container; 18510 remove(container); 18511 layer.removeInteractiveTarget(container); 18512 delete this._layers[stamp(layer)]; 18513 }, 18514 18515 _updateStyle: function (layer) { 18516 var stroke = layer._stroke, 18517 fill = layer._fill, 18518 options = layer.options, 18519 container = layer._container; 18520 18521 container.stroked = !!options.stroke; 18522 container.filled = !!options.fill; 18523 18524 if (options.stroke) { 18525 if (!stroke) { 18526 stroke = layer._stroke = vmlCreate('stroke'); 18527 } 18528 container.appendChild(stroke); 18529 stroke.weight = options.weight + 'px'; 18530 stroke.color = options.color; 18531 stroke.opacity = options.opacity; 18532 18533 if (options.dashArray) { 18534 stroke.dashStyle = isArray(options.dashArray) ? 18535 options.dashArray.join(' ') : 18536 options.dashArray.replace(/( *, *)/g, ' '); 18537 } else { 18538 stroke.dashStyle = ''; 18539 } 18540 stroke.endcap = options.lineCap.replace('butt', 'flat'); 18541 stroke.joinstyle = options.lineJoin; 18542 18543 } else if (stroke) { 18544 container.removeChild(stroke); 18545 layer._stroke = null; 18546 } 18547 18548 if (options.fill) { 18549 if (!fill) { 18550 fill = layer._fill = vmlCreate('fill'); 18551 } 18552 container.appendChild(fill); 18553 fill.color = options.fillColor || options.color; 18554 fill.opacity = options.fillOpacity; 18555 18556 } else if (fill) { 18557 container.removeChild(fill); 18558 layer._fill = null; 18559 } 18560 }, 18561 18562 _updateCircle: function (layer) { 18563 var p = layer._point.round(), 18564 r = Math.round(layer._radius), 18565 r2 = Math.round(layer._radiusY || r); 18566 18567 this._setPath(layer, layer._empty() ? 'M0 0' : 18568 'AL ' + p.x + ',' + p.y + ' ' + r + ',' + r2 + ' 0,' + (65535 * 360)); 18569 }, 18570 18571 _setPath: function (layer, path) { 18572 layer._path.v = path; 18573 }, 18574 18575 _bringToFront: function (layer) { 18576 toFront(layer._container); 18577 }, 18578 18579 _bringToBack: function (layer) { 18580 toBack(layer._container); 18581 } 18582 }; 18583 18584 var create = Browser.vml ? vmlCreate : svgCreate; 18585 18586 /* 18587 * @class SVG 18588 * @inherits Renderer 18589 * @aka L.SVG 18590 * 18591 * Allows vector layers to be displayed with [SVG](https://developer.mozilla.org/docs/Web/SVG). 18592 * Inherits `Renderer`. 18593 * 18594 * Due to [technical limitations](https://caniuse.com/svg), SVG is not 18595 * available in all web browsers, notably Android 2.x and 3.x. 18596 * 18597 * Although SVG is not available on IE7 and IE8, these browsers support 18598 * [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language) 18599 * (a now deprecated technology), and the SVG renderer will fall back to VML in 18600 * this case. 18601 * 18602 * @example 18603 * 18604 * Use SVG by default for all paths in the map: 18605 * 18606 * ```js 18607 * var map = L.map('map', { 18608 * renderer: L.svg() 18609 * }); 18610 * ``` 18611 * 18612 * Use a SVG renderer with extra padding for specific vector geometries: 18613 * 18614 * ```js 18615 * var map = L.map('map'); 18616 * var myRenderer = L.svg({ padding: 0.5 }); 18617 * var line = L.polyline( coordinates, { renderer: myRenderer } ); 18618 * var circle = L.circle( center, { renderer: myRenderer } ); 18619 * ``` 18620 */ 18621 18622 var SVG = Renderer.extend({ 18623 18624 _initContainer: function () { 18625 this._container = create('svg'); 18626 18627 // makes it possible to click through svg root; we'll reset it back in individual paths 18628 this._container.setAttribute('pointer-events', 'none'); 18629 18630 this._rootGroup = create('g'); 18631 this._container.appendChild(this._rootGroup); 18632 }, 18633 18634 _destroyContainer: function () { 18635 remove(this._container); 18636 off(this._container); 18637 delete this._container; 18638 delete this._rootGroup; 18639 delete this._svgSize; 18640 }, 18641 18642 _update: function () { 18643 if (this._map._animatingZoom && this._bounds) { return; } 18644 18645 Renderer.prototype._update.call(this); 18646 18647 var b = this._bounds, 18648 size = b.getSize(), 18649 container = this._container; 18650 18651 // set size of svg-container if changed 18652 if (!this._svgSize || !this._svgSize.equals(size)) { 18653 this._svgSize = size; 18654 container.setAttribute('width', size.x); 18655 container.setAttribute('height', size.y); 18656 } 18657 18658 // movement: update container viewBox so that we don't have to change coordinates of individual layers 18659 setPosition(container, b.min); 18660 container.setAttribute('viewBox', [b.min.x, b.min.y, size.x, size.y].join(' ')); 18661 18662 this.fire('update'); 18663 }, 18664 18665 // methods below are called by vector layers implementations 18666 18667 _initPath: function (layer) { 18668 var path = layer._path = create('path'); 18669 18670 // @namespace Path 18671 // @option className: String = null 18672 // Custom class name set on an element. Only for SVG renderer. 18673 if (layer.options.className) { 18674 addClass(path, layer.options.className); 18675 } 18676 18677 if (layer.options.interactive) { 18678 addClass(path, 'leaflet-interactive'); 18679 } 18680 18681 this._updateStyle(layer); 18682 this._layers[stamp(layer)] = layer; 18683 }, 18684 18685 _addPath: function (layer) { 18686 if (!this._rootGroup) { this._initContainer(); } 18687 this._rootGroup.appendChild(layer._path); 18688 layer.addInteractiveTarget(layer._path); 18689 }, 18690 18691 _removePath: function (layer) { 18692 remove(layer._path); 18693 layer.removeInteractiveTarget(layer._path); 18694 delete this._layers[stamp(layer)]; 18695 }, 18696 18697 _updatePath: function (layer) { 18698 layer._project(); 18699 layer._update(); 18700 }, 18701 18702 _updateStyle: function (layer) { 18703 var path = layer._path, 18704 options = layer.options; 18705 18706 if (!path) { return; } 18707 18708 if (options.stroke) { 18709 path.setAttribute('stroke', options.color); 18710 path.setAttribute('stroke-opacity', options.opacity); 18711 path.setAttribute('stroke-width', options.weight); 18712 path.setAttribute('stroke-linecap', options.lineCap); 18713 path.setAttribute('stroke-linejoin', options.lineJoin); 18714 18715 if (options.dashArray) { 18716 path.setAttribute('stroke-dasharray', options.dashArray); 18717 } else { 18718 path.removeAttribute('stroke-dasharray'); 18719 } 18720 18721 if (options.dashOffset) { 18722 path.setAttribute('stroke-dashoffset', options.dashOffset); 18723 } else { 18724 path.removeAttribute('stroke-dashoffset'); 18725 } 18726 } else { 18727 path.setAttribute('stroke', 'none'); 18728 } 18729 18730 if (options.fill) { 18731 path.setAttribute('fill', options.fillColor || options.color); 18732 path.setAttribute('fill-opacity', options.fillOpacity); 18733 path.setAttribute('fill-rule', options.fillRule || 'evenodd'); 18734 } else { 18735 path.setAttribute('fill', 'none'); 18736 } 18737 }, 18738 18739 _updatePoly: function (layer, closed) { 18740 this._setPath(layer, pointsToPath(layer._parts, closed)); 18741 }, 18742 18743 _updateCircle: function (layer) { 18744 var p = layer._point, 18745 r = Math.max(Math.round(layer._radius), 1), 18746 r2 = Math.max(Math.round(layer._radiusY), 1) || r, 18747 arc = 'a' + r + ',' + r2 + ' 0 1,0 '; 18748 18749 // drawing a circle with two half-arcs 18750 var d = layer._empty() ? 'M0 0' : 18751 'M' + (p.x - r) + ',' + p.y + 18752 arc + (r * 2) + ',0 ' + 18753 arc + (-r * 2) + ',0 '; 18754 18755 this._setPath(layer, d); 18756 }, 18757 18758 _setPath: function (layer, path) { 18759 layer._path.setAttribute('d', path); 18760 }, 18761 18762 // SVG does not have the concept of zIndex so we resort to changing the DOM order of elements 18763 _bringToFront: function (layer) { 18764 toFront(layer._path); 18765 }, 18766 18767 _bringToBack: function (layer) { 18768 toBack(layer._path); 18769 } 18770 }); 18771 18772 if (Browser.vml) { 18773 SVG.include(vmlMixin); 18774 } 18775 18776 // @namespace SVG 18777 // @factory L.svg(options?: Renderer options) 18778 // Creates a SVG renderer with the given options. 18779 function svg(options) { 18780 return Browser.svg || Browser.vml ? new SVG(options) : null; 18781 } 18782 18783 Map.include({ 18784 // @namespace Map; @method getRenderer(layer: Path): Renderer 18785 // Returns the instance of `Renderer` that should be used to render the given 18786 // `Path`. It will ensure that the `renderer` options of the map and paths 18787 // are respected, and that the renderers do exist on the map. 18788 getRenderer: function (layer) { 18789 // @namespace Path; @option renderer: Renderer 18790 // Use this specific instance of `Renderer` for this path. Takes 18791 // precedence over the map's [default renderer](#map-renderer). 18792 var renderer = layer.options.renderer || this._getPaneRenderer(layer.options.pane) || this.options.renderer || this._renderer; 18793 18794 if (!renderer) { 18795 renderer = this._renderer = this._createRenderer(); 18796 } 18797 18798 if (!this.hasLayer(renderer)) { 18799 this.addLayer(renderer); 18800 } 18801 return renderer; 18802 }, 18803 18804 _getPaneRenderer: function (name) { 18805 if (name === 'overlayPane' || name === undefined) { 18806 return false; 18807 } 18808 18809 var renderer = this._paneRenderers[name]; 18810 if (renderer === undefined) { 18811 renderer = this._createRenderer({pane: name}); 18812 this._paneRenderers[name] = renderer; 18813 } 18814 return renderer; 18815 }, 18816 18817 _createRenderer: function (options) { 18818 // @namespace Map; @option preferCanvas: Boolean = false 18819 // Whether `Path`s should be rendered on a `Canvas` renderer. 18820 // By default, all `Path`s are rendered in a `SVG` renderer. 18821 return (this.options.preferCanvas && canvas(options)) || svg(options); 18822 } 18823 }); 18824 18825 /* 18826 * L.Rectangle extends Polygon and creates a rectangle when passed a LatLngBounds object. 18827 */ 18828 18829 /* 18830 * @class Rectangle 18831 * @aka L.Rectangle 18832 * @inherits Polygon 18833 * 18834 * A class for drawing rectangle overlays on a map. Extends `Polygon`. 18835 * 18836 * @example 18837 * 18838 * ```js 18839 * // define rectangle geographical bounds 18840 * var bounds = [[54.559322, -5.767822], [56.1210604, -3.021240]]; 18841 * 18842 * // create an orange rectangle 18843 * L.rectangle(bounds, {color: "#ff7800", weight: 1}).addTo(map); 18844 * 18845 * // zoom the map to the rectangle bounds 18846 * map.fitBounds(bounds); 18847 * ``` 18848 * 18849 */ 18850 18851 18852 var Rectangle = Polygon.extend({ 18853 initialize: function (latLngBounds, options) { 18854 Polygon.prototype.initialize.call(this, this._boundsToLatLngs(latLngBounds), options); 18855 }, 18856 18857 // @method setBounds(latLngBounds: LatLngBounds): this 18858 // Redraws the rectangle with the passed bounds. 18859 setBounds: function (latLngBounds) { 18860 return this.setLatLngs(this._boundsToLatLngs(latLngBounds)); 18861 }, 18862 18863 _boundsToLatLngs: function (latLngBounds) { 18864 latLngBounds = toLatLngBounds(latLngBounds); 18865 return [ 18866 latLngBounds.getSouthWest(), 18867 latLngBounds.getNorthWest(), 18868 latLngBounds.getNorthEast(), 18869 latLngBounds.getSouthEast() 18870 ]; 18871 } 18872 }); 18873 18874 18875 // @factory L.rectangle(latLngBounds: LatLngBounds, options?: Polyline options) 18876 function rectangle(latLngBounds, options) { 18877 return new Rectangle(latLngBounds, options); 18878 } 18879 18880 SVG.create = create; 18881 SVG.pointsToPath = pointsToPath; 18882 18883 GeoJSON.geometryToLayer = geometryToLayer; 18884 GeoJSON.coordsToLatLng = coordsToLatLng; 18885 GeoJSON.coordsToLatLngs = coordsToLatLngs; 18886 GeoJSON.latLngToCoords = latLngToCoords; 18887 GeoJSON.latLngsToCoords = latLngsToCoords; 18888 GeoJSON.getFeature = getFeature; 18889 GeoJSON.asFeature = asFeature; 18890 18891 /* 18892 * L.Handler.BoxZoom is used to add shift-drag zoom interaction to the map 18893 * (zoom to a selected bounding box), enabled by default. 18894 */ 18895 18896 // @namespace Map 18897 // @section Interaction Options 18898 Map.mergeOptions({ 18899 // @option boxZoom: Boolean = true 18900 // Whether the map can be zoomed to a rectangular area specified by 18901 // dragging the mouse while pressing the shift key. 18902 boxZoom: true 18903 }); 18904 18905 var BoxZoom = Handler.extend({ 18906 initialize: function (map) { 18907 this._map = map; 18908 this._container = map._container; 18909 this._pane = map._panes.overlayPane; 18910 this._resetStateTimeout = 0; 18911 map.on('unload', this._destroy, this); 18912 }, 18913 18914 addHooks: function () { 18915 on(this._container, 'mousedown', this._onMouseDown, this); 18916 }, 18917 18918 removeHooks: function () { 18919 off(this._container, 'mousedown', this._onMouseDown, this); 18920 }, 18921 18922 moved: function () { 18923 return this._moved; 18924 }, 18925 18926 _destroy: function () { 18927 remove(this._pane); 18928 delete this._pane; 18929 }, 18930 18931 _resetState: function () { 18932 this._resetStateTimeout = 0; 18933 this._moved = false; 18934 }, 18935 18936 _clearDeferredResetState: function () { 18937 if (this._resetStateTimeout !== 0) { 18938 clearTimeout(this._resetStateTimeout); 18939 this._resetStateTimeout = 0; 18940 } 18941 }, 18942 18943 _onMouseDown: function (e) { 18944 if (!e.shiftKey || ((e.which !== 1) && (e.button !== 1))) { return false; } 18945 18946 // Clear the deferred resetState if it hasn't executed yet, otherwise it 18947 // will interrupt the interaction and orphan a box element in the container. 18948 this._clearDeferredResetState(); 18949 this._resetState(); 18950 18951 disableTextSelection(); 18952 disableImageDrag(); 18953 18954 this._startPoint = this._map.mouseEventToContainerPoint(e); 18955 18956 on(document, { 18957 contextmenu: stop, 18958 mousemove: this._onMouseMove, 18959 mouseup: this._onMouseUp, 18960 keydown: this._onKeyDown 18961 }, this); 18962 }, 18963 18964 _onMouseMove: function (e) { 18965 if (!this._moved) { 18966 this._moved = true; 18967 18968 this._box = create$1('div', 'leaflet-zoom-box', this._container); 18969 addClass(this._container, 'leaflet-crosshair'); 18970 18971 this._map.fire('boxzoomstart'); 18972 } 18973 18974 this._point = this._map.mouseEventToContainerPoint(e); 18975 18976 var bounds = new Bounds(this._point, this._startPoint), 18977 size = bounds.getSize(); 18978 18979 setPosition(this._box, bounds.min); 18980 18981 this._box.style.width = size.x + 'px'; 18982 this._box.style.height = size.y + 'px'; 18983 }, 18984 18985 _finish: function () { 18986 if (this._moved) { 18987 remove(this._box); 18988 removeClass(this._container, 'leaflet-crosshair'); 18989 } 18990 18991 enableTextSelection(); 18992 enableImageDrag(); 18993 18994 off(document, { 18995 contextmenu: stop, 18996 mousemove: this._onMouseMove, 18997 mouseup: this._onMouseUp, 18998 keydown: this._onKeyDown 18999 }, this); 19000 }, 19001 19002 _onMouseUp: function (e) { 19003 if ((e.which !== 1) && (e.button !== 1)) { return; } 19004 19005 this._finish(); 19006 19007 if (!this._moved) { return; } 19008 // Postpone to next JS tick so internal click event handling 19009 // still see it as "moved". 19010 this._clearDeferredResetState(); 19011 this._resetStateTimeout = setTimeout(bind(this._resetState, this), 0); 19012 19013 var bounds = new LatLngBounds( 19014 this._map.containerPointToLatLng(this._startPoint), 19015 this._map.containerPointToLatLng(this._point)); 19016 19017 this._map 19018 .fitBounds(bounds) 19019 .fire('boxzoomend', {boxZoomBounds: bounds}); 19020 }, 19021 19022 _onKeyDown: function (e) { 19023 if (e.keyCode === 27) { 19024 this._finish(); 19025 this._clearDeferredResetState(); 19026 this._resetState(); 19027 } 19028 } 19029 }); 19030 19031 // @section Handlers 19032 // @property boxZoom: Handler 19033 // Box (shift-drag with mouse) zoom handler. 19034 Map.addInitHook('addHandler', 'boxZoom', BoxZoom); 19035 19036 /* 19037 * L.Handler.DoubleClickZoom is used to handle double-click zoom on the map, enabled by default. 19038 */ 19039 19040 // @namespace Map 19041 // @section Interaction Options 19042 19043 Map.mergeOptions({ 19044 // @option doubleClickZoom: Boolean|String = true 19045 // Whether the map can be zoomed in by double clicking on it and 19046 // zoomed out by double clicking while holding shift. If passed 19047 // `'center'`, double-click zoom will zoom to the center of the 19048 // view regardless of where the mouse was. 19049 doubleClickZoom: true 19050 }); 19051 19052 var DoubleClickZoom = Handler.extend({ 19053 addHooks: function () { 19054 this._map.on('dblclick', this._onDoubleClick, this); 19055 }, 19056 19057 removeHooks: function () { 19058 this._map.off('dblclick', this._onDoubleClick, this); 19059 }, 19060 19061 _onDoubleClick: function (e) { 19062 var map = this._map, 19063 oldZoom = map.getZoom(), 19064 delta = map.options.zoomDelta, 19065 zoom = e.originalEvent.shiftKey ? oldZoom - delta : oldZoom + delta; 19066 19067 if (map.options.doubleClickZoom === 'center') { 19068 map.setZoom(zoom); 19069 } else { 19070 map.setZoomAround(e.containerPoint, zoom); 19071 } 19072 } 19073 }); 19074 19075 // @section Handlers 19076 // 19077 // Map properties include interaction handlers that allow you to control 19078 // interaction behavior in runtime, enabling or disabling certain features such 19079 // as dragging or touch zoom (see `Handler` methods). For example: 19080 // 19081 // ```js 19082 // map.doubleClickZoom.disable(); 19083 // ``` 19084 // 19085 // @property doubleClickZoom: Handler 19086 // Double click zoom handler. 19087 Map.addInitHook('addHandler', 'doubleClickZoom', DoubleClickZoom); 19088 19089 /* 19090 * L.Handler.MapDrag is used to make the map draggable (with panning inertia), enabled by default. 19091 */ 19092 19093 // @namespace Map 19094 // @section Interaction Options 19095 Map.mergeOptions({ 19096 // @option dragging: Boolean = true 19097 // Whether the map is draggable with mouse/touch or not. 19098 dragging: true, 19099 19100 // @section Panning Inertia Options 19101 // @option inertia: Boolean = * 19102 // If enabled, panning of the map will have an inertia effect where 19103 // the map builds momentum while dragging and continues moving in 19104 // the same direction for some time. Feels especially nice on touch 19105 // devices. Enabled by default. 19106 inertia: true, 19107 19108 // @option inertiaDeceleration: Number = 3000 19109 // The rate with which the inertial movement slows down, in pixels/second². 19110 inertiaDeceleration: 3400, // px/s^2 19111 19112 // @option inertiaMaxSpeed: Number = Infinity 19113 // Max speed of the inertial movement, in pixels/second. 19114 inertiaMaxSpeed: Infinity, // px/s 19115 19116 // @option easeLinearity: Number = 0.2 19117 easeLinearity: 0.2, 19118 19119 // TODO refactor, move to CRS 19120 // @option worldCopyJump: Boolean = false 19121 // With this option enabled, the map tracks when you pan to another "copy" 19122 // of the world and seamlessly jumps to the original one so that all overlays 19123 // like markers and vector layers are still visible. 19124 worldCopyJump: false, 19125 19126 // @option maxBoundsViscosity: Number = 0.0 19127 // If `maxBounds` is set, this option will control how solid the bounds 19128 // are when dragging the map around. The default value of `0.0` allows the 19129 // user to drag outside the bounds at normal speed, higher values will 19130 // slow down map dragging outside bounds, and `1.0` makes the bounds fully 19131 // solid, preventing the user from dragging outside the bounds. 19132 maxBoundsViscosity: 0.0 19133 }); 19134 19135 var Drag = Handler.extend({ 19136 addHooks: function () { 19137 if (!this._draggable) { 19138 var map = this._map; 19139 19140 this._draggable = new Draggable(map._mapPane, map._container); 19141 19142 this._draggable.on({ 19143 dragstart: this._onDragStart, 19144 drag: this._onDrag, 19145 dragend: this._onDragEnd 19146 }, this); 19147 19148 this._draggable.on('predrag', this._onPreDragLimit, this); 19149 if (map.options.worldCopyJump) { 19150 this._draggable.on('predrag', this._onPreDragWrap, this); 19151 map.on('zoomend', this._onZoomEnd, this); 19152 19153 map.whenReady(this._onZoomEnd, this); 19154 } 19155 } 19156 addClass(this._map._container, 'leaflet-grab leaflet-touch-drag'); 19157 this._draggable.enable(); 19158 this._positions = []; 19159 this._times = []; 19160 }, 19161 19162 removeHooks: function () { 19163 removeClass(this._map._container, 'leaflet-grab'); 19164 removeClass(this._map._container, 'leaflet-touch-drag'); 19165 this._draggable.disable(); 19166 }, 19167 19168 moved: function () { 19169 return this._draggable && this._draggable._moved; 19170 }, 19171 19172 moving: function () { 19173 return this._draggable && this._draggable._moving; 19174 }, 19175 19176 _onDragStart: function () { 19177 var map = this._map; 19178 19179 map._stop(); 19180 if (this._map.options.maxBounds && this._map.options.maxBoundsViscosity) { 19181 var bounds = toLatLngBounds(this._map.options.maxBounds); 19182 19183 this._offsetLimit = toBounds( 19184 this._map.latLngToContainerPoint(bounds.getNorthWest()).multiplyBy(-1), 19185 this._map.latLngToContainerPoint(bounds.getSouthEast()).multiplyBy(-1) 19186 .add(this._map.getSize())); 19187 19188 this._viscosity = Math.min(1.0, Math.max(0.0, this._map.options.maxBoundsViscosity)); 19189 } else { 19190 this._offsetLimit = null; 19191 } 19192 19193 map 19194 .fire('movestart') 19195 .fire('dragstart'); 19196 19197 if (map.options.inertia) { 19198 this._positions = []; 19199 this._times = []; 19200 } 19201 }, 19202 19203 _onDrag: function (e) { 19204 if (this._map.options.inertia) { 19205 var time = this._lastTime = +new Date(), 19206 pos = this._lastPos = this._draggable._absPos || this._draggable._newPos; 19207 19208 this._positions.push(pos); 19209 this._times.push(time); 19210 19211 this._prunePositions(time); 19212 } 19213 19214 this._map 19215 .fire('move', e) 19216 .fire('drag', e); 19217 }, 19218 19219 _prunePositions: function (time) { 19220 while (this._positions.length > 1 && time - this._times[0] > 50) { 19221 this._positions.shift(); 19222 this._times.shift(); 19223 } 19224 }, 19225 19226 _onZoomEnd: function () { 19227 var pxCenter = this._map.getSize().divideBy(2), 19228 pxWorldCenter = this._map.latLngToLayerPoint([0, 0]); 19229 19230 this._initialWorldOffset = pxWorldCenter.subtract(pxCenter).x; 19231 this._worldWidth = this._map.getPixelWorldBounds().getSize().x; 19232 }, 19233 19234 _viscousLimit: function (value, threshold) { 19235 return value - (value - threshold) * this._viscosity; 19236 }, 19237 19238 _onPreDragLimit: function () { 19239 if (!this._viscosity || !this._offsetLimit) { return; } 19240 19241 var offset = this._draggable._newPos.subtract(this._draggable._startPos); 19242 19243 var limit = this._offsetLimit; 19244 if (offset.x < limit.min.x) { offset.x = this._viscousLimit(offset.x, limit.min.x); } 19245 if (offset.y < limit.min.y) { offset.y = this._viscousLimit(offset.y, limit.min.y); } 19246 if (offset.x > limit.max.x) { offset.x = this._viscousLimit(offset.x, limit.max.x); } 19247 if (offset.y > limit.max.y) { offset.y = this._viscousLimit(offset.y, limit.max.y); } 19248 19249 this._draggable._newPos = this._draggable._startPos.add(offset); 19250 }, 19251 19252 _onPreDragWrap: function () { 19253 // TODO refactor to be able to adjust map pane position after zoom 19254 var worldWidth = this._worldWidth, 19255 halfWidth = Math.round(worldWidth / 2), 19256 dx = this._initialWorldOffset, 19257 x = this._draggable._newPos.x, 19258 newX1 = (x - halfWidth + dx) % worldWidth + halfWidth - dx, 19259 newX2 = (x + halfWidth + dx) % worldWidth - halfWidth - dx, 19260 newX = Math.abs(newX1 + dx) < Math.abs(newX2 + dx) ? newX1 : newX2; 19261 19262 this._draggable._absPos = this._draggable._newPos.clone(); 19263 this._draggable._newPos.x = newX; 19264 }, 19265 19266 _onDragEnd: function (e) { 19267 var map = this._map, 19268 options = map.options, 19269 19270 noInertia = !options.inertia || e.noInertia || this._times.length < 2; 19271 19272 map.fire('dragend', e); 19273 19274 if (noInertia) { 19275 map.fire('moveend'); 19276 19277 } else { 19278 this._prunePositions(+new Date()); 19279 19280 var direction = this._lastPos.subtract(this._positions[0]), 19281 duration = (this._lastTime - this._times[0]) / 1000, 19282 ease = options.easeLinearity, 19283 19284 speedVector = direction.multiplyBy(ease / duration), 19285 speed = speedVector.distanceTo([0, 0]), 19286 19287 limitedSpeed = Math.min(options.inertiaMaxSpeed, speed), 19288 limitedSpeedVector = speedVector.multiplyBy(limitedSpeed / speed), 19289 19290 decelerationDuration = limitedSpeed / (options.inertiaDeceleration * ease), 19291 offset = limitedSpeedVector.multiplyBy(-decelerationDuration / 2).round(); 19292 19293 if (!offset.x && !offset.y) { 19294 map.fire('moveend'); 19295 19296 } else { 19297 offset = map._limitOffset(offset, map.options.maxBounds); 19298 19299 requestAnimFrame(function () { 19300 map.panBy(offset, { 19301 duration: decelerationDuration, 19302 easeLinearity: ease, 19303 noMoveStart: true, 19304 animate: true 19305 }); 19306 }); 19307 } 19308 } 19309 } 19310 }); 19311 19312 // @section Handlers 19313 // @property dragging: Handler 19314 // Map dragging handler (by both mouse and touch). 19315 Map.addInitHook('addHandler', 'dragging', Drag); 19316 19317 /* 19318 * L.Map.Keyboard is handling keyboard interaction with the map, enabled by default. 19319 */ 19320 19321 // @namespace Map 19322 // @section Keyboard Navigation Options 19323 Map.mergeOptions({ 19324 // @option keyboard: Boolean = true 19325 // Makes the map focusable and allows users to navigate the map with keyboard 19326 // arrows and `+`/`-` keys. 19327 keyboard: true, 19328 19329 // @option keyboardPanDelta: Number = 80 19330 // Amount of pixels to pan when pressing an arrow key. 19331 keyboardPanDelta: 80 19332 }); 19333 19334 var Keyboard = Handler.extend({ 19335 19336 keyCodes: { 19337 left: [37], 19338 right: [39], 19339 down: [40], 19340 up: [38], 19341 zoomIn: [187, 107, 61, 171], 19342 zoomOut: [189, 109, 54, 173] 19343 }, 19344 19345 initialize: function (map) { 19346 this._map = map; 19347 19348 this._setPanDelta(map.options.keyboardPanDelta); 19349 this._setZoomDelta(map.options.zoomDelta); 19350 }, 19351 19352 addHooks: function () { 19353 var container = this._map._container; 19354 19355 // make the container focusable by tabbing 19356 if (container.tabIndex <= 0) { 19357 container.tabIndex = '0'; 19358 } 19359 19360 on(container, { 19361 focus: this._onFocus, 19362 blur: this._onBlur, 19363 mousedown: this._onMouseDown 19364 }, this); 19365 19366 this._map.on({ 19367 focus: this._addHooks, 19368 blur: this._removeHooks 19369 }, this); 19370 }, 19371 19372 removeHooks: function () { 19373 this._removeHooks(); 19374 19375 off(this._map._container, { 19376 focus: this._onFocus, 19377 blur: this._onBlur, 19378 mousedown: this._onMouseDown 19379 }, this); 19380 19381 this._map.off({ 19382 focus: this._addHooks, 19383 blur: this._removeHooks 19384 }, this); 19385 }, 19386 19387 _onMouseDown: function () { 19388 if (this._focused) { return; } 19389 19390 var body = document.body, 19391 docEl = document.documentElement, 19392 top = body.scrollTop || docEl.scrollTop, 19393 left = body.scrollLeft || docEl.scrollLeft; 19394 19395 this._map._container.focus(); 19396 19397 window.scrollTo(left, top); 19398 }, 19399 19400 _onFocus: function () { 19401 this._focused = true; 19402 this._map.fire('focus'); 19403 }, 19404 19405 _onBlur: function () { 19406 this._focused = false; 19407 this._map.fire('blur'); 19408 }, 19409 19410 _setPanDelta: function (panDelta) { 19411 var keys = this._panKeys = {}, 19412 codes = this.keyCodes, 19413 i, len; 19414 19415 for (i = 0, len = codes.left.length; i < len; i++) { 19416 keys[codes.left[i]] = [-1 * panDelta, 0]; 19417 } 19418 for (i = 0, len = codes.right.length; i < len; i++) { 19419 keys[codes.right[i]] = [panDelta, 0]; 19420 } 19421 for (i = 0, len = codes.down.length; i < len; i++) { 19422 keys[codes.down[i]] = [0, panDelta]; 19423 } 19424 for (i = 0, len = codes.up.length; i < len; i++) { 19425 keys[codes.up[i]] = [0, -1 * panDelta]; 19426 } 19427 }, 19428 19429 _setZoomDelta: function (zoomDelta) { 19430 var keys = this._zoomKeys = {}, 19431 codes = this.keyCodes, 19432 i, len; 19433 19434 for (i = 0, len = codes.zoomIn.length; i < len; i++) { 19435 keys[codes.zoomIn[i]] = zoomDelta; 19436 } 19437 for (i = 0, len = codes.zoomOut.length; i < len; i++) { 19438 keys[codes.zoomOut[i]] = -zoomDelta; 19439 } 19440 }, 19441 19442 _addHooks: function () { 19443 on(document, 'keydown', this._onKeyDown, this); 19444 }, 19445 19446 _removeHooks: function () { 19447 off(document, 'keydown', this._onKeyDown, this); 19448 }, 19449 19450 _onKeyDown: function (e) { 19451 if (e.altKey || e.ctrlKey || e.metaKey) { return; } 19452 19453 var key = e.keyCode, 19454 map = this._map, 19455 offset; 19456 19457 if (key in this._panKeys) { 19458 if (!map._panAnim || !map._panAnim._inProgress) { 19459 offset = this._panKeys[key]; 19460 if (e.shiftKey) { 19461 offset = toPoint(offset).multiplyBy(3); 19462 } 19463 19464
19464map.panBy(offset); 19465 19466 if (map.options.maxBounds) { 19467 map.panInsideBounds(map.options.maxBounds
vendor: 9,225 bytes, lines 19467-19765
19467); 19468 } 19469 } 19470 } else if (key in this._zoomKeys) { 19471 map.setZoom(map.getZoom() + (e.shiftKey ? 3 : 1) * this._zoomKeys[key]); 19472 19473 } else if (key === 27 && map._popup && map._popup.options.closeOnEscapeKey) { 19474 map.closePopup(); 19475 19476 } else { 19477 return; 19478 } 19479 19480 stop(e); 19481 } 19482 }); 19483 19484 // @section Handlers 19485 // @section Handlers 19486 // @property keyboard: Handler 19487 // Keyboard navigation handler. 19488 Map.addInitHook('addHandler', 'keyboard', Keyboard); 19489 19490 /* 19491 * L.Handler.ScrollWheelZoom is used by L.Map to enable mouse scroll wheel zoom on the map. 19492 */ 19493 19494 // @namespace Map 19495 // @section Interaction Options 19496 Map.mergeOptions({ 19497 // @section Mouse wheel options 19498 // @option scrollWheelZoom: Boolean|String = true 19499 // Whether the map can be zoomed by using the mouse wheel. If passed `'center'`, 19500 // it will zoom to the center of the view regardless of where the mouse was. 19501 scrollWheelZoom: true, 19502 19503 // @option wheelDebounceTime: Number = 40 19504 // Limits the rate at which a wheel can fire (in milliseconds). By default 19505 // user can't zoom via wheel more often than once per 40 ms. 19506 wheelDebounceTime: 40, 19507 19508 // @option wheelPxPerZoomLevel: Number = 60 19509 // How many scroll pixels (as reported by [L.DomEvent.getWheelDelta](#domevent-getwheeldelta)) 19510 // mean a change of one full zoom level. Smaller values will make wheel-zooming 19511 // faster (and vice versa). 19512 wheelPxPerZoomLevel: 60 19513 }); 19514 19515 var ScrollWheelZoom = Handler.extend({ 19516 addHooks: function () { 19517 on(this._map._container, 'wheel', this._onWheelScroll, this); 19518 19519 this._delta = 0; 19520 }, 19521 19522 removeHooks: function () { 19523 off(this._map._container, 'wheel', this._onWheelScroll, this); 19524 }, 19525 19526 _onWheelScroll: function (e) { 19527 var delta = getWheelDelta(e); 19528 19529 var debounce = this._map.options.wheelDebounceTime; 19530 19531 this._delta += delta; 19532 this._lastMousePos = this._map.mouseEventToContainerPoint(e); 19533 19534 if (!this._startTime) { 19535 this._startTime = +new Date(); 19536 } 19537 19538 var left = Math.max(debounce - (+new Date() - this._startTime), 0); 19539 19540 clearTimeout(this._timer); 19541 this._timer = setTimeout(bind(this._performZoom, this), left); 19542 19543 stop(e); 19544 }, 19545 19546 _performZoom: function () { 19547 var map = this._map, 19548 zoom = map.getZoom(), 19549 snap = this._map.options.zoomSnap || 0; 19550 19551 map._stop(); // stop panning and fly animations if any 19552 19553 // map the delta with a sigmoid function to -4..4 range leaning on -1..1 19554 var d2 = this._delta / (this._map.options.wheelPxPerZoomLevel * 4), 19555 d3 = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(d2)))) / Math.LN2, 19556 d4 = snap ? Math.ceil(d3 / snap) * snap : d3, 19557 delta = map._limitZoom(zoom + (this._delta > 0 ? d4 : -d4)) - zoom; 19558 19559 this._delta = 0; 19560 this._startTime = null; 19561 19562 if (!delta) { return; } 19563 19564 if (map.options.scrollWheelZoom === 'center') { 19565 map.setZoom(zoom + delta); 19566 } else { 19567 map.setZoomAround(this._lastMousePos, zoom + delta); 19568 } 19569 } 19570 }); 19571 19572 // @section Handlers 19573 // @property scrollWheelZoom: Handler 19574 // Scroll wheel zoom handler. 19575 Map.addInitHook('addHandler', 'scrollWheelZoom', ScrollWheelZoom); 19576 19577 /* 19578 * L.Map.TapHold is used to simulate `contextmenu` event on long hold, 19579 * which otherwise is not fired by mobile Safari. 19580 */ 19581 19582 var tapHoldDelay = 600; 19583 19584 // @namespace Map 19585 // @section Interaction Options 19586 Map.mergeOptions({ 19587 // @section Touch interaction options 19588 // @option tapHold: Boolean 19589 // Enables simulation of `contextmenu` event, default is `true` for mobile Safari. 19590 tapHold: Browser.touchNative && Browser.safari && Browser.mobile, 19591 19592 // @option tapTolerance: Number = 15 19593 // The max number of pixels a user can shift his finger during touch 19594 // for it to be considered a valid tap. 19595 tapTolerance: 15 19596 }); 19597 19598 var TapHold = Handler.extend({ 19599 addHooks: function () { 19600 on(this._map._container, 'touchstart', this._onDown, this); 19601 }, 19602 19603 removeHooks: function () { 19604 off(this._map._container, 'touchstart', this._onDown, this); 19605 }, 19606 19607 _onDown: function (e) { 19608 clearTimeout(this._holdTimeout); 19609 if (e.touches.length !== 1) { return; } 19610 19611 var first = e.touches[0]; 19612 this._startPos = this._newPos = new Point(first.clientX, first.clientY); 19613 19614 this._holdTimeout = setTimeout(bind(function () { 19615 this._cancel(); 19616 if (!this._isTapValid()) { return; } 19617 19618 // prevent simulated mouse events https://w3c.github.io/touch-events/#mouse-events 19619 on(document, 'touchend', preventDefault); 19620 on(document, 'touchend touchcancel', this._cancelClickPrevent); 19621 this._simulateEvent('contextmenu', first); 19622 }, this), tapHoldDelay); 19623 19624 on(document, 'touchend touchcancel contextmenu', this._cancel, this); 19625 on(document, 'touchmove', this._onMove, this); 19626 }, 19627 19628 _cancelClickPrevent: function cancelClickPrevent() { 19629 off(document, 'touchend', preventDefault); 19630 off(document, 'touchend touchcancel', cancelClickPrevent); 19631 }, 19632 19633 _cancel: function () { 19634 clearTimeout(this._holdTimeout); 19635 off(document, 'touchend touchcancel contextmenu', this._cancel, this); 19636 off(document, 'touchmove', this._onMove, this); 19637 }, 19638 19639 _onMove: function (e) { 19640 var first = e.touches[0]; 19641 this._newPos = new Point(first.clientX, first.clientY); 19642 }, 19643 19644 _isTapValid: function () { 19645 return this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance; 19646 }, 19647 19648 _simulateEvent: function (type, e) { 19649 var simulatedEvent = new MouseEvent(type, { 19650 bubbles: true, 19651 cancelable: true, 19652 view: window, 19653 // detail: 1, 19654 screenX: e.screenX, 19655 screenY: e.screenY, 19656 clientX: e.clientX, 19657 clientY: e.clientY, 19658 // button: 2, 19659 // buttons: 2 19660 }); 19661 19662 simulatedEvent._simulated = true; 19663 19664 e.target.dispatchEvent(simulatedEvent); 19665 } 19666 }); 19667 19668 // @section Handlers 19669 // @property tapHold: Handler 19670 // Long tap handler to simulate `contextmenu` event (useful in mobile Safari). 19671 Map.addInitHook('addHandler', 'tapHold', TapHold); 19672 19673 /* 19674 * L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers. 19675 */ 19676 19677 // @namespace Map 19678 // @section Interaction Options 19679 Map.mergeOptions({ 19680 // @section Touch interaction options 19681 // @option touchZoom: Boolean|String = * 19682 // Whether the map can be zoomed by touch-dragging with two fingers. If 19683 // passed `'center'`, it will zoom to the center of the view regardless of 19684 // where the touch events (fingers) were. Enabled for touch-capable web 19685 // browsers. 19686 touchZoom: Browser.touch, 19687 19688 // @option bounceAtZoomLimits: Boolean = true 19689 // Set it to false if you don't want the map to zoom beyond min/max zoom 19690 // and then bounce back when pinch-zooming. 19691 bounceAtZoomLimits: true 19692 }); 19693 19694 var TouchZoom = Handler.extend({ 19695 addHooks: function () { 19696 addClass(this._map._container, 'leaflet-touch-zoom'); 19697 on(this._map._container, 'touchstart', this._onTouchStart, this); 19698 }, 19699 19700 removeHooks: function () { 19701 removeClass(this._map._container, 'leaflet-touch-zoom'); 19702 off(this._map._container, 'touchstart', this._onTouchStart, this); 19703 }, 19704 19705 _onTouchStart: function (e) { 19706 var map = this._map; 19707 if (!e.touches || e.touches.length !== 2 || map._animatingZoom || this._zooming) { return; } 19708 19709 var p1 = map.mouseEventToContainerPoint(e.touches[0]), 19710 p2 = map.mouseEventToContainerPoint(e.touches[1]); 19711 19712 this._centerPoint = map.getSize()._divideBy(2); 19713 this._startLatLng = map.containerPointToLatLng(this._centerPoint); 19714 if (map.options.touchZoom !== 'center') { 19715 this._pinchStartLatLng = map.containerPointToLatLng(p1.add(p2)._divideBy(2)); 19716 } 19717 19718 this._startDist = p1.distanceTo(p2); 19719 this._startZoom = map.getZoom(); 19720 19721 this._moved = false; 19722 this._zooming = true; 19723 19724 map._stop(); 19725 19726 on(document, 'touchmove', this._onTouchMove, this); 19727 on(document, 'touchend touchcancel', this._onTouchEnd, this); 19728 19729 preventDefault(e); 19730 }, 19731 19732 _onTouchMove: function (e) { 19733 if (!e.touches || e.touches.length !== 2 || !this._zooming) { return; } 19734 19735 var map = this._map, 19736 p1 = map.mouseEventToContainerPoint(e.touches[0]), 19737 p2 = map.mouseEventToContainerPoint(e.touches[1]), 19738 scale = p1.distanceTo(p2) / this._startDist; 19739 19740 this._zoom = map.getScaleZoom(scale, this._startZoom); 19741 19742 if (!map.options.bounceAtZoomLimits && ( 19743 (this._zoom < map.getMinZoom() && scale < 1) || 19744 (this._zoom > map.getMaxZoom() && scale > 1))) { 19745 this._zoom = map._limitZoom(this._zoom); 19746 } 19747 19748 if (map.options.touchZoom === 'center') { 19749 this._center = this._startLatLng; 19750 if (scale === 1) { return; } 19751 } else { 19752 // Get delta from pinch to center, so centerLatLng is delta applied to initial pinchLatLng 19753 var delta = p1._add(p2)._divideBy(2)._subtract(this._centerPoint); 19754 if (scale === 1 && delta.x === 0 && delta.y === 0) { return; } 19755 this._center = map.unproject(map.project(this._pinchStartLatLng, this._zoom).subtract(delta), this._zoom); 19756 } 19757 19758 if (!this._moved) { 19759 map._moveStart(true, false); 19760 this._moved = true; 19761 } 19762 19763 cancelAnimFrame(this._animRequest); 19764 19765 var moveFn = bind(map._move, map, this._center, this._zoom, {pinch: true, round: false}
vendor: 1,625 bytes, lines 19765-19821
19765); 19766 this._animRequest = requestAnimFrame(moveFn, this, true); 19767 19768 preventDefault(e); 19769 }, 19770 19771 _onTouchEnd: function () { 19772 if (!this._moved || !this._zooming) { 19773 this._zooming = false; 19774 return; 19775 } 19776 19777 this._zooming = false; 19778 cancelAnimFrame(this._animRequest); 19779 19780 off(document, 'touchmove', this._onTouchMove, this); 19781 off(document, 'touchend touchcancel', this._onTouchEnd, this); 19782 19783 // Pinch updates GridLayers' levels only when zoomSnap is off, so zoomSnap becomes noUpdate. 19784 if (this._map.options.zoomAnimation) { 19785 this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.zoomSnap); 19786 } else { 19787 this._map._resetView(this._center, this._map._limitZoom(this._zoom)); 19788 } 19789 } 19790 }); 19791 19792 // @section Handlers 19793 // @property touchZoom: Handler 19794 // Touch zoom handler. 19795 Map.addInitHook('addHandler', 'touchZoom', TouchZoom); 19796 19797 Map.BoxZoom = BoxZoom; 19798 Map.DoubleClickZoom = DoubleClickZoom; 19799 Map.Drag = Drag; 19800 Map.Keyboard = Keyboard; 19801 Map.ScrollWheelZoom = ScrollWheelZoom; 19802 Map.TapHold = TapHold; 19803 Map.TouchZoom = TouchZoom; 19804 19805 exports.Bounds = Bounds; 19806 exports.Browser = Browser; 19807 exports.CRS = CRS; 19808 exports.Canvas = Canvas; 19809 exports.Circle = Circle; 19810 exports.CircleMarker = CircleMarker; 19811 exports.Class = Class; 19812 exports.Control = Control; 19813 exports.DivIcon = DivIcon; 19814 exports.DivOverlay = DivOverlay; 19815 exports.DomEvent = DomEvent; 19816 exports.DomUtil = DomUtil; 19817 exports.Draggable = Draggable; 19818 exports.Evented = Evented; 19819 exports.FeatureGroup = FeatureGroup; 19820 exports.GeoJSON = GeoJSON; 19821 exports.GridLayer = GridLayer;
19822 exports.Handler = Handler; 19823 exports.Icon = Icon; 19824 exports.ImageOverlay = ImageOverlay; 19825 exports.LatLng = LatLng; 19826 exports.LatLngBounds = LatLngBounds; 19827 exports.Layer = Layer; 19828 exports.LayerGroup = LayerGroup; 19829 exports.LineUtil = LineUtil; 19830 exports.Map = Map; 19831 exports.Marker = Marker; 19832 exports.Mixin = Mixin; 19833 exports.Path = Path; 19834 exports.Point = Point; 19835 exports.PolyUtil = PolyUtil; 19836 exports.Polygon = Polygon; 19837 exports.Polyline = Polyline; 19838 exports.Popup = Popup; 19839 exports.PosAnimation = PosAnimation; 19840 exports.Projection = index; 19841 exports.Rectangle = Rectangle; 19842 exports.Renderer = Renderer; 19843 exports.SVG = SVG; 19844 exports.SVGOverlay = SVGOverlay; 19845 exports.TileLayer = TileLayer; 19846 exports.Tooltip = Tooltip; 19847 exports.Transformation = Transformation; 19848 exports.Util = Util; 19849 exports.VideoOverlay = VideoOverlay; 19850 exports.bind = bind; 19851 exports.bounds = toBounds; 19852 exports.canvas = canvas; 19853 exports.circle = circle; 19854 exports.circleMarker = circleMarker; 19855 exports.control = control; 19856 exports.divIcon = divIcon; 19857 exports.extend = extend; 19858 exports.featureGroup = featureGroup; 19859 exports.geoJSON = geoJSON; 19860 exports.geoJson = geoJson; 19861 exports.gridLayer = gridLayer; 19862 exports.icon = icon; 19863 exports.imageOverlay = imageOverlay; 19864 exports.latLng = toLatLng; 19865 exports.latLngBounds = toLatLngBounds; 19866 exports.layerGroup = layerGroup; 19867 exports.map = createMap; 19868 exports.marker = marker; 19869 exports.point = toPoint; 19870 exports.polygon = polygon; 19871 exports.polyline = polyline; 19872 exports.popup = popup; 19873 exports.rectangle = rectangle; 19874 exports.setOptions = setOptions; 19875 exports.stamp = stamp; 19876 exports.svg = svg; 19877 exports.svgOverlay = svgOverlay; 19878 exports.tileLayer = tileLayer; 19879 exports.tooltip = tooltip; 19880 exports.transformation = toTransformation; 19881 exports.version = version; 19882 exports.videoOverlay = videoOverlay; 19883 19884 var oldL = window.L; 19885 exports.noConflict = function() { 19886 window.L = oldL; 19887 return this; 19888 } 19889 // Always export us to window global (see #2364) 19890 window.L = exports; 19891 19892})); 19893//# sourceMappingURL=leaflet-src.js.map 19894 19895 19896/***/ }), 19897/* 3 */ 19898/***/ (function(module, exports, __webpack_require__) { 19899 19900//! moment.js locale configuration 19901//! locale : Afrikaans [af] 19902//! author : Werner Mollentze : https://github.com/wernerm 19903 19904;(function (global, factory) { 19905 true ? factory(__webpack_require__(0)) : 19906 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 19907 factory(global.moment) 19908}(this, (function (moment) { 'use strict'; 19909 19910 //! moment.js locale configuration 19911 19912 var af = moment.defineLocale('af', { 19913 months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split( 19914 '_' 19915 ), 19916 monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), 19917 weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split( 19918 '_' 19919 ), 19920 weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), 19921 weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), 19922 meridiemParse: /vm|nm/i, 19923 isPM: function (input) { 19924 return /^nm$/i.test(input); 19925 }, 19926 meridiem: function (hours, minutes, isLower) { 19927 if (hours < 12) { 19928 return isLower ? 'vm' : 'VM'; 19929 } else { 19930 return isLower ? 'nm' : 'NM'; 19931 } 19932 }, 19933 longDateFormat: { 19934 LT: 'HH:mm', 19935 LTS: 'HH:mm:ss', 19936 L: 'DD/MM/YYYY', 19937 LL: 'D MMMM YYYY', 19938 LLL: 'D MMMM YYYY HH:mm', 19939 LLLL: 'dddd, D MMMM YYYY HH:mm', 19940 }, 19941 calendar: { 19942 sameDay: '[Vandag om] LT', 19943 nextDay: '[Môre om] LT', 19944 nextWeek: 'dddd [om] LT', 19945 lastDay: '[Gister om] LT', 19946 lastWeek: '[Laas] dddd [om] LT', 19947 sameElse: 'L', 19948 }, 19949 relativeTime: { 19950 future: 'oor %s', 19951 past: '%s gelede', 19952 s: "'n paar sekondes", 19953 ss: '%d sekondes', 19954 m: "'n minuut", 19955 mm: '%d minute', 19956 h: "'n uur", 19957 hh: '%d ure', 19958 d: "'n dag", 19959 dd: '%d dae', 19960 M: "'n maand", 19961 MM: '%d maande', 19962 y: "'n jaar", 19963 yy: '%d jaar', 19964 }, 19965 dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, 19966 ordinal: function (number) { 19967 return ( 19968 number + 19969 (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') 19970 ); // Thanks to Joris Röling : https://github.com/jjupiter 19971 }, 19972 week: { 19973 dow: 1, // Maandag is die eerste dag van die week. 19974 doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar. 19975 }, 19976 }); 19977 19978 return af; 19979 19980}))); 19981 19982 19983/***/ }), 19984/* 4 */ 19985/***/ (function(module, exports, __webpack_require__) { 19986 19987//! moment.js locale configuration 19988//! locale : Arabic [ar] 19989//! author : Abdel Said: https://github.com/abdelsaid 19990//! author : Ahmed Elkhatib 19991//! author : forabi https://github.com/forabi 19992 19993;(function (global, factory) { 19994 true ? factory(__webpack_require__(0)) : 19995 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 19996 factory(global.moment) 19997}(this, (function (moment) { 'use strict'; 19998 19999 //! moment.js locale configuration 20000 20001 var symbolMap = { 20002 1: 'Ù¡', 20003 2: 'Ù¢', 20004 3: 'Ù£', 20005 4: 'Ù¤', 20006 5: 'Ù¥', 20007 6: 'Ù¦', 20008 7: 'Ù§', 20009 8: 'Ù¨', 20010 9: 'Ù©', 20011 0: 'Ù ', 20012 }, 20013 numberMap = { 20014 'Ù¡': '1', 20015 'Ù¢': '2', 20016 'Ù£': '3', 20017 'Ù¤': '4', 20018 'Ù¥': '5', 20019 'Ù¦': '6', 20020 'Ù§': '7', 20021 'Ù¨': '8', 20022 'Ù©': '9', 20023 'Ù ': '0', 20024 }, 20025 pluralForm = function (n) { 20026 return n === 0 20027 ? 0 20028 : n === 1 20029 ? 1 20030 : n === 2 20031 ? 2 20032 : n % 100 >= 3 && n % 100 <= 10 20033 ? 3 20034 : n % 100 >= 11 20035 ? 4 20036 : 5; 20037 }, 20038 plurals = { 20039 s: [ 20040 'Ø£Ù٠٠٠ثاÙÙØ©', 20041 'ثاÙÙØ© ÙØ§ØØ¯Ø©', 20042 ['ثاÙÙØªØ§Ù', 'ثاÙÙØªÙÙ'], 20043 '%d Ø«ÙØ§Ù', 20044 '%d ثاÙÙØ©', 20045 '%d ثاÙÙØ©', 20046 ], 20047 m: [ 20048 'Ø£Ù٠٠٠دÙÙÙØ©', 20049 'دÙÙÙØ© ÙØ§ØØ¯Ø©', 20050 ['دÙÙÙØªØ§Ù', 'دÙÙÙØªÙÙ'], 20051 '%d Ø¯ÙØ§Ø¦Ù', 20052 '%d دÙÙÙØ©', 20053 '%d دÙÙÙØ©', 20054 ], 20055 h: [ 20056 'Ø£Ù٠٠٠ساعة', 20057 'ساعة ÙØ§ØØ¯Ø©', 20058 ['ساعتاÙ', 'ساعتÙÙ'], 20059 '%d ساعات', 20060 '%d ساعة', 20061 '%d ساعة', 20062 ], 20063 d: [ 20064 'Ø£ÙÙ Ù Ù ÙÙÙ ', 20065 'ÙÙÙ ÙØ§ØØ¯', 20066 ['ÙÙ٠اÙ', 'ÙÙÙ ÙÙ'], 20067 '%d Ø£ÙØ§Ù ', 20068 '%d ÙÙÙ ÙØ§', 20069 '%d ÙÙÙ ', 20070 ], 20071 M: [ 20072 'Ø£ÙÙ Ù Ù Ø´ÙØ±', 20073 'Ø´ÙØ± ÙØ§ØØ¯', 20074 ['Ø´ÙØ±Ø§Ù', 'Ø´ÙØ±ÙÙ'], 20075 '%d Ø£Ø´ÙØ±', 20076 '%d Ø´ÙØ±Ø§', 20077 '%d Ø´ÙØ±', 20078 ], 20079 y: [ 20080 'Ø£Ù٠٠٠عا٠', 20081 'Ø¹Ø§Ù ÙØ§ØØ¯', 20082 ['عا٠اÙ', 'عا٠ÙÙ'], 20083 '%d Ø£Ø¹ÙØ§Ù ', 20084 '%d Ø¹Ø§Ù ÙØ§', 20085 '%d عا٠', 20086 ], 20087 }, 20088 pluralize = function (u) { 20089 return function (number, withoutSuffix, string, isFuture) { 20090 var f = pluralForm(number), 20091 str = plurals[u][pluralForm(number)]; 20092 if (f === 2) { 20093 str = str[withoutSuffix ? 0 : 1]; 20094 } 20095 return str.replace(/%d/i, number); 20096 }; 20097 }, 20098 months = [ 20099 'ÙÙØ§Ùر', 20100 'ÙØ¨Ø±Ø§Ùر', 20101 '٠ارس', 20102 'أبرÙÙ', 20103 '٠اÙÙ', 20104 'ÙÙÙÙÙ', 20105 'ÙÙÙÙÙ', 20106 'أغسطس', 20107 'سبت٠بر', 20108 'Ø£ÙØªÙبر', 20109 'ÙÙÙ٠بر', 20110 'Ø¯ÙØ³Ù بر', 20111 ]; 20112 20113 var ar = moment.defineLocale('ar', { 20114 months: months, 20115 monthsShort: months, 20116 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 20117 weekdaysShort: 'Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 20118 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 20119 weekdaysParseExact: true, 20120 longDateFormat: { 20121 LT: 'HH:mm', 20122 LTS: 'HH:mm:ss', 20123 L: 'D/\u200FM/\u200FYYYY', 20124 LL: 'D MMMM YYYY', 20125 LLL: 'D MMMM YYYY HH:mm', 20126 LLLL: 'dddd D MMMM YYYY HH:mm', 20127 }, 20128 meridiemParse: /ص|Ù /, 20129 isPM: function (input) { 20130 return 'Ù ' === input; 20131 }, 20132 meridiem: function (hour, minute, isLower) { 20133 if (hour < 12) { 20134 return 'ص'; 20135 } else { 20136 return 'Ù '; 20137 } 20138 }, 20139 calendar: { 20140 sameDay: '[اÙÙÙÙ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20141 nextDay: '[ØºØ¯ÙØ§ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20142 nextWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20143 lastDay: '[أ٠س Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20144 lastWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20145 sameElse: 'L', 20146 }, 20147 relativeTime: { 20148 future: 'بعد %s', 20149 past: 'Ù ÙØ° %s', 20150 s: pluralize('s'), 20151 ss: pluralize('s'), 20152 m: pluralize('m'), 20153 mm: pluralize('m'), 20154 h: pluralize('h'), 20155 hh: pluralize('h'), 20156 d: pluralize('d'), 20157 dd: pluralize('d'), 20158 M: pluralize('M'), 20159 MM: pluralize('M'), 20160 y: pluralize('y'), 20161 yy: pluralize('y'), 20162 }, 20163 preparse: function (string) { 20164 return string 20165 .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { 20166 return numberMap[match]; 20167 }) 20168 .replace(/Ø/g, ','); 20169 }, 20170 postformat: function (string) { 20171 return string 20172 .replace(/\d/g, function (match) { 20173 return symbolMap[match]; 20174 }) 20175 .replace(/,/g, 'Ø'); 20176 }, 20177 week: { 20178 dow: 6, // Saturday is the first day of the week. 20179 doy: 12, // The week that contains Jan 12th is the first week of the year. 20180 }, 20181 }); 20182 20183 return ar; 20184 20185}))); 20186 20187 20188/***/ }), 20189/* 5 */ 20190/***/ (function(module, exports, __webpack_require__) { 20191 20192//! moment.js locale configuration 20193//! locale : Arabic (Algeria) [ar-dz] 20194//! author : Amine Roukh: https://github.com/Amine27 20195//! author : Abdel Said: https://github.com/abdelsaid 20196//! author : Ahmed Elkhatib 20197//! author : forabi https://github.com/forabi 20198//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem 20199 20200;(function (global, factory) { 20201 true ? factory(__webpack_require__(0)) : 20202 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 20203 factory(global.moment) 20204}(this, (function (moment) { 'use strict'; 20205 20206 //! moment.js locale configuration 20207 20208 var pluralForm = function (n) { 20209 return n === 0 20210 ? 0 20211 : n === 1 20212 ? 1 20213 : n === 2 20214 ? 2 20215 : n % 100 >= 3 && n % 100 <= 10 20216 ? 3 20217 : n % 100 >= 11 20218 ? 4 20219 : 5; 20220 }, 20221 plurals = { 20222 s: [ 20223 'Ø£Ù٠٠٠ثاÙÙØ©', 20224 'ثاÙÙØ© ÙØ§ØØ¯Ø©', 20225 ['ثاÙÙØªØ§Ù', 'ثاÙÙØªÙÙ'], 20226 '%d Ø«ÙØ§Ù', 20227 '%d ثاÙÙØ©', 20228 '%d ثاÙÙØ©', 20229 ], 20230 m: [ 20231 'Ø£Ù٠٠٠دÙÙÙØ©', 20232 'دÙÙÙØ© ÙØ§ØØ¯Ø©', 20233 ['دÙÙÙØªØ§Ù', 'دÙÙÙØªÙÙ'], 20234 '%d Ø¯ÙØ§Ø¦Ù', 20235 '%d دÙÙÙØ©', 20236 '%d دÙÙÙØ©', 20237 ], 20238 h: [ 20239 'Ø£Ù٠٠٠ساعة', 20240 'ساعة ÙØ§ØØ¯Ø©', 20241 ['ساعتاÙ', 'ساعتÙÙ'], 20242 '%d ساعات', 20243 '%d ساعة', 20244 '%d ساعة', 20245 ], 20246 d: [ 20247 'Ø£ÙÙ Ù Ù ÙÙÙ ', 20248 'ÙÙÙ ÙØ§ØØ¯', 20249 ['ÙÙ٠اÙ', 'ÙÙÙ ÙÙ'], 20250 '%d Ø£ÙØ§Ù ', 20251 '%d ÙÙÙ ÙØ§', 20252 '%d ÙÙÙ ', 20253 ], 20254 M: [ 20255 'Ø£ÙÙ Ù Ù Ø´ÙØ±', 20256 'Ø´ÙØ± ÙØ§ØØ¯', 20257 ['Ø´ÙØ±Ø§Ù', 'Ø´ÙØ±ÙÙ'], 20258 '%d Ø£Ø´ÙØ±', 20259 '%d Ø´ÙØ±Ø§', 20260 '%d Ø´ÙØ±', 20261 ], 20262 y: [ 20263 'Ø£Ù٠٠٠عا٠', 20264 'Ø¹Ø§Ù ÙØ§ØØ¯', 20265 ['عا٠اÙ', 'عا٠ÙÙ'], 20266 '%d Ø£Ø¹ÙØ§Ù ', 20267 '%d Ø¹Ø§Ù ÙØ§', 20268 '%d عا٠', 20269 ], 20270 }, 20271 pluralize = function (u) { 20272 return function (number, withoutSuffix, string, isFuture) { 20273 var f = pluralForm(number), 20274 str = plurals[u][pluralForm(number)]; 20275 if (f === 2) { 20276 str = str[withoutSuffix ? 0 : 1]; 20277 } 20278 return str.replace(/%d/i, number); 20279 }; 20280 }, 20281 months = [ 20282 'جاÙÙÙ', 20283 'ÙÙÙØ±Ù', 20284 '٠ارس', 20285 'Ø£ÙØ±ÙÙ', 20286 '٠اÙ', 20287 'Ø¬ÙØ§Ù', 20288 'جÙÙÙÙØ©', 20289 'Ø£ÙØª', 20290 'سبت٠بر', 20291 'Ø£ÙØªÙبر', 20292 'ÙÙÙ٠بر', 20293 'Ø¯ÙØ³Ù بر', 20294 ]; 20295 20296 var arDz = moment.defineLocale('ar-dz', { 20297 months: months, 20298 monthsShort: months, 20299 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 20300 weekdaysShort: 'Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 20301 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 20302 weekdaysParseExact: true, 20303 longDateFormat: { 20304 LT: 'HH:mm', 20305 LTS: 'HH:mm:ss', 20306 L: 'D/\u200FM/\u200FYYYY', 20307 LL: 'D MMMM YYYY', 20308 LLL: 'D MMMM YYYY HH:mm', 20309 LLLL: 'dddd D MMMM YYYY HH:mm', 20310 }, 20311 meridiemParse: /ص|Ù /, 20312 isPM: function (input) { 20313 return 'Ù ' === input; 20314 }, 20315 meridiem: function (hour, minute, isLower) { 20316 if (hour < 12) { 20317 return 'ص'; 20318 } else { 20319 return 'Ù '; 20320 } 20321 }, 20322 calendar: { 20323 sameDay: '[اÙÙÙÙ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20324 nextDay: '[ØºØ¯ÙØ§ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20325 nextWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20326 lastDay: '[أ٠س Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20327 lastWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20328 sameElse: 'L', 20329 }, 20330 relativeTime: { 20331 future: 'بعد %s', 20332 past: 'Ù ÙØ° %s', 20333 s: pluralize('s'), 20334 ss: pluralize('s'), 20335 m: pluralize('m'), 20336 mm: pluralize('m'), 20337 h: pluralize('h'), 20338 hh: pluralize('h'), 20339 d: pluralize('d'), 20340 dd: pluralize('d'), 20341 M: pluralize('M'), 20342 MM: pluralize('M'), 20343 y: pluralize('y'), 20344 yy: pluralize('y'), 20345 }, 20346 postformat: function (string) { 20347 return string.replace(/,/g, 'Ø'); 20348 }, 20349 week: { 20350 dow: 0, // Sunday is the first day of the week. 20351 doy: 4, // The week that contains Jan 4th is the first week of the year. 20352 }, 20353 }); 20354 20355 return arDz; 20356 20357}))); 20358 20359 20360/***/ }), 20361/* 6 */ 20362/***/ (function(module, exports, __webpack_require__) { 20363 20364//! moment.j
vendor: 16,384 bytes, lines 20364-20864
20364s locale configuration 20365//! locale : Arabic (Kuwait) [ar-kw] 20366//! author : Nusret Parlak: https://github.com/nusretparlak 20367 20368;(function (global, factory) { 20369 true ? factory(__webpack_require__(0)) : 20370 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 20371 factory(global.moment) 20372}(this, (function (moment) { 'use strict'; 20373 20374 //! moment.js locale configuration 20375 20376 var arKw = moment.defineLocale('ar-kw', { 20377 months: 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙ_ÙÙÙÙÙ_ÙÙÙÙÙØ²_غشت_Ø´ØªÙØ¨Ø±_Ø£ÙØªÙبر_ÙÙÙØ¨Ø±_Ø¯Ø¬ÙØ¨Ø±'.split( 20378 '_' 20379 ), 20380 monthsShort: 20381 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙ_ÙÙÙÙÙ_ÙÙÙÙÙØ²_غشت_Ø´ØªÙØ¨Ø±_Ø£ÙØªÙبر_ÙÙÙØ¨Ø±_Ø¯Ø¬ÙØ¨Ø±'.split( 20382 '_' 20383 ), 20384 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥ØªÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 20385 weekdaysShort: 'Ø§ØØ¯_اتÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_اربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 20386 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 20387 weekdaysParseExact: true, 20388 longDateFormat: { 20389 LT: 'HH:mm', 20390 LTS: 'HH:mm:ss', 20391 L: 'DD/MM/YYYY', 20392 LL: 'D MMMM YYYY', 20393 LLL: 'D MMMM YYYY HH:mm', 20394 LLLL: 'dddd D MMMM YYYY HH:mm', 20395 }, 20396 calendar: { 20397 sameDay: '[اÙÙÙ٠عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20398 nextDay: '[غدا عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20399 nextWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20400 lastDay: '[أ٠س عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20401 lastWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20402 sameElse: 'L', 20403 }, 20404 relativeTime: { 20405 future: 'ÙÙ %s', 20406 past: 'Ù ÙØ° %s', 20407 s: 'Ø«ÙØ§Ù', 20408 ss: '%d ثاÙÙØ©', 20409 m: 'دÙÙÙØ©', 20410 mm: '%d Ø¯ÙØ§Ø¦Ù', 20411 h: 'ساعة', 20412 hh: '%d ساعات', 20413 d: 'ÙÙÙ ', 20414 dd: '%d Ø£ÙØ§Ù ', 20415 M: 'Ø´ÙØ±', 20416 MM: '%d Ø£Ø´ÙØ±', 20417 y: 'Ø³ÙØ©', 20418 yy: '%d سÙÙØ§Øª', 20419 }, 20420 week: { 20421 dow: 0, // Sunday is the first day of the week. 20422 doy: 12, // The week that contains Jan 12th is the first week of the year. 20423 }, 20424 }); 20425 20426 return arKw; 20427 20428}))); 20429 20430 20431/***/ }), 20432/* 7 */ 20433/***/ (function(module, exports, __webpack_require__) { 20434 20435//! moment.js locale configuration 20436//! locale : Arabic (Libya) [ar-ly] 20437//! author : Ali Hmer: https://github.com/kikoanis 20438 20439;(function (global, factory) { 20440 true ? factory(__webpack_require__(0)) : 20441 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 20442 factory(global.moment) 20443}(this, (function (moment) { 'use strict'; 20444 20445 //! moment.js locale configuration 20446 20447 var symbolMap = { 20448 1: '1', 20449 2: '2', 20450 3: '3', 20451 4: '4', 20452 5: '5', 20453 6: '6', 20454 7: '7', 20455 8: '8', 20456 9: '9', 20457 0: '0', 20458 }, 20459 pluralForm = function (n) { 20460 return n === 0 20461 ? 0 20462 : n === 1 20463 ? 1 20464 : n === 2 20465 ? 2 20466 : n % 100 >= 3 && n % 100 <= 10 20467 ? 3 20468 : n % 100 >= 11 20469 ? 4 20470 : 5; 20471 }, 20472 plurals = { 20473 s: [ 20474 'Ø£Ù٠٠٠ثاÙÙØ©', 20475 'ثاÙÙØ© ÙØ§ØØ¯Ø©', 20476 ['ثاÙÙØªØ§Ù', 'ثاÙÙØªÙÙ'], 20477 '%d Ø«ÙØ§Ù', 20478 '%d ثاÙÙØ©', 20479 '%d ثاÙÙØ©', 20480 ], 20481 m: [ 20482 'Ø£Ù٠٠٠دÙÙÙØ©', 20483 'دÙÙÙØ© ÙØ§ØØ¯Ø©', 20484 ['دÙÙÙØªØ§Ù', 'دÙÙÙØªÙÙ'], 20485 '%d Ø¯ÙØ§Ø¦Ù', 20486 '%d دÙÙÙØ©', 20487 '%d دÙÙÙØ©', 20488 ], 20489 h: [ 20490 'Ø£Ù٠٠٠ساعة', 20491 'ساعة ÙØ§ØØ¯Ø©', 20492 ['ساعتاÙ', 'ساعتÙÙ'], 20493 '%d ساعات', 20494 '%d ساعة', 20495 '%d ساعة', 20496 ], 20497 d: [ 20498 'Ø£ÙÙ Ù Ù ÙÙÙ ', 20499 'ÙÙÙ ÙØ§ØØ¯', 20500 ['ÙÙ٠اÙ', 'ÙÙÙ ÙÙ'], 20501 '%d Ø£ÙØ§Ù ', 20502 '%d ÙÙÙ ÙØ§', 20503 '%d ÙÙÙ ', 20504 ], 20505 M: [ 20506 'Ø£ÙÙ Ù Ù Ø´ÙØ±', 20507 'Ø´ÙØ± ÙØ§ØØ¯', 20508 ['Ø´ÙØ±Ø§Ù', 'Ø´ÙØ±ÙÙ'], 20509 '%d Ø£Ø´ÙØ±', 20510 '%d Ø´ÙØ±Ø§', 20511 '%d Ø´ÙØ±', 20512 ], 20513 y: [ 20514 'Ø£Ù٠٠٠عا٠', 20515 'Ø¹Ø§Ù ÙØ§ØØ¯', 20516 ['عا٠اÙ', 'عا٠ÙÙ'], 20517 '%d Ø£Ø¹ÙØ§Ù ', 20518 '%d Ø¹Ø§Ù ÙØ§', 20519 '%d عا٠', 20520 ], 20521 }, 20522 pluralize = function (u) { 20523 return function (number, withoutSuffix, string, isFuture) { 20524 var f = pluralForm(number), 20525 str = plurals[u][pluralForm(number)]; 20526 if (f === 2) { 20527 str = str[withoutSuffix ? 0 : 1]; 20528 } 20529 return str.replace(/%d/i, number); 20530 }; 20531 }, 20532 months = [ 20533 'ÙÙØ§Ùر', 20534 'ÙØ¨Ø±Ø§Ùر', 20535 '٠ارس', 20536 'أبرÙÙ', 20537 '٠اÙÙ', 20538 'ÙÙÙÙÙ', 20539 'ÙÙÙÙÙ', 20540 'أغسطس', 20541 'سبت٠بر', 20542 'Ø£ÙØªÙبر', 20543 'ÙÙÙ٠بر', 20544 'Ø¯ÙØ³Ù بر', 20545 ]; 20546 20547 var arLy = moment.defineLocale('ar-ly', { 20548 months: months, 20549 monthsShort: months, 20550 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 20551 weekdaysShort: 'Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 20552 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 20553 weekdaysParseExact: true, 20554 longDateFormat: { 20555 LT: 'HH:mm', 20556 LTS: 'HH:mm:ss', 20557 L: 'D/\u200FM/\u200FYYYY', 20558 LL: 'D MMMM YYYY', 20559 LLL: 'D MMMM YYYY HH:mm', 20560 LLLL: 'dddd D MMMM YYYY HH:mm', 20561 }, 20562 meridiemParse: /ص|Ù /, 20563 isPM: function (input) { 20564 return 'Ù ' === input; 20565 }, 20566 meridiem: function (hour, minute, isLower) { 20567 if (hour < 12) { 20568 return 'ص'; 20569 } else { 20570 return 'Ù '; 20571 } 20572 }, 20573 calendar: { 20574 sameDay: '[اÙÙÙÙ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20575 nextDay: '[ØºØ¯ÙØ§ Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20576 nextWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20577 lastDay: '[أ٠س Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20578 lastWeek: 'dddd [Ø¹ÙØ¯ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20579 sameElse: 'L', 20580 }, 20581 relativeTime: { 20582 future: 'بعد %s', 20583 past: 'Ù ÙØ° %s', 20584 s: pluralize('s'), 20585 ss: pluralize('s'), 20586 m: pluralize('m'), 20587 mm: pluralize('m'), 20588 h: pluralize('h'), 20589 hh: pluralize('h'), 20590 d: pluralize('d'), 20591 dd: pluralize('d'), 20592 M: pluralize('M'), 20593 MM: pluralize('M'), 20594 y: pluralize('y'), 20595 yy: pluralize('y'), 20596 }, 20597 preparse: function (string) { 20598 return string.replace(/Ø/g, ','); 20599 }, 20600 postformat: function (string) { 20601 return string 20602 .replace(/\d/g, function (match) { 20603 return symbolMap[match]; 20604 }) 20605 .replace(/,/g, 'Ø'); 20606 }, 20607 week: { 20608 dow: 6, // Saturday is the first day of the week. 20609 doy: 12, // The week that contains Jan 12th is the first week of the year. 20610 }, 20611 }); 20612 20613 return arLy; 20614 20615}))); 20616 20617 20618/***/ }), 20619/* 8 */ 20620/***/ (function(module, exports, __webpack_require__) { 20621 20622//! moment.js locale configuration 20623//! locale : Arabic (Morocco) [ar-ma] 20624//! author : ElFadili Yassine : https://github.com/ElFadiliY 20625//! author : Abdel Said : https://github.com/abdelsaid 20626 20627;(function (global, factory) { 20628 true ? factory(__webpack_require__(0)) : 20629 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 20630 factory(global.moment) 20631}(this, (function (moment) { 'use strict'; 20632 20633 //! moment.js locale configuration 20634 20635 var arMa = moment.defineLocale('ar-ma', { 20636 months: 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙ_ÙÙÙÙÙ_ÙÙÙÙÙØ²_غشت_Ø´ØªÙØ¨Ø±_Ø£ÙØªÙبر_ÙÙÙØ¨Ø±_Ø¯Ø¬ÙØ¨Ø±'.split( 20637 '_' 20638 ), 20639 monthsShort: 20640 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙ_ÙÙÙÙÙ_ÙÙÙÙÙØ²_غشت_Ø´ØªÙØ¨Ø±_Ø£ÙØªÙبر_ÙÙÙØ¨Ø±_Ø¯Ø¬ÙØ¨Ø±'.split( 20641 '_' 20642 ), 20643 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 20644 weekdaysShort: 'Ø§ØØ¯_اثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_اربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 20645 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 20646 weekdaysParseExact: true, 20647 longDateFormat: { 20648 LT: 'HH:mm', 20649 LTS: 'HH:mm:ss', 20650 L: 'DD/MM/YYYY', 20651 LL: 'D MMMM YYYY', 20652 LLL: 'D MMMM YYYY HH:mm', 20653 LLLL: 'dddd D MMMM YYYY HH:mm', 20654 }, 20655 calendar: { 20656 sameDay: '[اÙÙÙ٠عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20657 nextDay: '[غدا عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20658 nextWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20659 lastDay: '[أ٠س عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20660 lastWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20661 sameElse: 'L', 20662 }, 20663 relativeTime: { 20664 future: 'ÙÙ %s', 20665 past: 'Ù ÙØ° %s', 20666 s: 'Ø«ÙØ§Ù', 20667 ss: '%d ثاÙÙØ©', 20668 m: 'دÙÙÙØ©', 20669 mm: '%d Ø¯ÙØ§Ø¦Ù', 20670 h: 'ساعة', 20671 hh: '%d ساعات', 20672 d: 'ÙÙÙ ', 20673 dd: '%d Ø£ÙØ§Ù ', 20674 M: 'Ø´ÙØ±', 20675 MM: '%d Ø£Ø´ÙØ±', 20676 y: 'Ø³ÙØ©', 20677 yy: '%d سÙÙØ§Øª', 20678 }, 20679 week: { 20680 dow: 1, // Monday is the first day of the week. 20681 doy: 4, // The week that contains Jan 4th is the first week of the year. 20682 }, 20683 }); 20684 20685 return arMa; 20686 20687}))); 20688 20689 20690/***/ }), 20691/* 9 */ 20692/***/ (function(module, exports, __webpack_require__) { 20693 20694//! moment.js locale configuration 20695//! locale : Arabic (Saudi Arabia) [ar-sa] 20696//! author : Suhail Alkowaileet : https://github.com/xsoh 20697 20698;(function (global, factory) { 20699 true ? factory(__webpack_require__(0)) : 20700 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 20701 factory(global.moment) 20702}(this, (function (moment) { 'use strict'; 20703 20704 //! moment.js locale configuration 20705 20706 var symbolMap = { 20707 1: 'Ù¡', 20708 2: 'Ù¢', 20709 3: 'Ù£', 20710 4: 'Ù¤', 20711 5: 'Ù¥', 20712 6: 'Ù¦', 20713 7: 'Ù§', 20714 8: 'Ù¨', 20715 9: 'Ù©', 20716 0: 'Ù ', 20717 }, 20718 numberMap = { 20719 'Ù¡': '1', 20720 'Ù¢': '2', 20721 'Ù£': '3', 20722 'Ù¤': '4', 20723 'Ù¥': '5', 20724 'Ù¦': '6', 20725 'Ù§': '7', 20726 'Ù¨': '8', 20727 'Ù©': '9', 20728 'Ù ': '0', 20729 }; 20730 20731 var arSa = moment.defineLocale('ar-sa', { 20732 months: 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙÙ_ÙÙÙÙÙ_ÙÙÙÙÙ_أغسطس_سبت٠بر_Ø£ÙØªÙبر_ÙÙÙ٠بر_Ø¯ÙØ³Ù بر'.split( 20733 '_' 20734 ), 20735 monthsShort: 20736 'ÙÙØ§Ùر_ÙØ¨Ø±Ø§Ùر_٠ارس_أبرÙÙ_٠اÙÙ_ÙÙÙÙÙ_ÙÙÙÙÙ_أغسطس_سبت٠بر_Ø£ÙØªÙبر_ÙÙÙ٠بر_Ø¯ÙØ³Ù بر'.split( 20737 '_' 20738 ), 20739 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 20740 weekdaysShort: 'Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 20741 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 20742 weekdaysParseExact: true, 20743 longDateFormat: { 20744 LT: 'HH:mm', 20745 LTS: 'HH:mm:ss', 20746 L: 'DD/MM/YYYY', 20747 LL: 'D MMMM YYYY', 20748 LLL: 'D MMMM YYYY HH:mm', 20749 LLLL: 'dddd D MMMM YYYY HH:mm', 20750 }, 20751 meridiemParse: /ص|Ù /, 20752 isPM: function (input) { 20753 return 'Ù ' === input; 20754 }, 20755 meridiem: function (hour, minute, isLower) { 20756 if (hour < 12) { 20757 return 'ص'; 20758 } else { 20759 return 'Ù '; 20760 } 20761 }, 20762 calendar: { 20763 sameDay: '[اÙÙÙ٠عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20764 nextDay: '[غدا عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20765 nextWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20766 lastDay: '[أ٠س عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20767 lastWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20768 sameElse: 'L', 20769 }, 20770 relativeTime: { 20771 future: 'ÙÙ %s', 20772 past: 'Ù ÙØ° %s', 20773 s: 'Ø«ÙØ§Ù', 20774 ss: '%d ثاÙÙØ©', 20775 m: 'دÙÙÙØ©', 20776 mm: '%d Ø¯ÙØ§Ø¦Ù', 20777 h: 'ساعة', 20778 hh: '%d ساعات', 20779 d: 'ÙÙÙ ', 20780 dd: '%d Ø£ÙØ§Ù ', 20781 M: 'Ø´ÙØ±', 20782 MM: '%d Ø£Ø´ÙØ±', 20783 y: 'Ø³ÙØ©', 20784 yy: '%d سÙÙØ§Øª', 20785 }, 20786 preparse: function (string) { 20787 return string 20788 .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { 20789 return numberMap[match]; 20790 }) 20791 .replace(/Ø/g, ','); 20792 }, 20793 postformat: function (string) { 20794 return string 20795 .replace(/\d/g, function (match) { 20796 return symbolMap[match]; 20797 }) 20798 .replace(/,/g, 'Ø'); 20799 }, 20800 week: { 20801 dow: 0, // Sunday is the first day of the week. 20802 doy: 6, // The week that contains Jan 6th is the first week of the year. 20803 }, 20804 }); 20805 20806 return arSa; 20807 20808}))); 20809 20810 20811/***/ }), 20812/* 10 */ 20813/***/ (function(module, exports, __webpack_require__) { 20814 20815//! moment.js locale configuration 20816//! locale : Arabic (Tunisia) [ar-tn] 20817//! author : Nader Toukabri : https://github.com/naderio 20818 20819;(function (global, factory) { 20820 true ? factory(__webpack_require__(0)) : 20821 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 20822 factory(global.moment) 20823}(this, (function (moment) { 'use strict'; 20824 20825 //! moment.js locale configuration 20826 20827 var arTn = moment.defineLocale('ar-tn', { 20828 months: 'جاÙÙÙ_ÙÙÙØ±Ù_٠ارس_Ø£ÙØ±ÙÙ_٠اÙ_Ø¬ÙØ§Ù_جÙÙÙÙØ©_Ø£ÙØª_سبت٠بر_Ø£ÙØªÙبر_ÙÙÙ٠بر_Ø¯ÙØ³Ù بر'.split( 20829 '_' 20830 ), 20831 monthsShort: 20832 'جاÙÙÙ_ÙÙÙØ±Ù_٠ارس_Ø£ÙØ±ÙÙ_٠اÙ_Ø¬ÙØ§Ù_جÙÙÙÙØ©_Ø£ÙØª_سبت٠بر_Ø£ÙØªÙبر_ÙÙÙ٠بر_Ø¯ÙØ³Ù بر'.split( 20833 '_' 20834 ), 20835 weekdays: 'Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù ÙØ³_Ø§ÙØ¬Ù عة_Ø§ÙØ³Ø¨Øª'.split('_'), 20836 weekdaysShort: 'Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù ÙØ³_ج٠عة_سبت'.split('_'), 20837 weekdaysMin: 'Ø_Ù_Ø«_ر_Ø®_ج_س'.split('_'), 20838 weekdaysParseExact: true, 20839 longDateFormat: { 20840 LT: 'HH:mm', 20841 LTS: 'HH:mm:ss', 20842 L: 'DD/MM/YYYY', 20843 LL: 'D MMMM YYYY', 20844 LLL: 'D MMMM YYYY HH:mm', 20845 LLLL: 'dddd D MMMM YYYY HH:mm', 20846 }, 20847 calendar: { 20848 sameDay: '[اÙÙÙ٠عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20849 nextDay: '[غدا عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20850 nextWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20851 lastDay: '[أ٠س عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20852 lastWeek: 'dddd [عÙÙ Ø§ÙØ³Ø§Ø¹Ø©] LT', 20853 sameElse: 'L', 20854 }, 20855 relativeTime: { 20856 future: 'ÙÙ %s', 20857 past: 'Ù ÙØ° %s', 20858 s: 'Ø«ÙØ§Ù', 20859 ss: '%d ثاÙÙØ©', 20860 m: 'دÙÙÙØ©', 20861 mm: '%d Ø¯ÙØ§Ø¦Ù', 20862 h: 'ساعة', 20863 hh: '%d ساعات', 20864 d
20864: 'ÙÙÙ ', 20865 dd: '%d Ø£ÙØ§Ù ', 20866 M: 'Ø´ÙØ±', 20867 MM: '%d Ø£Ø´ÙØ±', 20868 y: 'Ø³ÙØ©', 20869 yy: '%d سÙÙØ§Øª', 20870 }, 20871 week: { 20872 dow: 1, // Monday is the first day of the week. 20873 doy: 4, // The week that contains Jan 4th is the first week of the year. 20874 }, 20875 }); 20876 20877 return arTn; 20878 20879}))); 20880 20881 20882/***/ }), 20883/* 11 */ 20884/***/ (function(module, exports, __webpack_require__) { 20885 20886//! moment.js locale configuration 20887//! locale : Azerbaijani [az] 20888//! author : topchiyev : https://github.com/topchiyev 20889 20890;(function (global, factory) { 20891 true ? factory(__webpack_require__(0)) : 20892 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 20893 factory(global.moment) 20894}(this, (function (moment) { 'use strict'; 20895 20896 //! moment.js locale configuration 20897 20898 var suffixes = { 20899 1: '-inci', 20900 5: '-inci', 20901 8: '-inci', 20902 70: '-inci', 20903 80: '-inci', 20904 2: '-nci', 20905 7: '-nci', 20906 20: '-nci', 20907 50: '-nci', 20908 3: '-üncü', 20909 4: '-üncü', 20910 100: '-üncü', 20911 6: '-ncı', 20912 9: '-uncu', 20913 10: '-uncu', 20914 30: '-uncu', 20915 60: '-ıncı', 20916 90: '-ıncı', 20917 }; 20918 20919 var az = moment.defineLocale('az', { 20920 months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split( 20921 '_' 20922 ), 20923 monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), 20924 weekdays: 20925 'Bazar_Bazar ertÉsi_ÃÉrÅÉnbÉ axÅamı_ÃÉrÅÉnbÉ_CümÉ axÅamı_CümÉ_ÅÉnbÉ'.split( 20926 '_' 20927 ), 20928 weekdaysShort: 'Baz_BzE_ÃAx_ÃÉr_CAx_Cüm_ÅÉn'.split('_'), 20929 weekdaysMin: 'Bz_BE_ÃA_ÃÉ_CA_Cü_ÅÉ'.split('_'), 20930 weekdaysParseExact: true, 20931 longDateFormat: { 20932 LT: 'HH:mm', 20933 LTS: 'HH:mm:ss', 20934 L: 'DD.MM.YYYY', 20935 LL: 'D MMMM YYYY', 20936 LLL: 'D MMMM YYYY HH:mm', 20937 LLLL: 'dddd, D MMMM YYYY HH:mm', 20938 }, 20939 calendar: { 20940 sameDay: '[bugün saat] LT', 20941 nextDay: '[sabah saat] LT', 20942 nextWeek: '[gÉlÉn hÉftÉ] dddd [saat] LT', 20943 lastDay: '[dünÉn] LT', 20944 lastWeek: '[keçÉn hÉftÉ] dddd [saat] LT', 20945 sameElse: 'L', 20946 }, 20947 relativeTime: { 20948 future: '%s sonra', 20949 past: '%s ÉvvÉl', 20950 s: 'bir neÃ§É saniyÉ', 20951 ss: '%d saniyÉ', 20952 m: 'bir dÉqiqÉ', 20953 mm: '%d dÉqiqÉ', 20954 h: 'bir saat', 20955 hh: '%d saat', 20956 d: 'bir gün', 20957 dd: '%d gün', 20958 M: 'bir ay', 20959 MM: '%d ay', 20960 y: 'bir il', 20961 yy: '%d il', 20962 }, 20963 meridiemParse: /gecÉ|sÉhÉr|gündüz|axÅam/, 20964 isPM: function (input) { 20965 return /^(gündüz|axÅam)$/.test(input); 20966 }, 20967 meridiem: function (hour, minute, isLower) { 20968 if (hour < 4) { 20969 return 'gecÉ'; 20970 } else if (hour < 12) { 20971 return 'sÉhÉr'; 20972 } else if (hour < 17) { 20973 return 'gündüz'; 20974 } else { 20975 return 'axÅam'; 20976 } 20977 }, 20978 dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, 20979 ordinal: function (number) { 20980 if (number === 0) { 20981 // special case for zero 20982 return number + '-ıncı'; 20983 } 20984 var a = number % 10, 20985 b = (number % 100) - a, 20986 c = number >= 100 ? 100 : null; 20987 return number + (suffixes[a] || suffixes[b] || suffixes[c]); 20988 }, 20989 week: { 20990 dow: 1, // Monday is the first day of the week. 20991 doy: 7, // The week that contains Jan 7th is the first week of the year. 20992 }, 20993 }); 20994 20995 return az; 20996 20997}))); 20998 20999 21000/***/ }), 21001/* 12 */ 21002/***/ (function(module, exports, __webpack_require__) { 21003 21004//! moment.js locale configuration 21005//! locale : Belarusian [be] 21006//! author : Dmitry Demidov : https://github.com/demidov91 21007//! author: Praleska: http://praleska.pro/ 21008//! Author : Menelion Elensúle : https://github.com/Oire 21009 21010;(function (global, factory) { 21011 true ? factory(__webpack_require__(0)) : 21012 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 21013 factory(global.moment) 21014}(this, (function (moment) { 'use strict'; 21015 21016 //! moment.js locale configuration 21017 21018 function plural(word, num) { 21019 var forms = word.split('_'); 21020 return num % 10 === 1 && num % 100 !== 11 21021 ? forms[0] 21022 : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) 21023 ? forms[1] 21024 : forms[2]; 21025 } 21026 function relativeTimeWithPlural(number, withoutSuffix, key) { 21027 var format = { 21028 ss: withoutSuffix ? 'ÑекÑнда_ÑекÑндÑ_ÑекÑнд' : 'ÑекÑндÑ_ÑекÑндÑ_ÑекÑнд', 21029 mm: withoutSuffix ? 'Ñ Ð²ÑлÑна_Ñ Ð²ÑлÑнÑ_Ñ Ð²ÑлÑн' : 'Ñ Ð²ÑлÑнÑ_Ñ Ð²ÑлÑнÑ_Ñ Ð²ÑлÑн', 21030 hh: withoutSuffix ? 'гадзÑна_гадзÑнÑ_гадзÑн' : 'гадзÑнÑ_гадзÑнÑ_гадзÑн', 21031 dd: 'дзенÑ_днÑ_дзÑн', 21032 MM: 'меÑÑÑ_меÑÑÑÑ_меÑÑÑаÑ', 21033 yy: 'год_гадÑ_гадоÑ', 21034 }; 21035 if (key === 'm') { 21036 return withoutSuffix ? 'Ñ Ð²ÑлÑна' : 'Ñ Ð²ÑлÑнÑ'; 21037 } else if (key === 'h') { 21038 return withoutSuffix ? 'гадзÑна' : 'гадзÑнÑ'; 21039 } else {
vendor: 14,932 bytes, lines 21040-21467
21040 return number + ' ' + plural(format[key], +number); 21041 } 21042 } 21043 21044 var be = moment.defineLocale('be', { 21045 months: { 21046 format: 'ÑÑÑдзенÑ_лÑÑага_ÑакавÑка_кÑаÑавÑка_ÑÑаÑнÑ_ÑÑÑвенÑ_лÑпенÑ_жнÑÑнÑ_веÑаÑнÑ_каÑÑÑÑÑнÑка_лÑÑÑапада_ÑнежнÑ'.split( 21047 '_' 21048 ), 21049 standalone: 21050 'ÑÑÑдзенÑ_лÑÑÑ_ÑакавÑк_кÑаÑавÑк_ÑÑавенÑ_ÑÑÑвенÑ_лÑпенÑ_жнÑвенÑ_веÑаÑенÑ_каÑÑÑÑÑнÑк_лÑÑÑапад_ÑнежанÑ'.split( 21051 '_' 21052 ), 21053 }, 21054 monthsShort: 21055 'ÑÑÑд_лÑÑ_Ñак_кÑаÑ_ÑÑав_ÑÑÑв_лÑп_жнÑв_веÑ_каÑÑ_лÑÑÑ_Ñнеж'.split('_'), 21056 weekdays: { 21057 format: 'нÑдзелÑ_панÑдзелак_аÑÑоÑак_ÑеÑадÑ_ÑаÑвеÑ_пÑÑнÑÑÑ_ÑÑбоÑÑ'.split( 21058 '_' 21059 ), 21060 standalone: 21061 'нÑдзелÑ_панÑдзелак_аÑÑоÑак_ÑеÑада_ÑаÑвеÑ_пÑÑнÑÑа_ÑÑбоÑа'.split( 21062 '_' 21063 ), 21064 isFormat: /\[ ?[УÑÑ] ?(?:мÑнÑлÑÑ|наÑÑÑпнÑÑ)? ?\] ?dddd/, 21065 }, 21066 weekdaysShort: 'нд_пн_аÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 21067 weekdaysMin: 'нд_пн_аÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 21068 longDateFormat: { 21069 LT: 'HH:mm', 21070 LTS: 'HH:mm:ss', 21071 L: 'DD.MM.YYYY', 21072 LL: 'D MMMM YYYY г.', 21073 LLL: 'D MMMM YYYY г., HH:mm', 21074 LLLL: 'dddd, D MMMM YYYY г., HH:mm', 21075 }, 21076 calendar: { 21077 sameDay: '[СÑÐ½Ð½Ñ Ñ] LT', 21078 nextDay: '[ÐаÑÑÑа Ñ] LT', 21079 lastDay: '[УÑоÑа Ñ] LT', 21080 nextWeek: function () { 21081 return '[У] dddd [Ñ] LT'; 21082 }, 21083 lastWeek: function () { 21084 switch (this.day()) { 21085 case 0: 21086 case 3: 21087 case 5: 21088 case 6: 21089 return '[У мÑнÑлÑÑ] dddd [Ñ] LT'; 21090 case 1: 21091 case 2: 21092 case 4: 21093 return '[У мÑнÑлÑ] dddd [Ñ] LT'; 21094 } 21095 }, 21096 sameElse: 'L', 21097 }, 21098 relativeTime: { 21099 future: 'пÑаз %s', 21100 past: '%s ÑамÑ', 21101 s: 'некалÑÐºÑ ÑекÑнд', 21102 m: relativeTimeWithPlural, 21103 mm: relativeTimeWithPlural, 21104 h: relativeTimeWithPlural, 21105 hh: relativeTimeWithPlural, 21106 d: 'дзенÑ', 21107 dd: relativeTimeWithPlural, 21108 M: 'меÑÑÑ', 21109 MM: relativeTimeWithPlural, 21110 y: 'год', 21111 yy: relativeTimeWithPlural, 21112 }, 21113 meridiemParse: /ноÑÑ|ÑанÑÑÑ|днÑ|веÑаÑа/, 21114 isPM: function (input) { 21115 return /^(днÑ|веÑаÑа)$/.test(input); 21116 }, 21117 meridiem: function (hour, minute, isLower) { 21118 if (hour < 4) { 21119 return 'ноÑÑ'; 21120 } else if (hour < 12) { 21121 return 'ÑанÑÑÑ'; 21122 } else if (hour < 17) { 21123 return 'днÑ'; 21124 } else { 21125 return 'веÑаÑа'; 21126 } 21127 }, 21128 dayOfMonthOrdinalParse: /\d{1,2}-(Ñ|Ñ|га)/, 21129 ordinal: function (number, period) { 21130 switch (period) { 21131 case 'M': 21132 case 'd': 21133 case 'DDD': 21134 case 'w': 21135 case 'W': 21136 return (number % 10 === 2 || number % 10 === 3) && 21137 number % 100 !== 12 && 21138 number % 100 !== 13 21139 ? number + '-Ñ' 21140 : number + '-Ñ'; 21141 case 'D': 21142 return number + '-га'; 21143 default: 21144 return number; 21145 } 21146 }, 21147 week: { 21148 dow: 1, // Monday is the first day of the week. 21149 doy: 7, // The week that contains Jan 7th is the first week of the year. 21150 }, 21151 }); 21152 21153 return be; 21154 21155}))); 21156 21157 21158/***/ }), 21159/* 13 */ 21160/***/ (function(module, exports, __webpack_require__) { 21161 21162//! moment.js locale configuration 21163//! locale : Bulgarian [bg] 21164//! author : Krasen Borisov : https://github.com/kraz 21165 21166;(function (global, factory) { 21167 true ? factory(__webpack_require__(0)) : 21168 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 21169 factory(global.moment) 21170}(this, (function (moment) { 'use strict'; 21171 21172 //! moment.js locale configuration 21173 21174 var bg = moment.defineLocale('bg', { 21175 months: 'ÑнÑаÑи_ÑевÑÑаÑи_маÑÑ_апÑил_май_Ñни_Ñли_авгÑÑÑ_ÑепÑемвÑи_окÑомвÑи_ноемвÑи_декемвÑи'.split( 21176 '_' 21177 ), 21178 monthsShort: 'ÑнÑ_Ñев_маÑ_апÑ_май_Ñни_Ñли_авг_Ñеп_окÑ_ное_дек'.split('_'), 21179 weekdays: 'неделÑ_понеделник_вÑоÑник_ÑÑÑда_ÑеÑвÑÑÑÑк_пеÑÑк_ÑÑбоÑа'.split( 21180 '_' 21181 ), 21182 weekdaysShort: 'нед_пон_вÑо_ÑÑÑ_ÑеÑ_пеÑ_ÑÑб'.split('_'), 21183 weekdaysMin: 'нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 21184 longDateFormat: { 21185 LT: 'H:mm', 21186 LTS: 'H:mm:ss', 21187 L: 'D.MM.YYYY', 21188 LL: 'D MMMM YYYY', 21189 LLL: 'D MMMM YYYY H:mm', 21190 LLLL: 'dddd, D MMMM YYYY H:mm', 21191 }, 21192 calendar: { 21193 sameDay: '[ÐÐ½ÐµÑ Ð²] LT', 21194 nextDay: '[УÑÑе в] LT', 21195 nextWeek: 'dddd [в] LT', 21196 lastDay: '[ÐÑеÑа в] LT', 21197 lastWeek: function () { 21198 switch (this.day()) { 21199 case 0: 21200 case 3: 21201 case 6: 21202 return '[ÐиналаÑа] dddd [в] LT'; 21203 case 1: 21204 case 2: 21205 case 4: 21206 case 5: 21207 return '[ÐиналиÑ] dddd [в] LT'; 21208 } 21209 }, 21210 sameElse: 'L', 21211 }, 21212 relativeTime: { 21213 future: 'Ñлед %s', 21214 past: 'пÑеди %s', 21215 s: 'нÑколко ÑекÑнди', 21216 ss: '%d ÑекÑнди', 21217 m: 'минÑÑа', 21218 mm: '%d минÑÑи', 21219 h: 'ÑаÑ', 21220 hh: '%d ÑаÑа', 21221 d: 'ден', 21222 dd: '%d дена', 21223 w: 'ÑедмиÑа', 21224 ww: '%d ÑедмиÑи', 21225 M: 'меÑеÑ', 21226 MM: '%d меÑеÑа', 21227 y: 'година', 21228 yy: '%d години', 21229 }, 21230 dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|Ñи|ви|Ñи|ми)/, 21231 ordinal: function (number) { 21232 var lastDigit = number % 10, 21233 last2Digits = number % 100; 21234 if (number === 0) { 21235 return number + '-ев'; 21236 } else if (last2Digits === 0) { 21237 return number + '-ен'; 21238 } else if (last2Digits > 10 && last2Digits < 20) { 21239 return number + '-Ñи'; 21240 } else if (lastDigit === 1) { 21241 return number + '-ви'; 21242 } else if (lastDigit === 2) { 21243 return number + '-Ñи'; 21244 } else if (lastDigit === 7 || lastDigit === 8) { 21245 return number + '-ми'; 21246 } else { 21247 return number + '-Ñи'; 21248 } 21249 }, 21250 week: { 21251 dow: 1, // Monday is the first day of the week. 21252 doy: 7, // The week that contains Jan 7th is the first week of the year. 21253 }, 21254 }); 21255 21256 return bg; 21257 21258}))); 21259 21260 21261/***/ }), 21262/* 14 */ 21263/***/ (function(module, exports, __webpack_require__) { 21264 21265//! moment.js locale configuration 21266//! locale : Bambara [bm] 21267//! author : Estelle Comment : https://github.com/estellecomment 21268 21269;(function (global, factory) { 21270 true ? factory(__webpack_require__(0)) : 21271 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 21272 factory(global.moment) 21273}(this, (function (moment) { 'use strict'; 21274 21275 //! moment.js locale configuration 21276 21277 var bm = moment.defineLocale('bm', { 21278 months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_MÉkalo_ZuwÉnkalo_Zuluyekalo_Utikalo_SÉtanburukalo_ÉkutÉburukalo_Nowanburukalo_Desanburukalo'.split( 21279 '_' 21280 ), 21281 monthsShort: 'Zan_Few_Mar_Awi_MÉ_Zuw_Zul_Uti_SÉt_Éku_Now_Des'.split('_'), 21282 weekdays: 'Kari_NtÉnÉn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'), 21283 weekdaysShort: 'Kar_NtÉ_Tar_Ara_Ala_Jum_Sib'.split('_'), 21284 weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'), 21285 longDateFormat: { 21286 LT: 'HH:mm', 21287 LTS: 'HH:mm:ss', 21288 L: 'DD/MM/YYYY', 21289 LL: 'MMMM [tile] D [san] YYYY', 21290 LLL: 'MMMM [tile] D [san] YYYY [lÉrÉ] HH:mm', 21291 LLLL: 'dddd MMMM [tile] D [san] YYYY [lÉrÉ] HH:mm', 21292 }, 21293 calendar: { 21294 sameDay: '[Bi lÉrÉ] LT', 21295 nextDay: '[Sini lÉrÉ] LT', 21296 nextWeek: 'dddd [don lÉrÉ] LT', 21297 lastDay: '[Kunu lÉrÉ] LT', 21298 lastWeek: 'dddd [tÉmÉnen lÉrÉ] LT', 21299 sameElse: 'L', 21300 }, 21301 relativeTime: { 21302 future: '%s kÉnÉ', 21303 past: 'a bÉ %s bÉ', 21304 s: 'sanga dama dama', 21305 ss: 'sekondi %d', 21306 m: 'miniti kelen', 21307 mm: 'miniti %d', 21308 h: 'lÉrÉ kelen', 21309 hh: 'lÉrÉ %d', 21310 d: 'tile kelen', 21311 dd: 'tile %d', 21312 M: 'kalo kelen', 21313 MM: 'kalo %d', 21314 y: 'san kelen', 21315 yy: 'san %d', 21316 }, 21317 week: { 21318 dow: 1, // Monday is the first day of the week. 21319 doy: 4, // The week that contains Jan 4th is the first week of the year. 21320 }, 21321 }); 21322 21323 return bm; 21324 21325}))); 21326 21327 21328/***/ }), 21329/* 15 */ 21330/***/ (function(module, exports, __webpack_require__) { 21331 21332//! moment.js locale configuration 21333//! locale : Bengali [bn] 21334//! author : Kaushik Gandhi : https://github.com/kaushikgandhi 21335 21336;(function (global, factory) { 21337 true ? factory(__webpack_require__(0)) : 21338 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 21339 factory(global.moment) 21340}(this, (function (moment) { 'use strict'; 21341 21342 //! moment.js locale configuration 21343 21344 var symbolMap = { 21345 1: 'à§§', 21346 2: '২', 21347 3: 'à§©', 21348 4: '৪', 21349 5: 'à§«', 21350 6: '৬', 21351 7: 'à§', 21352 8: 'à§®', 21353 9: '৯', 21354 0: '০', 21355 }, 21356 numberMap = { 21357 'à§§': '1', 21358 '২': '2', 21359 'à§©': '3', 21360 '৪': '4', 21361 'à§«': '5', 21362 '৬': '6', 21363 'à§': '7', 21364 'à§®': '8', 21365 '৯': '9', 21366 '০': '0', 21367 }; 21368 21369 var bn = moment.defineLocale('bn', { 21370 months: 'à¦à¦¾à¦¨à§à§à¦¾à¦°à¦¿_ফà§à¦¬à§à¦°à§à§à¦¾à¦°à¦¿_মারà§à¦_à¦à¦ªà§à¦°à¦¿à¦²_মà§_à¦à§à¦¨_à¦à§à¦²à¦¾à¦_à¦à¦à¦¸à§à¦_সà§à¦ªà§à¦à§à¦®à§à¦¬à¦°_ঠà¦à§à¦à§à¦¬à¦°_নà¦à§à¦®à§à¦¬à¦°_ডিসà§à¦®à§à¦¬à¦°'.split( 21371 '_' 21372 ), 21373 monthsShort: 21374 'à¦à¦¾à¦¨à§_ফà§à¦¬à§à¦°à§_মারà§à¦_à¦à¦ªà§à¦°à¦¿à¦²_মà§_à¦à§à¦¨_à¦à§à¦²à¦¾à¦_à¦à¦à¦¸à§à¦_সà§à¦ªà§à¦_ঠà¦à§à¦à§_নà¦à§_ডিসà§'.split( 21375 '_' 21376 ), 21377 weekdays: 'রবিবার_সà§à¦®à¦¬à¦¾à¦°_মà¦à§à¦à¦²à¦¬à¦¾à¦°_বà§à¦§à¦¬à¦¾à¦°_বà§à¦¹à¦¸à§à¦ªà¦¤à¦¿à¦¬à¦¾à¦°_শà§à¦à§à¦°à¦¬à¦¾à¦°_শনিবার'.split( 21378 '_' 21379 ), 21380 weekdaysShort: 'রবি_সà§à¦®_মà¦à§à¦à¦²_বà§à¦§_বà§à¦¹à¦¸à§à¦ªà¦¤à¦¿_শà§à¦à§à¦°_শনি'.split('_'), 21381 weekdaysMin: 'রবি_সà§à¦®_মà¦à§à¦à¦²_বà§à¦§_বà§à¦¹_শà§à¦à§à¦°_শনি'.split('_'), 21382 longDateFormat: { 21383 LT: 'A h:mm সমà§', 21384 LTS: 'A h:mm:ss সমà§', 21385 L: 'DD/MM/YYYY', 21386 LL: 'D MMMM YYYY', 21387 LLL: 'D MMMM YYYY, A h:mm সমà§', 21388 LLLL: 'dddd, D MMMM YYYY, A h:mm সমà§', 21389 }, 21390 calendar: { 21391 sameDay: '[à¦à¦] LT', 21392 nextDay: '[à¦à¦à¦¾à¦®à§à¦à¦¾à¦²] LT', 21393 nextWeek: 'dddd, LT', 21394 lastDay: '[à¦à¦¤à¦à¦¾à¦²] LT', 21395 lastWeek: '[à¦à¦¤] dddd, LT', 21396 sameElse: 'L', 21397 }, 21398 relativeTime: { 21399 future: '%s পরà§', 21400 past: '%s à¦à¦à§', 21401 s: 'à¦à§à§à¦ সà§à¦à§à¦¨à§à¦¡', 21402 ss: '%d সà§à¦à§à¦¨à§à¦¡', 21403 m: 'à¦à¦ মিনিà¦', 21404 mm: '%d মিনিà¦', 21405 h: 'à¦à¦ à¦à¦¨à§à¦à¦¾', 21406 hh: '%d à¦à¦¨à§à¦à¦¾', 21407 d: 'à¦à¦ দিন', 21408 dd: '%d দিন', 21409 M: 'à¦à¦ মাস', 21410 MM: '%d মাস', 21411 y: 'à¦à¦ বà¦à¦°', 21412 yy: '%d বà¦à¦°', 21413 }, 21414 preparse: function (string) { 21415 return string.replace(/[১২৩৪৫৬à§à§®à§¯à§¦]/g, function (match) { 21416 return numberMap[match]; 21417 }); 21418 }, 21419 postformat: function (string) { 21420 return string.replace(/\d/g, function (match) { 21421 return symbolMap[match]; 21422 }); 21423 }, 21424 meridiemParse: /রাত|সà¦à¦¾à¦²|দà§à¦ªà§à¦°|বিà¦à¦¾à¦²|রাত/, 21425 meridiemHour: function (hour, meridiem) { 21426 if (hour === 12) { 21427 hour = 0; 21428 } 21429 if ( 21430 (meridiem === 'রাত' && hour >= 4) || 21431 (meridiem === 'দà§à¦ªà§à¦°' && hour < 5) || 21432 meridiem === 'বিà¦à¦¾à¦²' 21433 ) { 21434 return hour + 12; 21435 } else { 21436 return hour; 21437 } 21438 }, 21439 meridiem: function (hour, minute, isLower) { 21440 if (hour < 4) { 21441 return 'রাত'; 21442 } else if (hour < 10) { 21443 return 'সà¦à¦¾à¦²'; 21444 } else if (hour < 17) { 21445 return 'দà§à¦ªà§à¦°'; 21446 } else if (hour < 20) { 21447 return 'বিà¦à¦¾à¦²'; 21448 } else { 21449 return 'রাত'; 21450 } 21451 }, 21452 week: { 21453 dow: 0, // Sunday is the first day of the week. 21454 doy: 6, // The week that contains Jan 6th is the first week of the year. 21455 }, 21456 }); 21457 21458 return bn; 21459 21460}))); 21461 21462 21463/***/ }), 21464/* 16 */ 21465/***/ (function(module, exports, __webpack_require__) { 21466 21467//! moment.js locale configuration
21468//! locale : Bengali (Bangladesh) [bn-bd] 21469//! author : Asraf Hossain Patoary : https://github.com/ashwoolford 21470 21471;(function (global, factory) { 21472 true ? factory(__webpack_require__(0)) : 21473 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 21474 factory(global.moment) 21475}(this, (function (moment) { 'use strict'; 21476 21477 //! moment.js locale configuration 21478 21479 var symbolMap = { 21480 1: 'à§§', 21481 2: '২', 21482 3: 'à§©', 21483 4: '৪', 21484 5: 'à§«', 21485 6: '৬', 21486 7: 'à§', 21487 8: 'à§®', 21488 9: '৯', 21489 0: '০', 21490 }, 21491 numberMap = { 21492 'à§§': '1', 21493 '২': '2', 21494 'à§©': '3', 21495 '৪': '4', 21496 'à§«': '5', 21497 '৬': '6', 21498 'à§': '7', 21499 'à§®': '8', 21500 '৯': '9', 21501 '০': '0', 21502 }; 21503 21504 var bnBd = moment.defineLocale('bn-bd', { 21505 months: 'à¦à¦¾à¦¨à§à§à¦¾à¦°à¦¿_ফà§à¦¬à§à¦°à§à§à¦¾à¦°à¦¿_মারà§à¦_à¦à¦ªà§à¦°à¦¿à¦²_মà§_à¦à§à¦¨_à¦à§à¦²à¦¾à¦_à¦à¦à¦¸à§à¦_সà§à¦ªà§à¦à§à¦®à§à¦¬à¦°_ঠà¦à§à¦à§à¦¬à¦°_নà¦à§à¦®à§à¦¬à¦°_ডিসà§à¦®à§à¦¬à¦°'.split( 21506 '_' 21507 ), 21508 monthsShort: 21509 'à¦à¦¾à¦¨à§_ফà§à¦¬à§à¦°à§_মারà§à¦_à¦à¦ªà§à¦°à¦¿à¦²_মà§_à¦à§à¦¨_à¦à§à¦²à¦¾à¦_à¦à¦à¦¸à§à¦_সà§à¦ªà§à¦_ঠà¦à§à¦à§_নà¦à§_ডিসà§'.split( 21510 '_' 21511 ), 21512 weekdays: 'রবিবার_সà§à¦®à¦¬à¦¾à¦°_মà¦à§à¦à¦²à¦¬à¦¾à¦°_বà§à¦§à¦¬à¦¾à¦°_বà§à¦¹à¦¸à§à¦ªà¦¤à¦¿à¦¬à¦¾à¦°_শà§à¦à§à¦°à¦¬à¦¾à¦°_শনিবার'.split( 21513 '_' 21514 ), 21515 weekdaysShort: 'রবি_সà§à¦®_মà¦à§à¦à¦²_বà§à¦§_বà§à¦¹à¦¸à§à¦ªà¦¤à¦¿_শà§à¦à§à¦°_শনি'.split('_'), 21516 weekdaysMin: 'রবি_সà§à¦®_মà¦à§à¦à¦²_বà§à¦§_বà§à¦¹_শà§à¦à§à¦°_শনি'.split('_'), 21517 longDateFormat: { 21518 LT: 'A h:mm সমà§', 21519 LTS: 'A h:mm:ss সমà§', 21520 L: 'DD/MM/YYYY', 21521 LL: 'D MMMM YYYY', 21522 LLL: 'D MMMM YYYY, A h:mm সমà§', 21523 LLLL: 'dddd, D MMMM YYYY, A h:mm সমà§', 21524 }, 21525 calendar: { 21526 sameDay: '[à¦à¦] LT', 21527 nextDay: '[à¦à¦à¦¾à¦®à§à¦à¦¾à¦²] LT', 21528 nextWeek: 'dddd, LT', 21529 lastDay: '[à¦à¦¤à¦à¦¾à¦²] LT', 21530 lastWeek: '[à¦à¦¤] dddd, LT', 21531 sameElse: 'L', 21532 }, 21533 relativeTime: { 21534 future: '%s পরà§', 21535 past: '%s à¦à¦à§', 21536 s: 'à¦à§à§à¦ সà§à¦à§à¦¨à§à¦¡', 21537 ss: '%d সà§à¦à§à¦¨à§à¦¡', 21538 m: 'à¦à¦ মিনিà¦', 21539 mm: '%d মিনিà¦', 21540 h: 'à¦à¦ à¦à¦¨à§à¦à¦¾', 21541 hh: '%d à¦à¦¨à§à¦à¦¾', 21542 d: 'à¦à¦ দিন', 21543 dd: '%d দিন', 21544 M: 'à¦à¦ মাস', 21545 MM: '%d মাস', 21546 y: 'à¦à¦ বà¦à¦°', 21547 yy: '%d বà¦à¦°', 21548 }, 21549 preparse: function (string) { 21550 return string.replace(/[১২৩৪৫৬à§à§®à§¯à§¦]/g, function (match) { 21551 return numberMap[match]; 21552 }); 21553 }, 21554 postformat: function (string) { 21555 return string.replace(/\d/g, function (match) { 21556 return symbolMap[match]; 21557 }); 21558 }, 21559 21560 meridiemParse: /রাত|à¦à§à¦°|সà¦à¦¾à¦²|দà§à¦ªà§à¦°|বিà¦à¦¾à¦²|সনà§à¦§à§à¦¯à¦¾|রাত/, 21561 meridiemHour: function (hour, meridiem) { 21562 if (hour === 12) { 21563 hour = 0; 21564 } 21565 if (meridiem === 'রাত') { 21566 return hour < 4 ? hour : hour + 12; 21567 } else if (meridiem === 'à¦à§à¦°') { 21568 return hour; 21569 } else if (meridiem === 'সà¦à¦¾à¦²') { 21570 return hour; 21571 } else if (meridiem === 'দà§à¦ªà§à¦°') { 21572 return hour >= 3 ? hour : hour + 12; 21573 } else if (meridiem === 'বিà¦à¦¾à¦²') { 21574 return hour + 12; 21575 } else if (meridiem === 'সনà§à¦§à§à¦¯à¦¾') { 21576 return hour + 12; 21577 } 21578 }, 21579 21580 meridiem: function (hour, minute, isLower) { 21581 if (hour < 4) { 21582 return 'রাত'; 21583 } else if (hour < 6) { 21584 return 'à¦à§à¦°'; 21585 } else if (hour < 12) { 21586 return 'সà¦à¦¾à¦²'; 21587 } else if (hour < 15) { 21588 return 'দà§à¦ªà§à¦°'; 21589 } else if (hour < 18) { 21590 return 'বিà¦à¦¾à¦²'; 21591 } else if (hour < 20) { 21592 return 'সনà§à¦§à§à¦¯à¦¾'; 21593 } else { 21594 return 'রাত'; 21595 } 21596 }, 21597 week: { 21598 dow: 0, // Sunday is the first day of the week. 21599 doy: 6, // The week that contains Jan 6th is the first week of the year. 21600 }, 21601 }); 21602 21603 return bnBd; 21604 21605}))); 21606 21607 21608/***/ }), 21609/* 17 */ 21610/***/ (function(module, exports, __webpack_require__) { 21611 21612//! moment.js locale configuration 21613//! locale : Tibetan [bo] 21614//! author : Thupten N. Chakrishar : https://github.com/vajradog 21615 21616;(function (global, factory) { 21617 true ? factory(__webpack_require__(0)) : 21618 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 21619 factory(global.moment) 21620}(this, (function (moment) { 'use strict'; 21621 21622 //! moment.js locale configuration 21623 21624 var symbolMap = { 21625 1: '༡', 21626 2: '༢', 21627 3: '༣', 21628 4: '༤', 21629 5: '༥', 21630 6: '༦', 21631 7: '༧', 21632 8: '༨', 21633 9: '༩', 21634 0: '༠', 21635 }, 21636 numberMap = { 21637 '༡': '1', 21638 '༢': '2', 21639 '༣': '3', 21640 '༤': '4', 21641 '༥': '5', 21642 '༦': '6', 21643 '༧': '7', 21644 '༨': '8', 21645 '༩': '9', 21646 '༠': '0', 21647 }; 21648 21649 var bo = moment.defineLocale('bo', { 21650 months: 'à½à¾³à¼à½à¼à½à½à¼à½à½¼_à½à¾³à¼à½à¼à½à½à½²à½¦à¼à½_à½à¾³à¼à½à¼à½à½¦à½´à½à¼à½_à½à¾³à¼à½à¼à½à½à½²à¼à½_à½à¾³à¼à½à¼à½£à¾à¼à½_à½à¾³à¼à½à¼à½à¾²à½´à½à¼à½_à½à¾³à¼à½à¼à½à½à½´à½à¼à½_à½à¾³à¼à½à¼à½à½¢à¾à¾±à½à¼à½_à½à¾³à¼à½à¼à½à½à½´à¼à½_à½à¾³à¼à½à¼à½à½ ུà¼à½_à½à¾³à¼à½à¼à½à½ ུà¼à½à½ ིà½à¼à½_à½à¾³à¼à½à¼à½à½ ུà¼à½à½à½²à½¦à¼à½'.split( 21651 '_' 21652 ), 21653 monthsShort: 21654 'à½à¾³à¼1_à½à¾³à¼2_à½à¾³à¼3_à½à¾³à¼4_à½à¾³à¼5_à½à¾³à¼6_à½à¾³à¼7_à½à¾³à¼8_à½à¾³à¼9_à½à¾³à¼10_à½à¾³à¼11_à½à¾³à¼12'.split( 21655 '_' 21656 ), 21657 monthsShortRegex: /^(à½à¾³à¼\d{1,2})/, 21658 monthsParseExact: true, 21659 weekdays: 21660 'à½à½à½ à¼à½à½²à¼à½à¼_à½à½à½ à¼à½à¾³à¼à½à¼_à½à½à½ à¼à½à½²à½à¼à½à½à½¢à¼_à½à½à½ à¼à½£à¾·à½à¼à½à¼_à½à½à½ à¼à½à½´à½¢à¼à½à½´_à½à½à½ à¼à½à¼à½¦à½à½¦à¼_à½à½à½ à¼à½¦à¾¤à½ºà½à¼à½à¼'.split( 21661 '_' 21662 ), 21663 weekdaysShort: 'à½à½²à¼à½à¼_à½à¾³à¼à½à¼_à½à½²à½à¼à½à½à½¢à¼_ལྷà½à¼à½à¼_à½à½´à½¢à¼à½à½´_à½à¼à½¦à½à½¦à¼_སྤེà½à¼à½à¼'.split( 21664 '_' 21665 ), 21666 weekdaysMin: 'à½à½²_à½à¾³_à½à½²à½_ལྷà½_à½à½´à½¢_སà½à½¦_སྤེà½'.split('_'), 21667 longDateFormat: { 21668 LT: 'A h:mm', 21669 LTS: 'A h:mm:ss', 21670 L: 'DD/MM/YYYY', 21671 LL: 'D MMMM YYYY', 21672 LLL: 'D MMMM YYYY, A h:mm', 21673 LLLL: 'dddd, D MMMM YYYY, A h:mm', 21674 }, 21675 calendar: { 21676 sameDay: '[à½à½²à¼à½¢à½²à½] LT', 21677 nextDay: '[སà½à¼à½à½²à½] LT', 21678 nextWeek: '[à½à½à½´à½à¼à½à¾²à½à¼à½¢à¾à½ºà½¦à¼à½], LT', 21679 lastDay: '[à½à¼à½¦à½] LT', 21680 lastWeek: '[à½à½à½´à½à¼à½à¾²à½à¼à½à½à½ à¼à½] dddd, LT', 21681 sameElse: 'L', 21682 }, 21683 relativeTime: { 21684 future: '%s ལà¼', 21685 past: '%s སà¾à½à¼à½£', 21686 s: 'ལà½à¼à½¦à½', 21687 ss: '%d སà¾à½¢à¼à½à¼', 21688 m: 'སà¾à½¢à¼à½à¼à½à½ ིà½', 21689 mm: '%d སà¾à½¢à¼à½', 21690 h: 'à½à½´à¼à½à½¼à½à¼à½à½ ིà½', 21691 hh: '%d à½à½´à¼à½à½¼à½', 21692 d: 'à½à½²à½à¼à½à½ ིà½', 21693 dd: '%d à½à½²à½à¼', 21694 M: 'à½à¾³à¼à½à¼à½à½ ིà½', 21695 MM: '%d à½à¾³à¼à½', 21696 y: 'ལོà¼à½à½ ིà½', 21697 yy: '%d ལོ', 21698 }, 21699 preparse: function (string) { 21700 return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) { 21701 return numberMap[match]; 21702 }); 21703 }, 21704 postformat: function (string) { 21705 return string.replace(/\d/g, function (match) { 21706 return symbolMap[match]; 21707 }); 21708 }, 21709 meridiemParse: /à½à½à½à¼à½à½¼|à½à½¼à½à½¦à¼à½à½¦|à½à½²à½à¼à½à½´à½|à½à½à½¼à½à¼à½à½|à½à½à½à¼à½à½¼/, 21710 meridiemHour: function (hour, meridiem) { 21711 if (hour === 12) { 21712 hour = 0; 21713 } 21714 if ( 21715 (meridiem === 'à½à½à½à¼à½à½¼' && hour >= 4) || 21716 (meridiem === 'à½à½²à½à¼à½à½´à½' && hour < 5) || 21717 meridiem === 'à½à½à½¼à½à¼à½à½' 21718 ) { 21719 return hour + 12; 21720 } else { 21721 return hour; 21722 } 21723 }, 21724 meridiem: function (hour, minute, isLower) { 21725 if (hour < 4) { 21726 return 'à½à½à½à¼à½à½¼'; 21727 } else if (hour < 10) { 21728 return 'à½à½¼à½à½¦à¼à½à½¦'; 21729 } else if (hour < 17) { 21730 return 'à½à½²à½à¼à½à½´à½'; 21731 } else if (hour < 20) { 21732 return 'à½à½à½¼à½à¼à½à½'; 21733 } else { 21734 return 'à½à½à½à¼à½à½¼'; 21735 } 21736 }, 21737 week: { 21738 dow: 0, // Sunday is the first day of the week. 21739 doy: 6, // The week that contains Jan 6th is the first week of the year. 21740 }, 21741 }); 21742 21743 return bo; 21744 21745}))); 21746 21747 21748/***/ }), 21749/* 18 */ 21750/***/ (function(module, exports, __webpack_require__) { 21751 21752//! moment.js locale configuration 21753//! locale : Breton [br] 21754//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou 21755 21756;(function (global, factory) { 21757 true ? factory(__webpack_require__(0)) : 21758 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 21759 factory(global.moment) 21760}(this, (function (moment) { 'use strict'; 21761 21762 //! moment.js locale configuration 21763 21764 function relativeTimeWithMutation(number, withoutSuffix, key) { 21765 var format = { 21766 mm: 'munutenn', 21767 MM: 'miz', 21768 dd: 'devezh', 21769 }; 21770 return number + ' ' + mutation(format[key], number); 21771 } 21772 function specialMutationForYears(number) { 21773 switch (lastNumber(number)) { 21774 case 1: 21775 case 3: 21776 case 4: 21777 case 5: 21778 case 9: 21779 return number + ' bloaz'; 21780 default: 21781 return number + ' vloaz'; 21782 } 21783 } 21784 function lastNumber(number) { 21785 if (number > 9) { 21786 return lastNumber(number % 10); 21787 } 21788 return number; 21789 } 21790 function mutation(text, number) { 21791 if (number === 2) { 21792 return softMutation(text); 21793 } 21794 return text; 21795 } 21796 function softMutation(text) { 21797 var mutationTable = { 21798 m: 'v', 21799 b: 'v', 21800 d: 'z', 21801 }; 21802 if (mutationTable[text.charAt(0)] === undefined) { 21803 return text; 21804 } 21805 return mutationTable[text.charAt(0)] + text.substring(1); 21806 } 21807 21808 var monthsParse = [ 21809 /^gen/i, 21810 /^c[ʼ\']hwe/i, 21811 /^meu/i, 21812 /^ebr/i, 21813 /^mae/i, 21814 /^(mez|eve)/i, 21815 /^gou/i, 21816 /^eos/i, 21817 /^gwe/i, 21818 /^her/i, 21819 /^du/i, 21820 /^ker/i, 21821 ], 21822 monthsRegex = 21823 /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i, 21824 monthsStrictRegex = 21825 /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i, 21826 monthsShortStrictRegex = 21827 /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i, 21828 fullWeekdaysParse = [ 21829 /^sul/i, 21830 /^lun/i, 21831 /^meurzh/i, 21832 /^merc[ʼ\']her/i, 21833 /^yaou/i, 21834 /^gwener/i, 21835 /^sadorn/i, 21836 ], 21837 shortWeekdaysParse = [ 21838 /^Sul/i, 21839 /^Lun/i, 21840 /^Meu/i, 21841 /^Mer/i, 21842 /^Yao/i, 21843 /^Gwe/i, 21844 /^Sad/i, 21845 ], 21846 minWeekdaysParse = [ 21847 /^Su/i, 21848 /^Lu/i, 21849 /^Me([^r]|$)/i, 21850 /^Mer/i, 21851 /^Ya/i, 21852 /^Gw/i, 21853 /^Sa/i, 21854 ]; 21855 21856 var br = moment.defineLocale('br', {
21857 months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split( 21858 '_' 21859 ), 21860 monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), 21861 weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'), 21862 weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), 21863 weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), 21864 weekdaysParse: minWeekdaysParse, 21865 fullWeekdaysParse: fullWeekdaysParse, 21866 shortWeekdaysParse: shortWeekdaysParse, 21867 minWeekdaysParse: minWeekdaysParse, 21868 21869 monthsRegex: monthsRegex, 21870 monthsShortRegex: monthsRegex, 21871 monthsStrictRegex: monthsStrictRegex, 21872 monthsShortStrictRegex: monthsShortStrictRegex, 21873 monthsParse: monthsParse, 21874 longMonthsParse: monthsParse, 21875 shortMonthsParse: monthsParse, 21876 21877 longDateFormat: { 21878 LT: 'HH:mm', 21879 LTS: 'HH:mm:ss', 21880 L: 'DD/MM/YYYY', 21881 LL: 'D [a viz] MMMM YYYY', 21882 LLL: 'D [a viz] MMMM YYYY HH:mm', 21883 LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm', 21884 }, 21885 calendar: { 21886 sameDay: '[Hiziv da] LT', 21887 nextDay: '[Warcʼhoazh da] LT', 21888 nextWeek: 'dddd [da] LT', 21889 lastDay: '[Decʼh da] LT', 21890 lastWeek: 'dddd [paset da] LT', 21891 sameElse: 'L', 21892 }, 21893 relativeTime: { 21894 future: 'a-benn %s', 21895 past: '%s ʼzo', 21896 s: 'un nebeud segondennoù', 21897 ss: '%d eilenn', 21898 m: 'ur vunutenn', 21899 mm: relativeTimeWithMutation, 21900 h: 'un eur', 21901 hh: '%d eur', 21902 d: 'un devezh', 21903 dd: relativeTimeWithMutation, 21904 M: 'ur miz', 21905 MM: relativeTimeWithMutation, 21906 y: 'ur bloaz', 21907 yy: specialMutationForYears, 21908 }, 21909 dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/, 21910 ordinal: function (number) { 21911 var output = number === 1 ? 'añ' : 'vet'; 21912 return number + output; 21913 }, 21914 week: { 21915 dow: 1, // Monday is the first day of the week. 21916 doy: 4, // The week that contains Jan 4th is the first week of the year. 21917 }, 21918 meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn 21919 isPM: function (token) { 21920 return token === 'g.m.'; 21921 }, 21922 meridiem: function (hour, minute, isLower) { 21923 return hour < 12 ? 'a.m.' : 'g.m.'; 21924 }, 21925 }); 21926 21927 return br; 21928 21929}))); 21930 21931 21932/***/ }), 21933/* 19 */ 21934/***/ (function(module, exports, __webpack_require__) { 21935 21936//! moment.js locale configuration 21937//! locale : Bosnian [bs] 21938//! author : Nedim Cholich : https://github.com/frontyard 21939//! based on (hr) translation by Bojan MarkoviÄ 21940 21941;(function (global, factory) { 21942 true ? factory(__webpack_require__(0)) : 21943 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 21944 factory(global.moment) 21945}(this, (function (moment) { 'use strict'; 21946 21947 //! moment.js locale configuration 21948 21949 function translate(number, withoutSuffix, key) { 21950 var result = number + ' '; 21951 switch (key) { 21952 case 'ss': 21953 if (number === 1) { 21954 result += 'sekunda'; 21955 } else if (number === 2 || number === 3 || number === 4) { 21956 result += 'sekunde'; 21957 } else { 21958 result += 'sekundi'; 21959 } 21960 return result; 21961 case 'm': 21962 return withoutSuffix ? 'jedna minuta' : 'jedne minute'; 21963 case 'mm': 21964 if (number === 1) { 21965 result += 'minuta'; 21966 } else if (number === 2 || number === 3 || number === 4) { 21967 result += 'minute'; 21968 } else { 21969 result += 'minuta'; 21970 } 21971 return result; 21972 case 'h': 21973 return withoutSuffix ? 'jedan sat' : 'jednog sata'; 21974 case 'hh': 21975 if (number === 1) { 21976 result += 'sat'; 21977 } else if (number === 2 || number === 3 || number === 4) { 21978 result += 'sata'; 21979 } else { 21980 result += 'sati'; 21981 } 21982 return result; 21983 case 'dd': 21984 if (number === 1) { 21985 result += 'dan'; 21986 } else { 21987 result += 'dana'; 21988 } 21989 return result; 21990 case 'MM': 21991 if (number === 1) { 21992 result += 'mjesec'; 21993 } else if (number === 2 || number === 3 || number === 4) { 21994 result += 'mjeseca'; 21995 } else { 21996 result += 'mjeseci'; 21997 } 21998 return result; 21999 case 'yy': 22000 if (number === 1) { 22001 result += 'godina'; 22002 } else if (number === 2 || number === 3 || number === 4) { 22003 result += 'godine'; 22004 } else { 22005 result += 'godina'; 22006 } 22007 return result; 22008 } 22009 } 22010 22011 var bs = moment.defineLocale('bs', { 22012 months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split( 22013 '_' 22014 ), 22015 monthsShort: 22016 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split( 22017 '_' 22018 ), 22019 monthsParseExact: true, 22020 weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_Äetvrtak_petak_subota'.split( 22021 '_' 22022 ), 22023 weekdaysShort: 'ned._pon._uto._sri._Äet._pet._sub.'.split('_'), 22024 weekdaysMin: 'ne_po_ut_sr_Äe_pe_su'.split('_'), 22025 weekdaysParseExact: true, 22026 longDateFormat: { 22027 LT: 'H:mm', 22028 LTS: 'H:mm:ss', 22029 L: 'DD.MM.YYYY', 22030 LL: 'D. MMMM YYYY', 22031 LLL: 'D. MMMM YYYY H:mm', 22032 LLLL: 'dddd, D. MMMM YYYY H:mm', 22033 }, 22034 calendar: { 22035 sameDay: '[danas u] LT', 22036 nextDay: '[sutra u] LT', 22037 nextWeek: function () { 22038 switch (this.day()) { 22039 case 0: 22040 return '[u] [nedjelju] [u] LT'; 22041 case 3: 22042 return '[u] [srijedu] [u] LT'; 22043 case 6: 22044 return '[u] [subotu] [u] LT'; 22045 case 1: 22046 case 2: 22047 case 4: 22048 case 5: 22049 return '[u] dddd [u] LT'; 22050 } 22051 }, 22052 lastDay: '[juÄer u] LT', 22053 lastWeek: function () { 22054 switch (this.day()) { 22055 case 0: 22056 case 3: 22057 return '[proÅ¡lu] dddd [u] LT'; 22058 case 6: 22059 return '[proÅ¡le] [subote] [u] LT'; 22060 case 1: 22061 case 2: 22062 case 4: 22063 case 5: 22064 return '[proÅ¡li] dddd [u] LT'; 22065 } 22066 }, 22067 sameElse: 'L', 22068 }, 22069 relativeTime: { 22070 future: 'za %s', 22071 past: 'prije %s', 22072 s: 'par sekundi', 22073 ss: translate, 22074 m: translate, 22075 mm: translate, 22076 h: translate, 22077 hh: translate, 22078 d: 'dan', 22079 dd: translate, 22080 M: 'mjesec', 22081 MM: translate, 22082 y: 'godinu', 22083 yy: translate, 22084 }, 22085 dayOfMonthOrdinalParse: /\d{1,2}\./, 22086 ordinal: '%d.', 22087 week: { 22088 dow: 1, // Monday is the first day of the week. 22089 doy: 7, // The week that contains Jan 7th is the first week of the year. 22090 }, 22091 }); 22092 22093 return bs; 22094 22095}))); 22096 22097 22098/***/ }), 22099/* 20 */ 22100/***/ (function(module, exports, __webpack_require__) { 22101 22102//! moment.js locale configuration 22103//! locale : Catalan [ca] 22104//! author : Juan G. Hurtado : https://github.com/juanghurtado 22105 22106;(function (global, factory) { 22107 true ? factory(__webpack_require__(0)) : 22108 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 22109 factory(global.moment) 22110}(this, (function (moment) { 'use strict'; 22111 22112 //! moment.js locale configuration 22113 22114 var ca = moment.defineLocale('ca', { 22115 months: { 22116 standalone: 22117 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split( 22118 '_' 22119 ), 22120 format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split( 22121 '_' 22122 ), 22123 isFormat: /D[oD]?(\s)+MMMM/, 22124 }, 22125 monthsShort: 22126 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split( 22127 '_' 22128 ), 22129 monthsParseExact: true, 22130 weekdays: 22131 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split( 22132 '_' 22133 ), 22134 weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'), 22135 weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'), 22136 weekdaysParseExact: true, 22137 longDateFormat: { 22138 LT: 'H:mm', 22139 LTS: 'H:mm:ss', 22140 L: 'DD/MM/YYYY', 22141 LL: 'D MMMM [de] YYYY', 22142 ll: 'D MMM YYYY', 22143 LLL: 'D MMMM [de] YYYY [a les] H:mm', 22144 lll: 'D MMM YYYY, H:mm', 22145 LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm', 22146 llll: 'ddd D MMM YYYY, H:mm', 22147 }, 22148 calendar: { 22149 sameDay: function () { 22150 return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; 22151 }, 22152 nextDay: function () { 22153 return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; 22154 }, 22155 nextWeek: function () { 22156 return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; 22157 }, 22158 lastDay: function () { 22159 return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; 22160 }, 22161 lastWeek: function () { 22162 return ( 22163 '[el] dddd [passat a ' + 22164 (this.hours() !== 1 ? 'les' : 'la') + 22165 '] LT' 22166 ); 22167 }, 22168 sameElse: 'L', 22169 }, 22170 relativeTime: { 22171 future: "d'aquà %s", 22172 past: 'fa %s', 22173 s: 'uns segons', 22174 ss: '%d segons', 22175 m: 'un minut', 22176 mm: '%d minuts', 22177 h: 'una hora', 22178 hh: '%d hores', 22179 d: 'un dia', 22180 dd: '%d dies', 22181 M: 'un mes', 22182 MM: '%d mesos', 22183 y: 'un any', 22184 yy: '%d anys', 22185 }, 22186 dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, 22187 ordinal: function (number, period) { 22188 var output = 22189 number === 1 22190 ? 'r' 22191 : number === 2 22192 ? 'n' 22193 : number === 3 22194 ? 'r' 22195 : number === 4 22196 ? 't' 22197 : 'è'; 22198 if (period === 'w' || period === 'W') { 22199 output = 'a'; 22200 } 22201 return number + output; 22202 }, 22203 week: { 22204 dow: 1, // Monday is the first day of the week. 22205 doy: 4, // The week that contains Jan 4th is the first week of the year. 22206 }, 22207 }); 22208 22209 return ca; 22210 22211}))); 22212 22213 22214/***/ }), 22215/* 21 */ 22216/***/ (function(module, exports, __webpack_require__) { 22217 22218//! moment.js locale configuration 22219//! locale : Czech [cs] 22220//! author : petrbela : https://github.com/petrbela 22221 22222;(function (global, factory) { 22223 true ? factory(__webpack_require__(0)) : 22224 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 22225 factory(global.moment) 22226}(this, (function (moment) { 'use strict'; 22227 22228 //! moment.js locale configuration 22229 22230 var months = { 22231 format: 'leden_únor_bÅezen_duben_kvÄten_Äerven_Äervenec_srpen_záÅÃ_ÅÃjen_listopad_prosinec'.
22231split( 22232 '_' 22233 ), 22234 standalone: 22235 'ledna_února_bÅezna_dubna_kvÄtna_Äervna_Äervence_srpna_záÅÃ_ÅÃjna_listopadu_prosince'.split( 22236 '_' 22237 ), 22238 }, 22239 monthsShort = 'led_úno_bÅe_dub_kvÄ_Ävn_Ävc_srp_záÅ_ÅÃj_lis_pro'.split('_'), 22240 monthsParse = [ 22241 /^led/i, 22242 /^úno/i, 22243 /^bÅe/i, 22244 /^dub/i, 22245 /^kvÄ/i, 22246 /^(Ävn|Äerven$|Äervna)/i, 22247 /^(Ävc|Äervenec|Äervence)/i, 22248 /^srp/i, 22249 /^záÅ/i, 22250 /^ÅÃj/i, 22251 /^lis/i, 22252 /^pro/i, 22253 ], 22254 // NOTE: 'Äerven' is substring of 'Äervenec'; therefore 'Äervenec' must precede 'Äerven' in the regex to be fully matched. 22255 // Otherwise parser matches '1. Äervenec' as '1. Äerven' + 'ec'. 22256 monthsRegex = 22257 /^(leden|únor|bÅezen|duben|kvÄten|Äervenec|Äervence|Äerven|Äervna|srpen|záÅÃ|ÅÃjen|listopad|prosinec|led|úno|bÅe|dub|kvÄ|Ävn|Ävc|srp|záÅ|ÅÃj|lis|pro)/i; 22258 22259 function plural(n) { 22260 return n > 1 && n < 5 && ~~(n / 10) !== 1; 22261 } 22262 function translate(number, withoutSuffix, key, isFuture) { 22263 var result = number + ' '; 22264 switch (key) { 22265 case 's': // a few seconds / in a few seconds / a few seconds ago 22266 return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami'; 22267 case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago 22268 if (withoutSuffix || isFuture) { 22269 return result + (plural(number) ? 'sekundy' : 'sekund'); 22270 } else { 22271 return result + 'sekundami'; 22272 } 22273 case 'm': // a minute / in a minute / a minute ago 22274 return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou'; 22275 case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago 22276 if (withoutSuffix || isFuture) { 22277 return result + (plural(number) ? 'minuty' : 'minut'); 22278 } else { 22279 return result + 'minutami'; 22280 } 22281 case 'h': // an hour / in an hour / an hour ago 22282 return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; 22283 case 'hh': // 9 hours / in 9 hours / 9 hours ago 22284 if (withoutSuffix || isFuture) { 22285 return result + (plural(number) ? 'hodiny' : 'hodin'); 22286 } else { 22287 return result + 'hodinami'; 22288 } 22289 case 'd': // a day / in a day / a day ago 22290 return withoutSuffix || isFuture ? 'den' : 'dnem'; 22291 case 'dd': // 9 days / in 9 days / 9 days ago 22292 if (withoutSuffix || isFuture) { 22293 return result + (plural(number) ? 'dny' : 'dnÃ'); 22294 } else { 22295 return result + 'dny'; 22296 } 22297 case 'M': // a month / in a month / a month ago 22298 return withoutSuffix || isFuture ? 'mÄsÃc' : 'mÄsÃcem'; 22299 case 'MM': // 9 months / in 9 months / 9 months ago 22300 if (withoutSuffix || isFuture) { 22301 return result + (plural(number) ? 'mÄsÃce' : 'mÄsÃců'); 22302 } else { 22303 return result + 'mÄsÃci'; 22304 } 22305 case 'y': // a year / in a year / a year ago 22306 return withoutSuffix || isFuture ? 'rok' : 'rokem'; 22307 case 'yy': // 9 years / in 9 years / 9 years ago 22308 if (withoutSuffix || isFuture) { 22309 return result + (plural(number) ? 'roky' : 'let'); 22310 } else { 22311 return result + 'lety'; 22312 } 22313 } 22314 } 22315 22316 var cs = moment.defineLocale('cs', { 22317 months: months, 22318 monthsShort: monthsShort, 22319 monthsRegex: monthsRegex, 22320 monthsShortRegex: monthsRegex, 22321 // NOTE: 'Äerven' is substring of 'Äervenec'; therefore 'Äervenec' must precede 'Äerven' in the regex to be fully matched. 22322 // Otherwise parser matches '1. Äervenec' as '1. Äerven' + 'ec'. 22323 monthsStrictRegex: 22324 /^(leden|ledna|února|únor|bÅezen|bÅezna|duben|dubna|kvÄten|kvÄtna|Äervenec|Äervence|Äerven|Äervna|srpen|srpna|záÅÃ|ÅÃjen|ÅÃjna|listopadu|listopad|prosinec|prosince)/i, 22325 monthsShortStrictRegex: 22326 /^(led|úno|bÅe|dub|kvÄ|Ävn|Ävc|srp|záÅ|ÅÃj|lis|pro)/i, 22327 monthsParse: monthsParse, 22328 longMonthsParse: monthsParse, 22329 shortMonthsParse: monthsParse, 22330 weekdays: 'nedÄle_pondÄlÃ_úterý_stÅeda_Ätvrtek_pátek_sobota'.split('_'), 22331 weekdaysShort: 'ne_po_út_st_Ät_pá_so'.split('_'), 22332 weekdaysMin: 'ne_po_út_st_Ät_pá_so'.split('_'), 22333 longDateFormat: { 22334 LT: 'H:mm', 22335 LTS: 'H:mm:ss', 22336 L: 'DD.MM.YYYY', 22337 LL: 'D. MMMM YYYY', 22338 LLL: 'D. MMMM YYYY H:mm', 22339 LLLL: 'dddd D. MMMM YYYY H:mm', 22340 l: 'D. M. YYYY', 22341 }, 22342 calendar: { 22343 sameDay: '[dnes v] LT', 22344 nextDay: '[zÃtra v] LT', 22345 nextWeek: function () { 22346 switch (this.day()) { 22347 case 0: 22348 return '[v nedÄli v] LT'; 22349 case 1: 22350 case 2: 22351 return '[v] dddd [v] LT'; 22352 case 3: 22353 return '[ve stÅedu v] LT'; 22354 case 4: 22355 return '[ve Ätvrtek v] LT'; 22356 case 5: 22357 return '[v pátek v] LT'; 22358 case 6: 22359 return '[v sobotu v] LT'; 22360 } 22361 }, 22362 lastDay: '[vÄera v] LT', 22363 lastWeek: function () { 22364 switch (this.day()) { 22365 case 0: 22366 return '[minulou nedÄli v] LT'; 22367 case 1: 22368 case 2: 22369 return '[minulé] dddd [v] LT'; 22370 case 3: 22371 return '[minulou stÅedu v] LT'; 22372 case 4: 22373 case 5: 22374 return '[minulý] dddd [v] LT'; 22375 case 6: 22376 return '[minulou sobotu v] LT'; 22377 } 22378 }, 22379 sameElse: 'L', 22380 }, 22381 relativeTime: { 22382 future: 'za %s', 22383 past: 'pÅed %s', 22384 s: translate, 22385 ss: translate, 22386 m: translate, 22387 mm: translate, 22388 h: translate, 22389 hh: translate, 22390 d: translate, 22391 dd: translate, 22392 M: translate, 22393 MM: translate, 22394 y: translate, 22395 yy: translate, 22396 }, 22397 dayOfMonthOrdinalParse: /\d{1,2}\./, 22398 ordinal: '%d.', 22399 week: { 22400 dow: 1, // Monday is the first day of the week. 22401 doy: 4, // The week that contains Jan 4th is the first week of the year. 22402 }, 22403 }); 22404 22405 return cs; 22406 22407}))); 22408 22409 22410/***/ }), 22411/* 22 */ 22412/***/ (function(module, exports, __webpack_require__) { 22413 22414//! moment.js locale configuration 22415//! locale : Chuvash [cv] 22416//! author : Anatoly Mironov : https://github.com/mirontoli 22417 22418;(function (global, factory) { 22419 true ? factory(__webpack_require__(0)) : 22420 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 22421 factory(global.moment) 22422}(this, (function (moment) { 'use strict'; 22423 22424 //! moment.js locale configuration 22425 22426 var cv = moment.defineLocale('cv', { 22427 months: 'кÓÑлаÑ_наÑÓÑ_пÑÑ_ака_май_Ò«ÓÑÑме_ÑÑÓ_Ò«ÑÑла_авÓн_Ñпа_Ñӳк_ÑаÑÑав'.split( 22428 '_' 22429 ), 22430 monthsShort: 'кÓÑ_наÑ_пÑÑ_ака_май_Ò«ÓÑ_ÑÑÓ_Ò«ÑÑ_авн_Ñпа_Ñӳк_ÑаÑ'.split('_'), 22431 weekdays: 22432 'вÑÑÑаÑникÑн_ÑÑнÑикÑн_ÑÑлаÑикÑн_ÑнкÑн_кÓҫнеÑникÑн_ÑÑнекÑн_ÑÓмаÑкÑн'.split( 22433 '_' 22434 ), 22435 weekdaysShort: 'вÑÑ_ÑÑн_ÑÑл_Ñн_кÓÒ«_ÑÑн_ÑÓм'.split('_'), 22436 weekdaysMin: 'вÑ_Ñн_ÑÑ_Ñн_кҫ_ÑÑ_Ñм'.split('_'), 22437 longDateFormat: { 22438 LT: 'HH:mm', 22439 LTS: 'HH:mm:ss', 22440 L: 'DD-MM-YYYY', 22441 LL: 'YYYY [Ò«ÑÐ»Ñ Ð¸] MMMM [ÑйÓÑ Óн] D[-мÓÑÓ]', 22442 LLL: 'YYYY [Ò«ÑÐ»Ñ Ð¸] MMMM [ÑйÓÑ Óн] D[-мÓÑÓ], HH:mm', 22443 LLLL: 'dddd, YYYY [Ò«ÑÐ»Ñ Ð¸] MMMM [ÑйÓÑ Óн] D[-мÓÑÓ], HH:mm', 22444 }, 22445 calendar: { 22446 sameDay: '[ÐаÑн] LT [ÑÐµÑ ÐµÑÑе]', 22447 nextDay: '[ЫÑан] LT [ÑÐµÑ ÐµÑÑе]', 22448 lastDay: '[ÓнеÑ] LT [ÑÐµÑ ÐµÑÑе]', 22449 nextWeek: '[ҪиÑеÑ] dddd LT [ÑÐµÑ ÐµÑÑе]', 22450 lastWeek: '[ÐÑÑнÓ] dddd LT [ÑÐµÑ ÐµÑÑе]', 22451 sameElse: 'L', 22452 }, 22453 relativeTime: { 22454 future: function (output) {
22455 var affix = /ÑÐµÑ ÐµÑ$/i.exec(output) 22456 ? 'Ñен' 22457 : /Ò«Ñл$/i.exec(output) 22458 ? 'Ñан' 22459 : 'Ñан'; 22460 return output + affix; 22461 }, 22462 past: '%s каÑлла', 22463 s: 'пÓÑ-ик ҫеккÑнÑ', 22464 ss: '%d ҫеккÑнÑ', 22465 m: 'пÓÑ Ð¼Ð¸Ð½ÑÑ', 22466 mm: '%d минÑÑ', 22467 h: 'пÓÑ ÑÐµÑ ÐµÑ', 22468 hh: '%d ÑÐµÑ ÐµÑ', 22469 d: 'пÓÑ ÐºÑн', 22470 dd: '%d кÑн', 22471 M: 'пÓÑ ÑйÓÑ ', 22472 MM: '%d ÑйÓÑ ', 22473 y: 'пÓÑ Ò«Ñл', 22474 yy: '%d Ò«Ñл', 22475 }, 22476 dayOfMonthOrdinalParse: /\d{1,2}-мÓÑ/, 22477 ordinal: '%d-мÓÑ', 22478 week: { 22479 dow: 1, // Monday is the first day of the week. 22480 doy: 7, // The week that contains Jan 7th is the first week of the year. 22481 }, 22482 }); 22483 22484 return cv; 22485 22486}))); 22487 22488 22489/***/ }), 22490/* 23 */ 22491/***/ (function(module, exports, __webpack_require__) { 22492 22493//! moment.js locale configuration 22494//! locale : Welsh [cy] 22495//! author : Robert Allen : https://github.com/robgallen 22496//! author : https://github.com/ryangreaves 22497 22498;(function (global, factory) { 22499 true ? factory(__webpack_require__(0)) : 22500 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 22501 factory(global.moment) 22502}(this, (function (moment) { 'use strict'; 22503 22504 //! moment.js locale configuration 22505 22506 var cy = moment.defineLocale('cy', { 22507 months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split( 22508 '_' 22509 ), 22510 monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split( 22511 '_' 22512 ), 22513 weekdays: 22514 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split( 22515 '_' 22516 ), 22517 weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), 22518 weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), 22519 weekdaysParseExact: true, 22520 // time formats are the same as en-gb 22521 longDateFormat: { 22522 LT: 'HH:mm', 22523 LTS: 'HH:mm:ss', 22524 L: 'DD/MM/YYYY', 22525 LL: 'D MMMM YYYY', 22526 LLL: 'D MMMM YYYY HH:mm', 22527 LLLL: 'dddd, D MMMM YYYY HH:mm', 22528 }, 22529 calendar: { 22530 sameDay: '[Heddiw am] LT', 22531 nextDay: '[Yfory am] LT', 22532 nextWeek: 'dddd [am] LT', 22533 lastDay: '[Ddoe am] LT', 22534 lastWeek: 'dddd [diwethaf am] LT', 22535 sameElse: 'L', 22536 }, 22537 relativeTime: { 22538 future: 'mewn %s', 22539 past: '%s yn ôl', 22540 s: 'ychydig eiliadau', 22541 ss: '%d eiliad', 22542 m: 'munud', 22543 mm: '%d munud', 22544 h: 'awr', 22545 hh: '%d awr', 22546 d: 'diwrnod', 22547 dd: '%d diwrnod', 22548 M: 'mis', 22549 MM: '%d mis', 22550 y: 'blwyddyn', 22551 yy: '%d flynedd', 22552 }, 22553 dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, 22554 // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh 22555 ordinal: function (number) { 22556 var b = number, 22557 output = '', 22558 lookup = [ 22559 '', 22560 'af', 22561 'il', 22562 'ydd', 22563 'ydd', 22564 'ed', 22565 'ed', 22566 'ed', 22567 'fed', 22568 'fed', 22569 'fed', // 1af to 10fed 22570 'eg', 22571 'fed', 22572 'eg', 22573 'eg', 22574 'fed', 22575 'eg', 22576 'eg', 22577 'fed', 22578 'eg', 22579 'fed', // 11eg to 20fed 22580 ]; 22581 if (b > 20) { 22582 if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { 22583 output = 'fed'; // not 30ain, 70ain or 90ain 22584 } else { 22585 output = 'ain'; 22586 } 22587 } else if (b > 0) { 22588 output = lookup[b]; 22589 } 22590 return number + output; 22591 }, 22592 week: { 22593 dow: 1, // Monday is the first day of the week. 22594 doy: 4, // The week that contains Jan 4th is the first week of the year. 22595 }, 22596 }); 22597 22598 return cy; 22599 22600}))); 22601 22602 22603/***/ }), 22604/* 24 */ 22605/***/ (function(module, exports, __webpack_require__) { 22606 22607//! moment.js locale configuration 22608//! locale : Danish [da] 22609//! author : Ulrik Nielsen : https://github.com/mrbase 22610 22611;(function (global, factory) { 22612 true ? factory(__webpack_require__(0)) : 22613 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 22614 factory(global.moment) 22615}(this, (function (moment) { 'use strict'; 22616 22617 //! moment.js locale configuration 22618 22619 var da = moment.defineLocale('da', { 22620 months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split( 22621 '_' 22622 ), 22623 monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), 22624 weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), 22625 weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'), 22626 weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'), 22627 longDateFormat: { 22628 LT: 'HH:mm', 22629 LTS: 'HH:mm:ss', 22630 L: 'DD.MM.YYYY', 22631 LL: 'D. MMMM YYYY', 22632 LLL: 'D. MMMM YYYY HH:mm', 22633 LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm', 22634 }, 22635 calendar: { 22636 sameDay: '[i dag kl.] LT', 22637 nextDay: '[i morgen kl.] LT', 22638 nextWeek: 'pÃ¥ dddd [kl.] LT', 22639 lastDay: '[i gÃ¥r kl.] LT', 22640 lastWeek: '[i] dddd[s kl.] LT', 22641 sameElse: 'L', 22642 }, 22643 relativeTime: { 22644 future: 'om %s', 22645 past: '%s siden', 22646 s: 'fÃ¥ sekunder', 22647 ss: '%d sekunder', 22648 m: 'et minut', 22649 mm: '%d minutter', 22650 h: 'en time', 22651 hh: '%d timer', 22652 d: 'en dag', 22653 dd: '%d dage', 22654 M: 'en mÃ¥ned', 22655 MM: '%d mÃ¥neder', 22656 y: 'et Ã¥r', 22657 yy: '%d Ã¥r', 22658 }, 22659 dayOfMonthOrdinalParse: /\d{1,2}\./, 22660 ordinal: '%d.', 22661 week: { 22662 dow: 1, // Monday is the first day of the week. 22663 doy: 4, // The week that contains Jan 4th is the first week of the year. 22664 }, 22665 }); 22666 22667 return da; 22668 22669}))); 22670 22671 22672/***/ }), 22673/* 25 */ 22674/***/ (function(module, exports, __webpack_require__) { 22675 22676//! moment.js locale configuration 22677//! locale : German [de] 22678//! author : lluchs : https://github.com/lluchs 22679//! author: Menelion Elensúle: https://github.com/Oire 22680//! author : Mikolaj Dadela : https://github.com/mik01aj 22681 22682;(function (global, factory) { 22683 true ? factory(__webpack_require__(0)) : 22684 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 22685 factory(global.moment) 22686}(this, (function (moment) { 'use strict'; 22687 22688 //! moment.js locale configuration 22689 22690 function processRelativeTime(number, withoutSuffix, key, isFuture) { 22691 var format = { 22692 m: ['eine Minute', 'einer Minute'], 22693 h: ['eine Stunde', 'einer Stunde'], 22694 d: ['ein Tag', 'einem Tag'], 22695 dd: [number + ' Tage', number + ' Tagen'], 22696 w: ['eine Woche', 'einer Woche'], 22697 M: ['ein Monat', 'einem Monat'], 22698 MM: [number + ' Monate', number + ' Monaten'], 22699 y: ['ein Jahr', 'einem Jahr'],
22700 yy: [number + ' Jahre', number + ' Jahren'], 22701 }; 22702 return withoutSuffix ? format[key][0] : format[key][1]; 22703 } 22704 22705 var de = moment.defineLocale('de', { 22706 months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( 22707 '_' 22708 ), 22709 monthsShort: 22710 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), 22711 monthsParseExact: true, 22712 weekdays: 22713 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( 22714 '_' 22715 ), 22716 weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), 22717 weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), 22718 weekdaysParseExact: true, 22719 longDateFormat: { 22720 LT: 'HH:mm', 22721 LTS: 'HH:mm:ss', 22722 L: 'DD.MM.YYYY', 22723 LL: 'D. MMMM YYYY', 22724 LLL: 'D. MMMM YYYY HH:mm', 22725 LLLL: 'dddd, D. MMMM YYYY HH:mm', 22726 }, 22727 calendar: { 22728 sameDay: '[heute um] LT [Uhr]', 22729 sameElse: 'L', 22730 nextDay: '[morgen um] LT [Uhr]', 22731 nextWeek: 'dddd [um] LT [Uhr]', 22732 lastDay: '[gestern um] LT [Uhr]', 22733 lastWeek: '[letzten] dddd [um] LT [Uhr]', 22734 }, 22735 relativeTime: { 22736 future: 'in %s', 22737 past: 'vor %s', 22738 s: 'ein paar Sekunden', 22739 ss: '%d Sekunden', 22740 m: processRelativeTime, 22741 mm: '%d Minuten', 22742 h: processRelativeTime, 22743 hh: '%d Stunden', 22744 d: processRelativeTime, 22745 dd: processRelativeTime, 22746 w: processRelativeTime, 22747 ww: '%d Wochen', 22748 M: processRelativeTime, 22749 MM: processRelativeTime, 22750 y: processRelativeTime, 22751 yy: processRelativeTime, 22752 }, 22753 dayOfMonthOrdinalParse: /\d{1,2}\./, 22754 ordinal: '%d.', 22755 week: { 22756 dow: 1, // Monday is the first day of the week. 22757 doy: 4, // The week that contains Jan 4th is the first week of the year. 22758 }, 22759 }); 22760 22761 return de; 22762 22763}))); 22764 22765 22766/***/ }), 22767/* 26 */ 22768/***/ (function(module, exports, __webpack_require__) { 22769 22770//! moment.js locale configuration 22771//! locale : German (Austria) [de-at] 22772//! author : lluchs : https://github.com/lluchs 22773//! author: Menelion Elensúle: https://github.com/Oire 22774//! author : Martin Groller : https://github.com/MadMG 22775//! author : Mikolaj Dadela : https://github.com/mik01aj 22776 22777;(function (global, factory) { 22778 true ? factory(__webpack_require__(0)) : 22779 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 22780 factory(global.moment) 22781}(this, (function (moment) { 'use strict'; 22782 22783 //! moment.js locale configuration 22784 22785 function processRelativeTime(number, withoutSuffix, key, isFuture) { 22786 var format = { 22787 m: ['eine Minute', 'einer Minute'], 22788 h: ['eine Stunde', 'einer Stunde'], 22789 d: ['ein Tag', 'einem Tag'], 22790 dd: [number + ' Tage', number + ' Tagen'], 22791 w: ['eine Woche', 'einer Woche'], 22792 M: ['ein Monat', 'einem Monat'], 22793 MM: [number + ' Monate', number + ' Monaten'], 22794 y: ['ein Jahr', 'einem Jahr'], 22795 yy: [number + ' Jahre', number + ' Jahren'], 22796 }; 22797 return withoutSuffix ? format[key][0] : format[key][1]; 22798 } 22799 22800 var deAt = moment.defineLocale('de-at', { 22801 months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( 22802 '_' 22803 ), 22804 monthsShort: 22805 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), 22806 monthsParseExact: true, 22807 weekdays: 22808 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( 22809 '_' 22810 ), 22811 weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), 22812 weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), 22813 weekdaysParseExact: true, 22814 longDateFormat: { 22815 LT: 'HH:mm', 22816 LTS: 'HH:mm:ss', 22817 L: 'DD.MM.YYYY', 22818 LL: 'D. MMMM YYYY', 22819 LLL: 'D. MMMM YYYY HH:mm', 22820 LLLL: 'dddd, D. MMMM YYYY HH:mm', 22821 }, 22822 calendar: { 22823 sameDay: '[heute um] LT [Uhr]', 22824 sameElse: 'L', 22825 nextDay: '[morgen um] LT [Uhr]', 22826 nextWeek: 'dddd [um] LT [Uhr]', 22827 lastDay: '[gestern um] LT [Uhr]', 22828 lastWeek: '[letzten] dddd [um] LT [Uhr]', 22829 }, 22830 relativeTime: { 22831 future: 'in %s', 22832 past: 'vor %s', 22833 s: 'ein paar Sekunden', 22834 ss: '%d Sekunden', 22835 m: processRelativeTime, 22836 mm: '%d Minuten', 22837 h: processRelativeTime, 22838 hh: '%d Stunden', 22839 d: processRelativeTime, 22840 dd: processRelativeTime, 22841 w: processRelativeTime, 22842 ww: '%d Wochen', 22843 M: processRelativeTime, 22844 MM: processRelativeTime, 22845 y: processRelativeTime, 22846 yy: processRelativeTime, 22847 }, 22848 dayOfMonthOrdinalParse: /\d{1,2}\./, 22849 ordinal: '%d.', 22850 week: { 22851 dow: 1, // Monday is the first day of the week. 22852 doy: 4, // The week that contains Jan 4th is the first week of the year. 22853 }, 22854 }); 22855 22856 return deAt; 22857 22858}))); 22859 22860 22861/***/ }), 22862/* 27 */ 22863/***/ (function(module, exports, __webpack_require__) { 22864 22865//! moment.js locale configuration 22866//! locale : German (Switzerland) [de-ch] 22867//! author : sschueller : https://github.com/sschueller 22868 22869;(function (global, factory) { 22870 true ? factory(__webpack_require__(0)) : 22871 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 22872 factory(global.moment) 22873}(this, (function (moment) { 'use strict'; 22874 22875 //! moment.js locale configuration 22876 22877 function processRelativeTime(number, withoutSuffix, key, isFuture) { 22878 var format = { 22879 m: ['eine Minute', 'einer Minute'], 22880 h: ['eine Stunde', 'einer Stunde'], 22881 d: ['ein Tag', 'einem Tag'], 22882 dd: [number + ' Tage', number + ' Tagen'], 22883 w: ['eine Woche', 'einer Woche'], 22884 M: ['ein Monat', 'einem Monat'], 22885 MM: [number + ' Monate', number + ' Monaten'], 22886 y: ['ein Jahr', 'einem Jahr'],
22887 yy: [number + ' Jahre', number + ' Jahren'], 22888 }; 22889 return withoutSuffix ? format[key][0] : format[key][1]; 22890 } 22891 22892 var deCh = moment.defineLocale('de-ch', { 22893 months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( 22894 '_' 22895 ), 22896 monthsShort: 22897 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), 22898 monthsParseExact: true, 22899 weekdays: 22900 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( 22901 '_' 22902 ), 22903 weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), 22904 weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), 22905 weekdaysParseExact: true, 22906 longDateFormat: { 22907 LT: 'HH:mm', 22908 LTS: 'HH:mm:ss', 22909 L: 'DD.MM.YYYY', 22910 LL: 'D. MMMM YYYY', 22911 LLL: 'D. MMMM YYYY HH:mm', 22912 LLLL: 'dddd, D. MMMM YYYY HH:mm', 22913 }, 22914 calendar: { 22915 sameDay: '[heute um] LT [Uhr]', 22916 sameElse: 'L', 22917 nextDay: '[morgen um] LT [Uhr]', 22918 nextWeek: 'dddd [um] LT [Uhr]', 22919 lastDay: '[gestern um] LT [Uhr]', 22920 lastWeek: '[letzten] dddd [um] LT [Uhr]', 22921 }, 22922 relativeTime: { 22923 future: 'in %s', 22924 past: 'vor %s', 22925 s: 'ein paar Sekunden', 22926 ss: '%d Sekunden', 22927 m: processRelativeTime, 22928 mm: '%d Minuten', 22929 h: processRelativeTime, 22930 hh: '%d Stunden', 22931 d: processRelativeTime, 22932 dd: processRelativeTime, 22933 w: processRelativeTime, 22934 ww: '%d Wochen', 22935 M: processRelativeTime, 22936 MM: processRelativeTime, 22937 y: processRelativeTime, 22938 yy: processRelativeTime, 22939 }, 22940 dayOfMonthOrdinalParse: /\d{1,2}\./, 22941 ordinal: '%d.', 22942 week: { 22943 dow: 1, // Monday is the first day of the week. 22944 doy: 4, // The week that contains Jan 4th is the first week of the year. 22945 }, 22946 }); 22947 22948 return deCh; 22949 22950}))); 22951 22952 22953/***/ }), 22954/* 28 */ 22955/***/ (function(module, exports, __webpack_require__) { 22956 22957//! moment.js locale configuration 22958//! locale : Maldivian [dv] 22959//! author : Jawish Hameed : https://github.com/jawish 22960 22961;(function (global, factory) { 22962 true ? factory(__webpack_require__(0)) : 22963 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 22964 factory(global.moment) 22965}(this, (function (moment) { 'use strict'; 22966 22967 //! moment.js locale configuration 22968 22969 var months = [ 22970 'ÞÞ¬ÞÞªÞÞ¦ÞÞ©', 22971 'ÞÞ¬ÞÞ°ÞÞªÞÞ¦ÞÞ©', 22972 'ÞÞ§ÞÞ¨ÞÞª', 22973 'ÞÞÞÞ°ÞÞ©ÞÞª', 22974 'ÞÞ', 22975 'ÞÞ«ÞÞ°', 22976 'ÞÞªÞÞ¦ÞÞ¨', 22977 'ÞÞ¯ÞÞ¦ÞÞ°ÞÞª', 22978 'ÞÞ¬ÞÞ°ÞÞ¬ÞÞ°ÞÞ¦ÞÞª', 22979 'ÞÞ®ÞÞ°ÞÞ¯ÞÞ¦ÞÞª', 22980 'ÞÞ®ÞÞ¬ÞÞ°ÞÞ¦ÞÞª', 22981 'ÞÞ¨ÞÞ¬ÞÞ°ÞÞ¦ÞÞª', 22982 ], 22983 weekdays = [ 22984 'ÞÞ§ÞÞ¨ÞÞ°ÞÞ¦', 22985 'ÞÞ¯ÞÞ¦', 22986 'ÞÞ¦ÞÞ°ÞÞ§ÞÞ¦', 22987 'ÞÞªÞÞ¦', 22988 'ÞÞªÞÞ§ÞÞ°ÞÞ¦ÞÞ¨', 22989 'ÞÞªÞÞªÞÞª', 22990 'ÞÞ®ÞÞ¨ÞÞ¨ÞÞª', 22991 ]; 22992 22993 var dv = moment.defineLocale('dv', { 22994 months: months, 22995 monthsShort: months, 22996 weekdays: weekdays, 22997 weekdaysShort: weekdays, 22998 weekdaysMin: 'ÞÞ§ÞÞ¨_ÞÞ¯ÞÞ¦_ÞÞ¦ÞÞ°_ÞÞªÞÞ¦_ÞÞªÞÞ§_ÞÞªÞÞª_ÞÞ®ÞÞ¨'.split('_'), 22999 longDateFormat: { 23000 LT: 'HH:mm', 23001 LTS: 'HH:mm:ss', 23002 L: 'D/M/YYYY', 23003 LL: 'D MMMM YYYY', 23004 LLL: 'D MMMM YYYY HH:mm', 23005 LLLL: 'dddd D MMMM YYYY HH:mm', 23006 }, 23007 meridiemParse: /ÞÞ|ÞÞ/, 23008 isPM: function (input) { 23009 return 'ÞÞ' === input; 23010 }, 23011 meridiem: function (hour, minute, isLower) { 23012 if (hour < 12) { 23013 return 'ÞÞ'; 23014 } else { 23015 return 'ÞÞ'; 23016 } 23017 }, 23018 calendar: { 23019 sameDay: '[ÞÞ¨ÞÞ¦ÞÞª] LT', 23020 nextDay: '[ÞÞ§ÞÞ¦ÞÞ§] LT', 23021 nextWeek: 'dddd LT', 23022 lastDay: '[ÞÞ¨ÞÞ°ÞÞ¬] LT', 23023 lastWeek: '[ÞÞ§ÞÞ¨ÞÞªÞÞ¨] dddd LT', 23024 sameElse: 'L', 23025 }, 23026 relativeTime: { 23027 future: 'ÞÞ¬ÞÞÞÞ¦ÞÞ¨ %s', 23028 past: 'ÞÞªÞÞ¨ÞÞ° %s', 23029 s: 'ÞÞ¨ÞÞªÞÞ°ÞÞªÞÞ®Þ Þ¬ÞÞ°', 23030 ss: 'd% ÞÞ¨ÞÞªÞÞ°ÞÞª', 23031 m: 'ÞÞ¨ÞÞ¨ÞÞ¬ÞÞ°', 23032 mm: 'ÞÞ¨ÞÞ¨ÞÞª %d', 23033 h: 'ÞÞ¦ÞÞ¨ÞÞ¨ÞÞ¬ÞÞ°', 23034 hh: 'ÞÞ¦ÞÞ¨ÞÞ¨ÞÞª %d', 23035 d: 'ÞÞªÞÞ¦ÞÞ¬ÞÞ°', 23036 dd: 'ÞÞªÞÞ¦ÞÞ° %d', 23037 M: 'ÞÞ¦ÞÞ¬ÞÞ°', 23038 MM: 'ÞÞ¦ÞÞ° %d', 23039 y: 'ÞÞ¦ÞÞ¦ÞÞ¬ÞÞ°', 23040 yy: 'ÞÞ¦ÞÞ¦ÞÞª %d', 23041 }, 23042 preparse: function (string) { 23043 return string.replace(/Ø/g, ','); 23044 }, 23045 postformat: function (string) { 23046 return string.replace(/,/g, 'Ø'); 23047 }, 23048 week: { 23049 dow: 7, // Sunday is the first day of the week. 23050 doy: 12, // The week that contains Jan 12th is the first week of the year. 23051 }, 23052 }); 23053 23054 return dv; 23055 23056}))); 23057 23058 23059/***/ }), 23060/* 29 */ 23061/***/ (function(module, exports, __webpack_require__) { 23062 23063//! moment.js locale configuration 23064//! locale : Greek [el] 23065//! author : Aggelos Karalias : https://github.com/mehiel 23066 23067;(function (global, factory) { 23068 true ? factory(__webpack_require__(0)) : 23069 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 23070 factory(global.moment) 23071}(this, (function (moment) { 'use strict'; 23072 23073 //! moment.js locale configuration 23074 23075 function isFunction(input) { 23076 return ( 23077 (typeof Function !== 'undefined' && input instanceof Function) || 23078 Object.prototype.toString.call(input) === '[object Function]' 23079 ); 23080 } 23081 23082 var el = moment.defineLocale('el', { 23083 monthsNominativeEl: 23084 'ÎÎ±Î½Î¿Ï Î¬ÏιοÏ_ΦεβÏÎ¿Ï Î¬ÏιοÏ_ÎάÏÏιοÏ_ÎÏÏίλιοÏ_ÎάιοÏ_ÎοÏνιοÏ_ÎοÏλιοÏ_ÎÏÎ³Î¿Ï ÏÏοÏ_ΣεÏÏÎμβÏιοÏ_ÎκÏÏβÏιοÏ_ÎοÎμβÏιοÏ_ÎεκÎμβÏιοÏ'.split( 23085 '_' 23086 ), 23087 monthsGenitiveEl: 23088 'ÎÎ±Î½Î¿Ï Î±ÏÎ¯Î¿Ï _ΦεβÏÎ¿Ï Î±ÏÎ¯Î¿Ï _ÎαÏÏÎ¯Î¿Ï _ÎÏÏÎ¹Î»Î¯Î¿Ï _ÎαÎÎ¿Ï _ÎÎ¿Ï Î½Î¯Î¿Ï _ÎÎ¿Ï Î»Î¯Î¿Ï _ÎÏ Î³Î¿ÏÏÏÎ¿Ï _ΣεÏÏεμβÏÎ¯Î¿Ï _ÎκÏÏβÏÎ¯Î¿Ï _ÎοεμβÏÎ¯Î¿Ï _ÎεκεμβÏÎ¯Î¿Ï '.split( 23089 '_' 23090 ), 23091 months: function (momentToFormat, format) { 23092 if (!momentToFormat) { 23093 return this._monthsNominativeEl; 23094 } else if ( 23095 typeof format === 'string' && 23096 /D/.test(format.substring(0, format.indexOf('MMMM'))) 23097 ) { 23098 // if there is a day number before 'MMMM' 23099 return this._monthsGenitiveEl[momentToFormat.month()]; 23100 } else { 23101 return this._monthsNominativeEl[momentToFormat.month()]; 23102 } 23103 }, 23104 monthsShort: 'Îαν_Φεβ_ÎαÏ_ÎÏÏ_ÎαÏ_ÎÎ¿Ï Î½_ÎÎ¿Ï Î»_ÎÏ Î³_ΣεÏ_ÎκÏ_Îοε_Îεκ'.split('_'), 23105 weekdays: 'ÎÏ Ïιακή_ÎÎµÏ ÏÎÏα_ΤÏίÏη_ΤεÏάÏÏη_Î ÎμÏÏη_ΠαÏαÏÎºÎµÏ Î®_ΣάββαÏο'.split( 23106 '_' 23107 ), 23108 weekdaysShort: 'ÎÏ Ï_ÎÎµÏ _ΤÏι_ΤεÏ_Πεμ_ΠαÏ_Σαβ'.split('_'), 23109 weekdaysMin: 'ÎÏ _Îε_ΤÏ_Τε_Πε_Πα_Σα'.split('_'), 23110 meridiem: function (hours, minutes, isLower) { 23111 if (hours > 11) { 23112 return isLower ? 'μμ' : 'ÎÎ'; 23113 } else { 23114 return isLower ? 'Ïμ' : 'Î Î'; 23115 } 23116 }, 23117 isPM: function (input) { 23118 return (input + '').toLowerCase()[0] === 'μ'; 23119 }, 23120 meridiemParse: /[Î Î]\.?Î?\.?/i, 23121 longDateFormat: { 23122 LT: 'h:mm A', 23123 LTS: 'h:mm:ss A', 23124 L: 'DD/MM/YYYY', 23125 LL: 'D MMMM YYYY', 23126 LLL: 'D MMMM YYYY h:mm A', 23127 LLLL: 'dddd, D MMMM YYYY h:mm A', 23128 }, 23129 calendarEl: { 23130 sameDay: '[ΣήμεÏα {}] LT', 23131 nextDay: '[ÎÏÏιο {}] LT', 23132 nextWeek: 'dddd [{}] LT', 23133 lastDay: '[Î§Î¸ÎµÏ {}] LT', 23134 lastWeek: function () { 23135 switch (this.day()) { 23136 case 6: 23137 return '[Ïο ÏÏοηγοÏμενο] dddd [{}] LT'; 23138 default: 23139 return '[Ïην ÏÏοηγοÏμενη] dddd [{}] LT'; 23140 } 23141 }, 23142 sameElse: 'L', 23143 }, 23144 calendar: function (key, mom) { 23145 var output = this._calendarEl[key], 23146 hours = mom && mom.hours(); 23147 if (isFunction(output)) { 23148 output = output.apply(mom); 23149 } 23150 return output.replace('{}', hours % 12 === 1 ? 'ÏÏη' : 'ÏÏιÏ'); 23151 }, 23152 relativeTime: { 23153 future: 'Ïε %s', 23154 past: '%s ÏÏιν', 23155 s: 'λίγα Î´ÎµÏ ÏεÏÏλεÏÏα', 23156 ss: '%d Î´ÎµÏ ÏεÏÏλεÏÏα', 23157 m: 'Îνα λεÏÏÏ', 23158 mm: '%d λεÏÏά', 23159 h: 'μία ÏÏα', 23160 hh: '%d ÏÏεÏ', 23161 d: 'μία μÎÏα', 23162 dd: '%d μÎÏεÏ',
23163 M: 'ÎÎ½Î±Ï Î¼Î®Î½Î±Ï', 23164 MM: '%d μήνεÏ', 23165 y: 'ÎÎ½Î±Ï ÏÏÏνοÏ', 23166 yy: '%d ÏÏÏνια', 23167 }, 23168 dayOfMonthOrdinalParse: /\d{1,2}η/, 23169 ordinal: '%dη', 23170 week: { 23171 dow: 1, // Monday is the first day of the week. 23172 doy: 4, // The week that contains Jan 4st is the first week of the year. 23173 }, 23174 }); 23175 23176 return el; 23177 23178}))); 23179 23180 23181/***/ }), 23182/* 30 */ 23183/***/ (function(module, exports, __webpack_require__) { 23184 23185//! moment.js locale configuration 23186//! locale : English (Australia) [en-au] 23187//! author : Jared Morse : https://github.com/jarcoal 23188 23189;(function (global, factory) { 23190 true ? factory(__webpack_require__(0)) : 23191 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 23192 factory(global.moment) 23193}(this, (function (moment) { 'use strict'; 23194 23195 //! moment.js locale configuration 23196 23197 var enAu = moment.defineLocale('en-au', { 23198 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 23199 '_' 23200 ), 23201 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 23202 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 23203 '_' 23204 ), 23205 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 23206 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 23207 longDateFormat: { 23208 LT: 'h:mm A', 23209 LTS: 'h:mm:ss A', 23210 L: 'DD/MM/YYYY', 23211 LL: 'D MMMM YYYY', 23212 LLL: 'D MMMM YYYY h:mm A', 23213 LLLL: 'dddd, D MMMM YYYY h:mm A', 23214 }, 23215 calendar: { 23216 sameDay: '[Today at] LT', 23217 nextDay: '[Tomorrow at] LT', 23218 nextWeek: 'dddd [at] LT', 23219 lastDay: '[Yesterday at] LT', 23220 lastWeek: '[Last] dddd [at] LT', 23221 sameElse: 'L', 23222 }, 23223 relativeTime: { 23224 future: 'in %s', 23225 past: '%s ago', 23226 s: 'a few seconds', 23227 ss: '%d seconds', 23228 m: 'a minute', 23229 mm: '%d minutes', 23230 h: 'an hour', 23231 hh: '%d hours', 23232 d: 'a day', 23233 dd: '%d days', 23234 M: 'a month', 23235 MM: '%d months', 23236 y: 'a year', 23237 yy: '%d years', 23238 }, 23239 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 23240 ordinal: function (number) { 23241 var b = number % 10, 23242 output = 23243 ~~((number % 100) / 10) === 1 23244 ? 'th' 23245 : b === 1 23246 ? 'st' 23247 : b === 2 23248 ? 'nd' 23249 : b === 3 23250 ? 'rd' 23251 : 'th'; 23252 return number + output; 23253 }, 23254 week: { 23255 dow: 0, // Sunday is the first day of the week. 23256 doy: 4, // The week that contains Jan 4th is the first week of the year. 23257 }, 23258 }); 23259 23260 return enAu; 23261 23262}))); 23263 23264 23265/***/ }), 23266/* 31 */ 23267/***/ (function(module, exports, __webpack_require__) { 23268 23269//! moment.js locale configuration 23270//! locale : English (Canada) [en-ca] 23271//! author : Jonathan Abourbih : https://github.com/jonbca 23272 23273;(function (global, factory) { 23274 true ? factory(__webpack_require__(0)) : 23275 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 23276 factory(global.moment) 23277}(this, (function (moment) { 'use strict'; 23278 23279 //! moment.js locale configuration 23280 23281 var enCa = moment.defineLocale('en-ca', { 23282 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 23283 '_' 23284 ), 23285 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 23286 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 23287 '_' 23288 ), 23289 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 23290 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 23291 longDateFormat: { 23292 LT: 'h:mm A', 23293 LTS: 'h:mm:ss A', 23294 L: 'YYYY-MM-DD', 23295 LL: 'MMMM D, YYYY', 23296 LLL: 'MMMM D, YYYY h:mm A', 23297 LLLL: 'dddd, MMMM D, YYYY h:mm A', 23298 }, 23299 calendar: { 23300 sameDay: '[Today at] LT', 23301 nextDay: '[Tomorrow at] LT', 23302 nextWeek: 'dddd [at] LT', 23303 lastDay: '[Yesterday at] LT', 23304 lastWeek: '[Last] dddd [at] LT', 23305 sameElse: 'L', 23306 }, 23307 relativeTime: { 23308 future: 'in %s', 23309 past: '%s ago', 23310 s: 'a few seconds', 23311 ss: '%d seconds', 23312 m: 'a minute', 23313 mm: '%d minutes', 23314 h: 'an hour', 23315 hh: '%d hours', 23316 d: 'a day', 23317 dd: '%d days', 23318 M: 'a month', 23319 MM: '%d months', 23320 y: 'a year', 23321 yy: '%d years', 23322 }, 23323 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 23324 ordinal: function (number) { 23325 var b = number % 10, 23326 output = 23327 ~~((number % 100) / 10) === 1 23328 ? 'th' 23329 : b === 1 23330 ? 'st' 23331 : b === 2 23332 ? 'nd' 23333 : b === 3 23334 ? 'rd' 23335 : 'th'; 23336 return number + output; 23337 }, 23338 }); 23339 23340 return enCa; 23341 23342}))); 23343 23344 23345/***/ }), 23346/* 32 */ 23347/***/ (function(module, exports, __webpack_require__) { 23348 23349//! moment.js locale configuration 23350//! locale : English (United Kingdom) [en-gb] 23351//! author : Chris Gedrim : https://github.com/chrisgedrim 23352 23353;(function (global, factory) { 23354 true ? factory(__webpack_require__(0)) : 23355 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 23356 factory(global.moment) 23357}(this, (function (moment) { 'use strict'; 23358 23359 //! moment.js locale configuration 23360 23361 var enGb = moment.defineLocale('en-gb', { 23362 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 23363 '_' 23364 ), 23365 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 23366 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 23367 '_' 23368 ), 23369 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 23370 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 23371 longDateFormat: { 23372 LT: 'HH:mm', 23373 LTS: 'HH:mm:ss', 23374 L: 'DD/MM/YYYY', 23375 LL: 'D MMMM YYYY', 23376 LLL: 'D MMMM YYYY HH:mm', 23377 LLLL: 'dddd, D MMMM YYYY HH:mm', 23378 }, 23379 calendar: { 23380 sameDay: '[Today at] LT', 23381 nextDay: '[Tomorrow at] LT', 23382 nextWeek: 'dddd [at] LT', 23383 lastDay: '[Yesterday at] LT', 23384 lastWeek: '[Last] dddd [at] LT', 23385 sameElse: 'L', 23386 }, 23387 relativeTime: { 23388 future: 'in %s', 23389 past: '%s ago', 23390 s: 'a few seconds', 23391 ss: '%d seconds', 23392 m: 'a minute', 23393 mm: '%d minutes', 23394 h: 'an hour', 23395 hh: '%d hours', 23396 d: 'a day', 23397 dd: '%d days', 23398 M: 'a month', 23399 MM: '%d months', 23400 y: 'a year', 23401 yy: '%d years', 23402 }, 23403 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 23404 ordinal: function (number) { 23405 var b = number % 10, 23406 output = 23407 ~~((number % 100) / 10) === 1 23408 ? 'th' 23409 : b === 1 23410 ? 'st' 23411 : b === 2 23412 ? 'nd' 23413 : b === 3 23414 ? 'rd' 23415 : 'th'; 23416 return number + output; 23417 }, 23418 week: { 23419 dow: 1, // Monday is the first day of the week. 23420 doy: 4, // The week that contains Jan 4th is the first week of the year. 23421 }, 23422 }); 23423 23424 return enGb;
23425 23426}))); 23427 23428 23429/***/ }), 23430/* 33 */ 23431/***/ (function(module, exports, __webpack_require__) { 23432 23433//! moment.js locale configuration 23434//! locale : English (Ireland) [en-ie] 23435//! author : Chris Cartlidge : https://github.com/chriscartlidge 23436 23437;(function (global, factory) { 23438 true ? factory(__webpack_require__(0)) : 23439 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 23440 factory(global.moment) 23441}(this, (function (moment) { 'use strict'; 23442 23443 //! moment.js locale configuration 23444 23445 var enIe = moment.defineLocale('en-ie', { 23446 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 23447 '_' 23448 ), 23449 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 23450 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 23451 '_' 23452 ), 23453 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 23454 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 23455 longDateFormat: { 23456 LT: 'HH:mm', 23457 LTS: 'HH:mm:ss', 23458 L: 'DD/MM/YYYY', 23459 LL: 'D MMMM YYYY', 23460 LLL: 'D MMMM YYYY HH:mm', 23461 LLLL: 'dddd D MMMM YYYY HH:mm', 23462 }, 23463 calendar: { 23464 sameDay: '[Today at] LT', 23465 nextDay: '[Tomorrow at] LT', 23466 nextWeek: 'dddd [at] LT', 23467 lastDay: '[Yesterday at] LT', 23468 lastWeek: '[Last] dddd [at] LT', 23469 sameElse: 'L', 23470 }, 23471 relativeTime: { 23472 future: 'in %s', 23473 past: '%s ago', 23474 s: 'a few seconds', 23475 ss: '%d seconds', 23476 m: 'a minute', 23477 mm: '%d minutes', 23478 h: 'an hour', 23479 hh: '%d hours', 23480 d: 'a day', 23481 dd: '%d days', 23482 M: 'a month', 23483 MM: '%d months', 23484 y: 'a year', 23485 yy: '%d years', 23486 }, 23487 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 23488 ordinal: function (number) { 23489 var b = number % 10, 23490 output = 23491 ~~((number % 100) / 10) === 1 23492 ? 'th' 23493 : b === 1 23494 ? 'st' 23495 : b === 2 23496 ? 'nd' 23497 : b === 3 23498 ? 'rd' 23499 : 'th'; 23500 return number + output; 23501 }, 23502 week: { 23503 dow: 1, // Monday is the first day of the week. 23504 doy: 4, // The week that contains Jan 4th is the first week of the year. 23505 }, 23506 }); 23507 23508 return enIe; 23509 23510}))); 23511 23512 23513/***/ }), 23514/* 34 */ 23515/***/ (function(module, exports, __webpack_require__) { 23516 23517//! moment.js locale configuration 23518//! locale : English (Israel) [en-il] 23519//! author : Chris Gedrim : https://github.com/chrisgedrim 23520 23521;(function (global, factory) { 23522 true ? factory(__webpack_require__(0)) : 23523 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 23524 factory(global.moment) 23525}(this, (function (moment) { 'use strict'; 23526 23527 //! moment.js locale configuration 23528 23529 var enIl = moment.defineLocale('en-il', { 23530 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 23531 '_' 23532 ), 23533 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 23534 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 23535 '_' 23536 ), 23537 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 23538 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 23539 longDateFormat: { 23540 LT: 'HH:mm', 23541 LTS: 'HH:mm:ss', 23542 L: 'DD/MM/YYYY', 23543 LL: 'D MMMM YYYY', 23544 LLL: 'D MMMM YYYY HH:mm', 23545 LLLL: 'dddd, D MMMM YYYY HH:mm', 23546 }, 23547 calendar: { 23548 sameDay: '[Today at] LT', 23549 nextDay: '[Tomorrow at] LT', 23550 nextWeek: 'dddd [at] LT', 23551 lastDay: '[Yesterday at] LT', 23552 lastWeek: '[Last] dddd [at] LT', 23553 sameElse: 'L', 23554 }, 23555 relativeTime: { 23556 future: 'in %s', 23557 past: '%s ago', 23558 s: 'a few seconds', 23559 ss: '%d seconds', 23560 m: 'a minute', 23561 mm: '%d minutes', 23562 h: 'an hour', 23563 hh: '%d hours', 23564 d: 'a day', 23565 dd: '%d days', 23566 M: 'a month', 23567 MM: '%d months', 23568 y: 'a year', 23569 yy: '%d years', 23570 }, 23571 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 23572 ordinal: function (number) { 23573 var b = number % 10, 23574 output = 23575 ~~((number % 100) / 10) === 1 23576 ? 'th' 23577 : b === 1 23578 ? 'st' 23579 : b === 2 23580 ? 'nd' 23581 : b === 3 23582 ? 'rd' 23583 : 'th'; 23584 return number + output; 23585 }, 23586 }); 23587 23588 return enIl; 23589 23590}))); 23591 23592 23593/***/ }), 23594/* 35 */ 23595/***/ (function(module, exports, __webpack_require__) { 23596 23597//! moment.js locale configuration 23598//! locale : English (India) [en-in] 23599//! author : Jatin Agrawal : https://github.com/jatinag22 23600 23601;(function (global, factory) { 23602 true ? factory(__webpack_require__(0)) : 23603 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 23604 factory(global.moment) 23605}(this, (function (moment) { 'use strict'; 23606 23607 //! moment.js locale configuration 23608 23609 var enIn = moment.defineLocale('en-in', { 23610 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 23611 '_' 23612 ), 23613 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 23614 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 23615 '_' 23616 ), 23617 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 23618 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 23619 longDateFormat: { 23620 LT: 'h:mm A', 23621 LTS: 'h:mm:ss A', 23622 L: 'DD/MM/YYYY', 23623 LL: 'D MMMM YYYY', 23624 LLL: 'D MMMM YYYY h:mm A', 23625 LLLL: 'dddd, D MMMM YYYY h:mm A', 23626 }, 23627 calendar: { 23628 sameDay: '[Today at] LT', 23629 nextDay: '[Tomorrow at] LT', 23630 nextWeek: 'dddd [at] LT', 23631 lastDay: '[Yesterday at] LT', 23632 lastWeek: '[Last] dddd [at] LT', 23633 sameElse: 'L', 23634 }, 23635 relativeTime: { 23636 future: 'in %s', 23637 past: '%s ago', 23638 s: 'a few seconds', 23639 ss: '%d seconds', 23640 m: 'a minute', 23641 mm: '%d minutes', 23642 h: 'an hour', 23643 hh: '%d hours', 23644 d: 'a day', 23645 dd: '%d days', 23646 M: 'a month', 23647 MM: '%d months', 23648 y: 'a year', 23649 yy: '%d years', 23650 }, 23651 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 23652 ordinal: function (number) { 23653 var b = number % 10, 23654 output = 23655 ~~((number % 100) / 10) === 1 23656 ? 'th' 23657 : b === 1 23658 ? 'st' 23659 : b === 2 23660 ? 'nd' 23661 : b === 3 23662 ? 'rd' 23663 : 'th'; 23664 return number + output; 23665 }, 23666 week: { 23667 dow: 0, // Sunday is the first day of the week. 23668 doy: 6, // The week that contains Jan 1st is the first week of the year. 23669 }, 23670 }); 23671 23672 return enIn; 23673 23674}))); 23675 23676 23677/***/ }), 23678/* 36 */ 23679/***/ (function(module, exports, __webpack_require__) { 23680 23681//! moment.js locale configuration 23682//! locale : English (New Zealand) [en-nz] 23683//! author : Luke McGregor : https://github.com/lukemcgregor 23684 23685;(function (global, factory) { 23686 true ? factory(__webpack_require__(0)) : 23687 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 23688 factory(global.moment) 23689}(this, (function (moment) { 'use strict'; 23690 23691 //! moment.js locale configuration 23692 23693 var enNz = moment.defineLocale('en-nz', { 23694 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 23695 '_' 23696 ), 23697 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 23698 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 23699 '_' 23700 ), 23701 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 23702 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 23703 longDateFormat: { 23704 LT: 'h:mm A', 23705 LTS: 'h:mm:ss A', 23706 L: 'DD/MM/YYYY', 23707 LL: 'D MMMM YYYY', 23708 LLL: 'D MMMM YYYY h:mm A', 23709 LLLL: 'dddd, D MMMM YYYY h:mm A', 23710 }, 23711 calendar: { 23712 sameDay: '[Today at] LT', 23713 nextDay: '[Tomorrow at] LT', 23714 nextWeek: 'dddd [at] LT', 23715 lastDay: '[Yesterday at] LT', 23716 lastWeek: '[Last] dddd [at] LT', 23717 sameElse: 'L', 23718 }, 23719 relativeTime: { 23720 future: 'in %s', 23721 past: '%s ago', 23722 s: 'a few seconds', 23723 ss: '%d seconds', 23724 m: 'a minute', 23725 mm: '%d minutes', 23726 h: 'an hour', 23727 hh: '%d hours', 23728 d: 'a day', 23729 dd: '%d days', 23730 M: 'a month', 23731 MM: '%d months', 23732 y: 'a year', 23733 yy: '%d years', 23734 }, 23735 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 23736 ordinal: function (number) { 23737 var b = number % 10, 23738 output = 23739 ~~((number % 100) / 10) === 1 23740 ? 'th' 23741 : b === 1 23742 ? 'st' 23743 : b === 2 23744 ? 'nd' 23745 : b === 3 23746 ? 'rd' 23747 : 'th'; 23748 return number + output; 23749 }, 23750 week: { 23751 dow: 1, // Monday is the first day of the week. 23752 doy: 4, // The week that contains Jan 4th is the first week of the year. 23753 }, 23754 }); 23755 23756 return enNz; 23757 23758}))); 23759 23760 23761/***/ }), 23762/* 37 */ 23763/***/ (function(module, exports, __webpack_require__) { 23764 23765//! moment.js locale configuration 23766//! locale : English (Singapore) [en-sg] 23767//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension 23768 23769;(function (global, factory) { 23770 true ? factory(__webpack_require__(0)) : 23771 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 23772 factory(global.moment) 23773}(this, (function (moment) { 'use strict'; 23774 23775 //! moment.js locale configuration 23776 23777 var enSg = moment.defineLocale('en-sg', { 23778 months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( 23779 '_' 23780 ), 23781 monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), 23782 weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( 23783 '_' 23784 ), 23785 weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), 23786 weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), 23787 longDateFormat: { 23788 LT: 'HH:mm', 23789 LTS: 'HH:mm:ss', 23790 L: 'DD/MM/YYYY', 23791 LL: 'D MMMM YYYY', 23792 LLL: 'D MMMM YYYY HH:mm', 23793 LLLL: 'dddd, D MMMM YYYY HH:mm', 23794 }, 23795 calendar: { 23796 sameDay: '[Today at] LT', 23797 nextDay: '[Tomorrow at] LT', 23798 nextWeek: 'dddd [at] LT', 23799 lastDay: '[Yesterday at] LT', 23800 lastWeek: '[Last] dddd [at] LT', 23801 sameElse: 'L', 23802 }, 23803 relativeTime: { 23804 future: 'in %s', 23805 past: '%s ago', 23806 s: 'a few seconds', 23807 ss: '%d seconds', 23808 m: 'a minute', 23809 mm: '%d minutes', 23810 h: 'an hour', 23811 hh: '%d hours', 23812 d: 'a day', 23813 dd: '%d days', 23814 M: 'a month', 23815 MM: '%d months', 23816 y: 'a year', 23817 yy: '%d years', 23818 }, 23819 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 23820 ordinal: function (number) { 23821 var b = number % 10, 23822 output = 23823 ~~((number % 100) / 10) === 1 23824 ? 'th' 23825 : b === 1 23826 ? 'st' 23827 : b === 2 23828 ? 'nd' 23829 : b === 3 23830 ? 'rd' 23831 : 'th'; 23832 return number + output; 23833 }, 23834 week: { 23835 dow: 1, // Monday is the first day of the week. 23836 doy: 4, // The week that contains Jan 4th is the first week of the year. 23837 }, 23838 }); 23839 23840 return enSg; 23841 23842}))); 23843 23844 23845/***/ }), 23846/* 38 */ 23847/***/ (function(module, exports, __webpack_require__) { 23848 23849//! moment.js locale configuration 23850//! locale : Esperanto [eo] 23851//! author : Colin Dean : https://github.com/colindean 23852//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia 23853//! comment : miestasmia corrected the translation by colindean 23854//! comment : Vivakvo corrected the translation by colindean and miestasmia 23855 23856;(function (global, factory) { 23857 true ? factory(__webpack_require__(0)) : 23858 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 23859 factory(global.moment) 23860}(this, (function (moment) { 'use strict'; 23861 23862 //! moment.js locale configuration 23863 23864 var eo = moment.defineLocale('eo', { 23865 months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aÅgusto_septembro_oktobro_novembro_decembro'.split( 23866 '_' 23867 ), 23868 monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aÅg_sept_okt_nov_dec'.split('_'), 23869 weekdays: 'dimanÄo_lundo_mardo_merkredo_ĵaÅdo_vendredo_sabato'.split('_'), 23870 weekdaysShort: 'dim_lun_mard_merk_ĵaÅ_ven_sab'.split('_'), 23871 weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'), 23872 longDateFormat: { 23873 LT: 'HH:mm', 23874 LTS: 'HH:mm:ss', 23875 L: 'YYYY-MM-DD', 23876 LL: '[la] D[-an de] MMMM, YYYY', 23877 LLL: '[la] D[-an de] MMMM, YYYY HH:mm', 23878 LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm', 23879 llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm', 23880 }, 23881 meridiemParse: /[ap]\.t\.m/i, 23882 isPM: function (input) { 23883 return input.charAt(0).toLowerCase() === 'p'; 23884 }, 23885 meridiem: function (hours, minutes, isLower) { 23886 if (hours > 11) { 23887 return isLower ? 'p.t.m.' : 'P.T.M.'; 23888 } else { 23889 return isLower ? 'a.t.m.' : 'A.T.M.'; 23890 } 23891 }, 23892 calendar: { 23893 sameDay: '[HodiaÅ je] LT', 23894 nextDay: '[MorgaÅ je] LT', 23895 nextWeek: 'dddd[n je] LT', 23896 lastDay: '[HieraÅ je] LT', 23897 lastWeek: '[pasintan] dddd[n je] LT', 23898 sameElse: 'L', 23899 }, 23900 relativeTime: { 23901 future: 'post %s', 23902 past: 'antaÅ %s', 23903 s: 'kelkaj sekundoj', 23904 ss: '%d sekundoj', 23905 m: 'unu minuto', 23906 mm: '%d minutoj', 23907 h: 'unu horo', 23908 hh: '%d horoj', 23909 d: 'unu tago', //ne 'diurno', Äar estas uzita por proksimumo 23910 dd: '%d tagoj', 23911 M: 'unu monato', 23912 MM: '%d monatoj', 23913 y: 'unu jaro', 23914 yy: '%d jaroj', 23915 }, 23916 dayOfMonthOrdinalParse: /\d{1,2}a/, 23917 ordinal: '%da', 23918 week: { 23919 dow: 1, // Monday is the first day of the week. 23920 doy: 7, // The week that contains Jan 7th is the first week of the year. 23921 }, 23922 }); 23923 23924 return eo; 23925 23926}))); 23927 23928 23929/***/ }), 23930/* 39 */ 23931/***/ (function(module, exports, __webpack_require__) { 23932 23933//! moment.js locale configuration 23934//! locale : Spanish [es] 23935//! author : Julio Napurà : https://github.com/julionc 23936 23937;(function (global, factory) { 23938 true ? factory(__webpack_require__(0)) : 23939 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 23940 factory(global.moment) 23941}(this, (function (moment) { 'use strict'; 23942 23943 //! moment.js locale configuration 23944 23945 var monthsShortDot = 23946 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split
vendor: 16,384 bytes, lines 23946-24428
23946( 23947 '_' 23948 ), 23949 monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), 23950 monthsParse = [ 23951 /^ene/i, 23952 /^feb/i, 23953 /^mar/i, 23954 /^abr/i, 23955 /^may/i, 23956 /^jun/i, 23957 /^jul/i, 23958 /^ago/i, 23959 /^sep/i, 23960 /^oct/i, 23961 /^nov/i, 23962 /^dic/i, 23963 ], 23964 monthsRegex = 23965 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; 23966 23967 var es = moment.defineLocale('es', { 23968 months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( 23969 '_' 23970 ), 23971 monthsShort: function (m, format) { 23972 if (!m) { 23973 return monthsShortDot; 23974 } else if (/-MMM-/.test(format)) { 23975 return monthsShort[m.month()]; 23976 } else { 23977 return monthsShortDot[m.month()]; 23978 } 23979 }, 23980 monthsRegex: monthsRegex, 23981 monthsShortRegex: monthsRegex, 23982 monthsStrictRegex: 23983 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, 23984 monthsShortStrictRegex: 23985 /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, 23986 monthsParse: monthsParse, 23987 longMonthsParse: monthsParse, 23988 shortMonthsParse: monthsParse, 23989 weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), 23990 weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), 23991 weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), 23992 weekdaysParseExact: true, 23993 longDateFormat: { 23994 LT: 'H:mm', 23995 LTS: 'H:mm:ss', 23996 L: 'DD/MM/YYYY', 23997 LL: 'D [de] MMMM [de] YYYY', 23998 LLL: 'D [de] MMMM [de] YYYY H:mm', 23999 LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', 24000 }, 24001 calendar: { 24002 sameDay: function () { 24003 return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24004 }, 24005 nextDay: function () { 24006 return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24007 }, 24008 nextWeek: function () { 24009 return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24010 }, 24011 lastDay: function () { 24012 return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24013 }, 24014 lastWeek: function () { 24015 return ( 24016 '[el] dddd [pasado a la' + 24017 (this.hours() !== 1 ? 's' : '') + 24018 '] LT' 24019 ); 24020 }, 24021 sameElse: 'L', 24022 }, 24023 relativeTime: { 24024 future: 'en %s', 24025 past: 'hace %s', 24026 s: 'unos segundos', 24027 ss: '%d segundos', 24028 m: 'un minuto', 24029 mm: '%d minutos', 24030 h: 'una hora', 24031 hh: '%d horas', 24032 d: 'un dÃa', 24033 dd: '%d dÃas', 24034 w: 'una semana', 24035 ww: '%d semanas', 24036 M: 'un mes', 24037 MM: '%d meses', 24038 y: 'un año', 24039 yy: '%d años', 24040 }, 24041 dayOfMonthOrdinalParse: /\d{1,2}º/, 24042 ordinal: '%dº', 24043 week: { 24044 dow: 1, // Monday is the first day of the week. 24045 doy: 4, // The week that contains Jan 4th is the first week of the year. 24046 }, 24047 invalidDate: 'Fecha inválida', 24048 }); 24049 24050 return es; 24051 24052}))); 24053 24054 24055/***/ }), 24056/* 40 */ 24057/***/ (function(module, exports, __webpack_require__) { 24058 24059//! moment.js locale configuration 24060//! locale : Spanish (Dominican Republic) [es-do] 24061 24062;(function (global, factory) { 24063 true ? factory(__webpack_require__(0)) : 24064 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 24065 factory(global.moment) 24066}(this, (function (moment) { 'use strict'; 24067 24068 //! moment.js locale configuration 24069 24070 var monthsShortDot = 24071 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( 24072 '_' 24073 ), 24074 monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), 24075 monthsParse = [ 24076 /^ene/i, 24077 /^feb/i, 24078 /^mar/i, 24079 /^abr/i, 24080 /^may/i, 24081 /^jun/i, 24082 /^jul/i, 24083 /^ago/i, 24084 /^sep/i, 24085 /^oct/i, 24086 /^nov/i, 24087 /^dic/i, 24088 ], 24089 monthsRegex = 24090 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; 24091 24092 var esDo = moment.defineLocale('es-do', { 24093 months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( 24094 '_' 24095 ), 24096 monthsShort: function (m, format) { 24097 if (!m) { 24098 return monthsShortDot; 24099 } else if (/-MMM-/.test(format)) { 24100 return monthsShort[m.month()]; 24101 } else { 24102 return monthsShortDot[m.month()]; 24103 } 24104 }, 24105 monthsRegex: monthsRegex, 24106 monthsShortRegex: monthsRegex, 24107 monthsStrictRegex: 24108 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, 24109 monthsShortStrictRegex: 24110 /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, 24111 monthsParse: monthsParse, 24112 longMonthsParse: monthsParse, 24113 shortMonthsParse: monthsParse, 24114 weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), 24115 weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), 24116 weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), 24117 weekdaysParseExact: true, 24118 longDateFormat: { 24119 LT: 'h:mm A', 24120 LTS: 'h:mm:ss A', 24121 L: 'DD/MM/YYYY', 24122 LL: 'D [de] MMMM [de] YYYY', 24123 LLL: 'D [de] MMMM [de] YYYY h:mm A', 24124 LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A', 24125 }, 24126 calendar: { 24127 sameDay: function () { 24128 return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24129 }, 24130 nextDay: function () { 24131 return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24132 }, 24133 nextWeek: function () { 24134 return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24135 }, 24136 lastDay: function () { 24137 return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24138 }, 24139 lastWeek: function () { 24140 return ( 24141 '[el] dddd [pasado a la' + 24142 (this.hours() !== 1 ? 's' : '') + 24143 '] LT' 24144 ); 24145 }, 24146 sameElse: 'L', 24147 }, 24148 relativeTime: { 24149 future: 'en %s', 24150 past: 'hace %s', 24151 s: 'unos segundos', 24152 ss: '%d segundos', 24153 m: 'un minuto', 24154 mm: '%d minutos', 24155 h: 'una hora', 24156 hh: '%d horas', 24157 d: 'un dÃa', 24158 dd: '%d dÃas', 24159 w: 'una semana', 24160 ww: '%d semanas', 24161 M: 'un mes', 24162 MM: '%d meses', 24163 y: 'un año', 24164 yy: '%d años', 24165 }, 24166 dayOfMonthOrdinalParse: /\d{1,2}º/, 24167 ordinal: '%dº', 24168 week: { 24169 dow: 1, // Monday is the first day of the week. 24170 doy: 4, // The week that contains Jan 4th is the first week of the year. 24171 }, 24172 }); 24173 24174 return esDo; 24175 24176}))); 24177 24178 24179/***/ }), 24180/* 41 */ 24181/***/ (function(module, exports, __webpack_require__) { 24182 24183//! moment.js locale configuration 24184//! locale : Spanish (Mexico) [es-mx] 24185//! author : JC Franco : https://github.com/jcfranco 24186 24187;(function (global, factory) { 24188 true ? factory(__webpack_require__(0)) : 24189 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 24190 factory(global.moment) 24191}(this, (function (moment) { 'use strict'; 24192 24193 //! moment.js locale configuration 24194 24195 var monthsShortDot = 24196 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( 24197 '_' 24198 ), 24199 monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), 24200 monthsParse = [ 24201 /^ene/i, 24202 /^feb/i, 24203 /^mar/i, 24204 /^abr/i, 24205 /^may/i, 24206 /^jun/i, 24207 /^jul/i, 24208 /^ago/i, 24209 /^sep/i, 24210 /^oct/i, 24211 /^nov/i, 24212 /^dic/i, 24213 ], 24214 monthsRegex = 24215 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; 24216 24217 var esMx = moment.defineLocale('es-mx', { 24218 months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( 24219 '_' 24220 ), 24221 monthsShort: function (m, format) { 24222 if (!m) { 24223 return monthsShortDot; 24224 } else if (/-MMM-/.test(format)) { 24225 return monthsShort[m.month()]; 24226 } else { 24227 return monthsShortDot[m.month()]; 24228 } 24229 }, 24230 monthsRegex: monthsRegex, 24231 monthsShortRegex: monthsRegex, 24232 monthsStrictRegex: 24233 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, 24234 monthsShortStrictRegex: 24235 /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, 24236 monthsParse: monthsParse, 24237 longMonthsParse: monthsParse, 24238 shortMonthsParse: monthsParse, 24239 weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), 24240 weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), 24241 weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), 24242 weekdaysParseExact: true, 24243 longDateFormat: { 24244 LT: 'H:mm', 24245 LTS: 'H:mm:ss', 24246 L: 'DD/MM/YYYY', 24247 LL: 'D [de] MMMM [de] YYYY', 24248 LLL: 'D [de] MMMM [de] YYYY H:mm', 24249 LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', 24250 }, 24251 calendar: { 24252 sameDay: function () { 24253 return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24254 }, 24255 nextDay: function () { 24256 return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24257 }, 24258 nextWeek: function () { 24259 return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24260 }, 24261 lastDay: function () { 24262 return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24263 }, 24264 lastWeek: function () { 24265 return ( 24266 '[el] dddd [pasado a la' + 24267 (this.hours() !== 1 ? 's' : '') + 24268 '] LT' 24269 ); 24270 }, 24271 sameElse: 'L', 24272 }, 24273 relativeTime: { 24274 future: 'en %s', 24275 past: 'hace %s', 24276 s: 'unos segundos', 24277 ss: '%d segundos', 24278 m: 'un minuto', 24279 mm: '%d minutos', 24280 h: 'una hora', 24281 hh: '%d horas', 24282 d: 'un dÃa', 24283 dd: '%d dÃas', 24284 w: 'una semana', 24285 ww: '%d semanas', 24286 M: 'un mes', 24287 MM: '%d meses', 24288 y: 'un año', 24289 yy: '%d años', 24290 }, 24291 dayOfMonthOrdinalParse: /\d{1,2}º/, 24292 ordinal: '%dº', 24293 week: { 24294 dow: 0, // Sunday is the first day of the week. 24295 doy: 4, // The week that contains Jan 4th is the first week of the year. 24296 }, 24297 invalidDate: 'Fecha inválida', 24298 }); 24299 24300 return esMx; 24301 24302}))); 24303 24304 24305/***/ }), 24306/* 42 */ 24307/***/ (function(module, exports, __webpack_require__) { 24308 24309//! moment.js locale configuration 24310//! locale : Spanish (United States) [es-us] 24311//! author : bustta : https://github.com/bustta 24312//! author : chrisrodz : https://github.com/chrisrodz 24313 24314;(function (global, factory) { 24315 true ? factory(__webpack_require__(0)) : 24316 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 24317 factory(global.moment) 24318}(this, (function (moment) { 'use strict'; 24319 24320 //! moment.js locale configuration 24321 24322 var monthsShortDot = 24323 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( 24324 '_' 24325 ), 24326 monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), 24327 monthsParse = [ 24328 /^ene/i, 24329 /^feb/i, 24330 /^mar/i, 24331 /^abr/i, 24332 /^may/i, 24333 /^jun/i, 24334 /^jul/i, 24335 /^ago/i, 24336 /^sep/i, 24337 /^oct/i, 24338 /^nov/i, 24339 /^dic/i, 24340 ], 24341 monthsRegex = 24342 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; 24343 24344 var esUs = moment.defineLocale('es-us', { 24345 months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( 24346 '_' 24347 ), 24348 monthsShort: function (m, format) { 24349 if (!m) { 24350 return monthsShortDot; 24351 } else if (/-MMM-/.test(format)) { 24352 return monthsShort[m.month()]; 24353 } else { 24354 return monthsShortDot[m.month()]; 24355 } 24356 }, 24357 monthsRegex: monthsRegex, 24358 monthsShortRegex: monthsRegex, 24359 monthsStrictRegex: 24360 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, 24361 monthsShortStrictRegex: 24362 /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, 24363 monthsParse: monthsParse, 24364 longMonthsParse: monthsParse, 24365 shortMonthsParse: monthsParse, 24366 weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), 24367 weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), 24368 weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), 24369 weekdaysParseExact: true, 24370 longDateFormat: { 24371 LT: 'h:mm A', 24372 LTS: 'h:mm:ss A', 24373 L: 'MM/DD/YYYY', 24374 LL: 'D [de] MMMM [de] YYYY', 24375 LLL: 'D [de] MMMM [de] YYYY h:mm A', 24376 LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A', 24377 }, 24378 calendar: { 24379 sameDay: function () { 24380 return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24381 }, 24382 nextDay: function () { 24383 return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24384 }, 24385 nextWeek: function () { 24386 return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24387 }, 24388 lastDay: function () { 24389 return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; 24390 }, 24391 lastWeek: function () { 24392 return ( 24393 '[el] dddd [pasado a la' + 24394 (this.hours() !== 1 ? 's' : '') + 24395 '] LT' 24396 ); 24397 }, 24398 sameElse: 'L', 24399 }, 24400 relativeTime: { 24401 future: 'en %s', 24402 past: 'hace %s', 24403 s: 'unos segundos', 24404 ss: '%d segundos', 24405 m: 'un minuto', 24406 mm: '%d minutos', 24407 h: 'una hora', 24408 hh: '%d horas', 24409 d: 'un dÃa', 24410 dd: '%d dÃas', 24411 w: 'una semana', 24412 ww: '%d semanas', 24413 M: 'un mes', 24414 MM: '%d meses', 24415 y: 'un año', 24416 yy: '%d años', 24417 }, 24418 dayOfMonthOrdinalParse: /\d{1,2}º/, 24419 ordinal: '%dº', 24420 week: { 24421 dow: 0, // Sunday is the first day of the week. 24422 doy: 6, // The week that contains Jan 6th is the first week of the year. 24423 }, 24424 }); 24425 24426 return esUs; 24427 24428})
24428)); 24429 24430 24431/***/ }), 24432/* 43 */ 24433/***/ (function(module, exports, __webpack_require__) { 24434 24435//! moment.js locale configuration 24436//! locale : Estonian [et] 24437//! author : Henry Kehlmann : https://github.com/madhenry 24438//! improvements : Illimar Tambek : https://github.com/ragulka 24439 24440;(function (global, factory) { 24441 true ? factory(__webpack_require__(0)) : 24442 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 24443 factory(global.moment) 24444}(this, (function (moment) { 'use strict'; 24445 24446 //! moment.js locale configuration 24447 24448 function processRelativeTime(number, withoutSuffix, key, isFuture) { 24449 var format = { 24450 s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'], 24451 ss: [number + 'sekundi', number + 'sekundit'], 24452 m: ['ühe minuti', 'üks minut'], 24453 mm: [number + ' minuti', number + ' minutit'], 24454 h: ['ühe tunni', 'tund aega', 'üks tund'], 24455 hh: [number + ' tunni', number + ' tundi'], 24456 d: ['ühe päeva', 'üks päev'], 24457 M: ['kuu aja', 'kuu aega', 'üks kuu'], 24458 MM: [number + ' kuu', number + ' kuud'], 24459 y: ['ühe aasta', 'aasta', 'üks aasta'], 24460 yy: [number + ' aasta', number + ' aastat'], 24461 }; 24462 if (withoutSuffix) { 24463 return format[key][2] ? format[key][2] : format[key][1]; 24464 } 24465 return isFuture ? format[key][0] : format[key][1]; 24466 } 24467 24468 var et = moment.defineLocale('et', { 24469 months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split( 24470 '_' 24471 ), 24472 monthsShort: 24473 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'), 24474 weekdays: 24475 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split( 24476 '_' 24477 ), 24478 weekdaysShort: 'P_E_T_K_N_R_L'.split('_'), 24479 weekdaysMin: 'P_E_T_K_N_R_L'.split('_'), 24480 longDateFormat: { 24481 LT: 'H:mm', 24482 LTS: 'H:mm:ss', 24483 L: 'DD.MM.YYYY', 24484 LL: 'D. MMMM YYYY', 24485 LLL: 'D. MMMM YYYY H:mm', 24486 LLLL: 'dddd, D. MMMM YYYY H:mm', 24487 }, 24488 calendar: { 24489 sameDay: '[Täna,] LT', 24490 nextDay: '[Homme,] LT', 24491 nextWeek: '[Järgmine] dddd LT', 24492 lastDay: '[Eile,] LT', 24493 lastWeek: '[Eelmine] dddd LT', 24494 sameElse: 'L', 24495 }, 24496 relativeTime: { 24497 future: '%s pärast', 24498 past: '%s tagasi', 24499 s: processRelativeTime, 24500 ss: processRelativeTime, 24501 m: processRelativeTime, 24502 mm: processRelativeTime, 24503 h: processRelativeTime, 24504 hh: processRelativeTime, 24505 d: processRelativeTime, 24506 dd: '%d päeva', 24507 M: processRelativeTime, 24508 MM: processRelativeTime, 24509 y: processRelativeTime, 24510 yy: processRelativeTime, 24511 }, 24512 dayOfMonthOrdinalParse: /\d{1,2}\./, 24513 ordinal: '%d.', 24514 week: { 24515 dow: 1, // Monday is the first day of the week. 24516 doy: 4, // The week that contains Jan 4th is the first week of the year. 24517 }, 24518 }); 24519 24520 return et; 24521 24522}))); 24523 24524 24525/***/ }), 24526/* 44 */ 24527/***/ (function(module, exports, __webpack_require__) { 24528 24529//! moment.js locale configuration 24530//! locale : Basque [eu] 24531//! author : Eneko Illarramendi : https://github.com/eillarra 24532 24533;(function (global, factory) { 24534 true ? factory(__webpack_require__(0)) : 24535 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 24536 factory(global.moment) 24537}(this, (function (moment) { 'use strict'; 24538 24539 //! moment.js locale configuration 24540 24541 var eu = moment.defineLocale('eu', { 24542 months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split( 24543 '_' 24544 ), 24545 monthsShort: 24546 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split( 24547 '_' 24548 ), 24549 monthsParseExact: true, 24550 weekdays: 24551 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split( 24552 '_' 24553 ), 24554 weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'), 24555 weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'), 24556 weekdaysParseExact: true, 24557 longDateFormat: { 24558 LT: 'HH:mm', 24559 LTS: 'HH:mm:ss', 24560 L: 'YYYY-MM-DD', 24561 LL: 'YYYY[ko] MMMM[ren] D[a]', 24562 LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm', 24563 LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', 24564 l: 'YYYY-M-D', 24565 ll: 'YYYY[ko] MMM D[a]', 24566 lll: 'YYYY[ko] MMM D[a] HH:mm', 24567 llll: 'ddd, YYYY[ko] MMM D[a] HH:mm', 24568 }, 24569 calendar: { 24570 sameDay: '[gaur] LT[etan]', 24571 nextDay: '[bihar] LT[etan]', 24572 nextWeek: 'dddd LT[etan]', 24573 lastDay: '[atzo] LT[etan]', 24574 lastWeek: '[aurreko] dddd LT[etan]', 24575 sameElse: 'L', 24576 }, 24577 relativeTime: { 24578 future: '%s barru', 24579 past: 'duela %s', 24580 s: 'segundo batzuk', 24581 ss: '%d segundo', 24582 m: 'minutu bat', 24583 mm: '%d minutu', 24584 h: 'ordu bat', 24585 hh: '%d ordu', 24586 d: 'egun bat', 24587 dd: '%d egun', 24588 M: 'hilabete bat', 24589 MM: '%d hilabete', 24590 y: 'urte bat', 24591 yy: '%d urte', 24592 }, 24593 dayOfMonthOrdinalParse: /\d{1,2}\./, 24594 ordinal: '%d.', 24595 week: { 24596 dow: 1, // Monday is the first day of the week. 24597 doy: 7, // The week that contains Jan 7th is the first week of the year. 24598 }, 24599 }); 24600 24601 return eu; 24602 24603}))); 24604 24605 24606/***/ }), 24607/* 45 */ 24608/***/ (function(module, exports, __webpack_require__) { 24609 24610//! moment.js locale configuration 24611//! locale : Persian [fa] 24612//! author : Ebrahim Byagowi : https://github.com/ebraminio 24613 24614;(function (global, factory) { 24615 true ? factory(__webpack_require__(0)) : 24616 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 24617 factory(global.moment) 24618}(this, (function (moment) { 'use strict'; 24619 24620 //! moment.js locale configuration 24621 24622 var symbolMap = { 24623 1: 'Û±', 24624 2: 'Û²', 24625 3: 'Û³', 24626 4: 'Û´', 24627 5: 'Ûµ', 24628 6: 'Û¶', 24629 7: 'Û·', 24630 8: 'Û¸', 24631 9: 'Û¹', 24632 0: 'Û°', 24633 }, 24634 numberMap = { 24635 'Û±': '1', 24636 'Û²': '2', 24637 'Û³': '3', 24638 'Û´': '4', 24639 'Ûµ': '5', 24640 'Û¶': '6', 24641 'Û·': '7', 24642 'Û¸': '8', 24643 'Û¹': '9', 24644 'Û°': '0', 24645 }; 24646 24647 var fa = moment.defineLocale('fa', { 24648 months: 'ÚØ§ÙÙÛÙ_ÙÙØ±ÛÙ_٠ارس_Ø¢ÙØ±ÛÙ_Ù Ù_ÚÙØ¦Ù_ÚÙØ¦ÛÙ_Ø§ÙØª_سپتا٠بر_اکتبر_ÙÙØ§Ù بر_دسا٠بر'.split( 24649 '_' 24650 ), 24651 monthsShort: 24652 'ÚØ§ÙÙÛÙ_ÙÙØ±ÛÙ_٠ارس_Ø¢ÙØ±ÛÙ_Ù Ù_ÚÙØ¦Ù_ÚÙØ¦ÛÙ_Ø§ÙØª_سپتا٠بر_اکتبر_ÙÙØ§Ù بر_دسا٠بر'.split( 24653 '_' 24654 ), 24655 weekdays: 24656 'ÛÚ©\u200cØ´ÙØ¨Ù_Ø¯ÙØ´ÙبÙ_سÙ\u200cØ´ÙØ¨Ù_ÚÙØ§Ø±Ø´ÙبÙ_Ù¾ÙØ¬\u200cØ´ÙØ¨Ù_ج٠عÙ_Ø´ÙØ¨Ù'.split( 24657 '_' 24658 ), 24659 weekdaysShort: 24660 'ÛÚ©\u200cØ´ÙØ¨Ù_Ø¯ÙØ´ÙبÙ_سÙ\u200cØ´ÙØ¨Ù_ÚÙØ§Ø±Ø´ÙبÙ_Ù¾ÙØ¬\u200cØ´ÙØ¨Ù_ج٠عÙ_Ø´ÙØ¨Ù'.split( 24661 '_' 24662 ), 24663 weekdaysMin: 'Û_د_س_Ú_Ù¾_ج_Ø´'.split('_'), 24664 weekdaysParseExact: true, 24665 longDateFormat: { 24666 LT: 'HH:mm', 24667 LTS: 'HH:mm:ss', 24668 L: 'DD/MM/YYYY', 24669 LL: 'D MMMM YYYY', 24670 LLL: 'D MMMM YYYY HH:mm', 24671 LLLL: 'dddd, D MMMM YYYY HH:mm', 24672 }, 24673 meridiemParse: /ÙØ¨Ù از Ø¸ÙØ±|بعد از Ø¸ÙØ±/, 24674 isPM: function (input) { 24675 return /بعد از Ø¸ÙØ±/.test(input); 24676 }, 24677 meridiem: function (hour, minute, isLower) { 24678 if (hour < 12) { 24679 return 'ÙØ¨Ù از Ø¸ÙØ±'; 24680 } else { 24681 return 'بعد از Ø¸ÙØ±'; 24682 } 24683 }, 24684 calendar: { 24685 sameDay: '[Ø§Ù Ø±ÙØ² ساعت] LT', 24686 nextDay: '[ÙØ±Ø¯Ø§ ساعت] LT', 24687 nextWeek: 'dddd [ساعت] LT', 24688 lastDay: '[Ø¯ÛØ±Ùز ساعت] LT', 24689 lastWeek: 'dddd [Ù¾ÛØ´] [ساعت] LT', 24690 sameElse: 'L', 24691 }, 24692 relativeTime: { 24693 future: 'در %s', 24694 past: '%s Ù¾ÛØ´', 24695 s: 'ÚÙØ¯ ثاÙÛÙ', 24696 ss: '%d ثاÙÛÙ', 24697 m: 'ÛÚ© دÙÛÙÙ', 24698 mm: '%d دÙÛÙÙ', 24699 h: 'ÛÚ© ساعت', 24700 hh: '%d ساعت', 24701 d: 'ÛÚ© Ø±ÙØ²', 24702 dd: '%d Ø±ÙØ²', 24703 M: 'ÛÚ© ٠اÙ', 24704 MM: '%d ٠اÙ', 24705 y: 'ÛÚ© ساÙ', 24706 yy: '%d ساÙ', 24707 }, 24708 preparse: function (string) { 24709 return string 24710 .replace(/[Û°-Û¹]/g, function (match) { 24711 return numberMap[match]; 24712 }) 24713 .replace(/Ø/g, ','); 24714 }, 24715 postformat: function (string) { 24716 return string 24717 .replace(/\d/g, function (match) { 24718 return symbolMap[match]; 24719 }) 24720 .replace(/,/g, 'Ø'); 24721 }, 24722 dayOfMonthOrdinalParse: /\d{1,2}Ù /, 24723 ordinal: '%dÙ ', 24724 week: { 24725 dow: 6, // Saturday is the first day of the week. 24726 doy: 12, // The week that contains Jan 12th is the first week of the year. 24727 }, 24728 }); 24729 24730 return fa; 24731 24732}))); 24733 24734 24735/***/ }), 24736/* 46 */ 24737/***/ (function(module, exports, __webpack_require__) { 24738 24739//! moment.js locale configuration 24740//! locale : Finnish [fi] 24741//! author : Tarmo Aidantausta : https://github.com/bleadof 24742 24743;(function (global, factory) { 24744 true ? factory(__webpack_require__(0)) : 24745 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 24746 factory(global.moment) 24747}(this, (function (moment) { 'use strict'; 24748 24749 //! moment.js locale configuration 24750 24751 var numbersPast = 24752 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split( 24753 ' ' 24754 ), 24755 numbersFuture = [ 24756 'nolla', 24757 'yhden', 24758 'kahden', 24759 'kolmen', 24760 'neljän', 24761 'viiden', 24762 'kuuden', 24763 numbersPast[7], 24764 numbersPast[8], 24765 numbersPast[9], 24766 ]; 24767 function translate(number, withoutSuffix, key, isFuture) { 24768 var result = ''; 24769 switch (key) { 24770 case 's': 24771 return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; 24772 case 'ss': 24773 result = isFuture ? 'sekunnin' : 'sekuntia'; 24774 break; 24775 case 'm': 24776 return isFuture ? 'minuutin' : 'minuutti'; 24777 case 'mm': 24778 result = isFuture ? 'minuutin' : 'minuuttia'; 24779 break; 24780 case 'h': 24781 return isFuture ? 'tunnin' : 'tunti'; 24782 case 'hh': 24783 result = isFuture ? 'tunnin' : 'tuntia'; 24784 break; 24785 case 'd': 24786 return isFuture ? 'päivän' : 'päivä'; 24787 case 'dd': 24788 result = isFuture ? 'päivän' : 'päivää'; 24789 break; 24790 case 'M': 24791 return isFuture ? 'kuukauden' : 'kuukausi'; 24792 case 'MM': 24793 result = isFuture ? 'kuukauden' : 'kuukautta'; 24794 break; 24795 case 'y': 24796 return isFuture ? 'vuoden' : 'vuosi'; 24797 case 'yy': 24798 result = isFuture ? 'vuoden' : 'vuotta'; 24799 break; 24800 } 24801 result = verbalNumber(number, isFuture) + ' ' + result; 24802 return result; 24803 } 24804 function verbalNumber(number, isFuture) { 24805 return number < 10 24806 ? isFuture 24807 ? numbersFuture[number] 24808 : numbersPast[number] 24809 : number; 24810 } 24811 24812 var fi = moment.defineLocale('fi', { 24813 months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split( 24814 '_' 24815 ), 24816 monthsShort: 24817 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split( 24818 '_' 24819 ), 24820 weekdays: 24821 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split( 24822 '_' 24823 ), 24824 weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'), 24825 weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'), 24826 longDateFormat: { 24827 LT: 'HH.mm', 24828 LTS: 'HH.mm.ss', 24829 L: 'DD.MM.YYYY', 24830 LL: 'Do MMMM[ta] YYYY', 24831 LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm', 24832 LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm', 24833 l: 'D.M.YYYY', 24834 ll: 'Do MMM YYYY', 24835 lll: 'Do MMM YYYY, [klo] HH.mm', 24836 llll: 'ddd, Do MMM YYYY, [klo] HH.mm', 24837 }, 24838 calendar: { 24839 sameDay: '[tänään] [klo] LT', 24840 nextDay: '[huomenna] [klo] LT', 24841 nextWeek: 'dddd [klo] LT', 24842 lastDay: '[eilen] [klo] LT', 24843 lastWeek: '[viime] dddd[na] [klo] LT', 24844 sameElse: 'L', 24845 }, 24846 relativeTime: { 24847 future: '%s päästä', 24848 past: '%s sitten', 24849 s: translate, 24850 ss: translate, 24851 m: translate, 24852 mm: translate, 24853 h: translate, 24854 hh: translate, 24855 d: translate, 24856 dd: translate, 24857 M: translate, 24858 MM: translate, 24859 y: translate, 24860 yy: translate, 24861 }, 24862 dayOfMonthOrdinalParse: /\d{1,2}\./, 24863 ordinal: '%d.', 24864 week: { 24865 dow: 1, // Monday is the first day of the week. 24866 doy: 4, // The week that contains Jan 4th is the first week of the year. 24867 }, 24868 }); 24869 24870 return fi; 24871 24872}
24872))); 24873 24874 24875/***/ }), 24876/* 47 */ 24877/***/ (function(module, exports, __webpack_require__) { 24878 24879//! moment.js locale configuration 24880//! locale : Filipino [fil] 24881//! author : Dan Hagman : https://github.com/hagmandan 24882//! author : Matthew Co : https://github.com/matthewdeeco 24883 24884;(function (global, factory) { 24885 true ? factory(__webpack_require__(0)) : 24886 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 24887 factory(global.moment) 24888}(this, (function (moment) { 'use strict'; 24889 24890 //! moment.js locale configuration 24891 24892 var fil = moment.defineLocale('fil', { 24893 months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split( 24894 '_' 24895 ), 24896 monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), 24897 weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split( 24898 '_' 24899 ), 24900 weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), 24901 weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), 24902 longDateFormat: { 24903 LT: 'HH:mm', 24904 LTS: 'HH:mm:ss', 24905 L: 'MM/D/YYYY', 24906 LL: 'MMMM D, YYYY', 24907 LLL: 'MMMM D, YYYY HH:mm', 24908 LLLL: 'dddd, MMMM DD, YYYY HH:mm', 24909 }, 24910 calendar: { 24911 sameDay: 'LT [ngayong araw]', 24912 nextDay: '[Bukas ng] LT', 24913 nextWeek: 'LT [sa susunod na] dddd', 24914 lastDay: 'LT [kahapon]', 24915 lastWeek: 'LT [noong nakaraang] dddd', 24916 sameElse: 'L', 24917 }, 24918 relativeTime: { 24919 future: 'sa loob ng %s', 24920 past: '%s ang nakalipas', 24921 s: 'ilang segundo', 24922 ss: '%d segundo', 24923 m: 'isang minuto', 24924 mm: '%d minuto', 24925 h: 'isang oras', 24926 hh: '%d oras', 24927 d: 'isang araw', 24928 dd: '%d araw', 24929 M: 'isang buwan', 24930 MM: '%d buwan', 24931 y: 'isang taon', 24932 yy: '%d taon', 24933 }, 24934 dayOfMonthOrdinalParse: /\d{1,2}/, 24935 ordinal: function (number) { 24936 return number; 24937 }, 24938 week: { 24939 dow: 1, // Monday is the first day of the week. 24940 doy: 4, // The week that contains Jan 4th is the first week of the year. 24941 }, 24942 }); 24943 24944 return fil; 24945 24946}))); 24947 24948 24949/***/ }), 24950/* 48 */ 24951/***/ (function(module, exports, __webpack_require__) { 24952 24953//! moment.js locale configuration 24954//! locale : Faroese [fo] 24955//! author : Ragnar Johannesen : https://github.com/ragnar123 24956//! author : Kristian Sakarisson : https://github.com/sakarisson 24957 24958;(function (global, factory) { 24959 true ? factory(__webpack_require__(0)) : 24960 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 24961 factory(global.moment) 24962}(this, (function (moment) { 'use strict'; 24963 24964 //! moment.js locale configuration 24965 24966 var fo = moment.defineLocale('fo', { 24967 months: 'januar_februar_mars_aprÃl_mai_juni_juli_august_september_oktober_november_desember'.split( 24968 '_' 24969 ), 24970 monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), 24971 weekdays: 24972 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_frÃggjadagur_leygardagur'.split( 24973 '_' 24974 ), 24975 weekdaysShort: 'sun_mán_týs_mik_hós_frÃ_ley'.split('_'), 24976 weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'), 24977 longDateFormat: { 24978 LT: 'HH:mm', 24979 LTS: 'HH:mm:ss', 24980 L: 'DD/MM/YYYY', 24981 LL: 'D MMMM YYYY', 24982 LLL: 'D MMMM YYYY HH:mm', 24983 LLLL: 'dddd D. MMMM, YYYY HH:mm', 24984 }, 24985 calendar: { 24986 sameDay: '[à dag kl.] LT', 24987 nextDay: '[à morgin kl.] LT', 24988 nextWeek: 'dddd [kl.] LT', 24989 lastDay: '[à gjár kl.] LT', 24990 lastWeek: '[sÃðstu] dddd [kl] LT', 24991 sameElse: 'L', 24992 }, 24993 relativeTime: { 24994 future: 'um %s', 24995 past: '%s sÃðani', 24996 s: 'fá sekund', 24997 ss: '%d sekundir', 24998 m: 'ein minuttur', 24999 mm: '%d minuttir', 25000 h: 'ein tÃmi', 25001 hh: '%d tÃmar', 25002 d: 'ein dagur', 25003 dd: '%d dagar', 25004 M: 'ein mánaður', 25005 MM: '%d mánaðir', 25006 y: 'eitt ár', 25007 yy: '%d ár', 25008 }, 25009 dayOfMonthOrdinalParse: /\d{1,2}\./, 25010 ordinal: '%d.', 25011 week: { 25012 dow: 1, // Monday is the first day of the week. 25013 doy: 4, // The week that contains Jan 4th is the first week of the year. 25014 }, 25015 }); 25016 25017 return fo; 25018 25019}))); 25020 25021 25022/***/ }), 25023/* 49 */ 25024/***/ (function(module, exports, __webpack_require__) { 25025 25026//! moment.js locale configuration 25027//! locale : French [fr] 25028//! author : John Fischer : https://github.com/jfroffice 25029 25030;(function (global, factory) { 25031 true ? factory(__webpack_require__(0)) : 25032 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 25033 factory(global.moment) 25034}(this, (function (moment) { 'use strict'; 25035 25036 //! moment.js locale configuration 25037 25038 var monthsStrictRegex = 25039 /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i, 25040 monthsShortStrictRegex = 25041 /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,
vendor: 11,326 bytes, lines 25042-25389
25042 monthsRegex = 25043 /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i, 25044 monthsParse = [ 25045 /^janv/i, 25046 /^févr/i, 25047 /^mars/i, 25048 /^avr/i, 25049 /^mai/i, 25050 /^juin/i, 25051 /^juil/i, 25052 /^août/i, 25053 /^sept/i, 25054 /^oct/i, 25055 /^nov/i, 25056 /^déc/i, 25057 ]; 25058 25059 var fr = moment.defineLocale('fr', { 25060 months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( 25061 '_' 25062 ), 25063 monthsShort: 25064 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( 25065 '_' 25066 ), 25067 monthsRegex: monthsRegex, 25068 monthsShortRegex: monthsRegex, 25069 monthsStrictRegex: monthsStrictRegex, 25070 monthsShortStrictRegex: monthsShortStrictRegex, 25071 monthsParse: monthsParse, 25072 longMonthsParse: monthsParse, 25073 shortMonthsParse: monthsParse, 25074 weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), 25075 weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), 25076 weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), 25077 weekdaysParseExact: true, 25078 longDateFormat: { 25079 LT: 'HH:mm', 25080 LTS: 'HH:mm:ss', 25081 L: 'DD/MM/YYYY', 25082 LL: 'D MMMM YYYY', 25083 LLL: 'D MMMM YYYY HH:mm', 25084 LLLL: 'dddd D MMMM YYYY HH:mm', 25085 }, 25086 calendar: { 25087 sameDay: '[Aujourdâhui à ] LT', 25088 nextDay: '[Demain à ] LT', 25089 nextWeek: 'dddd [à ] LT', 25090 lastDay: '[Hier à ] LT', 25091 lastWeek: 'dddd [dernier à ] LT', 25092 sameElse: 'L', 25093 }, 25094 relativeTime: { 25095 future: 'dans %s', 25096 past: 'il y a %s', 25097 s: 'quelques secondes', 25098 ss: '%d secondes', 25099 m: 'une minute', 25100 mm: '%d minutes', 25101 h: 'une heure', 25102 hh: '%d heures', 25103 d: 'un jour', 25104 dd: '%d jours', 25105 w: 'une semaine', 25106 ww: '%d semaines', 25107 M: 'un mois', 25108 MM: '%d mois', 25109 y: 'un an', 25110 yy: '%d ans', 25111 }, 25112 dayOfMonthOrdinalParse: /\d{1,2}(er|)/, 25113 ordinal: function (number, period) { 25114 switch (period) { 25115 // TODO: Return 'e' when day of month > 1. Move this case inside 25116 // block for masculine words below. 25117 // See https://github.com/moment/moment/issues/3375 25118 case 'D': 25119 return number + (number === 1 ? 'er' : ''); 25120 25121 // Words with masculine grammatical gender: mois, trimestre, jour 25122 default: 25123 case 'M': 25124 case 'Q': 25125 case 'DDD': 25126 case 'd': 25127 return number + (number === 1 ? 'er' : 'e'); 25128 25129 // Words with feminine grammatical gender: semaine 25130 case 'w': 25131 case 'W': 25132 return number + (number === 1 ? 're' : 'e'); 25133 } 25134 }, 25135 week: { 25136 dow: 1, // Monday is the first day of the week. 25137 doy: 4, // The week that contains Jan 4th is the first week of the year. 25138 }, 25139 }); 25140 25141 return fr; 25142 25143}))); 25144 25145 25146/***/ }), 25147/* 50 */ 25148/***/ (function(module, exports, __webpack_require__) { 25149 25150//! moment.js locale configuration 25151//! locale : French (Canada) [fr-ca] 25152//! author : Jonathan Abourbih : https://github.com/jonbca 25153 25154;(function (global, factory) { 25155 true ? factory(__webpack_require__(0)) : 25156 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 25157 factory(global.moment) 25158}(this, (function (moment) { 'use strict'; 25159 25160 //! moment.js locale configuration 25161 25162 var frCa = moment.defineLocale('fr-ca', { 25163 months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( 25164 '_' 25165 ), 25166 monthsShort: 25167 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( 25168 '_' 25169 ), 25170 monthsParseExact: true, 25171 weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), 25172 weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), 25173 weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), 25174 weekdaysParseExact: true, 25175 longDateFormat: { 25176 LT: 'HH:mm', 25177 LTS: 'HH:mm:ss', 25178 L: 'YYYY-MM-DD', 25179 LL: 'D MMMM YYYY', 25180 LLL: 'D MMMM YYYY HH:mm', 25181 LLLL: 'dddd D MMMM YYYY HH:mm', 25182 }, 25183 calendar: { 25184 sameDay: '[Aujourdâhui à ] LT', 25185 nextDay: '[Demain à ] LT', 25186 nextWeek: 'dddd [à ] LT', 25187 lastDay: '[Hier à ] LT', 25188 lastWeek: 'dddd [dernier à ] LT', 25189 sameElse: 'L', 25190 }, 25191 relativeTime: { 25192 future: 'dans %s', 25193 past: 'il y a %s', 25194 s: 'quelques secondes', 25195 ss: '%d secondes', 25196 m: 'une minute', 25197 mm: '%d minutes', 25198 h: 'une heure', 25199 hh: '%d heures', 25200 d: 'un jour', 25201 dd: '%d jours', 25202 M: 'un mois', 25203 MM: '%d mois', 25204 y: 'un an', 25205 yy: '%d ans', 25206 }, 25207 dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, 25208 ordinal: function (number, period) { 25209 switch (period) { 25210 // Words with masculine grammatical gender: mois, trimestre, jour 25211 default: 25212 case 'M': 25213 case 'Q': 25214 case 'D': 25215 case 'DDD': 25216 case 'd': 25217 return number + (number === 1 ? 'er' : 'e'); 25218 25219 // Words with feminine grammatical gender: semaine 25220 case 'w': 25221 case 'W': 25222 return number + (number === 1 ? 're' : 'e'); 25223 } 25224 }, 25225 }); 25226 25227 return frCa; 25228 25229}))); 25230 25231 25232/***/ }), 25233/* 51 */ 25234/***/ (function(module, exports, __webpack_require__) { 25235 25236//! moment.js locale configuration 25237//! locale : French (Switzerland) [fr-ch] 25238//! author : Gaspard Bucher : https://github.com/gaspard 25239 25240;(function (global, factory) { 25241 true ? factory(__webpack_require__(0)) : 25242 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 25243 factory(global.moment) 25244}(this, (function (moment) { 'use strict'; 25245 25246 //! moment.js locale configuration 25247 25248 var frCh = moment.defineLocale('fr-ch', { 25249 months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( 25250 '_' 25251 ), 25252 monthsShort: 25253 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( 25254 '_' 25255 ), 25256 monthsParseExact: true, 25257 weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), 25258 weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), 25259 weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), 25260 weekdaysParseExact: true, 25261 longDateFormat: { 25262 LT: 'HH:mm', 25263 LTS: 'HH:mm:ss', 25264 L: 'DD.MM.YYYY', 25265 LL: 'D MMMM YYYY', 25266 LLL: 'D MMMM YYYY HH:mm', 25267 LLLL: 'dddd D MMMM YYYY HH:mm', 25268 }, 25269 calendar: { 25270 sameDay: '[Aujourdâhui à ] LT', 25271 nextDay: '[Demain à ] LT', 25272 nextWeek: 'dddd [à ] LT', 25273 lastDay: '[Hier à ] LT', 25274 lastWeek: 'dddd [dernier à ] LT', 25275 sameElse: 'L', 25276 }, 25277 relativeTime: { 25278 future: 'dans %s', 25279 past: 'il y a %s', 25280 s: 'quelques secondes', 25281 ss: '%d secondes', 25282 m: 'une minute', 25283 mm: '%d minutes', 25284 h: 'une heure', 25285 hh: '%d heures', 25286 d: 'un jour', 25287 dd: '%d jours', 25288 M: 'un mois', 25289 MM: '%d mois', 25290 y: 'un an', 25291 yy: '%d ans', 25292 }, 25293 dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, 25294 ordinal: function (number, period) { 25295 switch (period) { 25296 // Words with masculine grammatical gender: mois, trimestre, jour 25297 default: 25298 case 'M': 25299 case 'Q': 25300 case 'D': 25301 case 'DDD': 25302 case 'd': 25303 return number + (number === 1 ? 'er' : 'e'); 25304 25305 // Words with feminine grammatical gender: semaine 25306 case 'w': 25307 case 'W': 25308 return number + (number === 1 ? 're' : 'e'); 25309 } 25310 }, 25311 week: { 25312 dow: 1, // Monday is the first day of the week. 25313 doy: 4, // The week that contains Jan 4th is the first week of the year. 25314 }, 25315 }); 25316 25317 return frCh; 25318 25319}))); 25320 25321 25322/***/ }), 25323/* 52 */ 25324/***/ (function(module, exports, __webpack_require__) { 25325 25326//! moment.js locale configuration 25327//! locale : Frisian [fy] 25328//! author : Robin van der Vliet : https://github.com/robin0van0der0v 25329 25330;(function (global, factory) { 25331 true ? factory(__webpack_require__(0)) : 25332 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 25333 factory(global.moment) 25334}(this, (function (moment) { 'use strict'; 25335 25336 //! moment.js locale configuration 25337 25338 var monthsShortWithDots = 25339 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'), 25340 monthsShortWithoutDots = 25341 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'); 25342 25343 var fy = moment.defineLocale('fy', { 25344 months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split( 25345 '_' 25346 ), 25347 monthsShort: function (m, format) { 25348 if (!m) { 25349 return monthsShortWithDots; 25350 } else if (/-MMM-/.test(format)) { 25351 return monthsShortWithoutDots[m.month()]; 25352 } else { 25353 return monthsShortWithDots[m.month()]; 25354 } 25355 }, 25356 monthsParseExact: true, 25357 weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split( 25358 '_' 25359 ), 25360 weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'), 25361 weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), 25362 weekdaysParseExact: true, 25363 longDateFormat: { 25364 LT: 'HH:mm', 25365 LTS: 'HH:mm:ss', 25366 L: 'DD-MM-YYYY', 25367 LL: 'D MMMM YYYY', 25368 LLL: 'D MMMM YYYY HH:mm', 25369 LLLL: 'dddd D MMMM YYYY HH:mm', 25370 }, 25371 calendar: { 25372 sameDay: '[hjoed om] LT', 25373 nextDay: '[moarn om] LT', 25374 nextWeek: 'dddd [om] LT', 25375 lastDay: '[juster om] LT', 25376 lastWeek: '[ôfrûne] dddd [om] LT', 25377 sameElse: 'L', 25378 }, 25379 relativeTime: { 25380 future: 'oer %s', 25381 past: '%s lyn', 25382 s: 'in pear sekonden', 25383 ss: '%d sekonden', 25384 m: 'ien minút', 25385 mm: '%d minuten', 25386 h: 'ien oere', 25387 hh: '%d oeren', 25388 d: 'ien dei', 25389 dd: '%d dagen',
25390 M: 'ien moanne', 25391 MM: '%d moannen', 25392 y: 'ien jier', 25393 yy: '%d jierren', 25394 }, 25395 dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, 25396 ordinal: function (number) { 25397 return ( 25398 number + 25399 (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') 25400 ); 25401 }, 25402 week: { 25403 dow: 1, // Monday is the first day of the week. 25404 doy: 4, // The week that contains Jan 4th is the first week of the year. 25405 }, 25406 }); 25407 25408 return fy; 25409 25410}))); 25411 25412 25413/***/ }), 25414/* 53 */ 25415/***/ (function(module, exports, __webpack_require__) { 25416 25417//! moment.js locale configuration 25418//! locale : Irish or Irish Gaelic [ga] 25419//! author : André Silva : https://github.com/askpt 25420 25421;(function (global, factory) { 25422 true ? factory(__webpack_require__(0)) : 25423 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 25424 factory(global.moment) 25425}(this, (function (moment) { 'use strict'; 25426 25427 //! moment.js locale configuration 25428 25429 var months = [ 25430 'Eanáir', 25431 'Feabhra', 25432 'Márta', 25433 'Aibreán', 25434 'Bealtaine', 25435 'Meitheamh', 25436 'Iúil', 25437 'Lúnasa', 25438 'Meán Fómhair', 25439 'Deireadh Fómhair', 25440 'Samhain', 25441 'Nollaig', 25442 ], 25443 monthsShort = [ 25444 'Ean', 25445 'Feabh', 25446 'Márt', 25447 'Aib', 25448 'Beal', 25449 'Meith', 25450 'Iúil', 25451 'Lún', 25452 'M.F.', 25453 'D.F.', 25454 'Samh', 25455 'Noll', 25456 ], 25457 weekdays = [ 25458 'Dé Domhnaigh', 25459 'Dé Luain', 25460 'Dé Máirt', 25461 'Dé Céadaoin', 25462 'Déardaoin', 25463 'Dé hAoine', 25464 'Dé Sathairn', 25465 ], 25466 weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'], 25467 weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa']; 25468 25469 var ga = moment.defineLocale('ga', { 25470 months: months, 25471 monthsShort: monthsShort, 25472 monthsParseExact: true, 25473 weekdays: weekdays, 25474 weekdaysShort: weekdaysShort, 25475 weekdaysMin: weekdaysMin, 25476 longDateFormat: { 25477 LT: 'HH:mm', 25478 LTS: 'HH:mm:ss', 25479 L: 'DD/MM/YYYY', 25480 LL: 'D MMMM YYYY', 25481 LLL: 'D MMMM YYYY HH:mm', 25482 LLLL: 'dddd, D MMMM YYYY HH:mm', 25483 }, 25484 calendar: { 25485 sameDay: '[Inniu ag] LT', 25486 nextDay: '[Amárach ag] LT', 25487 nextWeek: 'dddd [ag] LT', 25488 lastDay: '[Inné ag] LT', 25489 lastWeek: 'dddd [seo caite] [ag] LT', 25490 sameElse: 'L', 25491 }, 25492 relativeTime: { 25493 future: 'i %s', 25494 past: '%s ó shin', 25495 s: 'cúpla soicind', 25496 ss: '%d soicind', 25497 m: 'nóiméad', 25498 mm: '%d nóiméad', 25499 h: 'uair an chloig', 25500 hh: '%d uair an chloig', 25501 d: 'lá', 25502 dd: '%d lá', 25503 M: 'mÃ', 25504 MM: '%d mÃonna', 25505 y: 'bliain', 25506 yy: '%d bliain', 25507 }, 25508 dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, 25509 ordinal: function (number) { 25510 var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; 25511 return number + output; 25512 }, 25513 week: { 25514 dow: 1, // Monday is the first day of the week. 25515 doy: 4, // The week that contains Jan 4th is the first week of the year. 25516 }, 25517 }); 25518 25519 return ga; 25520 25521}))); 25522 25523 25524/***/ }), 25525/* 54 */ 25526/***/ (function(module, exports, __webpack_require__) { 25527 25528//! moment.js locale configuration 25529//! locale : Scottish Gaelic [gd] 25530//! author : Jon Ashdown : https://github.com/jonashdown 25531 25532;(function (global, factory) { 25533 true ? factory(__webpack_require__(0)) : 25534 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 25535 factory(global.moment) 25536}(this, (function (moment) { 'use strict'; 25537 25538 //! moment.js locale configuration 25539 25540 var months = [ 25541 'Am Faoilleach', 25542 'An Gearran', 25543 'Am Mà rt', 25544 'An Giblean', 25545 'An Cèitean', 25546 'An t-Ãgmhios', 25547 'An t-Iuchar', 25548 'An Lùnastal', 25549 'An t-Sultain', 25550 'An Dà mhair', 25551 'An t-Samhain', 25552 'An Dùbhlachd', 25553 ], 25554 monthsShort = [ 25555 'Faoi', 25556 'Gear', 25557 'Mà rt', 25558 'Gibl', 25559 'Cèit', 25560 'Ãgmh', 25561 'Iuch', 25562 'Lùn', 25563 'Sult', 25564 'Dà mh', 25565 'Samh', 25566 'Dùbh', 25567 ], 25568 weekdays = [ 25569 'Didòmhnaich', 25570 'Diluain', 25571 'Dimà irt', 25572 'Diciadain', 25573 'Diardaoin', 25574 'Dihaoine', 25575 'Disathairne', 25576 ], 25577 weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'], 25578 weekdaysMin = ['Dò', 'Lu', 'Mà ', 'Ci', 'Ar', 'Ha', 'Sa']; 25579 25580 var gd = moment.defineLocale('gd', { 25581 months: months, 25582 monthsShort: monthsShort, 25583 monthsParseExact: true, 25584 weekdays: weekdays, 25585 weekdaysShort: weekdaysShort, 25586 weekdaysMin: weekdaysMin, 25587 longDateFormat: { 25588 LT: 'HH:mm', 25589 LTS: 'HH:mm:ss', 25590 L: 'DD/MM/YYYY', 25591 LL: 'D MMMM YYYY', 25592 LLL: 'D MMMM YYYY HH:mm', 25593 LLLL: 'dddd, D MMMM YYYY HH:mm', 25594 }, 25595 calendar: { 25596 sameDay: '[An-diugh aig] LT', 25597 nextDay: '[A-mà ireach aig] LT', 25598 nextWeek: 'dddd [aig] LT',
25599 lastDay: '[An-dè aig] LT', 25600 lastWeek: 'dddd [seo chaidh] [aig] LT', 25601 sameElse: 'L', 25602 }, 25603 relativeTime: { 25604 future: 'ann an %s', 25605 past: 'bho chionn %s', 25606 s: 'beagan diogan', 25607 ss: '%d diogan', 25608 m: 'mionaid', 25609 mm: '%d mionaidean', 25610 h: 'uair', 25611 hh: '%d uairean', 25612 d: 'latha', 25613 dd: '%d latha', 25614 M: 'mìos', 25615 MM: '%d mìosan', 25616 y: 'bliadhna', 25617 yy: '%d bliadhna', 25618 }, 25619 dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, 25620 ordinal: function (number) { 25621 var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; 25622 return number + output; 25623 }, 25624 week: { 25625 dow: 1, // Monday is the first day of the week. 25626 doy: 4, // The week that contains Jan 4th is the first week of the year. 25627 }, 25628 }); 25629 25630 return gd; 25631 25632}))); 25633 25634 25635/***/ }), 25636/* 55 */ 25637/***/ (function(module, exports, __webpack_require__) { 25638 25639//! moment.js locale configuration 25640//! locale : Galician [gl] 25641//! author : Juan G. Hurtado : https://github.com/juanghurtado 25642 25643;(function (global, factory) { 25644 true ? factory(__webpack_require__(0)) : 25645 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 25646 factory(global.moment) 25647}(this, (function (moment) { 'use strict'; 25648 25649 //! moment.js locale configuration 25650 25651 var gl = moment.defineLocale('gl', { 25652 months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split( 25653 '_' 25654 ), 25655 monthsShort: 25656 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split( 25657 '_' 25658 ), 25659 monthsParseExact: true, 25660 weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'), 25661 weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'), 25662 weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'), 25663 weekdaysParseExact: true, 25664 longDateFormat: { 25665 LT: 'H:mm', 25666 LTS: 'H:mm:ss', 25667 L: 'DD/MM/YYYY', 25668 LL: 'D [de] MMMM [de] YYYY', 25669 LLL: 'D [de] MMMM [de] YYYY H:mm', 25670 LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', 25671 }, 25672 calendar: { 25673 sameDay: function () { 25674 return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT'; 25675 }, 25676 nextDay: function () { 25677 return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT'; 25678 }, 25679 nextWeek: function () { 25680 return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'; 25681 }, 25682 lastDay: function () { 25683 return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT'; 25684 }, 25685 lastWeek: function () { 25686 return ( 25687 '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT' 25688 ); 25689 }, 25690 sameElse: 'L', 25691 }, 25692 relativeTime: { 25693 future: function (str) { 25694 if (str.indexOf('un') === 0) { 25695 return 'n' + str; 25696 } 25697 return 'en ' + str; 25698 }, 25699 past: 'hai %s', 25700 s: 'uns segundos', 25701 ss: '%d segundos', 25702 m: 'un minuto', 25703 mm: '%d minutos', 25704 h: 'unha hora', 25705 hh: '%d horas', 25706 d: 'un dÃa', 25707 dd: '%d dÃas', 25708 M: 'un mes', 25709 MM: '%d meses', 25710 y: 'un ano', 25711 yy: '%d anos', 25712 }, 25713 dayOfMonthOrdinalParse: /\d{1,2}º/, 25714 ordinal: '%dº', 25715 week: { 25716 dow: 1, // Monday is the first day of the week. 25717 doy: 4, // The week that contains Jan 4th is the first week of the year. 25718 }, 25719 }); 25720 25721 return gl; 25722 25723}))); 25724 25725 25726/***/ }), 25727/* 56 */ 25728/***/ (function(module, exports, __webpack_require__) { 25729 25730//! moment.js locale configuration 25731//! locale : Konkani Devanagari script [gom-deva] 25732//! author : The Discoverer : https://github.com/WikiDiscoverer 25733 25734;(function (global, factory) { 25735 true ? factory(__webpack_require__(0)) : 25736 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 25737 factory(global.moment) 25738}(this, (function (moment) { 'use strict'; 25739 25740 //! moment.js locale configuration 25741 25742 function processRelativeTime(number, withoutSuffix, key, isFuture) { 25743 var format = { 25744 s: ['थà¥à¤¡à¤¯à¤¾ सॠà¤à¤à¤¡à¤¾à¤à¤¨à¥', 'थà¥à¤¡à¥ सॠà¤à¤à¤¡'], 25745 ss: [number + ' सॠà¤à¤à¤¡à¤¾à¤à¤¨à¥', number + ' सॠà¤à¤à¤¡'], 25746 m: ['à¤à¤à¤¾ मिणà¤à¤¾à¤¨', 'à¤à¤ मिनà¥à¤'], 25747 mm: [number + ' मिणà¤à¤¾à¤à¤¨à¥', number + ' मिणà¤à¤¾à¤'], 25748 h: ['à¤à¤à¤¾ वरान', 'à¤à¤ वर'], 25749 hh: [number + ' वराà¤à¤¨à¥', number + ' वराà¤'], 25750 d: ['à¤à¤à¤¾ दिसान', 'à¤à¤ दà¥à¤¸'], 25751 dd: [number + ' दिसाà¤à¤¨à¥', number + ' दà¥à¤¸'], 25752 M: ['à¤à¤à¤¾ मà¥à¤¹à¤¯à¤¨à¥à¤¯à¤¾à¤¨', 'à¤à¤ मà¥à¤¹à¤¯à¤¨à¥'], 25753 MM: [number + ' मà¥à¤¹à¤¯à¤¨à¥à¤¯à¤¾à¤¨à¥', number + ' मà¥à¤¹à¤¯à¤¨à¥'], 25754 y: ['à¤à¤à¤¾ वरà¥à¤¸à¤¾à¤¨', 'à¤à¤ वरà¥à¤¸'], 25755 yy: [number + ' वरà¥à¤¸à¤¾à¤à¤¨à¥', number + ' वरà¥à¤¸à¤¾à¤'], 25756 }; 25757 return isFuture ? format[key][0] : format[key][1]; 25758 } 25759 25760 var gomDeva = moment.defineLocale('gom-deva', { 25761 months: { 25762 standalone: 25763 'à¤à¤¾à¤¨à¥à¤µà¤¾à¤°à¥_फà¥à¤¬à¥à¤°à¥à¤µà¤¾à¤°à¥_मारà¥à¤_à¤à¤ªà¥à¤°à¥à¤²_मà¥_à¤à¥à¤¨_à¤à¥à¤²à¤¯_à¤à¤à¤¸à¥à¤_सपà¥à¤à¥à¤à¤¬à¤°_à¤à¤à¥à¤à¥à¤¬à¤°_नà¥à¤µà¥à¤¹à¥à¤à¤¬à¤°_डिसà¥à¤à¤¬à¤°'.split( 25764 '_' 25765 ), 25766 format: 'à¤à¤¾à¤¨à¥à¤µà¤¾à¤°à¥à¤à¥à¤¯à¤¾_फà¥à¤¬à¥à¤°à¥à¤µà¤¾à¤°à¥à¤à¥à¤¯à¤¾_मारà¥à¤à¤¾à¤à¥à¤¯à¤¾_à¤à¤ªà¥à¤°à¥à¤²à¤¾à¤à¥à¤¯à¤¾_मà¥à¤¯à¤¾à¤à¥à¤¯à¤¾_à¤à¥à¤¨à¤¾à¤à¥à¤¯à¤¾_à¤à¥à¤²à¤¯à¤¾à¤à¥à¤¯à¤¾_à¤à¤à¤¸à¥à¤à¤¾à¤à¥à¤¯à¤¾_सपà¥à¤à¥à¤à¤¬à¤°à¤¾à¤à¥à¤¯à¤¾_à¤à¤à¥à¤à¥à¤¬à¤°à¤¾à¤à¥à¤¯à¤¾_नà¥à¤µà¥à¤¹à¥à¤à¤¬à¤°à¤¾à¤à¥à¤¯à¤¾_डिसà¥à¤à¤¬à¤°à¤¾à¤à¥à¤¯à¤¾'.split( 25767 '_' 25768 ), 25769 isFormat: /MMMM(\s)+D[oD]?/, 25770 }, 25771 monthsShort: 25772 'à¤à¤¾à¤¨à¥._फà¥à¤¬à¥à¤°à¥._मारà¥à¤_à¤à¤ªà¥à¤°à¥._मà¥_à¤à¥à¤¨_à¤à¥à¤²._à¤à¤._सपà¥à¤à¥à¤._à¤à¤à¥à¤à¥._नà¥à¤µà¥à¤¹à¥à¤._डिसà¥à¤.'.split( 25773 '_' 25774 ), 25775 monthsParseExact: true, 25776 weekdays: 'à¤à¤¯à¤¤à¤¾à¤°_सà¥à¤®à¤¾à¤°_मà¤à¤à¤³à¤¾à¤°_बà¥à¤§à¤µà¤¾à¤°_बिरà¥à¤¸à¥à¤¤à¤¾à¤°_सà¥à¤à¥à¤°à¤¾à
25776¤°_शà¥à¤¨à¤µà¤¾à¤°'.split('_'), 25777 weekdaysShort: 'à¤à¤¯à¤¤._सà¥à¤®._मà¤à¤à¤³._बà¥à¤§._बà¥à¤°à¥à¤¸à¥à¤¤._सà¥à¤à¥à¤°._शà¥à¤¨.'.split('_'), 25778 weekdaysMin: 'à¤_सà¥_मà¤_बà¥_बà¥à¤°à¥_सà¥_शà¥'.split('_'), 25779 weekdaysParseExact: true, 25780 longDateFormat: { 25781 LT: 'A h:mm [वाà¤à¤¤à¤¾à¤]', 25782 LTS: 'A h:mm:ss [वाà¤à¤¤à¤¾à¤]', 25783 L: 'DD-MM-YYYY', 25784 LL: 'D MMMM YYYY', 25785 LLL: 'D MMMM YYYY A h:mm [वाà¤à¤¤à¤¾à¤]', 25786 LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाà¤à¤¤à¤¾à¤]', 25787 llll: 'ddd, D MMM YYYY, A h:mm [वाà¤à¤¤à¤¾à¤]', 25788 }, 25789 calendar: { 25790 sameDay: '[à¤à¤¯à¤] LT', 25791 nextDay: '[फालà¥à¤¯à¤¾à¤] LT', 25792 nextWeek: '[फà¥à¤¡à¤²à¥] dddd[,] LT', 25793 lastDay: '[à¤à¤¾à¤²] LT', 25794 lastWeek: '[फाà¤à¤²à¥] dddd[,] LT', 25795 sameElse: 'L', 25796 }, 25797 relativeTime: { 25798 future: '%s', 25799 past: '%s à¤à¤¦à¥à¤', 25800 s: processRelativeTime, 25801 ss: processRelativeTime, 25802 m: processRelativeTime, 25803 mm: processRelativeTime, 25804 h: processRelativeTime, 25805 hh: processRelativeTime, 25806 d: processRelativeTime, 25807 dd: processRelativeTime, 25808 M: processRelativeTime, 25809 MM: processRelativeTime, 25810 y: processRelativeTime, 25811 yy: processRelativeTime, 25812 }, 25813 dayOfMonthOrdinalParse: /\d{1,2}(वà¥à¤°)/, 25814 ordinal: function (number, period) { 25815 switch (period) { 25816 // the ordinal 'वà¥à¤°' only applies to day of the month 25817 case 'D': 25818 return number + 'वà¥à¤°'; 25819 default: 25820 case 'M': 25821 case 'Q': 25822 case 'DDD': 25823 case 'd': 25824 case 'w': 25825 case 'W': 25826 return number; 25827 } 25828 }, 25829 week: { 25830 dow: 0, // Sunday is the first day of the week 25831 doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4) 25832 }, 25833 meridiemParse: /रातà¥|सà¤à¤¾à¤³à¥à¤|दनपाराà¤|साà¤à¤à¥/, 25834 meridiemHour: function (hour, meridiem) { 25835 if (hour === 12) { 25836 hour = 0; 25837 } 25838 if (meridiem === 'रातà¥') { 25839 return hour < 4 ? hour : hour + 12; 25840 } else if (meridiem === 'सà¤à¤¾à¤³à¥à¤') { 25841 return hour; 25842 } else if (meridiem === 'दनपाराà¤') { 25843 return hour > 12 ? hour : hour + 12; 25844 } else if (meridiem === 'साà¤à¤à¥') { 25845 return hour + 12; 25846 } 25847 }, 25848 meridiem: function (hour, minute, isLower) { 25849 if (hour < 4) { 25850 return 'रातà¥'; 25851 } else if (hour < 12) { 25852 return 'सà¤à¤¾à¤³à¥à¤'; 25853 } else if (hour < 16) { 25854 return 'दनपाराà¤'; 25855 } else if (hour < 20) { 25856 return 'साà¤à¤à¥'; 25857 } else { 25858 return 'रातà¥'; 25859 } 25860 }, 25861 }); 25862 25863 return gomDeva; 25864 25865}))); 25866 25867 25868/***/ }), 25869/* 57 */ 25870/***/ (function(module, exports, __webpack_require__) { 25871 25872//! moment.js locale configuration 25873//! locale : Konkani Latin script [gom-latn] 25874//! author : The Discoverer : https://github.com/WikiDiscoverer 25875 25876;(function (global, factory) { 25877 true ? factory(__webpack_require__(0)) : 25878 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 25879 factory(global.moment) 25880}(this, (function (moment) { 'use strict'; 25881 25882 //! moment.js locale configuration 25883 25884 function processRelativeTime(number, withoutSuffix, key, isFuture) { 25885 var format = { 25886 s: ['thoddea sekondamni', 'thodde sekond'], 25887 ss: [number + ' sekondamni', number + ' sekond'], 25888 m: ['eka mintan', 'ek minut'], 25889 mm: [number + ' mintamni', number + ' mintam'], 25890 h: ['eka voran', 'ek vor'], 25891 hh: [number + ' voramni', number + ' voram'], 25892 d: ['eka disan', 'ek dis'], 25893 dd: [number + ' disamni', number + ' dis'], 25894 M: ['eka mhoinean', 'ek mhoino'], 25895 MM: [number + ' mhoineamni', number + ' mhoine'], 25896 y: ['eka vorsan', 'ek voros'], 25897 yy: [number + ' vorsamni', number + ' vorsam'], 25898 }; 25899 return isFuture ? format[key][0] : format[key][1]; 25900 } 25901 25902 var gomLatn = moment.defineLocale('gom-latn', { 25903 months: { 25904 standalone: 25905 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split( 25906 '_' 25907 ), 25908 format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split( 25909 '_' 25910 ), 25911 isFormat: /MMMM(\s)+D[oD]?/, 25912 }, 25913 monthsShort: 25914 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'), 25915 monthsParseExact: true, 25916 weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'), 25917 weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'), 25918 weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'), 25919 weekdaysParseExact: true, 25920 longDateFormat: { 25921 LT: 'A h:mm [vazta]', 25922 LTS: 'A h:mm:ss [vazta]', 25923 L: 'DD-MM-YYYY', 25924 LL: 'D MMMM YYYY', 25925 LLL: 'D MMMM YYYY A h:mm [vazta]', 25926 LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]', 25927 llll: 'ddd, D MMM YYYY, A h:mm [vazta]', 25928 }, 25929 calendar: { 25930 sameDay: '[Aiz] LT', 25931 nextDay: '[Faleam] LT', 25932 nextWeek: '[Fuddlo] dddd[,] LT', 25933 lastDay: '[Kal] LT', 25934 lastWeek: '[Fattlo] dddd[,] LT', 25935 sameElse: 'L', 25936 }, 25937 relativeTime: { 25938 future: '%s', 25939 past: '%s adim', 25940 s: processRelativeTime, 25941 ss: processRelativeTime, 25942 m: processRelativeTime, 25943 mm: processRelativeTime, 25944 h: processRelativeTime, 25945 hh: processRelativeTime, 25946 d: processRelativeTime, 25947 dd: processRelativeTime, 25948 M: processRelativeTime, 25949 MM: processRelativeTime, 25950 y: processRelativeTime, 25951 yy: processRelativeTime, 25952 }, 25953 dayOfMonthOrdinalParse: /\d{1,2}(er)/, 25954 ordinal: function (number, period) { 25955 switch (period) { 25956 // the ordinal 'er' only applies to day of the month 25957 case 'D': 25958 return number + 'er'; 25959 default: 25960 case 'M': 25961 case 'Q': 25962 case 'DDD': 25963 case 'd': 25964 case 'w': 25965 case 'W': 25966 return number; 25967 } 25968 }, 25969 week: { 25970 dow: 0, // Sunday is the first day of the week 25971 doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4) 25972 }, 25973 meridiemParse: /rati|sokallim|donparam|sanje/, 25974 meridiemHour: function (hour, meridiem) { 25975 if (hour === 12) { 25976 hour = 0; 25977 } 25978 if (meridiem === 'rati') { 25979 return hour < 4 ? hour : hour + 12; 25980 } else if (meridiem === 'sokallim') { 25981 return hour; 25982 } else if (meridiem === 'donparam') { 25983 return hour > 12 ? hour : hour + 12; 25984 } else if (meridiem === 'sanje') { 25985 return hour + 12; 25986 } 25987 }, 25988 meridiem: function (hour, minute, isLower) { 25989 if (hour < 4) { 25990 return 'rati'; 25991 } else if (hour < 12) { 25992 return 'sokallim'; 25993 } else if (hour < 16) { 25994 return 'donparam'; 25995 } else if (hour < 20) { 25996 return 'sanje'; 25997 } else { 25998 return 'rati'; 25999 } 26000 }, 26001 }); 26002 26003 return gomLatn; 26004 26005}))); 26006 26007 26008/***/ }), 26009/* 58 */ 26010/***/ (function(module, exports, __webpack_require__) { 26011 26012//! moment.js locale configuration 26013//! locale : Gujarati [gu] 26014//! author : Kaushik Thanki : https://github.com/Kaushik1987 26015 26016;(function (global, factory) { 26017 true ? factory(__webpack_require__(0)) : 26018 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 26019 factory(global.moment) 26020}(this, (function (moment) { 'use strict'; 26021 26022 //! moment.js locale configuration 26023 26024 var symbolMap = { 26025 1: 'à«§', 26026 2: '૨', 26027 3: 'à«©', 26028 4: '૪', 26029 5: 'à««', 26030 6: '૬', 26031 7: 'à«', 26032 8: 'à«®', 26033 9: '૯', 26034 0: '૦', 26035 }, 26036 numberMap = { 26037 'à«§': '1', 26038 '૨': '2', 26039 'à«©': '3', 26040 '૪': '4', 26041 'à««': '5', 26042 '૬': '6', 26043 'à«': '7', 26044 'à«®': '8', 26045 '૯': '9', 26046 '૦': '0', 26047 }; 26048 26049 var gu = moment.defineLocale('gu', { 26050 months: 'àªàª¾àª¨à«àª¯à«àªàª°à«_ફà«àª¬à«àª°à«àªàª°à«_મારà«àª_àªàªªà«àª°àª¿àª²_મà«_àªà«àª¨_àªà«àª²àª¾àª_àªàªàª¸à«àª_સપà«àªà«àª®à«àª¬àª°_àªàªà«àªà«àª¬àª°_નવà«àª®à«àª¬àª°_ડિસà«àª®à«àª¬àª°'.split( 26051 '_' 26052 ), 26053 monthsShort:
vendor: 7,571 bytes, lines 26054-26260
26054 'àªàª¾àª¨à«àª¯à«._ફà«àª¬à«àª°à«._મારà«àª_àªàªªà«àª°àª¿._મà«_àªà«àª¨_àªà«àª²àª¾._àªàª._સપà«àªà«._àªàªà«àªà«._નવà«._ડિસà«.'.split( 26055 '_' 26056 ), 26057 monthsParseExact: true, 26058 weekdays: 'રવિવાર_સà«àª®àªµàª¾àª°_મàªàªàª³àªµàª¾àª°_બà«àª§à«àªµàª¾àª°_àªà«àª°à«àªµàª¾àª°_શà«àªà«àª°àªµàª¾àª°_શનિવાર'.split( 26059 '_' 26060 ), 26061 weekdaysShort: 'રવિ_સà«àª®_મàªàªàª³_બà«àª§à«_àªà«àª°à«_શà«àªà«àª°_શનિ'.split('_'), 26062 weekdaysMin: 'ર_સà«_મàª_બà«_àªà«_શà«_શ'.split('_'), 26063 longDateFormat: { 26064 LT: 'A h:mm વાàªà«àª¯à«', 26065 LTS: 'A h:mm:ss વાàªà«àª¯à«', 26066 L: 'DD/MM/YYYY', 26067 LL: 'D MMMM YYYY', 26068 LLL: 'D MMMM YYYY, A h:mm વાàªà«àª¯à«', 26069 LLLL: 'dddd, D MMMM YYYY, A h:mm વાàªà«àª¯à«', 26070 }, 26071 calendar: { 26072 sameDay: '[àªàª] LT', 26073 nextDay: '[àªàª¾àª²à«] LT', 26074 nextWeek: 'dddd, LT', 26075 lastDay: '[àªàªàªàª¾àª²à«] LT', 26076 lastWeek: '[પાàªàª²àª¾] dddd, LT', 26077 sameElse: 'L', 26078 }, 26079 relativeTime: { 26080 future: '%s મા', 26081 past: '%s પહà«àª²àª¾', 26082 s: 'ઠમà«àª પળà«', 26083 ss: '%d સà«àªàªàª¡', 26084 m: 'àªàª મિનિàª', 26085 mm: '%d મિનિàª', 26086 h: 'àªàª àªàª²àª¾àª', 26087 hh: '%d àªàª²àª¾àª', 26088 d: 'àªàª દિવસ', 26089 dd: '%d દિવસ', 26090 M: 'àªàª મહિનà«', 26091 MM: '%d મહિનà«', 26092 y: 'àªàª વરà«àª·', 26093 yy: '%d વરà«àª·', 26094 }, 26095 preparse: function (string) { 26096 return string.replace(/[૧૨૩૪૫૬à«à«®à«¯à«¦]/g, function (match) { 26097 return numberMap[match]; 26098 }); 26099 }, 26100 postformat: function (string) { 26101 return string.replace(/\d/g, function (match) { 26102 return symbolMap[match]; 26103 }); 26104 }, 26105 // Gujarati notation for meridiems are quite fuzzy in practice. While there exists 26106 // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati. 26107 meridiemParse: /રાત|બપà«àª°|સવાર|સાàªàª/, 26108 meridiemHour: function (hour, meridiem) { 26109 if (hour === 12) { 26110 hour = 0; 26111 } 26112 if (meridiem === 'રાત') { 26113 return hour < 4 ? hour : hour + 12; 26114 } else if (meridiem === 'સવાર') { 26115 return hour; 26116 } else if (meridiem === 'બપà«àª°') { 26117 return hour >= 10 ? hour : hour + 12; 26118 } else if (meridiem === 'સાàªàª') { 26119 return hour + 12; 26120 } 26121 }, 26122 meridiem: function (hour, minute, isLower) { 26123 if (hour < 4) { 26124 return 'રાત'; 26125 } else if (hour < 10) { 26126 return 'સવાર'; 26127 } else if (hour < 17) { 26128 return 'બપà«àª°'; 26129 } else if (hour < 20) { 26130 return 'સાàªàª'; 26131 } else { 26132 return 'રાત'; 26133 } 26134 }, 26135 week: { 26136 dow: 0, // Sunday is the first day of the week. 26137 doy: 6, // The week that contains Jan 6th is the first week of the year. 26138 }, 26139 }); 26140 26141 return gu; 26142 26143}))); 26144 26145 26146/***/ }), 26147/* 59 */ 26148/***/ (function(module, exports, __webpack_require__) { 26149 26150//! moment.js locale configuration 26151//! locale : Hebrew [he] 26152//! author : Tomer Cohen : https://github.com/tomer 26153//! author : Moshe Simantov : https://github.com/DevelopmentIL 26154//! author : Tal Ater : https://github.com/TalAter 26155 26156;(function (global, factory) { 26157 true ? factory(__webpack_require__(0)) : 26158 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 26159 factory(global.moment) 26160}(this, (function (moment) { 'use strict'; 26161 26162 //! moment.js locale configuration 26163 26164 var he = moment.defineLocale('he', { 26165 months: '×× ××ר_פ×ר××ר_×רץ_×פר××_×××_××× ×_××××_××××ס×_ספ×××ר_×××§×××ר_× ××××ר_×צ××ר'.split( 26166 '_' 26167 ), 26168 monthsShort: 26169 '×× ×׳_פ×ר׳_×רץ_×פר׳_×××_××× ×_××××_×××׳_ספ×׳_××ק׳_× ××׳_×צ×׳'.split('_'), 26170 weekdays: 'ר×ש××_×©× ×_ש××ש×_ר×××¢×_×××ש×_ש×ש×_ש×ת'.split('_'), 26171 weekdaysShort: '×׳_×׳_×׳_×׳_×׳_×׳_ש׳'.split('_'), 26172 weekdaysMin: '×_×_×_×_×_×_ש'.split('_'), 26173 longDateFormat: { 26174 LT: 'HH:mm', 26175 LTS: 'HH:mm:ss', 26176 L: 'DD/MM/YYYY', 26177 LL: 'D [×]MMMM YYYY', 26178 LLL: 'D [×]MMMM YYYY HH:mm', 26179 LLLL: 'dddd, D [×]MMMM YYYY HH:mm', 26180 l: 'D/M/YYYY', 26181 ll: 'D MMM YYYY', 26182 lll: 'D MMM YYYY HH:mm', 26183 llll: 'ddd, D MMM YYYY HH:mm', 26184 }, 26185 calendar: { 26186 sameDay: '[×××× ×Ö¾]LT', 26187 nextDay: '[××ר ×Ö¾]LT', 26188 nextWeek: 'dddd [×שע×] LT', 26189 lastDay: '[×ת××× ×Ö¾]LT', 26190 lastWeek: '[××××] dddd [×××ר×× ×שע×] LT', 26191 sameElse: 'L', 26192 }, 26193 relativeTime: { 26194 future: '××¢×× %s', 26195 past: '××¤× × %s', 26196 s: '×ספר ×©× ××ת', 26197 ss: '%d ×©× ××ת', 26198 m: '××§×', 26199 mm: '%d ××§×ת', 26200 h: 'שע×', 26201 hh: function (number) { 26202 if (number === 2) { 26203 return 'שעת×××'; 26204 } 26205 return number + ' שע×ת'; 26206 }, 26207 d: '×××', 26208 dd: function (number) { 26209 if (number === 2) { 26210 return '××××××'; 26211 } 26212 return number + ' ××××'; 26213 }, 26214 M: '×××ש', 26215 MM: function (number) { 26216 if (number === 2) { 26217 return '×××ש×××'; 26218 } 26219 return number + ' ×××ש××'; 26220 }, 26221 y: '×©× ×', 26222 yy: function (number) { 26223 if (number === 2) { 26224 return '×©× ×ª×××'; 26225 } else if (number % 10 === 0 && number !== 10) { 26226 return number + ' ×©× ×'; 26227 } 26228 return number + ' ×©× ××'; 26229 }, 26230 }, 26231 meridiemParse: 26232 /×××"צ|××¤× ×"צ|×××¨× ×צ×ר×××|××¤× × ×צ×ר×××|××¤× ×ת ××קר|×××קר|×ער×/i, 26233 isPM: function (input) { 26234 return /^(×××"צ|×××¨× ×צ×ר×××|×ער×)$/.test(input); 26235 }, 26236 meridiem: function (hour, minute, isLower) { 26237 if (hour < 5) { 26238 return '××¤× ×ת ××קר'; 26239 } else if (hour < 10) { 26240 return '×××קר'; 26241 } else if (hour < 12) { 26242 return isLower ? '××¤× ×"צ' : '××¤× × ×צ×ר×××'; 26243 } else if (hour < 18) { 26244 return isLower ? '×××"צ' : '×××¨× ×צ×ר×××'; 26245 } else { 26246 return '×ער×'; 26247 } 26248 }, 26249 }); 26250 26251 return he; 26252 26253}))); 26254 26255 26256/***/ }), 26257/* 60 */ 26258/***/ (function(module, exports, __webpack_require__) { 26259 26260//! moment.js locale configuration
26261//! locale : Hindi [hi] 26262//! author : Mayank Singhal : https://github.com/mayanksinghal 26263 26264;(function (global, factory) { 26265 true ? factory(__webpack_require__(0)) : 26266 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 26267 factory(global.moment) 26268}(this, (function (moment) { 'use strict'; 26269 26270 //! moment.js locale configuration 26271 26272 var symbolMap = { 26273 1: '१', 26274 2: '२', 26275 3: '३', 26276 4: '४', 26277 5: '५', 26278 6: '६', 26279 7: 'à¥', 26280 8: '८', 26281 9: '९', 26282 0: '०', 26283 }, 26284 numberMap = { 26285 '१': '1', 26286 '२': '2', 26287 '३': '3', 26288 '४': '4', 26289 '५': '5', 26290 '६': '6', 26291 'à¥': '7', 26292 '८': '8', 26293 '९': '9', 26294 '०': '0', 26295 }, 26296 monthsParse = [ 26297 /^à¤à¤¨/i, 26298 /^फ़र|फर/i, 26299 /^मारà¥à¤/i, 26300 /^ठपà¥à¤°à¥/i, 26301 /^मà¤/i, 26302 /^à¤à¥à¤¨/i, 26303 /^à¤à¥à¤²/i, 26304 /^ठà¤/i, 26305 /^सितà¤|सित/i, 26306 /^ठà¤à¥à¤à¥/i, 26307 /^नव|नवà¤/i, 26308 /^दिसà¤|दिस/i, 26309 ], 26310 shortMonthsParse = [ 26311 /^à¤à¤¨/i, 26312 /^फ़र/i, 26313 /^मारà¥à¤/i, 26314 /^ठपà¥à¤°à¥/i, 26315 /^मà¤/i, 26316 /^à¤à¥à¤¨/i, 26317 /^à¤à¥à¤²/i, 26318 /^ठà¤/i, 26319 /^सित/i, 26320 /^ठà¤à¥à¤à¥/i, 26321 /^नव/i, 26322 /^दिस/i, 26323 ]; 26324 26325 var hi = moment.defineLocale('hi', { 26326 months: { 26327 format: 'à¤à¤¨à¤µà¤°à¥_फ़रवरà¥_मारà¥à¤_ठपà¥à¤°à¥à¤²_मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤_ठà¤à¤¸à¥à¤¤_सितमà¥à¤¬à¤°_ठà¤à¥à¤à¥à¤¬à¤°_नवमà¥à¤¬à¤°_दिसमà¥à¤¬à¤°'.split( 26328 '_' 26329 ), 26330 standalone: 26331 'à¤à¤¨à¤µà¤°à¥_फरवरà¥_मारà¥à¤_ठपà¥à¤°à¥à¤²_मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤_ठà¤à¤¸à¥à¤¤_सितà¤à¤¬à¤°_ठà¤à¥à¤à¥à¤¬à¤°_नवà¤à¤¬à¤°_दिसà¤à¤¬à¤°'.split( 26332 '_' 26333 ), 26334 }, 26335 monthsShort: 26336 'à¤à¤¨._फ़र._मारà¥à¤_ठपà¥à¤°à¥._मà¤_à¤à¥à¤¨_à¤à¥à¤²._ठà¤._सित._ठà¤à¥à¤à¥._नव._दिस.'.split('_'), 26337 weekdays: 'रविवार_सà¥à¤®à¤µà¤¾à¤°_मà¤à¤à¤²à¤µà¤¾à¤°_बà¥à¤§à¤µà¤¾à¤°_à¤à¥à¤°à¥à¤µà¤¾à¤°_शà¥à¤à¥à¤°à¤µà¤¾à¤°_शनिवार'.split('_'), 26338 weekdaysShort: 'रवि_सà¥à¤®_मà¤à¤à¤²_बà¥à¤§_à¤à¥à¤°à¥_शà¥à¤à¥à¤°_शनि'.split('_'), 26339 weekdaysMin: 'र_सà¥_मà¤_बà¥_à¤à¥_शà¥_श'.split('_'), 26340 longDateFormat: { 26341 LT: 'A h:mm बà¤à¥', 26342 LTS: 'A h:mm:ss बà¤à¥', 26343 L: 'DD/MM/YYYY', 26344 LL: 'D MMMM YYYY', 26345 LLL: 'D MMMM YYYY, A h:mm बà¤à¥', 26346 LLLL: 'dddd, D MMMM YYYY, A h:mm बà¤à¥', 26347 }, 26348 26349 monthsParse: monthsParse, 26350 longMonthsParse: monthsParse, 26351 shortMonthsParse: shortMonthsParse, 26352 26353 monthsRegex: 26354 /^(à¤à¤¨à¤µà¤°à¥|à¤à¤¨\.?|फ़रवरà¥|फरवरà¥|फ़र\.?|मारà¥à¤?|ठपà¥à¤°à¥à¤²|ठपà¥à¤°à¥\.?|मà¤?|à¤à¥à¤¨?|à¤à¥à¤²à¤¾à¤|à¤à¥à¤²\.?|ठà¤à¤¸à¥à¤¤|ठà¤\.?|सितमà¥à¤¬à¤°|सितà¤à¤¬à¤°|सित\.?|ठà¤à¥à¤à¥à¤¬à¤°|ठà¤à¥à¤à¥\.?|नवमà¥à¤¬à¤°|नवà¤à¤¬à¤°|नव\.?|दिसमà¥à¤¬à¤°|दिसà¤à¤¬à¤°|दिस\.?)/i, 26355 26356 monthsShortRegex: 26357 /^(à¤à¤¨à¤µà¤°à¥|à¤à¤¨\.?|फ़रवरà¥|फरवरà¥|फ़र\.?|मारà¥à¤?|ठपà¥à¤°à¥à¤²|ठपà¥à¤°à¥\.?|मà¤?|à¤à¥à¤¨?|à¤à¥à¤²à¤¾à¤|à¤à¥à¤²\.?|ठà¤à¤¸à¥à¤¤|ठà¤\.?|सितमà¥à¤¬à¤°|सितà¤à¤¬à¤°|सित\.?|ठà¤à¥à¤à¥à¤¬à¤°|ठà¤à¥à¤à¥\.?|नवमà¥à¤¬à¤°|नवà¤à¤¬à¤°|नव\.?|दिसमà¥à¤¬à¤°|दिसà¤à¤¬à¤°|दिस\.?)/i, 26358 26359 monthsStrictRegex: 26360 /^(à¤à¤¨à¤µà¤°à¥?|फ़रवरà¥|फरवरà¥?|मारà¥à¤?|ठपà¥à¤°à¥à¤²?|मà¤?|à¤à¥à¤¨?|à¤à¥à¤²à¤¾à¤?|ठà¤à¤¸à¥à¤¤?|सितमà¥à¤¬à¤°|सितà¤à¤¬à¤°|सित?\.?|ठà¤à¥à¤à¥à¤¬à¤°|à¤
vendor: 15,649 bytes, lines 26360-26809
26360à¤à¥à¤à¥\.?|नवमà¥à¤¬à¤°|नवà¤à¤¬à¤°?|दिसमà¥à¤¬à¤°|दिसà¤à¤¬à¤°?)/i, 26361 26362 monthsShortStrictRegex: 26363 /^(à¤à¤¨\.?|फ़र\.?|मारà¥à¤?|ठपà¥à¤°à¥\.?|मà¤?|à¤à¥à¤¨?|à¤à¥à¤²\.?|ठà¤\.?|सित\.?|ठà¤à¥à¤à¥\.?|नव\.?|दिस\.?)/i, 26364 26365 calendar: { 26366 sameDay: '[à¤à¤] LT', 26367 nextDay: '[à¤à¤²] LT', 26368 nextWeek: 'dddd, LT', 26369 lastDay: '[à¤à¤²] LT', 26370 lastWeek: '[पिà¤à¤²à¥] dddd, LT', 26371 sameElse: 'L', 26372 }, 26373 relativeTime: { 26374 future: '%s मà¥à¤', 26375 past: '%s पहलà¥', 26376 s: 'à¤à¥à¤ हॠà¤à¥à¤·à¤£', 26377 ss: '%d सà¥à¤à¤à¤¡', 26378 m: 'à¤à¤ मिनà¤', 26379 mm: '%d मिनà¤', 26380 h: 'à¤à¤ à¤à¤à¤à¤¾', 26381 hh: '%d à¤à¤à¤à¥', 26382 d: 'à¤à¤ दिन', 26383 dd: '%d दिन', 26384 M: 'à¤à¤ महà¥à¤¨à¥', 26385 MM: '%d महà¥à¤¨à¥', 26386 y: 'à¤à¤ वरà¥à¤·', 26387 yy: '%d वरà¥à¤·', 26388 }, 26389 preparse: function (string) { 26390 return string.replace(/[१२३४५६à¥à¥®à¥¯à¥¦]/g, function (match) { 26391 return numberMap[match]; 26392 }); 26393 }, 26394 postformat: function (string) { 26395 return string.replace(/\d/g, function (match) { 26396 return symbolMap[match]; 26397 }); 26398 }, 26399 // Hindi notation for meridiems are quite fuzzy in practice. While there exists 26400 // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi. 26401 meridiemParse: /रात|सà¥à¤¬à¤¹|दà¥à¤ªà¤¹à¤°|शाम/, 26402 meridiemHour: function (hour, meridiem) { 26403 if (hour === 12) { 26404 hour = 0; 26405 } 26406 if (meridiem === 'रात') { 26407 return hour < 4 ? hour : hour + 12; 26408 } else if (meridiem === 'सà¥à¤¬à¤¹') { 26409 return hour; 26410 } else if (meridiem === 'दà¥à¤ªà¤¹à¤°') { 26411 return hour >= 10 ? hour : hour + 12; 26412 } else if (meridiem === 'शाम') { 26413 return hour + 12; 26414 } 26415 }, 26416 meridiem: function (hour, minute, isLower) { 26417 if (hour < 4) { 26418 return 'रात'; 26419 } else if (hour < 10) { 26420 return 'सà¥à¤¬à¤¹'; 26421 } else if (hour < 17) { 26422 return 'दà¥à¤ªà¤¹à¤°'; 26423 } else if (hour < 20) { 26424 return 'शाम'; 26425 } else { 26426 return 'रात'; 26427 } 26428 }, 26429 week: { 26430 dow: 0, // Sunday is the first day of the week. 26431 doy: 6, // The week that contains Jan 6th is the first week of the year. 26432 }, 26433 }); 26434 26435 return hi; 26436 26437}))); 26438 26439 26440/***/ }), 26441/* 61 */ 26442/***/ (function(module, exports, __webpack_require__) { 26443 26444//! moment.js locale configuration 26445//! locale : Croatian [hr] 26446//! author : Bojan MarkoviÄ : https://github.com/bmarkovic 26447 26448;(function (global, factory) { 26449 true ? factory(__webpack_require__(0)) : 26450 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 26451 factory(global.moment) 26452}(this, (function (moment) { 'use strict'; 26453 26454 //! moment.js locale configuration 26455 26456 function translate(number, withoutSuffix, key) { 26457 var result = number + ' '; 26458 switch (key) { 26459 case 'ss': 26460 if (number === 1) { 26461 result += 'sekunda'; 26462 } else if (number === 2 || number === 3 || number === 4) { 26463 result += 'sekunde'; 26464 } else { 26465 result += 'sekundi'; 26466 } 26467 return result; 26468 case 'm': 26469 return withoutSuffix ? 'jedna minuta' : 'jedne minute'; 26470 case 'mm': 26471 if (number === 1) { 26472 result += 'minuta'; 26473 } else if (number === 2 || number === 3 || number === 4) { 26474 result += 'minute'; 26475 } else { 26476 result += 'minuta'; 26477 } 26478 return result; 26479 case 'h': 26480 return withoutSuffix ? 'jedan sat' : 'jednog sata'; 26481 case 'hh': 26482 if (number === 1) { 26483 result += 'sat'; 26484 } else if (number === 2 || number === 3 || number === 4) { 26485 result += 'sata'; 26486 } else { 26487 result += 'sati'; 26488 } 26489 return result; 26490 case 'dd': 26491 if (number === 1) { 26492 result += 'dan'; 26493 } else { 26494 result += 'dana'; 26495 } 26496 return result; 26497 case 'MM': 26498 if (number === 1) { 26499 result += 'mjesec'; 26500 } else if (number === 2 || number === 3 || number === 4) { 26501 result += 'mjeseca'; 26502 } else { 26503 result += 'mjeseci'; 26504 } 26505 return result; 26506 case 'yy': 26507 if (number === 1) { 26508 result += 'godina'; 26509 } else if (number === 2 || number === 3 || number === 4) { 26510 result += 'godine'; 26511 } else { 26512 result += 'godina'; 26513 } 26514 return result; 26515 } 26516 } 26517 26518 var hr = moment.defineLocale('hr', { 26519 months: { 26520 format: 'sijeÄnja_veljaÄe_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split( 26521 '_' 26522 ), 26523 standalone: 26524 'sijeÄanj_veljaÄa_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split( 26525 '_' 26526 ), 26527 }, 26528 monthsShort: 26529 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split( 26530 '_' 26531 ), 26532 monthsParseExact: true, 26533 weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_Äetvrtak_petak_subota'.split( 26534 '_' 26535 ), 26536 weekdaysShort: 'ned._pon._uto._sri._Äet._pet._sub.'.split('_'), 26537 weekdaysMin: 'ne_po_ut_sr_Äe_pe_su'.split('_'), 26538 weekdaysParseExact: true, 26539 longDateFormat: { 26540 LT: 'H:mm', 26541 LTS: 'H:mm:ss', 26542 L: 'DD.MM.YYYY', 26543 LL: 'Do MMMM YYYY', 26544 LLL: 'Do MMMM YYYY H:mm', 26545 LLLL: 'dddd, Do MMMM YYYY H:mm', 26546 }, 26547 calendar: { 26548 sameDay: '[danas u] LT', 26549 nextDay: '[sutra u] LT', 26550 nextWeek: function () { 26551 switch (this.day()) { 26552 case 0: 26553 return '[u] [nedjelju] [u] LT'; 26554 case 3: 26555 return '[u] [srijedu] [u] LT'; 26556 case 6: 26557 return '[u] [subotu] [u] LT'; 26558 case 1: 26559 case 2: 26560 case 4: 26561 case 5: 26562 return '[u] dddd [u] LT'; 26563 } 26564 }, 26565 lastDay: '[juÄer u] LT', 26566 lastWeek: function () { 26567 switch (this.day()) { 26568 case 0: 26569 return '[proÅ¡lu] [nedjelju] [u] LT'; 26570 case 3: 26571 return '[proÅ¡lu] [srijedu] [u] LT'; 26572 case 6: 26573 return '[proÅ¡le] [subote] [u] LT'; 26574 case 1: 26575 case 2: 26576 case 4: 26577 case 5: 26578 return '[proÅ¡li] dddd [u] LT'; 26579 } 26580 }, 26581 sameElse: 'L', 26582 }, 26583 relativeTime: { 26584 future: 'za %s', 26585 past: 'prije %s', 26586 s: 'par sekundi', 26587 ss: translate, 26588 m: translate, 26589 mm: translate, 26590 h: translate, 26591 hh: translate, 26592 d: 'dan', 26593 dd: translate, 26594 M: 'mjesec', 26595 MM: translate, 26596 y: 'godinu', 26597 yy: translate, 26598 }, 26599 dayOfMonthOrdinalParse: /\d{1,2}\./, 26600 ordinal: '%d.', 26601 week: { 26602 dow: 1, // Monday is the first day of the week. 26603 doy: 7, // The week that contains Jan 7th is the first week of the year. 26604 }, 26605 }); 26606 26607 return hr; 26608 26609}))); 26610 26611 26612/***/ }), 26613/* 62 */ 26614/***/ (function(module, exports, __webpack_require__) { 26615 26616//! moment.js locale configuration 26617//! locale : Hungarian [hu] 26618//! author : Adam Brunner : https://github.com/adambrunner 26619//! author : Peter Viszt : https://github.com/passatgt 26620 26621;(function (global, factory) { 26622 true ? factory(__webpack_require__(0)) : 26623 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 26624 factory(global.moment) 26625}(this, (function (moment) { 'use strict'; 26626 26627 //! moment.js locale configuration 26628 26629 var weekEndings = 26630 'vasárnap hétfÅn kedden szerdán csütörtökön pénteken szombaton'.split(' '); 26631 function translate(number, withoutSuffix, key, isFuture) { 26632 var num = number; 26633 switch (key) { 26634 case 's': 26635 return isFuture || withoutSuffix 26636 ? 'néhány másodperc' 26637 : 'néhány másodperce'; 26638 case 'ss': 26639 return num + (isFuture || withoutSuffix) 26640 ? ' másodperc' 26641 : ' másodperce'; 26642 case 'm': 26643 return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); 26644 case 'mm': 26645 return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); 26646 case 'h': 26647 return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); 26648 case 'hh': 26649 return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); 26650 case 'd': 26651 return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); 26652 case 'dd': 26653 return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); 26654 case 'M': 26655 return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); 26656 case 'MM': 26657 return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); 26658 case 'y': 26659 return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); 26660 case 'yy': 26661 return num + (isFuture || withoutSuffix ? ' év' : ' éve'); 26662 } 26663 return ''; 26664 } 26665 function week(isFuture) { 26666 return ( 26667 (isFuture ? '' : '[múlt] ') + 26668 '[' + 26669 weekEndings[this.day()] + 26670 '] LT[-kor]' 26671 ); 26672 } 26673 26674 var hu = moment.defineLocale('hu', { 26675 months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split( 26676 '_' 26677 ), 26678 monthsShort: 26679 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split( 26680 '_' 26681 ), 26682 monthsParseExact: true, 26683 weekdays: 'vasárnap_hétfÅ_kedd_szerda_csütörtök_péntek_szombat'.split('_'), 26684 weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), 26685 weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'), 26686 longDateFormat: { 26687 LT: 'H:mm', 26688 LTS: 'H:mm:ss', 26689 L: 'YYYY.MM.DD.', 26690 LL: 'YYYY. MMMM D.', 26691 LLL: 'YYYY. MMMM D. H:mm', 26692 LLLL: 'YYYY. MMMM D., dddd H:mm', 26693 }, 26694 meridiemParse: /de|du/i, 26695 isPM: function (input) { 26696 return input.charAt(1).toLowerCase() === 'u'; 26697 }, 26698 meridiem: function (hours, minutes, isLower) { 26699 if (hours < 12) { 26700 return isLower === true ? 'de' : 'DE'; 26701 } else { 26702 return isLower === true ? 'du' : 'DU'; 26703 } 26704 }, 26705 calendar: { 26706 sameDay: '[ma] LT[-kor]', 26707 nextDay: '[holnap] LT[-kor]', 26708 nextWeek: function () { 26709 return week.call(this, true); 26710 }, 26711 lastDay: '[tegnap] LT[-kor]', 26712 lastWeek: function () { 26713 return week.call(this, false); 26714 }, 26715 sameElse: 'L', 26716 }, 26717 relativeTime: { 26718 future: '%s múlva', 26719 past: '%s', 26720 s: translate, 26721 ss: translate, 26722 m: translate, 26723 mm: translate, 26724 h: translate, 26725 hh: translate, 26726 d: translate, 26727 dd: translate, 26728 M: translate, 26729 MM: translate, 26730 y: translate, 26731 yy: translate, 26732 }, 26733 dayOfMonthOrdinalParse: /\d{1,2}\./, 26734 ordinal: '%d.', 26735 week: { 26736 dow: 1, // Monday is the first day of the week. 26737 doy: 4, // The week that contains Jan 4th is the first week of the year. 26738 }, 26739 }); 26740 26741 return hu; 26742 26743}))); 26744 26745 26746/***/ }), 26747/* 63 */ 26748/***/ (function(module, exports, __webpack_require__) { 26749 26750//! moment.js locale configuration 26751//! locale : Armenian [hy-am] 26752//! author : Armendarabyan : https://github.com/armendarabyan 26753 26754;(function (global, factory) { 26755 true ? factory(__webpack_require__(0)) : 26756 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 26757 factory(global.moment) 26758}(this, (function (moment) { 'use strict'; 26759 26760 //! moment.js locale configuration 26761 26762 var hyAm = moment.defineLocale('hy-am', { 26763 months: { 26764 format: 'Õ°Õ¸ÖÕ¶Õ¾Õ¡ÖÕ«_ÖÕ¥Õ¿ÖÕ¾Õ¡ÖÕ«_Õ´Õ¡ÖÕ¿Õ«_Õ¡ÕºÖÕ«Õ¬Õ«_Õ´Õ¡ÕµÕ«Õ½Õ«_Õ°Õ¸ÖÕ¶Õ«Õ½Õ«_Õ°Õ¸ÖÕ¬Õ«Õ½Õ«_Ö Õ£Õ¸Õ½Õ¿Õ¸Õ½Õ«_Õ½Õ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥ÖÕ«_Õ°Õ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥ÖÕ«_Õ¶Õ¸ÕµÕ¥Õ´Õ¢Õ¥ÖÕ«_Õ¤Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥ÖÕ«'.split( 26765 '_' 26766 ), 26767 standalone: 26768 'Õ°Õ¸ÖÕ¶Õ¾Õ¡Ö_ÖÕ¥Õ¿ÖÕ¾Õ¡Ö_Õ´Õ¡ÖÕ¿_Õ¡ÕºÖÕ«Õ¬_Õ´Õ¡ÕµÕ«Õ½_Õ°Õ¸ÖÕ¶Õ«Õ½_Õ°Õ¸ÖÕ¬Õ«Õ½_Ö Õ£Õ¸Õ½Õ¿Õ¸Õ½_Õ½Õ¥ÕºÕ¿Õ¥Õ´Õ¢Õ¥Ö_Õ°Õ¸Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö_Õ¶Õ¸ÕµÕ¥Õ´Õ¢Õ¥Ö_Õ¤Õ¥Õ¯Õ¿Õ¥Õ´Õ¢Õ¥Ö'.split( 26769 '_' 26770 ), 26771 }, 26772 monthsShort: 'Õ°Õ¶Õ¾_ÖÕ¿Ö_Õ´ÖÕ¿_Õ¡ÕºÖ_Õ´ÕµÕ½_Õ°Õ¶Õ½_Õ°Õ¬Õ½_Ö Õ£Õ½_Õ½ÕºÕ¿_Õ°Õ¯Õ¿_Õ¶Õ´Õ¢_Õ¤Õ¯Õ¿'.split('_'), 26773 weekdays: 26774 'Õ¯Õ«ÖÕ¡Õ¯Õ«_Õ¥ÖÕ¯Õ¸ÖÕ·Õ¡Õ¢Õ©Õ«_Õ¥ÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«_Õ¹Õ¸ÖÕ¥ÖÕ·Õ¡Õ¢Õ©Õ«_Õ°Õ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«_Õ¸ÖÖÕ¢Õ¡Õ©_Õ·Õ¡Õ¢Õ¡Õ©'.split( 26775 '_' 26776 ), 26777 weekdaysShort: 'Õ¯ÖÕ¯_Õ¥ÖÕ¯_Õ¥ÖÖ_Õ¹ÖÖ_Õ°Õ¶Õ£_Õ¸ÖÖÕ¢_Õ·Õ¢Õ©'.split('_'), 26778 weekdaysMin: 'Õ¯ÖÕ¯_Õ¥ÖÕ¯_Õ¥ÖÖ_Õ¹ÖÖ_Õ°Õ¶Õ£_Õ¸ÖÖÕ¢_Õ·Õ¢Õ©'.split('_'), 26779 longDateFormat: { 26780 LT: 'HH:mm', 26781 LTS: 'HH:mm:ss', 26782 L: 'DD.MM.YYYY', 26783 LL: 'D MMMM YYYY Õ©.', 26784 LLL: 'D MMMM YYYY Õ©., HH:mm', 26785 LLLL: 'dddd, D MMMM YYYY Õ©., HH:mm', 26786 }, 26787 calendar: { 26788 sameDay: '[Õ¡ÕµÕ½Ö Ö] LT', 26789 nextDay: '[Õ¾Õ¡Õ²Õ¨] LT', 26790 lastDay: '[Õ¥ÖÕ¥Õ¯] LT', 26791 nextWeek: function () { 26792 return 'dddd [Ö ÖÕ¨ ÕªÕ¡Õ´Õ¨] LT'; 26793 }, 26794 lastWeek: function () { 26795 return '[Õ¡Õ¶ÖÕ¡Õ®] dddd [Ö ÖÕ¨ ÕªÕ¡Õ´Õ¨] LT'; 26796 }, 26797 sameElse: 'L', 26798 }, 26799 relativeTime: { 26800 future: '%s Õ°Õ¥Õ¿Õ¸', 26801 past: '%s Õ¡Õ¼Õ¡Õ»', 26802 s: 'Õ´Õ« ÖÕ¡Õ¶Õ« Õ¾Õ¡ÕµÖÕ¯ÕµÕ¡Õ¶', 26803 ss: '%d Õ¾Õ¡ÕµÖÕ¯ÕµÕ¡Õ¶', 26804 m: 'ÖÕ¸ÕºÕ¥', 26805 mm: '%d ÖÕ¸ÕºÕ¥', 26806 h: 'ÕªÕ¡Õ´', 26807 hh: '%d ÕªÕ¡Õ´', 26808 d: 'Ö Ö', 26809 dd: '%d Ö Ö',
26810 M: 'Õ¡Õ´Õ«Õ½', 26811 MM: '%d Õ¡Õ´Õ«Õ½', 26812 y: 'Õ¿Õ¡ÖÕ«', 26813 yy: '%d Õ¿Õ¡ÖÕ«', 26814 }, 26815 meridiemParse: /Õ£Õ«Õ·Õ¥ÖÕ¾Õ¡|Õ¡Õ¼Õ¡Õ¾Õ¸Õ¿Õ¾Õ¡|ÖÕ¥ÖÕ¥Õ¯Õ¾Õ¡|Õ¥ÖÕ¥Õ¯Õ¸ÕµÕ¡Õ¶/, 26816 isPM: function (input) { 26817 return /^(ÖÕ¥ÖÕ¥Õ¯Õ¾Õ¡|Õ¥ÖÕ¥Õ¯Õ¸ÕµÕ¡Õ¶)$/.test(input); 26818 }, 26819 meridiem: function (hour) { 26820 if (hour < 4) { 26821 return 'Õ£Õ«Õ·Õ¥ÖÕ¾Õ¡'; 26822 } else if (hour < 12) { 26823 return 'Õ¡Õ¼Õ¡Õ¾Õ¸Õ¿Õ¾Õ¡'; 26824 } else if (hour < 17) { 26825 return 'ÖÕ¥ÖÕ¥Õ¯Õ¾Õ¡'; 26826 } else { 26827 return 'Õ¥ÖÕ¥Õ¯Õ¸ÕµÕ¡Õ¶'; 26828 } 26829 }, 26830 dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(Õ«Õ¶|ÖÕ¤)/, 26831 ordinal: function (number, period) { 26832 switch (period) { 26833 case 'DDD': 26834 case 'w': 26835 case 'W': 26836 case 'DDDo': 26837 if (number === 1) { 26838 return number + '-Õ«Õ¶'; 26839 } 26840 return number + '-ÖÕ¤'; 26841 default: 26842 return number; 26843 } 26844 }, 26845 week: { 26846 dow: 1, // Monday is the first day of the week. 26847 doy: 7, // The week that contains Jan 7th is the first week of the year. 26848 }, 26849 }); 26850 26851 return hyAm; 26852 26853}))); 26854 26855 26856/***/ }), 26857/* 64 */ 26858/***/ (function(module, exports, __webpack_require__) { 26859 26860//! moment.js locale configuration 26861//! locale : Indonesian [id] 26862//! author : Mohammad Satrio Utomo : https://github.com/tyok 26863//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan 26864 26865;(function (global, factory) { 26866 true ? factory(__webpack_require__(0)) : 26867 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 26868 factory(global.moment) 26869}(this, (function (moment) { 'use strict'; 26870 26871 //! moment.js locale configuration 26872 26873 var id = moment.defineLocale('id', { 26874 months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split( 26875 '_' 26876 ), 26877 monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'), 26878 weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), 26879 weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), 26880 weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), 26881 longDateFormat: { 26882 LT: 'HH.mm', 26883 LTS: 'HH.mm.ss', 26884 L: 'DD/MM/YYYY', 26885 LL: 'D MMMM YYYY', 26886 LLL: 'D MMMM YYYY [pukul] HH.mm', 26887 LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', 26888 }, 26889 meridiemParse: /pagi|siang|sore|malam/, 26890 meridiemHour: function (hour, meridiem) { 26891 if (hour === 12) { 26892 hour = 0; 26893 } 26894 if (meridiem === 'pagi') { 26895 return hour; 26896 } else if (meridiem === 'siang') { 26897 return hour >= 11 ? hour : hour + 12; 26898 } else if (meridiem === 'sore' || meridiem === 'malam') { 26899 return hour + 12; 26900 } 26901 }, 26902 meridiem: function (hours, minutes, isLower) { 26903 if (hours < 11) { 26904 return 'pagi'; 26905 } else if (hours < 15) { 26906 return 'siang'; 26907 } else if (hours < 19) { 26908 return 'sore'; 26909 } else { 26910 return 'malam'; 26911 } 26912 }, 26913 calendar: { 26914 sameDay: '[Hari ini pukul] LT', 26915 nextDay: '[Besok pukul] LT', 26916 nextWeek: 'dddd [pukul] LT', 26917 lastDay: '[Kemarin pukul] LT', 26918 lastWeek: 'dddd [lalu pukul] LT', 26919 sameElse: 'L', 26920 }, 26921 relativeTime: { 26922 future: 'dalam %s', 26923 past: '%s yang lalu', 26924 s: 'beberapa detik', 26925 ss: '%d detik', 26926 m: 'semenit', 26927 mm: '%d menit', 26928 h: 'sejam', 26929 hh: '%d jam', 26930 d: 'sehari', 26931 dd: '%d hari', 26932 M: 'sebulan', 26933 MM: '%d bulan', 26934 y: 'setahun', 26935 yy: '%d tahun', 26936 }, 26937 week: { 26938 dow: 0, // Sunday is the first day of the week. 26939 doy: 6, // The week that contains Jan 6th is the first week of the year. 26940 }, 26941 }); 26942 26943 return id; 26944 26945}))); 26946 26947 26948/***/ }), 26949/* 65 */ 26950/***/ (function(module, exports, __webpack_require__) { 26951 26952//! moment.js locale configuration 26953//! locale : Icelandic [is] 26954//! author : Hinrik Ãrn Sigurðsson : https://github.com/hinrik 26955 26956;(function (global, factory) { 26957 true ? factory(__webpack_require__(0)) : 26958 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 26959 factory(global.moment) 26960}(this, (function (moment) { 'use strict'; 26961 26962 //! moment.js locale configuration 26963 26964 function plural(n) { 26965 if (n % 100 === 11) { 26966 return true; 26967 } else if (n % 10 === 1) { 26968 return false;
vendor: 4,843 bytes, lines 26969-27109
26969 } 26970 return true; 26971 } 26972 function translate(number, withoutSuffix, key, isFuture) { 26973 var result = number + ' '; 26974 switch (key) { 26975 case 's': 26976 return withoutSuffix || isFuture 26977 ? 'nokkrar sekúndur' 26978 : 'nokkrum sekúndum'; 26979 case 'ss': 26980 if (plural(number)) { 26981 return ( 26982 result + 26983 (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum') 26984 ); 26985 } 26986 return result + 'sekúnda'; 26987 case 'm': 26988 return withoutSuffix ? 'mÃnúta' : 'mÃnútu'; 26989 case 'mm': 26990 if (plural(number)) { 26991 return ( 26992 result + (withoutSuffix || isFuture ? 'mÃnútur' : 'mÃnútum') 26993 ); 26994 } else if (withoutSuffix) { 26995 return result + 'mÃnúta'; 26996 } 26997 return result + 'mÃnútu'; 26998 case 'hh': 26999 if (plural(number)) { 27000 return ( 27001 result + 27002 (withoutSuffix || isFuture 27003 ? 'klukkustundir' 27004 : 'klukkustundum') 27005 ); 27006 } 27007 return result + 'klukkustund'; 27008 case 'd': 27009 if (withoutSuffix) { 27010 return 'dagur'; 27011 } 27012 return isFuture ? 'dag' : 'degi'; 27013 case 'dd': 27014 if (plural(number)) { 27015 if (withoutSuffix) { 27016 return result + 'dagar'; 27017 } 27018 return result + (isFuture ? 'daga' : 'dögum'); 27019 } else if (withoutSuffix) { 27020 return result + 'dagur'; 27021 } 27022 return result + (isFuture ? 'dag' : 'degi'); 27023 case 'M': 27024 if (withoutSuffix) { 27025 return 'mánuður'; 27026 } 27027 return isFuture ? 'mánuð' : 'mánuði'; 27028 case 'MM': 27029 if (plural(number)) { 27030 if (withoutSuffix) { 27031 return result + 'mánuðir'; 27032 } 27033 return result + (isFuture ? 'mánuði' : 'mánuðum'); 27034 } else if (withoutSuffix) { 27035 return result + 'mánuður'; 27036 } 27037 return result + (isFuture ? 'mánuð' : 'mánuði'); 27038 case 'y': 27039 return withoutSuffix || isFuture ? 'ár' : 'ári'; 27040 case 'yy': 27041 if (plural(number)) { 27042 return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); 27043 } 27044 return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); 27045 } 27046 } 27047 27048 var is = moment.defineLocale('is', { 27049 months: 'janúar_febrúar_mars_aprÃl_maÃ_júnÃ_júlÃ_ágúst_september_október_nóvember_desember'.split( 27050 '_' 27051 ), 27052 monthsShort: 'jan_feb_mar_apr_maÃ_jún_júl_ágú_sep_okt_nóv_des'.split('_'), 27053 weekdays: 27054 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split( 27055 '_' 27056 ), 27057 weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'), 27058 weekdaysMin: 'Su_Má_Ãr_Mi_Fi_Fö_La'.split('_'), 27059 longDateFormat: { 27060 LT: 'H:mm', 27061 LTS: 'H:mm:ss', 27062 L: 'DD.MM.YYYY', 27063 LL: 'D. MMMM YYYY', 27064 LLL: 'D. MMMM YYYY [kl.] H:mm', 27065 LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm', 27066 }, 27067 calendar: { 27068 sameDay: '[à dag kl.] LT', 27069 nextDay: '[á morgun kl.] LT', 27070 nextWeek: 'dddd [kl.] LT', 27071 lastDay: '[à gær kl.] LT', 27072 lastWeek: '[sÃðasta] dddd [kl.] LT', 27073 sameElse: 'L', 27074 }, 27075 relativeTime: { 27076 future: 'eftir %s', 27077 past: 'fyrir %s sÃðan', 27078 s: translate, 27079 ss: translate, 27080 m: translate, 27081 mm: translate, 27082 h: 'klukkustund', 27083 hh: translate, 27084 d: translate, 27085 dd: translate, 27086 M: translate, 27087 MM: translate, 27088 y: translate, 27089 yy: translate, 27090 }, 27091 dayOfMonthOrdinalParse: /\d{1,2}\./, 27092 ordinal: '%d.', 27093 week: { 27094 dow: 1, // Monday is the first day of the week. 27095 doy: 4, // The week that contains Jan 4th is the first week of the year. 27096 }, 27097 }); 27098 27099 return is; 27100 27101}))); 27102 27103 27104/***/ }), 27105/* 66 */ 27106/***/ (function(module, exports, __webpack_require__) { 27107 27108//! moment.js locale configuration 27109//! locale : Italian [it]
27110//! author : Lorenzo : https://github.com/aliem 27111//! author: Mattia Larentis: https://github.com/nostalgiaz 27112//! author: Marco : https://github.com/Manfre98 27113 27114;(function (global, factory) { 27115 true ? factory(__webpack_require__(0)) : 27116 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 27117 factory(global.moment) 27118}(this, (function (moment) { 'use strict'; 27119 27120 //! moment.js locale configuration 27121 27122 var it = moment.defineLocale('it', { 27123 months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split( 27124 '_' 27125 ), 27126 monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), 27127 weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split( 27128 '_' 27129 ), 27130 weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), 27131 weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), 27132 longDateFormat: { 27133 LT: 'HH:mm', 27134 LTS: 'HH:mm:ss', 27135 L: 'DD/MM/YYYY', 27136 LL: 'D MMMM YYYY', 27137 LLL: 'D MMMM YYYY HH:mm', 27138 LLLL: 'dddd D MMMM YYYY HH:mm', 27139 }, 27140 calendar: { 27141 sameDay: function () { 27142 return ( 27143 '[Oggi a' + 27144 (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + 27145 ']LT' 27146 ); 27147 }, 27148 nextDay: function () { 27149 return ( 27150 '[Domani a' + 27151 (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + 27152 ']LT' 27153 ); 27154 }, 27155 nextWeek: function () { 27156 return ( 27157 'dddd [a' + 27158 (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + 27159 ']LT' 27160 ); 27161 }, 27162 lastDay: function () { 27163 return ( 27164 '[Ieri a' + 27165 (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + 27166 ']LT' 27167 ); 27168 }, 27169 lastWeek: function () { 27170 switch (this.day()) { 27171 case 0: 27172 return ( 27173 '[La scorsa] dddd [a' + 27174 (this.hours() > 1 27175 ? 'lle ' 27176 : this.hours() === 0 27177 ? ' ' 27178 : "ll'") + 27179 ']LT' 27180 ); 27181 default: 27182 return ( 27183 '[Lo scorso] dddd [a' + 27184 (this.hours() > 1 27185 ? 'lle ' 27186 : this.hours() === 0 27187 ? ' ' 27188 : "ll'") + 27189 ']LT' 27190 ); 27191 } 27192 }, 27193 sameElse: 'L', 27194 }, 27195 relativeTime: { 27196 future: 'tra %s', 27197 past: '%s fa', 27198 s: 'alcuni secondi', 27199 ss: '%d secondi', 27200 m: 'un minuto', 27201 mm: '%d minuti', 27202 h: "un'ora", 27203 hh: '%d ore', 27204 d: 'un giorno', 27205 dd: '%d giorni', 27206 w: 'una settimana', 27207 ww: '%d settimane', 27208 M: 'un mese', 27209 MM: '%d mesi', 27210 y: 'un anno', 27211 yy: '%d anni', 27212 }, 27213 dayOfMonthOrdinalParse: /\d{1,2}º/, 27214 ordinal: '%dº', 27215 week: { 27216 dow: 1, // Monday is the first day of the week. 27217 doy: 4, // The week that contains Jan 4th is the first week of the year. 27218 }, 27219 }); 27220 27221 return it; 27222 27223}))); 27224 27225 27226/***/ }), 27227/* 67 */ 27228/***/ (function(module, exports, __webpack_require__) { 27229 27230//! moment.js locale configuration 27231//! locale : Italian (Switzerland) [it-ch] 27232//! author : xfh : https://github.com/xfh 27233 27234;(function (global, factory) { 27235 true ? factory(__webpack_require__(0)) : 27236 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 27237 factory(global.moment) 27238}(this, (function (moment) { 'use strict'; 27239 27240 //! moment.js locale configuration 27241 27242 var itCh = moment.defineLocale('it-ch', { 27243 months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split( 27244 '_' 27245 ), 27246 monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), 27247 weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split( 27248 '_' 27249 ), 27250 weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), 27251 weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), 27252 longDateFormat: { 27253 LT: 'HH:mm', 27254 LTS: 'HH:mm:ss', 27255 L: 'DD.MM.YYYY', 27256 LL: 'D MMMM YYYY', 27257 LLL: 'D MMMM YYYY HH:mm', 27258 LLLL: 'dddd D MMMM YYYY HH:mm', 27259 }, 27260 calendar: { 27261 sameDay: '[Oggi alle] LT', 27262 nextDay: '[Domani alle] LT', 27263 nextWeek: 'dddd [alle] LT', 27264 lastDay: '[Ieri alle] LT', 27265 lastWeek: function () { 27266 switch (this.day()) { 27267 case 0: 27268 return '[la scorsa] dddd [alle] LT'; 27269 default: 27270 return '[lo scorso] dddd [alle] LT'; 27271 } 27272 }, 27273 sameElse: 'L', 27274 }, 27275 relativeTime: { 27276 future: function (s) { 27277 return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s; 27278 }, 27279 past: '%s fa', 27280 s: 'alcuni secondi', 27281 ss: '%d secondi', 27282 m: 'un minuto', 27283 mm: '%d minuti', 27284 h: "un'ora", 27285 hh: '%d ore', 27286 d: 'un giorno', 27287 dd: '%d giorni', 27288 M: 'un mese', 27289 MM: '%d mesi', 27290 y: 'un anno', 27291 yy: '%d anni', 27292 }, 27293 dayOfMonthOrdinalParse: /\d{1,2}º/, 27294 ordinal: '%dº', 27295 week: { 27296 dow: 1, // Monday is the first day of the week. 27297 doy: 4, // The week that contains Jan 4th is the first week of the year. 27298 }, 27299 }); 27300 27301 return itCh; 27302 27303}))); 27304 27305 27306/***/ }), 27307/* 68 */ 27308/***/ (function(module, exports, __webpack_require__) { 27309 27310//! moment.js locale configuration
vendor: 4,468 bytes, lines 27311-27452
27311//! locale : Japanese [ja] 27312//! author : LI Long : https://github.com/baryon 27313 27314;(function (global, factory) { 27315 true ? factory(__webpack_require__(0)) : 27316 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 27317 factory(global.moment) 27318}(this, (function (moment) { 'use strict'; 27319 27320 //! moment.js locale configuration 27321 27322 var ja = moment.defineLocale('ja', { 27323 eras: [ 27324 { 27325 since: '2019-05-01', 27326 offset: 1, 27327 name: '令å', 27328 narrow: 'ã¿', 27329 abbr: 'R', 27330 }, 27331 { 27332 since: '1989-01-08', 27333 until: '2019-04-30', 27334 offset: 1, 27335 name: 'å¹³æ', 27336 narrow: 'ã»', 27337 abbr: 'H', 27338 }, 27339 { 27340 since: '1926-12-25', 27341 until: '1989-01-07', 27342 offset: 1, 27343 name: 'æå', 27344 narrow: 'ã¼', 27345 abbr: 'S', 27346 }, 27347 { 27348 since: '1912-07-30', 27349 until: '1926-12-24', 27350 offset: 1, 27351 name: '大æ£', 27352 narrow: 'ã½', 27353 abbr: 'T', 27354 }, 27355 { 27356 since: '1873-01-01', 27357 until: '1912-07-29', 27358 offset: 6, 27359 name: 'ææ²»', 27360 narrow: 'ã¾', 27361 abbr: 'M', 27362 }, 27363 { 27364 since: '0001-01-01', 27365 until: '1873-12-31', 27366 offset: 1, 27367 name: '西æ¦', 27368 narrow: 'AD', 27369 abbr: 'AD', 27370 }, 27371 { 27372 since: '0000-12-31', 27373 until: -Infinity, 27374 offset: 1, 27375 name: 'ç´å å', 27376 narrow: 'BC', 27377 abbr: 'BC', 27378 }, 27379 ], 27380 eraYearOrdinalRegex: /(å |\d+)å¹´/, 27381 eraYearOrdinalParse: function (input, match) { 27382 return match[1] === 'å ' ? 1 : parseInt(match[1] || input, 10); 27383 }, 27384 months: '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split('_'), 27385 monthsShort: '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split( 27386 '_' 27387 ), 27388 weekdays: 'æ¥ææ¥_æææ¥_ç«ææ¥_æ°´ææ¥_æ¨ææ¥_éææ¥_åææ¥'.split('_'), 27389 weekdaysShort: 'æ¥_æ_ç«_æ°´_æ¨_é_å'.split('_'), 27390 weekdaysMin: 'æ¥_æ_ç«_æ°´_æ¨_é_å'.split('_'), 27391 longDateFormat: { 27392 LT: 'HH:mm', 27393 LTS: 'HH:mm:ss', 27394 L: 'YYYY/MM/DD', 27395 LL: 'YYYYå¹´MæDæ¥', 27396 LLL: 'YYYYå¹´MæDæ¥ HH:mm', 27397 LLLL: 'YYYYå¹´MæDæ¥ dddd HH:mm', 27398 l: 'YYYY/MM/DD', 27399 ll: 'YYYYå¹´MæDæ¥', 27400 lll: 'YYYYå¹´MæDæ¥ HH:mm', 27401 llll: 'YYYYå¹´MæDæ¥(ddd) HH:mm', 27402 }, 27403 meridiemParse: /åå|åå¾/i, 27404 isPM: function (input) { 27405 return input === 'åå¾'; 27406 }, 27407 meridiem: function (hour, minute, isLower) { 27408 if (hour < 12) { 27409 return 'åå'; 27410 } else { 27411 return 'åå¾'; 27412 } 27413 }, 27414 calendar: { 27415 sameDay: '[仿¥] LT', 27416 nextDay: '[ææ¥] LT', 27417 nextWeek: function (now) { 27418 if (now.week() !== this.week()) { 27419 return '[æ¥é±]dddd LT'; 27420 } else { 27421 return 'dddd LT'; 27422 } 27423 }, 27424 lastDay: '[æ¨æ¥] LT', 27425 lastWeek: function (now) { 27426 if (this.week() !== now.week()) { 27427 return '[å é±]dddd LT'; 27428 } else { 27429 return 'dddd LT'; 27430 } 27431 }, 27432 sameElse: 'L', 27433 }, 27434 dayOfMonthOrdinalParse: /\d{1,2}æ¥/, 27435 ordinal: function (number, period) { 27436 switch (period) { 27437 case 'y': 27438 return number === 1 ? 'å å¹´' : number + 'å¹´'; 27439 case 'd': 27440 case 'D': 27441 case 'DDD': 27442 return number + 'æ¥'; 27443 default: 27444 return number; 27445 } 27446 }, 27447 relativeTime: { 27448 future: '%så¾', 27449 past: '%så', 27450 s: 'æ°ç§', 27451 ss: '%dç§', 27452 m: '1å',
27453 mm: '%då', 27454 h: '1æé', 27455 hh: '%dæé', 27456 d: '1æ¥', 27457 dd: '%dæ¥', 27458 M: '1ã¶æ', 27459 MM: '%dã¶æ', 27460 y: '1å¹´', 27461 yy: '%då¹´', 27462 }, 27463 }); 27464 27465 return ja; 27466 27467}))); 27468 27469 27470/***/ }), 27471/* 69 */ 27472/***/ (function(module, exports, __webpack_require__) { 27473 27474//! moment.js locale configuration 27475//! locale : Javanese [jv] 27476//! author : Rony Lantip : https://github.com/lantip 27477//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa 27478 27479;(function (global, factory) { 27480 true ? factory(__webpack_require__(0)) : 27481 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 27482 factory(global.moment) 27483}(this, (function (moment) { 'use strict'; 27484 27485 //! moment.js locale configuration 27486 27487 var jv = moment.defineLocale('jv', { 27488 months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split( 27489 '_' 27490 ), 27491 monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), 27492 weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), 27493 weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), 27494 weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), 27495 longDateFormat: { 27496 LT: 'HH.mm', 27497 LTS: 'HH.mm.ss', 27498 L: 'DD/MM/YYYY', 27499 LL: 'D MMMM YYYY', 27500 LLL: 'D MMMM YYYY [pukul] HH.mm', 27501 LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', 27502 }, 27503 meridiemParse: /enjing|siyang|sonten|ndalu/, 27504 meridiemHour: function (hour, meridiem) { 27505 if (hour === 12) { 27506 hour = 0; 27507 } 27508 if (meridiem === 'enjing') { 27509 return hour; 27510 } else if (meridiem === 'siyang') { 27511 return hour >= 11 ? hour : hour + 12; 27512 } else if (meridiem === 'sonten' || meridiem === 'ndalu') { 27513 return hour + 12; 27514 } 27515 }, 27516 meridiem: function (hours, minutes, isLower) { 27517 if (hours < 11) { 27518 return 'enjing'; 27519 } else if (hours < 15) { 27520 return 'siyang'; 27521 } else if (hours < 19) { 27522 return 'sonten'; 27523 } else { 27524 return 'ndalu'; 27525 } 27526 }, 27527 calendar: { 27528 sameDay: '[Dinten puniko pukul] LT', 27529 nextDay: '[Mbenjang pukul] LT', 27530 nextWeek: 'dddd [pukul] LT', 27531 lastDay: '[Kala wingi pukul] LT', 27532 lastWeek: 'dddd [kepengker pukul] LT', 27533 sameElse: 'L', 27534 }, 27535 relativeTime: { 27536 future: 'wonten ing %s', 27537 past: '%s ingkang kepengker', 27538 s: 'sawetawis detik', 27539 ss: '%d detik', 27540 m: 'setunggal menit', 27541 mm: '%d menit', 27542 h: 'setunggal jam', 27543 hh: '%d jam', 27544 d: 'sedinten', 27545 dd: '%d dinten', 27546 M: 'sewulan', 27547 MM: '%d wulan', 27548 y: 'setaun', 27549 yy: '%d taun', 27550 }, 27551 week: { 27552 dow: 1, // Monday is the first day of the week. 27553 doy: 7, // The week that contains Jan 7th is the first week of the year. 27554 }, 27555 }); 27556 27557 return jv; 27558 27559}))); 27560 27561 27562/***/ }), 27563/* 70 */ 27564/***/ (function(module, exports, __webpack_require__) { 27565 27566//! moment.js locale configuration 27567//! locale : Georgian [ka] 27568//! author : Irakli Janiashvili : https://github.com/IrakliJani 27569 27570;(function (global, factory) { 27571 true ? factory(__webpack_require__(0)) : 27572 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 27573 factory(global.moment) 27574}(this, (function (moment) { 'use strict'; 27575 27576 //! moment.js locale configuration 27577 27578 var ka = moment.defineLocale('ka', { 27579 months: 'áááááá á_ááááá áááá_ááá á¢á_ááá ááá_áááá¡á_ááááá¡á_ááááá¡á_ááááá¡á¢á_á¡áá¥á¢ááááá á_áá¥á¢ááááá á_ááááááá á_áááááááá á'.split( 27580 '_' 27581 ), 27582 monthsShort: 'ááá_ááá_ááá _ááá _ááá_ááá_ááá_ááá_á¡áá¥_áá¥á¢_ááá_ááá'.split('_'), 27583 weekdays: { 27584 standalone: 27585 'áááá á_áá á¨ááááá_á¡ááá¨ááááá_ááá®á¨ááááá_á®á£áá¨ááááá_ááá áá¡áááá_á¨ááááá'.
27585split( 27586 '_' 27587 ), 27588 format: 'áááá áá¡_áá á¨ááááá¡_á¡ááá¨ááááá¡_ááá®á¨ááááá¡_á®á£áá¨ááááá¡_ááá áá¡áááá¡_á¨ááááá¡'.split( 27589 '_' 27590 ), 27591 isFormat: /(á¬ááá|á¨ááááá)/, 27592 }, 27593 weekdaysShort: 'ááá_áá á¨_á¡áá_ááá®_á®á£á_ááá _á¨áá'.split('_'), 27594 weekdaysMin: 'áá_áá _á¡á_áá_á®á£_áá_á¨á'.split('_'), 27595 longDateFormat: { 27596 LT: 'HH:mm', 27597 LTS: 'HH:mm:ss', 27598 L: 'DD/MM/YYYY', 27599 LL: 'D MMMM YYYY', 27600 LLL: 'D MMMM YYYY HH:mm', 27601 LLLL: 'dddd, D MMMM YYYY HH:mm', 27602 }, 27603 calendar: { 27604 sameDay: '[áá¦áá¡] LT[-áá]', 27605 nextDay: '[á®ááá] LT[-áá]', 27606 lastDay: '[áá£á¨áá] LT[-áá]', 27607 nextWeek: '[á¨ááááá] dddd LT[-áá]', 27608 lastWeek: '[á¬ááá] dddd LT-áá', 27609 sameElse: 'L', 27610 }, 27611 relativeTime: { 27612 future: function (s) { 27613 return s.replace( 27614 /(á¬áá|á¬á£á|á¡ááá|á¬áá|áá¦|áá)(á|á)/, 27615 function ($0, $1, $2) { 27616 return $2 === 'á' ? $1 + 'á¨á' : $1 + $2 + 'á¨á'; 27617 } 27618 ); 27619 }, 27620 past: function (s) { 27621 if (/(á¬ááá|á¬á£áá|á¡áááá|áá¦á|ááá)/.test(s)) { 27622 return s.replace(/(á|á)$/, 'áá¡ á¬áá'); 27623 } 27624 if (/á¬ááá/.test(s)) { 27625 return s.replace(/á¬ááá$/, 'á¬ááá¡ á¬áá'); 27626 } 27627 return s; 27628 }, 27629 s: 'á áááááááá á¬ááá', 27630 ss: '%d á¬ááá', 27631 m: 'á¬á£áá', 27632 mm: '%d á¬á£áá', 27633 h: 'á¡áááá', 27634 hh: '%d á¡áááá', 27635 d: 'áá¦á', 27636 dd: '%d áá¦á', 27637 M: 'ááá', 27638 MM: '%d ááá', 27639 y: 'á¬ááá', 27640 yy: '%d á¬ááá', 27641 }, 27642 dayOfMonthOrdinalParse: /0|1-áá|áá-\d{1,2}|\d{1,2}-á/, 27643 ordinal: function (number) { 27644 if (number === 0) { 27645 return number; 27646 } 27647 if (number === 1) { 27648 return number + '-áá'; 27649 } 27650 if ( 27651 number < 20 || 27652 (number <= 100 && number % 20 === 0) || 27653 number % 100 === 0 27654 ) { 27655 return 'áá-' + number; 27656 } 27657 return number + '-á'; 27658 }, 27659 week: { 27660 dow: 1, 27661 doy: 7, 27662 }, 27663 }); 27664 27665 return ka; 27666 27667}))); 27668 27669 27670/***/ }), 27671/* 71 */ 27672/***/ (function(module, exports, __webpack_require__) { 27673 27674//! moment.js locale configuration 27675//! locale : Kazakh [kk] 27676//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan 27677 27678;(function (global, factory) { 27679 true ? factory(__webpack_require__(0)) : 27680 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 27681 factory(global.moment) 27682}(this, (function (moment) { 'use strict'; 27683 27684 //! moment.js locale configuration 27685 27686 var suffixes = { 27687 0: '-ÑÑ', 27688 1: '-ÑÑ', 27689 2: '-ÑÑ', 27690 3: '-ÑÑ', 27691 4: '-ÑÑ', 27692 5: '-ÑÑ', 27693 6: '-ÑÑ', 27694 7: '-ÑÑ', 27695 8: '-ÑÑ', 27696 9: '-ÑÑ', 27697 10: '-ÑÑ', 27698 20: '-ÑÑ', 27699 30: '-ÑÑ', 27700 40: '-ÑÑ', 27701 50: '-ÑÑ', 27702 60: '-ÑÑ', 27703 70: '-ÑÑ', 27704 80: '-ÑÑ', 27705 90: '-ÑÑ', 27706 100: '-ÑÑ', 27707 }; 27708 27709 var kk = moment.defineLocale('kk', { 27710 months: 'ÒаңÑаÑ_аÒпан_наÑÑÑз_ÑÓÑÑÑ_мамÑÑ_маÑÑÑм_ÑÑлде_ÑамÑз_ÒÑÑкүйек_Òазан_ÒаÑаÑа_желÑоÒÑан'.split( 27711 '_' 27712 ), 27713 monthsShort: 'Òаң_аÒп_наÑ_ÑÓÑ_мам_маÑ_ÑÑл_Ñам_ÒÑÑ_Òаз_ÒаÑ_жел'.split('_'), 27714 weekdays: 'жекÑенбÑ_дүйÑенбÑ_ÑейÑенбÑ_ÑÓÑÑенбÑ_бейÑенбÑ_жұма_ÑенбÑ'.split( 27715 '_' 27716 ), 27717 weekdaysShort: 'жек_дүй_Ñей_ÑÓÑ_бей_жұм_Ñен'.split('_'), 27718 weekdaysMin: 'жк_дй_Ñй_ÑÑ_бй_жм_Ñн'.split('_'), 27719 longDateFormat: { 27720 LT: 'HH:mm', 27721 LTS: 'HH:mm:ss', 27722 L: 'DD.MM.YYYY', 27723 LL: 'D MMMM YYYY', 27724 LLL: 'D MMMM YYYY HH:mm', 27725 LLLL: 'dddd, D MMMM YYYY HH:mm', 27726 }, 27727 calendar: { 27728 sameDay: '[ÐүгÑн ÑаÒаÑ] LT', 27729 nextDay: '[ÐÑÑең ÑаÒаÑ] LT', 27730 nextWeek: 'dddd [ÑаÒаÑ] LT', 27731 lastDay: '[ÐеÑе ÑаÒаÑ] LT', 27732 lastWeek: '[Ó¨Ñкен апÑанÑÒ£] dddd [ÑаÒаÑ] LT', 27733 sameElse: 'L', 27734 }, 27735 relativeTime: { 27736 future: '%s ÑÑÑнде', 27737 past: '%s бұÑÑн', 27738 s: 'бÑÑнеÑе ÑекÑнд', 27739 ss: '%d ÑекÑнд', 27740 m: 'бÑÑ Ð¼Ð¸Ð½ÑÑ', 27741 mm: '%d минÑÑ', 27742 h: 'бÑÑ ÑаÒаÑ', 27743 hh: '%d ÑаÒаÑ', 27744 d: 'бÑÑ ÐºÒ¯Ð½', 27745 dd: '%d күн', 27746 M: 'бÑÑ Ð°Ð¹', 27747 MM: '%d ай', 27748 y: 'бÑÑ Ð¶Ñл', 27749 yy: '%d жÑл', 27750 }, 27751 dayOfMonthOrdinalParse: /\d{1,2}-(ÑÑ|ÑÑ)/, 27752 ordinal: function (number) { 27753 var a = number % 10, 27754 b = number >= 100 ? 100 : null; 27755 return number + (suffixes[number] || suffixes[a] || suffixes[b]); 27756 }, 27757 week: { 27758 dow: 1, // Monday is the first day of the week. 27759 doy: 7, // The week that contains Jan 7th is the first week of the year. 27760 }, 27761 }); 27762 27763 return kk; 27764 27765}))); 27766 27767 27768/***/ }), 27769/* 72 */ 27770/***/ (function(module, exports, __webpack_require__) { 27771 27772//! moment.js locale configuration 27773//! locale : Cambodian [km] 27774//! author : Kruy Vanna : https://github.com/kruyvanna 27775 27776;(function (global, factory) { 27777 true ? factory(__webpack_require__(0)) : 27778 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 27779 factory(global.moment) 27780}(this, (function (moment) { 'use strict'; 27781 27782 //! moment.js locale configuration 27783 27784 var symbolMap = { 27785 1: 'á¡', 27786 2: 'á¢', 27787 3: 'á£', 27788 4: 'á¤', 27789 5: 'á¥', 27790 6: 'á¦', 27791 7: 'á§', 27792 8: 'á¨', 27793 9: 'á©', 27794 0: 'á ', 27795 }, 27796 numberMap = { 27797 'á¡': '1', 27798 'á¢': '2', 27799 'á£': '3', 27800 'á¤': '4', 27801 'á¥': '5', 27802 'á¦': '6', 27803 'á§': '7', 27804 'á¨': '8', 27805 'á©': '9', 27806 'á ': '0', 27807 }; 27808 27809 var km = moment.defineLocale('km', { 27810 months: 'áááá¶_áá»áááá_áá¸áá¶_áááá¶_á§ááá¶_áá·áá»áá¶_áááááá¶_áá¸á á¶_ááááá¶_áá»áá¶_áá·á ááá·áá¶_áááá¼'.split( 27811 '_' 27812 ), 27813 monthsShort: 27814 'áááá¶_áá»áááá_áá¸áá¶_áááá¶_á§ááá¶_áá·áá»áá¶_áááááá¶_áá¸á á¶_ááááá¶_áá»áá¶_áá·á ááá·áá¶_áááá¼'.split( 27815 '_' 27816 ), 27817 weekdays: 'á¢á¶áá·ááá_á áááá_á¢áááá¶á_áá»á_áááá ááááá·á_áá»ááá_áá áá'.split('_'), 27818 weekdaysShort: 'á¢á¶_á _á¢_á_ááá_áá»_á'.split('_'), 27819 weekdaysMin: 'á¢á¶_á _á¢_á_ááá_áá»_á'.split('_'), 27820 weekdaysParseExact: true, 27821 longDateFormat: { 27822 LT: 'HH:mm', 27823 LTS: 'HH:mm:ss', 27824 L: 'DD/MM/YYYY', 27825 LL: 'D MMMM YYYY', 27826 LLL: 'D MMMM YYYY HH:mm', 27827 LLLL: 'dddd, D MMMM YYYY HH:mm', 27828 }, 27829 meridiemParse: /áááá¹á|áááá¶á /, 27830 isPM: function (input) { 27831 return input === 'áááá¶á '; 27832 }, 27833 meridiem: function (hour, minute, isLower) { 27834 if (hour < 12) {
vendor: 20,799 bytes, lines 27835-28465
27835 return 'áááá¹á'; 27836 } else { 27837 return 'áááá¶á '; 27838 } 27839 }, 27840 calendar: { 27841 sameDay: '[ááááááá áááá] LT', 27842 nextDay: '[ááá¢áá áááá] LT', 27843 nextWeek: 'dddd [áááá] LT', 27844 lastDay: '[áááá·ááá·á áááá] LT', 27845 lastWeek: 'dddd [ááááá¶á ááá»á] [áááá] LT', 27846 sameElse: 'L', 27847 }, 27848 relativeTime: { 27849 future: '%sááá', 27850 past: '%sáá»á', 27851 s: 'ááá»áááá¶ááá·áá¶áá¸', 27852 ss: '%d áá·áá¶áá¸', 27853 m: 'áá½ááá¶áá¸', 27854 mm: '%d áá¶áá¸', 27855 h: 'áá½ááááá', 27856 hh: '%d áááá', 27857 d: 'áá½ááááá', 27858 dd: '%d áááá', 27859 M: 'áá½ááá', 27860 MM: '%d áá', 27861 y: 'áá½ááááá¶á', 27862 yy: '%d áááá¶á', 27863 }, 27864 dayOfMonthOrdinalParse: /áá¸\d{1,2}/, 27865 ordinal: 'áá¸%d', 27866 preparse: function (string) { 27867 return string.replace(/[á¡á¢á£á¤á¥á¦á§á¨á©á ]/g, function (match) { 27868 return numberMap[match]; 27869 }); 27870 }, 27871 postformat: function (string) { 27872 return string.replace(/\d/g, function (match) { 27873 return symbolMap[match]; 27874 }); 27875 }, 27876 week: { 27877 dow: 1, // Monday is the first day of the week. 27878 doy: 4, // The week that contains Jan 4th is the first week of the year. 27879 }, 27880 }); 27881 27882 return km; 27883 27884}))); 27885 27886 27887/***/ }), 27888/* 73 */ 27889/***/ (function(module, exports, __webpack_require__) { 27890 27891//! moment.js locale configuration 27892//! locale : Kannada [kn] 27893//! author : Rajeev Naik : https://github.com/rajeevnaikte 27894 27895;(function (global, factory) { 27896 true ? factory(__webpack_require__(0)) : 27897 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 27898 factory(global.moment) 27899}(this, (function (moment) { 'use strict'; 27900 27901 //! moment.js locale configuration 27902 27903 var symbolMap = { 27904 1: 'à³§', 27905 2: '೨', 27906 3: '೩', 27907 4: '೪', 27908 5: '೫', 27909 6: '೬', 27910 7: 'à³', 27911 8: 'à³®', 27912 9: '೯', 27913 0: '೦', 27914 }, 27915 numberMap = { 27916 'à³§': '1', 27917 '೨': '2', 27918 '೩': '3', 27919 '೪': '4', 27920 '೫': '5', 27921 '೬': '6', 27922 'à³': '7', 27923 'à³®': '8', 27924 '೯': '9', 27925 '೦': '0', 27926 }; 27927 27928 var kn = moment.defineLocale('kn', { 27929 months: 'à²à²¨à²µà²°à²¿_ಫà³à²¬à³à²°à²µà²°à²¿_ಮಾರà³à²à³_à²à²ªà³à²°à²¿à²²à³_ಮà³à³_à²à³à²¨à³_à²à³à²²à³à³_à²à²à²¸à³à²à³_ಸà³à²ªà³à²à³à²à²¬à²°à³_ಠà²à³à²à³à³à³à²¬à²°à³_ನವà³à²à²¬à²°à³_ಡಿಸà³à²à²¬à²°à³'.split( 27930 '_' 27931 ), 27932 monthsShort: 27933 'à²à²¨_ಫà³à²¬à³à²°_ಮಾರà³à²à³_à²à²ªà³à²°à²¿à²²à³_ಮà³à³_à²à³à²¨à³_à²à³à²²à³à³_à²à²à²¸à³à²à³_ಸà³à²ªà³à²à³à²_ಠà²à³à²à³à³à³_ನವà³à²_ಡಿಸà³à²'.split( 27934 '_' 27935 ), 27936 monthsParseExact: true, 27937 weekdays: 'à²à²¾à²¨à³à²µà²¾à²°_ಸà³à³à³à²®à²µà²¾à²°_ಮà²à²à²³à²µà²¾à²°_ಬà³à²§à²µà²¾à²°_à²à³à²°à³à²µà²¾à²°_ಶà³à²à³à²°à²µà²¾à²°_ಶನಿವಾರ'.split( 27938 '_' 27939 ), 27940 weekdaysShort: 'à²à²¾à²¨à³_ಸà³à³à³à²®_ಮà²à²à²³_ಬà³à²§_à²à³à²°à³_ಶà³à²à³à²°_ಶನಿ'.split('_'), 27941 weekdaysMin: 'à²à²¾_ಸà³à³à³_ಮà²_ಬà³_à²à³_ಶà³_ಶ'.split('_'), 27942 longDateFormat: { 27943 LT: 'A h:mm', 27944 LTS: 'A h:mm:ss', 27945 L: 'DD/MM/YYYY', 27946 LL: 'D MMMM YYYY', 27947 LLL: 'D MMMM YYYY, A h:mm', 27948 LLLL: 'dddd, D MMMM YYYY, A h:mm', 27949 }, 27950 calendar: { 27951 sameDay: '[à²à²à²¦à³] LT', 27952 nextDay: '[ನಾಳà³] LT', 27953 nextWeek: 'dddd, LT', 27954 lastDay: '[ನಿನà³à²¨à³] LT', 27955 lastWeek: '[à²à³à³à²¨à³à²¯] dddd, LT', 27956 sameElse: 'L', 27957 }, 27958 relativeTime: { 27959 future: '%s ನà²à²¤à²°', 27960 past: '%s ಹಿà²à²¦à³', 27961 s: 'à²à³à²²à²µà³ à²à³à²·à²£à²à²³à³', 27962 ss: '%d ಸà³à²à³à²à²¡à³à²à²³à³', 27963 m: 'à²à²à²¦à³ ನಿಮಿಷ', 27964 mm: '%d ನಿಮಿಷ', 27965 h: 'à²à²à²¦à³ à²à²à²à³', 27966 hh: '%d à²à²à²à³', 27967 d: 'à²à²à²¦à³ ದಿನ', 27968 dd: '%d ದಿನ', 27969 M: 'à²à²à²¦à³ ತಿà²à²à²³à³', 27970 MM: '%d ತಿà²à²à²³à³', 27971 y: 'à²à²à²¦à³ ವರà³à²·', 27972 yy: '%d ವರà³à²·', 27973 }, 27974 preparse: function (string) { 27975 return string.replace(/[೧೨೩೪೫೬à³à³®à³¯à³¦]/g, function (match) { 27976 return numberMap[match]; 27977 }); 27978 }, 27979 postformat: function (string) { 27980 return string.replace(/\d/g, function (match) { 27981 return symbolMap[match]; 27982 }); 27983 }, 27984 meridiemParse: /ರಾತà³à²°à²¿|ಬà³à²³à²¿à²à³à²à³|ಮಧà³à²¯à²¾à²¹à³à²¨|ಸà²à²à³/, 27985 meridiemHour: function (hour, meridiem) { 27986 if (hour === 12) { 27987 hour = 0; 27988 } 27989 if (meridiem === 'ರಾತà³à²°à²¿') { 27990 return hour < 4 ? hour : hour + 12; 27991 } else if (meridiem === 'ಬà³à²³à²¿à²à³à²à³') { 27992 return hour; 27993 } else if (meridiem === 'ಮಧà³à²¯à²¾à²¹à³à²¨') { 27994 return hour >= 10 ? hour : hour + 12; 27995 } else if (meridiem === 'ಸà²à²à³') { 27996 return hour + 12; 27997 } 27998 }, 27999 meridiem: function (hour, minute, isLower) { 28000 if (hour < 4) { 28001 return 'ರಾತà³à²°à²¿'; 28002 } else if (hour < 10) { 28003 return 'ಬà³à²³à²¿à²à³à²à³'; 28004 } else if (hour < 17) { 28005 return 'ಮಧà³à²¯à²¾à²¹à³à²¨'; 28006 } else if (hour < 20) { 28007 return 'ಸà²à²à³'; 28008 } else { 28009 return 'ರಾತà³à²°à²¿'; 28010 } 28011 }, 28012 dayOfMonthOrdinalParse: /\d{1,2}(ನà³à³)/, 28013 ordinal: function (number) { 28014 return number + 'ನà³à³'; 28015 }, 28016 week: { 28017 dow: 0, // Sunday is the first day of the week. 28018 doy: 6, // The week that contains Jan 6th is the first week of the year. 28019 }, 28020 }); 28021 28022 return kn; 28023 28024}))); 28025 28026 28027/***/ }), 28028/* 74 */ 28029/***/ (function(module, exports, __webpack_require__) { 28030 28031//! moment.js locale configuration 28032//! locale : Korean [ko] 28033//! author : Kyungwook, Park : https://github.com/kyungw00k 28034//! author : Jeeeyul Lee <[email protected]> 28035 28036;(function (global, factory) { 28037 true ? factory(__webpack_require__(0)) : 28038 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 28039 factory(global.moment) 28040}(this, (function (moment) { 'use strict'; 28041 28042 //! moment.js locale configuration 28043 28044 var ko = moment.defineLocale('ko', { 28045 months: '1ì_2ì_3ì_4ì_5ì_6ì_7ì_8ì_9ì_10ì_11ì_12ì'.split('_'), 28046 monthsShort: '1ì_2ì_3ì_4ì_5ì_6ì_7ì_8ì_9ì_10ì_11ì_12ì'.split( 28047 '_' 28048 ), 28049 weekdays: 'ì¼ìì¼_ììì¼_íìì¼_ììì¼_목ìì¼_ê¸ìì¼_í ìì¼'.split('_'), 28050 weekdaysShort: 'ì¼_ì_í_ì_목_ê¸_í '.split('_'), 28051 weekdaysMin: 'ì¼_ì_í_ì_목_ê¸_í '.split('_'), 28052 longDateFormat: { 28053 LT: 'A h:mm', 28054 LTS: 'A h:mm:ss', 28055 L: 'YYYY.MM.DD.', 28056 LL: 'YYYYë MMMM Dì¼', 28057 LLL: 'YYYYë MMMM Dì¼ A h:mm', 28058 LLLL: 'YYYYë MMMM Dì¼ dddd A h:mm', 28059 l: 'YYYY.MM.DD.', 28060 ll: 'YYYYë MMMM Dì¼', 28061 lll: 'YYYYë MMMM Dì¼ A h:mm', 28062 llll: 'YYYYë MMMM Dì¼ dddd A h:mm', 28063 }, 28064 calendar: { 28065 sameDay: 'ì¤ë LT', 28066 nextDay: 'ë´ì¼ LT', 28067 nextWeek: 'dddd LT', 28068 lastDay: 'ì´ì LT', 28069 lastWeek: 'ì§ë주 dddd LT', 28070 sameElse: 'L', 28071 }, 28072 relativeTime: { 28073 future: '%s í', 28074 past: '%s ì ', 28075 s: 'ëª ì´', 28076 ss: '%dì´', 28077 m: '1ë¶', 28078 mm: '%dë¶', 28079 h: 'í ìê°', 28080 hh: '%dìê°', 28081 d: 'í루', 28082 dd: '%dì¼', 28083 M: 'í ë¬', 28084 MM: '%dë¬', 28085 y: 'ì¼ ë ', 28086 yy: '%dë ', 28087 }, 28088 dayOfMonthOrdinalParse: /\d{1,2}(ì¼|ì|주)/, 28089 ordinal: function (number, period) { 28090 switch (period) { 28091 case 'd': 28092 case 'D': 28093 case 'DDD': 28094 return number + 'ì¼'; 28095 case 'M': 28096 return number + 'ì'; 28097 case 'w': 28098 case 'W': 28099 return number + '주'; 28100 default: 28101 return number; 28102 } 28103 }, 28104 meridiemParse: /ì¤ì |ì¤í/, 28105 isPM: function (token) { 28106 return token === 'ì¤í'; 28107 }, 28108 meridiem: function (hour, minute, isUpper) { 28109 return hour < 12 ? 'ì¤ì ' : 'ì¤í'; 28110 }, 28111 }); 28112 28113 return ko; 28114 28115}))); 28116 28117 28118/***/ }), 28119/* 75 */ 28120/***/ (function(module, exports, __webpack_require__) { 28121 28122//! moment.js locale configuration 28123//! locale : Kurdish [ku] 28124//! author : Shahram Mebashar : https://github.com/ShahramMebashar 28125 28126;(function (global, factory) { 28127 true ? factory(__webpack_require__(0)) : 28128 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 28129 factory(global.moment) 28130}(this, (function (moment) { 'use strict'; 28131 28132 //! moment.js locale configuration 28133 28134 var symbolMap = { 28135 1: 'Ù¡', 28136 2: 'Ù¢', 28137 3: 'Ù£', 28138 4: 'Ù¤', 28139 5: 'Ù¥', 28140 6: 'Ù¦', 28141 7: 'Ù§', 28142 8: 'Ù¨', 28143 9: 'Ù©', 28144 0: 'Ù ', 28145 }, 28146 numberMap = { 28147 'Ù¡': '1', 28148 'Ù¢': '2', 28149 'Ù£': '3', 28150 'Ù¤': '4', 28151 'Ù¥': '5', 28152 'Ù¦': '6', 28153 'Ù§': '7', 28154 'Ù¨': '8', 28155 'Ù©': '9', 28156 'Ù ': '0', 28157 }, 28158 months = [ 28159 'کاÙÙÙÛ Ø¯ÙÙÛÙ ', 28160 'Ø´ÙØ¨Ø§Øª', 28161 'ئازار', 28162 'ÙÛØ³Ø§Ù', 28163 'Ø¦Ø§ÛØ§Ø±', 28164 'ØÙزÛÛØ±Ø§Ù', 28165 'تÛÙ Ù ÙØ²', 28166 'ئاب', 28167 'ئÛÛÙÙÙÙ', 28168 'تشرÛÙÛ ÛÛÙÛÙ ', 28169 'تشرÛÙÛ Ø¯ÙÙÛÙ ', 28170 'ÙØ§ÙÙÙÛ ÛÛÚ©ÛÙ ', 28171 ]; 28172 28173 var ku = moment.defineLocale('ku', { 28174 months: months, 28175 monthsShort: months, 28176 weekdays: 28177 'ÛÙâÙØ´ÙâÙ Ù Ùâ_دÙÙØ´ÙâÙ Ù Ùâ_Ø³ÛØ´ÙâÙ Ù Ùâ_ÚÙØ§Ø±Ø´ÙâÙ Ù Ùâ_Ù¾ÛÙØ¬Ø´ÙâÙ Ù Ùâ_ÙÙâÛÙÛ_Ø´ÙâÙ Ù Ùâ'.split( 28178 '_' 28179 ), 28180 weekdaysShort: 28181 'ÛÙâÙØ´ÙâÙ _دÙÙØ´ÙâÙ _Ø³ÛØ´ÙâÙ _ÚÙØ§Ø±Ø´ÙâÙ _Ù¾ÛÙØ¬Ø´ÙâÙ _ÙÙâÛÙÛ_Ø´ÙâÙ Ù Ùâ'.split('_'), 28182 weekdaysMin: 'Û_د_س_Ú_Ù¾_Ù_Ø´'.split('_'), 28183 weekdaysParseExact: true, 28184 longDateFormat: { 28185 LT: 'HH:mm', 28186 LTS: 'HH:mm:ss', 28187 L: 'DD/MM/YYYY', 28188 LL: 'D MMMM YYYY', 28189 LLL: 'D MMMM YYYY HH:mm', 28190 LLLL: 'dddd, D MMMM YYYY HH:mm', 28191 }, 28192 meridiemParse: /ئÛÙØ§Ø±Ùâ|بÙâÛØ§ÙÛ/, 28193 isPM: function (input) { 28194 return /ئÛÙØ§Ø±Ùâ/.test(input); 28195 }, 28196 meridiem: function (hour, minute, isLower) { 28197 if (hour < 12) { 28198 return 'بÙâÛØ§ÙÛ'; 28199 } else { 28200 return 'ئÛÙØ§Ø±Ùâ'; 28201 } 28202 }, 28203 calendar: { 28204 sameDay: '[ئÙâÙ Ø±Û ÙØ§ØªÚÙ ÛØ±] LT', 28205 nextDay: '[بÙâÛØ§ÙÛ ÙØ§ØªÚÙ ÛØ±] LT', 28206 nextWeek: 'dddd [ÙØ§ØªÚÙ ÛØ±] LT', 28207 lastDay: '[دÙÛÙÛ ÙØ§ØªÚÙ ÛØ±] LT', 28208 lastWeek: 'dddd [ÙØ§ØªÚÙ ÛØ±] LT', 28209 sameElse: 'L', 28210 }, 28211 relativeTime: { 28212 future: 'ÙÙâ %s', 28213 past: '%s', 28214 s: 'ÚÙâÙØ¯ ÚØ±ÙÙâÛÙâÙ', 28215 ss: 'ÚØ±ÙÙâ %d', 28216 m: 'ÛÙâÙ Ø®ÙÙÙâÙ', 28217 mm: '%d Ø®ÙÙÙâÙ', 28218 h: 'ÛÙâÙ ÙØ§ØªÚÙ ÛØ±', 28219 hh: '%d ÙØ§ØªÚÙ ÛØ±', 28220 d: 'ÛÙâÙ ÚÛÚ', 28221 dd: '%d ÚÛÚ', 28222 M: 'ÛÙâ٠٠اÙÚ¯', 28223 MM: '%d ٠اÙÚ¯', 28224 y: 'ÛÙâ٠ساڵ', 28225 yy: '%d ساڵ', 28226 }, 28227 preparse: function (string) { 28228 return string 28229 .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { 28230 return numberMap[match]; 28231 }) 28232 .replace(/Ø/g, ','); 28233 }, 28234 postformat: function (string) { 28235 return string 28236 .replace(/\d/g, function (match) { 28237 return symbolMap[match]; 28238 }) 28239 .replace(/,/g, 'Ø'); 28240 }, 28241 week: { 28242 dow: 6, // Saturday is the first day of the week. 28243 doy: 12, // The week that contains Jan 12th is the first week of the year. 28244 }, 28245 }); 28246 28247 return ku; 28248 28249}))); 28250 28251 28252/***/ }), 28253/* 76 */ 28254/***/ (function(module, exports, __webpack_require__) { 28255 28256//! moment.js locale configuration 28257//! locale : Kyrgyz [ky] 28258//! author : Chyngyz Arystan uulu : https://github.com/chyngyz 28259 28260;(function (global, factory) { 28261 true ? factory(__webpack_require__(0)) : 28262 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 28263 factory(global.moment) 28264}(this, (function (moment) { 'use strict'; 28265 28266 //! moment.js locale configuration 28267 28268 var suffixes = { 28269 0: '-ÑÒ¯', 28270 1: '-Ñи', 28271 2: '-Ñи', 28272 3: '-ÑÒ¯', 28273 4: '-ÑÒ¯', 28274 5: '-Ñи', 28275 6: '-ÑÑ', 28276 7: '-Ñи', 28277 8: '-Ñи', 28278 9: '-ÑÑ', 28279 10: '-ÑÑ', 28280 20: '-ÑÑ', 28281 30: '-ÑÑ', 28282 40: '-ÑÑ', 28283 50: '-ÑÒ¯', 28284 60: '-ÑÑ', 28285 70: '-Ñи', 28286 80: '-Ñи', 28287 90: '-ÑÑ', 28288 100: '-ÑÒ¯', 28289 }; 28290 28291 var ky = moment.defineLocale('ky', { 28292 months: 'ÑнваÑÑ_ÑевÑалÑ_маÑÑ_апÑелÑ_май_иÑнÑ_иÑлÑ_авгÑÑÑ_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ'.split( 28293 '_' 28294 ), 28295 monthsShort: 'Ñнв_Ñев_маÑÑ_апÑ_май_иÑнÑ_иÑлÑ_авг_Ñен_окÑ_ноÑ_дек'.split( 28296 '_' 28297 ), 28298 weekdays: 'ÐекÑемби_ÐүйÑөмбү_ШейÑемби_ШаÑÑемби_ÐейÑемби_ÐÑма_ÐÑемби'.split( 28299 '_' 28300 ), 28301 weekdaysShort: 'Ðек_Ðүй_Шей_ШаÑ_Ðей_ÐÑм_ÐÑе'.split('_'), 28302 weekdaysMin: 'Ðк_Ðй_Шй_ШÑ_Ðй_Ðм_ÐÑ'.split('_'), 28303 longDateFormat: { 28304 LT: 'HH:mm', 28305 LTS: 'HH:mm:ss', 28306 L: 'DD.MM.YYYY', 28307 LL: 'D MMMM YYYY', 28308 LLL: 'D MMMM YYYY HH:mm', 28309 LLLL: 'dddd, D MMMM YYYY HH:mm', 28310 }, 28311 calendar: { 28312 sameDay: '[Ðүгүн ÑааÑ] LT', 28313 nextDay: '[ÐÑÑең ÑааÑ] LT', 28314 nextWeek: 'dddd [ÑааÑ] LT', 28315 lastDay: '[ÐеÑÑÑ ÑааÑ] LT', 28316 lastWeek: '[Ó¨Ñкөн апÑанÑн] dddd [күнү] [ÑааÑ] LT', 28317 sameElse: 'L', 28318 }, 28319 relativeTime: { 28320 future: '%s иÑинде', 28321 past: '%s мÑÑÑн', 28322 s: 'биÑнеÑе ÑекÑнд', 28323 ss: '%d ÑекÑнд', 28324 m: 'Ð±Ð¸Ñ Ð¼Ò¯Ð½Ó©Ñ', 28325 mm: '%d мүнөÑ', 28326 h: 'Ð±Ð¸Ñ ÑааÑ', 28327 hh: '%d ÑааÑ', 28328 d: 'Ð±Ð¸Ñ ÐºÒ¯Ð½', 28329 dd: '%d күн', 28330 M: 'Ð±Ð¸Ñ Ð°Ð¹', 28331 MM: '%d ай', 28332 y: 'Ð±Ð¸Ñ Ð¶Ñл', 28333 yy: '%d жÑл', 28334 }, 28335 dayOfMonthOrdinalParse: /\d{1,2}-(Ñи|ÑÑ|ÑÒ¯|ÑÑ)/, 28336 ordinal: function (number) { 28337 var a = number % 10, 28338 b = number >= 100 ? 100 : null; 28339 return number + (suffixes[number] || suffixes[a] || suffixes[b]); 28340 }, 28341 week: { 28342 dow: 1, // Monday is the first day of the week. 28343 doy: 7, // The week that contains Jan 7th is the first week of the year. 28344 }, 28345 }); 28346 28347 return ky; 28348 28349}))); 28350 28351 28352/***/ }), 28353/* 77 */ 28354/***/ (function(module, exports, __webpack_require__) { 28355 28356//! moment.js locale configuration 28357//! locale : Luxembourgish [lb] 28358//! author : mweimerskirch : https://github.com/mweimerskirch 28359//! author : David Raison : https://github.com/kwisatz 28360 28361;(function (global, factory) { 28362 true ? factory(__webpack_require__(0)) : 28363 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 28364 factory(global.moment) 28365}(this, (function (moment) { 'use strict'; 28366 28367 //! moment.js locale configuration 28368 28369 function processRelativeTime(number, withoutSuffix, key, isFuture) { 28370 var format = { 28371 m: ['eng Minutt', 'enger Minutt'], 28372 h: ['eng Stonn', 'enger Stonn'], 28373 d: ['een Dag', 'engem Dag'], 28374 M: ['ee Mount', 'engem Mount'], 28375 y: ['ee Joer', 'engem Joer'], 28376 }; 28377 return withoutSuffix ? format[key][0] : format[key][1]; 28378 } 28379 function processFutureTime(string) { 28380 var number = string.substr(0, string.indexOf(' ')); 28381 if (eifelerRegelAppliesToNumber(number)) { 28382 return 'a ' + string; 28383 } 28384 return 'an ' + string; 28385 } 28386 function processPastTime(string) { 28387 var number = string.substr(0, string.indexOf(' ')); 28388 if (eifelerRegelAppliesToNumber(number)) { 28389 return 'viru ' + string; 28390 } 28391 return 'virun ' + string; 28392 } 28393 /** 28394 * Returns true if the word before the given number loses the '-n' ending. 28395 * e.g. 'an 10 Deeg' but 'a 5 Deeg' 28396 * 28397 * @param number {integer} 28398 * @returns {boolean} 28399 */ 28400 function eifelerRegelAppliesToNumber(number) { 28401 number = parseInt(number, 10); 28402 if (isNaN(number)) { 28403 return false; 28404 } 28405 if (number < 0) { 28406 // Negative Number --> always true 28407 return true; 28408 } else if (number < 10) { 28409 // Only 1 digit 28410 if (4 <= number && number <= 7) { 28411 return true; 28412 } 28413 return false; 28414 } else if (number < 100) { 28415 // 2 digits 28416 var lastDigit = number % 10, 28417 firstDigit = number / 10; 28418 if (lastDigit === 0) { 28419 return eifelerRegelAppliesToNumber(firstDigit); 28420 } 28421 return eifelerRegelAppliesToNumber(lastDigit); 28422 } else if (number < 10000) { 28423 // 3 or 4 digits --> recursively check first digit 28424 while (number >= 10) { 28425 number = number / 10; 28426 } 28427 return eifelerRegelAppliesToNumber(number); 28428 } else { 28429 // Anything larger than 4 digits: recursively check first n-3 digits 28430 number = number / 1000; 28431 return eifelerRegelAppliesToNumber(number); 28432 } 28433 } 28434 28435 var lb = moment.defineLocale('lb', { 28436 months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split( 28437 '_' 28438 ), 28439 monthsShort: 28440 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split( 28441 '_' 28442 ), 28443 monthsParseExact: true, 28444 weekdays: 28445 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split( 28446 '_' 28447 ), 28448 weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), 28449 weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), 28450 weekdaysParseExact: true, 28451 longDateFormat: { 28452 LT: 'H:mm [Auer]', 28453 LTS: 'H:mm:ss [Auer]', 28454 L: 'DD.MM.YYYY', 28455 LL: 'D. MMMM YYYY', 28456 LLL: 'D. MMMM YYYY H:mm [Auer]', 28457 LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]', 28458 }, 28459 calendar: { 28460 sameDay: '[Haut um] LT', 28461 sameElse: 'L', 28462 nextDay: '[Muer um] LT', 28463 nextWeek: 'dddd [um] LT', 28464 lastDay: '[Gëschter um] LT', 28465 lastWeek: function () {
28466 // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule 28467 switch (this.day()) { 28468 case 2: 28469 case 4: 28470 return '[Leschten] dddd [um] LT'; 28471 default: 28472 return '[Leschte] dddd [um] LT'; 28473 } 28474 }, 28475 }, 28476 relativeTime: { 28477 future: processFutureTime, 28478 past: processPastTime, 28479 s: 'e puer Sekonnen', 28480 ss: '%d Sekonnen', 28481 m: processRelativeTime, 28482 mm: '%d Minutten', 28483 h: processRelativeTime, 28484 hh: '%d Stonnen', 28485 d: processRelativeTime, 28486 dd: '%d Deeg', 28487 M: processRelativeTime, 28488 MM: '%d Méint', 28489 y: processRelativeTime, 28490 yy: '%d Joer', 28491 }, 28492 dayOfMonthOrdinalParse: /\d{1,2}\./, 28493 ordinal: '%d.', 28494 week: { 28495 dow: 1, // Monday is the first day of the week. 28496 doy: 4, // The week that contains Jan 4th is the first week of the year. 28497 }, 28498 }); 28499 28500 return lb; 28501 28502}))); 28503 28504 28505/***/ }), 28506/* 78 */ 28507/***/ (function(module, exports, __webpack_require__) { 28508 28509//! moment.js locale configuration 28510//! locale : Lao [lo] 28511//! author : Ryan Hart : https://github.com/ryanhart2 28512 28513;(function (global, factory) { 28514 true ? factory(__webpack_require__(0)) : 28515 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 28516 factory(global.moment) 28517}(this, (function (moment) { 'use strict'; 28518 28519 //! moment.js locale configuration 28520 28521 var lo = moment.defineLocale('lo', { 28522 months: 'ມັàºàºàºàº_àºàº¸àº¡àºàº²_ມີàºàº²_à»àº¡àºªàº²_àºàº¶àºàºªàº°àºàº²_ມິàºàº¸àºàº²_àºà»àº¥àº°àºàº»àº_ສິàºàº«àº²_àºàº±àºàºàº²_àºàº¸àº¥àº²_àºàº°àºàº´àº_àºàº±àºàº§àº²'.split( 28523 '_' 28524 ), 28525 monthsShort: 28526 'ມັàºàºàºàº_àºàº¸àº¡àºàº²_ມີàºàº²_à»àº¡àºªàº²_àºàº¶àºàºªàº°àºàº²_ມິàºàº¸àºàº²_àºà»àº¥àº°àºàº»àº_ສິàºàº«àº²_àºàº±àºàºàº²_àºàº¸àº¥àº²_àºàº°àºàº´àº_àºàº±àºàº§àº²'.split( 28527 '_' 28528 ), 28529 weekdays: 'àºàº²àºàº´àº_àºàº±àº_àºàº±àºàºàº²àº_àºàº¸àº_àºàº°àº«àº±àº_ສຸàº_à»àºªàº»àº²'.split('_'), 28530 weekdaysShort: 'àºàº´àº_àºàº±àº_àºàº±àºàºàº²àº_àºàº¸àº_àºàº°àº«àº±àº_ສຸàº_à»àºªàº»àº²'.split('_'), 28531 weekdaysMin: 'àº_àº_àºàº_àº_àºàº«_ສàº_ສ'.split('_'), 28532 weekdaysParseExact: true, 28533 longDateFormat: { 28534 LT: 'HH:mm', 28535 LTS: 'HH:mm:ss', 28536 L: 'DD/MM/YYYY', 28537 LL: 'D MMMM YYYY', 28538 LLL: 'D MMMM YYYY HH:mm', 28539 LLLL: 'ວັàºdddd D MMMM YYYY HH:mm', 28540 }, 28541 meridiemParse: /àºàºàºà»àºàº»à»àº²|àºàºàºà»àº¥àº/, 28542 isPM: function (input) { 28543 return input === 'àºàºàºà»àº¥àº'; 28544 }, 28545 meridiem: function (hour, minute, isLower) { 28546 if (hour < 12) { 28547 return 'àºàºàºà»àºàº»à»àº²'; 28548 } else { 28549 return 'àºàºàºà»àº¥àº'; 28550 } 28551 }, 28552 calendar: { 28553 sameDay: '[ມືà»àºàºµà»à»àº§àº¥àº²] LT', 28554 nextDay: '[ມືà»àºàº·à»àºà»àº§àº¥àº²] LT', 28555 nextWeek: '[ວັàº]dddd[à»à»àº²à»àº§àº¥àº²] LT', 28556 lastDay: '[ມືà»àº§àº²àºàºàºµà»à»àº§àº¥àº²] LT', 28557 lastWeek: '[ວັàº]dddd[à»àº¥à»àº§àºàºµà»à»àº§àº¥àº²] LT', 28558 sameElse: 'L', 28559 }, 28560 relativeTime: { 28561 future: 'àºàºµàº %s', 28562 past: '%sàºà»àº²àºàº¡àº²', 28563 s: 'àºà»à»à»àºàº»à»àº²à»àºàº§àº´àºàº²àºàºµ', 28564 ss: '%d ວິàºàº²àºàºµ', 28565 m: '1 àºàº²àºàºµ', 28566 mm: '%d àºàº²àºàºµ', 28567 h: '1 àºàº»à»àº§à»àº¡àº', 28568 hh: '%d àºàº»à»àº§à»àº¡àº', 28569 d: '1 ມືà»', 28570 dd: '%d ມືà»', 28571 M: '1 à»àºàº·àºàº', 28572 MM: '%d à»àºàº·àºàº', 28573 y: '1 àºàºµ', 28574 yy: '%d àºàºµ', 28575 }, 28576 dayOfMonthOrdinalParse: /(àºàºµà»)\d{1,2}/, 28577 ordinal: function (number) { 28578 return 'àºàºµà»' + number; 28579 }, 28580 }); 28581 28582 return lo; 28583 28584}))); 28585 28586 28587/***/ }), 28588/* 79 */ 28589/***/ (function(module, exports, __webpack_require__) { 28590 28591//! moment.js locale configuration 28592//! locale : Lithuanian [lt] 28593//! author : Mindaugas MozÅ«ras : https://github.com/mmozuras 28594 28595;(function (global, factory) { 28596 true ? factory(__webpack_require__(0)) : 28597 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 28598 factory(global.moment) 28599}(this, (function (moment) { 'use strict'; 28600 28601 //! moment.js locale configuration 28602 28603 var units = { 28604 ss: 'sekundÄ_sekundžių_sekundes', 28605 m: 'minutÄ_minutÄs_minutÄ', 28606 mm: 'minutÄs_minuÄių_minutes', 28607 h: 'valanda_valandos_valandÄ ', 28608 hh: 'valandos_valandų_valandas',
vendor: 4,251 bytes, lines 28609-28733
28609 d: 'diena_dienos_dienÄ ', 28610 dd: 'dienos_dienų_dienas', 28611 M: 'mÄnuo_mÄnesio_mÄnesį', 28612 MM: 'mÄnesiai_mÄnesių_mÄnesius', 28613 y: 'metai_metų_metus', 28614 yy: 'metai_metų_metus', 28615 }; 28616 function translateSeconds(number, withoutSuffix, key, isFuture) { 28617 if (withoutSuffix) { 28618 return 'kelios sekundÄs'; 28619 } else { 28620 return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; 28621 } 28622 } 28623 function translateSingular(number, withoutSuffix, key, isFuture) { 28624 return withoutSuffix 28625 ? forms(key)[0] 28626 : isFuture 28627 ? forms(key)[1] 28628 : forms(key)[2]; 28629 } 28630 function special(number) { 28631 return number % 10 === 0 || (number > 10 && number < 20); 28632 } 28633 function forms(key) { 28634 return units[key].split('_'); 28635 } 28636 function translate(number, withoutSuffix, key, isFuture) { 28637 var result = number + ' '; 28638 if (number === 1) { 28639 return ( 28640 result + translateSingular(number, withoutSuffix, key[0], isFuture) 28641 ); 28642 } else if (withoutSuffix) { 28643 return result + (special(number) ? forms(key)[1] : forms(key)[0]); 28644 } else { 28645 if (isFuture) { 28646 return result + forms(key)[1]; 28647 } else { 28648 return result + (special(number) ? forms(key)[1] : forms(key)[2]); 28649 } 28650 } 28651 } 28652 var lt = moment.defineLocale('lt', { 28653 months: { 28654 format: 'sausio_vasario_kovo_balandžio_gegužÄs_birželio_liepos_rugpjÅ«Äio_rugsÄjo_spalio_lapkriÄio_gruodžio'.split( 28655 '_' 28656 ), 28657 standalone: 28658 'sausis_vasaris_kovas_balandis_gegužÄ_birželis_liepa_rugpjÅ«tis_rugsÄjis_spalis_lapkritis_gruodis'.split( 28659 '_' 28660 ), 28661 isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/, 28662 }, 28663 monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), 28664 weekdays: { 28665 format: 'sekmadienį_pirmadienį_antradienį_treÄiadienį_ketvirtadienį_penktadienį_Å¡eÅ¡tadienį'.split( 28666 '_' 28667 ), 28668 standalone: 28669 'sekmadienis_pirmadienis_antradienis_treÄiadienis_ketvirtadienis_penktadienis_Å¡eÅ¡tadienis'.split( 28670 '_' 28671 ), 28672 isFormat: /dddd HH:mm/, 28673 }, 28674 weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Å eÅ¡'.split('_'), 28675 weekdaysMin: 'S_P_A_T_K_Pn_Å '.split('_'), 28676 weekdaysParseExact: true, 28677 longDateFormat: { 28678 LT: 'HH:mm', 28679 LTS: 'HH:mm:ss', 28680 L: 'YYYY-MM-DD', 28681 LL: 'YYYY [m.] MMMM D [d.]', 28682 LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', 28683 LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', 28684 l: 'YYYY-MM-DD', 28685 ll: 'YYYY [m.] MMMM D [d.]', 28686 lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', 28687 llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]', 28688 }, 28689 calendar: { 28690 sameDay: '[Å iandien] LT', 28691 nextDay: '[Rytoj] LT', 28692 nextWeek: 'dddd LT', 28693 lastDay: '[Vakar] LT', 28694 lastWeek: '[PraÄjusį] dddd LT', 28695 sameElse: 'L', 28696 }, 28697 relativeTime: { 28698 future: 'po %s', 28699 past: 'prieÅ¡ %s', 28700 s: translateSeconds, 28701 ss: translate, 28702 m: translateSingular, 28703 mm: translate, 28704 h: translateSingular, 28705 hh: translate, 28706 d: translateSingular, 28707 dd: translate, 28708 M: translateSingular, 28709 MM: translate, 28710 y: translateSingular, 28711 yy: translate, 28712 }, 28713 dayOfMonthOrdinalParse: /\d{1,2}-oji/, 28714 ordinal: function (number) { 28715 return number + '-oji'; 28716 }, 28717 week: { 28718 dow: 1, // Monday is the first day of the week. 28719 doy: 4, // The week that contains Jan 4th is the first week of the year. 28720 }, 28721 }); 28722 28723 return lt; 28724 28725}))); 28726 28727 28728/***/ }), 28729/* 80 */ 28730/***/ (function(module, exports, __webpack_require__) { 28731 28732//! moment.js locale configuration 28733//! locale : Latvian [lv]
28734//! author : Kristaps Karlsons : https://github.com/skakri 28735//! author : JÄnis Elmeris : https://github.com/JanisE 28736 28737;(function (global, factory) { 28738 true ? factory(__webpack_require__(0)) : 28739 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 28740 factory(global.moment) 28741}(this, (function (moment) { 'use strict'; 28742 28743 //! moment.js locale configuration 28744 28745 var units = { 28746 ss: 'sekundes_sekundÄm_sekunde_sekundes'.split('_'), 28747 m: 'minÅ«tes_minÅ«tÄm_minÅ«te_minÅ«tes'.split('_'), 28748 mm: 'minÅ«tes_minÅ«tÄm_minÅ«te_minÅ«tes'.split('_'), 28749 h: 'stundas_stundÄm_stunda_stundas'.split('_'), 28750 hh: 'stundas_stundÄm_stunda_stundas'.split('_'), 28751 d: 'dienas_dienÄm_diena_dienas'.split('_'), 28752 dd: 'dienas_dienÄm_diena_dienas'.split('_'), 28753 M: 'mÄneÅ¡a_mÄneÅ¡iem_mÄnesis_mÄneÅ¡i'.split('_'), 28754 MM: 'mÄneÅ¡a_mÄneÅ¡iem_mÄnesis_mÄneÅ¡i'.split('_'), 28755 y: 'gada_gadiem_gads_gadi'.split('_'), 28756 yy: 'gada_gadiem_gads_gadi'.split('_'), 28757 }; 28758 /** 28759 * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. 28760 */ 28761 function format(forms, number, withoutSuffix) { 28762 if (withoutSuffix) { 28763 // E.g. "21 minÅ«te", "3 minÅ«tes". 28764 return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3]; 28765 } else { 28766 // E.g. "21 minÅ«tes" as in "pÄc 21 minÅ«tes". 28767 // E.g. "3 minÅ«tÄm" as in "pÄc 3 minÅ«tÄm". 28768 return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1]; 28769 } 28770 } 28771 function relativeTimeWithPlural(number, withoutSuffix, key) { 28772 return number + ' ' + format(units[key], number, withoutSuffix); 28773 } 28774 function relativeTimeWithSingular(number, withoutSuffix, key) { 28775 return format(units[key], number, withoutSuffix); 28776 } 28777 function relativeSeconds(number, withoutSuffix) { 28778 return withoutSuffix ? 'dažas sekundes' : 'dažÄm sekundÄm'; 28779 } 28780 28781 var lv = moment.defineLocale('lv', { 28782 months: 'janvÄris_februÄris_marts_aprÄ«lis_maijs_jÅ«nijs_jÅ«lijs_augusts_septembris_oktobris_novembris_decembris'.split( 28783 '_' 28784 ), 28785 monthsShort: 'jan_feb_mar_apr_mai_jÅ«n_jÅ«l_aug_sep_okt_nov_dec'.split('_'), 28786 weekdays: 28787 'svÄtdiena_pirmdiena_otrdiena_treÅ¡diena_ceturtdiena_piektdiena_sestdiena'.split( 28788 '_' 28789 ), 28790 weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'), 28791 weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'), 28792 weekdaysParseExact: true, 28793 longDateFormat: { 28794 LT: 'HH:mm', 28795 LTS: 'HH:mm:ss', 28796 L: 'DD.MM.YYYY.', 28797 LL: 'YYYY. [gada] D. MMMM', 28798 LLL: 'YYYY. [gada] D. MMMM, HH:mm', 28799 LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm', 28800 }, 28801 calendar: { 28802 sameDay: '[Å odien pulksten] LT', 28803 nextDay: '[RÄ«t pulksten] LT', 28804 nextWeek: 'dddd [pulksten] LT', 28805 lastDay: '[Vakar pulksten] LT', 28806 lastWeek: '[PagÄjuÅ¡Ä] dddd [pulksten] LT', 28807 sameElse: 'L', 28808 }, 28809 relativeTime: { 28810 future: 'pÄc %s', 28811 past: 'pirms %s', 28812 s: relativeSeconds, 28813 ss: relativeTimeWithPlural, 28814 m: relativeTimeWithSingular, 28815 mm: relativeTimeWithPlural, 28816 h: relativeTimeWithSingular, 28817 hh: relativeTimeWithPlural, 28818 d: relativeTimeWithSingular, 28819 dd: relativeTimeWithPlural, 28820 M: relativeTimeWithSingular, 28821 MM: relativeTimeWithPlural, 28822 y: relativeTimeWithSingular, 28823 yy: relativeTimeWithPlural, 28824 }, 28825 dayOfMonthOrdinalParse: /\d{1,2}\./, 28826 ordinal: '%d.', 28827 week: { 28828 dow: 1, // Monday is the first day of the week. 28829 doy: 4, // The week that contains Jan 4th is the first week of the year. 28830 }, 28831 }); 28832 28833 return lv; 28834 28835}))); 28836 28837 28838/***/ }), 28839/* 81 */ 28840/***/ (function(module, exports, __webpack_require__) { 28841 28842//! moment.js locale configuration 28843//! locale : Montenegrin [me] 28844//! author : Miodrag NikaÄ <[email protected]> : https://github.com/miodragnikac 28845 28846;(function (global, factory) { 28847 true ? factory(__webpack_require__(0)) : 28848 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 28849 factory(global.moment) 28850}(this, (function (moment) { 'use strict'; 28851 28852 //! moment.js locale configuration 28853 28854 var translator = { 28855 words: { 28856 //Different grammatical cases 28857 ss: ['sekund', 'sekunda', 'sekundi'], 28858 m: ['jedan minut', 'jednog minuta'], 28859 mm: ['minut', 'minuta', 'minuta'], 28860 h: ['jedan sat', 'jednog sata'], 28861 hh: ['sat', 'sata', 'sati'], 28862 dd: ['dan', 'dana', 'dana'], 28863 MM: ['mjesec', 'mjeseca', 'mjeseci'], 28864 yy: ['godina', 'godine', 'godina'], 28865 }, 28866 correctGrammaticalCase: function (number, wordKey) { 28867 return number === 1 28868 ? wordKey[0] 28869 : number >= 2 && number <= 4 28870 ? wordKey[1] 28871 : wordKey[2]; 28872 }, 28873 translate: function (number, withoutSuffix, key) { 28874 var wordKey = translator.words[key]; 28875 if (key.length === 1) { 28876 return withoutSuffix ? wordKey[0] : wordKey[1]; 28877 } else { 28878 return ( 28879 number + 28880 ' ' + 28881 translator.correctGrammaticalCase(number, wordKey) 28882 ); 28883 } 28884 }, 28885 }; 28886 28887 var me = moment.defineLocale('me', { 28888 months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split( 28889 '_' 28890 ), 28891 monthsShort: 28892 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), 28893 monthsParseExact: true, 28894 weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_Äetvrtak_petak_subota'.split( 28895 '_' 28896 ), 28897 weekdaysShort: 'ned._pon._uto._sri._Äet._pet._sub.'.split('_'), 28898 weekdaysMin: 'ne_po_ut_sr_Äe_pe_su'.split('_'), 28899 weekdaysParseExact: true, 28900 longDateFormat: { 28901 LT: 'H:mm', 28902 LTS: 'H:mm:ss', 28903 L: 'DD.MM.YYYY', 28904 LL: 'D. MMMM YYYY', 28905 LLL: 'D. MMMM YYYY H:mm', 28906 LLLL: 'dddd, D. MMMM YYYY H:mm', 28907 }, 28908 calendar: { 28909 sameDay: '[danas u] LT', 28910 nextDay: '[sjutra u] LT', 28911 28912 nextWeek: function () { 28913 switch (this.day()) { 28914 case 0: 28915 return '[u] [nedjelju] [u] LT'; 28916 case 3: 28917 return '[u] [srijedu] [u] LT'; 28918 case 6: 28919 return '[u] [subotu] [u] LT'; 28920 case 1: 28921 case 2: 28922 case 4: 28923 case 5: 28924 return '[u] dddd [u] LT'; 28925 } 28926 }, 28927 lastDay: '[juÄe u] LT', 28928 lastWeek: function () { 28929 var lastWeekDays = [ 28930 '[proÅ¡le] [nedjelje] [u] LT', 28931 '[proÅ¡log] [ponedjeljka] [u] LT', 28932 '[proÅ¡log] [utorka] [u] LT', 28933 '[proÅ¡le] [srijede] [u] LT', 28934 '[proÅ¡log] [Äetvrtka] [u] LT', 28935 '[proÅ¡log] [petka] [u] LT', 28936 '[proÅ¡le] [subote] [u] LT', 28937 ]; 28938 return lastWeekDays[this.day()]; 28939 }, 28940 sameElse: 'L', 28941 }, 28942 relativeTime: { 28943 future: 'za %s', 28944 past: 'prije %s', 28945 s: 'nekoliko sekundi', 28946 ss: translator.translate, 28947 m: translator.translate, 28948 mm: translator.translate, 28949 h: translator.translate, 28950 hh: translator.translate, 28951 d: 'dan', 28952 dd: translator.translate, 28953 M: 'mjesec', 28954 MM: translator.translate, 28955 y: 'godinu', 28956 yy: translator.translate, 28957 }, 28958 dayOfMonthOrdinalParse: /\d{1,2}\./, 28959 ordinal: '%d.', 28960 week: { 28961 dow: 1, // Monday is the first day of the week. 28962 doy: 7, // The week that contains Jan 7th is the first week of the year. 28963 }, 28964 }); 28965 28966 return me; 28967 28968}))); 28969 28970 28971/***/ }), 28972/* 82 */ 28973/***/ (function(module, exports, __webpack_require__) { 28974 28975//! moment.js locale configuration 28976//! locale : Maori [mi] 28977//! author : John Corrigan <[email protected]> : https://github.com/johnideal 28978 28979;(function (global, factory) { 28980 true ? factory(__webpack_require__(0)) : 28981 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 28982 factory(global.moment) 28983}(this, (function (moment) { 'use strict'; 28984 28985 //! moment.js locale configuration 28986 28987 var mi = moment.defineLocale('mi', { 28988 months: 'Kohi-tÄte_Hui-tanguru_PoutÅ«-te-rangi_Paenga-whÄwhÄ_Haratua_Pipiri_HÅngoingoi_Here-turi-kÅkÄ_Mahuru_Whiringa-Ä-nuku_Whiringa-Ä-rangi_Hakihea'.split( 28989 '_' 28990 ), 28991 monthsShort: 28992 'Kohi_Hui_Pou_Pae_Hara_Pipi_HÅngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split( 28993 '_' 28994 ), 28995 monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, 28996 monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, 28997 monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, 28998 monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i, 28999 weekdays: 'RÄtapu_Mane_TÅ«rei_Wenerei_TÄite_Paraire_HÄtarei'.split('_'), 29000 weekdaysShort: 'Ta_Ma_TÅ«_We_TÄi_Pa_HÄ'.split('_'), 29001 weekdaysMin: 'Ta_Ma_TÅ«_We_TÄi_Pa_HÄ'.split('_'), 29002 longDateFormat: { 29003 LT: 'HH:mm', 29004 LTS: 'HH:mm:ss', 29005 L: 'DD/MM/YYYY', 29006 LL: 'D MMMM YYYY', 29007 LLL: 'D MMMM YYYY [i] HH:mm', 29008 LLLL: 'dddd, D MMMM YYYY [i] HH:mm', 29009 }, 29010 calendar: { 29011 sameDay: '[i teie mahana, i] LT', 29012 nextDay: '[apopo i] LT', 29013 nextWeek: 'dddd [i] LT', 29014 lastDay: '[inanahi i] LT', 29015 lastWeek: 'dddd [whakamutunga i] LT', 29016 sameElse: 'L', 29017 }, 29018 relativeTime: { 29019 future: 'i roto i %s', 29020 past: '%s i mua', 29021 s: 'te hÄkona ruarua', 29022 ss: '%d hÄkona', 29023 m: 'he meneti', 29024 mm: '%d meneti', 29025 h: 'te haora', 29026 hh: '%d haora', 29027 d: 'he ra', 29028 dd: '%d ra', 29029 M: 'he marama', 29030 MM: '%d marama', 29031 y: 'he tau', 29032 yy: '%d tau', 29033 }, 29034 dayOfMonthOrdinalParse: /\d{1,2}º/, 29035 ordinal: '%dº', 29036 week: { 29037 dow: 1, // Monday is the first day of the week. 29038 doy: 4, // The week that contains Jan 4th is the first week of the year. 29039 }, 29040 }); 29041 29042 return mi; 29043 29044}))); 29045 29046 29047/***/ }), 29048/* 83 */ 29049/***/ (function(module, exports, __webpack_require__) { 29050 29051//! moment.js locale configuration 29052//! locale : Macedonian [mk] 29053//! author : Borislav Mickov : https://github.com/B0k0 29054//! author : Sashko Todorov : https://github.com/bkyceh 29055 29056;(function (global, factory) { 29057 true ? factory(__webpack_require__(0)) : 29058 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 29059 factory(global.moment) 29060}(this, (function (moment) { 'use strict'; 29061 29062 //! moment.js locale configuration 29063 29064 var mk = moment.defineLocale('mk', { 29065 months: 'ÑанÑаÑи_ÑевÑÑаÑи_маÑÑ_апÑил_маÑ_ÑÑни_ÑÑли_авгÑÑÑ_ÑепÑемвÑи_окÑомвÑи_ноемвÑи_декемвÑи'.split( 29066 '_' 29067 ), 29068 monthsShort: 'Ñан_Ñев_маÑ_апÑ_маÑ_ÑÑн_ÑÑл_авг_Ñеп_окÑ_ное_дек'.split('_'), 29069 weekdays: 'недела_понеделник_вÑоÑник_ÑÑеда_ÑеÑвÑÑок_пеÑок_ÑабоÑа'.split( 29070 '_' 29071 ), 29072 weekdaysShort: 'нед_пон_вÑо_ÑÑе_ÑеÑ_пеÑ_Ñаб'.split('_'), 29073 weekdaysMin: 'нe_пo_вÑ_ÑÑ_Ñе_пе_Ña'.split('_'), 29074 longDateFormat: { 29075 LT: 'H:mm', 29076 LTS: 'H:mm:ss', 29077 L: 'D.MM.YYYY', 29078 LL: 'D MMMM YYYY', 29079 LLL: 'D MMMM YYYY H:mm', 29080 LLLL: 'dddd, D MMMM YYYY H:mm', 29081 }, 29082 calendar: { 29083 sameDay: '[ÐÐµÐ½ÐµÑ Ð²Ð¾] LT', 29084 nextDay: '[УÑÑе во] LT', 29085 nextWeek: '[Ðо] dddd [во] LT', 29086 lastDay: '[ÐÑеÑа во] LT', 29087 lastWeek: function () { 29088 switch (this.day()) { 29089 case 0: 29090 case 3: 29091 case 6: 29092 return '[ÐзминаÑаÑа] dddd [во] LT'; 29093 case 1: 29094 case 2: 29095 case 4: 29096 case 5: 29097 return '[ÐзминаÑиоÑ] dddd [во] LT'; 29098 } 29099 }, 29100 sameElse: 'L', 29101 }, 29102 relativeTime: { 29103 future: 'за %s', 29104 past: 'пÑед %s', 29105 s: 'Ð½ÐµÐºÐ¾Ð»ÐºÑ ÑекÑнди', 29106 ss: '%d ÑекÑнди', 29107 m: 'една минÑÑа', 29108 mm: '%d минÑÑи', 29109 h: 'еден ÑаÑ', 29110 hh: '%d ÑаÑа', 29111 d: 'еден ден', 29112 dd: '%d дена', 29113 M: 'еден меÑеÑ', 29114 MM: '%d меÑеÑи', 29115 y: 'една година', 29116 yy: '%d години', 29117 }, 29118 dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|Ñи|ви|Ñи|ми)/, 29119 ordinal: function (number) { 29120 var lastDigit = number % 10, 29121 last2Digits = number % 100; 29122 if (number === 0) { 29123 return number + '-ев'; 29124 } else if (last2Digits === 0) { 29125 return number + '-ен'; 29126 } else if (last2Digits > 10 && last2Digits < 20) { 29127 return number + '-Ñи'; 29128 } else if (lastDigit === 1) { 29129 return number + '-ви'; 29130 } else if (lastDigit === 2) { 29131 return number + '-Ñи'; 29132 } else if (lastDigit === 7 || lastDigit === 8) { 29133 return number + '-ми'; 29134 } else { 29135 return number + '-Ñи'; 29136 } 29137 }, 29138 week: { 29139 dow: 1, // Monday is the first day of the week. 29140 doy: 7, // The week that contains Jan 7th is the first week of the year. 29141 }, 29142 }); 29143 29144 return mk; 29145 29146}))); 29147 29148 29149/***/ }), 29150/* 84 */ 29151/***/ (function(module, exports, __webpack_require__) { 29152 29153//! moment.js locale configuration 29154//! locale : Malayalam [ml] 29155//! author : Floyd Pink : https://github.com/floydpink 29156 29157;(function (global, factory) { 29158 true ? factory(__webpack_require__(0)) : 29159 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 29160 factory(global.moment) 29161}(this, (function (moment) { 'use strict'; 29162 29163 //! moment.js locale configuration 29164 29165 var ml = moment.defineLocale('ml', { 29166 months: 'à´à´¨àµà´µà´°à´¿_à´«àµà´¬àµà´°àµà´µà´°à´¿_മാർà´àµà´à
29166µ_à´à´ªàµà´°à´¿àµ½_à´®àµà´¯àµ_à´àµàµº_à´àµà´²àµ_à´à´à´¸àµà´±àµà´±àµ_à´¸àµà´ªàµà´±àµà´±à´à´¬àµ¼_à´à´àµà´àµà´¬àµ¼_നവà´à´¬àµ¼_à´¡à´¿à´¸à´à´¬àµ¼'.split( 29167 '_' 29168 ), 29169 monthsShort: 29170 'à´à´¨àµ._à´«àµà´¬àµà´°àµ._മാർ._à´à´ªàµà´°à´¿._à´®àµà´¯àµ_à´àµàµº_à´àµà´²àµ._à´à´._à´¸àµà´ªàµà´±àµà´±._à´à´àµà´àµ._നവà´._à´¡à´¿à´¸à´.'.split( 29171 '_' 29172 ), 29173 monthsParseExact: true, 29174 weekdays: 29175 'à´à´¾à´¯à´±à´¾à´´àµà´_തിà´àµà´à´³à´¾à´´àµà´_à´àµà´µàµà´µà´¾à´´àµà´_à´¬àµà´§à´¨à´¾à´´àµà´_à´µàµà´¯à´¾à´´à´¾à´´àµà´_à´µàµà´³àµà´³à´¿à´¯à´¾à´´àµà´_ശനിയാഴàµà´'.split( 29176 '_' 29177 ), 29178 weekdaysShort: 'à´à´¾à´¯àµ¼_തിà´àµà´àµ¾_à´àµà´µàµà´µ_à´¬àµà´§àµ»_à´µàµà´¯à´¾à´´à´_à´µàµà´³àµà´³à´¿_ശനി'.split('_'), 29179 weekdaysMin: 'à´à´¾_തി_à´àµ_à´¬àµ_à´µàµà´¯à´¾_à´µàµ_à´¶'.split('_'), 29180 longDateFormat: { 29181 LT: 'A h:mm -à´¨àµ', 29182 LTS: 'A h:mm:ss -à´¨àµ', 29183 L: 'DD/MM/YYYY', 29184 LL: 'D MMMM YYYY', 29185 LLL: 'D MMMM YYYY, A h:mm -à´¨àµ', 29186 LLLL: 'dddd, D MMMM YYYY, A h:mm -à´¨àµ', 29187 }, 29188 calendar: { 29189 sameDay: '[à´à´¨àµà´¨àµ] LT', 29190 nextDay: '[നാളàµ] LT', 29191 nextWeek: 'dddd, LT', 29192 lastDay: '[à´à´¨àµà´¨à´²àµ] LT', 29193 lastWeek: '[à´à´´à´¿à´àµà´] dddd, LT', 29194 sameElse: 'L', 29195 }, 29196 relativeTime: { 29197 future: '%s à´à´´à´¿à´àµà´àµ', 29198 past: '%s à´®àµàµ»à´ªàµ', 29199 s: 'ഠൽപ നിമിഷà´àµà´àµ¾', 29200 ss: '%d à´¸àµà´àµà´àµ»à´¡àµ', 29201 m: 'à´à´°àµ മിനിറàµà´±àµ', 29202 mm: '%d മിനിറàµà´±àµ', 29203 h: 'à´à´°àµ മണിà´àµà´àµàµ¼', 29204 hh: '%d മണിà´àµà´àµàµ¼', 29205 d: 'à´à´°àµ ദിവസà´', 29206 dd: '%d ദിവസà´', 29207 M: 'à´à´°àµ മാസà´', 29208 MM: '%d മാസà´', 29209 y: 'à´à´°àµ വർഷà´', 29210 yy: '%d വർഷà´', 29211 }, 29212 meridiemParse: /രാതàµà´°à´¿|രാവിലàµ|à´à´àµà´ à´à´´à´¿à´àµà´àµ|à´µàµà´àµà´¨àµà´¨àµà´°à´|രാതàµà´°à´¿/i, 29213 meridiemHour: function (hour, meridiem) { 29214 if (hour === 12) { 29215 hour = 0; 29216 } 29217 if ( 29218 (meridiem === 'രാതàµà´°à´¿' && hour >= 4) || 29219 meridiem === 'à´à´àµà´ à´à´´à´¿à´àµà´àµ' || 29220 meridiem === 'à´µàµà´àµà´¨àµà´¨àµà´°à´' 29221 ) { 29222 return hour + 12; 29223 } else { 29224 return hour; 29225 } 29226 }, 29227 meridiem: function (hour, minute, isLower) { 29228 if (hour < 4) { 29229 return 'രാതàµà´°à´¿'; 29230 } else if (hour < 12) { 29231 return 'രാവിലàµ'; 29232 } else if (hour < 17) { 29233 return 'à´à´àµà´ à´à´´à´¿à´àµà´àµ'; 29234 } else if (hour < 20) { 29235 return 'à´µàµà´àµà´¨àµà´¨àµà´°à´'; 29236 } else { 29237 return 'രാതàµà´°à´¿'; 29238 } 29239 }, 29240 }); 29241 29242 return ml; 29243 29244}))); 29245 29246 29247/***/ }), 29248/* 85 */ 29249/***/ (function(module, exports, __webpack_require__) { 29250 29251//! moment.js locale configuration 29252//! locale : Mongolian [mn] 29253//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7 29254 29255;(function (global, factory) { 29256 true ? factory(__webpack_require__(0)) : 29257 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 29258 factory(global.moment) 29259}(this, (function (moment) { 'use strict'; 29260 29261 //! moment.js locale configuration 29262 29263 function translate(number, withoutSuffix, key, isFuture) { 29264 switch (key) { 29265 case 's': 29266 return withoutSuffix ? 'Ñ ÑÐ´Ñ Ñн ÑекÑнд' : 'Ñ ÑÐ´Ñ Ñн ÑекÑндÑн'; 29267 case 'ss': 29268 return number + (withoutSuffix ? ' ÑекÑнд' : ' ÑекÑндÑн'); 29269 case 'm': 29270 case 'mm': 29271 return number + (withoutSuffix ? ' минÑÑ' : ' минÑÑÑн'); 29272 case 'h': 29273 case 'hh': 29274 return number + (withoutSuffix ? ' Ñаг' : ' Ñагийн'); 29275 case 'd': 29276 case 'dd': 29277 return number + (withoutSuffix ? ' өдөÑ' : ' өдÑийн'); 29278 case 'M': 29279 case 'MM': 29280 return number + (withoutSuffix ? ' ÑаÑ' : ' ÑаÑÑн'); 29281 case 'y': 29282 case 'yy': 29283 return number + (withoutSuffix ? ' жил' : ' жилийн'); 29284 default: 29285 return number; 29286 } 29287 } 29288 29289 var mn = moment.defineLocale('mn', { 29290 months: 'ÐÑгдүгÑÑÑ ÑаÑ_ХоÑÑдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÑÑавдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÓ©ÑөвдүгÑÑÑ ÑаÑ_ТавдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÑÑгадÑÐ³Ð°Ð°Ñ ÑаÑ_ÐолдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐаймдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÑдүгÑÑÑ ÑаÑ_ÐÑавдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÑван нÑгдүгÑÑÑ ÑаÑ_ÐÑван Ñ Ð¾ÑÑдÑÐ³Ð°Ð°Ñ ÑаÑ'.split( 29291 '_' 29292 ), 29293 monthsShort: 29294 '1 ÑаÑ_2 ÑаÑ_3 ÑаÑ_4 ÑаÑ_5 ÑаÑ_6 ÑаÑ_7 ÑаÑ_8 ÑаÑ_9 ÑаÑ_10 ÑаÑ_11 ÑаÑ_12 ÑаÑ'.split( 29295 '_' 29296 ), 29297 monthsParseExact: true, 29298 weekdays: 'ÐÑм_Ðаваа_ÐÑгмаÑ_ÐÑ Ð°Ð³Ð²Ð°_ÐÒ¯ÑÑв_ÐааÑан_ÐÑмба'.split('_'), 29299 weekdaysShort: 'ÐÑм_Ðав_ÐÑг_ÐÑ Ð°_ÐÒ¯Ñ_Ðаа_ÐÑм'.split('_'), 29300 weekdaysMin: 'ÐÑ_Ðа_ÐÑ_ÐÑ _ÐÒ¯_Ðа_ÐÑ'.split('_'), 29301 weekdaysParseExact: true, 29302 longDateFormat: { 29303 LT: 'HH:mm', 29304 LTS: 'HH:mm:ss', 29305 L: 'YYYY-MM-DD', 29306 LL: 'YYYY Ð¾Ð½Ñ MMMMÑн D', 29307 LLL: 'YYYY Ð¾Ð½Ñ MMMMÑн D HH:mm', 29308 LLLL: 'dddd, YYYY Ð¾Ð½Ñ MMMMÑн D HH:mm', 29309 }, 29310 meridiemParse: /Ò®Ó¨|ҮХ/i, 29311 isPM: function (input) { 29312 return input === 'ҮХ'; 29313 }, 29314 meridiem: function (hour, minute, isLower) { 29315 if (hour < 12) { 29316 return 'Ò®Ó¨'; 29317 } else { 29318 return 'ҮХ'; 29319 } 29320 }, 29321 calendar: { 29322 sameDay: '[ӨнөөдөÑ] LT',
29323 nextDay: '[ÐаÑгааÑ] LT', 29324 nextWeek: '[ÐÑÑÑ ] dddd LT', 29325 lastDay: '[Ó¨ÑигдөÑ] LT', 29326 lastWeek: '[ӨнгөÑÑөн] dddd LT', 29327 sameElse: 'L', 29328 }, 29329 relativeTime: { 29330 future: '%s даÑаа', 29331 past: '%s өмнө', 29332 s: translate, 29333 ss: translate, 29334 m: translate, 29335 mm: translate, 29336 h: translate, 29337 hh: translate, 29338 d: translate, 29339 dd: translate, 29340 M: translate, 29341 MM: translate, 29342 y: translate, 29343 yy: translate, 29344 }, 29345 dayOfMonthOrdinalParse: /\d{1,2} өдөÑ/, 29346 ordinal: function (number, period) { 29347 switch (period) { 29348 case 'd': 29349 case 'D': 29350 case 'DDD': 29351 return number + ' өдөÑ'; 29352 default: 29353 return number; 29354 } 29355 }, 29356 }); 29357 29358 return mn; 29359 29360}))); 29361 29362 29363/***/ }), 29364/* 86 */ 29365/***/ (function(module, exports, __webpack_require__) { 29366 29367//! moment.js locale configuration 29368//! locale : Marathi [mr] 29369//! author : Harshad Kale : https://github.com/kalehv 29370//! author : Vivek Athalye : https://github.com/vnathalye 29371 29372;(function (global, factory) { 29373 true ? factory(__webpack_require__(0)) : 29374 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 29375 factory(global.moment) 29376}(this, (function (moment) { 'use strict'; 29377 29378 //! moment.js locale configuration 29379 29380 var symbolMap = { 29381 1: '१', 29382 2: '२', 29383 3: '३', 29384 4: '४', 29385 5: '५', 29386 6: '६', 29387 7: 'à¥', 29388 8: '८', 29389 9: '९', 29390 0: '०', 29391 }, 29392 numberMap = { 29393 '१': '1', 29394 '२': '2', 29395 '३': '3', 29396 '४': '4', 29397 '५': '5', 29398 '६': '6', 29399 'à¥': '7', 29400 '८': '8', 29401 '९': '9', 29402 '०': '0', 29403 }; 29404 29405 function relativeTimeMr(number, withoutSuffix, string, isFuture) { 29406 var output = ''; 29407 if (withoutSuffix) { 29408 switch (string) { 29409 case 's': 29410 output = 'à¤à¤¾à¤¹à¥ सà¥à¤à¤à¤¦'; 29411 break; 29412 case 'ss': 29413 output = '%d सà¥à¤à¤à¤¦'; 29414 break; 29415 case 'm': 29416 output = 'à¤à¤ मिनिà¤'; 29417 break; 29418 case 'mm': 29419 output = '%d मिनिà¤à¥'; 29420 break; 29421 case 'h': 29422 output = 'à¤à¤ तास'; 29423 break; 29424 case 'hh': 29425 output = '%d तास'; 29426 break; 29427 case 'd': 29428 output = 'à¤à¤ दिवस'; 29429 break; 29430 case 'dd': 29431 output = '%d दिवस'; 29432 break; 29433 case 'M': 29434 output = 'à¤à¤ महिना'; 29435 break; 29436 case 'MM': 29437 output = '%d महिनà¥'; 29438 break; 29439 case 'y': 29440 output = 'à¤à¤ वरà¥à¤·'; 29441 break; 29442 case 'yy': 29443 output = '%d वरà¥à¤·à¥'; 29444 break; 29445 } 29446 } else { 29447 switch (string) { 29448 case 's': 29449 output = 'à¤à¤¾à¤¹à¥ सà¥à¤à¤à¤¦à¤¾à¤'; 29450 break; 29451 case 'ss': 29452 output = '%d सà¥à¤à¤à¤¦à¤¾à¤'; 29453 break; 29454 case 'm': 29455 output = 'à¤à¤à¤¾ मिनिà¤à¤¾'; 29456 break; 29457 case 'mm': 29458 output = '%d मिनिà¤à¤¾à¤'; 29459 break; 29460 case 'h': 29461 output = 'à¤à¤à¤¾ तासा'; 29462 break; 29463 case 'hh': 29464 output = '%d तासाà¤'; 29465 break; 29466 case 'd': 29467 output = 'à¤à¤à¤¾ दिवसा'; 29468 break; 29469 case 'dd': 29470 output = '%d दिवसाà¤'; 29471 break; 29472 case 'M': 29473 output = 'à¤à¤à¤¾ महिनà¥à¤¯à¤¾'; 29474 break; 29475 case 'MM': 29476 output = '%d महिनà¥à¤¯à¤¾à¤'; 29477 break; 29478 case 'y': 29479 output = 'à¤à¤à¤¾ वरà¥à¤·à¤¾'; 29480 break; 29481 case 'yy': 29482 output = '%d वरà¥à¤·à¤¾à¤'; 29483 break; 29484 } 29485 } 29486 return output.replace(/%d/i, number); 29487 } 29488 29489 var mr = moment.defineLocale('mr', { 29490 months: 'à¤à¤¾à¤¨à¥à¤µà¤¾à¤°à¥_फà¥à¤¬à¥à¤°à¥à¤µà¤¾à¤°à¥_मारà¥à¤_à¤à¤ªà¥à¤°à¤¿à¤²_मà¥_à¤à¥à¤¨_à¤à¥à¤²à¥_à¤à¤à¤¸à¥à¤_सपà¥à¤à¥à¤à¤¬à¤°_à¤à¤à¥à¤à¥à¤¬à¤°_नà¥à¤µà¥à¤¹à¥à¤à¤¬à¤°_डिसà¥à¤à¤¬à¤°'.split( 29491 '_' 29492 ), 29493 monthsShort: 29494 'à¤à¤¾à¤¨à¥._फà¥à¤¬à¥à¤°à¥._मारà¥à¤._à¤à¤ªà¥à¤°à¤¿._मà¥._à¤à¥à¤¨._à¤à¥à¤²à¥._à¤à¤._सपà¥à¤à¥à¤._à¤à¤à¥à¤à¥._नà¥à¤µà¥à¤¹à¥à¤._डिसà¥à¤.'.split( 29495 '_' 29496 ), 29497 monthsParseExact: true, 29498 weekdays: 'रविवार_सà¥à¤®à¤µà¤¾à¤°_मà¤à¤à¤³à¤µà¤¾à¤°_बà¥à¤§à¤µà¤¾à¤°_à¤à¥à¤°à¥à¤µà¤¾à¤°_शà¥à¤à¥à¤°à¤µà¤¾à¤°_शनिवार'.split('_'), 29499 weekdaysShort: 'रवि_सà¥à¤®_मà¤à¤à¤³_बà¥à¤§_à¤à¥à¤°à¥_शà¥à¤à¥à¤°_शनि'.split('_'), 29500 weekdaysMin: 'र_सà¥_मà¤_बà¥_à¤à¥_शà¥_श'.split('_'), 29501 longDateFormat: { 29502 LT: 'A h:mm वाà¤à¤¤à¤¾', 29503 LTS: 'A h:mm:ss वाà¤à¤¤à¤¾', 29504 L: 'DD/MM/YYYY', 29505 LL: 'D MMMM YYYY', 29506 LLL: 'D MMMM YYYY, A h:mm वाà¤à¤¤à¤¾', 29507 LLLL: 'dddd, D MMMM YYYY, A h:mm वाà¤à¤¤à¤¾', 29508 }, 29509 calendar: { 29510 sameDay: '[à¤à¤] LT', 29511 nextDay: '[à¤à¤¦à¥à¤¯à¤¾] LT', 29512 nextWeek: 'dddd, LT', 29513 lastDay: '[à¤à¤¾à¤²] LT', 29514 lastWeek: '[माà¤à¥à¤²] dddd, LT', 29515 sameElse: 'L', 29516 }, 29517 relativeTime: { 29518 future: '%sमधà¥à¤¯à¥', 29519 past: '%sपà¥à¤°à¥à¤µà¥', 29520 s: relativeTimeMr, 29521 ss: relativeTimeMr, 29522 m: relativeTimeMr, 29523 mm: relativeTimeMr, 29524 h: relativeTimeMr, 29525 hh: relativeTimeMr, 29526 d: relativeTimeMr, 29527 dd: relativeTimeMr, 29528 M: relativeTimeMr, 29529 MM: relativeTimeMr, 29530 y: relativeTimeMr, 29531 yy: relativeTimeMr, 29532 }, 29533 preparse: function (string) { 29534 return string.replace(/[१२३४५६à¥à¥®à¥¯à¥¦]/g, function (match) { 29535 return numberMap[match]; 29536 }); 29537 }, 29538 postformat: function (string) { 29539 return string.replace(/\d/g, function (match) { 29540 return symbolMap[match]; 29541 }); 29542 }, 29543 meridiemParse: /पहाà¤à¥|सà¤à¤¾à¤³à¥|दà¥à¤ªà¤¾à¤°à¥|सायà¤à¤à¤¾à¤³à¥|रातà¥à¤°à¥/, 29544 meridiemHour: function (hour, meridiem) { 29545 if (hour === 12) { 29546 hour = 0; 29547 } 29548 if (meridiem === 'पहाà¤à¥' || meridiem === 'सà¤à¤¾à¤³à¥') { 29549 return hour; 29550 } else if ( 29551 meridiem === 'दà¥à¤ªà¤¾à¤°à¥' || 29552 meridiem === 'सायà¤à¤à¤¾à¤³à¥' ||
29553 meridiem === 'रातà¥à¤°à¥' 29554 ) { 29555 return hour >= 12 ? hour : hour + 12; 29556 } 29557 }, 29558 meridiem: function (hour, minute, isLower) { 29559 if (hour >= 0 && hour < 6) { 29560 return 'पहाà¤à¥'; 29561 } else if (hour < 12) { 29562 return 'सà¤à¤¾à¤³à¥'; 29563 } else if (hour < 17) { 29564 return 'दà¥à¤ªà¤¾à¤°à¥'; 29565 } else if (hour < 20) { 29566 return 'सायà¤à¤à¤¾à¤³à¥'; 29567 } else { 29568 return 'रातà¥à¤°à¥'; 29569 } 29570 }, 29571 week: { 29572 dow: 0, // Sunday is the first day of the week. 29573 doy: 6, // The week that contains Jan 6th is the first week of the year. 29574 }, 29575 }); 29576 29577 return mr; 29578 29579}))); 29580 29581 29582/***/ }), 29583/* 87 */ 29584/***/ (function(module, exports, __webpack_require__) { 29585 29586//! moment.js locale configuration 29587//! locale : Malay [ms] 29588//! author : Weldan Jamili : https://github.com/weldan 29589 29590;(function (global, factory) { 29591 true ? factory(__webpack_require__(0)) : 29592 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 29593 factory(global.moment) 29594}(this, (function (moment) { 'use strict'; 29595 29596 //! moment.js locale configuration 29597 29598 var ms = moment.defineLocale('ms', { 29599 months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split( 29600 '_' 29601 ), 29602 monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), 29603 weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), 29604 weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), 29605 weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), 29606 longDateFormat: { 29607 LT: 'HH.mm', 29608 LTS: 'HH.mm.ss', 29609 L: 'DD/MM/YYYY', 29610 LL: 'D MMMM YYYY', 29611 LLL: 'D MMMM YYYY [pukul] HH.mm', 29612 LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', 29613 }, 29614 meridiemParse: /pagi|tengahari|petang|malam/, 29615 meridiemHour: function (hour, meridiem) { 29616 if (hour === 12) { 29617 hour = 0; 29618 } 29619 if (meridiem === 'pagi') { 29620 return hour; 29621 } else if (meridiem === 'tengahari') { 29622 return hour >= 11 ? hour : hour + 12; 29623 } else if (meridiem === 'petang' || meridiem === 'malam') { 29624 return hour + 12; 29625 } 29626 }, 29627 meridiem: function (hours, minutes, isLower) { 29628 if (hours < 11) { 29629 return 'pagi'; 29630 } else if (hours < 15) { 29631 return 'tengahari'; 29632 } else if (hours < 19) { 29633 return 'petang'; 29634 } else { 29635 return 'malam'; 29636 } 29637 }, 29638 calendar: { 29639 sameDay: '[Hari ini pukul] LT', 29640 nextDay: '[Esok pukul] LT', 29641 nextWeek: 'dddd [pukul] LT', 29642 lastDay: '[Kelmarin pukul] LT', 29643 lastWeek: 'dddd [lepas pukul] LT', 29644 sameElse: 'L', 29645 }, 29646 relativeTime: { 29647 future: 'dalam %s', 29648 past: '%s yang lepas', 29649 s: 'beberapa saat', 29650 ss: '%d saat', 29651 m: 'seminit', 29652 mm: '%d minit', 29653 h: 'sejam', 29654 hh: '%d jam', 29655 d: 'sehari', 29656 dd: '%d hari', 29657 M: 'sebulan', 29658 MM: '%d bulan', 29659 y: 'setahun', 29660 yy: '%d tahun', 29661 }, 29662 week: { 29663 dow: 1, // Monday is the first day of the week. 29664 doy: 7, // The week that contains Jan 7th is the first week of the year. 29665 }, 29666 }); 29667 29668 return ms; 29669 29670}))); 29671 29672 29673/***/ }), 29674/* 88 */ 29675/***/ (function(module, exports, __webpack_require__) { 29676 29677//! moment.js locale configuration 29678//! locale : Malay [ms-my] 29679//! note : DEPRECATED, the correct one is [ms] 29680//! author : Weldan Jamili : https://github.com/weldan 29681 29682;(function (global, factory) { 29683 true ? factory(__webpack_require__(0)) : 29684 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 29685 factory(global.moment) 29686}(this, (function (moment) { 'use strict'; 29687 29688 //! moment.js locale configuration 29689 29690 var msMy = moment.defineLocale('ms-my', { 29691 months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split( 29692 '_' 29693 ), 29694 monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), 29695 weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), 29696 weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), 29697 weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), 29698 longDateFormat: { 29699 LT: 'HH.mm', 29700 LTS: 'HH.mm.ss', 29701 L: 'DD/MM/YYYY', 29702 LL: 'D MMMM YYYY', 29703 LLL: 'D MMMM YYYY [pukul] HH.mm', 29704 LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', 29705 }, 29706 meridiemParse: /pagi|tengahari|petang|malam/, 29707 meridiemHour: function (hour, meridiem) { 29708 if (hour === 12) { 29709 hour = 0; 29710 } 29711 if (meridiem === 'pagi') { 29712 return hour; 29713 } else if (meridiem === 'tengahari') { 29714 return hour >= 11 ? hour : hour + 12; 29715 } else if (meridiem === 'petang' || meridiem === 'malam') { 29716 return hour + 12; 29717 } 29718 }, 29719 meridiem: function (hours, minutes, isLower) { 29720 if (hours < 11) { 29721 return 'pagi'; 29722 } else if (hours < 15) { 29723 return 'tengahari'; 29724 } else if (hours < 19) { 29725 return 'petang'; 29726 } else { 29727 return 'malam'; 29728 } 29729 }, 29730 calendar: { 29731 sameDay: '[Hari ini pukul] LT', 29732 nextDay: '[Esok pukul] LT', 29733 nextWeek: 'dddd [pukul] LT', 29734 lastDay: '[Kelmarin pukul] LT', 29735 lastWeek: 'dddd [lepas pukul] LT', 29736 sameElse: 'L', 29737 }, 29738 relativeTime: { 29739 future: 'dalam %s', 29740 past: '%s yang lepas', 29741 s: 'beberapa saat', 29742 ss: '%d saat', 29743 m: 'seminit', 29744 mm: '%d minit', 29745 h: 'sejam', 29746 hh: '%d jam', 29747 d: 'sehari', 29748 dd: '%d hari', 29749 M: 'sebulan', 29750 MM: '%d bulan', 29751 y: 'setahun', 29752 yy: '%d tahun', 29753 }, 29754 week: { 29755 dow: 1, // Monday is the first day of the week. 29756 doy: 7, // The week that contains Jan 7th is the first week of the year. 29757 }, 29758 }); 29759 29760 return msMy; 29761 29762}))); 29763 29764 29765/***/ }), 29766/* 89 */ 29767/***/ (function(module, exports, __webpack_require__) { 29768 29769//! moment.js locale configuration 29770//! locale : Maltese (Malta) [mt] 29771//! author : Alessandro Maruccia : https://github.com/alesma 29772 29773;(function (global, factory) { 29774 true ? factory(__webpack_require__(0)) : 29775 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 29776 factory(global.moment) 29777}(this, (function (moment) { 'use strict'; 29778 29779 //! moment.js locale configuration 29780 29781 var mt = moment.defineLocale('mt', { 29782 months: 'Jannar_Frar_Marzu_April_Mejju_Ä unju_Lulju_Awwissu_Settembru_Ottubru_Novembru_DiÄembru'.split( 29783 '_' 29784 ), 29785 monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ä un_Lul_Aww_Set_Ott_Nov_DiÄ'.split('_'), 29786 weekdays: 29787 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ä imgħa_Is-Sibt'.split( 29788 '_' 29789 ), 29790 weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ä im_Sib'.split('_'), 29791 weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ä i_Si'.split('_'), 29792 longDateFormat: { 29793 LT: 'HH:mm', 29794 LTS: 'HH:mm:ss', 29795 L: 'DD/MM/YYYY', 29796 LL: 'D MMMM YYYY', 29797 LLL: 'D MMMM YYYY HH:mm', 29798 LLLL: 'dddd, D MMMM YYYY HH:mm', 29799 }, 29800 calendar: { 29801 sameDay: '[Illum fil-]LT', 29802 nextDay: '[Għada fil-]LT', 29803 nextWeek: 'dddd [fil-]LT', 29804 lastDay: '[Il-bieraħ fil-]LT', 29805 lastWeek: 'dddd [li għadda] [fil-]LT', 29806 sameElse: 'L', 29807 }, 29808 relativeTime: { 29809 future: 'fâ %s', 29810 past: '%s ilu', 29811 s: 'ftit sekondi', 29812 ss: '%d sekondi', 29813 m: 'minuta', 29814 mm: '%d minuti', 29815 h: 'siegħa', 29816 hh: '%d siegħat',
29817 d: 'Ä¡urnata', 29818 dd: '%d Ä¡ranet', 29819 M: 'xahar', 29820 MM: '%d xhur', 29821 y: 'sena', 29822 yy: '%d sni', 29823 }, 29824 dayOfMonthOrdinalParse: /\d{1,2}º/, 29825 ordinal: '%dº', 29826 week: { 29827 dow: 1, // Monday is the first day of the week. 29828 doy: 4, // The week that contains Jan 4th is the first week of the year. 29829 }, 29830 }); 29831 29832 return mt; 29833 29834}))); 29835 29836 29837/***/ }), 29838/* 90 */ 29839/***/ (function(module, exports, __webpack_require__) { 29840 29841//! moment.js locale configuration 29842//! locale : Burmese [my] 29843//! author : Squar team, mysquar.com 29844//! author : David Rossellat : https://github.com/gholadr 29845//! author : Tin Aung Lin : https://github.com/thanyawzinmin 29846 29847;(function (global, factory) { 29848 true ? factory(__webpack_require__(0)) : 29849 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 29850 factory(global.moment) 29851}(this, (function (moment) { 'use strict'; 29852 29853 //! moment.js locale configuration 29854 29855 var symbolMap = { 29856 1: 'á', 29857 2: 'á', 29858 3: 'á', 29859 4: 'á', 29860 5: 'á ', 29861 6: 'á', 29862 7: 'á', 29863 8: 'á', 29864 9: 'á', 29865 0: 'á', 29866 }, 29867 numberMap = { 29868 'á': '1', 29869 'á': '2', 29870 'á': '3', 29871 'á': '4', 29872 'á ': '5', 29873 'á': '6', 29874 'á': '7', 29875 'á': '8', 29876 'á': '9', 29877 'á': '0', 29878 }; 29879 29880 var my = moment.defineLocale('my', { 29881 months: 'áááºááá«áá®_áá±áá±á¬áºáá«áá®_áááº_á§áá¼á®_áá±_áá½ááº_áá°ááá¯ááº_áá¼áá¯ááº_á ááºáááºáá¬_á¡á±á¬ááºááá¯áá¬_ááá¯áááºáá¬_áá®áááºáá¬'.split( 29882 '_' 29883 ), 29884 monthsShort: 'áááº_áá±_áááº_áá¼á®_áá±_áá½ááº_ááá¯ááº_áá¼_á ááº_á¡á±á¬ááº_ááá¯_áá®'.split('_'), 29885 weekdays: 'ááááºá¹ááá½á±_ááááºá¹áá¬_á¡ááºá¹áá«_áá¯áá¹ááá°á¸_áá¼á¬áááá±á¸_áá±á¬áá¼á¬_á áá±'.split( 29886 '_' 29887 ), 29888 weekdaysShort: 'áá½á±_áá¬_áá«_áá°á¸_áá¼á¬_áá±á¬_áá±'.split('_'), 29889 weekdaysMin: 'áá½á±_áá¬_áá«_áá°á¸_áá¼á¬_áá±á¬_áá±'.split('_'), 29890 29891 longDateFormat: { 29892 LT: 'HH:mm', 29893 LTS: 'HH:mm:ss', 29894 L: 'DD/MM/YYYY', 29895 LL: 'D MMMM YYYY', 29896 LLL: 'D MMMM YYYY HH:mm', 29897 LLLL: 'dddd D MMMM YYYY HH:mm', 29898 }, 29899 calendar: { 29900 sameDay: '[ááá±.] LT [áá¾á¬]', 29901 nextDay: '[ááááºáá¼ááº] LT [áá¾á¬]', 29902 nextWeek: 'dddd LT [áá¾á¬]', 29903 lastDay: '[ááá±.á] LT [áá¾á¬]', 29904 lastWeek: '[áá¼á®á¸áá²á·áá±á¬] dddd LT [áá¾á¬]', 29905 sameElse: 'L', 29906 }, 29907 relativeTime: { 29908 future: 'áá¬áááºá· %s áá¾á¬', 29909 past: 'áá½ááºáá²á·áá±á¬ %s á', 29910 s: 'á áá¹áááº.á¡áááºá¸áááº', 29911 ss: '%d á áá¹ááá·áº', 29912 m: 'áá áºáááá áº', 29913 mm: '%d áááá áº', 29914 h: 'áá áºáá¬áá®', 29915 hh: '%d áá¬áá®', 29916 d: 'áá áºáááº', 29917 dd: '%d áááº', 29918 M: 'áá áºá', 29919 MM: '%d á', 29920 y: 'áá áºáá¾á áº', 29921 yy: '%d áá¾á áº', 29922 }, 29923 preparse: function (string) { 29924 return string.replace(/[ááááá ááááá]/g, function (match) { 29925 return numberMap[match]; 29926 }); 29927 }, 29928 postformat: function (string) { 29929 return string.replace(/\d/g, function (match) { 29930 return symbolMap[match]; 29931 }); 29932 }, 29933 week: { 29934 dow: 1, // Monday is the first day of the week. 29935 doy: 4, // The week that contains Jan 4th is the first week of the year. 29936 }, 29937 }); 29938 29939 return my; 29940 29941}))); 29942 29943 29944/***/ }), 29945/* 91 */ 29946/***/ (function(module, exports, __webpack_require__) { 29947 29948//! moment.js locale configuration 29949//! locale : Norwegian BokmÃ¥l [nb] 29950//! authors : Espen Hovlandsdal : https://github.com/rexxars 29951//! Sigurd Gartmann : https://github.com/sigurdga 29952//! Stephen Ramthun : https://github.com/stephenramthun 29953 29954;(function (global, factory) { 29955 true ? factory(__webpack_require__(0)) : 29956 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 29957 factory(global.moment) 29958}(this, (function (moment) { 'use strict'; 29959 29960 //! moment.js locale configuration 29961 29962 var nb = moment.defineLocale('nb', { 29963 months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split( 29964 '_' 29965 ), 29966 monthsShort: 29967 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'), 29968 monthsParseExact: true, 29969 weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), 29970 weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'), 29971 weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'), 29972 weekdaysParseExact: true, 29973 longDateFormat: { 29974 LT: 'HH:mm', 29975 LTS: 'HH:mm:ss', 29976 L: 'DD.MM.YYYY', 29977 LL: 'D. MMMM YYYY', 29978 LLL: 'D. MMMM YYYY [kl.] HH:mm', 29979 LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm', 29980 }, 29981 calendar: { 29982 sameDay: '[i dag kl.] LT', 29983 nextDay: '[i morgen kl.] LT', 29984 nextWeek: 'dddd [kl.] LT', 29985 lastDay: '[i gÃ¥r kl.] LT', 29986 lastWeek: '[forrige] dddd [kl.] LT', 29987 sameElse: 'L', 29988 }, 29989 relativeTime: { 29990 future: 'om %s', 29991 past: '%s siden', 29992 s: 'noen sekunder', 29993 ss: '%d sekunder', 29994 m: 'ett minutt', 29995 mm: '%d minutter', 29996 h: 'en time', 29997 hh: '%d timer', 29998 d: 'en dag', 29999 dd: '%d dager', 30000 w: 'en uke', 30001 ww: '%d uker', 30002 M: 'en mÃ¥ned', 30003 MM: '%d mÃ¥neder', 30004 y: 'ett Ã¥r', 30005 yy: '%d Ã¥r', 30006 }, 30007 dayOfMonthOrdinalParse: /\d{1,2}\./, 30008 ordinal: '%d.', 30009 week: { 30010 dow: 1, // Monday is the first day of the week. 30011 doy: 4, // The week that contains Jan 4th is the first week of the year. 30012 }, 30013 }); 30014 30015 return nb; 30016 30017}))); 30018 30019 30020/***/ }), 30021/* 92 */ 30022/***/ (function(module, exports, __webpack_require__) { 30023 30024//! moment.js locale configuration 30025//! locale : Nepalese [ne] 30026//! author : suvash : https://github.com/suvash 30027 30028;(function (global, factory) { 30029 true ? factory(__webpack_require__(0)) : 30030 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 30031 factory(global.moment) 30032}(this, (function (moment) { 'use strict'; 30033 30034 //! moment.js locale configuration 30035 30036 var symbolMap = { 30037 1: '१', 30038 2: '२', 30039 3: '३', 30040 4: '४', 30041 5: '५', 30042 6: '६', 30043 7: 'à¥', 30044 8: '८', 30045 9: '९', 30046 0: '०', 30047 }, 30048 numberMap = { 30049 '१': '1', 30050 '२': '2', 30051 '३': '3', 30052 '४': '4', 30053 '५': '5', 30054 '६': '6', 30055 'à¥': '7', 30056 '८': '8', 30057 '९': '9', 30058 '०': '0', 30059 }; 30060 30061 var ne = moment.defineLocale('ne', { 30062 months: 'à¤à¤¨à¤µà¤°à¥_फà¥à¤¬à¥à¤°à¥à¤µà¤°à¥_मारà¥à¤_ठपà¥à¤°à¤¿à¤²_मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤_ठà¤à¤·à¥à¤_सà¥à¤ªà¥à¤à¥à¤®à¥à¤¬à¤°_ठà¤à¥à¤à¥à¤¬à¤°_नà¥à¤à¥à¤®à¥à¤¬à¤°_डिसà¥à¤®à¥à¤¬à¤°'.split( 30063 '_' 30064 ), 30065 monthsShort: 30066 'à¤à¤¨._फà¥à¤¬à¥à¤°à¥._मारà¥à¤_ठपà¥à¤°à¤¿._मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤._ठà¤._सà¥à¤ªà¥à¤._ठà¤à¥à¤à¥._नà¥à¤à¥._डिसà¥.'.split( 30067 '_' 30068 ), 30069 monthsParseExact: true, 30070 weekdays: 'à¤à¤à¤¤à¤¬à¤¾à¤°_सà¥à¤®à¤¬à¤¾à¤°_मà¤à¥à¤à¤²à¤¬à¤¾à¤°_बà¥à¤§à¤¬à¤¾à¤°_बिहिबार_शà¥à¤à¥à¤°à¤¬à¤¾à¤°_शनिबार'.split( 30071 '_' 30072 ), 30073 weekdaysShort: 'à¤à¤à¤¤._सà¥à¤®._मà¤à¥à¤à¤²._बà¥à¤§._बिहि._शà¥à¤à¥à¤°._शनि.'.split('_'), 30074 weekdaysMin: 'à¤._सà¥._मà¤._बà¥._बि._शà¥._श.'.split('_'), 30075 weekdaysParseExact: true, 30076 longDateFormat: { 30077 LT: 'Aà¤à¥ h:mm बà¤à¥', 30078 LTS: 'Aà¤à¥ h:mm:ss बà¤à¥', 30079 L: 'DD/MM/YYYY', 30080 LL: 'D MMMM YYYY', 30081 LLL: 'D MMMM YYYY, Aà¤à¥ h:mm बà¤à¥', 30082 LLLL: 'dddd, D MMMM YYYY, Aà¤à¥ h:mm बà¤à¥', 30083 }, 30084 preparse: function (string) { 30085 return string.replace(/[१२३४५६à¥à¥®à¥¯à¥¦]/g, function (match) { 30086 return numberMap[match]; 30087 }); 30088 }, 30089 postformat: function (string) { 30090 return string.replace(/\d/g, function (match) { 30091 return symbolMap[match]; 30092 }); 30093 },
30094 meridiemParse: /राति|बिहान|दिà¤à¤à¤¸à¥|साà¤à¤/, 30095 meridiemHour: function (hour, meridiem) { 30096 if (hour === 12) { 30097 hour = 0; 30098 } 30099 if (meridiem === 'राति') { 30100 return hour < 4 ? hour : hour + 12; 30101 } else if (meridiem === 'बिहान') { 30102 return hour; 30103 } else if (meridiem === 'दिà¤à¤à¤¸à¥') { 30104 return hour >= 10 ? hour : hour + 12; 30105 } else if (meridiem === 'साà¤à¤') { 30106 return hour + 12; 30107 } 30108 }, 30109 meridiem: function (hour, minute, isLower) { 30110 if (hour < 3) { 30111 return 'राति'; 30112 } else if (hour < 12) { 30113 return 'बिहान'; 30114 } else if (hour < 16) { 30115 return 'दिà¤à¤à¤¸à¥'; 30116 } else if (hour < 20) { 30117 return 'साà¤à¤'; 30118 } else { 30119 return 'राति'; 30120 } 30121 }, 30122 calendar: { 30123 sameDay: '[à¤à¤] LT', 30124 nextDay: '[à¤à¥à¤²à¤¿] LT', 30125 nextWeek: '[à¤à¤à¤à¤¦à¥] dddd[,] LT', 30126 lastDay: '[हिà¤à¥] LT', 30127 lastWeek: '[à¤à¤à¤à¥] dddd[,] LT', 30128 sameElse: 'L', 30129 }, 30130 relativeTime: { 30131 future: '%sमा', 30132 past: '%s ठà¤à¤¾à¤¡à¤¿', 30133 s: 'à¤à¥à¤¹à¥ à¤à¥à¤·à¤£', 30134 ss: '%d सà¥à¤à¥à¤£à¥à¤¡', 30135 m: 'à¤à¤ मिनà¥à¤', 30136 mm: '%d मिनà¥à¤', 30137 h: 'à¤à¤ à¤à¤£à¥à¤à¤¾', 30138 hh: '%d à¤à¤£à¥à¤à¤¾', 30139 d: 'à¤à¤ दिन', 30140 dd: '%d दिन', 30141 M: 'à¤à¤ महिना', 30142 MM: '%d महिना', 30143 y: 'à¤à¤ बरà¥à¤·', 30144 yy: '%d बरà¥à¤·', 30145 }, 30146 week: { 30147 dow: 0, // Sunday is the first day of the week. 30148 doy: 6, // The week that contains Jan 6th is the first week of the year. 30149 }, 30150 }); 30151 30152 return ne; 30153 30154}))); 30155 30156 30157/***/ }), 30158/* 93 */ 30159/***/ (function(module, exports, __webpack_require__) { 30160 30161//! moment.js locale configuration 30162//! locale : Dutch [nl] 30163//! author : Joris Röling : https://github.com/jorisroling 30164//! author : Jacob Middag : https://github.com/middagj 30165 30166;(function (global, factory) { 30167 true ? factory(__webpack_require__(0)) : 30168 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 30169 factory(global.moment) 30170}(this, (function (moment) { 'use strict'; 30171 30172 //! moment.js locale configuration 30173 30174 var monthsShortWithDots = 30175 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), 30176 monthsShortWithoutDots = 30177 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'), 30178 monthsParse = [ 30179 /^jan/i, 30180 /^feb/i, 30181 /^maart|mrt.?$/i, 30182 /^apr/i, 30183 /^mei$/i, 30184 /^jun[i.]?$/i, 30185 /^jul[i.]?$/i, 30186 /^aug/i, 30187 /^sep/i, 30188 /^okt/i, 30189 /^nov/i, 30190 /^dec/i, 30191 ], 30192 monthsRegex = 30193 /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; 30194 30195 var nl = moment.defineLocale('nl', { 30196 months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split( 30197 '_' 30198 ), 30199 monthsShort: function (m, format) { 30200 if (!m) { 30201 return monthsShortWithDots; 30202 } else if (/-MMM-/.test(format)) { 30203 return monthsShortWithoutDots[m.month()]; 30204 } else { 30205 return monthsShortWithDots[m.month()]; 30206 } 30207 }, 30208 30209 monthsRegex: monthsRegex, 30210 monthsShortRegex: monthsRegex, 30211 monthsStrictRegex: 30212 /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, 30213 monthsShortStrictRegex: 30214 /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
vendor: 5,176 bytes, lines 30215-30373
30215 30216 monthsParse: monthsParse, 30217 longMonthsParse: monthsParse, 30218 shortMonthsParse: monthsParse, 30219 30220 weekdays: 30221 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), 30222 weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'), 30223 weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'), 30224 weekdaysParseExact: true, 30225 longDateFormat: { 30226 LT: 'HH:mm', 30227 LTS: 'HH:mm:ss', 30228 L: 'DD-MM-YYYY', 30229 LL: 'D MMMM YYYY', 30230 LLL: 'D MMMM YYYY HH:mm', 30231 LLLL: 'dddd D MMMM YYYY HH:mm', 30232 }, 30233 calendar: { 30234 sameDay: '[vandaag om] LT', 30235 nextDay: '[morgen om] LT', 30236 nextWeek: 'dddd [om] LT', 30237 lastDay: '[gisteren om] LT', 30238 lastWeek: '[afgelopen] dddd [om] LT', 30239 sameElse: 'L', 30240 }, 30241 relativeTime: { 30242 future: 'over %s', 30243 past: '%s geleden', 30244 s: 'een paar seconden', 30245 ss: '%d seconden', 30246 m: 'één minuut', 30247 mm: '%d minuten', 30248 h: 'één uur', 30249 hh: '%d uur', 30250 d: 'één dag', 30251 dd: '%d dagen', 30252 w: 'één week', 30253 ww: '%d weken', 30254 M: 'één maand', 30255 MM: '%d maanden', 30256 y: 'één jaar', 30257 yy: '%d jaar', 30258 }, 30259 dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, 30260 ordinal: function (number) { 30261 return ( 30262 number + 30263 (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') 30264 ); 30265 }, 30266 week: { 30267 dow: 1, // Monday is the first day of the week. 30268 doy: 4, // The week that contains Jan 4th is the first week of the year. 30269 }, 30270 }); 30271 30272 return nl; 30273 30274}))); 30275 30276 30277/***/ }), 30278/* 94 */ 30279/***/ (function(module, exports, __webpack_require__) { 30280 30281//! moment.js locale configuration 30282//! locale : Dutch (Belgium) [nl-be] 30283//! author : Joris Röling : https://github.com/jorisroling 30284//! author : Jacob Middag : https://github.com/middagj 30285 30286;(function (global, factory) { 30287 true ? factory(__webpack_require__(0)) : 30288 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 30289 factory(global.moment) 30290}(this, (function (moment) { 'use strict'; 30291 30292 //! moment.js locale configuration 30293 30294 var monthsShortWithDots = 30295 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), 30296 monthsShortWithoutDots = 30297 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'), 30298 monthsParse = [ 30299 /^jan/i, 30300 /^feb/i, 30301 /^maart|mrt.?$/i, 30302 /^apr/i, 30303 /^mei$/i, 30304 /^jun[i.]?$/i, 30305 /^jul[i.]?$/i, 30306 /^aug/i, 30307 /^sep/i, 30308 /^okt/i, 30309 /^nov/i, 30310 /^dec/i, 30311 ], 30312 monthsRegex = 30313 /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; 30314 30315 var nlBe = moment.defineLocale('nl-be', { 30316 months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split( 30317 '_' 30318 ), 30319 monthsShort: function (m, format) { 30320 if (!m) { 30321 return monthsShortWithDots; 30322 } else if (/-MMM-/.test(format)) { 30323 return monthsShortWithoutDots[m.month()]; 30324 } else { 30325 return monthsShortWithDots[m.month()]; 30326 } 30327 }, 30328 30329 monthsRegex: monthsRegex, 30330 monthsShortRegex: monthsRegex, 30331 monthsStrictRegex: 30332 /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, 30333 monthsShortStrictRegex: 30334 /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, 30335 30336 monthsParse: monthsParse, 30337 longMonthsParse: monthsParse, 30338 shortMonthsParse: monthsParse, 30339 30340 weekdays: 30341 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), 30342 weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'), 30343 weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'), 30344 weekdaysParseExact: true, 30345 longDateFormat: { 30346 LT: 'HH:mm', 30347 LTS: 'HH:mm:ss', 30348 L: 'DD/MM/YYYY', 30349 LL: 'D MMMM YYYY', 30350 LLL: 'D MMMM YYYY HH:mm', 30351 LLLL: 'dddd D MMMM YYYY HH:mm', 30352 }, 30353 calendar: { 30354 sameDay: '[vandaag om] LT', 30355 nextDay: '[morgen om] LT', 30356 nextWeek: 'dddd [om] LT', 30357 lastDay: '[gisteren om] LT', 30358 lastWeek: '[afgelopen] dddd [om] LT', 30359 sameElse: 'L', 30360 }, 30361 relativeTime: { 30362 future: 'over %s', 30363 past: '%s geleden', 30364 s: 'een paar seconden', 30365 ss: '%d seconden', 30366 m: 'één minuut', 30367 mm: '%d minuten', 30368 h: 'één uur', 30369 hh: '%d uur', 30370 d: 'één dag', 30371 dd: '%d dagen', 30372 M: 'één maand', 30373 MM: '%d maanden',
30374 y: 'één jaar', 30375 yy: '%d jaar', 30376 }, 30377 dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, 30378 ordinal: function (number) { 30379 return ( 30380 number + 30381 (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') 30382 ); 30383 }, 30384 week: { 30385 dow: 1, // Monday is the first day of the week. 30386 doy: 4, // The week that contains Jan 4th is the first week of the year. 30387 }, 30388 }); 30389 30390 return nlBe; 30391 30392}))); 30393 30394 30395/***/ }), 30396/* 95 */ 30397/***/ (function(module, exports, __webpack_require__) { 30398 30399//! moment.js locale configuration 30400//! locale : Nynorsk [nn] 30401//! authors : https://github.com/mechuwind 30402//! Stephen Ramthun : https://github.com/stephenramthun 30403 30404;(function (global, factory) { 30405 true ? factory(__webpack_require__(0)) : 30406 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 30407 factory(global.moment) 30408}(this, (function (moment) { 'use strict'; 30409 30410 //! moment.js locale configuration 30411 30412 var nn = moment.defineLocale('nn', { 30413 months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split( 30414 '_' 30415 ), 30416 monthsShort: 30417 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'), 30418 monthsParseExact: true, 30419 weekdays: 'sundag_mÃ¥ndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'), 30420 weekdaysShort: 'su._mÃ¥._ty._on._to._fr._lau.'.split('_'), 30421 weekdaysMin: 'su_mÃ¥_ty_on_to_fr_la'.split('_'), 30422 weekdaysParseExact: true, 30423 longDateFormat: { 30424 LT: 'HH:mm', 30425 LTS: 'HH:mm:ss', 30426 L: 'DD.MM.YYYY', 30427 LL: 'D. MMMM YYYY', 30428 LLL: 'D. MMMM YYYY [kl.] H:mm', 30429 LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm', 30430 }, 30431 calendar: { 30432 sameDay: '[I dag klokka] LT', 30433 nextDay: '[I morgon klokka] LT', 30434 nextWeek: 'dddd [klokka] LT', 30435 lastDay: '[I gÃ¥r klokka] LT', 30436 lastWeek: '[FøregÃ¥ande] dddd [klokka] LT', 30437 sameElse: 'L', 30438 }, 30439 relativeTime: { 30440 future: 'om %s', 30441 past: '%s sidan', 30442 s: 'nokre sekund', 30443 ss: '%d sekund', 30444 m: 'eit minutt', 30445 mm: '%d minutt', 30446 h: 'ein time', 30447 hh: '%d timar', 30448 d: 'ein dag', 30449 dd: '%d dagar', 30450 w: 'ei veke', 30451 ww: '%d veker', 30452 M: 'ein mÃ¥nad', 30453 MM: '%d mÃ¥nader', 30454 y: 'eit Ã¥r', 30455 yy: '%d Ã¥r', 30456 }, 30457 dayOfMonthOrdinalParse: /\d{1,2}\./, 30458 ordinal: '%d.', 30459 week: { 30460 dow: 1, // Monday is the first day of the week. 30461 doy: 4, // The week that contains Jan 4th is the first week of the year. 30462 }, 30463 }); 30464 30465 return nn; 30466 30467}))); 30468 30469 30470/***/ }), 30471/* 96 */ 30472/***/ (function(module, exports, __webpack_require__) { 30473 30474//! moment.js locale configuration 30475//! locale : Occitan, lengadocian dialecte [oc-lnc] 30476//! author : Quentin PAGÃS : https://github.com/Quenty31 30477 30478;(function (global, factory) { 30479 true ? factory(__webpack_require__(0)) : 30480 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 30481 factory(global.moment) 30482}(this, (function (moment) { 'use strict'; 30483 30484 //! moment.js locale configuration 30485 30486 var ocLnc = moment.defineLocale('oc-lnc', { 30487 months: { 30488 standalone: 30489 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split( 30490 '_' 30491 ), 30492 format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split( 30493 '_' 30494 ), 30495 isFormat: /D[oD]?(\s)+MMMM/, 30496 }, 30497 monthsShort: 30498 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split( 30499 '_' 30500 ), 30501 monthsParseExact: true, 30502 weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split( 30503 '_' 30504 ), 30505 weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'), 30506 weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'), 30507 weekdaysParseExact: true, 30508 longDateFormat: { 30509 LT: 'H:mm', 30510 LTS: 'H:mm:ss', 30511 L: 'DD/MM/YYYY', 30512 LL: 'D MMMM [de] YYYY', 30513 ll: 'D MMM YYYY', 30514 LLL: 'D MMMM [de] YYYY [a] H:mm', 30515 lll: 'D MMM YYYY, H:mm', 30516 LLLL: 'dddd D MMMM [de] YYYY [a] H:mm', 30517 llll: 'ddd D MMM YYYY, H:mm', 30518 }, 30519 calendar: { 30520 sameDay: '[uèi a] LT', 30521 nextDay: '[deman a] LT', 30522 nextWeek: 'dddd [a] LT', 30523 lastDay: '[ièr a] LT', 30524 lastWeek: 'dddd [passat a] LT', 30525 sameElse: 'L', 30526 }, 30527 relativeTime: { 30528 future: "d'aquà %s", 30529 past: 'fa %s', 30530 s: 'unas segondas', 30531 ss: '%d segondas', 30532 m: 'una minuta', 30533 mm: '%d minutas', 30534 h: 'una ora', 30535 hh: '%d oras', 30536 d: 'un jorn', 30537 dd: '%d jorns', 30538 M: 'un mes', 30539 MM: '%d meses', 30540 y: 'un an', 30541 yy: '%d ans', 30542 }, 30543 dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, 30544 ordinal: function (number, period) { 30545 var output = 30546 number === 1 30547 ? 'r' 30548 : number === 2 30549 ? 'n' 30550 : number === 3 30551 ? 'r' 30552 : number === 4 30553 ? 't' 30554 : 'è'; 30555 if (period === 'w' || period === 'W') { 30556 output = 'a'; 30557 } 30558 return number + output; 30559 }, 30560 week: { 30561 dow: 1, // Monday is the first day of the week. 30562 doy: 4, 30563 }, 30564 }); 30565 30566 return ocLnc; 30567 30568}))); 30569 30570 30571/***/ }), 30572/* 97 */ 30573/***/ (function(module, exports, __webpack_require__) { 30574 30575//! moment.js locale configuration 30576//! locale : Punjabi (India) [pa-in] 30577//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit 30578 30579;(function (global, factory) { 30580 true ? factory(__webpack_require__(0)) : 30581 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 30582 factory(global.moment) 30583}(this, (function (moment) { 'use strict'; 30584 30585 //! moment.js locale configuration 30586 30587 var symbolMap = { 30588 1: 'à©§', 30589 2: '੨', 30590 3: 'à©©', 30591 4: '੪', 30592 5: 'à©«', 30593 6: '੬', 30594 7: 'à©', 30595 8: 'à©®', 30596 9: '੯', 30597 0: '੦', 30598 }, 30599 numberMap = { 30600 'à©§': '1', 30601 '੨': '2', 30602 'à©©': '3', 30603 '੪': '4', 30604 'à©«': '5', 30605 '੬': '6', 30606 'à©': '7', 30607 'à©®': '8', 30608 '੯': '9', 30609 '੦': '0', 30610 }; 30611 30612 var paIn = moment.defineLocale('pa-in', { 30613 // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi. 30614 months: 'à¨à¨¨à¨µà¨°à©_ਫ਼ਰਵਰà©_ਮਾਰà¨_ਠਪà©à¨°à©à¨²_ਮà¨_à¨à©à¨¨_à¨à©à¨²à¨¾à¨_ਠà¨à¨¸à¨¤_ਸਤੰਬਰ_ਠà¨à¨¤à©à¨¬à¨°_ਨਵੰਬਰ_ਦਸੰਬਰ'.split( 30615 '_' 30616 ), 30617 monthsShort: 30618 'à¨à¨¨à¨µà¨°à©_ਫ਼ਰਵਰà©_ਮਾਰà¨_ਠਪà©à¨°à©à¨²_ਮà¨_à¨à©à¨¨_à¨à©à¨²à¨¾à¨_ਠà¨à¨¸à¨¤_ਸਤੰਬਰ_ਠà¨à¨¤à©à¨¬à¨°_ਨਵੰਬਰ_ਦਸੰਬਰ'.split( 30619 '_' 30620 ), 30621 weekdays: 'à¨à¨¤à¨µà¨¾à¨°_ਸà©à¨®à¨µà¨¾à¨°_ਮੰà¨à¨²à¨µà¨¾à¨°_ਬà©à¨§à¨µà¨¾à¨°_ਵà©à¨°à¨µà¨¾à¨°_ਸ਼à©à©±à¨à¨°à¨µà¨¾à¨°_ਸ਼ਨà©à¨à¨°à¨µà¨¾à¨°'.split( 30622 '_' 30623 ), 30624 weekdaysShort: 'à¨à¨¤_ਸà©à¨®_ਮੰà¨à¨²_ਬà©à¨§_ਵà©à¨°_ਸ਼à©à¨à¨°_ਸ਼ਨà©'.split('_'), 30625 weekdaysMin: 'à¨à¨¤_ਸà©à¨®_ਮੰà¨à¨²_ਬà©à¨§_ਵà©à¨°_ਸ਼à©à¨à¨°_ਸ਼ਨà©'.split('_'), 30626 longDateFormat: { 30627 LT: 'A h:mm ਵà¨à©', 30628 LTS: 'A h:mm:ss ਵà¨à©', 30629 L: 'DD/MM/YYYY', 30630 LL: 'D MMMM YYYY', 30631 LLL: 'D MMMM YYYY, A h:mm ਵà¨à©', 30632 LLLL: 'dddd, D MMMM YYYY, A h:mm ਵà¨à©', 30633 }, 30634 calendar: { 30635 sameDay: '[ਠà¨] LT', 30636 nextDay: '[à¨à¨²] LT', 30637 nextWeek: '[ਠà¨à¨²à¨¾] dddd, LT', 30638 lastDay: '[à¨à¨²] LT', 30639 lastWeek: '[ਪਿà¨à¨²à©] dddd, LT', 30640 sameElse: 'L', 30641 }, 30642 relativeTime: { 30643 future: '%s ਵਿੱà¨', 30644 past: '%s ਪਿà¨à¨²à©', 30645 s: 'à¨à©à¨ ਸà¨à¨¿à©°à¨', 30646 ss: '%d ਸà¨à¨¿à©°à¨', 30647 m: 'à¨à¨ ਮਿੰà¨', 30648 mm: '%d ਮਿੰà¨', 30649 h: 'à¨à©±à¨ à¨à©°à¨à¨¾', 30650 hh: '%d à¨à©°à¨à©', 30651 d: 'à¨à©±à¨ ਦਿਨ', 30652 dd: '%d ਦਿਨ', 30653 M: 'à¨à©±à¨ ਮਹà©à¨¨à¨¾', 30654 MM: '%d ਮਹà©à¨¨à©', 30655 y: 'à¨à©±à¨ ਸਾਲ', 30656 yy: '%d ਸਾਲ', 30657 }, 30658 preparse: function (string) { 30659 return string.replace(/[੧੨੩੪੫੬à©à©®à©¯à©¦]/g, function (match) { 30660 return numberMap[match]; 30661 }); 30662 }, 30663 postformat: function (string) { 30664 return string.replace(/\d/g, function (match) { 30665 return symbolMap[match]; 30666 }); 30667 }, 30668 // Punjabi notation for meridiems are quite fuzzy in practice. While there exists 30669 // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi. 30670 meridiemParse: /ਰਾਤ|ਸਵà©à¨°|ਦà©à¨ªà¨¹à¨¿à¨°|ਸ਼ਾਮ/, 30671 meridiemHour: function (hour, meridiem) { 30672 if (hour === 12) { 30673 hour = 0; 30674 } 30675 if (meridiem === 'ਰਾਤ') { 30676 return hour < 4 ? hour : hour + 12; 30677 } else if (meridiem === 'ਸਵà©à¨°') { 30678 return hour; 30679 } else if (meridiem === 'ਦà©à¨ªà¨¹à¨¿à¨°') { 30680 return hour >= 10 ? hour : hour + 12; 30681 } else if (meridiem === 'ਸ਼ਾਮ') { 30682 return hour + 12; 30683 } 30684 }, 30685 meridiem: function (hour, minute, isLower) { 30686 if (hour < 4) { 30687 return 'ਰਾਤ'; 30688 } else if (hour < 10) { 30689 return 'ਸਵà©à¨°'; 30690 } else if (hour < 17) { 30691 return 'ਦà©à¨ªà¨¹à¨¿à¨°'; 30692 } else if (hour < 20) { 30693 return 'ਸ਼ਾਮ'; 30694 } else { 30695 return 'ਰਾਤ'; 30696 } 30697 }, 30698 week: { 30699 dow: 0, // Sunday is the first day of the week. 30700 doy: 6, // The week that contains Jan 6th is the first week of the year. 30701 }, 30702 }); 30703 30704 return paIn; 30705 30706}))); 30707 30708 30709/***/ }), 30710/* 98 */ 30711/***/ (function(module, exports, __webpack_require__) { 30712 30713//! moment.js locale configuration 30714//! locale : Polish [pl] 30715//! author : Rafal Hirsz : https://github.com/evoL 30716 30717;(function (global, factory) { 30718 true ? factory(__webpack_require__(0)) : 30719 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 30720 factory(global.moment) 30721}(this, (function (moment) { 'use strict'; 30722 30723 //! moment.js locale configuration 30724 30725 var monthsNominative =
vendor: 27,552 bytes, lines 30726-31524
30726 'styczeÅ_luty_marzec_kwiecieÅ_maj_czerwiec_lipiec_sierpieÅ_wrzesieÅ_październik_listopad_grudzieÅ'.split( 30727 '_' 30728 ), 30729 monthsSubjective = 30730 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrzeÅnia_października_listopada_grudnia'.split( 30731 '_' 30732 ), 30733 monthsParse = [ 30734 /^sty/i, 30735 /^lut/i, 30736 /^mar/i, 30737 /^kwi/i, 30738 /^maj/i, 30739 /^cze/i, 30740 /^lip/i, 30741 /^sie/i, 30742 /^wrz/i, 30743 /^paź/i, 30744 /^lis/i, 30745 /^gru/i, 30746 ]; 30747 function plural(n) { 30748 return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1; 30749 } 30750 function translate(number, withoutSuffix, key) { 30751 var result = number + ' '; 30752 switch (key) { 30753 case 'ss': 30754 return result + (plural(number) ? 'sekundy' : 'sekund'); 30755 case 'm': 30756 return withoutSuffix ? 'minuta' : 'minutÄ'; 30757 case 'mm': 30758 return result + (plural(number) ? 'minuty' : 'minut'); 30759 case 'h': 30760 return withoutSuffix ? 'godzina' : 'godzinÄ'; 30761 case 'hh': 30762 return result + (plural(number) ? 'godziny' : 'godzin'); 30763 case 'ww': 30764 return result + (plural(number) ? 'tygodnie' : 'tygodni'); 30765 case 'MM': 30766 return result + (plural(number) ? 'miesiÄ ce' : 'miesiÄcy'); 30767 case 'yy': 30768 return result + (plural(number) ? 'lata' : 'lat'); 30769 } 30770 } 30771 30772 var pl = moment.defineLocale('pl', { 30773 months: function (momentToFormat, format) { 30774 if (!momentToFormat) { 30775 return monthsNominative; 30776 } else if (/D MMMM/.test(format)) { 30777 return monthsSubjective[momentToFormat.month()]; 30778 } else { 30779 return monthsNominative[momentToFormat.month()]; 30780 } 30781 }, 30782 monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), 30783 monthsParse: monthsParse, 30784 longMonthsParse: monthsParse, 30785 shortMonthsParse: monthsParse, 30786 weekdays: 30787 'niedziela_poniedziaÅek_wtorek_Åroda_czwartek_piÄ tek_sobota'.split('_'), 30788 weekdaysShort: 'ndz_pon_wt_År_czw_pt_sob'.split('_'), 30789 weekdaysMin: 'Nd_Pn_Wt_År_Cz_Pt_So'.split('_'), 30790 longDateFormat: { 30791 LT: 'HH:mm', 30792 LTS: 'HH:mm:ss', 30793 L: 'DD.MM.YYYY', 30794 LL: 'D MMMM YYYY', 30795 LLL: 'D MMMM YYYY HH:mm', 30796 LLLL: 'dddd, D MMMM YYYY HH:mm', 30797 }, 30798 calendar: { 30799 sameDay: '[DziÅ o] LT', 30800 nextDay: '[Jutro o] LT', 30801 nextWeek: function () { 30802 switch (this.day()) { 30803 case 0: 30804 return '[W niedzielÄ o] LT'; 30805 30806 case 2: 30807 return '[We wtorek o] LT'; 30808 30809 case 3: 30810 return '[W ÅrodÄ o] LT'; 30811 30812 case 6: 30813 return '[W sobotÄ o] LT'; 30814 30815 default: 30816 return '[W] dddd [o] LT'; 30817 } 30818 }, 30819 lastDay: '[Wczoraj o] LT', 30820 lastWeek: function () { 30821 switch (this.day()) { 30822 case 0: 30823 return '[W zeszÅÄ niedzielÄ o] LT'; 30824 case 3: 30825 return '[W zeszÅÄ ÅrodÄ o] LT'; 30826 case 6: 30827 return '[W zeszÅÄ sobotÄ o] LT'; 30828 default: 30829 return '[W zeszÅy] dddd [o] LT'; 30830 } 30831 }, 30832 sameElse: 'L', 30833 }, 30834 relativeTime: { 30835 future: 'za %s', 30836 past: '%s temu', 30837 s: 'kilka sekund', 30838 ss: translate, 30839 m: translate, 30840 mm: translate, 30841 h: translate, 30842 hh: translate, 30843 d: '1 dzieÅ', 30844 dd: '%d dni', 30845 w: 'tydzieÅ', 30846 ww: translate, 30847 M: 'miesiÄ c', 30848 MM: translate, 30849 y: 'rok', 30850 yy: translate, 30851 }, 30852 dayOfMonthOrdinalParse: /\d{1,2}\./, 30853 ordinal: '%d.', 30854 week: { 30855 dow: 1, // Monday is the first day of the week. 30856 doy: 4, // The week that contains Jan 4th is the first week of the year. 30857 }, 30858 }); 30859 30860 return pl; 30861 30862}))); 30863 30864 30865/***/ }), 30866/* 99 */ 30867/***/ (function(module, exports, __webpack_require__) { 30868 30869//! moment.js locale configuration 30870//! locale : Portuguese [pt] 30871//! author : Jefferson : https://github.com/jalex79 30872 30873;(function (global, factory) { 30874 true ? factory(__webpack_require__(0)) : 30875 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 30876 factory(global.moment) 30877}(this, (function (moment) { 'use strict'; 30878 30879 //! moment.js locale configuration 30880 30881 var pt = moment.defineLocale('pt', { 30882 months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split( 30883 '_' 30884 ), 30885 monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), 30886 weekdays: 30887 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split( 30888 '_' 30889 ), 30890 weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), 30891 weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), 30892 weekdaysParseExact: true, 30893 longDateFormat: { 30894 LT: 'HH:mm', 30895 LTS: 'HH:mm:ss', 30896 L: 'DD/MM/YYYY', 30897 LL: 'D [de] MMMM [de] YYYY', 30898 LLL: 'D [de] MMMM [de] YYYY HH:mm', 30899 LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm', 30900 }, 30901 calendar: { 30902 sameDay: '[Hoje à s] LT', 30903 nextDay: '[Amanhã à s] LT', 30904 nextWeek: 'dddd [à s] LT', 30905 lastDay: '[Ontem à s] LT', 30906 lastWeek: function () { 30907 return this.day() === 0 || this.day() === 6 30908 ? '[Ãltimo] dddd [à s] LT' // Saturday + Sunday 30909 : '[Ãltima] dddd [à s] LT'; // Monday - Friday 30910 }, 30911 sameElse: 'L', 30912 }, 30913 relativeTime: { 30914 future: 'em %s', 30915 past: 'há %s', 30916 s: 'segundos', 30917 ss: '%d segundos', 30918 m: 'um minuto', 30919 mm: '%d minutos', 30920 h: 'uma hora', 30921 hh: '%d horas', 30922 d: 'um dia', 30923 dd: '%d dias', 30924 w: 'uma semana', 30925 ww: '%d semanas', 30926 M: 'um mês', 30927 MM: '%d meses', 30928 y: 'um ano', 30929 yy: '%d anos', 30930 }, 30931 dayOfMonthOrdinalParse: /\d{1,2}º/, 30932 ordinal: '%dº', 30933 week: { 30934 dow: 1, // Monday is the first day of the week. 30935 doy: 4, // The week that contains Jan 4th is the first week of the year. 30936 }, 30937 }); 30938 30939 return pt; 30940 30941}))); 30942 30943 30944/***/ }), 30945/* 100 */ 30946/***/ (function(module, exports, __webpack_require__) { 30947 30948//! moment.js locale configuration 30949//! locale : Portuguese (Brazil) [pt-br] 30950//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira 30951 30952;(function (global, factory) { 30953 true ? factory(__webpack_require__(0)) : 30954 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 30955 factory(global.moment) 30956}(this, (function (moment) { 'use strict'; 30957 30958 //! moment.js locale configuration 30959 30960 var ptBr = moment.defineLocale('pt-br', { 30961 months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split( 30962 '_' 30963 ), 30964 monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), 30965 weekdays: 30966 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split( 30967 '_' 30968 ), 30969 weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'), 30970 weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'), 30971 weekdaysParseExact: true, 30972 longDateFormat: { 30973 LT: 'HH:mm', 30974 LTS: 'HH:mm:ss', 30975 L: 'DD/MM/YYYY', 30976 LL: 'D [de] MMMM [de] YYYY', 30977 LLL: 'D [de] MMMM [de] YYYY [à s] HH:mm', 30978 LLLL: 'dddd, D [de] MMMM [de] YYYY [à s] HH:mm', 30979 }, 30980 calendar: { 30981 sameDay: '[Hoje à s] LT', 30982 nextDay: '[Amanhã à s] LT', 30983 nextWeek: 'dddd [à s] LT', 30984 lastDay: '[Ontem à s] LT', 30985 lastWeek: function () { 30986 return this.day() === 0 || this.day() === 6 30987 ? '[Ãltimo] dddd [à s] LT' // Saturday + Sunday 30988 : '[Ãltima] dddd [à s] LT'; // Monday - Friday 30989 }, 30990 sameElse: 'L', 30991 }, 30992 relativeTime: { 30993 future: 'em %s', 30994 past: 'há %s', 30995 s: 'poucos segundos', 30996 ss: '%d segundos', 30997 m: 'um minuto', 30998 mm: '%d minutos', 30999 h: 'uma hora', 31000 hh: '%d horas', 31001 d: 'um dia', 31002 dd: '%d dias', 31003 M: 'um mês', 31004 MM: '%d meses', 31005 y: 'um ano', 31006 yy: '%d anos', 31007 }, 31008 dayOfMonthOrdinalParse: /\d{1,2}º/, 31009 ordinal: '%dº', 31010 invalidDate: 'Data inválida', 31011 }); 31012 31013 return ptBr; 31014 31015}))); 31016 31017 31018/***/ }), 31019/* 101 */ 31020/***/ (function(module, exports, __webpack_require__) { 31021 31022//! moment.js locale configuration 31023//! locale : Romanian [ro] 31024//! author : Vlad Gurdiga : https://github.com/gurdiga 31025//! author : Valentin Agachi : https://github.com/avaly 31026//! author : Emanuel Cepoi : https://github.com/cepem 31027 31028;(function (global, factory) { 31029 true ? factory(__webpack_require__(0)) : 31030 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 31031 factory(global.moment) 31032}(this, (function (moment) { 'use strict'; 31033 31034 //! moment.js locale configuration 31035 31036 function relativeTimeWithPlural(number, withoutSuffix, key) { 31037 var format = { 31038 ss: 'secunde', 31039 mm: 'minute', 31040 hh: 'ore', 31041 dd: 'zile', 31042 ww: 'sÄptÄmâni', 31043 MM: 'luni', 31044 yy: 'ani', 31045 }, 31046 separator = ' '; 31047 if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) { 31048 separator = ' de '; 31049 } 31050 return number + separator + format[key]; 31051 } 31052 31053 var ro = moment.defineLocale('ro', { 31054 months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split( 31055 '_' 31056 ), 31057 monthsShort: 31058 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split( 31059 '_' 31060 ), 31061 monthsParseExact: true, 31062 weekdays: 'duminicÄ_luni_marÈi_miercuri_joi_vineri_sâmbÄtÄ'.split('_'), 31063 weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'), 31064 weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), 31065 longDateFormat: { 31066 LT: 'H:mm', 31067 LTS: 'H:mm:ss', 31068 L: 'DD.MM.YYYY', 31069 LL: 'D MMMM YYYY', 31070 LLL: 'D MMMM YYYY H:mm', 31071 LLLL: 'dddd, D MMMM YYYY H:mm', 31072 }, 31073 calendar: { 31074 sameDay: '[azi la] LT', 31075 nextDay: '[mâine la] LT', 31076 nextWeek: 'dddd [la] LT', 31077 lastDay: '[ieri la] LT', 31078 lastWeek: '[fosta] dddd [la] LT', 31079 sameElse: 'L', 31080 }, 31081 relativeTime: { 31082 future: 'peste %s', 31083 past: '%s în urmÄ', 31084 s: 'câteva secunde', 31085 ss: relativeTimeWithPlural, 31086 m: 'un minut', 31087 mm: relativeTimeWithPlural, 31088 h: 'o orÄ', 31089 hh: relativeTimeWithPlural, 31090 d: 'o zi', 31091 dd: relativeTimeWithPlural, 31092 w: 'o sÄptÄmânÄ', 31093 ww: relativeTimeWithPlural, 31094 M: 'o lunÄ', 31095 MM: relativeTimeWithPlural, 31096 y: 'un an', 31097 yy: relativeTimeWithPlural, 31098 }, 31099 week: { 31100 dow: 1, // Monday is the first day of the week. 31101 doy: 7, // The week that contains Jan 7th is the first week of the year. 31102 }, 31103 }); 31104 31105 return ro; 31106 31107}))); 31108 31109 31110/***/ }), 31111/* 102 */ 31112/***/ (function(module, exports, __webpack_require__) { 31113 31114//! moment.js locale configuration 31115//! locale : Russian [ru] 31116//! author : Viktorminator : https://github.com/Viktorminator 31117//! author : Menelion Elensúle : https://github.com/Oire 31118//! author : ÐоÑенбеÑг ÐаÑк : https://github.com/socketpair 31119 31120;(function (global, factory) { 31121 true ? factory(__webpack_require__(0)) : 31122 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 31123 factory(global.moment) 31124}(this, (function (moment) { 'use strict'; 31125 31126 //! moment.js locale configuration 31127 31128 function plural(word, num) { 31129 var forms = word.split('_'); 31130 return num % 10 === 1 && num % 100 !== 11 31131 ? forms[0] 31132 : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) 31133 ? forms[1] 31134 : forms[2]; 31135 } 31136 function relativeTimeWithPlural(number, withoutSuffix, key) { 31137 var format = { 31138 ss: withoutSuffix ? 'ÑекÑнда_ÑекÑндÑ_ÑекÑнд' : 'ÑекÑндÑ_ÑекÑндÑ_ÑекÑнд', 31139 mm: withoutSuffix ? 'минÑÑа_минÑÑÑ_минÑÑ' : 'минÑÑÑ_минÑÑÑ_минÑÑ', 31140 hh: 'ÑаÑ_ÑаÑа_ÑаÑов', 31141 dd: 'денÑ_днÑ_дней', 31142 ww: 'неделÑ_недели_неделÑ', 31143 MM: 'меÑÑÑ_меÑÑÑа_меÑÑÑев', 31144 yy: 'год_года_леÑ', 31145 }; 31146 if (key === 'm') { 31147 return withoutSuffix ? 'минÑÑа' : 'минÑÑÑ'; 31148 } else { 31149 return number + ' ' + plural(format[key], +number); 31150 } 31151 } 31152 var monthsParse = [ 31153 /^Ñнв/i, 31154 /^Ñев/i, 31155 /^маÑ/i, 31156 /^апÑ/i, 31157 /^ма[йÑ]/i, 31158 /^иÑн/i, 31159 /^иÑл/i, 31160 /^авг/i, 31161 /^Ñен/i, 31162 /^окÑ/i, 31163 /^ноÑ/i, 31164 /^дек/i, 31165 ]; 31166 31167 // http://new.gramota.ru/spravka/rules/139-prop : § 103 31168 // СокÑаÑÐµÐ½Ð¸Ñ Ð¼ÐµÑÑÑев: http://new.gramota.ru/spravka/buro/search-answer?s=242637 31169 // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753 31170 var ru = moment.defineLocale('ru', { 31171 months: { 31172 format: 'ÑнваÑÑ_ÑевÑалÑ_маÑÑа_апÑелÑ_маÑ_иÑнÑ_иÑлÑ_авгÑÑÑа_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ'.split( 31173 '_' 31174 ), 31175 standalone: 31176 'ÑнваÑÑ_ÑевÑалÑ_маÑÑ_апÑелÑ_май_иÑнÑ_иÑлÑ_авгÑÑÑ_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ'.split( 31177 '_' 31178 ), 31179 }, 31180 monthsShort: { 31181 // по CLDR именно "иÑл." и "иÑн.", но какой ÑмÑÑл менÑÑÑ Ð±ÑÐºÐ²Ñ Ð½Ð° ÑоÑкÑ? 31182 format: 'Ñнв._ÑевÑ._маÑ._апÑ._маÑ_иÑнÑ_иÑлÑ_авг._ÑенÑ._окÑ._ноÑб._дек.'.split( 31183 '_' 31184 ), 31185 standalone: 31186 'Ñнв._ÑевÑ._маÑÑ_апÑ._май_иÑнÑ_иÑлÑ_авг._ÑенÑ._окÑ._ноÑб._дек.'.split( 31187 '_' 31188 ), 31189 }, 31190 weekdays: { 31191 standalone: 31192 'воÑкÑеÑенÑе_понеделÑник_вÑоÑник_ÑÑеда_ÑеÑвеÑг_пÑÑниÑа_ÑÑббоÑа'.split( 31193 '_' 31194 ), 31195 format: 'воÑкÑеÑенÑе_понеделÑник_вÑоÑник_ÑÑедÑ_ÑеÑвеÑг_пÑÑниÑÑ_ÑÑббоÑÑ'.split( 31196 '_' 31197 ), 31198 isFormat: /\[ ?[Ðв] ?(?:пÑоÑлÑÑ|ÑледÑÑÑÑÑ|ÑÑÑ)? ?] ?dddd/, 31199 }, 31200 weekdaysShort: 'вÑ_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 31201 weekdaysMin: 'вÑ_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 31202 monthsParse: monthsParse, 31203 longMonthsParse: monthsParse, 31204 shortMonthsParse: monthsParse, 31205 31206 // полнÑе Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ñ Ð¿Ð°Ð´ÐµÐ¶Ð°Ð¼Ð¸, по ÑÑи бÑквÑ, Ð´Ð»Ñ Ð½ÐµÐºÐ¾ÑоÑÑÑ , по 4 бÑквÑ, ÑокÑаÑÐµÐ½Ð¸Ñ Ñ ÑоÑкой и без ÑоÑки 31207 monthsRegex: 31208 /^(ÑнваÑ[ÑÑ]|Ñнв\.?|ÑевÑал[ÑÑ]|ÑевÑ?\.?|маÑÑа?|маÑ\.?|апÑел[ÑÑ]|апÑ\.?|ма[йÑ]|иÑн[ÑÑ]|иÑн\.?|иÑл[ÑÑ]|иÑл\.?|авгÑÑÑа?|авг\.?|ÑенÑÑбÑ[ÑÑ]|ÑенÑ?\.?|окÑÑбÑ[ÑÑ]|окÑ\.?|ноÑбÑ[ÑÑ]|ноÑб?\.?|декабÑ[ÑÑ]|дек\.?)/i, 31209 31210 // ÐºÐ¾Ð¿Ð¸Ñ Ð¿ÑедÑдÑÑего 31211 monthsShortRegex: 31212 /^(ÑнваÑ[ÑÑ]|Ñнв\.?|ÑевÑал[ÑÑ]|ÑевÑ?\.?|маÑÑа?|маÑ\.?|апÑел[ÑÑ]|апÑ\.?|ма[йÑ]|иÑн[ÑÑ]|иÑн\.?|иÑл[ÑÑ]|иÑл\.?|авгÑÑÑа?|авг\.?|ÑенÑÑбÑ[ÑÑ]|ÑенÑ?\.?|окÑÑбÑ[ÑÑ]|окÑ\.?|ноÑбÑ[ÑÑ]|ноÑб?\.?|декабÑ[ÑÑ]|дек\.?)/i, 31213 31214 // полнÑе Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ñ Ð¿Ð°Ð´ÐµÐ¶Ð°Ð¼Ð¸ 31215 monthsStrictRegex: 31216 /^(ÑнваÑ[ÑÑ]|ÑевÑал[ÑÑ]|маÑÑа?|апÑел[ÑÑ]|ма[Ñй]|иÑн[ÑÑ]|иÑл[ÑÑ]|авгÑÑÑа?|ÑенÑÑбÑ[ÑÑ]|окÑÑбÑ[ÑÑ]|ноÑбÑ[ÑÑ]|декабÑ[ÑÑ])/i, 31217 31218 // ÐÑÑажение, коÑоÑое ÑооÑвеÑÑÑвÑÐµÑ ÑолÑко ÑокÑаÑÑннÑм ÑоÑмам 31219 monthsShortStrictRegex: 31220 /^(Ñнв\.|ÑевÑ?\.|маÑ[Ñ.]|апÑ\.|ма[Ñй]|иÑн[ÑÑ.]|иÑл[ÑÑ.]|авг\.|ÑенÑ?\.|окÑ\.|ноÑб?\.|дек\.)/i, 31221 longDateFormat: { 31222 LT: 'H:mm', 31223 LTS: 'H:mm:ss', 31224 L: 'DD.MM.YYYY', 31225 LL: 'D MMMM YYYY г.', 31226 LLL: 'D MMMM YYYY г., H:mm', 31227 LLLL: 'dddd, D MMMM YYYY г., H:mm', 31228 }, 31229 calendar: { 31230 sameDay: '[СегоднÑ, в] LT', 31231 nextDay: '[ÐавÑÑа, в] LT', 31232 lastDay: '[ÐÑеÑа, в] LT', 31233 nextWeek: function (now) { 31234 if (now.week() !== this.week()) { 31235 switch (this.day()) { 31236 case 0: 31237 return '[Ð ÑледÑÑÑее] dddd, [в] LT'; 31238 case 1: 31239 case 2: 31240 case 4: 31241 return '[Ð ÑледÑÑÑий] dddd, [в] LT'; 31242 case 3: 31243 case 5: 31244 case 6: 31245 return '[Ð ÑледÑÑÑÑÑ] dddd, [в] LT'; 31246 } 31247 } else { 31248 if (this.day() === 2) { 31249 return '[Ðо] dddd, [в] LT'; 31250 } else { 31251 return '[Ð] dddd, [в] LT'; 31252 } 31253 } 31254 }, 31255 lastWeek: function (now) { 31256 if (now.week() !== this.week()) { 31257 switch (this.day()) { 31258 case 0: 31259 return '[РпÑоÑлое] dddd, [в] LT'; 31260 case 1: 31261 case 2: 31262 case 4: 31263 return '[РпÑоÑлÑй] dddd, [в] LT'; 31264 case 3: 31265 case 5: 31266 case 6: 31267 return '[РпÑоÑлÑÑ] dddd, [в] LT'; 31268 } 31269 } else { 31270 if (this.day() === 2) { 31271 return '[Ðо] dddd, [в] LT'; 31272 } else { 31273 return '[Ð] dddd, [в] LT'; 31274 } 31275 } 31276 }, 31277 sameElse: 'L', 31278 }, 31279 relativeTime: { 31280 future: 'ÑеÑез %s', 31281 past: '%s назад', 31282 s: 'неÑколÑко ÑекÑнд', 31283 ss: relativeTimeWithPlural, 31284 m: relativeTimeWithPlural, 31285 mm: relativeTimeWithPlural, 31286 h: 'ÑаÑ', 31287 hh: relativeTimeWithPlural, 31288 d: 'денÑ', 31289 dd: relativeTimeWithPlural, 31290 w: 'неделÑ', 31291 ww: relativeTimeWithPlural, 31292 M: 'меÑÑÑ', 31293 MM: relativeTimeWithPlural, 31294 y: 'год', 31295 yy: relativeTimeWithPlural, 31296 }, 31297 meridiemParse: /ноÑи|ÑÑÑа|днÑ|веÑеÑа/i, 31298 isPM: function (input) { 31299 return /^(днÑ|веÑеÑа)$/.test(input); 31300 }, 31301 meridiem: function (hour, minute, isLower) { 31302 if (hour < 4) { 31303 return 'ноÑи'; 31304 } else if (hour < 12) { 31305 return 'ÑÑÑа'; 31306 } else if (hour < 17) { 31307 return 'днÑ'; 31308 } else { 31309 return 'веÑеÑа'; 31310 } 31311 }, 31312 dayOfMonthOrdinalParse: /\d{1,2}-(й|го|Ñ)/, 31313 ordinal: function (number, period) { 31314 switch (period) { 31315 case 'M': 31316 case 'd': 31317 case 'DDD': 31318 return number + '-й'; 31319 case 'D': 31320 return number + '-го'; 31321 case 'w': 31322 case 'W': 31323 return number + '-Ñ'; 31324 default: 31325 return number; 31326 } 31327 }, 31328 week: { 31329 dow: 1, // Monday is the first day of the week. 31330 doy: 4, // The week that contains Jan 4th is the first week of the year. 31331 }, 31332 }); 31333 31334 return ru; 31335 31336}))); 31337 31338 31339/***/ }), 31340/* 103 */ 31341/***/ (function(module, exports, __webpack_require__) { 31342 31343//! moment.js locale configuration 31344//! locale : Sindhi [sd] 31345//! author : Narain Sagar : https://github.com/narainsagar 31346 31347;(function (global, factory) { 31348 true ? factory(__webpack_require__(0)) : 31349 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 31350 factory(global.moment) 31351}(this, (function (moment) { 'use strict'; 31352 31353 //! moment.js locale configuration 31354 31355 var months = [ 31356 'جÙÙØ±Ù', 31357 'ÙÙØ¨Ø±ÙرÙ', 31358 '٠ارÚ', 31359 'اپرÙÙ', 31360 '٠ئÙ', 31361 'جÙÙ', 31362 'جÙÙØ§Ø¡Ù', 31363 'آگسٽ', 31364 'سÙپٽ٠بر', 31365 'Ø¢ÚªÙ½ÙØ¨Ø±', 31366 'ÙÙ٠بر', 31367 'ÚØ³Ù بر', 31368 ], 31369 days = ['Ø¢ÚØ±', 'سÙ٠ر', 'اڱارÙ', 'اربع', 'Ø®Ù ÙØ³', 'ج٠ع', 'ÚÙÚØ±']; 31370 31371 var sd = moment.defineLocale('sd', { 31372 months: months, 31373 monthsShort: months, 31374 weekdays: days, 31375 weekdaysShort: days, 31376 weekdaysMin: days, 31377 longDateFormat: { 31378 LT: 'HH:mm', 31379 LTS: 'HH:mm:ss', 31380 L: 'DD/MM/YYYY', 31381 LL: 'D MMMM YYYY', 31382 LLL: 'D MMMM YYYY HH:mm', 31383 LLLL: 'ddddØ D MMMM YYYY HH:mm', 31384 }, 31385 meridiemParse: /صبØ|شا٠/, 31386 isPM: function (input) { 31387 return 'شا٠' === input; 31388 }, 31389 meridiem: function (hour, minute, isLower) { 31390 if (hour < 12) { 31391 return 'صبØ'; 31392 } 31393 return 'شا٠'; 31394 }, 31395 calendar: { 31396 sameDay: '[اÚ] LT', 31397 nextDay: '[Ø³ÚØ§Ú»Ù] LT', 31398 nextWeek: 'dddd [اڳÙÙ ÙÙØªÙ تÙ] LT', 31399 lastDay: '[ڪاÙÙÙ] LT', 31400 lastWeek: '[گزرÙÙ ÙÙØªÙ] dddd [تÙ] LT', 31401 sameElse: 'L', 31402 }, 31403 relativeTime: { 31404 future: '%s Ù¾ÙØ¡', 31405 past: '%s اڳ', 31406 s: 'ÚÙØ¯ سÙÚªÙÚ', 31407 ss: '%d سÙÚªÙÚ', 31408 m: 'ÙÚª Ù ÙÙ½', 31409 mm: '%d Ù ÙÙ½', 31410 h: 'ÙÚª ÚªÙØ§Úª', 31411 hh: '%d ÚªÙØ§Úª', 31412 d: 'ÙÚª ÚÙÙÙÙ', 31413 dd: '%d ÚÙÙÙÙ', 31414 M: 'ÙÚª Ù ÙÙÙÙ', 31415 MM: '%d Ù ÙÙÙØ§', 31416 y: 'ÙÚª ساÙ', 31417 yy: '%d ساÙ', 31418 }, 31419 preparse: function (string) { 31420 return string.replace(/Ø/g, ','); 31421 }, 31422 postformat: function (string) { 31423 return string.replace(/,/g, 'Ø'); 31424 }, 31425 week: { 31426 dow: 1, // Monday is the first day of the week. 31427 doy: 4, // The week that contains Jan 4th is the first week of the year. 31428 }, 31429 }); 31430 31431 return sd; 31432 31433}))); 31434 31435 31436/***/ }), 31437/* 104 */ 31438/***/ (function(module, exports, __webpack_require__) { 31439 31440//! moment.js locale configuration 31441//! locale : Northern Sami [se] 31442//! authors : BÃ¥rd Rolstad Henriksen : https://github.com/karamell 31443 31444;(function (global, factory) { 31445 true ? factory(__webpack_require__(0)) : 31446 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 31447 factory(global.moment) 31448}(this, (function (moment) { 'use strict'; 31449 31450 //! moment.js locale configuration 31451 31452 var se = moment.defineLocale('se', { 31453 months: 'oÄÄajagemánnu_guovvamánnu_njukÄamánnu_cuoÅománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_ÄakÄamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split( 31454 '_' 31455 ), 31456 monthsShort: 31457 'oÄÄj_guov_njuk_cuo_mies_geas_suoi_borg_ÄakÄ_golg_skáb_juov'.split('_'), 31458 weekdays: 31459 'sotnabeaivi_vuossárga_maÅÅebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split( 31460 '_' 31461 ), 31462 weekdaysShort: 'sotn_vuos_maÅ_gask_duor_bear_láv'.split('_'), 31463 weekdaysMin: 's_v_m_g_d_b_L'.split('_'), 31464 longDateFormat: { 31465 LT: 'HH:mm', 31466 LTS: 'HH:mm:ss', 31467 L: 'DD.MM.YYYY', 31468 LL: 'MMMM D. [b.] YYYY', 31469 LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm', 31470 LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm', 31471 }, 31472 calendar: { 31473 sameDay: '[otne ti] LT', 31474 nextDay: '[ihttin ti] LT', 31475 nextWeek: 'dddd [ti] LT', 31476 lastDay: '[ikte ti] LT', 31477 lastWeek: '[ovddit] dddd [ti] LT', 31478 sameElse: 'L', 31479 }, 31480 relativeTime: { 31481 future: '%s geažes', 31482 past: 'maÅit %s', 31483 s: 'moadde sekunddat', 31484 ss: '%d sekunddat', 31485 m: 'okta minuhta', 31486 mm: '%d minuhtat', 31487 h: 'okta diimmu', 31488 hh: '%d diimmut', 31489 d: 'okta beaivi', 31490 dd: '%d beaivvit', 31491 M: 'okta mánnu', 31492 MM: '%d mánut', 31493 y: 'okta jahki', 31494 yy: '%d jagit', 31495 }, 31496 dayOfMonthOrdinalParse: /\d{1,2}\./, 31497 ordinal: '%d.', 31498 week: { 31499 dow: 1, // Monday is the first day of the week. 31500 doy: 4, // The week that contains Jan 4th is the first week of the year. 31501 }, 31502 }); 31503 31504 return se; 31505 31506}))); 31507 31508 31509/***/ }), 31510/* 105 */ 31511/***/ (function(module, exports, __webpack_require__) { 31512 31513//! moment.js locale configuration 31514//! locale : Sinhalese [si] 31515//! author : Sampath Sitinamaluwa : https://github.com/sampathsris 31516 31517;(function (global, factory) { 31518 true ? factory(__webpack_require__(0)) : 31519 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 31520 factory(global.moment) 31521}(this, (function (moment) { 'use strict'; 31522 31523 //! moment.js locale configuration 31524
vendor: 16,384 bytes, lines 31525-31954
31525 /*jshint -W100*/ 31526 var si = moment.defineLocale('si', { 31527 months: 'ජනà·à·à¶»à·_à¶´à·à¶¶à¶»à·à·à¶»à·_මà·à¶»à·à¶à·_à¶ à¶´à·âà¶»à·à¶½à·_මà·à¶ºà·_à¶¢à·à¶±à·_à¶¢à·à¶½à·_à¶ à¶à·à·à·à¶à·_à·à·à¶´à·à¶à·à¶¸à·à¶¶à¶»à·_à¶à¶à·à¶à·à¶¶à¶»à·_à¶±à·à·à·à¶¸à·à¶¶à¶»à·_දà·à·à·à¶¸à·à¶¶à¶»à·'.split( 31528 '_' 31529 ), 31530 monthsShort: 'ජන_à¶´à·à¶¶_මà·à¶»à·_à¶ à¶´à·_මà·à¶ºà·_à¶¢à·à¶±à·_à¶¢à·à¶½à·_à¶ à¶à·_à·à·à¶´à·_à¶à¶à·_à¶±à·à·à·_දà·à·à·'.split( 31531 '_' 31532 ), 31533 weekdays: 31534 'à¶à¶»à·à¶¯à·_à·à¶³à·à¶¯à·_à¶ à¶à·à¶»à·à·à·à¶¯à·_බදà·à¶¯à·_à¶¶à·âà¶»à·à·à·à¶´à¶à·à¶±à·à¶¯à·_à·à·à¶à·à¶»à·à¶¯à·_à·à·à¶±à·à·à¶»à·à¶¯à·'.split( 31535 '_' 31536 ), 31537 weekdaysShort: 'à¶à¶»à·_à·à¶³à·_à¶ à¶_බදà·_à¶¶à·âà¶»à·_à·à·à¶à·_à·à·à¶±'.split('_'), 31538 weekdaysMin: 'à¶_à·_à¶ _à¶¶_à¶¶à·âà¶»_à·à·_à·à·'.split('_'), 31539 weekdaysParseExact: true, 31540 longDateFormat: { 31541 LT: 'a h:mm', 31542 LTS: 'a h:mm:ss', 31543 L: 'YYYY/MM/DD', 31544 LL: 'YYYY MMMM D', 31545 LLL: 'YYYY MMMM D, a h:mm', 31546 LLLL: 'YYYY MMMM D [à·à·à¶±à·] dddd, a h:mm:ss', 31547 }, 31548 calendar: { 31549 sameDay: '[චද] LT[à¶§]', 31550 nextDay: '[à·à·à¶§] LT[à¶§]', 31551 nextWeek: 'dddd LT[à¶§]', 31552 lastDay: '[à¶à¶ºà·] LT[à¶§]', 31553 lastWeek: '[à¶´à·à·à¶à·à¶º] dddd LT[à¶§]', 31554 sameElse: 'L', 31555 }, 31556 relativeTime: { 31557 future: '%sà¶à·à¶±à·', 31558 past: '%sà¶à¶§ à¶´à·à¶»', 31559 s: 'à¶à¶à·à¶´à¶» à¶à·à·à·à¶´à¶º', 31560 ss: 'à¶à¶à·à¶´à¶» %d', 31561 m: 'මà·à¶±à·à¶à·à¶à·à·', 31562 mm: 'මà·à¶±à·à¶à·à¶à· %d', 31563 h: 'à¶´à·à¶º', 31564 hh: 'à¶´à·à¶º %d', 31565 d: 'දà·à¶±à¶º', 31566 dd: 'දà·à¶± %d', 31567 M: 'මà·à·à¶º', 31568 MM: 'මà·à· %d', 31569 y: 'à·à·à¶»', 31570 yy: 'à·à·à¶» %d', 31571 }, 31572 dayOfMonthOrdinalParse: /\d{1,2} à·à·à¶±à·/, 31573 ordinal: function (number) { 31574 return number + ' à·à·à¶±à·'; 31575 }, 31576 meridiemParse: /à¶´à·à¶» à·à¶»à·|à¶´à·à· à·à¶»à·|à¶´à·.à·|à¶´.à·./, 31577 isPM: function (input) { 31578 return input === 'à¶´.à·.' || input === 'à¶´à·à· à·à¶»à·'; 31579 }, 31580 meridiem: function (hours, minutes, isLower) { 31581 if (hours > 11) { 31582 return isLower ? 'à¶´.à·.' : 'à¶´à·à· à·à¶»à·'; 31583 } else { 31584 return isLower ? 'à¶´à·.à·.' : 'à¶´à·à¶» à·à¶»à·'; 31585 } 31586 }, 31587 }); 31588 31589 return si; 31590 31591}))); 31592 31593 31594/***/ }), 31595/* 106 */ 31596/***/ (function(module, exports, __webpack_require__) { 31597 31598//! moment.js locale configuration 31599//! locale : Slovak [sk] 31600//! author : Martin Minka : https://github.com/k2s 31601//! based on work of petrbela : https://github.com/petrbela 31602 31603;(function (global, factory) { 31604 true ? factory(__webpack_require__(0)) : 31605 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 31606 factory(global.moment) 31607}(this, (function (moment) { 'use strict'; 31608 31609 //! moment.js locale configuration 31610 31611 var months = 31612 'január_február_marec_aprÃl_máj_jún_júl_august_september_október_november_december'.split( 31613 '_' 31614 ), 31615 monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_'); 31616 function plural(n) { 31617 return n > 1 && n < 5; 31618 } 31619 function translate(number, withoutSuffix, key, isFuture) { 31620 var result = number + ' '; 31621 switch (key) { 31622 case 's': // a few seconds / in a few seconds / a few seconds ago 31623 return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami'; 31624 case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago 31625 if (withoutSuffix || isFuture) { 31626 return result + (plural(number) ? 'sekundy' : 'sekúnd'); 31627 } else { 31628 return result + 'sekundami'; 31629 } 31630 case 'm': // a minute / in a minute / a minute ago 31631 return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou'; 31632 case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago 31633 if (withoutSuffix || isFuture) { 31634 return result + (plural(number) ? 'minúty' : 'minút'); 31635 } else { 31636 return result + 'minútami'; 31637 } 31638 case 'h': // an hour / in an hour / an hour ago 31639 return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; 31640 case 'hh': // 9 hours / in 9 hours / 9 hours ago 31641 if (withoutSuffix || isFuture) { 31642 return result + (plural(number) ? 'hodiny' : 'hodÃn'); 31643 } else { 31644 return result + 'hodinami'; 31645 } 31646 case 'd': // a day / in a day / a day ago 31647 return withoutSuffix || isFuture ? 'deÅ' : 'dÅom'; 31648 case 'dd': // 9 days / in 9 days / 9 days ago 31649 if (withoutSuffix || isFuture) { 31650 return result + (plural(number) ? 'dni' : 'dnÃ'); 31651 } else { 31652 return result + 'dÅami'; 31653 } 31654 case 'M': // a month / in a month / a month ago 31655 return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom'; 31656 case 'MM': // 9 months / in 9 months / 9 months ago 31657 if (withoutSuffix || isFuture) { 31658 return result + (plural(number) ? 'mesiace' : 'mesiacov'); 31659 } else { 31660 return result + 'mesiacmi'; 31661 } 31662 case 'y': // a year / in a year / a year ago 31663 return withoutSuffix || isFuture ? 'rok' : 'rokom'; 31664 case 'yy': // 9 years / in 9 years / 9 years ago 31665 if (withoutSuffix || isFuture) { 31666 return result + (plural(number) ? 'roky' : 'rokov'); 31667 } else { 31668 return result + 'rokmi'; 31669 } 31670 } 31671 } 31672 31673 var sk = moment.defineLocale('sk', { 31674 months: months, 31675 monthsShort: monthsShort, 31676 weekdays: 'nedeľa_pondelok_utorok_streda_Å¡tvrtok_piatok_sobota'.split('_'), 31677 weekdaysShort: 'ne_po_ut_st_Å¡t_pi_so'.split('_'), 31678 weekdaysMin: 'ne_po_ut_st_Å¡t_pi_so'.split('_'), 31679 longDateFormat: { 31680 LT: 'H:mm', 31681 LTS: 'H:mm:ss', 31682 L: 'DD.MM.YYYY', 31683 LL: 'D. MMMM YYYY', 31684 LLL: 'D. MMMM YYYY H:mm', 31685 LLLL: 'dddd D. MMMM YYYY H:mm', 31686 }, 31687 calendar: { 31688 sameDay: '[dnes o] LT', 31689 nextDay: '[zajtra o] LT', 31690 nextWeek: function () { 31691 switch (this.day()) { 31692 case 0: 31693 return '[v nedeľu o] LT'; 31694 case 1: 31695 case 2: 31696 return '[v] dddd [o] LT'; 31697 case 3: 31698 return '[v stredu o] LT'; 31699 case 4: 31700 return '[vo Å¡tvrtok o] LT'; 31701 case 5: 31702 return '[v piatok o] LT'; 31703 case 6: 31704 return '[v sobotu o] LT'; 31705 } 31706 }, 31707 lastDay: '[vÄera o] LT', 31708 lastWeek: function () { 31709 switch (this.day()) { 31710 case 0: 31711 return '[minulú nedeľu o] LT'; 31712 case 1: 31713 case 2: 31714 return '[minulý] dddd [o] LT'; 31715 case 3: 31716 return '[minulú stredu o] LT'; 31717 case 4: 31718 case 5: 31719 return '[minulý] dddd [o] LT'; 31720 case 6: 31721 return '[minulú sobotu o] LT'; 31722 } 31723 }, 31724 sameElse: 'L', 31725 }, 31726 relativeTime: { 31727 future: 'za %s', 31728 past: 'pred %s', 31729 s: translate, 31730 ss: translate, 31731 m: translate, 31732 mm: translate, 31733 h: translate, 31734 hh: translate, 31735 d: translate, 31736 dd: translate, 31737 M: translate, 31738 MM: translate, 31739 y: translate, 31740 yy: translate, 31741 }, 31742 dayOfMonthOrdinalParse: /\d{1,2}\./, 31743 ordinal: '%d.', 31744 week: { 31745 dow: 1, // Monday is the first day of the week. 31746 doy: 4, // The week that contains Jan 4th is the first week of the year. 31747 }, 31748 }); 31749 31750 return sk; 31751 31752}))); 31753 31754 31755/***/ }), 31756/* 107 */ 31757/***/ (function(module, exports, __webpack_require__) { 31758 31759//! moment.js locale configuration 31760//! locale : Slovenian [sl] 31761//! author : Robert SedovÅ¡ek : https://github.com/sedovsek 31762 31763;(function (global, factory) { 31764 true ? factory(__webpack_require__(0)) : 31765 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 31766 factory(global.moment) 31767}(this, (function (moment) { 'use strict'; 31768 31769 //! moment.js locale configuration 31770 31771 function processRelativeTime(number, withoutSuffix, key, isFuture) { 31772 var result = number + ' '; 31773 switch (key) { 31774 case 's': 31775 return withoutSuffix || isFuture 31776 ? 'nekaj sekund' 31777 : 'nekaj sekundami'; 31778 case 'ss': 31779 if (number === 1) { 31780 result += withoutSuffix ? 'sekundo' : 'sekundi'; 31781 } else if (number === 2) { 31782 result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah'; 31783 } else if (number < 5) { 31784 result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah'; 31785 } else { 31786 result += 'sekund'; 31787 } 31788 return result; 31789 case 'm': 31790 return withoutSuffix ? 'ena minuta' : 'eno minuto'; 31791 case 'mm': 31792 if (number === 1) { 31793 result += withoutSuffix ? 'minuta' : 'minuto'; 31794 } else if (number === 2) { 31795 result += withoutSuffix || isFuture ? 'minuti' : 'minutama'; 31796 } else if (number < 5) { 31797 result += withoutSuffix || isFuture ? 'minute' : 'minutami'; 31798 } else { 31799 result += withoutSuffix || isFuture ? 'minut' : 'minutami'; 31800 } 31801 return result; 31802 case 'h': 31803 return withoutSuffix ? 'ena ura' : 'eno uro'; 31804 case 'hh': 31805 if (number === 1) { 31806 result += withoutSuffix ? 'ura' : 'uro'; 31807 } else if (number === 2) { 31808 result += withoutSuffix || isFuture ? 'uri' : 'urama'; 31809 } else if (number < 5) { 31810 result += withoutSuffix || isFuture ? 'ure' : 'urami'; 31811 } else { 31812 result += withoutSuffix || isFuture ? 'ur' : 'urami'; 31813 } 31814 return result; 31815 case 'd': 31816 return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; 31817 case 'dd': 31818 if (number === 1) { 31819 result += withoutSuffix || isFuture ? 'dan' : 'dnem'; 31820 } else if (number === 2) { 31821 result += withoutSuffix || isFuture ? 'dni' : 'dnevoma'; 31822 } else { 31823 result += withoutSuffix || isFuture ? 'dni' : 'dnevi'; 31824 } 31825 return result; 31826 case 'M': 31827 return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; 31828 case 'MM': 31829 if (number === 1) { 31830 result += withoutSuffix || isFuture ? 'mesec' : 'mesecem'; 31831 } else if (number === 2) { 31832 result += withoutSuffix || isFuture ? 'meseca' : 'mesecema'; 31833 } else if (number < 5) { 31834 result += withoutSuffix || isFuture ? 'mesece' : 'meseci'; 31835 } else { 31836 result += withoutSuffix || isFuture ? 'mesecev' : 'meseci'; 31837 } 31838 return result; 31839 case 'y': 31840 return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; 31841 case 'yy': 31842 if (number === 1) { 31843 result += withoutSuffix || isFuture ? 'leto' : 'letom'; 31844 } else if (number === 2) { 31845 result += withoutSuffix || isFuture ? 'leti' : 'letoma'; 31846 } else if (number < 5) { 31847 result += withoutSuffix || isFuture ? 'leta' : 'leti'; 31848 } else { 31849 result += withoutSuffix || isFuture ? 'let' : 'leti'; 31850 } 31851 return result; 31852 } 31853 } 31854 31855 var sl = moment.defineLocale('sl', { 31856 months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split( 31857 '_' 31858 ), 31859 monthsShort: 31860 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split( 31861 '_' 31862 ), 31863 monthsParseExact: true, 31864 weekdays: 'nedelja_ponedeljek_torek_sreda_Äetrtek_petek_sobota'.split('_'), 31865 weekdaysShort: 'ned._pon._tor._sre._Äet._pet._sob.'.split('_'), 31866 weekdaysMin: 'ne_po_to_sr_Äe_pe_so'.split('_'), 31867 weekdaysParseExact: true, 31868 longDateFormat: { 31869 LT: 'H:mm', 31870 LTS: 'H:mm:ss', 31871 L: 'DD. MM. YYYY', 31872 LL: 'D. MMMM YYYY', 31873 LLL: 'D. MMMM YYYY H:mm', 31874 LLLL: 'dddd, D. MMMM YYYY H:mm', 31875 }, 31876 calendar: { 31877 sameDay: '[danes ob] LT', 31878 nextDay: '[jutri ob] LT', 31879 31880 nextWeek: function () { 31881 switch (this.day()) { 31882 case 0: 31883 return '[v] [nedeljo] [ob] LT'; 31884 case 3: 31885 return '[v] [sredo] [ob] LT'; 31886 case 6: 31887 return '[v] [soboto] [ob] LT'; 31888 case 1: 31889 case 2: 31890 case 4: 31891 case 5: 31892 return '[v] dddd [ob] LT'; 31893 } 31894 }, 31895 lastDay: '[vÄeraj ob] LT', 31896 lastWeek: function () { 31897 switch (this.day()) { 31898 case 0: 31899 return '[prejÅ¡njo] [nedeljo] [ob] LT'; 31900 case 3: 31901 return '[prejÅ¡njo] [sredo] [ob] LT'; 31902 case 6: 31903 return '[prejÅ¡njo] [soboto] [ob] LT'; 31904 case 1: 31905 case 2: 31906 case 4: 31907 case 5: 31908 return '[prejÅ¡nji] dddd [ob] LT'; 31909 } 31910 }, 31911 sameElse: 'L', 31912 }, 31913 relativeTime: { 31914 future: 'Äez %s', 31915 past: 'pred %s', 31916 s: processRelativeTime, 31917 ss: processRelativeTime, 31918 m: processRelativeTime, 31919 mm: processRelativeTime, 31920 h: processRelativeTime, 31921 hh: processRelativeTime, 31922 d: processRelativeTime, 31923 dd: processRelativeTime, 31924 M: processRelativeTime, 31925 MM: processRelativeTime, 31926 y: processRelativeTime, 31927 yy: processRelativeTime, 31928 }, 31929 dayOfMonthOrdinalParse: /\d{1,2}\./, 31930 ordinal: '%d.', 31931 week: { 31932 dow: 1, // Monday is the first day of the week. 31933 doy: 7, // The week that contains Jan 7th is the first week of the year. 31934 }, 31935 }); 31936 31937 return sl; 31938 31939}))); 31940 31941 31942/***/ }), 31943/* 108 */ 31944/***/ (function(module, exports, __webpack_require__) { 31945 31946//! moment.js locale configuration 31947//! locale : Albanian [sq] 31948//! author : Flakërim Ismani : https://github.com/flakerimi 31949//! author : Menelion Elensúle : https://github.com/Oire 31950//! author : Oerd Cukalla : https://github.com/oerd 31951 31952;(function (global, factory) { 31953 true ? factory(__webpack_require__(0)) : 31954 typeof define === 'function' && define.amd ? define(['../m
31954oment'], factory) : 31955 factory(global.moment) 31956}(this, (function (moment) { 'use strict'; 31957 31958 //! moment.js locale configuration 31959 31960 var sq = moment.defineLocale('sq', { 31961 months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split( 31962 '_' 31963 ), 31964 monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'), 31965 weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split( 31966 '_' 31967 ), 31968 weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'), 31969 weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'), 31970 weekdaysParseExact: true, 31971 meridiemParse: /PD|MD/, 31972 isPM: function (input) { 31973 return input.charAt(0) === 'M'; 31974 }, 31975 meridiem: function (hours, minutes, isLower) { 31976 return hours < 12 ? 'PD' : 'MD'; 31977 }, 31978 longDateFormat: { 31979 LT: 'HH:mm', 31980 LTS: 'HH:mm:ss', 31981 L: 'DD/MM/YYYY', 31982 LL: 'D MMMM YYYY', 31983 LLL: 'D MMMM YYYY HH:mm', 31984 LLLL: 'dddd, D MMMM YYYY HH:mm', 31985 }, 31986 calendar: { 31987 sameDay: '[Sot në] LT', 31988 nextDay: '[Nesër në] LT', 31989 nextWeek: 'dddd [në] LT', 31990 lastDay: '[Dje në] LT', 31991 lastWeek: 'dddd [e kaluar në] LT', 31992 sameElse: 'L', 31993 }, 31994 relativeTime: { 31995 future: 'në %s', 31996 past: '%s më parë', 31997 s: 'disa sekonda', 31998 ss: '%d sekonda', 31999 m: 'një minutë', 32000 mm: '%d minuta', 32001 h: 'një orë', 32002 hh: '%d orë', 32003 d: 'një ditë', 32004 dd: '%d ditë', 32005 M: 'një muaj', 32006 MM: '%d muaj', 32007 y: 'një vit', 32008 yy: '%d vite', 32009 }, 32010 dayOfMonthOrdinalParse: /\d{1,2}\./, 32011 ordinal: '%d.', 32012 week: { 32013 dow: 1, // Monday is the first day of the week. 32014 doy: 4, // The week that contains Jan 4th is the first week of the year. 32015 }, 32016 }); 32017 32018 return sq; 32019 32020}))); 32021 32022 32023/***/ }), 32024/* 109 */ 32025/***/ (function(module, exports, __webpack_require__) { 32026 32027//! moment.js locale configuration 32028//! locale : Serbian [sr] 32029//! author : Milan JanaÄkoviÄ<[email protected]> : https://github.com/milan-j 32030//! author : Stefan CrnjakoviÄ <[email protected]> : https://github.com/crnjakovic 32031 32032;(function (global, factory) { 32033 true ? factory(__webpack_require__(0)) : 32034 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 32035 factory(global.moment) 32036}(this, (function (moment) { 'use strict'; 32037 32038 //! moment.js locale configuration 32039 32040 var translator = { 32041 words: { 32042 //Different grammatical cases 32043 ss: ['sekunda', 'sekunde', 'sekundi'], 32044 m: ['jedan minut', 'jednog minuta'], 32045 mm: ['minut', 'minuta', 'minuta'], 32046 h: ['jedan sat', 'jednog sata'], 32047 hh: ['sat', 'sata', 'sati'], 32048 d: ['jedan dan', 'jednog dana'], 32049 dd: ['dan', 'dana', 'dana'], 32050 M: ['jedan mesec', 'jednog meseca'], 32051 MM: ['mesec', 'meseca', 'meseci'], 32052 y: ['jednu godinu', 'jedne godine'], 32053 yy: ['godinu', 'godine', 'godina'], 32054 }, 32055 correctGrammaticalCase: function (number, wordKey) { 32056 if ( 32057 number % 10 >= 1 && 32058 number % 10 <= 4 && 32059 (number % 100 < 10 || number % 100 >= 20) 32060 ) { 32061 return number % 10 === 1 ? wordKey[0] : wordKey[1]; 32062 } 32063 return wordKey[2]; 32064 }, 32065 translate: function (number, withoutSuffix, key, isFuture) { 32066 var wordKey = translator.words[key], 32067 word; 32068 32069 if (key.length === 1) { 32070 // Nominativ 32071 if (key === 'y' && withoutSuffix) return 'jedna godina'; 32072 return isFuture || withoutSuffix ? wordKey[0] : wordKey[1]; 32073 } 32074 32075 word = translator.correctGrammaticalCase(number, wordKey); 32076 // Nominativ 32077 if (key === 'yy' && withoutSuffix && word === 'godinu') { 32078 return number + ' godina'; 32079 } 32080 32081 return number + ' ' + word; 32082 }, 32083 }; 32084 32085 var sr = moment.defineLocale('sr', { 32086 months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split( 32087 '_' 32088 ), 32089 monthsShort: 32090 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), 32091 monthsParseExact: true, 32092 weekdays: 'nedelja_ponedeljak_utorak_sreda_Äetvrtak_petak_subota'.split( 32093 '_' 32094 ), 32095 weekdaysShort: 'ned._pon._uto._sre._Äet._pet._sub.'.split('_'), 32096 weekdaysMin: 'ne_po_ut_sr_Äe_pe_su'.split('_'), 32097 weekdaysParseExact: true, 32098 longDateFormat: { 32099 LT: 'H:mm', 32100 LTS: 'H:mm:ss', 32101 L: 'D. M. YYYY.', 32102 LL: 'D. MMMM YYYY.', 32103 LLL: 'D. MMMM YYYY. H:mm', 32104 LLLL: 'dddd, D. MMMM YYYY. H:mm', 32105 }, 32106 calendar: { 32107 sameDay: '[danas u] LT', 32108 nextDay: '[sutra u] LT', 32109 nextWeek: function () { 32110 switch (this.day()) { 32111 case 0: 32112 return '[u] [nedelju] [u] LT'; 32113 case 3: 32114 return '[u] [sredu] [u] LT'; 32115 case 6: 32116 return '[u] [subotu] [u] LT'; 32117 case 1: 32118 case 2: 32119 case 4: 32120 case 5: 32121 return '[u] dddd [u] LT'; 32122 } 32123 }, 32124 lastDay: '[juÄe u] LT', 32125 lastWeek: function () { 32126 var lastWeekDays = [ 32127 '[proÅ¡le] [nedelje] [u] LT', 32128 '[proÅ¡log] [ponedeljka] [u] LT', 32129 '[proÅ¡log] [utorka] [u] LT', 32130 '[proÅ¡le] [srede] [u] LT', 32131 '[proÅ¡log] [Äetvrtka] [u] LT', 32132 '[proÅ¡log] [petka] [u] LT', 32133 '[proÅ¡le] [subote] [u] LT', 32134 ]; 32135 return lastWeekDays[this.day()]; 32136 }, 32137 sameElse: 'L', 32138 }, 32139 relativeTime: { 32140 future: 'za %s', 32141 past: 'pre %s', 32142 s: 'nekoliko sekundi', 32143 ss: translator.translate, 32144 m: translator.translate, 32145 mm: translator.translate, 32146 h: translator.translate, 32147 hh: translator.translate, 32148 d: translator.translate, 32149 dd: translator.translate, 32150 M: translator.translate, 32151 MM: translator.translate, 32152 y: translator.translate, 32153 yy: translator.translate, 32154 }, 32155 dayOfMonthOrdinalParse: /\d{1,2}\./, 32156 ordinal: '%d.', 32157 week: { 32158 dow: 1, // Monday is the first day of the week. 32159 doy: 7, // The week that contains Jan 7th is the first week of the year. 32160 }, 32161 }); 32162 32163 return sr; 32164 32165}))); 32166 32167 32168/***/ }), 32169/* 110 */ 32170/***/ (function(module, exports, __webpack_require__) { 32171 32172//! moment.js locale configuration 32173//! locale : Serbian Cyrillic [sr-cyrl] 32174//! author : Milan JanaÄkoviÄ<[email protected]> : https://github.com/milan-j 32175//! author : Stefan CrnjakoviÄ <[email protected]> : https://github.com/crnjakovic 32176 32177;(function (global, factory) { 32178 true ? factory(__webpack_require__(0)) : 32179 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 32180 factory(global.moment) 32181}(this, (function (moment) { 'use strict'; 32182 32183 //! moment.js locale configuration 32184 32185 var translator = { 32186 words: { 32187 //Different grammatical cases 32188 ss: ['ÑекÑнда', 'ÑекÑнде', 'ÑекÑнди'], 32189 m: ['Ñедан минÑÑ', 'Ñедног минÑÑа'], 32190 mm: ['минÑÑ', 'минÑÑа', 'минÑÑа'], 32191 h: ['Ñедан ÑаÑ', 'Ñедног ÑаÑа'], 32192 hh: ['ÑаÑ', 'ÑаÑа', 'ÑаÑи'], 32193 d: ['Ñедан дан', 'Ñедног дана'], 32194 dd: ['дан', 'дана', 'дана'], 32195 M: ['Ñедан меÑеÑ', 'Ñедног меÑеÑа'], 32196 MM: ['меÑеÑ', 'меÑеÑа', 'меÑеÑи'], 32197 y: ['ÑÐµÐ´Ð½Ñ Ð³Ð¾Ð´Ð¸Ð½Ñ', 'Ñедне године'], 32198 yy: ['годинÑ', 'године', 'година'], 32199 }, 32200 correctGrammaticalCase: function (number, wordKey) { 32201 if ( 32202 number % 10 >= 1 && 32203 number % 10 <= 4 && 32204 (number % 100 < 10 || number % 100 >= 20) 32205 ) { 32206 return number % 10 === 1 ? wordKey[0] : wordKey[1]; 32207 } 32208 return wordKey[2]; 32209 }, 32210 translate: function (number, withoutSuffix, key, isFuture) { 32211 var wordKey = translator.words[key], 32212 word; 32213 32214 if (key.length === 1) { 32215 // Nominativ 32216 if (key === 'y' && withoutSuffix) return 'Ñедна година'; 32217 return isFuture || withoutSuffix ? wordKey[0] : wordKey[1]; 32218 } 32219 32220 word = translator.correctGrammaticalCase(number, wordKey); 32221 // Nominativ 32222 if (key === 'yy' && withoutSuffix && word === 'годинÑ') { 32223 return number + ' година'; 32224 } 32225 32226 return number + ' ' + word; 32227 }, 32228 }; 32229 32230 var srCyrl = moment.defineLocale('sr-cyrl', { 32231 months: 'ÑанÑаÑ_ÑебÑÑаÑ_маÑÑ_апÑил_маÑ_ÑÑн_ÑÑл_авгÑÑÑ_ÑепÑембаÑ_ок
32231ÑобаÑ_новембаÑ_деÑембаÑ'.split( 32232 '_' 32233 ), 32234 monthsShort: 32235 'Ñан._Ñеб._маÑ._апÑ._маÑ_ÑÑн_ÑÑл_авг._Ñеп._окÑ._нов._деÑ.'.split('_'), 32236 monthsParseExact: true, 32237 weekdays: 'недеÑа_понедеÑак_ÑÑоÑак_ÑÑеда_ÑеÑвÑÑак_пеÑак_ÑÑбоÑа'.split('_'), 32238 weekdaysShort: 'нед._пон._ÑÑо._ÑÑе._ÑеÑ._пеÑ._ÑÑб.'.split('_'), 32239 weekdaysMin: 'не_по_ÑÑ_ÑÑ_Ñе_пе_ÑÑ'.split('_'), 32240 weekdaysParseExact: true, 32241 longDateFormat: { 32242 LT: 'H:mm', 32243 LTS: 'H:mm:ss', 32244 L: 'D. M. YYYY.', 32245 LL: 'D. MMMM YYYY.', 32246 LLL: 'D. MMMM YYYY. H:mm', 32247 LLLL: 'dddd, D. MMMM YYYY. H:mm', 32248 }, 32249 calendar: { 32250 sameDay: '[Ð´Ð°Ð½Ð°Ñ Ñ] LT', 32251 nextDay: '[ÑÑÑÑа Ñ] LT', 32252 nextWeek: function () { 32253 switch (this.day()) { 32254 case 0: 32255 return '[Ñ] [недеÑÑ] [Ñ] LT'; 32256 case 3: 32257 return '[Ñ] [ÑÑедÑ] [Ñ] LT'; 32258 case 6: 32259 return '[Ñ] [ÑÑбоÑÑ] [Ñ] LT'; 32260 case 1: 32261 case 2: 32262 case 4: 32263 case 5: 32264 return '[Ñ] dddd [Ñ] LT'; 32265 } 32266 }, 32267 lastDay: '[ÑÑÑе Ñ] LT', 32268 lastWeek: function () { 32269 var lastWeekDays = [ 32270 '[пÑоÑле] [недеÑе] [Ñ] LT', 32271 '[пÑоÑлог] [понедеÑка] [Ñ] LT', 32272 '[пÑоÑлог] [ÑÑоÑка] [Ñ] LT', 32273 '[пÑоÑле] [ÑÑеде] [Ñ] LT', 32274 '[пÑоÑлог] [ÑеÑвÑÑка] [Ñ] LT', 32275 '[пÑоÑлог] [пеÑка] [Ñ] LT', 32276 '[пÑоÑле] [ÑÑбоÑе] [Ñ] LT', 32277 ]; 32278 return lastWeekDays[this.day()]; 32279 }, 32280 sameElse: 'L', 32281 }, 32282 relativeTime: { 32283 future: 'за %s', 32284 past: 'пÑе %s', 32285 s: 'неколико ÑекÑнди', 32286 ss: translator.translate, 32287 m: translator.translate, 32288 mm: translator.translate, 32289 h: translator.translate, 32290 hh: translator.translate, 32291 d: translator.translate, 32292 dd: translator.translate, 32293 M: translator.translate, 32294 MM: translator.translate, 32295 y: translator.translate, 32296 yy: translator.translate, 32297 }, 32298 dayOfMonthOrdinalParse: /\d{1,2}\./, 32299 ordinal: '%d.', 32300 week: { 32301 dow: 1, // Monday is the first day of the week. 32302 doy: 7, // The week that contains Jan 1st is the first week of the year. 32303 }, 32304 }); 32305 32306 return srCyrl; 32307 32308}))); 32309 32310 32311/***/ }), 32312/* 111 */ 32313/***/ (function(module, exports, __webpack_require__) { 32314 32315//! moment.js locale configuration 32316//! locale : siSwati [ss] 32317//! author : Nicolai Davies<[email protected]> : https://github.com/nicolaidavies 32318 32319;(function (global, factory) { 32320 true ? factory(__webpack_require__(0)) : 32321 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 32322 factory(global.moment) 32323}(this, (function (moment) { 'use strict'; 32324 32325 //! moment.js locale configuration 32326 32327 var ss = moment.defineLocale('ss', { 32328 months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split( 32329 '_' 32330 ), 32331 monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'), 32332 weekdays: 32333 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split( 32334 '_' 32335 ), 32336 weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'), 32337 weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'), 32338 weekdaysParseExact: true, 32339 longDateFormat: { 32340 LT: 'h:mm A', 32341 LTS: 'h:mm:ss A', 32342 L: 'DD/MM/YYYY', 32343 LL: 'D MMMM YYYY', 32344 LLL: 'D MMMM YYYY h:mm A', 32345 LLLL: 'dddd, D MMMM YYYY h:mm A', 32346 }, 32347 calendar: {
32348 sameDay: '[Namuhla nga] LT', 32349 nextDay: '[Kusasa nga] LT', 32350 nextWeek: 'dddd [nga] LT', 32351 lastDay: '[Itolo nga] LT', 32352 lastWeek: 'dddd [leliphelile] [nga] LT', 32353 sameElse: 'L', 32354 }, 32355 relativeTime: { 32356 future: 'nga %s', 32357 past: 'wenteka nga %s', 32358 s: 'emizuzwana lomcane', 32359 ss: '%d mzuzwana', 32360 m: 'umzuzu', 32361 mm: '%d emizuzu', 32362 h: 'lihora', 32363 hh: '%d emahora', 32364 d: 'lilanga', 32365 dd: '%d emalanga', 32366 M: 'inyanga', 32367 MM: '%d tinyanga', 32368 y: 'umnyaka', 32369 yy: '%d iminyaka', 32370 }, 32371 meridiemParse: /ekuseni|emini|entsambama|ebusuku/, 32372 meridiem: function (hours, minutes, isLower) { 32373 if (hours < 11) { 32374 return 'ekuseni'; 32375 } else if (hours < 15) { 32376 return 'emini'; 32377 } else if (hours < 19) { 32378 return 'entsambama'; 32379 } else { 32380 return 'ebusuku'; 32381 } 32382 }, 32383 meridiemHour: function (hour, meridiem) { 32384 if (hour === 12) { 32385 hour = 0; 32386 } 32387 if (meridiem === 'ekuseni') { 32388 return hour; 32389 } else if (meridiem === 'emini') { 32390 return hour >= 11 ? hour : hour + 12; 32391 } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') { 32392 if (hour === 0) { 32393 return 0; 32394 } 32395 return hour + 12; 32396 } 32397 }, 32398 dayOfMonthOrdinalParse: /\d{1,2}/, 32399 ordinal: '%d', 32400 week: { 32401 dow: 1, // Monday is the first day of the week. 32402 doy: 4, // The week that contains Jan 4th is the first week of the year. 32403 }, 32404 }); 32405 32406 return ss; 32407 32408}))); 32409 32410 32411/***/ }), 32412/* 112 */ 32413/***/ (function(module, exports, __webpack_require__) { 32414 32415//! moment.js locale configuration 32416//! locale : Swedish [sv] 32417//! author : Jens Alm : https://github.com/ulmus 32418 32419;(function (global, factory) { 32420 true ? factory(__webpack_require__(0)) : 32421 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 32422 factory(global.moment) 32423}(this, (function (moment) { 'use strict'; 32424 32425 //! moment.js locale configuration 32426 32427 var sv = moment.defineLocale('sv', { 32428 months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split( 32429 '_' 32430 ), 32431 monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), 32432 weekdays: 'söndag_mÃ¥ndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), 32433 weekdaysShort: 'sön_mÃ¥n_tis_ons_tor_fre_lör'.split('_'), 32434 weekdaysMin: 'sö_mÃ¥_ti_on_to_fr_lö'.split('_'), 32435 longDateFormat: { 32436 LT: 'HH:mm', 32437 LTS: 'HH:mm:ss', 32438 L: 'YYYY-MM-DD', 32439 LL: 'D MMMM YYYY', 32440 LLL: 'D MMMM YYYY [kl.] HH:mm', 32441 LLLL: 'dddd D MMMM YYYY [kl.] HH:mm', 32442 lll: 'D MMM YYYY HH:mm', 32443 llll: 'ddd D MMM YYYY HH:mm', 32444 }, 32445 calendar: { 32446 sameDay: '[Idag] LT', 32447 nextDay: '[Imorgon] LT', 32448 lastDay: '[IgÃ¥r] LT', 32449 nextWeek: '[PÃ¥] dddd LT', 32450 lastWeek: '[I] dddd[s] LT', 32451 sameElse: 'L', 32452 }, 32453 relativeTime: { 32454 future: 'om %s', 32455 past: 'för %s sedan', 32456 s: 'nÃ¥gra sekunder', 32457 ss: '%d sekunder', 32458 m: 'en minut', 32459 mm: '%d minuter', 32460 h: 'en timme', 32461 hh: '%d timmar', 32462 d: 'en dag', 32463 dd: '%d dagar', 32464 M: 'en mÃ¥nad', 32465 MM: '%d mÃ¥nader', 32466 y: 'ett Ã¥r', 32467 yy: '%d Ã¥r', 32468 }, 32469 dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/, 32470 ordinal: function (number) { 32471 var b = number % 10, 32472 output = 32473 ~~((number % 100) / 10) === 1 32474 ? ':e' 32475 : b === 1 32476 ? ':a' 32477 : b === 2 32478 ? ':a' 32479 : b === 3 32480 ? ':e' 32481 : ':e'; 32482 return number + output; 32483 }, 32484 week: { 32485 dow: 1, // Monday is the first day of the week. 32486 doy: 4, // The week that contains Jan 4th is the first week of the year. 32487 }, 32488 }); 32489 32490 return sv; 32491 32492}))); 32493 32494 32495/***/ }), 32496/* 113 */ 32497/***/ (function(module, exports, __webpack_require__) { 32498 32499//! moment.js locale configuration 32500//! locale : Swahili [sw] 32501//! author : Fahad Kassim : https://github.com/fadsel 32502 32503;(function (global, factory) { 32504 true ? factory(__webpack_require__(0)) : 32505 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 32506 factory(global.moment) 32507}(this, (function (moment) { 'use strict'; 32508 32509 //! moment.js locale configuration 32510 32511 var sw = moment.defineLocale('sw', { 32512 months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split( 32513 '_' 32514 ), 32515 monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), 32516 weekdays: 32517 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split( 32518 '_' 32519 ), 32520 weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), 32521 weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), 32522 weekdaysParseExact: true, 32523 longDateFormat: { 32524 LT: 'hh:mm A', 32525 LTS: 'HH:mm:ss', 32526 L: 'DD.MM.YYYY', 32527 LL: 'D MMMM YYYY', 32528 LLL: 'D MMMM YYYY HH:mm', 32529 LLLL: 'dddd, D MMMM YYYY HH:mm', 32530 }, 32531 calendar: { 32532 sameDay: '[leo saa] LT', 32533 nextDay: '[kesho saa] LT', 32534 nextWeek: '[wiki ijayo] dddd [saat] LT', 32535 lastDay: '[jana] LT', 32536 lastWeek: '[wiki iliyopita] dddd [saat] LT', 32537 sameElse: 'L', 32538 }, 32539 relativeTime: { 32540 future: '%s baadaye', 32541 past: 'tokea %s', 32542 s: 'hivi punde', 32543 ss: 'sekunde %d', 32544 m: 'dakika moja', 32545 mm: 'dakika %d', 32546 h: 'saa limoja', 32547 hh: 'masaa %d', 32548 d: 'siku moja', 32549 dd: 'siku %d', 32550 M: 'mwezi mmoja', 32551 MM: 'miezi %d', 32552 y: 'mwaka mmoja', 32553 yy: 'miaka %d', 32554 }, 32555 week: { 32556 dow: 1, // Monday is the first day of the week. 32557 doy: 7, // The week that contains Jan 7th is the first week of the year. 32558 }, 32559 }); 32560 32561 return sw; 32562 32563}))); 32564 32565 32566/***/ }), 32567/* 114 */ 32568/***/ (function(module, exports, __webpack_require__) { 32569 32570//! moment.js locale configuration 32571//! locale : Tamil [ta] 32572//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404 32573 32574;(function (global, factory) { 32575 true ? factory(__webpack_require__(0)) : 32576 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 32577 factory(global.moment) 32578}(this, (function (moment) { 'use strict'; 32579 32580 //! moment.js locale configuration 32581 32582 var symbolMap = { 32583 1: '௧', 32584 2: '௨', 32585 3: '௩', 32586 4: '௪', 32587 5: '௫', 32588 6: '௬', 32589 7: 'à¯', 32590 8: '௮', 32591 9: '௯', 32592 0: '௦', 32593 }, 32594 numberMap = { 32595 '௧': '1', 32596 '௨': '2', 32597 '௩': '3', 32598 '௪': '4', 32599 '௫': '5', 32600 '௬': '6', 32601 'à¯': '7', 32602 '௮': '8', 32603 '௯': '9', 32604 '௦': '0', 32605 }; 32606 32607 var ta = moment.defineLocale('ta', { 32608 months: 'à®à®©à®µà®°à®¿_பிபà¯à®°à®µà®°à®¿_மாரà¯à®à¯_à®à®ªà¯à®°à®²à¯_à®®à¯_à®à¯à®©à¯_à®à¯à®²à¯_à®à®à®¸à¯à®à¯_à®à¯à®ªà¯à®à¯à®®à¯à®ª
32608à®°à¯_à® à®à¯à®à¯à®¾à®ªà®°à¯_நவமà¯à®ªà®°à¯_à®à®¿à®à®®à¯à®ªà®°à¯'.split( 32609 '_' 32610 ), 32611 monthsShort: 32612 'à®à®©à®µà®°à®¿_பிபà¯à®°à®µà®°à®¿_மாரà¯à®à¯_à®à®ªà¯à®°à®²à¯_à®®à¯_à®à¯à®©à¯_à®à¯à®²à¯_à®à®à®¸à¯à®à¯_à®à¯à®ªà¯à®à¯à®®à¯à®ªà®°à¯_à® à®à¯à®à¯à®¾à®ªà®°à¯_நவமà¯à®ªà®°à¯_à®à®¿à®à®®à¯à®ªà®°à¯'.split( 32613 '_' 32614 ), 32615 weekdays: 32616 'à®à®¾à®¯à®¿à®±à¯à®±à¯à®à¯à®à®¿à®´à®®à¯_திà®à¯à®à®à¯à®à®¿à®´à®®à¯_à®à¯à®µà¯à®µà®¾à®¯à¯à®à®¿à®´à®®à¯_பà¯à®¤à®©à¯à®à®¿à®´à®®à¯_வியாழà®à¯à®à®¿à®´à®®à¯_வà¯à®³à¯à®³à®¿à®à¯à®à®¿à®´à®®à¯_à®à®©à®¿à®à¯à®à®¿à®´à®®à¯'.split( 32617 '_' 32618 ), 32619 weekdaysShort: 'à®à®¾à®¯à®¿à®±à¯_திà®à¯à®à®³à¯_à®à¯à®µà¯à®µà®¾à®¯à¯_பà¯à®¤à®©à¯_வியாழனà¯_வà¯à®³à¯à®³à®¿_à®à®©à®¿'.split( 32620 '_' 32621 ), 32622 weekdaysMin: 'à®à®¾_தி_à®à¯_பà¯_வி_வà¯_à®'.split('_'), 32623 longDateFormat: { 32624 LT: 'HH:mm', 32625 LTS: 'HH:mm:ss', 32626 L: 'DD/MM/YYYY', 32627 LL: 'D MMMM YYYY', 32628 LLL: 'D MMMM YYYY, HH:mm', 32629 LLLL: 'dddd, D MMMM YYYY, HH:mm', 32630 }, 32631 calendar: { 32632 sameDay: '[à®à®©à¯à®±à¯] LT', 32633 nextDay: '[நாளà¯] LT', 32634 nextWeek: 'dddd, LT', 32635 lastDay: '[நà¯à®±à¯à®±à¯] LT', 32636 lastWeek: '[à®à®à®¨à¯à®¤ வாரமà¯] dddd, LT', 32637 sameElse: 'L', 32638 }, 32639 relativeTime: { 32640 future: '%s à®à®²à¯', 32641 past: '%s à®®à¯à®©à¯', 32642 s: 'à®à®°à¯ à®à®¿à®² விநாà®à®¿à®à®³à¯', 32643 ss: '%d விநாà®à®¿à®à®³à¯', 32644 m: 'à®à®°à¯ நிமிà®à®®à¯', 32645 mm: '%d நிமிà®à®à¯à®à®³à¯', 32646 h: 'à®à®°à¯ மணி நà¯à®°à®®à¯', 32647 hh: '%d மணி நà¯à®°à®®à¯', 32648 d: 'à®à®°à¯ நாளà¯', 32649 dd: '%d நாà®à¯à®à®³à¯', 32650 M: 'à®à®°à¯ மாதமà¯', 32651 MM: '%d மாதà®à¯à®à®³à¯', 32652 y: 'à®à®°à¯ வரà¯à®à®®à¯', 32653 yy: '%d à®à®£à¯à®à¯à®à®³à¯', 32654 }, 32655 dayOfMonthOrdinalParse: /\d{1,2}வதà¯/, 32656 ordinal: function (number) { 32657 return number + 'வதà¯'; 32658 }, 32659 preparse: function (string) { 32660 return string.replace(/[௧௨௩௪௫௬à¯à¯®à¯¯à¯¦]/g, function (match) { 32661 return numberMap[match]; 32662 }); 32663 }, 32664 postformat: function (string) { 32665 return string.replace(/\d/g, function (match) { 32666 return symbolMap[match]; 32667 }); 32668 }, 32669 // refer http://ta.wikipedia.org/s/1er1 32670 meridiemParse: /யாமமà¯|வà¯à®à®±à¯|à®à®¾à®²à¯|நணà¯à®ªà®à®²à¯|à®à®±à¯à®ªà®¾à®à¯|மாலà¯/, 32671 meridiem: function (hour, minute, isLower) { 32672 if (hour < 2) { 32673 return ' யாமமà¯'; 32674 } else if (hour < 6) { 32675 return ' வà¯à®à®±à¯'; // வà¯à®à®±à¯ 32676 } else if (hour < 10) { 32677 return ' à®à®¾à®²à¯'; // à®à®¾à®²à¯ 32678 } else if (hour < 14) { 32679 return ' நணà¯à®ªà®à®²à¯'; // நணà¯à®ªà®à®²à¯ 32680 } else if (hour < 18) { 32681 return ' à®à®±à¯à®ªà®¾à®à¯'; // à®à®±à¯à®ªà®¾à®à¯ 32682 } else if (hour < 22) { 32683 return ' மாலà¯'; // மால௠32684 } else { 32685 return ' யாமமà¯'; 32686 } 32687 }, 32688 meridiemHour: function (hour, meridiem) { 32689 if (hour === 12) { 32690 hour = 0; 32691 } 32692 if (meridiem === 'யாமமà¯') { 32693 return hour < 2 ? hour : hour + 12; 32694 } else if (meridiem === 'வà¯à®à®±à¯' || meridiem === 'à®à®¾à®²à¯') { 32695 return hour; 32696 } else if (meridiem === 'நணà¯à®ªà®à®²à¯') { 32697 return hour >= 10 ? hour : hour + 12; 32698 } else { 32699 return hour + 12; 32700 } 32701 }, 32702 week: { 32703 dow: 0, // Sunday is the first day of the week. 32704 doy: 6, // The week that contains Jan 6th is the first week of the year. 32705 }, 32706 }); 32707 32708 return ta; 32709 32710}))); 32711 32712 32713/***/ }), 32714/* 115 */ 32715/***/ (function(module, exports, __webpack_require__) { 32716 32717//! moment.js locale configuration 32718//! locale : Telugu [te] 32719//! author : Krishna Chaitanya Thota : https://github.com/kcthota 32720 32721;(function (global, factory) { 32722 true ? factory(__webpack_require__(0)) : 32723 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 32724 factory(global.moment) 32725}(this, (function (moment) { 'use strict'; 32726 32727 //! moment.js locale configuration 32728 32729 var te = moment.defineLocale('te', { 32730 months: 'à°à°¨à°µà°°à°¿_à°«à°¿à°¬à±à°°à°µà°°à°¿_మారà±à°à°¿_à°à°ªà±à°°à°¿à°²à±_à°®à±_à°à±à°¨à±_à°à±à°²à±_à°à°à°¸à±à°à±_à°¸à±à°ªà±à°à±à°à°¬à°°à±_à° à°à±à°à±à°¬à°°à±_నవà°à°¬à°°à±_à°¡à°¿à°¸à±à°à°¬à°°à±'.split( 32731 '_' 32732 ), 32733 monthsShort: 32734 'à°à°¨._à°«à°¿à°¬à±à°°._మారà±à°à°¿_à°à°ªà±à°°à°¿._à°®à±_à°à±à°¨à±_à°à±à°²à±_à°à°._à°¸à±à°ªà±._à° à°à±à°à±._నవ._à°¡à°¿à°¸à±.'.split( 32735 '_' 32736 ), 32737 monthsParseExact: true, 32738 weekdays: 32739 'à°à°¦à°¿à°µà°¾à°°à°_à°¸à±à°®à°µà°¾à°°à°_à°®à°à°à°³à°µà°¾à°°à°_à°¬à±à°§à°µà°¾à°°à°_à°à±à°°à±à°µà°¾à°°à°_à°¶à±à°à±à°°à°µà°¾à°°à°_శనివారà°'.split( 32740 '_' 32741 ), 32742 weekdaysShort: 'à°à°¦à°¿_à°¸à±à°®_à°®à°à°à°³_à°¬à±à°§_à°à±à°°à±_à°¶à±à°à±à°°_శని'.split('_'), 32743 weekdaysMin: 'à°_à°¸à±_à°®à°_à°¬à±_à°à±_à°¶à±_à°¶'.split('_'), 32744 longDateFormat: { 32745 LT: 'A h:mm', 32746 LTS: 'A h:mm:ss', 32747 L: 'DD/MM/YYYY', 32748 LL: 'D MMMM YYYY', 32749 LLL: 'D MMMM YYYY, A h:mm', 32750 LLLL: 'dddd, D MMMM YYYY, A h:mm', 32751 }, 32752 calendar: { 32753 sameDay: '[à°¨à±à°¡à±] LT', 32754 nextDay: '[à°°à±à°ªà±] LT', 32755 nextWeek: 'dddd, LT', 32756 lastDay: '[నినà±à°¨] LT', 32757 lastWeek: '[à°à°¤] dddd, LT', 32758 sameElse: 'L', 32759 }, 32760 relativeTime: { 32761 future: '%s à°²à±', 32762 past: '%s à°à±à°°à°¿à°¤à°', 32763 s: 'à°à±à°¨à±à°¨à°¿ à°à±à°·à°£à°¾à°²à±', 32764 ss: '%d à°¸à±à°à°¨à±à°²à±', 32765 m: 'à°à° నిమిషà°', 32766 mm: '%d నిమిషాలà±', 32767 h: 'à°à° à°à°à°', 32768 hh: '%d à°à°à°à°²à±', 32769 d: 'à°à° à°°à±à°à±', 32770 dd: '%d à°°à±à°à±à°²à±', 32771 M: 'à°à° à°¨à±à°²', 32772 MM: '%d à°¨à±à°²à°²à±', 32773 y: 'à°à° à°¸à°à°µà°¤à±à°¸à°°à°', 32774 yy: '%d à°¸à°à°µà°¤à±à°¸à°°à°¾à°²à±', 32775 }, 32776 dayOfMonthOrdinalParse: /\d{1,2}à°µ/,
32777 ordinal: '%dà°µ', 32778 meridiemParse: /రాతà±à°°à°¿|à°à°¦à°¯à°|మధà±à°¯à°¾à°¹à±à°¨à°|సాయà°à°¤à±à°°à°/, 32779 meridiemHour: function (hour, meridiem) { 32780 if (hour === 12) { 32781 hour = 0; 32782 } 32783 if (meridiem === 'రాతà±à°°à°¿') { 32784 return hour < 4 ? hour : hour + 12; 32785 } else if (meridiem === 'à°à°¦à°¯à°') { 32786 return hour; 32787 } else if (meridiem === 'మధà±à°¯à°¾à°¹à±à°¨à°') { 32788 return hour >= 10 ? hour : hour + 12; 32789 } else if (meridiem === 'సాయà°à°¤à±à°°à°') { 32790 return hour + 12; 32791 } 32792 }, 32793 meridiem: function (hour, minute, isLower) { 32794 if (hour < 4) { 32795 return 'రాతà±à°°à°¿'; 32796 } else if (hour < 10) { 32797 return 'à°à°¦à°¯à°'; 32798 } else if (hour < 17) { 32799 return 'మధà±à°¯à°¾à°¹à±à°¨à°'; 32800 } else if (hour < 20) { 32801 return 'సాయà°à°¤à±à°°à°'; 32802 } else { 32803 return 'రాతà±à°°à°¿'; 32804 } 32805 }, 32806 week: { 32807 dow: 0, // Sunday is the first day of the week. 32808 doy: 6, // The week that contains Jan 6th is the first week of the year. 32809 }, 32810 }); 32811 32812 return te; 32813 32814}))); 32815 32816 32817/***/ }), 32818/* 116 */ 32819/***/ (function(module, exports, __webpack_require__) { 32820 32821//! moment.js locale configuration 32822//! locale : Tetun Dili (East Timor) [tet] 32823//! author : Joshua Brooks : https://github.com/joshbrooks 32824//! author : Onorio De J. Afonso : https://github.com/marobo 32825//! author : Sonia Simoes : https://github.com/soniasimoes 32826 32827;(function (global, factory) { 32828 true ? factory(__webpack_require__(0)) : 32829 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 32830 factory(global.moment) 32831}(this, (function (moment) { 'use strict'; 32832 32833 //! moment.js locale configuration 32834 32835 var tet = moment.defineLocale('tet', { 32836 months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split( 32837 '_' 32838 ), 32839 monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), 32840 weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'), 32841 weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'), 32842 weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'), 32843 longDateFormat: { 32844 LT: 'HH:mm', 32845 LTS: 'HH:mm:ss', 32846 L: 'DD/MM/YYYY', 32847 LL: 'D MMMM YYYY', 32848 LLL: 'D MMMM YYYY HH:mm', 32849 LLLL: 'dddd, D MMMM YYYY HH:mm', 32850 }, 32851 calendar: { 32852 sameDay: '[Ohin iha] LT', 32853 nextDay: '[Aban iha] LT', 32854 nextWeek: 'dddd [iha] LT', 32855 lastDay: '[Horiseik iha] LT', 32856 lastWeek: 'dddd [semana kotuk] [iha] LT', 32857 sameElse: 'L', 32858 }, 32859 relativeTime: { 32860 future: 'iha %s', 32861 past: '%s liuba', 32862 s: 'segundu balun', 32863 ss: 'segundu %d', 32864 m: 'minutu ida', 32865 mm: 'minutu %d', 32866 h: 'oras ida', 32867 hh: 'oras %d', 32868 d: 'loron ida', 32869 dd: 'loron %d', 32870 M: 'fulan ida', 32871 MM: 'fulan %d', 32872 y: 'tinan ida', 32873 yy: 'tinan %d', 32874 }, 32875 dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, 32876 ordinal: function (number) { 32877 var b = number % 10, 32878 output = 32879 ~~((number % 100) / 10) === 1 32880 ? 'th' 32881 : b === 1 32882 ? 'st' 32883 : b === 2 32884 ? 'nd' 32885 : b === 3 32886 ? 'rd' 32887 : 'th'; 32888 return number + output; 32889 }, 32890 week: { 32891 dow: 1, // Monday is the first day of the week. 32892 doy: 4, // The week that contains Jan 4th is the first week of the year. 32893 }, 32894 }); 32895 32896 return tet; 32897 32898}))); 32899 32900 32901/***/ }), 32902/* 117 */ 32903/***/ (function(module, exports, __webpack_require__) { 32904 32905//! moment.js locale configuration 32906//! locale : Tajik [tg] 32907//! author : Orif N. Jr. : https://github.com/orif-jr 32908 32909;(function (global, factory) { 32910 true ? factory(__webpack_require__(0)) : 32911 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 32912 factory(global.moment) 32913}(this, (function (moment) { 'use strict'; 32914 32915 //! moment.js locale configuration 32916 32917 var suffixes = { 32918 0: '-Ñм', 32919 1: '-Ñм', 32920 2: '-Ñм', 32921 3: '-Ñм', 32922 4: '-Ñм', 32923 5: '-Ñм', 32924 6: '-Ñм', 32925 7: '-Ñм', 32926 8: '-Ñм', 32927 9: '-Ñм', 32928 10: '-Ñм', 32929 12: '-Ñм', 32930 13: '-Ñм', 32931 20: '-Ñм', 32932 30: '-Ñм', 32933 40: '-Ñм', 32934 50: '-Ñм', 32935 60: '-Ñм', 32936 70: '-Ñм', 32937 80: '-Ñм', 32938 90: '-Ñм', 32939 100: '-Ñм', 32940 }; 32941 32942 var tg = moment.defineLocale('tg', { 32943 months: { 32944 format: 'ÑнваÑи_ÑевÑали_маÑÑи_апÑели_майи_иÑни_иÑли_авгÑÑÑи_ÑенÑÑбÑи_окÑÑбÑи_ноÑбÑи_декабÑи'.split( 32945 '_' 32946 ), 32947 standalone: 32948 'ÑнваÑ_ÑевÑал_маÑÑ_апÑел_май_иÑн_иÑл_авгÑÑÑ_ÑенÑÑбÑ_окÑÑбÑ_ноÑбÑ_декабÑ'.split( 32949 '_' 32950 ), 32951 }, 32952 monthsShort: 'Ñнв_Ñев_маÑ_апÑ_май_иÑн_иÑл_авг_Ñен_окÑ_ноÑ_дек'.split('_'), 32953 weekdays: 'ÑкÑанбе_дÑÑанбе_ÑеÑанбе_ÑоÑÑанбе_панҷÑанбе_Ò·ÑмÑа_Ñанбе'.split( 32954 '_' 32955 ), 32956 weekdaysShort: 'ÑÑб_дÑб_ÑÑб_ÑÑб_пÑб_Ò·Ñм_Ñнб'.split('_'), 32957 weekdaysMin: 'ÑÑ_дÑ_ÑÑ_ÑÑ_пÑ_ҷм_Ñб'.split('_'), 32958 longDateFormat: { 32959 LT: 'HH:mm', 32960 LTS: 'HH:mm:ss', 32961 L: 'DD.MM.YYYY', 32962 LL: 'D MMMM YYYY', 32963 LLL: 'D MMMM YYYY HH:mm', 32964 LLLL: 'dddd, D MMMM YYYY HH:mm', 32965 }, 32966 calendar: { 32967 sameDay: '[ÐмÑӯз ÑоаÑи] LT', 32968 nextDay: '[ФаÑдо ÑоаÑи] LT', 32969 lastDay: '[ÐиÑӯз ÑоаÑи] LT', 32970 nextWeek: 'dddd[и] [ҳаÑÑаи оÑнда ÑоаÑи] LT', 32971 lastWeek: 'dddd[и] [ҳаÑÑаи гÑзаÑÑа ÑоаÑи] LT', 32972 sameElse: 'L', 32973 }, 32974 relativeTime: { 32975 future: 'баÑди %s', 32976 past: '%s пеÑ', 32977 s: 'ÑкÑанд ÑониÑ', 32978 m: 'Ñк даÒиÒа', 32979 mm: '%d даÒиÒа', 32980 h: 'Ñк ÑоаÑ', 32981 hh: '%d ÑоаÑ', 32982 d: 'Ñк Ñӯз', 32983 dd: '%d Ñӯз', 32984 M: 'Ñк моҳ', 32985 MM: '%d моҳ', 32986 y: 'Ñк Ñол', 32987 yy: '%d Ñол', 32988 }, 32989 meridiemParse: /Ñаб|ÑÑбҳ|Ñӯз|бегоҳ/, 32990 meridiemHour: function (hour, meridiem) { 32991 if (hour === 12) { 32992 hour = 0; 32993 } 32994 if (meridiem === 'Ñаб') { 32995 return hour < 4 ? hour : hour + 12; 32996 } else if (meridiem === 'ÑÑбҳ') { 32997 return hour; 32998 } else if (meridiem === 'Ñӯз') { 32999 return hour >= 11 ? hour : hour + 12; 33000 } else if (meridiem === 'бегоҳ') { 33001 return hour + 12; 33002 } 33003 }, 33004 meridiem: function (hour, minute, isLower) { 33005 if (hour < 4) { 33006 return 'Ñаб'; 33007 } else if (hour < 11) { 33008 return 'ÑÑбҳ'; 33009 } else if (hour < 16) { 33010 return 'Ñӯз'; 33011 } else if (hour < 19) { 33012 return 'бегоҳ'; 33013 } else { 33014 return 'Ñаб'; 33015 } 33016 }, 33017 dayOfMonthOrdinalParse: /\d{1,2}-(Ñм|Ñм)/, 33018 ordinal: function (number) { 33019 var a = number % 10, 33020 b = number >= 100 ? 100 : null; 33021 return number + (suffixes[number] || suffixes[a] || suffixes[b]); 33022 }, 33023 week: { 33024 dow: 1, // Monday is the first day of the week. 33025 doy: 7, // The week that contains Jan 1th is the first week of the year. 33026 }, 33027 }); 33028 33029 return tg; 33030 33031}))); 33032 33033 33034/***/ }), 33035/* 118 */ 33036/***/ (function(module, exports, __webpack_require__) { 33037 33038//! moment.js locale configuration 33039//! locale : Thai [th] 33040//! author : Kridsada Thanabulpong : https://github.com/sirn 33041 33042;(function (global, factory) { 33043 true ? factory(__webpack_require__(0)) : 33044 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 33045 factory(global.moment) 33046}(this, (function (moment) { 'use strict'; 33047 33048 //! moment.js locale configuration 33049 33050 var th = moment.defineLocale('th', { 33051 months: 'มà¸à¸£à¸²à¸à¸¡_à¸à¸¸à¸¡à¸ าà¸à¸±à¸à¸à¹_มีà¸à¸²à¸à¸¡_à¹à¸¡à¸©à¸²à¸¢à¸_à¸à¸¤à¸©à¸ าà¸à¸¡_มิà¸à¸¸à¸à¸²à¸¢à¸_à¸à¸£à¸à¸à¸²à¸à¸¡_สิà¸à¸«à¸²à¸à¸¡_à¸à¸±à¸à¸¢à¸²à¸¢à¸_à¸à¸¸à¸¥à¸²à¸à¸¡_à¸à¸¤à¸¨à¸à¸´à¸à¸²à¸¢à¸_à¸à¸±à¸à¸§à¸²à¸à¸¡'.split( 33052 '_' 33053 ), 33054 monthsShort: 33055 'ม.à¸._à¸.à¸._มี.à¸._à¹à¸¡.ย._à¸.à¸._มิ.ย._à¸.à¸._ส.à¸._à¸.ย._à¸.à¸._à¸.ย._à¸.à¸.'.split( 33056 '_' 33057 ), 33058 monthsParseExact: true, 33059 weekdays: 'à¸à¸²à¸à¸´à¸à¸¢à¹_à¸à¸±à¸à¸à¸£à¹_à¸à¸±à¸à¸à¸²à¸£_à¸à¸¸à¸_à¸à¸¤à¸«à¸±à¸ªà¸à¸à¸µ_ศุà¸à¸£à¹_à¹à¸ªà¸²à¸£à¹'.
vendor: 7,079 bytes, lines 33059-33274
33059split('_'), 33060 weekdaysShort: 'à¸à¸²à¸à¸´à¸à¸¢à¹_à¸à¸±à¸à¸à¸£à¹_à¸à¸±à¸à¸à¸²à¸£_à¸à¸¸à¸_à¸à¸¤à¸«à¸±à¸ª_ศุà¸à¸£à¹_à¹à¸ªà¸²à¸£à¹'.split('_'), // yes, three characters difference 33061 weekdaysMin: 'à¸à¸²._à¸._à¸._à¸._à¸à¸¤._ศ._ส.'.split('_'), 33062 weekdaysParseExact: true, 33063 longDateFormat: { 33064 LT: 'H:mm', 33065 LTS: 'H:mm:ss', 33066 L: 'DD/MM/YYYY', 33067 LL: 'D MMMM YYYY', 33068 LLL: 'D MMMM YYYY à¹à¸§à¸¥à¸² H:mm', 33069 LLLL: 'วัà¸ddddà¸à¸µà¹ D MMMM YYYY à¹à¸§à¸¥à¸² H:mm', 33070 }, 33071 meridiemParse: /à¸à¹à¸à¸à¹à¸à¸µà¹à¸¢à¸|หลัà¸à¹à¸à¸µà¹à¸¢à¸/, 33072 isPM: function (input) { 33073 return input === 'หลัà¸à¹à¸à¸µà¹à¸¢à¸'; 33074 }, 33075 meridiem: function (hour, minute, isLower) { 33076 if (hour < 12) { 33077 return 'à¸à¹à¸à¸à¹à¸à¸µà¹à¸¢à¸'; 33078 } else { 33079 return 'หลัà¸à¹à¸à¸µà¹à¸¢à¸'; 33080 } 33081 }, 33082 calendar: { 33083 sameDay: '[วัà¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT', 33084 nextDay: '[à¸à¸£à¸¸à¹à¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT', 33085 nextWeek: 'dddd[หà¸à¹à¸² à¹à¸§à¸¥à¸²] LT', 33086 lastDay: '[à¹à¸¡à¸·à¹à¸à¸§à¸²à¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT', 33087 lastWeek: '[วัà¸]dddd[à¸à¸µà¹à¹à¸¥à¹à¸§ à¹à¸§à¸¥à¸²] LT', 33088 sameElse: 'L', 33089 }, 33090 relativeTime: { 33091 future: 'à¸à¸µà¸ %s', 33092 past: '%sà¸à¸µà¹à¹à¸¥à¹à¸§', 33093 s: 'à¹à¸¡à¹à¸à¸µà¹à¸§à¸´à¸à¸²à¸à¸µ', 33094 ss: '%d วิà¸à¸²à¸à¸µ', 33095 m: '1 à¸à¸²à¸à¸µ', 33096 mm: '%d à¸à¸²à¸à¸µ', 33097 h: '1 à¸à¸±à¹à¸§à¹à¸¡à¸', 33098 hh: '%d à¸à¸±à¹à¸§à¹à¸¡à¸', 33099 d: '1 วัà¸', 33100 dd: '%d วัà¸', 33101 w: '1 สัà¸à¸à¸²à¸«à¹', 33102 ww: '%d สัà¸à¸à¸²à¸«à¹', 33103 M: '1 à¹à¸à¸·à¸à¸', 33104 MM: '%d à¹à¸à¸·à¸à¸', 33105 y: '1 à¸à¸µ', 33106 yy: '%d à¸à¸µ', 33107 }, 33108 }); 33109 33110 return th; 33111 33112}))); 33113 33114 33115/***/ }), 33116/* 119 */ 33117/***/ (function(module, exports, __webpack_require__) { 33118 33119//! moment.js locale configuration 33120//! locale : Turkmen [tk] 33121//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy 33122 33123;(function (global, factory) { 33124 true ? factory(__webpack_require__(0)) : 33125 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 33126 factory(global.moment) 33127}(this, (function (moment) { 'use strict'; 33128 33129 //! moment.js locale configuration 33130 33131 var suffixes = { 33132 1: "'inji", 33133 5: "'inji", 33134 8: "'inji", 33135 70: "'inji", 33136 80: "'inji", 33137 2: "'nji", 33138 7: "'nji", 33139 20: "'nji", 33140 50: "'nji", 33141 3: "'ünji", 33142 4: "'ünji", 33143 100: "'ünji", 33144 6: "'njy", 33145 9: "'unjy", 33146 10: "'unjy", 33147 30: "'unjy", 33148 60: "'ynjy", 33149 90: "'ynjy", 33150 }; 33151 33152 var tk = moment.defineLocale('tk', { 33153 months: 'Ãanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split( 33154 '_' 33155 ), 33156 monthsShort: 'Ãan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'), 33157 weekdays: 'ÃekÅenbe_DuÅenbe_SiÅenbe_ÃarÅenbe_PenÅenbe_Anna_Åenbe'.split( 33158 '_' 33159 ), 33160 weekdaysShort: 'Ãek_DuÅ_SiÅ_Ãar_Pen_Ann_Åen'.split('_'), 33161 weekdaysMin: 'Ãk_DÅ_SÅ_Ãr_Pn_An_Ån'.split('_'), 33162 longDateFormat: { 33163 LT: 'HH:mm', 33164 LTS: 'HH:mm:ss', 33165 L: 'DD.MM.YYYY', 33166 LL: 'D MMMM YYYY', 33167 LLL: 'D MMMM YYYY HH:mm', 33168 LLLL: 'dddd, D MMMM YYYY HH:mm', 33169 }, 33170 calendar: { 33171 sameDay: '[bugün sagat] LT', 33172 nextDay: '[ertir sagat] LT', 33173 nextWeek: '[indiki] dddd [sagat] LT', 33174 lastDay: '[düýn] LT', 33175 lastWeek: '[geçen] dddd [sagat] LT', 33176 sameElse: 'L', 33177 }, 33178 relativeTime: { 33179 future: '%s soÅ', 33180 past: '%s öÅ', 33181 s: 'birnäçe sekunt', 33182 m: 'bir minut', 33183 mm: '%d minut', 33184 h: 'bir sagat', 33185 hh: '%d sagat', 33186 d: 'bir gün', 33187 dd: '%d gün', 33188 M: 'bir aý', 33189 MM: '%d aý', 33190 y: 'bir ýyl', 33191 yy: '%d ýyl', 33192 }, 33193 ordinal: function (number, period) { 33194 switch (period) { 33195 case 'd': 33196 case 'D': 33197 case 'Do': 33198 case 'DD': 33199 return number; 33200 default: 33201 if (number === 0) { 33202 // special case for zero 33203 return number + "'unjy"; 33204 } 33205 var a = number % 10, 33206 b = (number % 100) - a, 33207 c = number >= 100 ? 100 : null; 33208 return number + (suffixes[a] || suffixes[b] || suffixes[c]); 33209 } 33210 }, 33211 week: { 33212 dow: 1, // Monday is the first day of the week. 33213 doy: 7, // The week that contains Jan 7th is the first week of the year. 33214 }, 33215 }); 33216 33217 return tk; 33218 33219}))); 33220 33221 33222/***/ }), 33223/* 120 */ 33224/***/ (function(module, exports, __webpack_require__) { 33225 33226//! moment.js locale configuration 33227//! locale : Tagalog (Philippines) [tl-ph] 33228//! author : Dan Hagman : https://github.com/hagmandan 33229 33230;(function (global, factory) { 33231 true ? factory(__webpack_require__(0)) : 33232 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 33233 factory(global.moment) 33234}(this, (function (moment) { 'use strict'; 33235 33236 //! moment.js locale configuration 33237 33238 var tlPh = moment.defineLocale('tl-ph', { 33239 months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split( 33240 '_' 33241 ), 33242 monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), 33243 weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split( 33244 '_' 33245 ), 33246 weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), 33247 weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), 33248 longDateFormat: { 33249 LT: 'HH:mm', 33250 LTS: 'HH:mm:ss', 33251 L: 'MM/D/YYYY', 33252 LL: 'MMMM D, YYYY', 33253 LLL: 'MMMM D, YYYY HH:mm', 33254 LLLL: 'dddd, MMMM DD, YYYY HH:mm', 33255 }, 33256 calendar: { 33257 sameDay: 'LT [ngayong araw]', 33258 nextDay: '[Bukas ng] LT', 33259 nextWeek: 'LT [sa susunod na] dddd', 33260 lastDay: 'LT [kahapon]', 33261 lastWeek: 'LT [noong nakaraang] dddd', 33262 sameElse: 'L', 33263 }, 33264 relativeTime: { 33265 future: 'sa loob ng %s', 33266 past: '%s ang nakalipas', 33267 s: 'ilang segundo', 33268 ss: '%d segundo', 33269 m: 'isang minuto', 33270 mm: '%d minuto', 33271 h: 'isang oras', 33272 hh: '%d oras', 33273 d: 'isang araw', 33274 dd: '%d araw',
33275 M: 'isang buwan', 33276 MM: '%d buwan', 33277 y: 'isang taon', 33278 yy: '%d taon', 33279 }, 33280 dayOfMonthOrdinalParse: /\d{1,2}/, 33281 ordinal: function (number) { 33282 return number; 33283 }, 33284 week: { 33285 dow: 1, // Monday is the first day of the week. 33286 doy: 4, // The week that contains Jan 4th is the first week of the year. 33287 }, 33288 }); 33289 33290 return tlPh; 33291 33292}))); 33293 33294 33295/***/ }), 33296/* 121 */ 33297/***/ (function(module, exports, __webpack_require__) { 33298 33299//! moment.js locale configuration 33300//! locale : Klingon [tlh] 33301//! author : Dominika Kruk : https://github.com/amaranthrose 33302 33303;(function (global, factory) { 33304 true ? factory(__webpack_require__(0)) : 33305 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 33306 factory(global.moment) 33307}(this, (function (moment) { 'use strict'; 33308 33309 //! moment.js locale configuration 33310 33311 var numbersNouns = 'pagh_waâ_chaâ_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_'); 33312 33313 function translateFuture(output) { 33314 var time = output; 33315 time = 33316 output.indexOf('jaj') !== -1 33317 ? time.slice(0, -3) + 'leS' 33318 : output.indexOf('jar') !== -1 33319 ? time.slice(0, -3) + 'waQ' 33320 : output.indexOf('DIS') !== -1 33321 ? time.slice(0, -3) + 'nem' 33322 : time + ' pIq'; 33323 return time; 33324 } 33325 33326 function translatePast(output) { 33327 var time = output; 33328 time = 33329 output.indexOf('jaj') !== -1 33330 ? time.slice(0, -3) + 'Huâ' 33331 : output.indexOf('jar') !== -1 33332 ? time.slice(0, -3) + 'wen' 33333 : output.indexOf('DIS') !== -1 33334 ? time.slice(0, -3) + 'ben' 33335 : time + ' ret'; 33336 return time; 33337 } 33338 33339 function translate(number, withoutSuffix, string, isFuture) { 33340 var numberNoun = numberAsNoun(number); 33341 switch (string) { 33342 case 'ss': 33343 return numberNoun + ' lup'; 33344 case 'mm': 33345 return numberNoun + ' tup'; 33346 case 'hh': 33347 return numberNoun + ' rep'; 33348 case 'dd': 33349 return numberNoun + ' jaj'; 33350 case 'MM': 33351 return numberNoun + ' jar'; 33352 case 'yy': 33353 return numberNoun + ' DIS'; 33354 } 33355 } 33356 33357 function numberAsNoun(number) { 33358 var hundred = Math.floor((number % 1000) / 100), 33359 ten = Math.floor((number % 100) / 10), 33360 one = number % 10, 33361 word = ''; 33362 if (hundred > 0) { 33363 word += numbersNouns[hundred] + 'vatlh'; 33364 } 33365 if (ten > 0) { 33366 word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH'; 33367 } 33368 if (one > 0) { 33369 word += (word !== '' ? ' ' : '') + numbersNouns[one]; 33370 } 33371 return word === '' ? 'pagh' : word; 33372 } 33373 33374 var tlh = moment.defineLocale('tlh', { 33375 months: 'teraâ jar waâ_teraâ jar chaâ_teraâ jar wej_teraâ jar loS_teraâ jar vagh_teraâ jar jav_teraâ jar Soch_teraâ jar chorgh_teraâ jar Hut_teraâ jar waâmaH_teraâ jar waâmaH waâ_teraâ jar waâmaH chaâ'.split( 33376 '_' 33377 ), 33378 monthsShort: 33379 'jar waâ_jar chaâ_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar waâmaH_jar waâmaH waâ_jar waâmaH chaâ'.split( 33380 '_' 33381 ), 33382 monthsParseExact: true, 33383 weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split( 33384 '_' 33385 ), 33386 weekdaysShort: 33387 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), 33388 weekdaysMin: 33389 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), 33390 longDateFormat: { 33391 LT: 'HH:mm', 33392 LTS: 'HH:mm:ss', 33393 L: 'DD.MM.YYYY', 33394 LL: 'D MMMM YYYY', 33395 LLL: 'D MMMM YYYY HH:mm', 33396 LLLL: 'dddd, D MMMM YYYY HH:mm', 33397 }, 33398 calendar: { 33399 sameDay: '[DaHjaj] LT', 33400 nextDay: '[waâleS] LT', 33401 nextWeek: 'LLL', 33402 lastDay: '[waâHuâ] LT', 33403 lastWeek: 'LLL', 33404 sameElse: 'L', 33405 }, 33406 relativeTime: { 33407 future: translateFuture, 33408 past: translatePast, 33409 s: 'puS lup', 33410 ss: translate, 33411 m: 'waâ tup', 33412 mm: translate, 33413 h: 'waâ rep', 33414 hh: translate, 33415 d: 'waâ jaj', 33416 dd: translate, 33417 M: 'waâ jar', 33418 MM: translate, 33419 y: 'waâ DIS', 33420 yy: translate, 33421 }, 33422 dayOfMonthOrdinalParse: /\d{1,2}\./, 33423 ordinal: '%d.', 33424 week: { 33425 dow: 1, // Monday is the first day of the week. 33426 doy: 4, // The week that contains Jan 4th is the first week of the year. 33427 }, 33428 }); 33429 33430 return tlh; 33431 33432}))); 33433 33434 33435/***/ }), 33436/* 122 */ 33437/***/ (function(module, exports, __webpack_require__) { 33438 33439//! moment.js locale configuration 33440//! locale : Turkish [tr] 33441//! authors : Erhan Gundogan : https://github.com/erhangundogan, 33442//! Burak YiÄit Kaya: https://github.com/BYK 33443 33444;(function (global, factory) { 33445 true ? factory(__webpack_require__(0)) : 33446 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 33447 factory(global.moment) 33448}(this, (function (moment) { 'use strict'; 33449 33450 //! moment.js locale configuration 33451 33452 var suffixes = { 33453 1: "'inci", 33454 5: "'inci", 33455 8: "'inci", 33456 70: "'inci", 33457 80: "'inci", 33458 2: "'nci", 33459 7: "'nci", 33460 20: "'nci", 33461 50: "'nci", 33462 3: "'üncü", 33463 4: "'üncü", 33464 100: "'üncü", 33465 6: "'ncı", 33466 9: "'uncu", 33467 10: "'uncu", 33468 30: "'uncu", 33469 60: "'ıncı", 33470 90: "'ıncı", 33471 }; 33472 33473 var tr = moment.defineLocale('tr', { 33474 months: 'Ocak_Åubat_Mart_Nisan_Mayıs_Haziran_Temmuz_AÄustos_Eylül_Ekim_Kasım_Aralık'.split( 33475 '_' 33476 ), 33477 monthsShort: 'Oca_Åub_Mar_Nis_May_Haz_Tem_AÄu_Eyl_Eki_Kas_Ara'.split('_'), 33478 weekdays: 'Pazar_Pazartesi_Salı_ÃarÅamba_PerÅembe_Cuma_Cumartesi'.split( 33479 '_' 33480 ), 33481 weekdaysShort: 'Paz_Pzt_Sal_Ãar_Per_Cum_Cmt'.split('_'), 33482 weekdaysMin: 'Pz_Pt_Sa_Ãa_Pe_Cu_Ct'.split('_'), 33483 meridiem: function (hours, minutes, isLower) { 33484 if (hours < 12) { 33485 return isLower ? 'öö' : 'ÃÃ'; 33486 } else { 33487 return isLower ? 'ös' : 'ÃS'; 33488 } 33489 }, 33490 meridiemParse: /öö|ÃÃ|ös|ÃS/, 33491 isPM: function (input) { 33492 return input === 'ös' || input === 'ÃS'; 33493 }, 33494 longDateFormat: { 33495 LT: 'HH:mm', 33496 LTS: 'HH:mm:ss', 33497 L: 'DD.MM.YYYY', 33498 LL: 'D MMMM YYYY', 33499 LLL: 'D MMMM YYYY HH:mm', 33500 LLLL: 'dddd, D MMMM YYYY HH:mm', 33501 }, 33502 calendar: { 33503 sameDay: '[bugün saat] LT', 33504 nextDay: '[yarın saat] LT', 33505 nextWeek: '[gelecek] dddd [saat] LT', 33506 lastDay: '[dün] LT', 33507 lastWeek: '[geçen] dddd [saat] LT', 33508 sameElse: 'L', 33509 }, 33510 relativeTime: { 33511 future: '%s sonra', 33512 past: '%s önce', 33513 s: 'birkaç saniye', 33514 ss: '%d saniye', 33515 m: 'bir dakika', 33516 mm: '%d dakika', 33517 h: 'bir saat', 33518 hh: '%d saat', 33519 d: 'bir gün', 33520 dd: '%d gün', 33521 w: 'bir hafta', 33522 ww: '%d hafta', 33523 M: 'bir ay', 33524 MM: '%d ay', 33525 y: 'bir yıl', 33526 yy: '%d yıl', 33527 }, 33528 ordinal: function (number, period) { 33529 switch (period) { 33530 case 'd': 33531 case 'D': 33532 case 'Do': 33533 case 'DD': 33534 return number; 33535 default: 33536 if (number === 0) { 33537 // special case for zero 33538 return number + "'ıncı"; 33539 } 33540 var a = number % 10, 33541 b = (number % 100) - a, 33542 c = number >= 100 ? 100 : null; 33543 return number + (suffixes[a] || suffixes[b] || suffixes[c]); 33544 } 33545 }, 33546 week: { 33547 dow: 1, // Monday is the first day of the week. 33548 doy: 7, // The week that contains Jan 7th is the first week of the year. 33549 }, 33550 }); 33551 33552 return tr; 33553 33554}))); 33555 33556 33557/***/ }), 33558/* 123 */ 33559/***/ (function(module, exports, __webpack_require__) { 33560 33561//! moment.js locale configuration 33562//! locale : Talossan [tzl] 33563//! author : Robin van der Vliet : https://github.com/robin0van0der0v 33564//! author : Iustì Canun 33565 33566;(function (global, factory) { 33567 true ? factory(__webpack_require__(0)) : 33568 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 33569 factory(global.moment) 33570}(this, (function (moment) { 'use strict'; 33571 33572 //! moment.js locale configuration 33573 33574 // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals. 33575 // This is currently too difficult (maybe even impossible) to add. 33576 var tzl = moment.defineLocale('tzl', { 33577 months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split( 33578 '_' 33579 ), 33580 monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), 33581 weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), 33582 weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), 33583 weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), 33584 longDateFormat: { 33585 LT: 'HH.mm', 33586 LTS: 'HH.mm.ss', 33587 L: 'DD.MM.YYYY', 33588 LL: 'D. MMMM [dallas] YYYY', 33589 LLL: 'D. MMMM [dallas] YYYY HH.mm', 33590 LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm', 33591 }, 33592 meridiemParse: /d\'o|d\'a/i, 33593 isPM: function (input) { 33594 return "d'o" === input.toLowerCase(); 33595 }, 33596 meridiem: function (hours, minutes, isLower) { 33597 if (hours > 11) { 33598 return isLower ? "d'o" : "D'O"; 33599 } else { 33600 return isLower ? "d'a" : "D'A"; 33601 } 33602 }, 33603 calendar: {
33604 sameDay: '[oxhi à ] LT', 33605 nextDay: '[demà à ] LT', 33606 nextWeek: 'dddd [à ] LT', 33607 lastDay: '[ieiri à ] LT', 33608 lastWeek: '[sür el] dddd [lasteu à ] LT', 33609 sameElse: 'L', 33610 }, 33611 relativeTime: { 33612 future: 'osprei %s', 33613 past: 'ja%s', 33614 s: processRelativeTime, 33615 ss: processRelativeTime, 33616 m: processRelativeTime, 33617 mm: processRelativeTime, 33618 h: processRelativeTime, 33619 hh: processRelativeTime, 33620 d: processRelativeTime, 33621 dd: processRelativeTime, 33622 M: processRelativeTime, 33623 MM: processRelativeTime, 33624 y: processRelativeTime, 33625 yy: processRelativeTime, 33626 }, 33627 dayOfMonthOrdinalParse: /\d{1,2}\./, 33628 ordinal: '%d.', 33629 week: { 33630 dow: 1, // Monday is the first day of the week. 33631 doy: 4, // The week that contains Jan 4th is the first week of the year. 33632 }, 33633 }); 33634 33635 function processRelativeTime(number, withoutSuffix, key, isFuture) { 33636 var format = { 33637 s: ['viensas secunds', "'iensas secunds"], 33638 ss: [number + ' secunds', '' + number + ' secunds'], 33639 m: ["'n mÃut", "'iens mÃut"], 33640 mm: [number + ' mÃuts', '' + number + ' mÃuts'], 33641 h: ["'n þora", "'iensa þora"], 33642 hh: [number + ' þoras', '' + number + ' þoras'], 33643 d: ["'n ziua", "'iensa ziua"], 33644 dd: [number + ' ziuas', '' + number + ' ziuas'], 33645 M: ["'n mes", "'iens mes"], 33646 MM: [number + ' mesen', '' + number + ' mesen'], 33647 y: ["'n ar", "'iens ar"], 33648 yy: [number + ' ars', '' + number + ' ars'], 33649 }; 33650 return isFuture 33651 ? format[key][0] 33652 : withoutSuffix 33653 ? format[key][0] 33654 : format[key][1]; 33655 } 33656 33657 return tzl; 33658 33659}))); 33660 33661 33662/***/ }), 33663/* 124 */ 33664/***/ (function(module, exports, __webpack_require__) { 33665 33666//! moment.js locale configuration 33667//! locale : Central Atlas Tamazight [tzm] 33668//! author : Abdel Said : https://github.com/abdelsaid 33669 33670;(function (global, factory) { 33671 true ? factory(__webpack_require__(0)) : 33672 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 33673 factory(global.moment) 33674}(this, (function (moment) { 'use strict'; 33675 33676 //! moment.js locale configuration 33677 33678 var tzm = moment.defineLocale('tzm', { 33679 months: 'âµâµâµâ´°âµ¢âµ_â´±âµâ´°âµ¢âµ_âµâ´°âµâµ_âµâ´±âµâµâµ_âµâ´°âµ¢âµ¢âµ_âµ¢âµâµâµ¢âµ_âµ¢âµâµâµ¢âµâµ£_âµâµâµâµ_âµâµâµâ´°âµâ´±âµâµ_â´½âµâµâ´±âµ_âµâµâµ¡â´°âµâ´±âµâµ_â´·âµâµâµâ´±âµâµ'.split( 33680 '_' 33681 ), 33682 monthsShort: 33683 'âµâµâµâ´°âµ¢âµ_â´±âµâ´°âµ¢âµ_âµâ´°âµâµ_âµâ´±âµâµâµ_âµâ´°âµ¢âµ¢âµ_âµ¢âµâµâµ¢âµ_âµ¢âµâµâµ¢âµâµ£_âµâµâµâµ_âµâµâµâ´°âµâ´±âµâµ_â´½âµâµâ´±âµ_âµâµâµ¡â´°âµâ´±âµâµ_â´·âµâµâµâ´±âµâµ'.split( 33684 '_' 33685 ), 33686 weekdays: 'â´°âµâ´°âµâ´°âµ_â´°âµ¢âµâ´°âµ_â´°âµâµâµâ´°âµ_â´°â´½âµâ´°âµ_ⴰⴽⵡⴰâµ_â´°âµâµâµâµ¡â´°âµ_â´°âµâµâ´¹âµ¢â´°âµ'.split('_'), 33687 weekdaysShort: 'â´°âµâ´°âµâ´°âµ_â´°âµ¢âµâ´°âµ_â´°âµâµâµâ´°âµ_â´°â´½âµâ´°âµ_ⴰⴽⵡⴰâµ_â´°âµâµâµâµ¡â´°âµ_â´°âµâµâ´¹âµ¢â´°âµ'.split('_'), 33688 weekdaysMin: 'â´°âµâ´°âµâ´°âµ_â´°âµ¢âµâ´°âµ_â´°âµâµâµâ´°âµ_â´°â´½âµâ´°âµ_ⴰⴽⵡⴰâµ_â´°âµâµâµâµ¡â´°âµ_â´°âµâµâ´¹âµ¢â´°âµ'.split('_'), 33689 longDateFormat: { 33690 LT: 'HH:mm', 33691 LTS: 'HH:mm:ss', 33692 L: 'DD/MM/YYYY', 33693 LL: 'D MMMM YYYY', 33694 LLL: 'D MMMM YYYY HH:mm', 33695 LLLL: 'dddd D MMMM YYYY HH:mm', 33696 }, 33697 calendar: { 33698 sameDay: '[â´°âµâ´·âµ â´´] LT', 33699 nextDay: '[â´°âµâ´½â´° â´´] LT', 33700 nextWeek: 'dddd [â´´] LT', 33701 lastDay: '[â´°âµâ´°âµâµ â´´] LT', 33702 lastWeek: 'dddd [â´´] LT', 33703 sameElse: 'L', 33704 }, 33705 relativeTime: { 33706 future: 'ⴷⴰⴷⵠⵠⵢⴰⵠ%s', 33707 past: 'ⵢⴰⵠ%s', 33708 s: 'âµâµâµâ´½', 33709 ss: '%d âµâµâµâ´½', 33710 m: 'âµâµâµâµâ´º', 33711 mm: '%d âµâµâµâµâ´º', 33712 h: 'âµâ´°âµâ´°',
33713 hh: '%d âµâ´°âµâµâ´°âµâµâµ', 33714 d: 'â´°âµâµ', 33715 dd: '%d oâµâµâ´°âµ', 33716 M: 'â´°âµ¢oâµâµ', 33717 MM: '%d âµâµ¢âµ¢âµâµâµ', 33718 y: 'â´°âµâ´³â´°âµ', 33719 yy: '%d âµâµâ´³â´°âµâµ', 33720 }, 33721 week: { 33722 dow: 6, // Saturday is the first day of the week. 33723 doy: 12, // The week that contains Jan 12th is the first week of the year. 33724 }, 33725 }); 33726 33727 return tzm; 33728 33729}))); 33730 33731 33732/***/ }), 33733/* 125 */ 33734/***/ (function(module, exports, __webpack_require__) { 33735 33736//! moment.js locale configuration 33737//! locale : Central Atlas Tamazight Latin [tzm-latn] 33738//! author : Abdel Said : https://github.com/abdelsaid 33739 33740;(function (global, factory) { 33741 true ? factory(__webpack_require__(0)) : 33742 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 33743 factory(global.moment) 33744}(this, (function (moment) { 'use strict'; 33745 33746 //! moment.js locale configuration 33747 33748 var tzmLatn = moment.defineLocale('tzm-latn', { 33749 months: 'innayr_brˤayrˤ_marˤsˤ_ibr
33749ir_mayyw_ywnyw_ywlywz_É£wÅ¡t_Å¡wtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split( 33750 '_' 33751 ), 33752 monthsShort: 33753 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_É£wÅ¡t_Å¡wtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split( 33754 '_' 33755 ), 33756 weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiá¸yas'.split('_'), 33757 weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiá¸yas'.split('_'), 33758 weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiá¸yas'.split('_'), 33759 longDateFormat: { 33760 LT: 'HH:mm', 33761 LTS: 'HH:mm:ss', 33762 L: 'DD/MM/YYYY', 33763 LL: 'D MMMM YYYY', 33764 LLL: 'D MMMM YYYY HH:mm', 33765 LLLL: 'dddd D MMMM YYYY HH:mm', 33766 }, 33767 calendar: { 33768 sameDay: '[asdkh g] LT', 33769 nextDay: '[aska g] LT', 33770 nextWeek: 'dddd [g] LT', 33771 lastDay: '[assant g] LT', 33772 lastWeek: 'dddd [g] LT', 33773 sameElse: 'L', 33774 }, 33775 relativeTime: { 33776 future: 'dadkh s yan %s', 33777 past: 'yan %s', 33778 s: 'imik', 33779 ss: '%d imik', 33780 m: 'minuá¸', 33781 mm: '%d minuá¸', 33782 h: 'saÉa', 33783 hh: '%d tassaÉin', 33784 d: 'ass', 33785 dd: '%d ossan', 33786 M: 'ayowr', 33787 MM: '%d iyyirn', 33788 y: 'asgas', 33789 yy: '%d isgasn', 33790 }, 33791 week: { 33792 dow: 6, // Saturday is the first day of the week. 33793 doy: 12, // The week that contains Jan 12th is the first week of the year. 33794 }, 33795 }); 33796 33797 return tzmLatn; 33798 33799}))); 33800 33801 33802/***/ }), 33803/* 126 */ 33804/***/ (function(module, exports, __webpack_require__) { 33805 33806//! moment.js locale configuration 33807//! locale : Uyghur (China) [ug-cn] 33808//! author: boyaq : https://github.com/boyaq 33809 33810;(function (global, factory) { 33811 true ? factory(__webpack_require__(0)) : 33812 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 33813 factory(global.moment) 33814}(this, (function (moment) { 'use strict'; 33815 33816 //! moment.js locale configuration 33817 33818 var ugCn = moment.defineLocale('ug-cn', { 33819 months: 'ÙØ§ÙÛØ§Ø±_ÙÛÛØ±Ø§Ù_٠ارت_ئاپرÛÙ_٠اÙ_ئÙÙÛÙ_ئÙÙÛÙ_Ø¦Ø§ÛØºÛست_سÛÙØªÛØ¨ÙØ±_ئÛÙØªÛØ¨ÙØ±_ÙÙÙØ§Ø¨Ùر_دÛÙØ§Ø¨Ùر'.split( 33820 '_' 33821 ), 33822 monthsShort: 33823 'ÙØ§ÙÛØ§Ø±_ÙÛÛØ±Ø§Ù_٠ارت_ئاپرÛÙ_٠اÙ_ئÙÙÛÙ_ئÙÙÛÙ_Ø¦Ø§ÛØºÛست_سÛÙØªÛØ¨ÙØ±_ئÛÙØªÛØ¨ÙØ±_ÙÙÙØ§Ø¨Ùر_دÛÙØ§Ø¨Ùر'.split( 33824 '_' 33825 ), 33826 weekdays: 'ÙÛÙØ´ÛÙØ¨Û_Ø¯ÛØ´ÛÙØ¨Û_سÛÙØ´ÛÙØ¨Û_ÚØ§Ø±Ø´ÛÙØ¨Û_Ù¾ÛÙØ´ÛÙØ¨Û_جÛÙ Û_Ø´ÛÙØ¨Û'.split( 33827 '_' 33828 ), 33829 weekdaysShort: 'ÙÛ_دÛ_سÛ_ÚØ§_Ù¾Û_جÛ_Ø´Û'.split('_'), 33830 weekdaysMin: 'ÙÛ_دÛ_سÛ_ÚØ§_Ù¾Û_جÛ_Ø´Û'.split('_'), 33831 longDateFormat: { 33832 LT: 'HH:mm', 33833 LTS: 'HH:mm:ss', 33834 L: 'YYYY-MM-DD', 33835 LL: 'YYYY-ÙÙÙÙM-ئاÙÙÙÚD-ÙÛÙÙ', 33836 LLL: 'YYYY-ÙÙÙÙM-ئاÙÙÙÚD-ÙÛÙÙØ HH:mm', 33837 LLLL: 'ddddØ YYYY-ÙÙÙÙM-ئاÙÙÙÚD-ÙÛÙÙØ HH:mm', 33838 }, 33839 meridiemParse: /ÙÛØ±ÙÙ ÙÛÚÛ|سÛÚ¾ÛØ±|ÚÛØ´ØªÙÙ Ø¨ÛØ±ÛÙ|ÚÛØ´|ÚÛØ´ØªÙÙ ÙÛÙÙÙ|ÙÛÚ/, 33840 meridiemHour: function (hour, meridiem) { 33841 if (hour === 12) { 33842 hour = 0; 33843 } 33844 if ( 33845 meridiem === 'ÙÛØ±ÙÙ ÙÛÚÛ' || 33846 meridiem === 'سÛÚ¾ÛØ±' || 33847 meridiem === 'ÚÛØ´ØªÙÙ Ø¨ÛØ±ÛÙ' 33848 ) { 33849 return hour; 33850 } else if (meridiem === 'ÚÛØ´ØªÙÙ ÙÛÙÙÙ' || meridiem === 'ÙÛÚ') { 33851 return hour + 12; 33852 } else { 33853 return hour >= 11 ? hour : hour + 12; 33854 } 33855 }, 33856 meridiem: function (hour, minute, isLower) { 33857 var hm = hour * 100 + minute; 33858 if (hm < 600) { 33859 return 'ÙÛØ±ÙÙ ÙÛÚÛ'; 33860 } else if (hm < 900) { 33861 return 'سÛÚ¾ÛØ±'; 33862 } else if (hm < 1130) {
vendor: 14,355 bytes, lines 33863-34281
33863 return 'ÚÛØ´ØªÙÙ Ø¨ÛØ±ÛÙ'; 33864 } else if (hm < 1230) { 33865 return 'ÚÛØ´'; 33866 } else if (hm < 1800) { 33867 return 'ÚÛØ´ØªÙÙ ÙÛÙÙÙ'; 33868 } else { 33869 return 'ÙÛÚ'; 33870 } 33871 }, 33872 calendar: { 33873 sameDay: '[بÛÚ¯ÛÙ Ø³Ø§Ø¦ÛØª] LT', 33874 nextDay: '[Ø¦ÛØªÛ Ø³Ø§Ø¦ÛØª] LT', 33875 nextWeek: '[ÙÛÙÛØ±ÙÙ] dddd [Ø³Ø§Ø¦ÛØª] LT', 33876 lastDay: '[تÛÙÛÚ¯ÛÙ] LT', 33877 lastWeek: '[Ø¦Ø§ÙØ¯ÙÙÙÙ] dddd [Ø³Ø§Ø¦ÛØª] LT', 33878 sameElse: 'L', 33879 }, 33880 relativeTime: { 33881 future: '%s ÙÛÙÙÙ', 33882 past: '%s Ø¨ÛØ±ÛÙ', 33883 s: 'ÙÛÚÚÛ Ø³ÛÙÙÙØª', 33884 ss: '%d سÛÙÙÙØª', 33885 m: 'Ø¨ÙØ± Ù ÙÙÛØª', 33886 mm: '%d Ù ÙÙÛØª', 33887 h: 'Ø¨ÙØ± Ø³Ø§Ø¦ÛØª', 33888 hh: '%d Ø³Ø§Ø¦ÛØª', 33889 d: 'Ø¨ÙØ± ÙÛÙ', 33890 dd: '%d ÙÛÙ', 33891 M: 'Ø¨ÙØ± ئاÙ', 33892 MM: '%d ئاÙ', 33893 y: 'Ø¨ÙØ± ÙÙÙ', 33894 yy: '%d ÙÙÙ', 33895 }, 33896 33897 dayOfMonthOrdinalParse: /\d{1,2}(-ÙÛÙÙ|-ئاÙ|-Ú¾ÛپتÛ)/, 33898 ordinal: function (number, period) { 33899 switch (period) { 33900 case 'd': 33901 case 'D': 33902 case 'DDD': 33903 return number + '-ÙÛÙÙ'; 33904 case 'w': 33905 case 'W': 33906 return number + '-Ú¾ÛپتÛ'; 33907 default: 33908 return number; 33909 } 33910 }, 33911 preparse: function (string) { 33912 return string.replace(/Ø/g, ','); 33913 }, 33914 postformat: function (string) { 33915 return string.replace(/,/g, 'Ø'); 33916 }, 33917 week: { 33918 // GB/T 7408-1994ãæ°æ®å åäº¤æ¢æ ¼å¼Â·ä¿¡æ¯äº¤æ¢Â·æ¥æåæ¶é´è¡¨ç¤ºæ³ãä¸ISO 8601:1988çæ 33919 dow: 1, // Monday is the first day of the week. 33920 doy: 7, // The week that contains Jan 1st is the first week of the year. 33921 }, 33922 }); 33923 33924 return ugCn; 33925 33926}))); 33927 33928 33929/***/ }), 33930/* 127 */ 33931/***/ (function(module, exports, __webpack_require__) { 33932 33933//! moment.js locale configuration 33934//! locale : Ukrainian [uk] 33935//! author : zemlanin : https://github.com/zemlanin 33936//! Author : Menelion Elensúle : https://github.com/Oire 33937 33938;(function (global, factory) { 33939 true ? factory(__webpack_require__(0)) : 33940 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 33941 factory(global.moment) 33942}(this, (function (moment) { 'use strict'; 33943 33944 //! moment.js locale configuration 33945 33946 function plural(word, num) { 33947 var forms = word.split('_'); 33948 return num % 10 === 1 && num % 100 !== 11 33949 ? forms[0] 33950 : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) 33951 ? forms[1] 33952 : forms[2]; 33953 } 33954 function relativeTimeWithPlural(number, withoutSuffix, key) { 33955 var format = { 33956 ss: withoutSuffix ? 'ÑекÑнда_ÑекÑнди_ÑекÑнд' : 'ÑекÑндÑ_ÑекÑнди_ÑекÑнд', 33957 mm: withoutSuffix ? 'Ñ Ð²Ð¸Ð»Ð¸Ð½Ð°_Ñ Ð²Ð¸Ð»Ð¸Ð½Ð¸_Ñ Ð²Ð¸Ð»Ð¸Ð½' : 'Ñ Ð²Ð¸Ð»Ð¸Ð½Ñ_Ñ Ð²Ð¸Ð»Ð¸Ð½Ð¸_Ñ Ð²Ð¸Ð»Ð¸Ð½', 33958 hh: withoutSuffix ? 'година_години_годин' : 'годинÑ_години_годин', 33959 dd: 'денÑ_днÑ_днÑв', 33960 MM: 'мÑÑÑÑÑ_мÑÑÑÑÑ_мÑÑÑÑÑв', 33961 yy: 'ÑÑк_Ñоки_ÑокÑв', 33962 }; 33963 if (key === 'm') { 33964 return withoutSuffix ? 'Ñ Ð²Ð¸Ð»Ð¸Ð½Ð°' : 'Ñ Ð²Ð¸Ð»Ð¸Ð½Ñ'; 33965 } else if (key === 'h') { 33966 return withoutSuffix ? 'година' : 'годинÑ'; 33967 } else { 33968 return number + ' ' + plural(format[key], +number); 33969 } 33970 } 33971 function weekdaysCaseReplace(m, format) { 33972 var weekdays = { 33973 nominative: 33974 'недÑлÑ_понедÑлок_вÑвÑоÑок_ÑеÑеда_ÑеÑвеÑ_пâÑÑниÑÑ_ÑÑбоÑа'.split( 33975 '_' 33976 ), 33977 accusative: 33978 'недÑлÑ_понедÑлок_вÑвÑоÑок_ÑеÑедÑ_ÑеÑвеÑ_пâÑÑниÑÑ_ÑÑбоÑÑ'.split( 33979 '_' 33980 ), 33981 genitive: 33982 'недÑлÑ_понедÑлка_вÑвÑоÑка_ÑеÑеди_ÑеÑвеÑга_пâÑÑниÑÑ_ÑÑбоÑи'.split( 33983 '_' 33984 ), 33985 }, 33986 nounCase; 33987 33988 if (m === true) { 33989 return weekdays['nominative'] 33990 .slice(1, 7) 33991 .concat(weekdays['nominative'].slice(0, 1)); 33992 } 33993 if (!m) { 33994 return weekdays['nominative']; 33995 } 33996 33997 nounCase = /(\[[ÐвУÑ]\]) ?dddd/.test(format) 33998 ? 'accusative' 33999 : /\[?(?:минÑлоÑ|наÑÑÑпноÑ)? ?\] ?dddd/.test(format) 34000 ? 'genitive' 34001 : 'nominative'; 34002 return weekdays[nounCase][m.day()]; 34003 } 34004 function processHoursFunction(str) { 34005 return function () { 34006 return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT'; 34007 }; 34008 } 34009 34010 var uk = moment.defineLocale('uk', { 34011 months: { 34012 format: 'ÑÑÑнÑ_лÑÑого_беÑезнÑ_квÑÑнÑ_ÑÑавнÑ_ÑеÑвнÑ_липнÑ_ÑеÑпнÑ_веÑеÑнÑ_жовÑнÑ_лиÑÑопада_гÑÑднÑ'.split( 34013 '_' 34014 ), 34015 standalone: 34016 'ÑÑÑенÑ_лÑÑий_беÑезенÑ_квÑÑенÑ_ÑÑавенÑ_ÑеÑвенÑ_липенÑ_ÑеÑпенÑ_веÑеÑенÑ_жовÑенÑ_лиÑÑопад_гÑÑденÑ'.split( 34017 '_' 34018 ), 34019 }, 34020 monthsShort: 'ÑÑÑ_лÑÑ_беÑ_квÑÑ_ÑÑав_ÑеÑв_лип_ÑеÑп_веÑ_жовÑ_лиÑÑ_гÑÑд'.split( 34021 '_' 34022 ), 34023 weekdays: weekdaysCaseReplace, 34024 weekdaysShort: 'нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 34025 weekdaysMin: 'нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб'.split('_'), 34026 longDateFormat: { 34027 LT: 'HH:mm', 34028 LTS: 'HH:mm:ss', 34029 L: 'DD.MM.YYYY', 34030 LL: 'D MMMM YYYY Ñ.', 34031 LLL: 'D MMMM YYYY Ñ., HH:mm', 34032 LLLL: 'dddd, D MMMM YYYY Ñ., HH:mm', 34033 }, 34034 calendar: { 34035 sameDay: processHoursFunction('[СÑÐ¾Ð³Ð¾Ð´Ð½Ñ '), 34036 nextDay: processHoursFunction('[ÐавÑÑа '), 34037 lastDay: processHoursFunction('[ÐÑоÑа '), 34038 nextWeek: processHoursFunction('[У] dddd ['), 34039 lastWeek: function () { 34040 switch (this.day()) { 34041 case 0: 34042 case 3: 34043 case 5: 34044 case 6: 34045 return processHoursFunction('[ÐинÑлоÑ] dddd [').call(this); 34046 case 1: 34047 case 2: 34048 case 4: 34049 return processHoursFunction('[ÐинÑлого] dddd [').call(this); 34050 } 34051 }, 34052 sameElse: 'L', 34053 }, 34054 relativeTime: { 34055 future: 'за %s', 34056 past: '%s ÑомÑ', 34057 s: 'декÑлÑка ÑекÑнд', 34058 ss: relativeTimeWithPlural, 34059 m: relativeTimeWithPlural, 34060 mm: relativeTimeWithPlural, 34061 h: 'годинÑ', 34062 hh: relativeTimeWithPlural, 34063 d: 'денÑ', 34064 dd: relativeTimeWithPlural, 34065 M: 'мÑÑÑÑÑ', 34066 MM: relativeTimeWithPlural, 34067 y: 'ÑÑк', 34068 yy: relativeTimeWithPlural, 34069 }, 34070 // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason 34071 meridiemParse: /ноÑÑ|ÑанкÑ|днÑ|веÑоÑа/, 34072 isPM: function (input) { 34073 return /^(днÑ|веÑоÑа)$/.test(input); 34074 }, 34075 meridiem: function (hour, minute, isLower) { 34076 if (hour < 4) { 34077 return 'ноÑÑ'; 34078 } else if (hour < 12) { 34079 return 'ÑанкÑ'; 34080 } else if (hour < 17) { 34081 return 'днÑ'; 34082 } else { 34083 return 'веÑоÑа'; 34084 } 34085 }, 34086 dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/, 34087 ordinal: function (number, period) { 34088 switch (period) { 34089 case 'M': 34090 case 'd': 34091 case 'DDD': 34092 case 'w': 34093 case 'W': 34094 return number + '-й'; 34095 case 'D': 34096 return number + '-го'; 34097 default: 34098 return number; 34099 } 34100 }, 34101 week: { 34102 dow: 1, // Monday is the first day of the week. 34103 doy: 7, // The week that contains Jan 7th is the first week of the year. 34104 }, 34105 }); 34106 34107 return uk; 34108 34109}))); 34110 34111 34112/***/ }), 34113/* 128 */ 34114/***/ (function(module, exports, __webpack_require__) { 34115 34116//! moment.js locale configuration 34117//! locale : Urdu [ur] 34118//! author : Sawood Alam : https://github.com/ibnesayeed 34119//! author : Zack : https://github.com/ZackVision 34120 34121;(function (global, factory) { 34122 true ? factory(__webpack_require__(0)) : 34123 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 34124 factory(global.moment) 34125}(this, (function (moment) { 'use strict'; 34126 34127 //! moment.js locale configuration 34128 34129 var months = [ 34130 'جÙÙØ±Û', 34131 'ÙØ±ÙرÛ', 34132 '٠ارÚ', 34133 'اپرÛÙ', 34134 '٠ئÛ', 34135 'جÙÙ', 34136 'جÙÙØ§Ø¦Û', 34137 'اگست', 34138 'ست٠بر', 34139 'Ø§Ú©ØªÙØ¨Ø±', 34140 'ÙÙ٠بر', 34141 'دس٠بر', 34142 ], 34143 days = ['Ø§ØªÙØ§Ø±', 'Ù¾ÛØ±', 'Ù ÙÚ¯Ù', 'بدھ', 'ج٠عرات', 'ج٠عÛ', 'ÛÙØªÛ']; 34144 34145 var ur = moment.defineLocale('ur', { 34146 months: months, 34147 monthsShort: months, 34148 weekdays: days, 34149 weekdaysShort: days, 34150 weekdaysMin: days, 34151 longDateFormat: { 34152 LT: 'HH:mm', 34153 LTS: 'HH:mm:ss', 34154 L: 'DD/MM/YYYY', 34155 LL: 'D MMMM YYYY', 34156 LLL: 'D MMMM YYYY HH:mm', 34157 LLLL: 'ddddØ D MMMM YYYY HH:mm', 34158 }, 34159 meridiemParse: /صبØ|شا٠/, 34160 isPM: function (input) { 34161 return 'شا٠' === input; 34162 }, 34163 meridiem: function (hour, minute, isLower) { 34164 if (hour < 12) { 34165 return 'صبØ'; 34166 } 34167 return 'شا٠'; 34168 }, 34169 calendar: { 34170 sameDay: '[آج بÙÙØª] LT', 34171 nextDay: '[ک٠بÙÙØª] LT', 34172 nextWeek: 'dddd [بÙÙØª] LT', 34173 lastDay: '[Ú¯Ø°Ø´ØªÛ Ø±ÙØ² بÙÙØª] LT', 34174 lastWeek: '[گذشتÛ] dddd [بÙÙØª] LT', 34175 sameElse: 'L', 34176 }, 34177 relativeTime: { 34178 future: '%s بعد', 34179 past: '%s ÙØ¨Ù', 34180 s: 'ÚÙØ¯ سÛÚ©ÙÚ', 34181 ss: '%d سÛÚ©ÙÚ', 34182 m: 'اÛÚ© Ù ÙÙ¹', 34183 mm: '%d Ù ÙÙ¹', 34184 h: 'اÛÚ© Ú¯Ú¾ÙÙ¹Û', 34185 hh: '%d Ú¯Ú¾ÙÙ¹Û', 34186 d: 'اÛÚ© دÙ', 34187 dd: '%d دÙ', 34188 M: 'اÛÚ© ٠اÛ', 34189 MM: '%d ٠اÛ', 34190 y: 'اÛÚ© ساÙ', 34191 yy: '%d ساÙ', 34192 }, 34193 preparse: function (string) { 34194 return string.replace(/Ø/g, ','); 34195 }, 34196 postformat: function (string) { 34197 return string.replace(/,/g, 'Ø'); 34198 }, 34199 week: { 34200 dow: 1, // Monday is the first day of the week. 34201 doy: 4, // The week that contains Jan 4th is the first week of the year. 34202 }, 34203 }); 34204 34205 return ur; 34206 34207}))); 34208 34209 34210/***/ }), 34211/* 129 */ 34212/***/ (function(module, exports, __webpack_require__) { 34213 34214//! moment.js locale configuration 34215//! locale : Uzbek [uz] 34216//! author : Sardor Muminov : https://github.com/muminoff 34217 34218;(function (global, factory) { 34219 true ? factory(__webpack_require__(0)) : 34220 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 34221 factory(global.moment) 34222}(this, (function (moment) { 'use strict'; 34223 34224 //! moment.js locale configuration 34225 34226 var uz = moment.defineLocale('uz', { 34227 months: 'ÑнваÑ_ÑевÑал_маÑÑ_апÑел_май_иÑн_иÑл_авгÑÑÑ_ÑенÑÑбÑ_окÑÑбÑ_ноÑбÑ_декабÑ'.split( 34228 '_' 34229 ), 34230 monthsShort: 'Ñнв_Ñев_маÑ_апÑ_май_иÑн_иÑл_авг_Ñен_окÑ_ноÑ_дек'.split('_'), 34231 weekdays: 'ЯкÑанба_ÐÑÑанба_СеÑанба_ЧоÑÑанба_ÐайÑанба_ÐÑма_Шанба'.split('_'), 34232 weekdaysShort: 'ЯкÑ_ÐÑÑ_СеÑ_ЧоÑ_Ðай_ÐÑм_Шан'.split('_'), 34233 weekdaysMin: 'Як_ÐÑ_Се_Чо_Ðа_ÐÑ_Ша'.split('_'), 34234 longDateFormat: { 34235 LT: 'HH:mm', 34236 LTS: 'HH:mm:ss', 34237 L: 'DD/MM/YYYY', 34238 LL: 'D MMMM YYYY', 34239 LLL: 'D MMMM YYYY HH:mm', 34240 LLLL: 'D MMMM YYYY, dddd HH:mm', 34241 }, 34242 calendar: { 34243 sameDay: '[ÐÑгÑн ÑоаÑ] LT [да]', 34244 nextDay: '[ÐÑÑага] LT [да]', 34245 nextWeek: 'dddd [кÑни ÑоаÑ] LT [да]', 34246 lastDay: '[ÐеÑа ÑоаÑ] LT [да]', 34247 lastWeek: '[УÑган] dddd [кÑни ÑоаÑ] LT [да]', 34248 sameElse: 'L', 34249 }, 34250 relativeTime: { 34251 future: 'Якин %s иÑида', 34252 past: 'ÐÐ¸Ñ Ð½ÐµÑа %s олдин', 34253 s: 'ÑÑÑÑаÑ', 34254 ss: '%d ÑÑÑÑаÑ', 34255 m: 'Ð±Ð¸Ñ Ð´Ð°ÐºÐ¸ÐºÐ°', 34256 mm: '%d дакика', 34257 h: 'Ð±Ð¸Ñ ÑоаÑ', 34258 hh: '%d ÑоаÑ', 34259 d: 'Ð±Ð¸Ñ ÐºÑн', 34260 dd: '%d кÑн', 34261 M: 'Ð±Ð¸Ñ Ð¾Ð¹', 34262 MM: '%d ой', 34263 y: 'Ð±Ð¸Ñ Ð¹Ð¸Ð»', 34264 yy: '%d йил', 34265 }, 34266 week: { 34267 dow: 1, // Monday is the first day of the week. 34268 doy: 7, // The week that contains Jan 4th is the first week of the year. 34269 }, 34270 }); 34271 34272 return uz; 34273 34274}))); 34275 34276 34277/***/ }), 34278/* 130 */ 34279/***/ (function(module, exports, __webpack_require__) { 34280 34281//! moment.js locale configuration
34282//! locale : Uzbek Latin [uz-latn] 34283//! author : Rasulbek Mirzayev : github.com/Rasulbeeek 34284 34285;(function (global, factory) { 34286 true ? factory(__webpack_require__(0)) : 34287 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 34288 factory(global.moment) 34289}(this, (function (moment) { 'use strict'; 34290 34291 //! moment.js locale configuration 34292 34293 var uzLatn = moment.defineLocale('uz-latn', { 34294 months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split( 34295 '_' 34296 ), 34297 monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), 34298 weekdays: 34299 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split( 34300 '_' 34301 ), 34302 weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), 34303 weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), 34304 longDateFormat: { 34305 LT: 'HH:mm', 34306 LTS: 'HH:mm:ss', 34307 L: 'DD/MM/YYYY', 34308 LL: 'D MMMM YYYY', 34309 LLL: 'D MMMM YYYY HH:mm', 34310 LLLL: 'D MMMM YYYY, dddd HH:mm', 34311 }, 34312 calendar: { 34313 sameDay: '[Bugun soat] LT [da]', 34314 nextDay: '[Ertaga] LT [da]', 34315 nextWeek: 'dddd [kuni soat] LT [da]', 34316 lastDay: '[Kecha soat] LT [da]', 34317 lastWeek: "[O'tgan] dddd [kuni soat] LT [da]", 34318 sameElse: 'L', 34319 }, 34320 relativeTime: { 34321 future: 'Yaqin %s ichida', 34322 past: 'Bir necha %s oldin', 34323 s: 'soniya', 34324 ss: '%d soniya', 34325 m: 'bir daqiqa', 34326 mm: '%d daqiqa', 34327 h: 'bir soat', 34328 hh: '%d soat', 34329 d: 'bir kun', 34330 dd: '%d kun', 34331 M: 'bir oy', 34332 MM: '%d oy', 34333 y: 'bir yil', 34334 yy: '%d yil', 34335 }, 34336 week: { 34337 dow: 1, // Monday is the first day of the week. 34338 doy: 7, // The week that contains Jan 7th is the first week of the year. 34339 }, 34340 }); 34341 34342 return uzLatn; 34343 34344}))); 34345 34346 34347/***/ }), 34348/* 131 */ 34349/***/ (function(module, exports, __webpack_require__) { 34350 34351//! moment.js locale configuration 34352//! locale : Vietnamese [vi] 34353//! author : Bang Nguyen : https://github.com/bangnk 34354//! author : Chien Kira : https://github.com/chienkira 34355 34356;(function (global, factory) { 34357 true ? factory(__webpack_require__(0)) : 34358 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 34359 factory(global.moment) 34360}(this, (function (moment) { 'use strict'; 34361 34362 //! moment.js locale configuration 34363 34364 var vi = moment.defineLocale('vi', { 34365 months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split( 34366 '_' 34367 ), 34368 monthsShort: 34369 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split( 34370 '_' 34371 ), 34372 monthsParseExact: true, 34373 weekdays: 'chá»§ nháºt_thứ hai_thứ ba_thứ tư_thứ nÄm_thứ sáu_thứ bảy'.split( 34374 '_' 34375 ), 34376 weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), 34377 weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), 34378 weekdaysParseExact: true, 34379 meridiemParse: /sa|ch/i, 34380 isPM: function (input) { 34381 return /^ch$/i.test(input); 34382 }, 34383 meridiem: function (hours, minutes, isLower) { 34384 if (hours < 12) { 34385 return isLower ? 'sa' : 'SA'; 34386 } else { 34387 return isLower ? 'ch' : 'CH'; 34388 } 34389 }, 34390 longDateFormat: { 34391 LT: 'HH:mm', 34392 LTS: 'HH:mm:ss', 34393 L: 'DD/MM/YYYY', 34394 LL: 'D MMMM [nÄm] YYYY', 34395 LLL: 'D MMMM [nÄm] YYYY HH:mm', 34396 LLLL: 'dddd, D MMMM [nÄm] YYYY HH:mm', 34397 l: 'DD/M/YYYY', 34398 ll: 'D MMM YYYY', 34399 lll: 'D MMM YYYY HH:mm', 34400 llll: 'ddd, D MMM YYYY HH:mm', 34401 }, 34402 calendar: { 34403 sameDay: '[Hôm nay lúc] LT', 34404 nextDay: '[Ngà y mai lúc] LT', 34405 nextWeek: 'dddd [tuần tá»i lúc] LT', 34406 lastDay: '[Hôm qua lúc] LT', 34407 lastWeek: 'dddd [tuần trưá»c lúc] LT', 34408 sameElse: 'L', 34409 }, 34410 relativeTime: { 34411 future: '%s tá»i', 34412 past: '%s trưá»c', 34413 s: 'và i giây', 34414 ss: '%d giây', 34415 m: 'má»t phút', 34416 mm: '%d phút', 34417 h: 'má»t giá»', 34418 hh: '%d giá»', 34419 d: 'má»t ngà y', 34420 dd: '%d ngà y', 34421 w: 'má»t tuần', 34422 ww: '%d tuần', 34423 M: 'má»t tháng', 34424 MM: '%d tháng', 34425 y: 'má»t nÄm', 34426 yy: '%d nÄm', 34427 }, 34428 dayOfMonthOrdinalParse: /\d{1,2}/, 34429 ordinal: function (number) { 34430 return number; 34431 }, 34432 week: { 34433 dow: 1, // Monday is the first day of the week. 34434 doy: 4, // The week that contains Jan 4th is the first week of the year. 34435 }, 34436 }); 34437 34438 return vi; 34439 34440}))); 34441 34442 34443/***/ }), 34444/* 132 */ 34445/***/ (function(module, exports, __webpack_require__) { 34446 34447//! moment.js locale configuration 34448//! locale : Pseudo [x-pseudo] 34449//! author : Andrew Hood : https://github.com/andrewhood125 34450 34451;(function (global, factory) { 34452 true ? factory(__webpack_require__(0)) : 34453 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 34454 factory(global.moment) 34455}(this, (function (moment) { 'use strict'; 34456 34457 //! moment.js locale configuration 34458 34459 var xPseudo = moment.defineLocale('x-pseudo', { 34460 months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Ãp~rÃl_~Máý_~Júñé~_Júl~ý_Ãú~gúst~_Sép~témb~ér_Ã~ctób~ér_Ã~óvém~bér_~Décé~mbér'.split( 34461 '_' 34462 ), 34463 monthsShort: 34464 'J~áñ_~Féb_~Már_~Ãpr_~Máý_~Júñ_~Júl_~Ãúg_~Sép_~Ãct_~Ãóv_~Déc'.
34464split( 34465 '_' 34466 ), 34467 monthsParseExact: true, 34468 weekdays: 34469 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~FrÃd~áý_S~átúr~dáý'.split( 34470 '_' 34471 ), 34472 weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~FrÃ_~Sát'.split('_'), 34473 weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'), 34474 weekdaysParseExact: true, 34475 longDateFormat: { 34476 LT: 'HH:mm', 34477 L: 'DD/MM/YYYY', 34478 LL: 'D MMMM YYYY', 34479 LLL: 'D MMMM YYYY HH:mm', 34480 LLLL: 'dddd, D MMMM YYYY HH:mm', 34481 }, 34482 calendar: { 34483 sameDay: '[T~ódá~ý át] LT', 34484 nextDay: '[T~ómó~rró~w át] LT', 34485 nextWeek: 'dddd [át] LT', 34486 lastDay: '[Ã~ést~érdá~ý át] LT', 34487 lastWeek: '[L~ást] dddd [át] LT', 34488 sameElse: 'L', 34489 }, 34490 relativeTime: { 34491 future: 'Ã~ñ %s', 34492 past: '%s á~gó', 34493 s: 'á ~féw ~sécó~ñds', 34494 ss: '%d s~écóñ~ds',
34495 m: 'á ~mÃñ~úté', 34496 mm: '%d m~Ãñú~tés', 34497 h: 'á~ñ hó~úr', 34498 hh: '%d h~óúrs', 34499 d: 'á ~dáý', 34500 dd: '%d d~áýs', 34501 M: 'á ~móñ~th', 34502 MM: '%d m~óñt~hs', 34503 y: 'á ~ýéár', 34504 yy: '%d ý~éárs', 34505 }, 34506 dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, 34507 ordinal: function (number) { 34508 var b = number % 10, 34509 output = 34510 ~~((number % 100) / 10) === 1 34511 ? 'th' 34512 : b === 1 34513 ? 'st' 34514 : b === 2 34515 ? 'nd' 34516 : b === 3 34517 ? 'rd' 34518 : 'th'; 34519 return number + output; 34520 }, 34521 week: { 34522 dow: 1, // Monday is the first day of the week. 34523 doy: 4, // The week that contains Jan 4th is the first week of the year. 34524 }, 34525 }); 34526 34527 return xPseudo; 34528 34529}))); 34530 34531 34532/***/ }), 34533/* 133 */ 34534/***/ (function(module, exports, __webpack_require__) { 34535 34536//! moment.js locale configuration 34537//! locale : Yoruba Nigeria [yo] 34538//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe 34539 34540;(function (global, factory) { 34541 true ? factory(__webpack_require__(0)) : 34542 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 34543 factory(global.moment) 34544}(this, (function (moment) { 'use strict'; 34545 34546 //! moment.js locale configuration 34547 34548 var yo = moment.defineLocale('yo', { 34549 months: 'SẹÌrẹÌ_EÌreÌleÌ_ẸrẹÌnaÌ_IÌgbeÌ_EÌbibi_OÌkuÌdu_Agẹmo_OÌguÌn_Owewe_á»ÌwaÌraÌ_BeÌluÌ_á»ÌpẹÌÌ'.split( 34550 '_' 34551 ), 34552 monthsShort: 'SẹÌr_EÌrl_Ẹrn_IÌgb_EÌbi_OÌkuÌ_Agẹ_OÌguÌ_Owe_á»ÌwaÌ_BeÌl_á»ÌpẹÌÌ'.split('_'), 34553 weekdays: 'AÌiÌkuÌ_AjeÌ_IÌsẹÌgun_á»já»ÌruÌ_á»já»Ìbá»_ẸtiÌ_AÌbaÌmẹÌta'.split('_'), 34554 weekdaysShort: 'AÌiÌk_AjeÌ_IÌsẹÌ_á»jr_á»jb_ẸtiÌ_AÌbaÌ'.split('_'), 34555 weekdaysMin: 'AÌiÌ_Aj_IÌs_á»r_á»b_Ẹt_AÌb'.split('_'), 34556 longDateFormat: { 34557 LT: 'h:mm A', 34558 LTS: 'h:mm:ss A', 34559 L: 'DD/MM/YYYY', 34560 LL: 'D MMMM YYYY', 34561 LLL: 'D MMMM YYYY h:mm A', 34562 LLLL: 'dddd, D MMMM YYYY h:mm A', 34563 }, 34564 calendar: { 34565 sameDay: '[OÌniÌ ni] LT', 34566 nextDay: '[á»Ìla ni] LT', 34567 nextWeek: "dddd [á»sáº¹Ì toÌn'bá»] [ni] LT", 34568 lastDay: '[AÌna ni] LT', 34569 lastWeek: 'dddd [á»sáº¹Ì toÌlá»Ì] [ni] LT', 34570 sameElse: 'L', 34571 }, 34572 relativeTime: { 34573 future: 'niÌ %s', 34574 past: '%s ká»jaÌ', 34575 s: 'iÌsẹjuÌ aayaÌ die', 34576 ss: 'aayaÌ %d', 34577 m: 'iÌsẹjuÌ kan', 34578 mm: 'iÌsẹjuÌ %d', 34579 h: 'waÌkati kan', 34580 hh: 'waÌkati %d', 34581 d: 'á»já»Ì kan', 34582 dd: 'á»já»Ì %d', 34583 M: 'osuÌ kan', 34584 MM: 'osuÌ %d', 34585 y: 'á»duÌn kan', 34586 yy: 'á»duÌn %d', 34587 }, 34588 dayOfMonthOrdinalParse: /á»já»Ì\s\d{1,2}/, 34589 ordinal: 'á»já»Ì %d', 34590 week: { 34591 dow: 1, // Monday is the first day of the week. 34592 doy: 4, // The week that contains Jan 4th is the first week of the year. 34593 }, 34594 }); 34595 34596 return yo; 34597 34598}))); 34599 34600 34601/***/ }), 34602/* 134 */ 34603/***/ (function(module, exports, __webpack_require__) { 34604 34605//! moment.js locale configuration 34606//! locale : Chinese (China) [zh-cn] 34607//! author : suupic : https://github.com/suupic 34608//! author : Zeno Zeng : https://github.com/zenozeng 34609//! author : uu109 : https://github.com/uu109 34610 34611;(function (global, factory) { 34612 true ? factory(__webpack_require__(0)) : 34613 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 34614 factory(global.moment) 34615}(this, (function (moment) { 'use strict'; 34616 34617 //! moment.js locale configuration 34618 34619 var zhCn = moment.defineLocale('zh-cn', { 34620 months: '䏿_äºæ_䏿_åæ_äºæ_å æ_䏿_å «æ_乿_åæ_å䏿_åäºæ'.split( 34621 '_' 34622 ), 34623 monthsShort: '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split( 34624 '_' 34625 ), 34626 weekdays: 'æææ¥_ææä¸_ææäº_ææä¸_ææå_ææäº_ææå '.split('_'), 34627 weekdaysShort: '卿¥_å¨ä¸_å¨äº_å¨ä¸_å¨å_å¨äº_å¨å '.split('_'), 34628 weekdaysMin: 'æ¥_ä¸_äº_ä¸_å_äº_å '.split('_'), 34629 longDateFormat: { 34630 LT: 'HH:mm', 34631 LTS: 'HH:mm:ss', 34632 L: 'YYYY/MM/DD', 34633 LL: 'YYYYå¹´MæDæ¥', 34634 LLL: 'YYYYå¹´MæDæ¥Ahç¹mmå', 34635 LLLL: 'YYYYå¹´MæDæ¥ddddAhç¹mmå', 34636 l: 'YYYY/M/D', 34637 ll: 'YYYYå¹´MæDæ¥', 34638 lll: 'YYYYå¹´MæDæ¥ HH:mm', 34639 llll: 'YYYYå¹´MæDæ¥dddd HH:mm', 34640 }, 34641 meridiemParse: /忍|æ©ä¸|ä¸å|ä¸å|ä¸å|æä¸/, 34642 meridiemHour: function (hour, meridiem) { 34643 if (hour === 12) { 34644 hour = 0; 34645 } 34646 if (meridiem === '忍' || meridiem === 'æ©ä¸' || meridiem === 'ä¸å') { 34647 return hour; 34648 } else if (meridiem === 'ä¸å' || meridiem === 'æä¸') { 34649 return hour + 12; 34650 } else { 34651 // 'ä¸å' 34652 return hour >= 11 ? hour : hour + 12; 34653 } 34654 }, 34655 meridiem: function (hour, minute, isLower) { 34656 var hm = hour * 100 + minute; 34657 if (hm < 600) { 34658 return '忍'; 34659 } else if (hm < 900) { 34660 return 'æ©ä¸'; 34661 } else if (hm < 1130) { 34662 return 'ä¸å'; 34663 } else if (hm < 1230) { 34664 return 'ä¸å'; 34665 } else if (hm < 1800) { 34666 return 'ä¸å'; 34667 } else { 34668 return 'æä¸'; 34669 } 34670 }, 34671 calendar: { 34672 sameDay: '[ä»å¤©]LT', 34673 nextDay: '[æå¤©]LT', 34674 nextWeek: function (now) { 34675 if (now.week() !== this.week()) { 34676 return '[ä¸]dddLT'; 34677 } else { 34678 return '[æ¬]dddLT'; 34679 } 34680 }, 34681 lastDay: '[æ¨å¤©]LT', 34682 lastWeek: function (now) { 34683 if (this.week() !== now.week()) { 34684 return '[ä¸]dddLT'; 34685 } else { 34686 return '[æ¬]dddLT'; 34687 } 34688 }, 34689 sameElse: 'L', 34690 }, 34691 dayOfMonthOrdinalParse: /\d{1,2}(æ¥|æ|å¨)/, 34692 ordinal: function (number, period) { 34693 switch (period) { 34694 case 'd': 34695 case 'D': 34696 case 'DDD': 34697 return number + 'æ¥'; 34698 case 'M': 34699 return number + 'æ'; 34700 case 'w': 34701 case 'W': 34702 return number + 'å¨'; 34703 default: 34704 return number; 34705 } 34706 }, 34707 relativeTime: { 34708 future: '%så', 34709 past: '%så', 34710 s: 'å ç§', 34711 ss: '%d ç§', 34712 m: '1 åé', 34713 mm: '%d åé', 34714 h: '1 å°æ¶', 34715 hh: '%d å°æ¶', 34716 d: '1 天', 34717 dd: '%d 天', 34718 w: '1 å¨', 34719 ww: '%d å¨', 34720 M: '1 个æ', 34721 MM: '%d 个æ', 34722 y: '1 å¹´', 34723 yy: '%d å¹´', 34724 }, 34725 week: { 34726 // GB/T 7408-1994ãæ°æ®å åäº¤æ¢æ ¼å¼Â·ä¿¡æ¯äº¤æ¢Â·æ¥æåæ¶é´è¡¨ç¤ºæ³ãä¸ISO 8601:1988çæ 34727 dow: 1, // Monday is the first day of the week. 34728 doy: 4, // The week that contains Jan 4th is the first week of the year. 34729 }, 34730 }); 34731 34732 return zhCn; 34733 34734}))); 34735 34736 34737/***/ }), 34738/* 135 */ 34739/***/ (function(module, exports, __webpack_require__) { 34740 34741//! moment.js locale configuration 34742//! locale : Chinese (Hong Kong) [zh-hk] 34743//! author : Ben : https://github.com/ben-lin 34744//! author : Chris Lam : https://github.com/hehachris 34745//! author : Konstantin : https://github.com/skfd 34746//! author : Anthony : https://github.com/anthonylau 34747 34748;(function (global, factory) { 34749 true ? factory(__webpack_require__(0)) : 34750 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 34751 factory(global.moment) 34752}(this, (function (moment) { 'use strict'; 34753 34754 //! moment.js locale configuration 34755 34756 var zhHk = moment.defineLocale('zh-hk', { 34757 months: '䏿_äºæ_䏿_åæ_äºæ_å æ_䏿_å «æ_乿_åæ_å䏿_åäºæ'.split( 34758 '_' 34759 ), 34760 monthsShort: '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split( 34761 '_' 34762 ), 34763 weekdays: 'æææ¥_ææä¸_ææäº_ææä¸_ææå_ææäº_ææå '.split('_'), 34764 weekdaysShort: '鱿¥_é±ä¸_é±äº_é±ä¸_é±å_é±äº_é±å '.split('_'), 34765 weekdaysMin: 'æ¥_ä¸_äº_ä¸_å_äº_å '.split('_'), 34766 longDateFormat: { 34767 LT: 'HH:mm', 34768 LTS: 'HH:mm:ss', 34769 L: 'YYYY/MM/DD', 34770 LL: 'YYYYå¹´MæDæ¥', 34771 LLL: 'YYYYå¹´MæDæ¥ HH:mm', 34772 LLLL: 'YYYYå¹´MæDæ¥dddd HH:mm', 34773 l: 'YYYY/M/D', 34774 ll: 'YYYYå¹´MæDæ¥', 34775 lll: 'YYYYå¹´MæDæ¥ HH:mm', 34776 llll: 'YYYYå¹´MæDæ¥dddd HH:mm', 34777 }, 34778 meridiemParse: /忍|æ©ä¸|ä¸å|ä¸å|ä¸å|æä¸/, 34779 meridiemHour: function (hour, meridiem) { 34780 if (hour === 12) { 34781 hour = 0; 34782 } 34783 if (meridiem === '忍' || meridiem === 'æ©ä¸' || meridiem === 'ä¸å') { 34784 return hour; 34785 } else if (meridiem === 'ä¸å') { 34786 return hour >= 11 ? hour : hour + 12; 34787 } else if (meridiem === 'ä¸å' || meridiem === 'æä¸') { 34788 return hour + 12; 34789 } 34790 }, 34791 meridiem: function (hour, minute, isLower) { 34792 var hm = hour * 100 + minute; 34793 if (hm < 600) { 34794 return '忍'; 34795 } else if (hm < 900) { 34796 return 'æ©ä¸'; 34797 } else if (hm < 1200) { 34798 return 'ä¸å'; 34799 } else if (hm === 1200) { 34800 return 'ä¸å'; 34801 } else if (hm < 1800) { 34802 return 'ä¸å'; 34803 } else { 34804 return 'æä¸'; 34805 } 34806 }, 34807 calendar: { 34808 sameDay: '[ä»å¤©]LT', 34809 nextDay: '[æå¤©]LT', 34810 nextWeek: '[ä¸]ddddLT', 34811 lastDay: '[æ¨å¤©]LT', 34812 lastWeek: '[ä¸]ddddLT', 34813 sameElse: 'L', 34814 }, 34815 dayOfMonthOrdinalParse: /\d{1,2}(æ¥|æ|é±)/, 34816 ordinal: function (number, period) { 34817 switch (period) { 34818 case 'd': 34819 case 'D': 34820 case 'DDD': 34821 return number + 'æ¥'; 34822 case 'M': 34823 return number + 'æ'; 34824 case 'w': 34825 case 'W': 34826 return number + 'é±'; 34827 default: 34828 return number; 34829 } 34830 }, 34831 relativeTime: { 34832 future: '%så¾', 34833 past: '%så', 34834 s: 'å¹¾ç§', 34835 ss: '%d ç§', 34836 m: '1 åé', 34837 mm: '%d åé', 34838 h: '1 å°æ', 34839 hh: '%d å°æ', 34840 d: '1 天', 34841 dd: '%d 天', 34842 M: '1 åæ', 34843 MM: '%d åæ', 34844 y: '1 å¹´', 34845 yy: '%d å¹´', 34846 }, 34847 }); 34848 34849 return zhHk; 34850 34851}))); 34852 34853 34854/***/ }), 34855/* 136 */ 34856/***/ (function(module, exports, __webpack_require__) { 34857 34858//! moment.js locale configuration 34859//! locale : Chinese (Macau) [zh-mo] 34860//! author : Ben : https://github.com/ben-lin 34861//! author : Chris Lam : https://github.com/hehachris 34862//! author : Tan Yuanhong : https://github.com/le0tan 34863 34864;(function (global, factory) { 34865 true ? factory(__webpack_require__(0)) : 34866 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 34867 factory(global.moment) 34868}(this, (function (moment) { 'use strict'; 34869 34870 //! moment.js locale configuration 34871 34872 var zhMo = moment.defineLocale('zh-mo', { 34873 months: '䏿_äºæ_䏿_åæ_äºæ_å æ_䏿_å «æ_乿_åæ_å䏿_åäºæ'.split( 34874 '_' 34875 ), 34876 monthsShort: '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split( 34877 '_' 34878 ), 34879 weekdays: 'æææ¥_ææä¸_ææäº_ææä¸_ææå_ææäº_ææå '.split('_'), 34880 weekdaysShort: '鱿¥_é±ä¸_é±äº_é±ä¸_é±å_é±äº_é±å '.split('_'), 34881 weekdaysMin: 'æ¥_ä¸_äº_ä¸_å_äº_å '.split('_'), 34882 longDateFormat: { 34883 LT: 'HH:mm', 34884 LTS: 'HH:mm:ss', 34885 L: 'DD/MM/YYYY', 34886 LL: 'YYYYå¹´MæDæ¥', 34887 LLL: 'YYYYå¹´MæDæ¥ HH:mm', 34888 LLLL: 'YYYYå¹´MæDæ¥dddd HH:mm', 34889 l: 'D/M/YYYY', 34890 ll: 'YYYYå¹´MæDæ¥', 34891 lll: 'YYYYå¹´MæDæ¥ HH:mm', 34892 llll: 'YYYYå¹´MæDæ¥dddd HH:mm', 34893 }, 34894 meridiemParse: /忍|æ©ä¸|ä¸å|ä¸å|ä¸å|æä¸/, 34895 meridiemHour: function (hour, meridiem) { 34896 if (hour === 12) { 34897 hour = 0; 34898 } 34899 if (meridiem === '忍' || meridiem === 'æ©ä¸' || meridiem === 'ä¸å') { 34900 return hour; 34901 } else if (meridiem === 'ä¸å') { 34902 return hour >= 11 ? hour : hour + 12; 34903 } else if (meridiem === 'ä¸å' || meridiem === 'æä¸') { 34904 return hour + 12; 34905 } 34906 }, 34907 meridiem: function (hour, minute, isLower) { 34908 var hm = hour * 100 + minute; 34909 if (hm < 600) { 34910 return '忍'; 34911 } else if (hm < 900) { 34912 return 'æ©ä¸'; 34913 } else if (hm < 1130) { 34914 return 'ä¸å'; 34915 } else if (hm < 1230) { 34916 return 'ä¸å'; 34917 } else if (hm < 1800) { 34918 return 'ä¸å'; 34919 } else { 34920 return 'æä¸'; 34921 } 34922 }, 34923 calendar: { 34924 sameDay: '[ä»å¤©] LT', 34925 nextDay: '[æå¤©] LT', 34926 nextWeek: '[ä¸]dddd LT', 34927 lastDay: '[æ¨å¤©] LT', 34928 lastWeek: '[ä¸]dddd LT', 34929 sameElse: 'L', 34930 }, 34931 dayOfMonthOrdinalParse: /\d{1,2}(æ¥|æ|é±)/, 34932 ordinal: function (number, period) { 34933 switch (period) { 34934 case 'd': 34935 case 'D': 34936 case 'DDD': 34937 return number + 'æ¥'; 34938 case 'M': 34939 return number + 'æ'; 34940 case 'w': 34941 case 'W': 34942 return number + 'é±'; 34943 default: 34944 return number; 34945 } 34946 }, 34947 relativeTime: { 34948 future: '%så §', 34949 past: '%så', 34950 s: 'å¹¾ç§', 34951 ss: '%d ç§', 34952 m: '1 åé', 34953 mm: '%d åé', 34954 h: '1 å°æ', 34955 hh: '%d å°æ', 34956 d: '1 天', 34957 dd: '%d 天', 34958 M: '1 åæ', 34959 MM: '%d åæ', 34960 y: '1 å¹´', 34961 yy: '%d å¹´', 34962 }, 34963 }); 34964 34965 return zhMo; 34966 34967}))); 34968 34969 34970/***/ }), 34971/* 137 */ 34972/***/ (function(module, exports, __webpack_require__) { 34973 34974//! moment.js locale configuration 34975//! locale : Chinese (Taiwan) [zh-tw] 34976//! author : Ben : https://github.com/ben-lin 34977//! author : Chris Lam : https://github.com/hehachris 34978 34979;(function (global, factory) { 34980 true ? factory(__webpack_require__(0)) : 34981 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 34982 factory(global.moment) 34983}(this, (function (moment) { 'use strict'; 34984 34985 //! moment.js locale configuration 34986 34987 var zhTw = moment.defineLocale('zh-tw', { 34988 months: '䏿_äºæ_䏿_åæ_äºæ_å æ_䏿_å «æ_乿_åæ_å䏿_åäºæ'.split( 34989 '_' 34990 ), 34991 monthsShort: '1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ'.split( 34992 '_' 34993 ), 34994 weekdays: 'æææ¥_æ
34994æä¸_ææäº_ææä¸_ææå_ææäº_ææå '.split('_'), 34995 weekdaysShort: '鱿¥_é±ä¸_é±äº_é±ä¸_é±å_é±äº_é±å '.split('_'), 34996 weekdaysMin: 'æ¥_ä¸_äº_ä¸_å_äº_å '.split('_'), 34997 longDateFormat: { 34998 LT: 'HH:mm', 34999 LTS: 'HH:mm:ss', 35000 L: 'YYYY/MM/DD', 35001 LL: 'YYYYå¹´MæDæ¥', 35002 LLL: 'YYYYå¹´MæDæ¥ HH:mm', 35003 LLLL: 'YYYYå¹´MæDæ¥dddd HH:mm', 35004 l: 'YYYY/M/D', 35005 ll: 'YYYYå¹´MæDæ¥', 35006 lll: 'YYYYå¹´MæDæ¥ HH:mm', 35007 llll: 'YYYYå¹´MæDæ¥dddd HH:mm', 35008 }, 35009 meridiemParse: /忍|æ©ä¸|ä¸å|ä¸å|ä¸å|æä¸/, 35010 meridiemHour: function (hour, meridiem) { 35011 if (hour === 12) { 35012 hour = 0; 35013 } 35014 if (meridiem === '忍' || meridiem === 'æ©ä¸' || meridiem === 'ä¸å') { 35015 return hour; 35016 } else if (meridiem === 'ä¸å') { 35017 return hour >= 11 ? hour : hour + 12; 35018 } else if (meridiem === 'ä¸å' || meridiem === 'æä¸') { 35019 return hour + 12; 35020 } 35021 }, 35022 meridiem: function (hour, minute, isLower) { 35023 var hm = hour * 100 + minute; 35024 if (hm < 600) { 35025 return '忍'; 35026 } else if (hm < 900) { 35027 return 'æ©ä¸'; 35028 } else if (hm < 1130) { 35029 return 'ä¸å'; 35030 } else if (hm < 1230) { 35031 return 'ä¸å'; 35032 } else if (hm < 1800) { 35033 return 'ä¸å'; 35034 } else { 35035 return 'æä¸'; 35036 } 35037 }, 35038 calendar: { 35039 sameDay: '[ä»å¤©] LT', 35040 nextDay: '[æå¤©] LT', 35041 nextWeek: '[ä¸]dddd LT', 35042 lastDay: '[æ¨å¤©] LT', 35043 lastWeek: '[ä¸]dddd LT', 35044 sameElse: 'L', 35045 }, 35046 dayOfMonthOrdinalParse: /\d{1,2}(æ¥|æ|é±)/, 35047 ordinal: function (number, period) { 35048 switch (period) { 35049 case 'd': 35050 case 'D': 35051 case 'DDD': 35052 return number + 'æ¥'; 35053 case 'M': 35054 return number + 'æ'; 35055 case 'w': 35056 case 'W': 35057 return number + 'é±'; 35058 default: 35059 return number; 35060 } 35061 }, 35062 relativeTime: { 35063 future: '%så¾', 35064 past: '%så', 35065 s: 'å¹¾ç§', 35066 ss: '%d ç§', 35067 m: '1 åé', 35068 mm: '%d åé', 35069 h: '1 å°æ', 35070 hh: '%d å°æ', 35071 d: '1 天', 35072 dd: '%d 天', 35073 M: '1 åæ', 35074 MM: '%d åæ', 35075 y: '1 å¹´', 35076 yy: '%d å¹´', 35077 }, 35078 }); 35079 35080 return zhTw; 35081 35082}))); 35083 35084 35085/***/ }), 35086/* 138 */ 35087/***/ (function(module, exports, __webpack_require__) { 35088 35089__webpack_require__(139); 35090module.exports = __webpack_require__(164); 35091 35092 35093/***/ }), 35094/* 139 */ 35095/***/ (function(module, __webpack_exports__, __webpack_require__) { 35096 35097"use strict"; 35098Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); 35099/* WEBPACK VAR INJECTION */(function(jQuery) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(1); 35100/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__); 35101/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_Router__ = __webpack_require__(140); 35102/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_iframe_blocker_js__ = __webpack_require__(142); 35103/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routes_common__ = __webpack_require__(144); 35104/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__routes_home__ = __webpack_require__(160); 35105/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__routes_about__ = __webpack_require__(161); 35106/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__routes_archive__ = __webpack_require__(162); 35107/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__routes_search__ = __webpack_require__(163); 35108// import external dependencies 35109 35110 35111// Import everything from autoload 35112 35113 35114// import local dependencies 35115 35116 35117 35118 35119 35120 35121 35122 35123/** Populate Router instance with DOM routes */ 35124var routes = new __WEBPACK_IMPORTED_MODULE_1__util_Router__["a" /* default */]({ 35125 // All pages 35126 common: __WEBPACK_IMPORTED_MODULE_3__routes_common__["a" /* default */], 35127 // Home page 35128 home: __WEBPACK_IMPORTED_MODULE_4__routes_home__["a" /* default */], 35129 // About Us page, note the change from about-us to aboutUs. 35130 aboutUs: __WEBPACK_IMPORTED_MODULE_5__routes_about__["a" /* default */], 35131 35132 archive: __WEBPACK_IMPORTED_MODULE_6__routes_archive__["a" /* default */], 35133 35134 search: __WEBPACK_IMPORTED_MODULE_7__routes_search__["a" /* default */], 35135 35136 iframeBlocker: __WEBPACK_IMPORTED_MODULE_2__util_iframe_blocker_js__["a" /* default */] 35137}); 35138 35139// Load Events 35140jQuery(document).ready( function () { return routes.loadEvents(); } ); 35141/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1))) 35142 35143/***/ }), 35144/* 140 */ 35145/***/ (function(module, __webpack_exports__, __webpack_require__) { 35146 35147"use strict"; 35148/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__camelCase__ = __webpack_require__(141); 35149 35150 35151/** 35152 * DOM-based Routing 35153 * 35154 * Based on {@link http://goo.gl/EUTi53|Markup-based Unobtrusive Comprehensive DOM-ready Execution} by Paul Irish 35155 * 35156 * The routing fires all common scripts, followed by the page specific scripts. 35157 * Add additional events for more control over timing e.g. a finalize event 35158 */ 35159var Router = function Router(routes) { 35160 this.routes = routes; 35161}; 35162 35163/** 35164 * Fire Router events 35165 * @param {string} route DOM-based route derived from body classes (`<body class="...">`) 35166 * @param {string} [event] Events on the route. By default, `init` and `finalize` events are called. 35167 * @param {string} [arg] Any custom argument to be passed to the event. 35168 */ 35169Router.prototype.fire = function fire (route, event, arg) { 35170 if ( event === void 0 ) event = 'init'; 35171 35172 document.dispatchEvent(new CustomEvent('routed', { 35173 bubbles: true, 35174 detail: { 35175 route: route, 35176 fn: event, 35177 }, 35178 })); 35179 35180 var fire = route !== '' && this.routes[route] && typeof this.routes[route][event] === 'function'; 35181 if (fire) { 35182 this.routes[route][event](arg); 35183 } 35184}; 35185 35186/** 35187 * Automatically load and fire Router events 35188 * 35189 * Events are fired in the following order: 35190 ** common init 35191 ** page-specific init 35192 ** page-specific finalize 35193 ** common finalize 35194 */ 35195Router.prototype.loadEvents = function loadEvents () { 35196 var this$1 = this; 35197 35198 // Fire common init JS 35199 this.fire('common'); 35200 35201 // Fire page-specific init JS, and then finalize JS 35202 document.body.className 35203 .toLowerCase() 35204 .replace(/-/g, '_') 35205 .split(/\s+/) 35206 .map(__WEBPACK_IMPORTED_MODULE_0__camelCase__["a" /* default */]) 35207 .forEach(function (className) { 35208 this$1.fire(className); 35209 this$1.fire(className, 'finalize'); 35210 }); 35211 35212 // Fire common finalize JS 35213 this.fire('common', 'finalize'); 35214}; 35215 35216/* harmony default export */ __webpack_exports__["a"] = (Router); 35217 35218
35219/***/ }), 35220/* 141 */ 35221/***/ (function(module, __webpack_exports__, __webpack_require__) { 35222 35223"use strict"; 35224/** 35225 * the most terrible camelizer on the internet, guaranteed! 35226 * @param {string} str String that isn't camel-case, e.g., CAMeL_CaSEiS-harD 35227 * @return {string} String converted to camel-case, e.g., camelCaseIsHard 35228 */ 35229/* harmony default export */ __webpack_exports__["a"] = (function (str) { return ("" + (str.charAt(0).toLowerCase()) + (str.replace(/[\W_]/g, '|').split('|') 35230 .map(function (part) { return ("" + (part.charAt(0).toUpperCase()) + (part.slice(1))); }) 35231 .join('') 35232 .slice(1))); });; 35233 35234 35235/***/ }), 35236/* 142 */ 35237/***/ (function(module, __webpack_exports__, __webpack_require__) { 35238 35239"use strict"; 35240/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_cookie__ = __webpack_require__(143); 35241 35242 35243/* harmony default export */ __webpack_exports__["a"] = ({ 35244 isBound: false, 35245 35246 init: function init() { 35247 if (this.isBound) { return; } 35248 this.isBound = true; 35249 35250 var self = this; 35251 var buttons = document.querySelectorAll('.wcc-btn'); 35252 var triggers = document.querySelectorAll('[data-gdpr-trigger]'); 35253 35254 if (buttons.length > 0) { 35255 buttons.forEach(function (element) { 35256 element.addEventListener('click', self.updateCookieElements.bind(self)); 35257 }); 35258 } 35259 35260 if (triggers.length > 0) { 35261 triggers.forEach(function (element) { 35262 element.addEventListener('click', function () { 35263 var gdprButton = document.querySelector('.wcc-btn-revisit'); 35264 35265 if (gdprButton) { 35266 gdprButton.click(); 35267 } 35268 }); 35269 }); 35270 } 35271 35272 window.addEventListener('load', self.updateCookieElements.bind(self)); 35273 }, 35274 35275 updateCookieElements: function updateCookieElements() { 35276 var this$1 = this; 35277 35278 var requiredCookieElements = document.querySelectorAll('[data-required-cookie]'); 35279 35280 if (!requiredCookieElements.length) { 35281 this.dispatchEvent([]); 35282 return; 35283 } 35284 35285 var elementsArray = Array.from(requiredCookieElements); 35286 35287 setTimeout(function () { 35288 requiredCookieElements.forEach(function (element) { 35289 var cookieName = element.getAttribute('data-required-cookie'); 35290 var cookieValue = __WEBPACK_IMPORTED_MODULE_0__util_cookie__["a" /* default */].get('wt_consent'); 35291 35292 var consentObj = {}; 35293 35294 if (cookieValue && cookieValue.includes(':')) { 35295 consentObj = Object.fromEntries( 35296 cookieValue 35297 .split(',') 35298 .map(function (pair) { return pair.split(':'); }) 35299 .filter(function (ref) { 35300 var key = ref[0]; 35301 35302 return key; 35303 }) 35304 ); 35305 } 35306 35307 var consent = consentObj[cookieName]; 35308 35309 var cookieAcceptedElement = element.querySelector('.cookie-accepted'); 35310 var cookieNotAcceptedElement = element.querySelector('.cookie-not-accepted'); 35311 var iframe = cookieAcceptedElement 35312 ? cookieAcceptedElement.querySelector('iframe') 35313 : null; 35314 var fancyBoxA = element.querySelector('a[data-fancybox]'); 35315 35316 if (consent === 'yes') { 35317 if (cookieAcceptedElement) { 35318 cookieAcceptedElement.classList.remove('is-hidden'); 35319 } 35320 if (cookieNotAcceptedElement) { 35321 cookieNotAcceptedElement.classList.add('is-hidden'); 35322 } 35323 35324 if (fancyBoxA && fancyBoxA.getAttribute('data-href')) { 35325 fancyBoxA.setAttribute('href', fancyBoxA.getAttribute('data-href')); 35326 fancyBoxA.setAttribute('data-href', ''); 35327 fancyBoxA.setAttribute('data-fancybox', 'gallery'); 35328 } 35329
35330 if (cookieAcceptedElement && cookieAcceptedElement.getAttribute('data-src')) { 35331 cookieAcceptedElement.setAttribute( 35332 'src', 35333 cookieAcceptedElement.getAttribute('data-src') 35334 ); 35335 cookieAcceptedElement.setAttribute('data-src', ''); 35336 } 35337 35338 if (iframe && iframe.getAttribute('data-src')) { 35339 iframe.setAttribute('src', iframe.getAttribute('data-src')); 35340 iframe.setAttribute('data-src', ''); 35341 } 35342 } else { 35343 if (cookieAcceptedElement) { 35344 cookieAcceptedElement.classList.add('is-hidden'); 35345 } 35346 if (cookieNotAcceptedElement) { 35347 cookieNotAcceptedElement.classList.remove('is-hidden'); 35348 } 35349 35350 if (fancyBoxA && fancyBoxA.getAttribute('href')) { 35351 fancyBoxA.setAttribute('data-href', fancyBoxA.getAttribute('href')); 35352 fancyBoxA.setAttribute('href', ''); 35353 fancyBoxA.setAttribute('data-fancybox', 'false'); 35354 } 35355 35356 if (iframe && iframe.getAttribute('src')) { 35357 iframe.setAttribute('data-src', iframe.getAttribute('src')); 35358 iframe.setAttribute('src', ''); 35359 } 35360 } 35361 }); 35362 35363 this$1.dispatchEvent(elementsArray); 35364 console.log('Cookie elements updated'); 35365 }, 1000); 35366 }, 35367 35368 dispatchEvent: function dispatchEvent(elementsArray) { 35369 document.dispatchEvent( 35370 new CustomEvent('cookieConsentReady', { 35371 detail: { elements: elementsArray }, 35372 }) 35373 ); 35374 }, 35375}); 35376 35377 35378/***/ }), 35379/* 143 */ 35380/***/ (function(module, __webpack_exports__, __webpack_require__) { 35381 35382"use strict"; 35383var Cookie = function Cookie () {}; 35384 35385Cookie.prototype.get = function get (name) { 35386 var matches = document.cookie.match(new RegExp( 35387 '(?:^|; )' + name.replace(/([.$?*|{}()[\]\\/+^])/g, '\\$1') + '=([^;]*)' 35388 )); 35389 return matches ? decodeURIComponent(matches[1]) : undefined; 35390}; 35391 35392Cookie.prototype.set = function set (name, value, options) { 35393 if ( options === void 0 ) options = {}; 35394 35395 options = Object.assign({}, {path: '/', 35396 sameSite: 'Lax'}, 35397 options); 35398 35399 if (options.expires instanceof Date) { 35400 options.expires = options.expires.toUTCString(); 35401 } 35402 35403 var updatedCookie = encodeURIComponent(name) + '=' + encodeURIComponent(value); 35404 35405 for (var optionKey in options) { 35406 updatedCookie += '; ' + optionKey; 35407 var optionValue = options[optionKey]; 35408 if (optionValue !== true) { 35409 updatedCookie += '=' + optionValue; 35410 } 35411 } 35412 35413 document.cookie = updatedCookie; 35414}; 35415 35416/* harmony default export */ __webpack_exports__["a"] = (new Cookie()); 35417 35418 35419/***/ }), 35420/* 144 */ 35421/***/ (function(module, __webpack_exports__, __webpack_require__) { 35422 35423"use strict"; 35424/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_slick_carousel_slick_slick_min_js__ = __webpack_require__(145); 35425/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_slick_carousel_slick_slick_min_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_slick_carousel_slick_slick_min_js__); 35426/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__modules_svg_map__ = __webpack_require__(146); 35427/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__modules_map__ = __webpack_require__(147); 35428/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__modules_text_map__ = __webpack_require__(149); 35429/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_tab__ = __webpack_require__(150); 35430/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__components_accordeon__ = __webpack_require__(151); 35431/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_datepicker__ = __webpack_require__(152); 35432/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__features_load_more_resource_feature__ = __webpack_require__(156); 35433/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__features_load_more_event_feature__ = __webpack_require__(157); 35434/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__features_mega_menu_feature__ = __webpack_require__(158); 35435/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__modules_download_pdf__ = __webpack_require__(159); 35436// Vendors 35437 35438 35439// Routes 35440 35441 35442 35443 35444 35445 35446 35447 35448 35449 35450 35451/* harmony default export */ __webpack_exports__["a"] = ({ 35452
35453 init: function init() { 35454 35455 __WEBPACK_IMPORTED_MODULE_10__modules_download_pdf__["a" /* default */].init(); 35456 __WEBPACK_IMPORTED_MODULE_6__components_datepicker__["a" /* default */].init(); 35457 var scroll = $(window).scrollTop(); 35458 35459 35460 $(window).scroll(function () { 35461 scroll = $(window).scrollTop(); 35462 posHeader(); 35463 }); 35464 35465 // Blur on click 35466 $('a, button, input[type=\'submit\'], .btn').on('click', function () { 35467 $(this).blur(); 35468 }); 35469 35470 35471 // ======================================== 35472 // Header 35473 // ======================================== 35474 function posHeader() { 35475 if (scroll > 0) { 35476 $('body').addClass('scroll'); 35477 } else { 35478 $('body').removeClass('scroll'); 35479 } 35480 } 35481 posHeader(); 35482 35483 // Header 35484 $('.js_toggle-search').on('click', function() { 35485 $('body').toggleClass('search-active'); 35486 $('.header-global-wrapper .btn-search').toggleClass('close'); 35487 if ($('body').hasClass('search-active')) { 35488 setTimeout(function() { 35489 $('.search-form .search-field').focus(); 35490 }, 500); 35491 } 35492 if ($('body').hasClass('menu-active')) { 35493 $('.header-global-wrapper .btn-burger').toggleClass('close'); 35494 $('body').toggleClass('menu-active'); 35495 } 35496 }); 35497 $('.js_toggle-menu').on('click', function () { 35498 $('.header-global-wrapper .btn-burger').toggleClass('close'); 35499 $('body').toggleClass('menu-active'); 35500 if ($('body').hasClass('search-active')) { 35501 $('body').toggleClass('search-active'); 35502 $('.header-global-wrapper .btn-search').toggleClass('close'); 35503 } 35504 }); 35505 $('.js-btn-text-accessibility').on('click', function() { 35506 var newFontSize = parseFloat($('html').css('font-size')) + $(this).data('size'); 35507 if (newFontSize >= 12 && newFontSize <= 20) { 35508 $('html').css('font-size', newFontSize + 'px'); 35509 } 35510 }); 35511 35512 35513 35514 35515 35516 // Mobile 35517 if ($(window).width() <= 1200) { 35518 $('.header-global-wrapper .menu > li.has-children > a').on('click', function(e) { 35519 if ($(e.target).hasClass('icon')) { 35520 e.preventDefault(); 35521 var $elt = $(this); 35522 $elt.closest('li').siblings('li').find('a').removeClass('active'); 35523 $elt.closest('li').siblings('li').find('.mega-menu-wrapper').slideUp(400); 35524 $elt.toggleClass('active').next('.mega-menu-wrapper').slideToggle(400); 35525 } 35526 }); 35527 $('.header-global-wrapper .mega-menu > ul > li.has-children > a').on('click', function(e) { 35528 if ($(e.target).hasClass('icon')) { 35529 e.preventDefault(); 35530 var $elt = $(this); 35531 $elt.closest('li').siblings('li').find('a').removeClass('active'); 35532 $elt.closest('li').siblings('li').find('ul').slideUp(400); 35533 $elt.toggleClass('active').next('ul').slideToggle(400); 35534 } 35535 }); 35536 } 35537 35538 35539 35540 35541 // ======================================== 35542 // Banner shortcuts 35543 // ======================================== 35544 $('.js_item-shortcuts') 35545 .mouseenter(function() { 35546 $('.js_toolbox-shortcuts').removeClass('active'); 35547 $('.js_toolbox-shortcuts[data-index='+ $(this).data('index') +']').addClass('active'); 35548 }) 35549 .mouseleave(function() { 35550 $('.js_toolbox-shortcuts').removeClass('active'); 35551 }); 35552 35553 35554 35555 35556 35557 // ======================================== 35558 // Modules 35559 // ======================================== 35560 // Module Social wall 35561 if ($(window).width() <= 1024) { 35562 $('.js_slider-social-wall').each(function () { 35563 var elt = this; 35564 $(elt).slick({ 35565 infinite: true, 35566 centerMode: true, 35567 variableWidth: true,
35568 arrows: false, 35569 }); 35570 }); 35571 } 35572 $('.js_sub-slider-social-wall').each(function () { 35573 var elt = this; 35574 $(elt).slick({ 35575 infinite: true, 35576 prevArrow: '<button type="button" class="slick-prev"></button>', 35577 nextArrow: '<button type="button" class="slick-next"></button>', 35578 dots: true, 35579 swipe: false, 35580 }); 35581 }); 35582 35583 35584 // Module Video 35585 $('.js_btn-video').on('click', function () { 35586 var $elt = $(this); 35587 var $video = $elt.closest('.video'); 35588 var $iframe = $video.find('iframe'); 35589 var src = 'https://www.youtube-nocookie.com/embed/' + $elt.data('src') + '?rel=0&showinfo=0&enablejsapi=1&autoplay=1'; 35590 $iframe.attr('src', src); 35591 $video.addClass('active'); 35592 setTimeout(function () { 35593 $iframe[0].contentWindow.postMessage('{"event":"command","func":"' + 'playVideo' + '","args":""}', '*'); 35594 }, 600); 35595 }); 35596 35597 35598 // Module Citation 35599 $('.js_slider-citation').each(function () { 35600 var elt = this; 35601 if($(elt).find('.item').length > 1) { 35602 $(elt).slick({ 35603 dots: true, 35604 arrows: false, 35605 }); 35606 } 35607 }); 35608 35609 35610 // Module Carousel 35611 $('.js_slider-carousel').each(function () { 35612 var elt = this; 35613 $(elt).slick({ 35614 infinite: true, 35615 prevArrow: '<button type="button" class="slick-prev"></button>', 35616 nextArrow: '<button type="button" class="slick-next"></button>', 35617 }); 35618 }); 35619 35620 35621 // Module Deliberations 35622 $('.js-toggle-desc-accordion').on('click', function () { 35623 var $elt = $(this); 35624 $elt.toggleClass('active'); 35625 $('.js-desc-accordion[data-index="' + $elt.data('index') + '"]').slideToggle(400); 35626 }); 35627 35628 35629 // Module Deliberations 35630 $('.js-toggle-desc-job-offers').on('click', function () { 35631 var $elt = $(this); 35632 if (!$elt.hasClass('active')) { 35633 $('.js-toggle-desc-job-offers').toggleClass('active') 35634 $('.js-desc-job-offers:not([data-index="' + $elt.data('index') + '"])').slideUp(750); 35635 $('.js-desc-job-offers[data-index="' + $elt.data('index') + '"]').slideToggle(750); 35636 } 35637 }); 35638 35639 35640 // Module map 35641 $('.js_toggle-map-subcategory').on('click', function () { 35642 var $elt = $(this); 35643 $elt.toggleClass('active'); 35644 $('.js_map-subcategory[data-index="' + $elt.data('index') + '"]').slideToggle(400); 35645 }); 35646 35647 35648 // Module Form 35649 $('.module-form .ginput_container_fileupload').each(function (index, el) { 35650 $(el).attr('data-label', 'Choisir un fichier'); 35651 }); 35652 $('.module-form .ginput_container_fileupload input').on('change', function (e) { 35653 var fileName = e.target.value.split('\\').pop(); 35654 var $el = $(this).closest('.ginput_container_fileupload'); 35655 if (fileName == '') { 35656 $el.removeClass('active').attr('data-label', 'Choisir un fichier'); 35657 } else { 35658 $el.addClass('active').attr('data-label', fileName); 35659 } 35660 }); 35661 35662 }, 35663 finalize: function finalize() { 35664 35665 var svgMaps = document.querySelectorAll('.module-svg-map'); 35666 35667 for (var i = 0; i < svgMaps.length; i++) { 35668 new __WEBPACK_IMPORTED_MODULE_1__modules_svg_map__["a" /* default */](svgMaps[i]); 35669 } 35670 35671 var maps = document.querySelectorAll('.module-map'); 35672 35673 for (var i$1 = 0; i$1 < maps.length; i$1++) { 35674 new __WEBPACK_IMPORTED_MODULE_2__modules_map__["a" /* default */](maps[i$1]); 35675 } 35676 35677 var textMaps = document.querySelectorAll('.module-map-text'); 35678 35679 for (var i$2 = 0; i$2 < textMaps.length; i$2++) { 35680 new __WEBPACK_IMPORTED_MODULE_3__modules_text_map__["a" /* default */](textMaps[i$2]); 35681 } 35682 35683 // const tabs = document.querySelectorAll('.js-tab'); 35684 35685 // for (let i = 0; i < tabs.length; i++) { 35686 // new Tab(tabs[i]); 35687 // } 35688 35689 // const accordeons = document.querySelectorAll('.js-accordeon'); 35690 35691 // for (let i = 0; i < accordeons.length; i++) { 35692 // new Accordeon(accordeons[i]); 35693 // } 35694 35695 }, 35696}); 35697 35698/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1))) 35699 35700/***/ }), 35701/* 145 */ 35702/***/ (function(module, exports, __webpack_require__) { 35703 35704var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!function(i){"use strict"; true?!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1)], __WEBPACK_AMD_DEFINE_FACTORY__ = (i), 35705 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 35706 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
vendor: 8,099 bytes, line 35707
35707 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
vendor: 3,442 bytes, line 35707
35707ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
35707slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
35707parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
35707,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 5,619 bytes, line 35707
35707,100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};
35707!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
35707):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
35707o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
35707,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}}); 35708 35709 35710/***/ }), 35711/* 146 */ 35712/***/ (function(module, __webpack_exports__, __webpack_require__) { 35713 35714"use strict"; 35715var SVGMap = function SVGMap(container) { 35716 this.container = container; 35717 this.init(); 35718}; 35719 35720SVGMap.prototype.init = function init () { 35721 var this$1 = this; 35722 35723 this.svgStates = this.container.querySelectorAll(".territory-svg > *"); 35724 this.wordStates = this.container.querySelectorAll("ul li.js-commune-name"); 35725 this.tooltips = this.container.querySelectorAll(".js-tooltip"); 35726 35727 this.svgStates.forEach(function (el) { 35728 el.addEventListener("mouseenter", function (evt) { 35729 this$1.removeAllOn(); 35730 this$1.addOnFromList(el); 35731 }); 35732 el.addEventListener("mouseleave", function () { 35733 this$1.removeAllOn(); 35734 }); 35735 35736 el.addEventListener("click", function () { 35737 this$1.goTo(el); 35738 }); 35739 el.addEventListener("touchstart", function () { 35740 this$1.removeAllOn(); 35741 this$1.addOnFromList(el); 35742 }); 35743 }); 35744 35745 this.wordStates.forEach(function (el) { 35746 el.addEventListener("mouseenter", function () { 35747 this$1.removeAllOn(); 35748 this$1.addOnFromState(el); 35749 }); 35750 el.addEventListener("mouseleave", function () { 35751 this$1.removeAllOn(); 35752 }); 35753 el.addEventListener("touchStart", function () { 35754 this$1.removeAllOn(); 35755 this$1.addOnFromState(el); 35756 }); 35757 }); 35758 35759 this.tooltips.forEach(function (el) { 35760 el.addEventListener("mouseleave", function () { 35761 this$1.removeAllOn(); 35762 }); 35763 el.addEventListener("mouseenter", function () { 35764 this$1.removeAllOn(); 35765 this$1.keepTooltipOpened(el); 35766 }); 35767 el.addEventListener("touchStart", function () { 35768 this$1.removeAllOn(); 35769 this$1.keepTooltipOpened(el); 35770 }); 35771 var stateId = el.getAttribute("data-id"); 35772 var svgState = this$1.container.querySelector(".territory-svg > path[data-shape-commune='" + stateId + "']"); 35773 var tooltipsContainer = this$1.container.querySelector('.col-2') 35774 35775 if (svgState) { 35776 var svgPolygonRect = svgState.getBoundingClientRect(); 35777 var tooltipsContainerRect = tooltipsContainer.getBoundingClientRect(); 35778 35779 var top = svgPolygonRect.bottom - tooltipsContainerRect.top + 20; 35780 var left = svgPolygonRect.left - tooltipsContainerRect.left ; 35781 35782 el.classList.add('active'); 35783 // top -= el.getBoundingClientRect().height / 2; 35784 left += svgPolygonRect.width / 2; 35785 35786 if ( stateId == 'celles' || 35787 stateId == 'romiguieres') { 35788 top += 20; 35789 } else if ( stateId == 'saint-maurice-navacelles') { 35790 top -= 40; 35791 } else if ( stateId == 'saint-felix-de-lheras' || 35792 stateId == 'lauroux') { 35793 top -= 10; 35794 } else if ( stateId == 'lodeve') { 35795 top -= 40; 35796 } else if ( stateId == 'poujols' || 35797 stateId == 'fozieres' || 35798 stateId == 'olmet-et-villecun' || 35799 stateId == 'lavalette') { 35800 top += 10; 35801 } else if ( stateId == 'le-puech') { 35802 top += 30; 35803 } 35804 35805 el.style.top = Math.round(top) + 'px'; 35806 el.querySelector('.icon-deco').style.left = Math.round(left) + 'px'; 35807 el.classList.remove('active'); 35808 // console.log('----'); 35809 // console.log(stateId); 35810 // console.log('svgPolygonRect.left', svgPolygonRect.left); 35811 // console.log('tooltipsContainerRect.left', tooltipsContainerRect.left); 35812 // console.log('svgPolygonRect.width', svgPolygonRect.width); 35813 } 35814 }); 35815}; 35816 35817SVGMap.prototype.removeAllOn = function removeAllOn () { 35818
35819 this.wordStates.forEach(function (el) { 35820 el.classList.remove("on"); 35821 }); 35822 this.svgStates.forEach(function (el) { 35823 el.classList.remove("on"); 35824 }); 35825 35826 if (this.container.querySelector('.js-tooltip.active')) { 35827 this.container.querySelector('.js-tooltip.active').classList.remove('active'); 35828 } 35829}; 35830 35831SVGMap.prototype.keepTooltipOpened = function keepTooltipOpened (el) { 35832 var stateId = el.getAttribute("data-id"); 35833 var svgState = this.container.querySelector(".territory-svg > path[data-shape-commune='" + stateId + "']"); 35834 el.classList.add("on"); 35835 35836 if (svgState) { 35837 svgState.classList.add("on"); 35838 } 35839 35840 if (this.container.querySelector('.js-tooltip.active')) { 35841 this.container.querySelector('.js-tooltip.active').classList.remove('active'); 35842 } 35843 35844 if (this.container.querySelector('.js-tooltip.js-tooltip-' + stateId)) { 35845 this.container.querySelector('.js-tooltip.js-tooltip-' + stateId).classList.add('active'); 35846 } 35847}; 35848 35849SVGMap.prototype.addOnFromState = function addOnFromState (el) { 35850 var stateId = el.getAttribute("data-commune"); 35851 var svgState = this.container.querySelector(".territory-svg > path[data-shape-commune='" + stateId + "']"); 35852 var wordState = this.container.querySelector("ul li[data-commune='" + stateId + "']"); 35853 35854 el.classList.add("on"); 35855 35856 if (wordState) { 35857 wordState.classList.add("on"); 35858 } 35859 35860 if (svgState) { 35861 svgState.classList.add("on"); 35862 } 35863 35864 // if (this.container.querySelector('.js-tooltip.active')) { 35865 // this.container.querySelector('.js-tooltip.active').classList.remove('active'); 35866 // } 35867 35868 // if (this.container.querySelector('.js-tooltip.js-tooltip-' + stateId)) { 35869 // this.container.querySelector('.js-tooltip.js-tooltip-' + stateId).classList.add('active'); 35870 // } 35871}; 35872 35873SVGMap.prototype.addOnFromList = function addOnFromList (el) { 35874 var stateId = el.getAttribute("data-shape-commune"); 35875 var wordState = this.container.querySelector("ul li[data-commune='" + stateId + "']"); 35876 el.classList.add("on"); 35877 35878 if (wordState) { 35879 wordState.classList.add("on"); 35880 } 35881 35882 if (this.container.querySelector('.js-tooltip.active')) { 35883 this.container.querySelector('.js-tooltip.active').classList.remove('active'); 35884 } 35885 35886 if (this.container.querySelector('.js-tooltip.js-tooltip-' + stateId)) { 35887 this.container.querySelector('.js-tooltip.js-tooltip-' + stateId).classList.add('active'); 35888 } 35889}; 35890 35891SVGMap.prototype.goTo = function goTo (el) { 35892 var stateId = el.getAttribute("data-shape-commune"); 35893 var wordState = this.container.querySelector("ul li[data-shape-commune='" + stateId + "'] a"); 35894 35895 if (!wordState) { 35896 // Homepage 35897 wordState = this.container.querySelector(".js-tooltip.js-tooltip-" + stateId + " .btn-wrapper a"); 35898 } 35899 35900 if (wordState) { 35901 var evt = new MouseEvent('click', { 35902 bubbles: true, 35903 cancelable: true, 35904 view: window 35905 }); 35906 if (window.innerWidth < 1200) { 35907 stateId.addEventListener('click', function(e) { 35908 e.preventDefault(); 35909 e.stopPropagation(); 35910 35911 }); 35912} 35913 35914 // If cancelled, don't dispatch our event 35915 wordState.dispatchEvent(evt); 35916 } 35917}; 35918 35919/* harmony default export */ __webpack_exports__["a"] = (SVGMap); 35920 35921 35922/***/ }), 35923/* 147 */ 35924/***/ (function(module, __webpack_exports__, __webpack_require__) { 35925 35926"use strict"; 35927/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_leaflet__ = __webpack_require__(2); 35928/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_leaflet___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_leaflet__); 35929/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_leaflet_markercluster__ = __webpack_require__(148); 35930/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_leaflet_markercluster___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_leaflet_markercluster__); 35931 35932 35933 35934var Map = function Map(module) { 35935 this.module = module; 35936 this.container = module.querySelector('.js-map'); 35937 this.filterCommune; 35938 this.filtersCategory; 35939 this.markers = []; 35940 this.map; 35941 35942 this.init(); 35943 this.event(); 35944 this.handleMarkerVisibility() 35945}; 35946Map.prototype.init = function init () { 35947 console.log(this.container); 35948 this.mapId = this.container.getAttribute('id'); 35949 this.data = JSON.parse(this.container.getAttribute('data-pois')); 35950 this.iconWidth = 30; 35951 this.iconHeight = 30; 35952 this.size = 36; 35953 this.map = __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.map(this.mapId, { 35954 zoom: 10, 35955 minZoom: 3, 35956 scrollWheelZoom: false, 35957 zoomControl: false, 35958 }); 35959 35960 __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.control.zoom({ 35961 position: 'topright' 35962 }).addTo(this.map); 35963 35964 this.filtersCategory = this.module.querySelectorAll('.js-filter-category'); 35965 this.filterCommune = this.module.querySelector('.js-select-commune'); 35966 35967 __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { 35968 attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>', 35969 maxZoom: 19, 35970 }).addTo(this.map); 35971 35972 this.filterMarkers(); 35973 var offset = this.map.getSize().x * 0.22; 35974 // Then move the map 35975 this.map.panBy(new __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.Point(-offset, 0), { animate: false }); 35976 this.map.zoomOut(0.5); 35977}; 35978 35979Map.prototype.event = function event () { 35980 var this$1 = this; 35981 35982 if (this.filterCommune !== null) { 35983 this.filterCommune.addEventListener('change', this.handleMarkerVisibility.bind(this)); 35984 } 35985 35986 for (var i = 0; i < this.filtersCategory.length; i++) { 35987 this$1.filtersCategory[i].addEventListener('change', this$1.handleMarkerVisibility.bind(this$1)); 35988 } 35989}; 35990 35991Map.prototype.handleMarkerVisibility = function handleMarkerVisibility (event) { 35992 if (event) { 35993 var checkboxs = this.module.querySelectorAll('.subcategory[data-parent="' + event.target.getAttribute('data-id') + '"] input[type="checkbox"]'); 35994 checkboxs.forEach(function (item) { 35995 item.checked = event.target.checked ? 'checked' : ''; 35996 }) 35997 this.map.removeLayer(this.markerClusterGroup); 35998 this.filterMarkers(); 35999 } 36000}; 36001 36002Map.prototype.filterMarkers = function filterMarkers () { 36003 var this$1 = this; 36004 36005 var self = this; 36006 var currentCommune = ''; 36007 36008 if (this.container.getAttribute('data-selectedcommune')) { 36009 currentCommune = this.container.getAttribute('data-selectedcommune'); 36010 } else if (null != this.filterCommune) { 36011 currentCommune = this.filterCommune.options[this.filterCommune.selectedIndex].value; 36012 } 36013 var tmpFiltersCategories = []; 36014 36015 for (var i = 0; i < this.filtersCategory.length; i++) { 36016 if (this$1.filtersCategory[i].checked) { 36017 tmpFiltersCategories.push(this$1.filtersCategory[i].getAttribute('value')); 36018 } 36019 } 36020 36021 this.markers = []; 36022 36023 this.markerClusterGroup = __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.markerClusterGroup({ 36024 maxClusterRadius: 100,
36025 iconCreateFunction: function (cluster) { 36026 var childrenMarkers = cluster.getAllChildMarkers(); 36027 return __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.divIcon({ 36028 html: '<div class="cluster-pin">' + childrenMarkers.length + '</div>', 36029 className: 'icon-cluster', 36030 iconSize: __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.point(this.size * 2, this.size * 2), 36031 }); 36032 }, 36033 spiderfyOnMaxZoom: true, showCoverageOnHover: false, zoomToBoundsOnClick: true, 36034 }); 36035 36036 for (var key in Object.entries(this$1.data)) { 36037 if ((currentCommune == this$1.data[key].commune || currentCommune == '') && (tmpFiltersCategories.length == 0 || (tmpFiltersCategories.length > 0 && tmpFiltersCategories.includes(this$1.data[key].category)))) { 36038 var markerHtmlStyles = "background-color: " + (this$1.data[key].color) + ";" 36039 36040 36041 var markerIcon = __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.divIcon({ 36042 shadowUrl: this$1.container.getAttribute('data-shadow'), 36043 shadowSize: [0, 0], 36044 popupAnchor: [0, this$1.iconHeight * -1], 36045 html: ("<span class=\"marker-style\" style=\"" + markerHtmlStyles + "\">" + (this$1.data[key].svg_icon) + "</span>") 36046 }); 36047 36048 var latLng = [this$1.data[key].lat, this$1.data[key].lng]; 36049 36050 var marker = __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.marker(latLng, { 36051 icon: markerIcon, 36052 title: this$1.data[key].title, 36053 commune: this$1.data[key].commune, 36054 id: this$1.data[key].id, 36055 slug: this$1.data[key].slug, 36056 category: this$1.data[key].category, 36057 html: ("<span style=\"" + markerHtmlStyles + "\" />") 36058 }) 36059 .addTo(this$1.markerClusterGroup); 36060 36061 if (self.data[key].popup != '') { 36062 marker.bindPopup(self.data[key].popup); 36063 } 36064 36065 this$1.markers.push(marker); 36066 } 36067 } 36068 36069 this.markerClusterGroup.addTo(this.map); 36070 36071 var group = new __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.featureGroup(this.markers); 36072 36073 if (this.markers.length > 0) { 36074 36075 this.map.fitBounds(group.getBounds(), { 36076 paddingTopLeft: [0, 0], 36077 }); 36078 36079 } else { 36080 this.map.setView([46, 2], 6); 36081 } 36082}; 36083 36084/* harmony default export */ __webpack_exports__["a"] = (Map); 36085 36086 36087/***/ }), 36088/* 148 */ 36089/***/ (function(module, exports, __webpack_require__) { 36090 36091/* 36092 * Leaflet.markercluster 1.5.3+master.e5124b2, 36093 * Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps. 36094 * https://github.com/Leaflet/Leaflet.markercluster 36095 * (c) 2012-2017, Dave Leaver, smartrak 36096 */ 36097(function (global, factory) { 36098 true
vendor: 80,812 bytes, lines 36098-38808
36098 ? factory(exports) : 36099 typeof define === 'function' && define.amd ? define(['exports'], factory) : 36100 (global = global || self, factory((global.Leaflet = global.Leaflet || {}, global.Leaflet.markercluster = {}))); 36101}(this, function (exports) { 'use strict'; 36102 36103 /* 36104 * L.MarkerClusterGroup extends L.FeatureGroup by clustering the markers contained within 36105 */ 36106 36107 var MarkerClusterGroup = L.MarkerClusterGroup = L.FeatureGroup.extend({ 36108 36109 options: { 36110 maxClusterRadius: 80, //A cluster will cover at most this many pixels from its center 36111 iconCreateFunction: null, 36112 clusterPane: L.Marker.prototype.options.pane, 36113 36114 spiderfyOnEveryZoom: false, 36115 spiderfyOnMaxZoom: true, 36116 showCoverageOnHover: true, 36117 zoomToBoundsOnClick: true, 36118 singleMarkerMode: false, 36119 36120 disableClusteringAtZoom: null, 36121 36122 // Setting this to false prevents the removal of any clusters outside of the viewpoint, which 36123 // is the default behaviour for performance reasons. 36124 removeOutsideVisibleBounds: true, 36125 36126 // Set to false to disable all animations (zoom and spiderfy). 36127 // If false, option animateAddingMarkers below has no effect. 36128 // If L.DomUtil.TRANSITION is falsy, this option has no effect. 36129 animate: true, 36130 36131 //Whether to animate adding markers after adding the MarkerClusterGroup to the map 36132 // If you are adding individual markers set to true, if adding bulk markers leave false for massive performance gains. 36133 animateAddingMarkers: false, 36134 36135 // Make it possible to provide custom function to calculate spiderfy shape positions 36136 spiderfyShapePositions: null, 36137 36138 //Increase to increase the distance away that spiderfied markers appear from the center 36139 spiderfyDistanceMultiplier: 1, 36140 36141 // Make it possible to specify a polyline options on a spider leg 36142 spiderLegPolylineOptions: { weight: 1.5, color: '#222', opacity: 0.5 }, 36143 36144 // When bulk adding layers, adds markers in chunks. Means addLayers may not add all the layers in the call, others will be loaded during setTimeouts 36145 chunkedLoading: false, 36146 chunkInterval: 200, // process markers for a maximum of ~ n milliseconds (then trigger the chunkProgress callback) 36147 chunkDelay: 50, // at the end of each interval, give n milliseconds back to system/browser 36148 chunkProgress: null, // progress callback: function(processed, total, elapsed) (e.g. for a progress indicator) 36149 36150 //Options to pass to the L.Polygon constructor 36151 polygonOptions: {} 36152 }, 36153 36154 initialize: function (options) { 36155 L.Util.setOptions(this, options); 36156 if (!this.options.iconCreateFunction) { 36157 this.options.iconCreateFunction = this._defaultIconCreateFunction; 36158 } 36159 36160 this._featureGroup = L.featureGroup(); 36161 this._featureGroup.addEventParent(this); 36162 36163 this._nonPointGroup = L.featureGroup(); 36164 this._nonPointGroup.addEventParent(this); 36165 36166 this._inZoomAnimation = 0; 36167 this._needsClustering = []; 36168 this._needsRemoving = []; //Markers removed while we aren't on the map need to be kept track of 36169 //The bounds of the currently shown area (from _getExpandedVisibleBounds) Updated on zoom/move 36170 this._currentShownBounds = null; 36171 36172 this._queue = []; 36173 36174 this._childMarkerEventHandlers = { 36175 'dragstart': this._childMarkerDragStart, 36176 'move': this._childMarkerMoved, 36177 'dragend': this._childMarkerDragEnd, 36178 }; 36179 36180 // Hook the appropriate animation methods. 36181 var animate = L.DomUtil.TRANSITION && this.options.animate; 36182 L.extend(this, animate ? this._withAnimation : this._noAnimation); 36183 // Remember which MarkerCluster class to instantiate (animated or not). 36184 this._markerCluster = animate ? L.MarkerCluster : L.MarkerClusterNonAnimated; 36185 }, 36186 36187 addLayer: function (layer) { 36188 36189 if (layer instanceof L.LayerGroup) { 36190 return this.addLayers([layer]); 36191 } 36192 36193 //Don't cluster non point data 36194 if (!layer.getLatLng) { 36195 this._nonPointGroup.addLayer(layer); 36196 this.fire('layeradd', { layer: layer }); 36197 return this; 36198 } 36199 36200 if (!this._map) { 36201 this._needsClustering.push(layer); 36202 this.fire('layeradd', { layer: layer }); 36203 return this; 36204 } 36205 36206 if (this.hasLayer(layer)) { 36207 return this; 36208 } 36209 36210 36211 //If we have already clustered we'll need to add this one to a cluster 36212 36213 if (this._unspiderfy) { 36214 this._unspiderfy(); 36215 } 36216 36217 this._addLayer(layer, this._maxZoom); 36218 this.fire('layeradd', { layer: layer }); 36219 36220 // Refresh bounds and weighted positions. 36221 this._topClusterLevel._recalculateBounds(); 36222 36223 this._refreshClustersIcons(); 36224 36225 //Work out what is visible 36226 var visibleLayer = layer, 36227 currentZoom = this._zoom; 36228 if (layer.__parent) { 36229 while (visibleLayer.__parent._zoom >= currentZoom) { 36230 visibleLayer = visibleLayer.__parent; 36231 } 36232 } 36233 36234 if (this._currentShownBounds.contains(visibleLayer.getLatLng())) { 36235 if (this.options.animateAddingMarkers) { 36236 this._animationAddLayer(layer, visibleLayer); 36237 } else { 36238 this._animationAddLayerNonAnimated(layer, visibleLayer); 36239 } 36240 } 36241 return this; 36242 }, 36243 36244 removeLayer: function (layer) { 36245 36246 if (layer instanceof L.LayerGroup) { 36247 return this.removeLayers([layer]); 36248 } 36249 36250 //Non point layers 36251 if (!layer.getLatLng) { 36252 this._nonPointGroup.removeLayer(layer); 36253 this.fire('layerremove', { layer: layer }); 36254 return this; 36255 } 36256 36257 if (!this._map) { 36258 if (!this._arraySplice(this._needsClustering, layer) && this.hasLayer(layer)) { 36259 this._needsRemoving.push({ layer: layer, latlng: layer._latlng }); 36260 } 36261 this.fire('layerremove', { layer: layer }); 36262 return this; 36263 } 36264 36265 if (!layer.__parent) { 36266 return this; 36267 } 36268 36269 if (this._unspiderfy) { 36270 this._unspiderfy(); 36271 this._unspiderfyLayer(layer); 36272 } 36273 36274 //Remove the marker from clusters 36275 this._removeLayer(layer, true); 36276 this.fire('layerremove', { layer: layer }); 36277 36278 // Refresh bounds and weighted positions. 36279 this._topClusterLevel._recalculateBounds(); 36280 36281 this._refreshClustersIcons(); 36282 36283 layer.off(this._childMarkerEventHandlers, this); 36284 36285 if (this._featureGroup.hasLayer(layer)) { 36286 this._featureGroup.removeLayer(layer); 36287 if (layer.clusterShow) { 36288 layer.clusterShow(); 36289 } 36290 } 36291 36292 return this; 36293 }, 36294 36295 //Takes an array of markers and adds them in bulk 36296 addLayers: function (layersArray, skipLayerAddEvent) { 36297 if (!L.Util.isArray(layersArray)) { 36298 return this.addLayer(layersArray); 36299 } 36300 36301 var fg = this._featureGroup, 36302 npg = this._nonPointGroup, 36303 chunked = this.options.chunkedLoading, 36304 chunkInterval = this.options.chunkInterval, 36305 chunkProgress = this.options.chunkProgress, 36306 l = layersArray.length, 36307 offset = 0, 36308 originalArray = true, 36309 m; 36310 36311 if (this._map) { 36312 var started = (new Date()).getTime(); 36313 var process = L.bind(function () { 36314 var start = (new Date()).getTime(); 36315 36316 // Make sure to unspiderfy before starting to add some layers 36317 if (this._map && this._unspiderfy) { 36318 this._unspiderfy(); 36319 } 36320 36321 for (; offset < l; offset++) { 36322 if (chunked && offset % 200 === 0) { 36323 // every couple hundred markers, instrument the time elapsed since processing started: 36324 var elapsed = (new Date()).getTime() - start; 36325 if (elapsed > chunkInterval) { 36326 break; // been working too hard, time to take a break :-) 36327 } 36328 } 36329 36330 m = layersArray[offset]; 36331 36332 // Group of layers, append children to layersArray and skip. 36333 // Side effects: 36334 // - Total increases, so chunkProgress ratio jumps backward. 36335 // - Groups are not included in this group, only their non-group child layers (hasLayer). 36336 // Changing array length while looping does not affect performance in current browsers: 36337 // http://jsperf.com/for-loop-changing-length/6 36338 if (m instanceof L.LayerGroup) { 36339 if (originalArray) { 36340 layersArray = layersArray.slice(); 36341 originalArray = false; 36342 } 36343 this._extractNonGroupLayers(m, layersArray); 36344 l = layersArray.length; 36345 continue; 36346 } 36347 36348 //Not point data, can't be clustered 36349 if (!m.getLatLng) { 36350 npg.addLayer(m); 36351 if (!skipLayerAddEvent) { 36352 this.fire('layeradd', { layer: m }); 36353 } 36354 continue; 36355 } 36356 36357 if (this.hasLayer(m)) { 36358 continue; 36359 } 36360 36361 this._addLayer(m, this._maxZoom); 36362 if (!skipLayerAddEvent) { 36363 this.fire('layeradd', { layer: m }); 36364 } 36365 36366 //If we just made a cluster of size 2 then we need to remove the other marker from the map (if it is) or we never will 36367 if (m.__parent) { 36368 if (m.__parent.getChildCount() === 2) { 36369 var markers = m.__parent.getAllChildMarkers(), 36370 otherMarker = markers[0] === m ? markers[1] : markers[0]; 36371 fg.removeLayer(otherMarker); 36372 } 36373 } 36374 } 36375 36376 if (chunkProgress) { 36377 // report progress and time elapsed: 36378 chunkProgress(offset, l, (new Date()).getTime() - started); 36379 } 36380 36381 // Completed processing all markers. 36382 if (offset === l) { 36383 36384 // Refresh bounds and weighted positions. 36385 this._topClusterLevel._recalculateBounds(); 36386 36387 this._refreshClustersIcons(); 36388 36389 this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds); 36390 } else { 36391 setTimeout(process, this.options.chunkDelay); 36392 } 36393 }, this); 36394 36395 process(); 36396 } else { 36397 var needsClustering = this._needsClustering; 36398 36399 for (; offset < l; offset++) { 36400 m = layersArray[offset]; 36401 36402 // Group of layers, append children to layersArray and skip. 36403 if (m instanceof L.LayerGroup) { 36404 if (originalArray) { 36405 layersArray = layersArray.slice(); 36406 originalArray = false; 36407 } 36408 this._extractNonGroupLayers(m, layersArray); 36409 l = layersArray.length; 36410 continue; 36411 } 36412 36413 //Not point data, can't be clustered 36414 if (!m.getLatLng) { 36415 npg.addLayer(m); 36416 continue; 36417 } 36418 36419 if (this.hasLayer(m)) { 36420 continue; 36421 } 36422 36423 needsClustering.push(m); 36424 } 36425 } 36426 return this; 36427 }, 36428 36429 //Takes an array of markers and removes them in bulk 36430 removeLayers: function (layersArray) { 36431 var i, m, 36432 l = layersArray.length, 36433 fg = this._featureGroup, 36434 npg = this._nonPointGroup, 36435 originalArray = true; 36436 36437 if (!this._map) { 36438 for (i = 0; i < l; i++) { 36439 m = layersArray[i]; 36440 36441 // Group of layers, append children to layersArray and skip. 36442 if (m instanceof L.LayerGroup) { 36443 if (originalArray) { 36444 layersArray = layersArray.slice(); 36445 originalArray = false; 36446 } 36447 this._extractNonGroupLayers(m, layersArray); 36448 l = layersArray.length; 36449 continue; 36450 } 36451 36452 this._arraySplice(this._needsClustering, m); 36453 npg.removeLayer(m); 36454 if (this.hasLayer(m)) { 36455 this._needsRemoving.push({ layer: m, latlng: m._latlng }); 36456 } 36457 this.fire('layerremove', { layer: m }); 36458 } 36459 return this; 36460 } 36461 36462 if (this._unspiderfy) { 36463 this._unspiderfy(); 36464 36465 // Work on a copy of the array, so that next loop is not affected. 36466 var layersArray2 = layersArray.slice(), 36467 l2 = l; 36468 for (i = 0; i < l2; i++) { 36469 m = layersArray2[i]; 36470 36471 // Group of layers, append children to layersArray and skip. 36472 if (m instanceof L.LayerGroup) { 36473 this._extractNonGroupLayers(m, layersArray2); 36474 l2 = layersArray2.length; 36475 continue; 36476 } 36477 36478 this._unspiderfyLayer(m); 36479 } 36480 } 36481 36482 for (i = 0; i < l; i++) { 36483 m = layersArray[i]; 36484 36485 // Group of layers, append children to layersArray and skip. 36486 if (m instanceof L.LayerGroup) { 36487 if (originalArray) { 36488 layersArray = layersArray.slice(); 36489 originalArray = false; 36490 } 36491 this._extractNonGroupLayers(m, layersArray); 36492 l = layersArray.length; 36493 continue; 36494 } 36495 36496 if (!m.__parent) { 36497 npg.removeLayer(m); 36498 this.fire('layerremove', { layer: m }); 36499 continue; 36500 } 36501 36502 this._removeLayer(m, true, true); 36503 this.fire('layerremove', { layer: m }); 36504 36505 if (fg.hasLayer(m)) { 36506 fg.removeLayer(m); 36507 if (m.clusterShow) { 36508 m.clusterShow(); 36509 } 36510 } 36511 } 36512 36513 // Refresh bounds and weighted positions. 36514 this._topClusterLevel._recalculateBounds(); 36515 36516 this._refreshClustersIcons(); 36517 36518 //Fix up the clusters and markers on the map 36519 this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds); 36520 36521 return this; 36522 }, 36523 36524 //Removes all layers from the MarkerClusterGroup 36525 clearLayers: function () { 36526 //Need our own special implementation as the LayerGroup one doesn't work for us 36527 36528 //If we aren't on the map (yet), blow away the markers we know of 36529 if (!this._map) { 36530 this._needsClustering = []; 36531 this._needsRemoving = []; 36532 delete this._gridClusters; 36533 delete this._gridUnclustered; 36534 } 36535 36536 if (this._noanimationUnspiderfy) { 36537 this._noanimationUnspiderfy(); 36538 } 36539 36540 //Remove all the visible layers 36541 this._featureGroup.clearLayers(); 36542 this._nonPointGroup.clearLayers(); 36543 36544 this.eachLayer(function (marker) { 36545 marker.off(this._childMarkerEventHandlers, this); 36546 delete marker.__parent; 36547 }, this); 36548 36549 if (this._map) { 36550 //Reset _topClusterLevel and the DistanceGrids 36551 this._generateInitialClusters(); 36552 } 36553 36554 return this; 36555 }, 36556 36557 //Override FeatureGroup.getBounds as it doesn't work 36558 getBounds: function () { 36559 var bounds = new L.LatLngBounds(); 36560 36561 if (this._topClusterLevel) { 36562 bounds.extend(this._topClusterLevel._bounds); 36563 } 36564 36565 for (var i = this._needsClustering.length - 1; i >= 0; i--) { 36566 bounds.extend(this._needsClustering[i].getLatLng()); 36567 } 36568 36569 bounds.extend(this._nonPointGroup.getBounds()); 36570 36571 return bounds; 36572 }, 36573 36574 //Overrides LayerGroup.eachLayer 36575 eachLayer: function (method, context) { 36576 var markers = this._needsClustering.slice(), 36577 needsRemoving = this._needsRemoving, 36578 thisNeedsRemoving, i, j; 36579 36580 if (this._topClusterLevel) { 36581 this._topClusterLevel.getAllChildMarkers(markers); 36582 } 36583 36584 for (i = markers.length - 1; i >= 0; i--) { 36585 thisNeedsRemoving = true; 36586 36587 for (j = needsRemoving.length - 1; j >= 0; j--) { 36588 if (needsRemoving[j].layer === markers[i]) { 36589 thisNeedsRemoving = false; 36590 break; 36591 } 36592 } 36593 36594 if (thisNeedsRemoving) { 36595 method.call(context, markers[i]); 36596 } 36597 } 36598 36599 this._nonPointGroup.eachLayer(method, context); 36600 }, 36601 36602 //Overrides LayerGroup.getLayers 36603 getLayers: function () { 36604 var layers = []; 36605 this.eachLayer(function (l) { 36606 layers.push(l); 36607 }); 36608 return layers; 36609 }, 36610 36611 //Overrides LayerGroup.getLayer, WARNING: Really bad performance 36612 getLayer: function (id) { 36613 var result = null; 36614 36615 id = parseInt(id, 10); 36616 36617 this.eachLayer(function (l) { 36618 if (L.stamp(l) === id) { 36619 result = l; 36620 } 36621 }); 36622 36623 return result; 36624 }, 36625 36626 //Returns true if the given layer is in this MarkerClusterGroup 36627 hasLayer: function (layer) { 36628 if (!layer) { 36629 return false; 36630 } 36631 36632 var i, anArray = this._needsClustering; 36633 36634 for (i = anArray.length - 1; i >= 0; i--) { 36635 if (anArray[i] === layer) { 36636 return true; 36637 } 36638 } 36639 36640 anArray = this._needsRemoving; 36641 for (i = anArray.length - 1; i >= 0; i--) { 36642 if (anArray[i].layer === layer) { 36643 return false; 36644 } 36645 } 36646 36647 return !!(layer.__parent && layer.__parent._group === this) || this._nonPointGroup.hasLayer(layer); 36648 }, 36649 36650 //Zoom down to show the given layer (spiderfying if necessary) then calls the callback 36651 zoomToShowLayer: function (layer, callback) { 36652 36653 var map = this._map; 36654 36655 if (typeof callback !== 'function') { 36656 callback = function () {}; 36657 } 36658 36659 var showMarker = function () { 36660 // Assumes that map.hasLayer checks for direct appearance on map, not recursively calling 36661 // hasLayer on Layer Groups that are on map (typically not calling this MarkerClusterGroup.hasLayer, which would always return true) 36662 if ((map.hasLayer(layer) || map.hasLayer(layer.__parent)) && !this._inZoomAnimation) { 36663 this._map.off('moveend', showMarker, this); 36664 this.off('animationend', showMarker, this); 36665 36666 if (map.hasLayer(layer)) { 36667 callback(); 36668 } else if (layer.__parent._icon) { 36669 this.once('spiderfied', callback, this); 36670 layer.__parent.spiderfy(); 36671 } 36672 } 36673 }; 36674 36675 if (layer._icon && this._map.getBounds().contains(layer.getLatLng())) { 36676 //Layer is visible ond on screen, immediate return 36677 callback(); 36678 } else if (layer.__parent._zoom < Math.round(this._map._zoom)) { 36679 //Layer should be visible at this zoom level. It must not be on screen so just pan over to it 36680 this._map.on('moveend', showMarker, this); 36681 this._map.panTo(layer.getLatLng()); 36682 } else { 36683 this._map.on('moveend', showMarker, this); 36684 this.on('animationend', showMarker, this); 36685 layer.__parent.zoomToBounds(); 36686 } 36687 }, 36688 36689 //Overrides FeatureGroup.onAdd 36690 onAdd: function (map) { 36691 this._map = map; 36692 var i, l, layer; 36693 36694 if (!isFinite(this._map.getMaxZoom())) { 36695 throw "Map has no maxZoom specified"; 36696 } 36697 36698 this._featureGroup.addTo(map); 36699 this._nonPointGroup.addTo(map); 36700 36701 if (!this._gridClusters) { 36702 this._generateInitialClusters(); 36703 } 36704 36705 this._maxLat = map.options.crs.projection.MAX_LATITUDE; 36706 36707 //Restore all the positions as they are in the MCG before removing them 36708 for (i = 0, l = this._needsRemoving.length; i < l; i++) { 36709 layer = this._needsRemoving[i]; 36710 layer.newlatlng = layer.layer._latlng; 36711 layer.layer._latlng = layer.latlng; 36712 } 36713 //Remove them, then restore their new positions 36714 for (i = 0, l = this._needsRemoving.length; i < l; i++) { 36715 layer = this._needsRemoving[i]; 36716 this._removeLayer(layer.layer, true); 36717 layer.layer._latlng = layer.newlatlng; 36718 } 36719 this._needsRemoving = []; 36720 36721 //Remember the current zoom level and bounds 36722 this._zoom = Math.round(this._map._zoom); 36723 this._currentShownBounds = this._getExpandedVisibleBounds(); 36724 36725 this._map.on('zoomend', this._zoomEnd, this); 36726 this._map.on('moveend', this._moveEnd, this); 36727 36728 if (this._spiderfierOnAdd) { //TODO FIXME: Not sure how to have spiderfier add something on here nicely 36729 this._spiderfierOnAdd(); 36730 } 36731 36732 this._bindEvents(); 36733 36734 //Actually add our markers to the map: 36735 l = this._needsClustering; 36736 this._needsClustering = []; 36737 this.addLayers(l, true); 36738 }, 36739 36740 //Overrides FeatureGroup.onRemove 36741 onRemove: function (map) { 36742 map.off('zoomend', this._zoomEnd, this); 36743 map.off('moveend', this._moveEnd, this); 36744 36745 this._unbindEvents(); 36746 36747 //In case we are in a cluster animation 36748 this._map._mapPane.className = this._map._mapPane.className.replace(' leaflet-cluster-anim', ''); 36749 36750 if (this._spiderfierOnRemove) { //TODO FIXME: Not sure how to have spiderfier add something on here nicely 36751 this._spiderfierOnRemove(); 36752 } 36753 36754 delete this._maxLat; 36755 36756 //Clean up all the layers we added to the map 36757 this._hideCoverage(); 36758 this._featureGroup.remove(); 36759 this._nonPointGroup.remove(); 36760 36761 this._featureGroup.clearLayers(); 36762 36763 this._map = null; 36764 }, 36765 36766 getVisibleParent: function (marker) { 36767 var vMarker = marker; 36768 while (vMarker && !vMarker._icon) { 36769 vMarker = vMarker.__parent; 36770 } 36771 return vMarker || null; 36772 }, 36773 36774 //Remove the given object from the given array 36775 _arraySplice: function (anArray, obj) { 36776 for (var i = anArray.length - 1; i >= 0; i--) { 36777 if (anArray[i] === obj) { 36778 anArray.splice(i, 1); 36779 return true; 36780 } 36781 } 36782 }, 36783 36784 /** 36785 * Removes a marker from all _gridUnclustered zoom levels, starting at the supplied zoom. 36786 * @param marker to be removed from _gridUnclustered. 36787 * @param z integer bottom start zoom level (included) 36788 * @private 36789 */ 36790 _removeFromGridUnclustered: function (marker, z) { 36791 var map = this._map, 36792 gridUnclustered = this._gridUnclustered, 36793 minZoom = Math.floor(this._map.getMinZoom()); 36794 36795 for (; z >= minZoom; z--) { 36796 if (!gridUnclustered[z].removeObject(marker, map.project(marker.getLatLng(), z))) { 36797 break; 36798 } 36799 } 36800 }, 36801 36802 _childMarkerDragStart: function (e) { 36803 e.target.__dragStart = e.target._latlng; 36804 }, 36805 36806 _childMarkerMoved: function (e) { 36807 if (!this._ignoreMove && !e.target.__dragStart) { 36808 var isPopupOpen = e.target._popup && e.target._popup.isOpen(); 36809 36810 this._moveChild(e.target, e.oldLatLng, e.latlng); 36811 36812 if (isPopupOpen) { 36813 e.target.openPopup(); 36814 } 36815 } 36816 }, 36817 36818 _moveChild: function (layer, from, to) { 36819 layer._latlng = from; 36820 this.removeLayer(layer); 36821 36822 layer._latlng = to; 36823 this.addLayer(layer); 36824 }, 36825 36826 _childMarkerDragEnd: function (e) { 36827 var dragStart = e.target.__dragStart; 36828 delete e.target.__dragStart; 36829 if (dragStart) { 36830 this._moveChild(e.target, dragStart, e.target._latlng); 36831 } 36832 }, 36833 36834 36835 //Internal function for removing a marker from everything. 36836 //dontUpdateMap: set to true if you will handle updating the map manually (for bulk functions) 36837 _removeLayer: function (marker, removeFromDistanceGrid, dontUpdateMap) { 36838 var gridClusters = this._gridClusters, 36839 gridUnclustered = this._gridUnclustered, 36840 fg = this._featureGroup, 36841 map = this._map, 36842 minZoom = Math.floor(this._map.getMinZoom()); 36843 36844 //Remove the marker from distance clusters it might be in 36845 if (removeFromDistanceGrid) { 36846 this._removeFromGridUnclustered(marker, this._maxZoom); 36847 } 36848 36849 //Work our way up the clusters removing them as we go if required 36850 var cluster = marker.__parent, 36851 markers = cluster._markers, 36852 otherMarker; 36853 36854 //Remove the marker from the immediate parents marker list 36855 this._arraySplice(markers, marker); 36856 36857 while (cluster) { 36858 cluster._childCount--; 36859 cluster._boundsNeedUpdate = true; 36860 36861 if (cluster._zoom < minZoom) { 36862 //Top level, do nothing 36863 break; 36864 } else if (removeFromDistanceGrid && cluster._childCount <= 1) { //Cluster no longer required 36865 //We need to push the other marker up to the parent 36866 otherMarker = cluster._markers[0] === marker ? cluster._markers[1] : cluster._markers[0]; 36867 36868 //Update distance grid 36869 gridClusters[cluster._zoom].removeObject(cluster, map.project(cluster._cLatLng, cluster._zoom)); 36870 gridUnclustered[cluster._zoom].addObject(otherMarker, map.project(otherMarker.getLatLng(), cluster._zoom)); 36871 36872 //Move otherMarker up to parent 36873 this._arraySplice(cluster.__parent._childClusters, cluster); 36874 cluster.__parent._markers.push(otherMarker); 36875 otherMarker.__parent = cluster.__parent; 36876 36877 if (cluster._icon) { 36878 //Cluster is currently on the map, need to put the marker on the map instead 36879 fg.removeLayer(cluster); 36880 if (!dontUpdateMap) { 36881 fg.addLayer(otherMarker); 36882 } 36883 } 36884 } else { 36885 cluster._iconNeedsUpdate = true; 36886 } 36887 36888 cluster = cluster.__parent; 36889 } 36890 36891 delete marker.__parent; 36892 }, 36893 36894 _isOrIsParent: function (el, oel) { 36895 while (oel) { 36896 if (el === oel) { 36897 return true; 36898 } 36899 oel = oel.parentNode; 36900 } 36901 return false; 36902 }, 36903 36904 //Override L.Evented.fire 36905 fire: function (type, data, propagate) { 36906 if (data && data.layer instanceof L.MarkerCluster) { 36907 //Prevent multiple clustermouseover/off events if the icon is made up of stacked divs (Doesn't work in ie <= 8, no relatedTarget) 36908 if (data.originalEvent && this._isOrIsParent(data.layer._icon, data.originalEvent.relatedTarget)) { 36909 return; 36910 } 36911 type = 'cluster' + type; 36912 } 36913 36914 L.FeatureGroup.prototype.fire.call(this, type, data, propagate); 36915 }, 36916 36917 //Override L.Evented.listens 36918 listens: function (type, propagate) { 36919 return L.FeatureGroup.prototype.listens.call(this, type, propagate) || L.FeatureGroup.prototype.listens.call(this, 'cluster' + type, propagate); 36920 }, 36921 36922 //Default functionality 36923 _defaultIconCreateFunction: function (cluster) { 36924 var childCount = cluster.getChildCount(); 36925 36926 var c = ' marker-cluster-'; 36927 if (childCount < 10) { 36928 c += 'small'; 36929 } else if (childCount < 100) { 36930 c += 'medium'; 36931 } else { 36932 c += 'large'; 36933 } 36934 36935 return new L.DivIcon({ html: '<div><span>' + childCount + '</span></div>', className: 'marker-cluster' + c, iconSize: new L.Point(40, 40) }); 36936 }, 36937 36938 _bindEvents: function () { 36939 var map = this._map, 36940 spiderfyOnMaxZoom = this.options.spiderfyOnMaxZoom, 36941 showCoverageOnHover = this.options.showCoverageOnHover, 36942 zoomToBoundsOnClick = this.options.zoomToBoundsOnClick, 36943 spiderfyOnEveryZoom = this.options.spiderfyOnEveryZoom; 36944 36945 //Zoom on cluster click or spiderfy if we are at the lowest level 36946 if (spiderfyOnMaxZoom || zoomToBoundsOnClick || spiderfyOnEveryZoom) { 36947 this.on('clusterclick clusterkeypress', this._zoomOrSpiderfy, this); 36948 } 36949 36950 //Show convex hull (boundary) polygon on mouse over 36951 if (showCoverageOnHover) { 36952 this.on('clustermouseover', this._showCoverage, this); 36953 this.on('clustermouseout', this._hideCoverage, this); 36954 map.on('zoomend', this._hideCoverage, this); 36955 } 36956 }, 36957 36958 _zoomOrSpiderfy: function (e) { 36959 var cluster = e.layer, 36960 bottomCluster = cluster; 36961 36962 if (e.type === 'clusterkeypress' && e.originalEvent && e.originalEvent.keyCode !== 13) { 36963 return; 36964 } 36965 36966 while (bottomCluster._childClusters.length === 1) { 36967 bottomCluster = bottomCluster._childClusters[0]; 36968 } 36969 36970 if (bottomCluster._zoom === this._maxZoom && 36971 bottomCluster._childCount === cluster._childCount && 36972 this.options.spiderfyOnMaxZoom) { 36973 36974 // All child markers are contained in a single cluster from this._maxZoom to this cluster. 36975 cluster.spiderfy(); 36976 } else if (this.options.zoomToBoundsOnClick) { 36977 cluster.zoomToBounds(); 36978 } 36979 36980 if (this.options.spiderfyOnEveryZoom) { 36981 cluster.spiderfy(); 36982 } 36983 36984 // Focus the map again for keyboard users. 36985 if (e.originalEvent && e.originalEvent.keyCode === 13) { 36986 this._map._container.focus(); 36987 } 36988 }, 36989 36990 _showCoverage: function (e) { 36991 var map = this._map; 36992 if (this._inZoomAnimation) { 36993 return; 36994 } 36995 if (this._shownPolygon) { 36996 map.removeLayer(this._shownPolygon); 36997 } 36998 if (e.layer.getChildCount() > 2 && e.layer !== this._spiderfied) { 36999 this._shownPolygon = new L.Polygon(e.layer.getConvexHull(), this.options.polygonOptions); 37000 map.addLayer(this._shownPolygon); 37001 } 37002 }, 37003 37004 _hideCoverage: function () { 37005 if (this._shownPolygon) { 37006 this._map.removeLayer(this._shownPolygon); 37007 this._shownPolygon = null; 37008 } 37009 }, 37010 37011 _unbindEvents: function () { 37012 var spiderfyOnMaxZoom = this.options.spiderfyOnMaxZoom, 37013 showCoverageOnHover = this.options.showCoverageOnHover, 37014 zoomToBoundsOnClick = this.options.zoomToBoundsOnClick, 37015 spiderfyOnEveryZoom = this.options.spiderfyOnEveryZoom, 37016 map = this._map; 37017 37018 if (spiderfyOnMaxZoom || zoomToBoundsOnClick || spiderfyOnEveryZoom) { 37019 this.off('clusterclick clusterkeypress', this._zoomOrSpiderfy, this); 37020 } 37021 if (showCoverageOnHover) { 37022 this.off('clustermouseover', this._showCoverage, this); 37023 this.off('clustermouseout', this._hideCoverage, this); 37024 map.off('zoomend', this._hideCoverage, this); 37025 } 37026 }, 37027 37028 _zoomEnd: function () { 37029 if (!this._map) { //May have been removed from the map by a zoomEnd handler 37030 return; 37031 } 37032 this._mergeSplitClusters(); 37033 37034 this._zoom = Math.round(this._map._zoom); 37035 this._currentShownBounds = this._getExpandedVisibleBounds(); 37036 }, 37037 37038 _moveEnd: function () { 37039 if (this._inZoomAnimation) { 37040 return; 37041 } 37042 37043 var newBounds = this._getExpandedVisibleBounds(); 37044 37045 this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), this._zoom, newBounds); 37046 this._topClusterLevel._recursivelyAddChildrenToMap(null, Math.round(this._map._zoom), newBounds); 37047 37048 this._currentShownBounds = newBounds; 37049 return; 37050 }, 37051 37052 _generateInitialClusters: function () { 37053 var maxZoom = Math.ceil(this._map.getMaxZoom()), 37054 minZoom = Math.floor(this._map.getMinZoom()), 37055 radius = this.options.maxClusterRadius, 37056 radiusFn = radius; 37057 37058 //If we just set maxClusterRadius to a single number, we need to create 37059 //a simple function to return that number. Otherwise, we just have to 37060 //use the function we've passed in. 37061 if (typeof radius !== "function") { 37062 radiusFn = function () { return radius; }; 37063 } 37064 37065 if (this.options.disableClusteringAtZoom !== null) { 37066 maxZoom = this.options.disableClusteringAtZoom - 1; 37067 } 37068 this._maxZoom = maxZoom; 37069 this._gridClusters = {}; 37070 this._gridUnclustered = {}; 37071 37072 //Set up DistanceGrids for each zoom 37073 for (var zoom = maxZoom; zoom >= minZoom; zoom--) { 37074 this._gridClusters[zoom] = new L.DistanceGrid(radiusFn(zoom)); 37075 this._gridUnclustered[zoom] = new L.DistanceGrid(radiusFn(zoom)); 37076 } 37077 37078 // Instantiate the appropriate L.MarkerCluster class (animated or not). 37079 this._topClusterLevel = new this._markerCluster(this, minZoom - 1); 37080 }, 37081 37082 //Zoom: Zoom to start adding at (Pass this._maxZoom to start at the bottom) 37083 _addLayer: function (layer, zoom) { 37084 var gridClusters = this._gridClusters, 37085 gridUnclustered = this._gridUnclustered, 37086 minZoom = Math.floor(this._map.getMinZoom()), 37087 markerPoint, z; 37088 37089 if (this.options.singleMarkerMode) { 37090 this._overrideMarkerIcon(layer); 37091 } 37092 37093 layer.on(this._childMarkerEventHandlers, this); 37094 37095 //Find the lowest zoom level to slot this one in 37096 for (; zoom >= minZoom; zoom--) { 37097 markerPoint = this._map.project(layer.getLatLng(), zoom); // calculate pixel position 37098 37099 //Try find a cluster close by 37100 var closest = gridClusters[zoom].getNearObject(markerPoint); 37101 if (closest) { 37102 closest._addChild(layer); 37103 layer.__parent = closest; 37104 return; 37105 } 37106 37107 //Try find a marker close by to form a new cluster with 37108 closest = gridUnclustered[zoom].getNearObject(markerPoint); 37109 if (closest) { 37110 var parent = closest.__parent; 37111 if (parent) { 37112 this._removeLayer(closest, false); 37113 } 37114 37115 //Create new cluster with these 2 in it 37116 37117 var newCluster = new this._markerCluster(this, zoom, closest, layer); 37118 gridClusters[zoom].addObject(newCluster, this._map.project(newCluster._cLatLng, zoom)); 37119 closest.__parent = newCluster; 37120 layer.__parent = newCluster; 37121 37122 //First create any new intermediate parent clusters that don't exist 37123 var lastParent = newCluster; 37124 for (z = zoom - 1; z > parent._zoom; z--) { 37125 lastParent = new this._markerCluster(this, z, lastParent); 37126 gridClusters[z].addObject(lastParent, this._map.project(closest.getLatLng(), z)); 37127 } 37128 parent._addChild(lastParent); 37129 37130 //Remove closest from this zoom level and any above that it is in, replace with newCluster 37131 this._removeFromGridUnclustered(closest, zoom); 37132 37133 return; 37134 } 37135 37136 //Didn't manage to cluster in at this zoom, record us as a marker here and continue upwards 37137 gridUnclustered[zoom].addObject(layer, markerPoint); 37138 } 37139 37140 //Didn't get in anything, add us to the top 37141 this._topClusterLevel._addChild(layer); 37142 layer.__parent = this._topClusterLevel; 37143 return; 37144 }, 37145 37146 /** 37147 * Refreshes the icon of all "dirty" visible clusters. 37148 * Non-visible "dirty" clusters will be updated when they are added to the map. 37149 * @private 37150 */ 37151 _refreshClustersIcons: function () { 37152 this._featureGroup.eachLayer(function (c) { 37153 if (c instanceof L.MarkerCluster && c._iconNeedsUpdate) { 37154 c._updateIcon(); 37155 } 37156 }); 37157 }, 37158 37159 //Enqueue code to fire after the marker expand/contract has happened 37160 _enqueue: function (fn) { 37161 this._queue.push(fn); 37162 if (!this._queueTimeout) { 37163 this._queueTimeout = setTimeout(L.bind(this._processQueue, this), 300); 37164 } 37165 }, 37166 _processQueue: function () { 37167 for (var i = 0; i < this._queue.length; i++) { 37168 this._queue[i].call(this); 37169 } 37170 this._queue.length = 0; 37171 clearTimeout(this._queueTimeout); 37172 this._queueTimeout = null; 37173 }, 37174 37175 //Merge and split any existing clusters that are too big or small 37176 _mergeSplitClusters: function () { 37177 var mapZoom = Math.round(this._map._zoom); 37178 37179 //In case we are starting to split before the animation finished 37180 this._processQueue(); 37181 37182 if (this._zoom < mapZoom && this._currentShownBounds.intersects(this._getExpandedVisibleBounds())) { //Zoom in, split 37183 this._animationStart(); 37184 //Remove clusters now off screen 37185 this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), this._zoom, this._getExpandedVisibleBounds()); 37186 37187 this._animationZoomIn(this._zoom, mapZoom); 37188 37189 } else if (this._zoom > mapZoom) { //Zoom out, merge 37190 this._animationStart(); 37191 37192 this._animationZoomOut(this._zoom, mapZoom); 37193 } else { 37194 this._moveEnd(); 37195 } 37196 }, 37197 37198 //Gets the maps visible bounds expanded in each direction by the size of the screen (so the user cannot see an area we do not cover in one pan) 37199 _getExpandedVisibleBounds: function () { 37200 if (!this.options.removeOutsideVisibleBounds) { 37201 return this._mapBoundsInfinite; 37202 } else if (L.Browser.mobile) { 37203 return this._checkBoundsMaxLat(this._map.getBounds()); 37204 } 37205 37206 return this._checkBoundsMaxLat(this._map.getBounds().pad(1)); // Padding expands the bounds by its own dimensions but scaled with the given factor. 37207 }, 37208 37209 /** 37210 * Expands the latitude to Infinity (or -Infinity) if the input bounds reach the map projection maximum defined latitude 37211 * (in the case of Web/Spherical Mercator, it is 85.0511287798 / see https://en.wikipedia.org/wiki/Web_Mercator#Formulas). 37212 * Otherwise, the removeOutsideVisibleBounds option will remove markers beyond that limit, whereas the same markers without 37213 * this option (or outside MCG) will have their position floored (ceiled) by the projection and rendered at that limit, 37214 * making the user think that MCG "eats" them and never displays them again. 37215 * @param bounds L.LatLngBounds 37216 * @returns {L.LatLngBounds} 37217 * @private 37218 */ 37219 _checkBoundsMaxLat: function (bounds) { 37220 var maxLat = this._maxLat; 37221 37222 if (maxLat !== undefined) { 37223 if (bounds.getNorth() >= maxLat) { 37224 bounds._northEast.lat = Infinity; 37225 } 37226 if (bounds.getSouth() <= -maxLat) { 37227 bounds._southWest.lat = -Infinity; 37228 } 37229 } 37230 37231 return bounds; 37232 }, 37233 37234 //Shared animation code 37235 _animationAddLayerNonAnimated: function (layer, newCluster) { 37236 if (newCluster === layer) { 37237 this._featureGroup.addLayer(layer); 37238 } else if (newCluster._childCount === 2) { 37239 newCluster._addToMap(); 37240 37241 var markers = newCluster.getAllChildMarkers(); 37242 this._featureGroup.removeLayer(markers[0]); 37243 this._featureGroup.removeLayer(markers[1]); 37244 } else { 37245 newCluster._updateIcon(); 37246 } 37247 }, 37248 37249 /** 37250 * Extracts individual (i.e. non-group) layers from a Layer Group. 37251 * @param group to extract layers from. 37252 * @param output {Array} in which to store the extracted layers. 37253 * @returns {*|Array} 37254 * @private 37255 */ 37256 _extractNonGroupLayers: function (group, output) { 37257 var layers = group.getLayers(), 37258 i = 0, 37259 layer; 37260 37261 output = output || []; 37262 37263 for (; i < layers.length; i++) { 37264 layer = layers[i]; 37265 37266 if (layer instanceof L.LayerGroup) { 37267 this._extractNonGroupLayers(layer, output); 37268 continue; 37269 } 37270 37271 output.push(layer); 37272 } 37273 37274 return output; 37275 }, 37276 37277 /** 37278 * Implements the singleMarkerMode option. 37279 * @param layer Marker to re-style using the Clusters iconCreateFunction. 37280 * @returns {L.Icon} The newly created icon. 37281 * @private 37282 */ 37283 _overrideMarkerIcon: function (layer) { 37284 var icon = layer.options.icon = this.options.iconCreateFunction({ 37285 getChildCount: function () { 37286 return 1; 37287 }, 37288 getAllChildMarkers: function () { 37289 return [layer]; 37290 } 37291 }); 37292 37293 return icon; 37294 } 37295 }); 37296 37297 // Constant bounds used in case option "removeOutsideVisibleBounds" is set to false. 37298 L.MarkerClusterGroup.include({ 37299 _mapBoundsInfinite: new L.LatLngBounds(new L.LatLng(-Infinity, -Infinity), new L.LatLng(Infinity, Infinity)) 37300 }); 37301 37302 L.MarkerClusterGroup.include({ 37303 _noAnimation: { 37304 //Non Animated versions of everything 37305 _animationStart: function () { 37306 //Do nothing... 37307 }, 37308 _animationZoomIn: function (previousZoomLevel, newZoomLevel) { 37309 this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), previousZoomLevel); 37310 this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds()); 37311 37312 //We didn't actually animate, but we use this event to mean "clustering animations have finished" 37313 this.fire('animationend'); 37314 }, 37315 _animationZoomOut: function (previousZoomLevel, newZoomLevel) { 37316 this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), previousZoomLevel); 37317 this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds()); 37318 37319 //We didn't actually animate, but we use this event to mean "clustering animations have finished" 37320 this.fire('animationend'); 37321 }, 37322 _animationAddLayer: function (layer, newCluster) { 37323 this._animationAddLayerNonAnimated(layer, newCluster); 37324 } 37325 }, 37326 37327 _withAnimation: { 37328 //Animated versions here 37329 _animationStart: function () { 37330 this._map._mapPane.className += ' leaflet-cluster-anim'; 37331 this._inZoomAnimation++; 37332 }, 37333 37334 _animationZoomIn: function (previousZoomLevel, newZoomLevel) { 37335 var bounds = this._getExpandedVisibleBounds(), 37336 fg = this._featureGroup, 37337 minZoom = Math.floor(this._map.getMinZoom()), 37338 i; 37339 37340 this._ignoreMove = true; 37341 37342 //Add all children of current clusters to map and remove those clusters from map 37343 this._topClusterLevel._recursively(bounds, previousZoomLevel, minZoom, function (c) { 37344 var startPos = c._latlng, 37345 markers = c._markers, 37346 m; 37347 37348 if (!bounds.contains(startPos)) { 37349 startPos = null; 37350 } 37351 37352 if (c._isSingleParent() && previousZoomLevel + 1 === newZoomLevel) { //Immediately add the new child and remove us 37353 fg.removeLayer(c); 37354 c._recursivelyAddChildrenToMap(null, newZoomLevel, bounds); 37355 } else { 37356 //Fade out old cluster 37357 c.clusterHide(); 37358 c._recursivelyAddChildrenToMap(startPos, newZoomLevel, bounds); 37359 } 37360 37361 //Remove all markers that aren't visible any more 37362 //TODO: Do we actually need to do this on the higher levels too? 37363 for (i = markers.length - 1; i >= 0; i--) { 37364 m = markers[i]; 37365 if (!bounds.contains(m._latlng)) { 37366 fg.removeLayer(m); 37367 } 37368 } 37369 37370 }); 37371 37372 this._forceLayout(); 37373 37374 //Update opacities 37375 this._topClusterLevel._recursivelyBecomeVisible(bounds, newZoomLevel); 37376 //TODO Maybe? Update markers in _recursivelyBecomeVisible 37377 fg.eachLayer(function (n) { 37378 if (!(n instanceof L.MarkerCluster) && n._icon) { 37379 n.clusterShow(); 37380 } 37381 }); 37382 37383 //update the positions of the just added clusters/markers 37384 this._topClusterLevel._recursively(bounds, previousZoomLevel, newZoomLevel, function (c) { 37385 c._recursivelyRestoreChildPositions(newZoomLevel); 37386 }); 37387 37388 this._ignoreMove = false; 37389 37390 //Remove the old clusters and close the zoom animation 37391 this._enqueue(function () { 37392 //update the positions of the just added clusters/markers 37393 this._topClusterLevel._recursively(bounds, previousZoomLevel, minZoom, function (c) { 37394 fg.removeLayer(c); 37395 c.clusterShow(); 37396 }); 37397 37398 this._animationEnd(); 37399 }); 37400 }, 37401 37402 _animationZoomOut: function (previousZoomLevel, newZoomLevel) { 37403 this._animationZoomOutSingle(this._topClusterLevel, previousZoomLevel - 1, newZoomLevel); 37404 37405 //Need to add markers for those that weren't on the map before but are now 37406 this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds()); 37407 //Remove markers that were on the map before but won't be now 37408 this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), previousZoomLevel, this._getExpandedVisibleBounds()); 37409 }, 37410 37411 _animationAddLayer: function (layer, newCluster) { 37412 var me = this, 37413 fg = this._featureGroup; 37414 37415 fg.addLayer(layer); 37416 if (newCluster !== layer) { 37417 if (newCluster._childCount > 2) { //Was already a cluster 37418 37419 newCluster._updateIcon(); 37420 this._forceLayout(); 37421 this._animationStart(); 37422 37423 layer._setPos(this._map.latLngToLayerPoint(newCluster.getLatLng())); 37424 layer.clusterHide(); 37425 37426 this._enqueue(function () { 37427 fg.removeLayer(layer); 37428 layer.clusterShow(); 37429 37430 me._animationEnd(); 37431 }); 37432 37433 } else { //Just became a cluster 37434 this._forceLayout(); 37435 37436 me._animationStart(); 37437 me._animationZoomOutSingle(newCluster, this._map.getMaxZoom(), this._zoom); 37438 } 37439 } 37440 } 37441 }, 37442 37443 // Private methods for animated versions. 37444 _animationZoomOutSingle: function (cluster, previousZoomLevel, newZoomLevel) { 37445 var bounds = this._getExpandedVisibleBounds(), 37446 minZoom = Math.floor(this._map.getMinZoom()); 37447 37448 //Animate all of the markers in the clusters to move to their cluster center point 37449 cluster._recursivelyAnimateChildrenInAndAddSelfToMap(bounds, minZoom, previousZoomLevel + 1, newZoomLevel); 37450 37451 var me = this; 37452 37453 //Update the opacity (If we immediately set it they won't animate) 37454 this._forceLayout(); 37455 cluster._recursivelyBecomeVisible(bounds, newZoomLevel); 37456 37457 //TODO: Maybe use the transition timing stuff to make this more reliable 37458 //When the animations are done, tidy up 37459 this._enqueue(function () { 37460 37461 //This cluster stopped being a cluster before the timeout fired 37462 if (cluster._childCount === 1) { 37463 var m = cluster._markers[0]; 37464 //If we were in a cluster animation at the time then the opacity and position of our child could be wrong now, so fix it 37465 this._ignoreMove = true; 37466 m.setLatLng(m.getLatLng()); 37467 this._ignoreMove = false; 37468 if (m.clusterShow) { 37469 m.clusterShow(); 37470 } 37471 } else { 37472 cluster._recursively(bounds, newZoomLevel, minZoom, function (c) { 37473 c._recursivelyRemoveChildrenFromMap(bounds, minZoom, previousZoomLevel + 1); 37474 }); 37475 } 37476 me._animationEnd(); 37477 }); 37478 }, 37479 37480 _animationEnd: function () { 37481 if (this._map) { 37482 this._map._mapPane.className = this._map._mapPane.className.replace(' leaflet-cluster-anim', ''); 37483 } 37484 this._inZoomAnimation--; 37485 this.fire('animationend'); 37486 }, 37487 37488 //Force a browser layout of stuff in the map 37489 // Should apply the current opacity and location to all elements so we can update them again for an animation 37490 _forceLayout: function () { 37491 //In my testing this works, infact offsetWidth of any element seems to work. 37492 //Could loop all this._layers and do this for each _icon if it stops working 37493 37494 L.Util.falseFn(document.body.offsetWidth); 37495 } 37496 }); 37497 37498 L.markerClusterGroup = function (options) { 37499 return new L.MarkerClusterGroup(options); 37500 }; 37501 37502 var MarkerCluster = L.MarkerCluster = L.Marker.extend({ 37503 options: L.Icon.prototype.options, 37504 37505 initialize: function (group, zoom, a, b) { 37506 37507 L.Marker.prototype.initialize.call(this, a ? (a._cLatLng || a.getLatLng()) : new L.LatLng(0, 0), 37508 { icon: this, pane: group.options.clusterPane }); 37509 37510 this._group = group; 37511 this._zoom = zoom; 37512 37513 this._markers = []; 37514 this._childClusters = []; 37515 this._childCount = 0; 37516 this._iconNeedsUpdate = true; 37517 this._boundsNeedUpdate = true; 37518 37519 this._bounds = new L.LatLngBounds(); 37520 37521 if (a) { 37522 this._addChild(a); 37523 } 37524 if (b) { 37525 this._addChild(b); 37526 } 37527 }, 37528 37529 //Recursively retrieve all child markers of this cluster 37530 getAllChildMarkers: function (storageArray, ignoreDraggedMarker) { 37531 storageArray = storageArray || []; 37532 37533 for (var i = this._childClusters.length - 1; i >= 0; i--) { 37534 this._childClusters[i].getAllChildMarkers(storageArray, ignoreDraggedMarker); 37535 } 37536 37537 for (var j = this._markers.length - 1; j >= 0; j--) { 37538 if (ignoreDraggedMarker && this._markers[j].__dragStart) { 37539 continue; 37540 } 37541 storageArray.push(this._markers[j]); 37542 } 37543 37544 return storageArray; 37545 }, 37546 37547 //Returns the count of how many child markers we have 37548 getChildCount: function () { 37549 return this._childCount; 37550 }, 37551 37552 //Zoom to the minimum of showing all of the child markers, or the extents of this cluster 37553 zoomToBounds: function (fitBoundsOptions) { 37554 var childClusters = this._childClusters.slice(), 37555 map = this._group._map, 37556 boundsZoom = map.getBoundsZoom(this._bounds), 37557 zoom = this._zoom + 1, 37558 mapZoom = map.getZoom(), 37559 i; 37560 37561 //calculate how far we need to zoom down to see all of the markers 37562 while (childClusters.length > 0 && boundsZoom > zoom) { 37563 zoom++; 37564 var newClusters = []; 37565 for (i = 0; i < childClusters.length; i++) { 37566 newClusters = newClusters.concat(childClusters[i]._childClusters); 37567 } 37568 childClusters = newClusters; 37569 } 37570 37571 if (boundsZoom > zoom) { 37572 this._group._map.setView(this._latlng, zoom); 37573 } else if (boundsZoom <= mapZoom) { //If fitBounds wouldn't zoom us down, zoom us down instead 37574 this._group._map.setView(this._latlng, mapZoom + 1); 37575 } else { 37576 this._group._map.fitBounds(this._bounds, fitBoundsOptions); 37577 } 37578 }, 37579 37580 getBounds: function () { 37581 var bounds = new L.LatLngBounds(); 37582 bounds.extend(this._bounds); 37583 return bounds; 37584 }, 37585 37586 _updateIcon: function () { 37587 this._iconNeedsUpdate = true; 37588 if (this._icon) { 37589 this.setIcon(this); 37590 } 37591 }, 37592 37593 //Cludge for Icon, we pretend to be an icon for performance 37594 createIcon: function () { 37595 if (this._iconNeedsUpdate) { 37596 this._iconObj = this._group.options.iconCreateFunction(this); 37597 this._iconNeedsUpdate = false; 37598 } 37599 return this._iconObj.createIcon(); 37600 }, 37601 createShadow: function () { 37602 return this._iconObj.createShadow(); 37603 }, 37604 37605 37606 _addChild: function (new1, isNotificationFromChild) { 37607 37608 this._iconNeedsUpdate = true; 37609 37610 this._boundsNeedUpdate = true; 37611 this._setClusterCenter(new1); 37612 37613 if (new1 instanceof L.MarkerCluster) { 37614 if (!isNotificationFromChild) { 37615 this._childClusters.push(new1); 37616 new1.__parent = this; 37617 } 37618 this._childCount += new1._childCount; 37619 } else { 37620 if (!isNotificationFromChild) { 37621 this._markers.push(new1); 37622 } 37623 this._childCount++; 37624 } 37625 37626 if (this.__parent) { 37627 this.__parent._addChild(new1, true); 37628 } 37629 }, 37630 37631 /** 37632 * Makes sure the cluster center is set. If not, uses the child center if it is a cluster, or the marker position. 37633 * @param child L.MarkerCluster|L.Marker that will be used as cluster center if not defined yet. 37634 * @private 37635 */ 37636 _setClusterCenter: function (child) { 37637 if (!this._cLatLng) { 37638 // when clustering, take position of the first point as the cluster center 37639 this._cLatLng = child._cLatLng || child._latlng; 37640 } 37641 }, 37642 37643 /** 37644 * Assigns impossible bounding values so that the next extend entirely determines the new bounds. 37645 * This method avoids having to trash the previous L.LatLngBounds object and to create a new one, which is much slower for this class. 37646 * As long as the bounds are not extended, most other methods would probably fail, as they would with bounds initialized but not extended. 37647 * @private 37648 */ 37649 _resetBounds: function () { 37650 var bounds = this._bounds; 37651 37652 if (bounds._southWest) { 37653 bounds._southWest.lat = Infinity; 37654 bounds._southWest.lng = Infinity; 37655 } 37656 if (bounds._northEast) { 37657 bounds._northEast.lat = -Infinity; 37658 bounds._northEast.lng = -Infinity; 37659 } 37660 }, 37661 37662 _recalculateBounds: function () { 37663 var markers = this._markers, 37664 childClusters = this._childClusters, 37665 latSum = 0, 37666 lngSum = 0, 37667 totalCount = this._childCount, 37668 i, child, childLatLng, childCount; 37669 37670 // Case where all markers are removed from the map and we are left with just an empty _topClusterLevel. 37671 if (totalCount === 0) { 37672 return; 37673 } 37674 37675 // Reset rather than creating a new object, for performance. 37676 this._resetBounds(); 37677 37678 // Child markers. 37679 for (i = 0; i < markers.length; i++) { 37680 childLatLng = markers[i]._latlng; 37681 37682 this._bounds.extend(childLatLng); 37683 37684 latSum += childLatLng.lat; 37685 lngSum += childLatLng.lng; 37686 } 37687 37688 // Child clusters. 37689 for (i = 0; i < childClusters.length; i++) { 37690 child = childClusters[i]; 37691 37692 // Re-compute child bounds and weighted position first if necessary. 37693 if (child._boundsNeedUpdate) { 37694 child._recalculateBounds(); 37695 } 37696 37697 this._bounds.extend(child._bounds); 37698 37699 childLatLng = child._wLatLng; 37700 childCount = child._childCount; 37701 37702 latSum += childLatLng.lat * childCount; 37703 lngSum += childLatLng.lng * childCount; 37704 } 37705 37706 this._latlng = this._wLatLng = new L.LatLng(latSum / totalCount, lngSum / totalCount); 37707 37708 // Reset dirty flag. 37709 this._boundsNeedUpdate = false; 37710 }, 37711 37712 //Set our markers position as given and add it to the map 37713 _addToMap: function (startPos) { 37714 if (startPos) { 37715 this._backupLatlng = this._latlng; 37716 this.setLatLng(startPos); 37717 } 37718 this._group._featureGroup.addLayer(this); 37719 }, 37720 37721 _recursivelyAnimateChildrenIn: function (bounds, center, maxZoom) { 37722 this._recursively(bounds, this._group._map.getMinZoom(), maxZoom - 1, 37723 function (c) { 37724 var markers = c._markers, 37725 i, m; 37726 for (i = markers.length - 1; i >= 0; i--) { 37727 m = markers[i]; 37728 37729 //Only do it if the icon is still on the map 37730 if (m._icon) { 37731 m._setPos(center); 37732 m.clusterHide(); 37733 } 37734 } 37735 }, 37736 function (c) { 37737 var childClusters = c._childClusters, 37738 j, cm; 37739 for (j = childClusters.length - 1; j >= 0; j--) { 37740 cm = childClusters[j]; 37741 if (cm._icon) { 37742 cm._setPos(center); 37743 cm.clusterHide(); 37744 } 37745 } 37746 } 37747 ); 37748 }, 37749 37750 _recursivelyAnimateChildrenInAndAddSelfToMap: function (bounds, mapMinZoom, previousZoomLevel, newZoomLevel) { 37751 this._recursively(bounds, newZoomLevel, mapMinZoom, 37752 function (c) { 37753 c._recursivelyAnimateChildrenIn(bounds, c._group._map.latLngToLayerPoint(c.getLatLng()).round(), previousZoomLevel); 37754 37755 //TODO: depthToAnimateIn affects _isSingleParent, if there is a multizoom we may/may not be. 37756 //As a hack we only do a animation free zoom on a single level zoom, if someone does multiple levels then we always animate 37757 if (c._isSingleParent() && previousZoomLevel - 1 === newZoomLevel) { 37758 c.clusterShow(); 37759 c._recursivelyRemoveChildrenFromMap(bounds, mapMinZoom, previousZoomLevel); //Immediately remove our children as we are replacing them. TODO previousBounds not bounds 37760 } else { 37761 c.clusterHide(); 37762 } 37763 37764 c._addToMap(); 37765 } 37766 ); 37767 }, 37768 37769 _recursivelyBecomeVisible: function (bounds, zoomLevel) { 37770 this._recursively(bounds, this._group._map.getMinZoom(), zoomLevel, null, function (c) { 37771 c.clusterShow(); 37772 }); 37773 }, 37774 37775 _recursivelyAddChildrenToMap: function (startPos, zoomLevel, bounds) { 37776 this._recursively(bounds, this._group._map.getMinZoom() - 1, zoomLevel, 37777 function (c) { 37778 if (zoomLevel === c._zoom) { 37779 return; 37780 } 37781 37782 //Add our child markers at startPos (so they can be animated out) 37783 for (var i = c._markers.length - 1; i >= 0; i--) { 37784 var nm = c._markers[i]; 37785 37786 if (!bounds.contains(nm._latlng)) { 37787 continue; 37788 } 37789 37790 if (startPos) { 37791 nm._backupLatlng = nm.getLatLng(); 37792 37793 nm.setLatLng(startPos); 37794 if (nm.clusterHide) { 37795 nm.clusterHide(); 37796 } 37797 } 37798 37799 c._group._featureGroup.addLayer(nm); 37800 } 37801 }, 37802 function (c) { 37803 c._addToMap(startPos); 37804 } 37805 ); 37806 }, 37807 37808 _recursivelyRestoreChildPositions: function (zoomLevel) { 37809 //Fix positions of child markers 37810 for (var i = this._markers.length - 1; i >= 0; i--) { 37811 var nm = this._markers[i]; 37812 if (nm._backupLatlng) { 37813 nm.setLatLng(nm._backupLatlng); 37814 delete nm._backupLatlng; 37815 } 37816 } 37817 37818 if (zoomLevel - 1 === this._zoom) { 37819 //Reposition child clusters 37820 for (var j = this._childClusters.length - 1; j >= 0; j--) { 37821 this._childClusters[j]._restorePosition(); 37822 } 37823 } else { 37824 for (var k = this._childClusters.length - 1; k >= 0; k--) { 37825 this._childClusters[k]._recursivelyRestoreChildPositions(zoomLevel); 37826 } 37827 } 37828 }, 37829 37830 _restorePosition: function () { 37831 if (this._backupLatlng) { 37832 this.setLatLng(this._backupLatlng); 37833 delete this._backupLatlng; 37834 } 37835 }, 37836 37837 //exceptBounds: If set, don't remove any markers/clusters in it 37838 _recursivelyRemoveChildrenFromMap: function (previousBounds, mapMinZoom, zoomLevel, exceptBounds) { 37839 var m, i; 37840 this._recursively(previousBounds, mapMinZoom - 1, zoomLevel - 1, 37841 function (c) { 37842 //Remove markers at every level 37843 for (i = c._markers.length - 1; i >= 0; i--) { 37844 m = c._markers[i]; 37845 if (!exceptBounds || !exceptBounds.contains(m._latlng)) { 37846 c._group._featureGroup.removeLayer(m); 37847 if (m.clusterShow) { 37848 m.clusterShow(); 37849 } 37850 } 37851 } 37852 }, 37853 function (c) { 37854 //Remove child clusters at just the bottom level 37855 for (i = c._childClusters.length - 1; i >= 0; i--) { 37856 m = c._childClusters[i]; 37857 if (!exceptBounds || !exceptBounds.contains(m._latlng)) { 37858 c._group._featureGroup.removeLayer(m); 37859 if (m.clusterShow) { 37860 m.clusterShow(); 37861 } 37862 } 37863 } 37864 } 37865 ); 37866 }, 37867 37868 //Run the given functions recursively to this and child clusters 37869 // boundsToApplyTo: a L.LatLngBounds representing the bounds of what clusters to recurse in to 37870 // zoomLevelToStart: zoom level to start running functions (inclusive) 37871 // zoomLevelToStop: zoom level to stop running functions (inclusive) 37872 // runAtEveryLevel: function that takes an L.MarkerCluster as an argument that should be applied on every level 37873 // runAtBottomLevel: function that takes an L.MarkerCluster as an argument that should be applied at only the bottom level 37874 _recursively: function (boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel) { 37875 var childClusters = this._childClusters, 37876 zoom = this._zoom, 37877 i, c; 37878 37879 if (zoomLevelToStart <= zoom) { 37880 if (runAtEveryLevel) { 37881 runAtEveryLevel(this); 37882 } 37883 if (runAtBottomLevel && zoom === zoomLevelToStop) { 37884 runAtBottomLevel(this); 37885 } 37886 } 37887 37888 if (zoom < zoomLevelToStart || zoom < zoomLevelToStop) { 37889 for (i = childClusters.length - 1; i >= 0; i--) { 37890 c = childClusters[i]; 37891 if (c._boundsNeedUpdate) { 37892 c._recalculateBounds(); 37893 } 37894 if (boundsToApplyTo.intersects(c._bounds)) { 37895 c._recursively(boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel); 37896 } 37897 } 37898 } 37899 }, 37900 37901 //Returns true if we are the parent of only one cluster and that cluster is the same as us 37902 _isSingleParent: function () { 37903 //Don't need to check this._markers as the rest won't work if there are any 37904 return this._childClusters.length > 0 && this._childClusters[0]._childCount === this._childCount; 37905 } 37906 }); 37907 37908 /* 37909 * Extends L.Marker to include two extra methods: clusterHide and clusterShow. 37910 * 37911 * They work as setOpacity(0) and setOpacity(1) respectively, but 37912 * don't overwrite the options.opacity 37913 * 37914 */ 37915 37916 L.Marker.include({ 37917 clusterHide: function () { 37918 var backup = this.options.opacity; 37919 this.setOpacity(0); 37920 this.options.opacity = backup; 37921 return this; 37922 }, 37923 37924 clusterShow: function () { 37925 return this.setOpacity(this.options.opacity); 37926 } 37927 }); 37928 37929 L.DistanceGrid = function (cellSize) { 37930 this._cellSize = cellSize; 37931 this._sqCellSize = cellSize * cellSize; 37932 this._grid = {}; 37933 this._objectPoint = { }; 37934 }; 37935 37936 L.DistanceGrid.prototype = { 37937 37938 addObject: function (obj, point) { 37939 var x = this._getCoord(point.x), 37940 y = this._getCoord(point.y), 37941 grid = this._grid, 37942 row = grid[y] = grid[y] || {}, 37943 cell = row[x] = row[x] || [], 37944 stamp = L.Util.stamp(obj); 37945 37946 this._objectPoint[stamp] = point; 37947 37948 cell.push(obj); 37949 }, 37950 37951 updateObject: function (obj, point) { 37952 this.removeObject(obj); 37953 this.addObject(obj, point); 37954 }, 37955 37956 //Returns true if the object was found 37957 removeObject: function (obj, point) { 37958 var x = this._getCoord(point.x), 37959 y = this._getCoord(point.y), 37960 grid = this._grid, 37961 row = grid[y] = grid[y] || {}, 37962 cell = row[x] = row[x] || [], 37963 i, len; 37964 37965 delete this._objectPoint[L.Util.stamp(obj)]; 37966 37967 for (i = 0, len = cell.length; i < len; i++) { 37968 if (cell[i] === obj) { 37969 37970 cell.splice(i, 1); 37971 37972 if (len === 1) { 37973 delete row[x]; 37974 } 37975 37976 return true; 37977 } 37978 } 37979 37980 }, 37981 37982 eachObject: function (fn, context) { 37983 var i, j, k, len, row, cell, removed, 37984 grid = this._grid; 37985 37986 for (i in grid) { 37987 row = grid[i]; 37988 37989 for (j in row) { 37990 cell = row[j]; 37991 37992 for (k = 0, len = cell.length; k < len; k++) { 37993 removed = fn.call(context, cell[k]); 37994 if (removed) { 37995 k--; 37996 len--; 37997 } 37998 } 37999 } 38000 } 38001 }, 38002 38003 getNearObject: function (point) { 38004 var x = this._getCoord(point.x), 38005 y = this._getCoord(point.y), 38006 i, j, k, row, cell, len, obj, dist, 38007 objectPoint = this._objectPoint, 38008 closestDistSq = this._sqCellSize, 38009 closest = null; 38010 38011 for (i = y - 1; i <= y + 1; i++) { 38012 row = this._grid[i]; 38013 if (row) { 38014 38015 for (j = x - 1; j <= x + 1; j++) { 38016 cell = row[j]; 38017 if (cell) { 38018 38019 for (k = 0, len = cell.length; k < len; k++) { 38020 obj = cell[k]; 38021 dist = this._sqDist(objectPoint[L.Util.stamp(obj)], point); 38022 if (dist < closestDistSq || 38023 dist <= closestDistSq && closest === null) { 38024 closestDistSq = dist; 38025 closest = obj; 38026 } 38027 } 38028 } 38029 } 38030 } 38031 } 38032 return closest; 38033 }, 38034 38035 _getCoord: function (x) { 38036 var coord = Math.floor(x / this._cellSize); 38037 return isFinite(coord) ? coord : x; 38038 }, 38039 38040 _sqDist: function (p, p2) { 38041 var dx = p2.x - p.x, 38042 dy = p2.y - p.y; 38043 return dx * dx + dy * dy; 38044 } 38045 }; 38046 38047 /* Copyright (c) 2012 the authors listed at the following URL, and/or 38048 the authors of referenced articles or incorporated external code: 38049 http://en.literateprograms.org/Quickhull_(Javascript)?action=history&offset=20120410175256 38050 38051 Permission is hereby granted, free of charge, to any person obtaining 38052 a copy of this software and associated documentation files (the 38053 "Software"), to deal in the Software without restriction, including 38054 without limitation the rights to use, copy, modify, merge, publish, 38055 distribute, sublicense, and/or sell copies of the Software, and to 38056 permit persons to whom the Software is furnished to do so, subject to 38057 the following conditions: 38058 38059 The above copyright notice and this permission notice shall be 38060 included in all copies or substantial portions of the Software. 38061 38062 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 38063 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 38064 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 38065 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 38066 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 38067 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 38068 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 38069 38070 Retrieved from: http://en.literateprograms.org/Quickhull_(Javascript)?oldid=18434 38071 */ 38072 38073 (function () { 38074 L.QuickHull = { 38075 38076 /* 38077 * @param {Object} cpt a point to be measured from the baseline 38078 * @param {Array} bl the baseline, as represented by a two-element 38079 * array of latlng objects. 38080 * @returns {Number} an approximate distance measure 38081 */ 38082 getDistant: function (cpt, bl) { 38083 var vY = bl[1].lat - bl[0].lat, 38084 vX = bl[0].lng - bl[1].lng; 38085 return (vX * (cpt.lat - bl[0].lat) + vY * (cpt.lng - bl[0].lng)); 38086 }, 38087 38088 /* 38089 * @param {Array} baseLine a two-element array of latlng objects 38090 * representing the baseline to project from 38091 * @param {Array} latLngs an array of latlng objects 38092 * @returns {Object} the maximum point and all new points to stay 38093 * in consideration for the hull. 38094 */ 38095 findMostDistantPointFromBaseLine: function (baseLine, latLngs) { 38096 var maxD = 0, 38097 maxPt = null, 38098 newPoints = [], 38099 i, pt, d; 38100 38101 for (i = latLngs.length - 1; i >= 0; i--) { 38102 pt = latLngs[i]; 38103 d = this.getDistant(pt, baseLine); 38104 38105 if (d > 0) { 38106 newPoints.push(pt); 38107 } else { 38108 continue; 38109 } 38110 38111 if (d > maxD) { 38112 maxD = d; 38113 maxPt = pt; 38114 } 38115 } 38116 38117 return { maxPoint: maxPt, newPoints: newPoints }; 38118 }, 38119 38120 38121 /* 38122 * Given a baseline, compute the convex hull of latLngs as an array 38123 * of latLngs. 38124 * 38125 * @param {Array} latLngs 38126 * @returns {Array} 38127 */ 38128 buildConvexHull: function (baseLine, latLngs) { 38129 var convexHullBaseLines = [], 38130 t = this.findMostDistantPointFromBaseLine(baseLine, latLngs); 38131 38132 if (t.maxPoint) { // if there is still a point "outside" the base line 38133 convexHullBaseLines = 38134 convexHullBaseLines.concat( 38135 this.buildConvexHull([baseLine[0], t.maxPoint], t.newPoints) 38136 ); 38137 convexHullBaseLines = 38138 convexHullBaseLines.concat( 38139 this.buildConvexHull([t.maxPoint, baseLine[1]], t.newPoints) 38140 ); 38141 return convexHullBaseLines; 38142 } else { // if there is no more point "outside" the base line, the current base line is part of the convex hull 38143 return [baseLine[0]]; 38144 } 38145 }, 38146 38147 /* 38148 * Given an array of latlngs, compute a convex hull as an array 38149 * of latlngs 38150 * 38151 * @param {Array} latLngs 38152 * @returns {Array} 38153 */ 38154 getConvexHull: function (latLngs) { 38155 // find first baseline 38156 var maxLat = false, minLat = false, 38157 maxLng = false, minLng = false, 38158 maxLatPt = null, minLatPt = null, 38159 maxLngPt = null, minLngPt = null, 38160 maxPt = null, minPt = null, 38161 i; 38162 38163 for (i = latLngs.length - 1; i >= 0; i--) { 38164 var pt = latLngs[i]; 38165 if (maxLat === false || pt.lat > maxLat) { 38166 maxLatPt = pt; 38167 maxLat = pt.lat; 38168 } 38169 if (minLat === false || pt.lat < minLat) { 38170 minLatPt = pt; 38171 minLat = pt.lat; 38172 } 38173 if (maxLng === false || pt.lng > maxLng) { 38174 maxLngPt = pt; 38175 maxLng = pt.lng; 38176 } 38177 if (minLng === false || pt.lng < minLng) { 38178 minLngPt = pt; 38179 minLng = pt.lng; 38180 } 38181 } 38182 38183 if (minLat !== maxLat) { 38184 minPt = minLatPt; 38185 maxPt = maxLatPt; 38186 } else { 38187 minPt = minLngPt; 38188 maxPt = maxLngPt; 38189 } 38190 38191 var ch = [].concat(this.buildConvexHull([minPt, maxPt], latLngs), 38192 this.buildConvexHull([maxPt, minPt], latLngs)); 38193 return ch; 38194 } 38195 }; 38196 }()); 38197 38198 L.MarkerCluster.include({ 38199 getConvexHull: function () { 38200 var childMarkers = this.getAllChildMarkers(), 38201 points = [], 38202 p, i; 38203 38204 for (i = childMarkers.length - 1; i >= 0; i--) { 38205 p = childMarkers[i].getLatLng(); 38206 points.push(p); 38207 } 38208 38209 return L.QuickHull.getConvexHull(points); 38210 } 38211 }); 38212 38213 //This code is 100% based on https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet 38214 //Huge thanks to jawj for implementing it first to make my job easy :-) 38215 38216 L.MarkerCluster.include({ 38217 38218 _2PI: Math.PI * 2, 38219 _circleFootSeparation: 25, //related to circumference of circle 38220 _circleStartAngle: 0, 38221 38222 _spiralFootSeparation: 28, //related to size of spiral (experiment!) 38223 _spiralLengthStart: 11, 38224 _spiralLengthFactor: 5, 38225 38226 _circleSpiralSwitchover: 9, //show spiral instead of circle from this marker count upwards. 38227 // 0 -> always spiral; Infinity -> always circle 38228 38229 spiderfy: function () { 38230 if (this._group._spiderfied === this || this._group._inZoomAnimation) { 38231 return; 38232 } 38233 38234 var childMarkers = this.getAllChildMarkers(null, true), 38235 group = this._group, 38236 map = group._map, 38237 center = map.latLngToLayerPoint(this._latlng), 38238 positions; 38239 38240 this._group._unspiderfy(); 38241 this._group._spiderfied = this; 38242 38243 //TODO Maybe: childMarkers order by distance to center 38244 38245 if (this._group.options.spiderfyShapePositions) { 38246 positions = this._group.options.spiderfyShapePositions(childMarkers.length, center); 38247 } else if (childMarkers.length >= this._circleSpiralSwitchover) { 38248 positions = this._generatePointsSpiral(childMarkers.length, center); 38249 } else { 38250 center.y += 10; // Otherwise circles look wrong => hack for standard blue icon, renders differently for other icons. 38251 positions = this._generatePointsCircle(childMarkers.length, center); 38252 } 38253 38254 this._animationSpiderfy(childMarkers, positions); 38255 }, 38256 38257 unspiderfy: function (zoomDetails) { 38258 /// <param Name="zoomDetails">Argument from zoomanim if being called in a zoom animation or null otherwise</param> 38259 if (this._group._inZoomAnimation) { 38260 return; 38261 } 38262 this._animationUnspiderfy(zoomDetails); 38263 38264 this._group._spiderfied = null; 38265 }, 38266 38267 _generatePointsCircle: function (count, centerPt) { 38268 var circumference = this._group.options.spiderfyDistanceMultiplier * this._circleFootSeparation * (2 + count), 38269 legLength = circumference / this._2PI, //radius from circumference 38270 angleStep = this._2PI / count, 38271 res = [], 38272 i, angle; 38273 38274 legLength = Math.max(legLength, 35); // Minimum distance to get outside the cluster icon. 38275 38276 res.length = count; 38277 38278 for (i = 0; i < count; i++) { // Clockwise, like spiral. 38279 angle = this._circleStartAngle + i * angleStep; 38280 res[i] = new L.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))._round(); 38281 } 38282 38283 return res; 38284 }, 38285 38286 _generatePointsSpiral: function (count, centerPt) { 38287 var spiderfyDistanceMultiplier = this._group.options.spiderfyDistanceMultiplier, 38288 legLength = spiderfyDistanceMultiplier * this._spiralLengthStart, 38289 separation = spiderfyDistanceMultiplier * this._spiralFootSeparation, 38290 lengthFactor = spiderfyDistanceMultiplier * this._spiralLengthFactor * this._2PI, 38291 angle = 0, 38292 res = [], 38293 i; 38294 38295 res.length = count; 38296 38297 // Higher index, closer position to cluster center. 38298 for (i = count; i >= 0; i--) { 38299 // Skip the first position, so that we are already farther from center and we avoid 38300 // being under the default cluster icon (especially important for Circle Markers). 38301 if (i < count) { 38302 res[i] = new L.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))._round(); 38303 } 38304 angle += separation / legLength + i * 0.0005; 38305 legLength += lengthFactor / angle; 38306 } 38307 return res; 38308 }, 38309 38310 _noanimationUnspiderfy: function () { 38311 var group = this._group, 38312 map = group._map, 38313 fg = group._featureGroup, 38314 childMarkers = this.getAllChildMarkers(null, true), 38315 m, i; 38316 38317 group._ignoreMove = true; 38318 38319 this.setOpacity(1); 38320 for (i = childMarkers.length - 1; i >= 0; i--) { 38321 m = childMarkers[i]; 38322 38323 fg.removeLayer(m); 38324 38325 if (m._preSpiderfyLatlng) { 38326 m.setLatLng(m._preSpiderfyLatlng); 38327 delete m._preSpiderfyLatlng; 38328 } 38329 if (m.setZIndexOffset) { 38330 m.setZIndexOffset(0); 38331 } 38332 38333 if (m._spiderLeg) { 38334 map.removeLayer(m._spiderLeg); 38335 delete m._spiderLeg; 38336 } 38337 } 38338 38339 group.fire('unspiderfied', { 38340 cluster: this, 38341 markers: childMarkers 38342 }); 38343 group._ignoreMove = false; 38344 group._spiderfied = null; 38345 } 38346 }); 38347 38348 //Non Animated versions of everything 38349 L.MarkerClusterNonAnimated = L.MarkerCluster.extend({ 38350 _animationSpiderfy: function (childMarkers, positions) { 38351 var group = this._group, 38352 map = group._map, 38353 fg = group._featureGroup, 38354 legOptions = this._group.options.spiderLegPolylineOptions, 38355 i, m, leg, newPos; 38356 38357 group._ignoreMove = true; 38358 38359 // Traverse in ascending order to make sure that inner circleMarkers are on top of further legs. Normal markers are re-ordered by newPosition. 38360 // The reverse order trick no longer improves performance on modern browsers. 38361 for (i = 0; i < childMarkers.length; i++) { 38362 newPos = map.layerPointToLatLng(positions[i]); 38363 m = childMarkers[i]; 38364 38365 // Add the leg before the marker, so that in case the latter is a circleMarker, the leg is behind it. 38366 leg = new L.Polyline([this._latlng, newPos], legOptions); 38367 map.addLayer(leg); 38368 m._spiderLeg = leg; 38369 38370 // Now add the marker. 38371 m._preSpiderfyLatlng = m._latlng; 38372 m.setLatLng(newPos); 38373 if (m.setZIndexOffset) { 38374 m.setZIndexOffset(1000000); //Make these appear on top of EVERYTHING 38375 } 38376 38377 fg.addLayer(m); 38378 } 38379 this.setOpacity(0.3); 38380 38381 group._ignoreMove = false; 38382 group.fire('spiderfied', { 38383 cluster: this, 38384 markers: childMarkers 38385 }); 38386 }, 38387 38388 _animationUnspiderfy: function () { 38389 this._noanimationUnspiderfy(); 38390 } 38391 }); 38392 38393 //Animated versions here 38394 L.MarkerCluster.include({ 38395 38396 _animationSpiderfy: function (childMarkers, positions) { 38397 var me = this, 38398 group = this._group, 38399 map = group._map, 38400 fg = group._featureGroup, 38401 thisLayerLatLng = this._latlng, 38402 thisLayerPos = map.latLngToLayerPoint(thisLayerLatLng), 38403 svg = L.Path.SVG, 38404 legOptions = L.extend({}, this._group.options.spiderLegPolylineOptions), // Copy the options so that we can modify them for animation. 38405 finalLegOpacity = legOptions.opacity, 38406 i, m, leg, legPath, legLength, newPos; 38407 38408 if (finalLegOpacity === undefined) { 38409 finalLegOpacity = L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity; 38410 } 38411 38412 if (svg) { 38413 // If the initial opacity of the spider leg is not 0 then it appears before the animation starts. 38414 legOptions.opacity = 0; 38415 38416 // Add the class for CSS transitions. 38417 legOptions.className = (legOptions.className || '') + ' leaflet-cluster-spider-leg'; 38418 } else { 38419 // Make sure we have a defined opacity. 38420 legOptions.opacity = finalLegOpacity; 38421 } 38422 38423 group._ignoreMove = true; 38424 38425 // Add markers and spider legs to map, hidden at our center point. 38426 // Traverse in ascending order to make sure that inner circleMarkers are on top of further legs. Normal markers are re-ordered by newPosition. 38427 // The reverse order trick no longer improves performance on modern browsers. 38428 for (i = 0; i < childMarkers.length; i++) { 38429 m = childMarkers[i]; 38430 38431 newPos = map.layerPointToLatLng(positions[i]); 38432 38433 // Add the leg before the marker, so that in case the latter is a circleMarker, the leg is behind it. 38434 leg = new L.Polyline([thisLayerLatLng, newPos], legOptions); 38435 map.addLayer(leg); 38436 m._spiderLeg = leg; 38437 38438 // Explanations: https://jakearchibald.com/2013/animated-line-drawing-svg/ 38439 // In our case the transition property is declared in the CSS file. 38440 if (svg) { 38441 legPath = leg._path; 38442 legLength = legPath.getTotalLength() + 0.1; // Need a small extra length to avoid remaining dot in Firefox. 38443 legPath.style.strokeDasharray = legLength; // Just 1 length is enough, it will be duplicated. 38444 legPath.style.strokeDashoffset = legLength; 38445 } 38446 38447 // If it is a marker, add it now and we'll animate it out 38448 if (m.setZIndexOffset) { 38449 m.setZIndexOffset(1000000); // Make normal markers appear on top of EVERYTHING 38450 } 38451 if (m.clusterHide) { 38452 m.clusterHide(); 38453 } 38454 38455 // Vectors just get immediately added 38456 fg.addLayer(m); 38457 38458 if (m._setPos) { 38459 m._setPos(thisLayerPos); 38460 } 38461 } 38462 38463 group._forceLayout(); 38464 group._animationStart(); 38465 38466 // Reveal markers and spider legs. 38467 for (i = childMarkers.length - 1; i >= 0; i--) { 38468 newPos = map.layerPointToLatLng(positions[i]); 38469 m = childMarkers[i]; 38470 38471 //Move marker to new position 38472 m._preSpiderfyLatlng = m._latlng; 38473 m.setLatLng(newPos); 38474 38475 if (m.clusterShow) { 38476 m.clusterShow(); 38477 } 38478 38479 // Animate leg (animation is actually delegated to CSS transition). 38480 if (svg) { 38481 leg = m._spiderLeg; 38482 legPath = leg._path; 38483 legPath.style.strokeDashoffset = 0; 38484 //legPath.style.strokeOpacity = finalLegOpacity; 38485 leg.setStyle({opacity: finalLegOpacity}); 38486 } 38487 } 38488 this.setOpacity(0.3); 38489 38490 group._ignoreMove = false; 38491 38492 setTimeout(function () { 38493 group._animationEnd(); 38494 group.fire('spiderfied', { 38495 cluster: me, 38496 markers: childMarkers 38497 }); 38498 }, 200); 38499 }, 38500 38501 _animationUnspiderfy: function (zoomDetails) { 38502 var me = this, 38503 group = this._group, 38504 map = group._map, 38505 fg = group._featureGroup, 38506 thisLayerPos = zoomDetails ? map._latLngToNewLayerPoint(this._latlng, zoomDetails.zoom, zoomDetails.center) : map.latLngToLayerPoint(this._latlng), 38507 childMarkers = this.getAllChildMarkers(null, true), 38508 svg = L.Path.SVG, 38509 m, i, leg, legPath, legLength, nonAnimatable; 38510 38511 group._ignoreMove = true; 38512 group._animationStart(); 38513 38514 //Make us visible and bring the child markers back in 38515 this.setOpacity(1); 38516 for (i = childMarkers.length - 1; i >= 0; i--) { 38517 m = childMarkers[i]; 38518 38519 //Marker was added to us after we were spiderfied 38520 if (!m._preSpiderfyLatlng) { 38521 continue; 38522 } 38523 38524 //Close any popup on the marker first, otherwise setting the location of the marker will make the map scroll 38525 m.closePopup(); 38526 38527 //Fix up the location to the real one 38528 m.setLatLng(m._preSpiderfyLatlng); 38529 delete m._preSpiderfyLatlng; 38530 38531 //Hack override the location to be our center 38532 nonAnimatable = true; 38533 if (m._setPos) { 38534 m._setPos(thisLayerPos); 38535 nonAnimatable = false; 38536 } 38537 if (m.clusterHide) { 38538 m.clusterHide(); 38539 nonAnimatable = false; 38540 } 38541 if (nonAnimatable) { 38542 fg.removeLayer(m); 38543 } 38544 38545 // Animate the spider leg back in (animation is actually delegated to CSS transition). 38546 if (svg) { 38547 leg = m._spiderLeg; 38548 legPath = leg._path; 38549 legLength = legPath.getTotalLength() + 0.1; 38550 legPath.style.strokeDashoffset = legLength; 38551 leg.setStyle({opacity: 0}); 38552 } 38553 } 38554 38555 group._ignoreMove = false; 38556 38557 setTimeout(function () { 38558 //If we have only <= one child left then that marker will be shown on the map so don't remove it! 38559 var stillThereChildCount = 0; 38560 for (i = childMarkers.length - 1; i >= 0; i--) { 38561 m = childMarkers[i]; 38562 if (m._spiderLeg) { 38563 stillThereChildCount++; 38564 } 38565 } 38566 38567 38568 for (i = childMarkers.length - 1; i >= 0; i--) { 38569 m = childMarkers[i]; 38570 38571 if (!m._spiderLeg) { //Has already been unspiderfied 38572 continue; 38573 } 38574 38575 if (m.clusterShow) { 38576 m.clusterShow(); 38577 } 38578 if (m.setZIndexOffset) { 38579 m.setZIndexOffset(0); 38580 } 38581 38582 if (stillThereChildCount > 1) { 38583 fg.removeLayer(m); 38584 } 38585 38586 map.removeLayer(m._spiderLeg); 38587 delete m._spiderLeg; 38588 } 38589 group._animationEnd(); 38590 group.fire('unspiderfied', { 38591 cluster: me, 38592 markers: childMarkers 38593 }); 38594 }, 200); 38595 } 38596 }); 38597 38598 38599 L.MarkerClusterGroup.include({ 38600 //The MarkerCluster currently spiderfied (if any) 38601 _spiderfied: null, 38602 38603 unspiderfy: function () { 38604 this._unspiderfy.apply(this, arguments); 38605 }, 38606 38607 _spiderfierOnAdd: function () { 38608 this._map.on('click', this._unspiderfyWrapper, this); 38609 38610 if (this._map.options.zoomAnimation) { 38611 this._map.on('zoomstart', this._unspiderfyZoomStart, this); 38612 } 38613 //Browsers without zoomAnimation or a big zoom don't fire zoomstart 38614 this._map.on('zoomend', this._noanimationUnspiderfy, this); 38615 38616 if (!L.Browser.touch) { 38617 this._map.getRenderer(this); 38618 //Needs to happen in the pageload, not after, or animations don't work in webkit 38619 // http://stackoverflow.com/questions/8455200/svg-animate-with-dynamically-added-elements 38620 //Disable on touch browsers as the animation messes up on a touch zoom and isn't very noticable 38621 } 38622 }, 38623 38624 _spiderfierOnRemove: function () { 38625 this._map.off('click', this._unspiderfyWrapper, this); 38626 this._map.off('zoomstart', this._unspiderfyZoomStart, this); 38627 this._map.off('zoomanim', this._unspiderfyZoomAnim, this); 38628 this._map.off('zoomend', this._noanimationUnspiderfy, this); 38629 38630 //Ensure that markers are back where they should be 38631 // Use no animation to avoid a sticky leaflet-cluster-anim class on mapPane 38632 this._noanimationUnspiderfy(); 38633 }, 38634 38635 //On zoom start we add a zoomanim handler so that we are guaranteed to be last (after markers are animated) 38636 //This means we can define the animation they do rather than Markers doing an animation to their actual location 38637 _unspiderfyZoomStart: function () { 38638 if (!this._map) { //May have been removed from the map by a zoomEnd handler 38639 return; 38640 } 38641 38642 this._map.on('zoomanim', this._unspiderfyZoomAnim, this); 38643 }, 38644 38645 _unspiderfyZoomAnim: function (zoomDetails) { 38646 //Wait until the first zoomanim after the user has finished touch-zooming before running the animation 38647 if (L.DomUtil.hasClass(this._map._mapPane, 'leaflet-touching')) { 38648 return; 38649 } 38650 38651 this._map.off('zoomanim', this._unspiderfyZoomAnim, this); 38652 this._unspiderfy(zoomDetails); 38653 }, 38654 38655 _unspiderfyWrapper: function () { 38656 /// <summary>_unspiderfy but passes no arguments</summary> 38657 this._unspiderfy(); 38658 }, 38659 38660 _unspiderfy: function (zoomDetails) { 38661 if (this._spiderfied) { 38662 this._spiderfied.unspiderfy(zoomDetails); 38663 } 38664 }, 38665 38666 _noanimationUnspiderfy: function () { 38667 if (this._spiderfied) { 38668 this._spiderfied._noanimationUnspiderfy(); 38669 } 38670 }, 38671 38672 //If the given layer is currently being spiderfied then we unspiderfy it so it isn't on the map anymore etc 38673 _unspiderfyLayer: function (layer) { 38674 if (layer._spiderLeg) { 38675 this._featureGroup.removeLayer(layer); 38676 38677 if (layer.clusterShow) { 38678 layer.clusterShow(); 38679 } 38680 //Position will be fixed up immediately in _animationUnspiderfy 38681 if (layer.setZIndexOffset) { 38682 layer.setZIndexOffset(0); 38683 } 38684 38685 this._map.removeLayer(layer._spiderLeg); 38686 delete layer._spiderLeg; 38687 } 38688 } 38689 }); 38690 38691 /** 38692 * Adds 1 public method to MCG and 1 to L.Marker to facilitate changing 38693 * markers' icon options and refreshing their icon and their parent clusters 38694 * accordingly (case where their iconCreateFunction uses data of childMarkers 38695 * to make up the cluster icon). 38696 */ 38697 38698 38699 L.MarkerClusterGroup.include({ 38700 /** 38701 * Updates the icon of all clusters which are parents of the given marker(s). 38702 * In singleMarkerMode, also updates the given marker(s) icon. 38703 * @param layers L.MarkerClusterGroup|L.LayerGroup|Array(L.Marker)|Map(L.Marker)| 38704 * L.MarkerCluster|L.Marker (optional) list of markers (or single marker) whose parent 38705 * clusters need to be updated. If not provided, retrieves all child markers of this. 38706 * @returns {L.MarkerClusterGroup} 38707 */ 38708 refreshClusters: function (layers) { 38709 if (!layers) { 38710 layers = this._topClusterLevel.getAllChildMarkers(); 38711 } else if (layers instanceof L.MarkerClusterGroup) { 38712 layers = layers._topClusterLevel.getAllChildMarkers(); 38713 } else if (layers instanceof L.LayerGroup) { 38714 layers = layers._layers; 38715 } else if (layers instanceof L.MarkerCluster) { 38716 layers = layers.getAllChildMarkers(); 38717 } else if (layers instanceof L.Marker) { 38718 layers = [layers]; 38719 } // else: must be an Array(L.Marker)|Map(L.Marker) 38720 this._flagParentsIconsNeedUpdate(layers); 38721 this._refreshClustersIcons(); 38722 38723 // In case of singleMarkerMode, also re-draw the markers. 38724 if (this.options.singleMarkerMode) { 38725 this._refreshSingleMarkerModeMarkers(layers); 38726 } 38727 38728 return this; 38729 }, 38730 38731 /** 38732 * Simply flags all parent clusters of the given markers as having a "dirty" icon. 38733 * @param layers Array(L.Marker)|Map(L.Marker) list of markers. 38734 * @private 38735 */ 38736 _flagParentsIconsNeedUpdate: function (layers) { 38737 var id, parent; 38738 38739 // Assumes layers is an Array or an Object whose prototype is non-enumerable. 38740 for (id in layers) { 38741 // Flag parent clusters' icon as "dirty", all the way up. 38742 // Dumb process that flags multiple times upper parents, but still 38743 // much more efficient than trying to be smart and make short lists, 38744 // at least in the case of a hierarchy following a power law: 38745 // http://jsperf.com/flag-nodes-in-power-hierarchy/2 38746 parent = layers[id].__parent; 38747 while (parent) { 38748 parent._iconNeedsUpdate = true; 38749 parent = parent.__parent; 38750 } 38751 } 38752 }, 38753 38754 /** 38755 * Re-draws the icon of the supplied markers. 38756 * To be used in singleMarkerMode only. 38757 * @param layers Array(L.Marker)|Map(L.Marker) list of markers. 38758 * @private 38759 */ 38760 _refreshSingleMarkerModeMarkers: function (layers) { 38761 var id, layer; 38762 38763 for (id in layers) { 38764 layer = layers[id]; 38765 38766 // Make sure we do not override markers that do not belong to THIS group. 38767 if (this.hasLayer(layer)) { 38768 // Need to re-create the icon first, then re-draw the marker. 38769 layer.setIcon(this._overrideMarkerIcon(layer)); 38770 } 38771 } 38772 } 38773 }); 38774 38775 L.Marker.include({ 38776 /** 38777 * Updates the given options in the marker's icon and refreshes the marker. 38778 * @param options map object of icon options. 38779 * @param directlyRefreshClusters boolean (optional) true to trigger 38780 * MCG.refreshClustersOf() right away with this single marker. 38781 * @returns {L.Marker} 38782 */ 38783 refreshIconOptions: function (options, directlyRefreshClusters) { 38784 var icon = this.options.icon; 38785 38786 L.setOptions(icon, options); 38787 38788 this.setIcon(icon); 38789 38790 // Shortcut to refresh the associated MCG clusters right away. 38791 // To be used when refreshing a single marker. 38792 // Otherwise, better use MCG.refreshClusters() once at the end with 38793 // the list of modified markers. 38794 if (directlyRefreshClusters && this.__parent) { 38795 this.__parent._group.refreshClusters(this); 38796 } 38797 38798 return this; 38799 } 38800 }); 38801 38802 exports.MarkerClusterGroup = MarkerClusterGroup; 38803 exports.MarkerCluster = MarkerCluster; 38804 38805 Object.defineProperty(exports, '__esModule', { value: true }); 38806 38807})); 38808//# sourceMappingURL=leaflet.markercluster-src.js.map
38809 38810 38811/***/ }), 38812/* 149 */ 38813/***/ (function(module, __webpack_exports__, __webpack_require__) { 38814 38815"use strict"; 38816/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_leaflet__ = __webpack_require__(2); 38817/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_leaflet___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_leaflet__); 38818 38819 38820var TextMap = function TextMap(module) { 38821 this.module = module; 38822 this.container = module.querySelector('.js-text-map'); 38823 this.markers = []; 38824 this.map; 38825 38826 this.init(); 38827}; 38828TextMap.prototype.init = function init () { 38829 this.mapId = this.container.getAttribute('id'); 38830 this.data = JSON.parse(this.container.getAttribute('data-pois')); 38831 this.iconWidth = 30; 38832 this.iconHeight = 41; 38833 this.size = 36; 38834 this.map = __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.map(this.mapId, { 38835 zoom: 3, 38836 minZoom: 3, 38837 scrollWheelZoom: false, 38838 }); 38839 38840 __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { 38841 attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>', 38842 maxZoom: 19, 38843 }).addTo(this.map); 38844 38845 this.markers = []; 38846 38847 this.filterMarkers(); 38848}; 38849 38850 38851TextMap.prototype.filterMarkers = function filterMarkers () { 38852 var this$1 = this; 38853 38854 this.markers = []; 38855 38856 this.markerClusterGroup = __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.markerClusterGroup({ 38857 maxClusterRadius: 120, 38858 iconCreateFunction: function (cluster) { 38859 var childrenMarkers = cluster.getAllChildMarkers(); 38860 return __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.divIcon({ 38861 html: '<div class="cluster-pin">' + childrenMarkers.length + '</div>', 38862 className: 'icon-cluster', 38863 iconSize: __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.point(this.size * 2, this.size * 2), 38864 }); 38865 }, 38866 spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: true, 38867 }); 38868 38869 for (var key in Object.entries(this$1.data)) { 38870 var markerIcon = __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.icon({ 38871 iconUrl: this$1.container.getAttribute('data-icon'), 38872 shadowUrl: this$1.container.getAttribute('data-shadow'), 38873 iconSize: [this$1.iconWidth, this$1.iconHeight], 38874 iconAnchor: [this$1.iconWidth / 2, this$1.iconHeight], 38875 shadowSize: [0, 0], 38876 popupAnchor: [0, this$1.iconHeight * -1], 38877 }); 38878 38879 var latLng = [this$1.data[key].lat, this$1.data[key].lon]; 38880 38881 var marker = __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.marker(latLng, { 38882 icon: markerIcon, 38883 title: this$1.data[key].title, 38884 commune: this$1.data[key].commune, 38885 id: this$1.data[key].id, 38886 slug: this$1.data[key].slug, 38887 category: this$1.data[key].category, 38888 }) 38889 .addTo(this$1.markerClusterGroup); 38890 38891 this$1.markers.push(marker); 38892 } 38893 38894 this.markerClusterGroup.addTo(this.map); 38895 38896 var group = new __WEBPACK_IMPORTED_MODULE_0_leaflet___default.a.featureGroup(this.markers); 38897 38898 // if (this.markers.length > 0) { 38899 this.map.fitBounds(group.getBounds()); 38900 this.map.zoomOut(3); 38901 // } else { 38902 // this.map.setView([46, 2], 6); 38903 // } 38904}; 38905 38906/* harmony default export */ __webpack_exports__["a"] = (TextMap); 38907 38908 38909/***/ }), 38910/* 150 */ 38911/***/ (function(module, __webpack_exports__, __webpack_require__) { 38912 38913"use strict"; 38914/* WEBPACK VAR INJECTION */(function($) {var Tab = function Tab(container) { 38915 this.container = container; 38916 38917 this.cacheDOMObject(); 38918 this.init(); 38919}; 38920 38921Tab.prototype.cacheDOMObject = function cacheDOMObject () { 38922 this.tabButtons = this.container.querySelectorAll('.js-tab-buttons > button'); 38923 this.tabContent = this.container.querySelectorAll('.js-tab-content > div'); 38924}; 38925 38926Tab.prototype.init = function init () { 38927 var that = this; 38928 this.tabButtons.forEach(function (element) { 38929 $(element).on('click', function (e) { 38930 that.changeTab(e, element); 38931 }); 38932 }); 38933}; 38934 38935Tab.prototype.changeTab = function changeTab (e, clickedElement) { 38936 e.preventDefault(); 38937 this.tabButtons.forEach(function (element) { 38938 element.classList.remove('active'); 38939 }); 38940 38941 clickedElement.classList.add('active'); 38942 38943 this.tabContent.forEach(function (element) { 38944 element.classList.remove('active'); 38945 }); 38946 38947 var contentClass = clickedElement.getAttribute('data-target'); 38948 38949 this.container.querySelector('.js-tab-content .' + contentClass).classList.add('active'); 38950}; 38951 38952/* unused harmony default export */ var _unused_webpack_default_export = (Tab);
38953/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1))) 38954 38955/***/ }), 38956/* 151 */ 38957/***/ (function(module, __webpack_exports__, __webpack_require__) { 38958 38959"use strict"; 38960/* WEBPACK VAR INJECTION */(function($) {var Accordeon = function Accordeon(container) { 38961 this.container = container; 38962 38963 this.cacheDOMObject(); 38964 this.init(); 38965}; 38966 38967Accordeon.prototype.cacheDOMObject = function cacheDOMObject () { 38968 this.accordeonButtons = this.container.querySelectorAll('button'); 38969 this.accordeonContent = this.container.querySelectorAll('.js-accordeon-content'); 38970}; 38971 38972Accordeon.prototype.init = function init () { 38973 var that = this; 38974 this.accordeonButtons.forEach(function (element) { 38975 $(element).on('click', function (e) { 38976 that.openAccordeon(e, element); 38977 }); 38978 }); 38979}; 38980 38981Accordeon.prototype.openAccordeon = function openAccordeon (e, clickedElement) { 38982 e.preventDefault(); 38983 this.accordeonButtons.forEach(function (element) { 38984 element.classList.remove('active'); 38985 }); 38986 38987 clickedElement.classList.add('active'); 38988 38989 this.accordeonContent.forEach(function (element) { 38990 element.classList.remove('active'); 38991 }); 38992 38993 var contentClass = clickedElement.getAttribute('data-target'); 38994 38995 this.container.querySelector('.js-accordeon-content.' + contentClass).classList.add('active'); 38996}; 38997 38998/* unused harmony default export */ var _unused_webpack_default_export = (Accordeon); 38999 39000/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1))) 39001 39002/***/ }), 39003/* 152 */ 39004/***/ (function(module, __webpack_exports__, __webpack_require__) { 39005 39006"use strict"; 39007/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_moment__ = __webpack_require__(0); 39008/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_moment__); 39009/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_daterangepicker__ = __webpack_require__(155); 39010/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_daterangepicker___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_daterangepicker__); 39011 39012 39013 39014var DatePicker = function DatePicker () {}; 39015 39016DatePicker.prototype.init = function init () { 39017 $('.js-daterange').each(function () { 39018 $(this).on('click', function (e) { 39019 if ($(e.target).hasClass('.js-daterange')) { 39020 $('.js-datepicker', this).click(); 39021 } 39022 }); 39023 }); 39024 39025 $('.js-datepicker').each(function () { 39026 // $(this).datepicker({ 39027 // dateFormat: 'dd-mm-yy', 39028 // }); 39029 $(this).daterangepicker({ 39030 opens: 'left', 39031 autoUpdateInput: false, 39032 locale: { 39033 format: 'DD/MM/YYYY', 39034 separator: ' - ', 39035 applyLabel: 'Appliquer', 39036 cancelLabel: 'Annuler', 39037 fromLabel: 'Du', 39038 toLabel: 'au', 39039 weekLabel: 'W', 39040 daysOfWeek: [ 39041 'Dim', 39042 'Lun', 39043 'Mar', 39044 'Mer', 39045 'Jeu', 39046 'Ven', 39047 'Sam' ], 39048 monthNames: [ 39049 'Janvier', 39050 'Février', 39051 'Mars', 39052 'Avril', 39053 'Mai', 39054 'Juin', 39055 'July', 39056 'Août', 39057 'Septembre', 39058 'Octobre', 39059 'Novembre', 39060 'Décembre' 39061 ], 39062 }, 39063 }); 39064 39065 $(this).on('apply.daterangepicker', function(ev, picker) { 39066 $(this).val(picker.startDate.format('DD/MM/YYYY') + ' - ' + picker.endDate.format('DD/MM/YYYY')); 39067 }); 39068 39069 $(this).on('cancel.daterangepicker', function(ev, picker) { 39070 $(this).val(''); 39071 }); 39072 }); 39073}; 39074 39075/* harmony default export */ __webpack_exports__["a"] = (new DatePicker); 39076/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1))) 39077 39078/***/ }), 39079/* 153 */
39080/***/ (function(module, exports) { 39081 39082module.exports = function(module) { 39083 if(!module.webpackPolyfill) { 39084 module.deprecate = function() {}; 39085 module.paths = []; 39086 // module.parent = undefined by default 39087 if(!module.children) module.children = []; 39088 Object.defineProperty(module, "loaded", { 39089 enumerable: true, 39090 get: function() { 39091 return module.l; 39092 } 39093 }); 39094 Object.defineProperty(module, "id", { 39095 enumerable: true, 39096 get: function() { 39097 return module.i; 39098 } 39099 }); 39100 module.webpackPolyfill = 1; 39101 } 39102 return module; 39103}; 39104 39105 39106/***/ }), 39107/* 154 */ 39108/***/ (function(module, exports, __webpack_require__) { 39109 39110var map = { 39111 "./af": 3, 39112 "./af.js": 3, 39113 "./ar": 4, 39114 "./ar-dz": 5, 39115 "./ar-dz.js": 5, 39116 "./ar-kw": 6, 39117 "./ar-kw.js": 6, 39118 "./ar-ly": 7, 39119 "./ar-ly.js": 7, 39120 "./ar-ma": 8, 39121 "./ar-ma.js": 8, 39122 "./ar-sa": 9, 39123 "./ar-sa.js": 9, 39124 "./ar-tn": 10, 39125 "./ar-tn.js": 10, 39126 "./ar.js": 4, 39127 "./az": 11, 39128 "./az.js": 11, 39129 "./be": 12, 39130 "./be.js": 12, 39131 "./bg": 13, 39132 "./bg.js": 13, 39133 "./bm": 14, 39134 "./bm.js": 14, 39135 "./bn": 15, 39136 "./bn-bd": 16, 39137 "./bn-bd.js": 16, 39138 "./bn.js": 15, 39139 "./bo": 17, 39140 "./bo.js": 17, 39141 "./br": 18, 39142 "./br.js": 18, 39143 "./bs": 19, 39144 "./bs.js": 19, 39145 "./ca": 20, 39146 "./ca.js": 20, 39147 "./cs": 21, 39148 "./cs.js": 21, 39149 "./cv": 22, 39150 "./cv.js": 22, 39151 "./cy": 23, 39152 "./cy.js": 23, 39153 "./da": 24, 39154 "./da.js": 24, 39155 "./de": 25, 39156 "./de-at": 26, 39157 "./de-at.js": 26, 39158 "./de-ch": 27, 39159 "./de-ch.js": 27, 39160 "./de.js": 25, 39161 "./dv": 28, 39162 "./dv.js": 28, 39163 "./el": 29, 39164 "./el.js": 29, 39165 "./en-au": 30, 39166 "./en-au.js": 30, 39167 "./en-ca": 31, 39168 "./en-ca.js": 31, 39169 "./en-gb": 32, 39170 "./en-gb.js": 32, 39171 "./en-ie": 33, 39172 "./en-ie.js": 33, 39173 "./en-il": 34, 39174 "./en-il.js": 34, 39175 "./en-in": 35, 39176 "./en-in.js": 35, 39177 "./en-nz": 36, 39178 "./en-nz.js": 36, 39179 "./en-sg": 37, 39180 "./en-sg.js": 37, 39181 "./eo": 38, 39182 "./eo.js": 38, 39183 "./es": 39, 39184 "./es-do": 40, 39185 "./es-do.js": 40, 39186 "./es-mx": 41, 39187 "./es-mx.js": 41, 39188 "./es-us": 42, 39189 "./es-us.js": 42, 39190 "./es.js": 39, 39191 "./et": 43, 39192 "./et.js": 43, 39193 "./eu": 44, 39194 "./eu.js": 44, 39195 "./fa": 45, 39196 "./fa.js": 45, 39197 "./fi": 46, 39198 "./fi.js": 46, 39199 "./fil": 47, 39200 "./fil.js": 47, 39201 "./fo": 48, 39202 "./fo.js": 48, 39203 "./fr": 49, 39204 "./fr-ca": 50, 39205 "./fr-ca.js": 50, 39206 "./fr-ch": 51, 39207 "./fr-ch.js": 51, 39208 "./fr.js": 49, 39209 "./fy": 52, 39210 "./fy.js": 52, 39211 "./ga": 53, 39212 "./ga.js": 53, 39213 "./gd": 54, 39214 "./gd.js": 54, 39215 "./gl": 55, 39216 "./gl.js": 55, 39217 "./gom-deva": 56, 39218 "./gom-deva.js": 56, 39219 "./gom-latn": 57, 39220 "./gom-latn.js": 57, 39221 "./gu": 58, 39222 "./gu.js": 58, 39223 "./he": 59, 39224 "./he.js": 59, 39225 "./hi": 60, 39226 "./hi.js": 60, 39227 "./hr": 61, 39228 "./hr.js": 61, 39229 "./hu": 62, 39230 "./hu.js": 62, 39231 "./hy-am": 63, 39232 "./hy-am.js": 63, 39233 "./id": 64, 39234 "./id.js": 64, 39235 "./is": 65, 39236 "./is.js": 65, 39237 "./it": 66, 39238 "./it-ch": 67, 39239 "./it-ch.js": 67, 39240 "./it.js": 66, 39241 "./ja": 68, 39242 "./ja.js": 68, 39243 "./jv": 69, 39244 "./jv.js": 69, 39245 "./ka": 70, 39246 "./ka.js": 70, 39247 "./kk": 71, 39248 "./kk.js": 71, 39249 "./km": 72, 39250 "./km.js": 72, 39251 "./kn": 73, 39252 "./kn.js": 73, 39253 "./ko": 74, 39254 "./ko.js": 74, 39255 "./ku": 75, 39256 "./ku.js": 75, 39257 "./ky": 76, 39258 "./ky.js": 76, 39259 "./lb": 77, 39260 "./lb.js": 77, 39261 "./lo": 78, 39262 "./lo.js": 78, 39263 "./lt": 79, 39264 "./lt.js": 79, 39265 "./lv": 80, 39266 "./lv.js": 80, 39267 "./me": 81, 39268 "./me.js": 81, 39269 "./mi": 82, 39270 "./mi.js": 82, 39271 "./mk": 83, 39272 "./mk.js": 83, 39273 "./ml": 84, 39274 "./ml.js": 84, 39275 "./mn": 85, 39276 "./mn.js": 85, 39277 "./mr": 86, 39278 "./mr.js": 86, 39279 "./ms": 87, 39280 "./ms-my": 88, 39281 "./ms-my.js": 88, 39282 "./ms.js": 87, 39283 "./mt": 89, 39284 "./mt.js": 89, 39285 "./my": 90, 39286 "./my.js": 90, 39287 "./nb": 91, 39288 "./nb.js": 91, 39289 "./ne": 92, 39290 "./ne.js": 92, 39291 "./nl": 93, 39292 "./nl-be": 94, 39293 "./nl-be.js": 94, 39294 "./nl.js": 93, 39295 "./nn": 95, 39296 "./nn.js": 95, 39297 "./oc-lnc": 96, 39298 "./oc-lnc.js": 96, 39299 "./pa-in": 97, 39300 "./pa-in.js": 97, 39301 "./pl": 98, 39302 "./pl.js": 98, 39303 "./pt": 99, 39304 "./pt-br": 100, 39305 "./pt-br.js": 100, 39306 "./pt.js": 99, 39307 "./ro": 101, 39308 "./ro.js": 101, 39309 "./ru": 102, 39310 "./ru.js": 102, 39311 "./sd": 103, 39312 "./sd.js": 103, 39313 "./se": 104, 39314 "./se.js": 104, 39315 "./si": 105, 39316 "./si.js": 105, 39317 "./sk": 106, 39318 "./sk.js": 106, 39319 "./sl": 107, 39320 "./sl.js": 107, 39321 "./sq": 108, 39322 "./sq.js": 108, 39323 "./sr": 109, 39324 "./sr-cyrl": 110, 39325 "./sr-cyrl.js": 110, 39326 "./sr.js": 109, 39327 "./ss": 111, 39328 "./ss.js": 111, 39329 "./sv": 112, 39330 "./sv.js": 112, 39331 "./sw": 113, 39332 "./sw.js": 113, 39333 "./ta": 114, 39334 "./ta.js": 114, 39335 "./te": 115, 39336 "./te.js": 115, 39337 "./tet": 116, 39338 "./tet.js": 116, 39339 "./tg": 117, 39340 "./tg.js": 117, 39341 "./th": 118, 39342 "./th.js": 118, 39343 "./tk": 119, 39344 "./tk.js": 119, 39345 "./tl-ph": 120, 39346 "./tl-ph.js": 120, 39347 "./tlh": 121, 39348 "./tlh.js": 121,
39349 "./tr": 122, 39350 "./tr.js": 122, 39351 "./tzl": 123, 39352 "./tzl.js": 123, 39353 "./tzm": 124, 39354 "./tzm-latn": 125, 39355 "./tzm-latn.js": 125, 39356 "./tzm.js": 124, 39357 "./ug-cn": 126, 39358 "./ug-cn.js": 126, 39359 "./uk": 127, 39360 "./uk.js": 127, 39361 "./ur": 128, 39362 "./ur.js": 128, 39363 "./uz": 129, 39364 "./uz-latn": 130, 39365 "./uz-latn.js": 130, 39366 "./uz.js": 129, 39367 "./vi": 131, 39368 "./vi.js": 131, 39369 "./x-pseudo": 132, 39370 "./x-pseudo.js": 132, 39371 "./yo": 133, 39372 "./yo.js": 133, 39373 "./zh-cn": 134, 39374 "./zh-cn.js": 134, 39375 "./zh-hk": 135, 39376 "./zh-hk.js": 135, 39377 "./zh-mo": 136, 39378 "./zh-mo.js": 136, 39379 "./zh-tw": 137, 39380 "./zh-tw.js": 137 39381}; 39382function webpackContext(req) { 39383 return __webpack_require__(webpackContextResolve(req)); 39384}; 39385function webpackContextResolve(req) { 39386 var id = map[req]; 39387 if(!(id + 1)) // check for number or string 39388 throw new Error("Cannot find module '" + req + "'."); 39389 return id; 39390}; 39391webpackContext.keys = function webpackContextKeys() { 39392 return Object.keys(map); 39393}; 39394webpackContext.resolve = webpackContextResolve; 39395module.exports = webpackContext; 39396webpackContext.id = 154; 39397 39398/***/ }), 39399/* 155 */ 39400/***/ (function(module, exports, __webpack_require__) { 39401 39402var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/** 39403* @version: 3.1 39404* @author: Dan Grossman http://www.dangrossman.info/ 39405* @copyright: Copyright (c) 2012-2019 Dan Grossman. All rights reserved. 39406* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php 39407* @website: http://www.daterangepicker.com/ 39408*/ 39409// Following the UMD template https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js 39410(function (root, factory) { 39411 if (true) { 39412 // AMD. Make globaly available as well 39413 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0), __webpack_require__(1)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (moment, jquery) { 39414 if (!jquery.fn) jquery.fn = {}; // webpack server rendering 39415 if (typeof moment !== 'function' && moment.hasOwnProperty('default')) moment = moment['default'] 39416 return factory(moment, jquery); 39417 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 39418 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
vendor: 67,003 bytes, lines 39418-40980
39418); 39419 } else if (typeof module === 'object' && module.exports) { 39420 // Node / Browserify 39421 //isomorphic issue 39422 var jQuery = (typeof window != 'undefined') ? window.jQuery : undefined; 39423 if (!jQuery) { 39424 jQuery = require('jquery'); 39425 if (!jQuery.fn) jQuery.fn = {}; 39426 } 39427 var moment = (typeof window != 'undefined' && typeof window.moment != 'undefined') ? window.moment : require('moment'); 39428 module.exports = factory(moment, jQuery); 39429 } else { 39430 // Browser globals 39431 root.daterangepicker = factory(root.moment, root.jQuery); 39432 } 39433}(this, function(moment, $) { 39434 var DateRangePicker = function(element, options, cb) { 39435 39436 //default settings for options 39437 this.parentEl = 'body'; 39438 this.element = $(element); 39439 this.startDate = moment().startOf('day'); 39440 this.endDate = moment().endOf('day'); 39441 this.minDate = false; 39442 this.maxDate = false; 39443 this.maxSpan = false; 39444 this.autoApply = false; 39445 this.singleDatePicker = false; 39446 this.showDropdowns = false; 39447 this.minYear = moment().subtract(100, 'year').format('YYYY'); 39448 this.maxYear = moment().add(100, 'year').format('YYYY'); 39449 this.showWeekNumbers = false; 39450 this.showISOWeekNumbers = false; 39451 this.showCustomRangeLabel = true; 39452 this.timePicker = false; 39453 this.timePicker24Hour = false; 39454 this.timePickerIncrement = 1; 39455 this.timePickerSeconds = false; 39456 this.linkedCalendars = true; 39457 this.autoUpdateInput = true; 39458 this.alwaysShowCalendars = false; 39459 this.ranges = {}; 39460 39461 this.opens = 'right'; 39462 if (this.element.hasClass('pull-right')) 39463 this.opens = 'left'; 39464 39465 this.drops = 'down'; 39466 if (this.element.hasClass('dropup')) 39467 this.drops = 'up'; 39468 39469 this.buttonClasses = 'btn btn-sm'; 39470 this.applyButtonClasses = 'btn-primary'; 39471 this.cancelButtonClasses = 'btn-default'; 39472 39473 this.locale = { 39474 direction: 'ltr', 39475 format: moment.localeData().longDateFormat('L'), 39476 separator: ' - ', 39477 applyLabel: 'Apply', 39478 cancelLabel: 'Cancel', 39479 weekLabel: 'W', 39480 customRangeLabel: 'Custom Range', 39481 daysOfWeek: moment.weekdaysMin(), 39482 monthNames: moment.monthsShort(), 39483 firstDay: moment.localeData().firstDayOfWeek() 39484 }; 39485 39486 this.callback = function() { }; 39487 39488 //some state information 39489 this.isShowing = false; 39490 this.leftCalendar = {}; 39491 this.rightCalendar = {}; 39492 39493 //custom options from user 39494 if (typeof options !== 'object' || options === null) 39495 options = {}; 39496 39497 //allow setting options with data attributes 39498 //data-api options will be overwritten with custom javascript options 39499 options = $.extend(this.element.data(), options); 39500 39501 //html template for the picker UI 39502 if (typeof options.template !== 'string' && !(options.template instanceof $)) 39503 options.template = 39504 '<div class="daterangepicker">' + 39505 '<div class="ranges"></div>' + 39506 '<div class="drp-calendar left">' + 39507 '<div class="calendar-table"></div>' + 39508 '<div class="calendar-time"></div>' + 39509 '</div>' + 39510 '<div class="drp-calendar right">' + 39511 '<div class="calendar-table"></div>' + 39512 '<div class="calendar-time"></div>' + 39513 '</div>' + 39514 '<div class="drp-buttons">' + 39515 '<span class="drp-selected"></span>' + 39516 '<button class="cancelBtn" type="button"></button>' + 39517 '<button class="applyBtn" disabled="disabled" type="button"></button> ' + 39518 '</div>' + 39519 '</div>'; 39520 39521 this.parentEl = (options.parentEl && $(options.parentEl).length) ? $(options.parentEl) : $(this.parentEl); 39522 this.container = $(options.template).appendTo(this.parentEl); 39523 39524 // 39525 // handle all the possible options overriding defaults 39526 // 39527 39528 if (typeof options.locale === 'object') { 39529 39530 if (typeof options.locale.direction === 'string') 39531 this.locale.direction = options.locale.direction; 39532 39533 if (typeof options.locale.format === 'string') 39534 this.locale.format = options.locale.format; 39535 39536 if (typeof options.locale.separator === 'string') 39537 this.locale.separator = options.locale.separator; 39538 39539 if (typeof options.locale.daysOfWeek === 'object') 39540 this.locale.daysOfWeek = options.locale.daysOfWeek.slice(); 39541 39542 if (typeof options.locale.monthNames === 'object') 39543 this.locale.monthNames = options.locale.monthNames.slice(); 39544 39545 if (typeof options.locale.firstDay === 'number') 39546 this.locale.firstDay = options.locale.firstDay; 39547 39548 if (typeof options.locale.applyLabel === 'string') 39549 this.locale.applyLabel = options.locale.applyLabel; 39550 39551 if (typeof options.locale.cancelLabel === 'string') 39552 this.locale.cancelLabel = options.locale.cancelLabel; 39553 39554 if (typeof options.locale.weekLabel === 'string') 39555 this.locale.weekLabel = options.locale.weekLabel; 39556 39557 if (typeof options.locale.customRangeLabel === 'string'){ 39558 //Support unicode chars in the custom range name. 39559 var elem = document.createElement('textarea'); 39560 elem.innerHTML = options.locale.customRangeLabel; 39561 var rangeHtml = elem.value; 39562 this.locale.customRangeLabel = rangeHtml; 39563 } 39564 } 39565 this.container.addClass(this.locale.direction); 39566 39567 if (typeof options.startDate === 'string') 39568 this.startDate = moment(options.startDate, this.locale.format); 39569 39570 if (typeof options.endDate === 'string') 39571 this.endDate = moment(options.endDate, this.locale.format); 39572 39573 if (typeof options.minDate === 'string') 39574 this.minDate = moment(options.minDate, this.locale.format); 39575 39576 if (typeof options.maxDate === 'string') 39577 this.maxDate = moment(options.maxDate, this.locale.format); 39578 39579 if (typeof options.startDate === 'object') 39580 this.startDate = moment(options.startDate); 39581 39582 if (typeof options.endDate === 'object') 39583 this.endDate = moment(options.endDate); 39584 39585 if (typeof options.minDate === 'object') 39586 this.minDate = moment(options.minDate); 39587 39588 if (typeof options.maxDate === 'object') 39589 this.maxDate = moment(options.maxDate); 39590 39591 // sanity check for bad options 39592 if (this.minDate && this.startDate.isBefore(this.minDate)) 39593 this.startDate = this.minDate.clone(); 39594 39595 // sanity check for bad options 39596 if (this.maxDate && this.endDate.isAfter(this.maxDate)) 39597 this.endDate = this.maxDate.clone(); 39598 39599 if (typeof options.applyButtonClasses === 'string') 39600 this.applyButtonClasses = options.applyButtonClasses; 39601 39602 if (typeof options.applyClass === 'string') //backwards compat 39603 this.applyButtonClasses = options.applyClass; 39604 39605 if (typeof options.cancelButtonClasses === 'string') 39606 this.cancelButtonClasses = options.cancelButtonClasses; 39607 39608 if (typeof options.cancelClass === 'string') //backwards compat 39609 this.cancelButtonClasses = options.cancelClass; 39610 39611 if (typeof options.maxSpan === 'object') 39612 this.maxSpan = options.maxSpan; 39613 39614 if (typeof options.dateLimit === 'object') //backwards compat 39615 this.maxSpan = options.dateLimit; 39616 39617 if (typeof options.opens === 'string') 39618 this.opens = options.opens; 39619 39620 if (typeof options.drops === 'string') 39621 this.drops = options.drops; 39622 39623 if (typeof options.showWeekNumbers === 'boolean') 39624 this.showWeekNumbers = options.showWeekNumbers; 39625 39626 if (typeof options.showISOWeekNumbers === 'boolean') 39627 this.showISOWeekNumbers = options.showISOWeekNumbers; 39628 39629 if (typeof options.buttonClasses === 'string') 39630 this.buttonClasses = options.buttonClasses; 39631 39632 if (typeof options.buttonClasses === 'object') 39633 this.buttonClasses = options.buttonClasses.join(' '); 39634 39635 if (typeof options.showDropdowns === 'boolean') 39636 this.showDropdowns = options.showDropdowns; 39637 39638 if (typeof options.minYear === 'number') 39639 this.minYear = options.minYear; 39640 39641 if (typeof options.maxYear === 'number') 39642 this.maxYear = options.maxYear; 39643 39644 if (typeof options.showCustomRangeLabel === 'boolean') 39645 this.showCustomRangeLabel = options.showCustomRangeLabel; 39646 39647 if (typeof options.singleDatePicker === 'boolean') { 39648 this.singleDatePicker = options.singleDatePicker; 39649 if (this.singleDatePicker) 39650 this.endDate = this.startDate.clone(); 39651 } 39652 39653 if (typeof options.timePicker === 'boolean') 39654 this.timePicker = options.timePicker; 39655 39656 if (typeof options.timePickerSeconds === 'boolean') 39657 this.timePickerSeconds = options.timePickerSeconds; 39658 39659 if (typeof options.timePickerIncrement === 'number') 39660 this.timePickerIncrement = options.timePickerIncrement; 39661 39662 if (typeof options.timePicker24Hour === 'boolean') 39663 this.timePicker24Hour = options.timePicker24Hour; 39664 39665 if (typeof options.autoApply === 'boolean') 39666 this.autoApply = options.autoApply; 39667 39668 if (typeof options.autoUpdateInput === 'boolean') 39669 this.autoUpdateInput = options.autoUpdateInput; 39670 39671 if (typeof options.linkedCalendars === 'boolean') 39672 this.linkedCalendars = options.linkedCalendars; 39673 39674 if (typeof options.isInvalidDate === 'function') 39675 this.isInvalidDate = options.isInvalidDate; 39676 39677 if (typeof options.isCustomDate === 'function') 39678 this.isCustomDate = options.isCustomDate; 39679 39680 if (typeof options.alwaysShowCalendars === 'boolean') 39681 this.alwaysShowCalendars = options.alwaysShowCalendars; 39682 39683 // update day names order to firstDay 39684 if (this.locale.firstDay != 0) { 39685 var iterator = this.locale.firstDay; 39686 while (iterator > 0) { 39687 this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()); 39688 iterator--; 39689 } 39690 } 39691 39692 var start, end, range; 39693 39694 //if no start/end dates set, check if an input element contains initial values 39695 if (typeof options.startDate === 'undefined' && typeof options.endDate === 'undefined') { 39696 if ($(this.element).is(':text')) { 39697 var val = $(this.element).val(), 39698 split = val.split(this.locale.separator); 39699 39700 start = end = null; 39701 39702 if (split.length == 2) { 39703 start = moment(split[0], this.locale.format); 39704 end = moment(split[1], this.locale.format); 39705 } else if (this.singleDatePicker && val !== "") { 39706 start = moment(val, this.locale.format); 39707 end = moment(val, this.locale.format); 39708 } 39709 if (start !== null && end !== null) { 39710 this.setStartDate(start); 39711 this.setEndDate(end); 39712 } 39713 } 39714 } 39715 39716 if (typeof options.ranges === 'object') { 39717 for (range in options.ranges) { 39718 39719 if (typeof options.ranges[range][0] === 'string') 39720 start = moment(options.ranges[range][0], this.locale.format); 39721 else 39722 start = moment(options.ranges[range][0]); 39723 39724 if (typeof options.ranges[range][1] === 'string') 39725 end = moment(options.ranges[range][1], this.locale.format); 39726 else 39727 end = moment(options.ranges[range][1]); 39728 39729 // If the start or end date exceed those allowed by the minDate or maxSpan 39730 // options, shorten the range to the allowable period. 39731 if (this.minDate && start.isBefore(this.minDate)) 39732 start = this.minDate.clone(); 39733 39734 var maxDate = this.maxDate; 39735 if (this.maxSpan && maxDate && start.clone().add(this.maxSpan).isAfter(maxDate)) 39736 maxDate = start.clone().add(this.maxSpan); 39737 if (maxDate && end.isAfter(maxDate)) 39738 end = maxDate.clone(); 39739 39740 // If the end of the range is before the minimum or the start of the range is 39741 // after the maximum, don't display this range option at all. 39742 if ((this.minDate && end.isBefore(this.minDate, this.timepicker ? 'minute' : 'day')) 39743 || (maxDate && start.isAfter(maxDate, this.timepicker ? 'minute' : 'day'))) 39744 continue; 39745 39746 //Support unicode chars in the range names. 39747 var elem = document.createElement('textarea'); 39748 elem.innerHTML = range; 39749 var rangeHtml = elem.value; 39750 39751 this.ranges[rangeHtml] = [start, end]; 39752 } 39753 39754 var list = '<ul>'; 39755 for (range in this.ranges) { 39756 list += '<li data-range-key="' + range + '">' + range + '</li>'; 39757 } 39758 if (this.showCustomRangeLabel) { 39759 list += '<li data-range-key="' + this.locale.customRangeLabel + '">' + this.locale.customRangeLabel + '</li>'; 39760 } 39761 list += '</ul>'; 39762 this.container.find('.ranges').prepend(list); 39763 } 39764 39765 if (typeof cb === 'function') { 39766 this.callback = cb; 39767 } 39768 39769 if (!this.timePicker) { 39770 this.startDate = this.startDate.startOf('day'); 39771 this.endDate = this.endDate.endOf('day'); 39772 this.container.find('.calendar-time').hide(); 39773 } 39774 39775 //can't be used together for now 39776 if (this.timePicker && this.autoApply) 39777 this.autoApply = false; 39778 39779 if (this.autoApply) { 39780 this.container.addClass('auto-apply'); 39781 } 39782 39783 if (typeof options.ranges === 'object') 39784 this.container.addClass('show-ranges'); 39785 39786 if (this.singleDatePicker) { 39787 this.container.addClass('single'); 39788 this.container.find('.drp-calendar.left').addClass('single'); 39789 this.container.find('.drp-calendar.left').show(); 39790 this.container.find('.drp-calendar.right').hide(); 39791 if (!this.timePicker && this.autoApply) { 39792 this.container.addClass('auto-apply'); 39793 } 39794 } 39795 39796 if ((typeof options.ranges === 'undefined' && !this.singleDatePicker) || this.alwaysShowCalendars) { 39797 this.container.addClass('show-calendar'); 39798 } 39799 39800 this.container.addClass('opens' + this.opens); 39801 39802 //apply CSS classes and labels to buttons 39803 this.container.find('.applyBtn, .cancelBtn').addClass(this.buttonClasses); 39804 if (this.applyButtonClasses.length) 39805 this.container.find('.applyBtn').addClass(this.applyButtonClasses); 39806 if (this.cancelButtonClasses.length) 39807 this.container.find('.cancelBtn').addClass(this.cancelButtonClasses); 39808 this.container.find('.applyBtn').html(this.locale.applyLabel); 39809 this.container.find('.cancelBtn').html(this.locale.cancelLabel); 39810 39811 // 39812 // event listeners 39813 // 39814 39815 this.container.find('.drp-calendar') 39816 .on('click.daterangepicker', '.prev', $.proxy(this.clickPrev, this)) 39817 .on('click.daterangepicker', '.next', $.proxy(this.clickNext, this)) 39818 .on('mousedown.daterangepicker', 'td.available', $.proxy(this.clickDate, this)) 39819 .on('mouseenter.daterangepicker', 'td.available', $.proxy(this.hoverDate, this)) 39820 .on('change.daterangepicker', 'select.yearselect', $.proxy(this.monthOrYearChanged, this)) 39821 .on('change.daterangepicker', 'select.monthselect', $.proxy(this.monthOrYearChanged, this)) 39822 .on('change.daterangepicker', 'select.hourselect,select.minuteselect,select.secondselect,select.ampmselect', $.proxy(this.timeChanged, this)); 39823 39824 this.container.find('.ranges') 39825 .on('click.daterangepicker', 'li', $.proxy(this.clickRange, this)); 39826 39827 this.container.find('.drp-buttons') 39828 .on('click.daterangepicker', 'button.applyBtn', $.proxy(this.clickApply, this)) 39829 .on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this)); 39830 39831 if (this.element.is('input') || this.element.is('button')) { 39832 this.element.on({ 39833 'click.daterangepicker': $.proxy(this.show, this), 39834 'focus.daterangepicker': $.proxy(this.show, this), 39835 'keyup.daterangepicker': $.proxy(this.elementChanged, this), 39836 'keydown.daterangepicker': $.proxy(this.keydown, this) //IE 11 compatibility 39837 }); 39838 } else { 39839 this.element.on('click.daterangepicker', $.proxy(this.toggle, this)); 39840 this.element.on('keydown.daterangepicker', $.proxy(this.toggle, this)); 39841 } 39842 39843 // 39844 // if attached to a text input, set the initial value 39845 // 39846 39847 this.updateElement(); 39848 39849 }; 39850 39851 DateRangePicker.prototype = { 39852 39853 constructor: DateRangePicker, 39854 39855 setStartDate: function(startDate) { 39856 if (typeof startDate === 'string') 39857 this.startDate = moment(startDate, this.locale.format); 39858 39859 if (typeof startDate === 'object') 39860 this.startDate = moment(startDate); 39861 39862 if (!this.timePicker) 39863 this.startDate = this.startDate.startOf('day'); 39864 39865 if (this.timePicker && this.timePickerIncrement) 39866 this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); 39867 39868 if (this.minDate && this.startDate.isBefore(this.minDate)) { 39869 this.startDate = this.minDate.clone(); 39870 if (this.timePicker && this.timePickerIncrement) 39871 this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); 39872 } 39873 39874 if (this.maxDate && this.startDate.isAfter(this.maxDate)) { 39875 this.startDate = this.maxDate.clone(); 39876 if (this.timePicker && this.timePickerIncrement) 39877 this.startDate.minute(Math.floor(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); 39878 } 39879 39880 if (!this.isShowing) 39881 this.updateElement(); 39882 39883 this.updateMonthsInView(); 39884 }, 39885 39886 setEndDate: function(endDate) { 39887 if (typeof endDate === 'string') 39888 this.endDate = moment(endDate, this.locale.format); 39889 39890 if (typeof endDate === 'object') 39891 this.endDate = moment(endDate); 39892 39893 if (!this.timePicker) 39894 this.endDate = this.endDate.endOf('day'); 39895 39896 if (this.timePicker && this.timePickerIncrement) 39897 this.endDate.minute(Math.round(this.endDate.minute() / this.timePickerIncrement) * this.timePickerIncrement); 39898 39899 if (this.endDate.isBefore(this.startDate)) 39900 this.endDate = this.startDate.clone(); 39901 39902 if (this.maxDate && this.endDate.isAfter(this.maxDate)) 39903 this.endDate = this.maxDate.clone(); 39904 39905 if (this.maxSpan && this.startDate.clone().add(this.maxSpan).isBefore(this.endDate)) 39906 this.endDate = this.startDate.clone().add(this.maxSpan); 39907 39908 this.previousRightTime = this.endDate.clone(); 39909 39910 this.container.find('.drp-selected').html(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format)); 39911 39912 if (!this.isShowing) 39913 this.updateElement(); 39914 39915 this.updateMonthsInView(); 39916 }, 39917 39918 isInvalidDate: function() { 39919 return false; 39920 }, 39921 39922 isCustomDate: function() { 39923 return false; 39924 }, 39925 39926 updateView: function() { 39927 if (this.timePicker) { 39928 this.renderTimePicker('left'); 39929 this.renderTimePicker('right'); 39930 if (!this.endDate) { 39931 this.container.find('.right .calendar-time select').prop('disabled', true).addClass('disabled'); 39932 } else { 39933 this.container.find('.right .calendar-time select').prop('disabled', false).removeClass('disabled'); 39934 } 39935 } 39936 if (this.endDate) 39937 this.container.find('.drp-selected').html(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format)); 39938 this.updateMonthsInView(); 39939 this.updateCalendars(); 39940 this.updateFormInputs(); 39941 }, 39942 39943 updateMonthsInView: function() { 39944 if (this.endDate) { 39945 39946 //if both dates are visible already, do nothing 39947 if (!this.singleDatePicker && this.leftCalendar.month && this.rightCalendar.month && 39948 (this.startDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.startDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM')) 39949 && 39950 (this.endDate.format('YYYY-MM') == this.leftCalendar.month.format('YYYY-MM') || this.endDate.format('YYYY-MM') == this.rightCalendar.month.format('YYYY-MM')) 39951 ) { 39952 return; 39953 } 39954 39955 this.leftCalendar.month = this.startDate.clone().date(2); 39956 if (!this.linkedCalendars && (this.endDate.month() != this.startDate.month() || this.endDate.year() != this.startDate.year())) { 39957 this.rightCalendar.month = this.endDate.clone().date(2); 39958 } else { 39959 this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month'); 39960 } 39961 39962 } else { 39963 if (this.leftCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM') && this.rightCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM')) { 39964 this.leftCalendar.month = this.startDate.clone().date(2); 39965 this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month'); 39966 } 39967 } 39968 if (this.maxDate && this.linkedCalendars && !this.singleDatePicker && this.rightCalendar.month > this.maxDate) { 39969 this.rightCalendar.month = this.maxDate.clone().date(2); 39970 this.leftCalendar.month = this.maxDate.clone().date(2).subtract(1, 'month'); 39971 } 39972 }, 39973 39974 updateCalendars: function() { 39975 39976 if (this.timePicker) { 39977 var hour, minute, second; 39978 if (this.endDate) { 39979 hour = parseInt(this.container.find('.left .hourselect').val(), 10); 39980 minute = parseInt(this.container.find('.left .minuteselect').val(), 10); 39981 if (isNaN(minute)) { 39982 minute = parseInt(this.container.find('.left .minuteselect option:last').val(), 10); 39983 } 39984 second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0; 39985 if (!this.timePicker24Hour) { 39986 var ampm = this.container.find('.left .ampmselect').val(); 39987 if (ampm === 'PM' && hour < 12) 39988 hour += 12; 39989 if (ampm === 'AM' && hour === 12) 39990 hour = 0; 39991 } 39992 } else { 39993 hour = parseInt(this.container.find('.right .hourselect').val(), 10); 39994 minute = parseInt(this.container.find('.right .minuteselect').val(), 10); 39995 if (isNaN(minute)) { 39996 minute = parseInt(this.container.find('.right .minuteselect option:last').val(), 10); 39997 } 39998 second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0; 39999 if (!this.timePicker24Hour) { 40000 var ampm = this.container.find('.right .ampmselect').val(); 40001 if (ampm === 'PM' && hour < 12) 40002 hour += 12; 40003 if (ampm === 'AM' && hour === 12) 40004 hour = 0; 40005 } 40006 } 40007 this.leftCalendar.month.hour(hour).minute(minute).second(second); 40008 this.rightCalendar.month.hour(hour).minute(minute).second(second); 40009 } 40010 40011 this.renderCalendar('left'); 40012 this.renderCalendar('right'); 40013 40014 //highlight any predefined range matching the current start and end dates 40015 this.container.find('.ranges li').removeClass('active'); 40016 if (this.endDate == null) return; 40017 40018 this.calculateChosenLabel(); 40019 }, 40020 40021 renderCalendar: function(side) { 40022 40023 // 40024 // Build the matrix of dates that will populate the calendar 40025 // 40026 40027 var calendar = side == 'left' ? this.leftCalendar : this.rightCalendar; 40028 var month = calendar.month.month(); 40029 var year = calendar.month.year(); 40030 var hour = calendar.month.hour(); 40031 var minute = calendar.month.minute(); 40032 var second = calendar.month.second(); 40033 var daysInMonth = moment([year, month]).daysInMonth(); 40034 var firstDay = moment([year, month, 1]); 40035 var lastDay = moment([year, month, daysInMonth]); 40036 var lastMonth = moment(firstDay).subtract(1, 'month').month(); 40037 var lastYear = moment(firstDay).subtract(1, 'month').year(); 40038 var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth(); 40039 var dayOfWeek = firstDay.day(); 40040 40041 //initialize a 6 rows x 7 columns array for the calendar 40042 var calendar = []; 40043 calendar.firstDay = firstDay; 40044 calendar.lastDay = lastDay; 40045 40046 for (var i = 0; i < 6; i++) { 40047 calendar[i] = []; 40048 } 40049 40050 //populate the calendar with date objects 40051 var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1; 40052 if (startDay > daysInLastMonth) 40053 startDay -= 7; 40054 40055 if (dayOfWeek == this.locale.firstDay) 40056 startDay = daysInLastMonth - 6; 40057 40058 var curDate = moment([lastYear, lastMonth, startDay, 12, minute, second]); 40059 40060 var col, row; 40061 for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add(24, 'hour')) { 40062 if (i > 0 && col % 7 === 0) { 40063 col = 0; 40064 row++; 40065 } 40066 calendar[row][col] = curDate.clone().hour(hour).minute(minute).second(second); 40067 curDate.hour(12); 40068 40069 if (this.minDate && calendar[row][col].format('YYYY-MM-DD') == this.minDate.format('YYYY-MM-DD') && calendar[row][col].isBefore(this.minDate) && side == 'left') { 40070 calendar[row][col] = this.minDate.clone(); 40071 } 40072 40073 if (this.maxDate && calendar[row][col].format('YYYY-MM-DD') == this.maxDate.format('YYYY-MM-DD') && calendar[row][col].isAfter(this.maxDate) && side == 'right') { 40074 calendar[row][col] = this.maxDate.clone(); 40075 } 40076 40077 } 40078 40079 //make the calendar object available to hoverDate/clickDate 40080 if (side == 'left') { 40081 this.leftCalendar.calendar = calendar; 40082 } else { 40083 this.rightCalendar.calendar = calendar; 40084 } 40085 40086 // 40087 // Display the calendar 40088 // 40089 40090 var minDate = side == 'left' ? this.minDate : this.startDate; 40091 var maxDate = this.maxDate; 40092 var selected = side == 'left' ? this.startDate : this.endDate; 40093 var arrow = this.locale.direction == 'ltr' ? {left: 'chevron-left', right: 'chevron-right'} : {left: 'chevron-right', right: 'chevron-left'}; 40094 40095 var html = '<table class="table-condensed">'; 40096 html += '<thead>'; 40097 html += '<tr>'; 40098 40099 // add empty cell for week number 40100 if (this.showWeekNumbers || this.showISOWeekNumbers) 40101 html += '<th></th>'; 40102 40103 if ((!minDate || minDate.isBefore(calendar.firstDay)) && (!this.linkedCalendars || side == 'left')) { 40104 html += '<th class="prev available"><span></span></th>'; 40105 } else { 40106 html += '<th></th>'; 40107 } 40108 40109 var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(" YYYY"); 40110 40111 if (this.showDropdowns) { 40112 var currentMonth = calendar[1][1].month(); 40113 var currentYear = calendar[1][1].year(); 40114 var maxYear = (maxDate && maxDate.year()) || (this.maxYear); 40115 var minYear = (minDate && minDate.year()) || (this.minYear); 40116 var inMinYear = currentYear == minYear; 40117 var inMaxYear = currentYear == maxYear; 40118 40119 var monthHtml = '<select class="monthselect">'; 40120 for (var m = 0; m < 12; m++) { 40121 if ((!inMinYear || (minDate && m >= minDate.month())) && (!inMaxYear || (maxDate && m <= maxDate.month()))) { 40122 monthHtml += "<option value='" + m + "'" + 40123 (m === currentMonth ? " selected='selected'" : "") + 40124 ">" + this.locale.monthNames[m] + "</option>"; 40125 } else { 40126 monthHtml += "<option value='" + m + "'" + 40127 (m === currentMonth ? " selected='selected'" : "") + 40128 " disabled='disabled'>" + this.locale.monthNames[m] + "</option>"; 40129 } 40130 } 40131 monthHtml += "</select>"; 40132 40133 var yearHtml = '<select class="yearselect">'; 40134 for (var y = minYear; y <= maxYear; y++) { 40135 yearHtml += '<option value="' + y + '"' + 40136 (y === currentYear ? ' selected="selected"' : '') + 40137 '>' + y + '</option>'; 40138 } 40139 yearHtml += '</select>'; 40140 40141 dateHtml = monthHtml + yearHtml; 40142 } 40143 40144 html += '<th colspan="5" class="month">' + dateHtml + '</th>'; 40145 if ((!maxDate || maxDate.isAfter(calendar.lastDay)) && (!this.linkedCalendars || side == 'right' || this.singleDatePicker)) { 40146 html += '<th class="next available"><span></span></th>'; 40147 } else { 40148 html += '<th></th>'; 40149 } 40150 40151 html += '</tr>'; 40152 html += '<tr>'; 40153 40154 // add week number label 40155 if (this.showWeekNumbers || this.showISOWeekNumbers) 40156 html += '<th class="week">' + this.locale.weekLabel + '</th>'; 40157 40158 $.each(this.locale.daysOfWeek, function(index, dayOfWeek) { 40159 html += '<th>' + dayOfWeek + '</th>'; 40160 }); 40161 40162 html += '</tr>'; 40163 html += '</thead>'; 40164 html += '<tbody>'; 40165 40166 //adjust maxDate to reflect the maxSpan setting in order to 40167 //grey out end dates beyond the maxSpan 40168 if (this.endDate == null && this.maxSpan) { 40169 var maxLimit = this.startDate.clone().add(this.maxSpan).endOf('day'); 40170 if (!maxDate || maxLimit.isBefore(maxDate)) { 40171 maxDate = maxLimit; 40172 } 40173 } 40174 40175 for (var row = 0; row < 6; row++) { 40176 html += '<tr>'; 40177 40178 // add week number 40179 if (this.showWeekNumbers) 40180 html += '<td class="week">' + calendar[row][0].week() + '</td>'; 40181 else if (this.showISOWeekNumbers) 40182 html += '<td class="week">' + calendar[row][0].isoWeek() + '</td>'; 40183 40184 for (var col = 0; col < 7; col++) { 40185 40186 var classes = []; 40187 40188 //highlight today's date 40189 if (calendar[row][col].isSame(new Date(), "day")) 40190 classes.push('today'); 40191 40192 //highlight weekends 40193 if (calendar[row][col].isoWeekday() > 5) 40194 classes.push('weekend'); 40195 40196 //grey out the dates in other months displayed at beginning and end of this calendar 40197 if (calendar[row][col].month() != calendar[1][1].month()) 40198 classes.push('off', 'ends'); 40199 40200 //don't allow selection of dates before the minimum date 40201 if (this.minDate && calendar[row][col].isBefore(this.minDate, 'day')) 40202 classes.push('off', 'disabled'); 40203 40204 //don't allow selection of dates after the maximum date 40205 if (maxDate && calendar[row][col].isAfter(maxDate, 'day')) 40206 classes.push('off', 'disabled'); 40207 40208 //don't allow selection of date if a custom function decides it's invalid 40209 if (this.isInvalidDate(calendar[row][col])) 40210 classes.push('off', 'disabled'); 40211 40212 //highlight the currently selected start date 40213 if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD')) 40214 classes.push('active', 'start-date'); 40215 40216 //highlight the currently selected end date 40217 if (this.endDate != null && calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD')) 40218 classes.push('active', 'end-date'); 40219 40220 //highlight dates in-between the selected dates 40221 if (this.endDate != null && calendar[row][col] > this.startDate && calendar[row][col] < this.endDate) 40222 classes.push('in-range'); 40223 40224 //apply custom classes for this date 40225 var isCustom = this.isCustomDate(calendar[row][col]); 40226 if (isCustom !== false) { 40227 if (typeof isCustom === 'string') 40228 classes.push(isCustom); 40229 else 40230 Array.prototype.push.apply(classes, isCustom); 40231 } 40232 40233 var cname = '', disabled = false; 40234 for (var i = 0; i < classes.length; i++) { 40235 cname += classes[i] + ' '; 40236 if (classes[i] == 'disabled') 40237 disabled = true; 40238 } 40239 if (!disabled) 40240 cname += 'available'; 40241 40242 html += '<td class="' + cname.replace(/^\s+|\s+$/g, '') + '" data-title="' + 'r' + row + 'c' + col + '">' + calendar[row][col].date() + '</td>'; 40243 40244 } 40245 html += '</tr>'; 40246 } 40247 40248 html += '</tbody>'; 40249 html += '</table>'; 40250 40251 this.container.find('.drp-calendar.' + side + ' .calendar-table').html(html); 40252 40253 }, 40254 40255 renderTimePicker: function(side) { 40256 40257 // Don't bother updating the time picker if it's currently disabled 40258 // because an end date hasn't been clicked yet 40259 if (side == 'right' && !this.endDate) return; 40260 40261 var html, selected, minDate, maxDate = this.maxDate; 40262 40263 if (this.maxSpan && (!this.maxDate || this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate))) 40264 maxDate = this.startDate.clone().add(this.maxSpan); 40265 40266 if (side == 'left') { 40267 selected = this.startDate.clone(); 40268 minDate = this.minDate; 40269 } else if (side == 'right') { 40270 selected = this.endDate.clone(); 40271 minDate = this.startDate; 40272 40273 //Preserve the time already selected 40274 var timeSelector = this.container.find('.drp-calendar.right .calendar-time'); 40275 if (timeSelector.html() != '') { 40276 40277 selected.hour(!isNaN(selected.hour()) ? selected.hour() : timeSelector.find('.hourselect option:selected').val()); 40278 selected.minute(!isNaN(selected.minute()) ? selected.minute() : timeSelector.find('.minuteselect option:selected').val()); 40279 selected.second(!isNaN(selected.second()) ? selected.second() : timeSelector.find('.secondselect option:selected').val()); 40280 40281 if (!this.timePicker24Hour) { 40282 var ampm = timeSelector.find('.ampmselect option:selected').val(); 40283 if (ampm === 'PM' && selected.hour() < 12) 40284 selected.hour(selected.hour() + 12); 40285 if (ampm === 'AM' && selected.hour() === 12) 40286 selected.hour(0); 40287 } 40288 40289 } 40290 40291 if (selected.isBefore(this.startDate)) 40292 selected = this.startDate.clone(); 40293 40294 if (maxDate && selected.isAfter(maxDate)) 40295 selected = maxDate.clone(); 40296 40297 } 40298 40299 // 40300 // hours 40301 // 40302 40303 html = '<select class="hourselect">'; 40304 40305 var start = this.timePicker24Hour ? 0 : 1; 40306 var end = this.timePicker24Hour ? 23 : 12; 40307 40308 for (var i = start; i <= end; i++) { 40309 var i_in_24 = i; 40310 if (!this.timePicker24Hour) 40311 i_in_24 = selected.hour() >= 12 ? (i == 12 ? 12 : i + 12) : (i == 12 ? 0 : i); 40312 40313 var time = selected.clone().hour(i_in_24); 40314 var disabled = false; 40315 if (minDate && time.minute(59).isBefore(minDate)) 40316 disabled = true; 40317 if (maxDate && time.minute(0).isAfter(maxDate)) 40318 disabled = true; 40319 40320 if (i_in_24 == selected.hour() && !disabled) { 40321 html += '<option value="' + i + '" selected="selected">' + i + '</option>'; 40322 } else if (disabled) { 40323 html += '<option value="' + i + '" disabled="disabled" class="disabled">' + i + '</option>'; 40324 } else { 40325 html += '<option value="' + i + '">' + i + '</option>'; 40326 } 40327 } 40328 40329 html += '</select> '; 40330 40331 // 40332 // minutes 40333 // 40334 40335 html += ': <select class="minuteselect">'; 40336 40337 for (var i = 0; i < 60; i += this.timePickerIncrement) { 40338 var padded = i < 10 ? '0' + i : i; 40339 var time = selected.clone().minute(i); 40340 40341 var disabled = false; 40342 if (minDate && time.second(59).isBefore(minDate)) 40343 disabled = true; 40344 if (maxDate && time.second(0).isAfter(maxDate)) 40345 disabled = true; 40346 40347 if (selected.minute() == i && !disabled) { 40348 html += '<option value="' + i + '" selected="selected">' + padded + '</option>'; 40349 } else if (disabled) { 40350 html += '<option value="' + i + '" disabled="disabled" class="disabled">' + padded + '</option>'; 40351 } else { 40352 html += '<option value="' + i + '">' + padded + '</option>'; 40353 } 40354 } 40355 40356 html += '</select> '; 40357 40358 // 40359 // seconds 40360 // 40361 40362 if (this.timePickerSeconds) { 40363 html += ': <select class="secondselect">'; 40364 40365 for (var i = 0; i < 60; i++) { 40366 var padded = i < 10 ? '0' + i : i; 40367 var time = selected.clone().second(i); 40368 40369 var disabled = false; 40370 if (minDate && time.isBefore(minDate)) 40371 disabled = true; 40372 if (maxDate && time.isAfter(maxDate)) 40373 disabled = true; 40374 40375 if (selected.second() == i && !disabled) { 40376 html += '<option value="' + i + '" selected="selected">' + padded + '</option>'; 40377 } else if (disabled) { 40378 html += '<option value="' + i + '" disabled="disabled" class="disabled">' + padded + '</option>'; 40379 } else { 40380 html += '<option value="' + i + '">' + padded + '</option>'; 40381 } 40382 } 40383 40384 html += '</select> '; 40385 } 40386 40387 // 40388 // AM/PM 40389 // 40390 40391 if (!this.timePicker24Hour) { 40392 html += '<select class="ampmselect">'; 40393 40394 var am_html = ''; 40395 var pm_html = ''; 40396 40397 if (minDate && selected.clone().hour(12).minute(0).second(0).isBefore(minDate)) 40398 am_html = ' disabled="disabled" class="disabled"'; 40399 40400 if (maxDate && selected.clone().hour(0).minute(0).second(0).isAfter(maxDate)) 40401 pm_html = ' disabled="disabled" class="disabled"'; 40402 40403 if (selected.hour() >= 12) { 40404 html += '<option value="AM"' + am_html + '>AM</option><option value="PM" selected="selected"' + pm_html + '>PM</option>'; 40405 } else { 40406 html += '<option value="AM" selected="selected"' + am_html + '>AM</option><option value="PM"' + pm_html + '>PM</option>'; 40407 } 40408 40409 html += '</select>'; 40410 } 40411 40412 this.container.find('.drp-calendar.' + side + ' .calendar-time').html(html); 40413 40414 }, 40415 40416 updateFormInputs: function() { 40417 40418 if (this.singleDatePicker || (this.endDate && (this.startDate.isBefore(this.endDate) || this.startDate.isSame(this.endDate)))) { 40419 this.container.find('button.applyBtn').prop('disabled', false); 40420 } else { 40421 this.container.find('button.applyBtn').prop('disabled', true); 40422 } 40423 40424 }, 40425 40426 move: function() { 40427 var parentOffset = { top: 0, left: 0 }, 40428 containerTop, 40429 drops = this.drops; 40430 40431 var parentRightEdge = $(window).width(); 40432 if (!this.parentEl.is('body')) { 40433 parentOffset = { 40434 top: this.parentEl.offset().top - this.parentEl.scrollTop(), 40435 left: this.parentEl.offset().left - this.parentEl.scrollLeft() 40436 }; 40437 parentRightEdge = this.parentEl[0].clientWidth + this.parentEl.offset().left; 40438 } 40439 40440 switch (drops) { 40441 case 'auto': 40442 containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top; 40443 if (containerTop + this.container.outerHeight() >= this.parentEl[0].scrollHeight) { 40444 containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top; 40445 drops = 'up'; 40446 } 40447 break; 40448 case 'up': 40449 containerTop = this.element.offset().top - this.container.outerHeight() - parentOffset.top; 40450 break; 40451 default: 40452 containerTop = this.element.offset().top + this.element.outerHeight() - parentOffset.top; 40453 break; 40454 } 40455 40456 // Force the container to it's actual width 40457 this.container.css({ 40458 top: 0, 40459 left: 0, 40460 right: 'auto' 40461 }); 40462 var containerWidth = this.container.outerWidth(); 40463 40464 this.container.toggleClass('drop-up', drops == 'up'); 40465 40466 if (this.opens == 'left') { 40467 var containerRight = parentRightEdge - this.element.offset().left - this.element.outerWidth(); 40468 if (containerWidth + containerRight > $(window).width()) { 40469 this.container.css({ 40470 top: containerTop, 40471 right: 'auto', 40472 left: 9 40473 }); 40474 } else { 40475 this.container.css({ 40476 top: containerTop, 40477 right: containerRight, 40478 left: 'auto' 40479 }); 40480 } 40481 } else if (this.opens == 'center') { 40482 var containerLeft = this.element.offset().left - parentOffset.left + this.element.outerWidth() / 2 40483 - containerWidth / 2; 40484 if (containerLeft < 0) { 40485 this.container.css({ 40486 top: containerTop, 40487 right: 'auto', 40488 left: 9 40489 }); 40490 } else if (containerLeft + containerWidth > $(window).width()) { 40491 this.container.css({ 40492 top: containerTop, 40493 left: 'auto', 40494 right: 0 40495 }); 40496 } else { 40497 this.container.css({ 40498 top: containerTop, 40499 left: containerLeft, 40500 right: 'auto' 40501 }); 40502 } 40503 } else { 40504 var containerLeft = this.element.offset().left - parentOffset.left; 40505 if (containerLeft + containerWidth > $(window).width()) { 40506 this.container.css({ 40507 top: containerTop, 40508 left: 'auto', 40509 right: 0 40510 }); 40511 } else { 40512 this.container.css({ 40513 top: containerTop, 40514 left: containerLeft, 40515 right: 'auto' 40516 }); 40517 } 40518 } 40519 }, 40520 40521 show: function(e) { 40522 if (this.isShowing) return; 40523 40524 // Create a click proxy that is private to this instance of datepicker, for unbinding 40525 this._outsideClickProxy = $.proxy(function(e) { this.outsideClick(e); }, this); 40526 40527 // Bind global datepicker mousedown for hiding and 40528 $(document) 40529 .on('mousedown.daterangepicker', this._outsideClickProxy) 40530 // also support mobile devices 40531 .on('touchend.daterangepicker', this._outsideClickProxy) 40532 // also explicitly play nice with Bootstrap dropdowns, which stopPropagation when clicking them 40533 .on('click.daterangepicker', '[data-toggle=dropdown]', this._outsideClickProxy) 40534 // and also close when focus changes to outside the picker (eg. tabbing between controls) 40535 .on('focusin.daterangepicker', this._outsideClickProxy); 40536 40537 // Reposition the picker if the window is resized while it's open 40538 $(window).on('resize.daterangepicker', $.proxy(function(e) { this.move(e); }, this)); 40539 40540 this.oldStartDate = this.startDate.clone(); 40541 this.oldEndDate = this.endDate.clone(); 40542 this.previousRightTime = this.endDate.clone(); 40543 40544 this.updateView(); 40545 this.container.show(); 40546 this.move(); 40547 this.element.trigger('show.daterangepicker', this); 40548 this.isShowing = true; 40549 }, 40550 40551 hide: function(e) { 40552 if (!this.isShowing) return; 40553 40554 //incomplete date selection, revert to last values 40555 if (!this.endDate) { 40556 this.startDate = this.oldStartDate.clone(); 40557 this.endDate = this.oldEndDate.clone(); 40558 } 40559 40560 //if a new date range was selected, invoke the user callback function 40561 if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate)) 40562 this.callback(this.startDate.clone(), this.endDate.clone(), this.chosenLabel); 40563 40564 //if picker is attached to a text input, update it 40565 this.updateElement(); 40566 40567 $(document).off('.daterangepicker'); 40568 $(window).off('.daterangepicker'); 40569 this.container.hide(); 40570 this.element.trigger('hide.daterangepicker', this); 40571 this.isShowing = false; 40572 }, 40573 40574 toggle: function(e) { 40575 if (this.isShowing) { 40576 this.hide(); 40577 } else { 40578 this.show(); 40579 } 40580 }, 40581 40582 outsideClick: function(e) { 40583 var target = $(e.target); 40584 // if the page is clicked anywhere except within the daterangerpicker/button 40585 // itself then call this.hide() 40586 if ( 40587 // ie modal dialog fix 40588 e.type == "focusin" || 40589 target.closest(this.element).length || 40590 target.closest(this.container).length || 40591 target.closest('.calendar-table').length 40592 ) return; 40593 this.hide(); 40594 this.element.trigger('outsideClick.daterangepicker', this); 40595 }, 40596 40597 showCalendars: function() { 40598 this.container.addClass('show-calendar'); 40599 this.move(); 40600 this.element.trigger('showCalendar.daterangepicker', this); 40601 }, 40602 40603 hideCalendars: function() { 40604 this.container.removeClass('show-calendar'); 40605 this.element.trigger('hideCalendar.daterangepicker', this); 40606 }, 40607 40608 clickRange: function(e) { 40609 var label = e.target.getAttribute('data-range-key'); 40610 this.chosenLabel = label; 40611 if (label == this.locale.customRangeLabel) { 40612 this.showCalendars(); 40613 } else { 40614 var dates = this.ranges[label]; 40615 this.startDate = dates[0]; 40616 this.endDate = dates[1]; 40617 40618 if (!this.timePicker) { 40619 this.startDate.startOf('day'); 40620 this.endDate.endOf('day'); 40621 } 40622 40623 if (!this.alwaysShowCalendars) 40624 this.hideCalendars(); 40625 this.clickApply(); 40626 } 40627 }, 40628 40629 clickPrev: function(e) { 40630 var cal = $(e.target).parents('.drp-calendar'); 40631 if (cal.hasClass('left')) { 40632 this.leftCalendar.month.subtract(1, 'month'); 40633 if (this.linkedCalendars) 40634 this.rightCalendar.month.subtract(1, 'month'); 40635 } else { 40636 this.rightCalendar.month.subtract(1, 'month'); 40637 } 40638 this.updateCalendars(); 40639 }, 40640 40641 clickNext: function(e) { 40642 var cal = $(e.target).parents('.drp-calendar'); 40643 if (cal.hasClass('left')) { 40644 this.leftCalendar.month.add(1, 'month'); 40645 } else { 40646 this.rightCalendar.month.add(1, 'month'); 40647 if (this.linkedCalendars) 40648 this.leftCalendar.month.add(1, 'month'); 40649 } 40650 this.updateCalendars(); 40651 }, 40652 40653 hoverDate: function(e) { 40654 40655 //ignore dates that can't be selected 40656 if (!$(e.target).hasClass('available')) return; 40657 40658 var title = $(e.target).attr('data-title'); 40659 var row = title.substr(1, 1); 40660 var col = title.substr(3, 1); 40661 var cal = $(e.target).parents('.drp-calendar'); 40662 var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col]; 40663 40664 //highlight the dates between the start date and the date being hovered as a potential end date 40665 var leftCalendar = this.leftCalendar; 40666 var rightCalendar = this.rightCalendar; 40667 var startDate = this.startDate; 40668 if (!this.endDate) { 40669 this.container.find('.drp-calendar tbody td').each(function(index, el) { 40670 40671 //skip week numbers, only look at dates 40672 if ($(el).hasClass('week')) return; 40673 40674 var title = $(el).attr('data-title'); 40675 var row = title.substr(1, 1); 40676 var col = title.substr(3, 1); 40677 var cal = $(el).parents('.drp-calendar'); 40678 var dt = cal.hasClass('left') ? leftCalendar.calendar[row][col] : rightCalendar.calendar[row][col]; 40679 40680 if ((dt.isAfter(startDate) && dt.isBefore(date)) || dt.isSame(date, 'day')) { 40681 $(el).addClass('in-range'); 40682 } else { 40683 $(el).removeClass('in-range'); 40684 } 40685 40686 }); 40687 } 40688 40689 }, 40690 40691 clickDate: function(e) { 40692 40693 if (!$(e.target).hasClass('available')) return; 40694 40695 var title = $(e.target).attr('data-title'); 40696 var row = title.substr(1, 1); 40697 var col = title.substr(3, 1); 40698 var cal = $(e.target).parents('.drp-calendar'); 40699 var date = cal.hasClass('left') ? this.leftCalendar.calendar[row][col] : this.rightCalendar.calendar[row][col]; 40700 40701 // 40702 // this function needs to do a few things: 40703 // * alternate between selecting a start and end date for the range, 40704 // * if the time picker is enabled, apply the hour/minute/second from the select boxes to the clicked date 40705 // * if autoapply is enabled, and an end date was chosen, apply the selection 40706 // * if single date picker mode, and time picker isn't enabled, apply the selection immediately 40707 // * if one of the inputs above the calendars was focused, cancel that manual input 40708 // 40709 40710 if (this.endDate || date.isBefore(this.startDate, 'day')) { //picking start 40711 if (this.timePicker) { 40712 var hour = parseInt(this.container.find('.left .hourselect').val(), 10); 40713 if (!this.timePicker24Hour) { 40714 var ampm = this.container.find('.left .ampmselect').val(); 40715 if (ampm === 'PM' && hour < 12) 40716 hour += 12; 40717 if (ampm === 'AM' && hour === 12) 40718 hour = 0; 40719 } 40720 var minute = parseInt(this.container.find('.left .minuteselect').val(), 10); 40721 if (isNaN(minute)) { 40722 minute = parseInt(this.container.find('.left .minuteselect option:last').val(), 10); 40723 } 40724 var second = this.timePickerSeconds ? parseInt(this.container.find('.left .secondselect').val(), 10) : 0; 40725 date = date.clone().hour(hour).minute(minute).second(second); 40726 } 40727 this.endDate = null; 40728 this.setStartDate(date.clone()); 40729 } else if (!this.endDate && date.isBefore(this.startDate)) { 40730 //special case: clicking the same date for start/end, 40731 //but the time of the end date is before the start date 40732 this.setEndDate(this.startDate.clone()); 40733 } else { // picking end 40734 if (this.timePicker) { 40735 var hour = parseInt(this.container.find('.right .hourselect').val(), 10); 40736 if (!this.timePicker24Hour) { 40737 var ampm = this.container.find('.right .ampmselect').val(); 40738 if (ampm === 'PM' && hour < 12) 40739 hour += 12; 40740 if (ampm === 'AM' && hour === 12) 40741 hour = 0; 40742 } 40743 var minute = parseInt(this.container.find('.right .minuteselect').val(), 10); 40744 if (isNaN(minute)) { 40745 minute = parseInt(this.container.find('.right .minuteselect option:last').val(), 10); 40746 } 40747 var second = this.timePickerSeconds ? parseInt(this.container.find('.right .secondselect').val(), 10) : 0; 40748 date = date.clone().hour(hour).minute(minute).second(second); 40749 } 40750 this.setEndDate(date.clone()); 40751 if (this.autoApply) { 40752 this.calculateChosenLabel(); 40753 this.clickApply(); 40754 } 40755 } 40756 40757 if (this.singleDatePicker) { 40758 this.setEndDate(this.startDate); 40759 if (!this.timePicker && this.autoApply) 40760 this.clickApply(); 40761 } 40762 40763 this.updateView(); 40764 40765 //This is to cancel the blur event handler if the mouse was in one of the inputs 40766 e.stopPropagation(); 40767 40768 }, 40769 40770 calculateChosenLabel: function () { 40771 var customRange = true; 40772 var i = 0; 40773 for (var range in this.ranges) { 40774 if (this.timePicker) { 40775 var format = this.timePickerSeconds ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD HH:mm"; 40776 //ignore times when comparing dates if time picker seconds is not enabled 40777 if (this.startDate.format(format) == this.ranges[range][0].format(format) && this.endDate.format(format) == this.ranges[range][1].format(format)) { 40778 customRange = false; 40779 this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').attr('data-range-key'); 40780 break; 40781 } 40782 } else { 40783 //ignore times when comparing dates if time picker is not enabled 40784 if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) { 40785 customRange = false; 40786 this.chosenLabel = this.container.find('.ranges li:eq(' + i + ')').addClass('active').attr('data-range-key'); 40787 break; 40788 } 40789 } 40790 i++; 40791 } 40792 if (customRange) { 40793 if (this.showCustomRangeLabel) { 40794 this.chosenLabel = this.container.find('.ranges li:last').addClass('active').attr('data-range-key'); 40795 } else { 40796 this.chosenLabel = null; 40797 } 40798 this.showCalendars(); 40799 } 40800 }, 40801 40802 clickApply: function(e) { 40803 this.hide(); 40804 this.element.trigger('apply.daterangepicker', this); 40805 }, 40806 40807 clickCancel: function(e) { 40808 this.startDate = this.oldStartDate; 40809 this.endDate = this.oldEndDate; 40810 this.hide(); 40811 this.element.trigger('cancel.daterangepicker', this); 40812 }, 40813 40814 monthOrYearChanged: function(e) { 40815 var isLeft = $(e.target).closest('.drp-calendar').hasClass('left'), 40816 leftOrRight = isLeft ? 'left' : 'right', 40817 cal = this.container.find('.drp-calendar.'+leftOrRight); 40818 40819 // Month must be Number for new moment versions 40820 var month = parseInt(cal.find('.monthselect').val(), 10); 40821 var year = cal.find('.yearselect').val(); 40822 40823 if (!isLeft) { 40824 if (year < this.startDate.year() || (year == this.startDate.year() && month < this.startDate.month())) { 40825 month = this.startDate.month(); 40826 year = this.startDate.year(); 40827 } 40828 } 40829 40830 if (this.minDate) { 40831 if (year < this.minDate.year() || (year == this.minDate.year() && month < this.minDate.month())) { 40832 month = this.minDate.month(); 40833 year = this.minDate.year(); 40834 } 40835 } 40836 40837 if (this.maxDate) { 40838 if (year > this.maxDate.year() || (year == this.maxDate.year() && month > this.maxDate.month())) { 40839 month = this.maxDate.month(); 40840 year = this.maxDate.year(); 40841 } 40842 } 40843 40844 if (isLeft) { 40845 this.leftCalendar.month.month(month).year(year); 40846 if (this.linkedCalendars) 40847 this.rightCalendar.month = this.leftCalendar.month.clone().add(1, 'month'); 40848 } else { 40849 this.rightCalendar.month.month(month).year(year); 40850 if (this.linkedCalendars) 40851 this.leftCalendar.month = this.rightCalendar.month.clone().subtract(1, 'month'); 40852 } 40853 this.updateCalendars(); 40854 }, 40855 40856 timeChanged: function(e) { 40857 40858 var cal = $(e.target).closest('.drp-calendar'), 40859 isLeft = cal.hasClass('left'); 40860 40861 var hour = parseInt(cal.find('.hourselect').val(), 10); 40862 var minute = parseInt(cal.find('.minuteselect').val(), 10); 40863 if (isNaN(minute)) { 40864 minute = parseInt(cal.find('.minuteselect option:last').val(), 10); 40865 } 40866 var second = this.timePickerSeconds ? parseInt(cal.find('.secondselect').val(), 10) : 0; 40867 40868 if (!this.timePicker24Hour) { 40869 var ampm = cal.find('.ampmselect').val(); 40870 if (ampm === 'PM' && hour < 12) 40871 hour += 12; 40872 if (ampm === 'AM' && hour === 12) 40873 hour = 0; 40874 } 40875 40876 if (isLeft) { 40877 var start = this.startDate.clone(); 40878 start.hour(hour); 40879 start.minute(minute); 40880 start.second(second); 40881 this.setStartDate(start); 40882 if (this.singleDatePicker) { 40883 this.endDate = this.startDate.clone(); 40884 } else if (this.endDate && this.endDate.format('YYYY-MM-DD') == start.format('YYYY-MM-DD') && this.endDate.isBefore(start)) { 40885 this.setEndDate(start.clone()); 40886 } 40887 } else if (this.endDate) { 40888 var end = this.endDate.clone(); 40889 end.hour(hour); 40890 end.minute(minute); 40891 end.second(second); 40892 this.setEndDate(end); 40893 } 40894 40895 //update the calendars so all clickable dates reflect the new time component 40896 this.updateCalendars(); 40897 40898 //update the form inputs above the calendars with the new time 40899 this.updateFormInputs(); 40900 40901 //re-render the time pickers because changing one selection can affect what's enabled in another 40902 this.renderTimePicker('left'); 40903 this.renderTimePicker('right'); 40904 40905 }, 40906 40907 elementChanged: function() { 40908 if (!this.element.is('input')) return; 40909 if (!this.element.val().length) return; 40910 40911 var dateString = this.element.val().split(this.locale.separator), 40912 start = null, 40913 end = null; 40914 40915 if (dateString.length === 2) { 40916 start = moment(dateString[0], this.locale.format); 40917 end = moment(dateString[1], this.locale.format); 40918 } 40919 40920 if (this.singleDatePicker || start === null || end === null) { 40921 start = moment(this.element.val(), this.locale.format); 40922 end = start; 40923 } 40924 40925 if (!start.isValid() || !end.isValid()) return; 40926 40927 this.setStartDate(start); 40928 this.setEndDate(end); 40929 this.updateView(); 40930 }, 40931 40932 keydown: function(e) { 40933 //hide on tab or enter 40934 if ((e.keyCode === 9) || (e.keyCode === 13)) { 40935 this.hide(); 40936 } 40937 40938 //hide on esc and prevent propagation 40939 if (e.keyCode === 27) { 40940 e.preventDefault(); 40941 e.stopPropagation(); 40942 40943 this.hide(); 40944 } 40945 }, 40946 40947 updateElement: function() { 40948 if (this.element.is('input') && this.autoUpdateInput) { 40949 var newValue = this.startDate.format(this.locale.format); 40950 if (!this.singleDatePicker) { 40951 newValue += this.locale.separator + this.endDate.format(this.locale.format); 40952 } 40953 if (newValue !== this.element.val()) { 40954 this.element.val(newValue).trigger('change'); 40955 } 40956 } 40957 }, 40958 40959 remove: function() { 40960 this.container.remove(); 40961 this.element.off('.daterangepicker'); 40962 this.element.removeData(); 40963 } 40964 40965 }; 40966 40967 $.fn.daterangepicker = function(options, callback) { 40968 var implementOptions = $.extend(true, {}, $.fn.daterangepicker.defaultOptions, options); 40969 this.each(function() { 40970 var el = $(this); 40971 if (el.data('daterangepicker')) 40972 el.data('daterangepicker').remove(); 40973 el.data('daterangepicker', new DateRangePicker(el, implementOptions, callback)); 40974 }); 40975 return this; 40976 }; 40977 40978 return DateRangePicker; 40979 40980}));
40981 40982 40983/***/ }), 40984/* 156 */ 40985/***/ (function(module, __webpack_exports__, __webpack_require__) { 40986 40987"use strict"; 40988/* WEBPACK VAR INJECTION */(function($) {/* unused harmony export LoadMoreFeatureResource */ 40989var LoadMoreFeatureResource = function LoadMoreFeatureResource() { 40990 this.cacheDOMObject(); 40991 this.init(); 40992}; 40993 40994LoadMoreFeatureResource.prototype.cacheDOMObject = function cacheDOMObject () { 40995 this.loadMoreButton = $.find('.module-resources .js-load-more:not(.loading)'); 40996}; 40997 40998LoadMoreFeatureResource.prototype.init = function init () { 40999 var that = this; 41000 this.loadMoreButton.forEach(function(element) { 41001 $(element).on('click', function(e) { 41002 that.clickLoadMore(e, element); 41003 }); 41004 }); 41005}; 41006 41007LoadMoreFeatureResource.prototype.clickLoadMore = function clickLoadMore (e, element) { 41008 e.preventDefault(); 41009 41010 if (!$(element).hasClass('loading')) { 41011 $(element).attr('disabled', true); 41012 var currentPage = $(element).attr('data-current-page'); 41013 var ppp = $(element).data('ppp'); 41014 $(element).addClass('loading'); 41015 41016 $.post(window.sage.ajax['module.resources.load-more'], { 41017 currentPage: currentPage, 41018 ppp: ppp, 41019 }, function(response) { 41020 $(element).removeClass('loading'); 41021 $(element).attr('disabled', false); 41022 if (!response.data.morePaginate) { 41023 $(element).hide(); 41024 } else { 41025 $(element).attr('data-current-page', response.data.nextPage); 41026 } 41027 $(element).closest('.module-resources').find('.js-append').append(response.data.view); 41028 }); 41029 } 41030 return false; 41031}; 41032 41033new LoadMoreFeatureResource(); 41034 41035/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1))) 41036 41037/***/ }), 41038/* 157 */ 41039/***/ (function(module, __webpack_exports__, __webpack_require__) { 41040 41041"use strict"; 41042/* WEBPACK VAR INJECTION */(function($) {/* unused harmony export LoadMoreEventFeature */ 41043var LoadMoreEventFeature = function LoadMoreEventFeature() { 41044 this.cacheDOMObject(); 41045 this.init(); 41046 this.ajaxLoading = false; 41047}; 41048 41049LoadMoreEventFeature.prototype.cacheDOMObject = function cacheDOMObject () { 41050 this.loadMoreButton = $.find('.post-type-archive-evenement .js-load-more:not(.loading)'); 41051}; 41052 41053LoadMoreEventFeature.prototype.init = function init () { 41054 var that = this; 41055 this.loadMoreButton.forEach(function (element) { 41056 $(element).on('click', function (e) { 41057 that.clickLoadMore(e, element); 41058 }); 41059 }); 41060}; 41061 41062LoadMoreEventFeature.prototype.clickLoadMore = function clickLoadMore (e, element) { 41063 var self = this; 41064 e.preventDefault(); 41065 41066 if (!$(element).hasClass('loading') && !this.ajaxLoading) { 41067 $(element).attr('disabled', true); 41068 var currentPage = $(element).attr('data-current-page'); 41069 var ppp = $(element).data('ppp'); 41070 $(element).addClass('loading'); 41071 this.ajaxLoading = true; 41072 41073 $.post(window.sage.ajax['archive.event.load-more'], { 41074 currentPage: currentPage, 41075 ppp: ppp, 41076 localisations: [$('.post-type-archive-evenement select[name="localisations[]"]').val()], 41077 terme: $('.post-type-archive-evenement input[name="terme"]').val(), 41078 date: $('.post-type-archive-evenement input[name="date"]').val(), 41079 }, function (response) { 41080 $(element).removeClass('loading'); 41081 $(element).attr('disabled', false); 41082 41083 var url = new URL(window.location.href); 41084 url.searchParams.set('page', parseInt(currentPage) + 1); 41085 window.history.replaceState(null, null, url); 41086 41087 if (!response.data.morePaginate) { 41088 $(element).hide(); 41089 } else { 41090 $(element).attr('data-current-page', response.data.nextPage); 41091 } 41092 $('.post-type-archive-evenement .js-append').append(response.data.view); 41093 self.ajaxLoading = false; 41094 }); 41095 } 41096 return false; 41097}; 41098 41099new LoadMoreEventFeature(); 41100/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1))) 41101 41102/***/ }), 41103/* 158 */ 41104/***/ (function(module, __webpack_exports__, __webpack_require__) { 41105 41106"use strict"; 41107/* WEBPACK VAR INJECTION */(function($) {/* unused harmony export MegaMenuFeature */ 41108var MegaMenuFeature = function MegaMenuFeature() { 41109 this.cacheDOMObject(); 41110 this.init(); 41111}; 41112 41113MegaMenuFeature.prototype.cacheDOMObject = function cacheDOMObject () { 41114 this.mainNavigationContainer = $.find('.main-navigation'); 41115 this.subLIItems = $(this.mainNavigationContainer).find('.mega-menu-content > ul > li'); 41116}; 41117 41118MegaMenuFeature.prototype.init = function init () { 41119 var that = this; 41120 this.subLIItems.each(function (element) { 41121 $(this).on('mouseenter', function (e) { 41122 that.mouseEnter(e, $(this)); 41123 }); 41124 41125 $(this).on('mouseout', function (e) { 41126 that.mouseOut(e, $(this)); 41127 }); 41128 }); 41129}; 41130 41131MegaMenuFeature.prototype.mouseEnter = function mouseEnter (e, element) { 41132 var target = element.data('target'); 41133 console.log(target); 41134 41135 if (target && $(this.mainNavigationContainer).find('.mega-menu-content.' + target)) { 41136 $(this.mainNavigationContainer).find('.mega-menu-content.' + target).addClass('active'); 41137 } 41138}; 41139 41140MegaMenuFeature.prototype.mouseOut = function mouseOut (e, element) { 41141 var target = element.data('target'); 41142 41143 if (target && $(this.mainNavigationContainer).find('.mega-menu-content.' + target)) { 41144 $(this.mainNavigationContainer).find('.mega-menu-content.' + target).removeClass('active'); 41145 } 41146}; 41147 41148new MegaMenuFeature(); 41149/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1))) 41150 41151/***/ }), 41152/* 159 */ 41153/***/ (function(module, __webpack_exports__, __webpack_require__) { 41154 41155"use strict"; 41156var DownloadPdf = function DownloadPdf () {}; 41157 41158DownloadPdf.prototype.init = function init () { 41159 var this$1 = this; 41160 41161 var sectionButtons = document.querySelectorAll('.btn-download-section'); 41162 41163 sectionButtons.forEach(function (button) { 41164 button.addEventListener('click', function () { 41165 this$1.downloadSection(button); 41166 41167 }); 41168 }); 41169}; 41170 41171DownloadPdf.prototype.downloadSection = function downloadSection (button) { 41172 var dataIndex = button.getAttribute('data-index'); 41173 var pdfLinks = document.querySelectorAll((".btn-wrapper a[data-section=\"" + dataIndex + "\"]")); 41174 41175 pdfLinks.forEach(function (link) { 41176 var hiddenLink = document.createElement('a'); 41177 hiddenLink.href = link.href; 41178 hiddenLink.target = '_blank'; 41179 hiddenLink.download = link.innerText.trim(); 41180 hiddenLink.click(); 41181 }); 41182}; 41183 41184/* harmony default export */ __webpack_exports__["a"] = (new DownloadPdf); 41185 41186/***/ }), 41187/* 160 */ 41188/***/ (function(module, __webpack_exports__, __webpack_require__) { 41189 41190"use strict"; 41191/* WEBPACK VAR INJECTION */(function($) {// import Variables from './0-variables'; 41192// import Utilities from './0-utilities'; 41193 41194 41195/* harmony default export */ __webpack_exports__["a"] = ({
41196 init: function init() { 41197 // JavaScript to be fired on the home page 41198 41199 if ($('.js_slider-banner-page-home').data('slide') > 1) { 41200 $('.js_slider-banner-page-home').slick({ 41201 loop: true, 41202 arrows: false, 41203 autoplay: true, 41204 autoplaySpeed: 5000, 41205 }); 41206 } 41207 41208 }, 41209 finalize: function finalize() { 41210 // JavaScript to be fired on the home page, after the init JS 41211 }, 41212}); 41213 41214/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1))) 41215 41216/***/ }), 41217/* 161 */ 41218/***/ (function(module, __webpack_exports__, __webpack_require__) { 41219 41220"use strict"; 41221// import Variables from './0-variables'; 41222// import Utilities from './0-utilities'; 41223 41224 41225/* harmony default export */ __webpack_exports__["a"] = ({ 41226 init: function init() { 41227 // JavaScript to be fired on the about us page 41228 }, 41229}); 41230 41231/***/ }), 41232/* 162 */ 41233/***/ (function(module, __webpack_exports__, __webpack_require__) { 41234 41235"use strict"; 41236/* WEBPACK VAR INJECTION */(function($) {// import Variables from './0-variables'; 41237// import Utilities from './0-utilities'; 41238 41239 41240/* harmony default export */ __webpack_exports__["a"] = ({ 41241 init: function init() { 41242 var this$1 = this; 41243 41244 41245 var $resetform = $('.btn-reset'); 41246 41247 var $loadMoreButton = $('.js-load-more-button'); 41248 41249 if ($resetform.length > 0) { 41250 $resetform.on('click', function (e) { 41251 e.preventDefault(); 41252 41253 var $form = $resetform.parent().parent('form'); 41254 41255 if ($form.length > 0) { 41256 41257 $('input', $form).each(function (_, input) { 41258 $(input).val(''); 41259 }); 41260 41261 $('select', $form).each(function (_, select) { 41262 $('option', select).attr('selected', false); 41263 $('option:first-child', select).attr('selected', true); 41264 }); 41265 41266 $form.trigger('submit'); 41267 } 41268 }); 41269 } 41270 41271 if ($loadMoreButton.length > 0) { 41272 var $container = $('.js-news-list-container'); 41273 this.checkLoadMoreVisibility($loadMoreButton, $container); 41274 41275 $loadMoreButton.on('click', function (e) { 41276 this$1.ajaxListing(parseInt($container.data('current-page')) + 1, $loadMoreButton, $container); 41277 }); 41278 } 41279 41280 }, 41281 finalize: function finalize() { 41282 // JavaScript to be fired on the home page, after the init JS 41283 }, 41284 41285 checkLoadMoreVisibility: function checkLoadMoreVisibility($loadMoreButton, $container) 41286 { 41287 if ($container.data('current-page') >= $container.data('max-page')) { 41288 $loadMoreButton.hide(); 41289 } 41290 }, 41291 41292 ajaxListing: function ajaxListing(page, $loadMoreButton, $container) { 41293 self = this; 41294 $loadMoreButton.attr('disabled', true); 41295 var searchParam = $container.data('searchparam'); 41296 var localisationsParam = $container.data('localisationsparam'); 41297 var dateParam = $container.data('dateparam'); 41298 41299 $.ajax({ 41300 url: ajaxurl, 41301 type: 'POST', 41302 data: { 41303 'action': 'ajaxNewsList', 41304 'page': page, 41305 's': searchParam, 41306 'localisations': localisationsParam, 41307 'date': dateParam 41308 }, 41309 }).done(function (response) { 41310 var url = new URL(window.location.href); 41311 url.searchParams.set('page', parseInt(page)); 41312 window.history.replaceState(null, null, url); 41313 41314 $container.data('current-page', page); 41315 41316 $loadMoreButton.attr('disabled', false); 41317 self.checkLoadMoreVisibility($loadMoreButton, $container) 41318 41319 $('.js-news-list').append(response); 41320 }); 41321 } 41322}); 41323 41324/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1))) 41325 41326/***/ }), 41327/* 163 */ 41328/***/ (function(module, __webpack_exports__, __webpack_require__) { 41329 41330"use strict"; 41331/* WEBPACK VAR INJECTION */(function($) {// import Variables from './0-variables'; 41332// import Utilities from './0-utilities'; 41333 41334 41335/* harmony default export */ __webpack_exports__["a"] = ({
41336 init: function init() { 41337 var this$1 = this; 41338 41339 var $resetform = $('.btn-reset'); 41340 41341 var $loadMoreButton = $('.js-load-more-button'); 41342 41343 if ($resetform.length > 0) { 41344 $resetform.on('click', function (e) { 41345 e.preventDefault(); 41346 41347 var $form = $resetform.parent().parent('form'); 41348 41349 if ($form.length > 0) { 41350 41351 $('input', $form).each(function (_, input) { 41352 $(input).prop('checked', false); 41353 }); 41354 41355 } 41356 }); 41357 } 41358 41359 if ($loadMoreButton.length > 0) { 41360 var $container = $('.js-search-list-container'); 41361 this.checkLoadMoreVisibility($loadMoreButton, $container); 41362 41363 $loadMoreButton.on('click', function (e) { 41364 this$1.ajaxListing(parseInt($container.data('current-page')) + 1, $loadMoreButton, $container); 41365 }); 41366 } 41367 41368 }, 41369 finalize: function finalize() { 41370 // JavaScript to be fired on the home page, after the init JS 41371 }, 41372 41373 checkLoadMoreVisibility: function checkLoadMoreVisibility($loadMoreButton, $container) 41374 { 41375 if ($container.data('current-page') >= $container.data('max-page')) { 41376 $loadMoreButton.hide(); 41377 } 41378 }, 41379 41380 ajaxListing: function ajaxListing(page, $loadMoreButton, $container) { 41381 self = this; 41382 $loadMoreButton.attr('disabled', true); 41383 var searchParam = $container.data('searchparam'); 41384 41385 var displayPages = ''; 41386 var displayNews = ''; 41387 var displayEvents = ''; 41388 41389 if ($('#form-search_news').prop('checked')) { 41390 displayNews = true; 41391 } 41392 41393 if ($('#form-search_pages').prop('checked')) { 41394 displayPages = true; 41395 } 41396 41397 if ($('#form-search_events').prop('checked')) { 41398 displayEvents = true; 41399 } 41400 41401 $.ajax({ 41402 url: ajaxurl, 41403 type: 'POST', 41404 data: { 41405 'action': 'ajaxSearchList', 41406 'page': page, 41407 'searchParam': searchParam, 41408 'form-search_events': displayEvents, 41409 'form-search_news': displayNews, 41410 'form-search_pages': displayPages, 41411 }, 41412 }).done(function (response) { 41413 var url = new URL(window.location.href); 41414 url.searchParams.set('page', parseInt(page)); 41415 window.history.replaceState(null, null, url); 41416 41417 $container.data('current-page', page); 41418 41419 $loadMoreButton.attr('disabled', false); 41420 self.checkLoadMoreVisibility($loadMoreButton, $container) 41421 41422 $('.js-search-list').append(response); 41423 }); 41424 } 41425}); 41426 41427/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1))) 41428 41429/***/ }), 41430/* 164 */ 41431/***/ (function(module, exports) { 41432 41433// removed by extract-text-webpack-plugin 41434 41435/***/ }) 41436/******/ ]); 41437//# sourceMappingURL=main.js.map
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.